diff --git a/.golangci.yml b/.golangci.yml index 2fb16677..ed6c44bd 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -10,7 +10,6 @@ linters: - (io.Closer).Close - (*database/sql.Conn).Close - (*github.com/jmoiron/sqlx.Conn).Close - - (*google.golang.org/grpc.ClientConn).Close - (github.com/ory/dockertest/v3.Resource).Close exclusions: rules: diff --git a/Makefile b/Makefile index 50f38468..56aa3c59 100644 --- a/Makefile +++ b/Makefile @@ -3,87 +3,62 @@ COMMIT := $(shell git rev-parse --short HEAD) TAG := "$(shell git rev-list --tags --max-count=1)" VERSION := "$(shell git describe --tags ${TAG})-next" BUILD_DIR=dist -PROTON_COMMIT := "409f146" +PROTON_COMMIT := "b9ed2ad" .PHONY: all build clean test tidy vet proto setup format generate lint install all: clean test build format lint -tidy: - @echo "Tidy up go.mod..." +tidy: ## Tidy go.mod @go mod tidy -v -install: - @echo "Installing compass to ${GOBIN}..." +install: ## Install compass binary @go install -format: - @echo "Running go fmt..." +format: ## Format Go source files @go fmt ./... -lint: ## Lint checker - @echo "Running lint checks using golangci-lint..." +lint: ## Run lint checks @golangci-lint run -clean: ## Clean the build artifacts - @echo "Cleaning up build directories..." +clean: ## Clean build artifacts @rm -rf coverage.out ${BUILD_DIR} -test: ## Run the tests - go test ./... -race -coverprofile=coverage.out +test: ## Run tests with coverage + @go test ./... -race -coverprofile=coverage.out -e2e: ## Run all e2e tests - go test ./test/... --tags=e2e +e2e: ## Run e2e tests + @go test ./test/... --tags=e2e -coverage: test ## Print the code coverage - @echo "Generating coverage report..." +coverage: test ## Generate coverage report @go tool cover -html=coverage.out build: ## Build the compass binary - @echo "Building compass version ${VERSION}..." - CGO_ENABLED=0 go build -ldflags "-X ${NAME}/cli.Version=${VERSION}" - @echo "Build complete" + @CGO_ENABLED=0 go build -ldflags "-X ${NAME}/cli.Version=${VERSION}" buildr: setup ## Build release snapshot - goreleaser release --snapshot --skip=publish --clean + @goreleaser release --snapshot --skip=publish --clean vet: ## Run go vet - go vet ./... + @go vet ./... download: ## Download go modules @go mod download -generate: ## Run all go generate in the code base - @echo "Running go generate..." - go generate ./... +generate: ## Run go generate + @go generate ./... -config: ## Generate the sample config file - @echo "Initializing sample server config..." +config: ## Generate sample config file @cp config/config.yaml config.yaml -proto: ## Generate the protobuf files - @echo "Generating protobuf from raystack/proton" - @echo " [info] make sure correct version of dependencies are installed using 'make setup'" +proto: ## Generate protobuf files + @rm -rf proto/ @buf generate https://github.com/raystack/proton/archive/${PROTON_COMMIT}.zip#strip_components=1 --template buf.gen.yaml --path raystack/compass -v - @echo "Protobuf compilation finished" setup: ## Install required dependencies - @echo "> Installing dependencies..." - go mod tidy - go install github.com/vektra/mockery/v2@latest - go install github.com/bufbuild/buf/cmd/buf@latest - -swagger-md: - npx swagger-markdown -i proto/compass.swagger.yaml -o docs/docs/reference/api.md - -clean-doc: - @echo "> cleaning up auto-generated docs" - @rm -rf ./docs/docs/reference/cli.md - @rm -f ./docs/docs/reference/api.md - -doc: clean-doc swagger-md ## Generate api and cli references - @echo "> generate cli docs" - @go run . reference --plain | sed '1 s,.*,# CLI,' > ./docs/docs/reference/cli.md + @go mod tidy + @go install github.com/vektra/mockery/v2@latest + @go install github.com/bufbuild/buf/cmd/buf@latest help: ## Display this help message - @cat $(MAKEFILE_LIST) | grep -e "^[a-zA-Z_\-]*: *.*## *" | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' \ No newline at end of file + @cat $(MAKEFILE_LIST) | grep -e "^[a-zA-Z_\-]*: *.*## *" | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' diff --git a/README.md b/README.md index 7c333002..b7b7cdb8 100644 --- a/README.md +++ b/README.md @@ -95,7 +95,7 @@ alias compass="docker run -e HOME=/tmp -v $HOME/.config/raystack:/tmp/.config/ra ## Usage -Compass is purely API-driven. It is very easy to get started with Compass. It provides CLI, HTTP and GRPC APIs for simpler developer experience. +Compass is purely API-driven. It is very easy to get started with Compass. It provides CLI and HTTP APIs for simpler developer experience. #### CLI @@ -115,7 +115,7 @@ compass reference #### API -Compass provides a fully-featured GRPC and HTTP API to interact with Compass server. Both APIs adheres to a set of standards that are rigidly followed. Please refer to [proton](https://github.com/raystack/proton/tree/main/raystack/compass/v1beta1) for GRPC API definitions. +Compass provides a fully-featured HTTP API to interact with Compass server. The API is built with [Connect RPC](https://connectrpc.com/) and supports both Connect and gRPC protocols. Please refer to [proton](https://github.com/raystack/proton/tree/main/raystack/compass/v1beta1) for API definitions. ## Contribute diff --git a/buf.gen.yaml b/buf.gen.yaml index 43f38f9e..2b1f5468 100644 --- a/buf.gen.yaml +++ b/buf.gen.yaml @@ -1,26 +1,17 @@ -version: v1 +version: v2 +managed: + enabled: true + override: + - file_option: go_package + path: raystack/compass/v1beta1/service.proto + value: github.com/raystack/compass/proto/compassv1beta1 plugins: - - plugin: buf.build/protocolbuffers/go:v1.31.0 + - remote: buf.build/protocolbuffers/go:v1.36.11 out: proto - opt: paths=source_relative - - plugin: buf.build/grpc/go:v1.3.0 + opt: module=github.com/raystack/compass/proto + - remote: buf.build/bufbuild/validate-go:v1.0.2 out: proto - opt: paths=source_relative,require_unimplemented_servers=true - - plugin: buf.build/grpc-ecosystem/gateway:v2.16.0 + opt: module=github.com/raystack/compass/proto + - remote: buf.build/connectrpc/go:v1.18.1 out: proto - opt: - - paths=source_relative - - allow_repeated_fields_in_body=true - - plugin: buf.build/bufbuild/validate-go:v1.0.2 - out: proto - opt: - - paths=source_relative - - plugin: buf.build/grpc-ecosystem/openapiv2:v2.16.0 - out: proto - opt: - - allow_repeated_fields_in_body=true - - output_format=yaml - - allow_merge=true - - merge_file_name=compass - - openapi_naming_strategy=simple - - json_names_for_fields=false + opt: module=github.com/raystack/compass/proto diff --git a/cli/assets.go b/cli/assets.go index cedb49ff..fc512e01 100644 --- a/cli/assets.go +++ b/cli/assets.go @@ -2,13 +2,12 @@ package cli import ( "fmt" - "github.com/raystack/compass/core/namespace" "os" - "github.com/raystack/compass/internal/client" - compassv1beta1 "github.com/raystack/compass/proto/raystack/compass/v1beta1" - "github.com/MakeNowJust/heredoc" + "github.com/raystack/compass/core/namespace" + "github.com/raystack/compass/internal/client" + compassv1beta1 "github.com/raystack/compass/proto/compassv1beta1" "github.com/raystack/salt/cli/printer" "github.com/spf13/cobra" ) @@ -76,14 +75,12 @@ func listAllAssetsCommand(cfg *Config) *cobra.Command { spinner := printer.Spin("") defer spinner.Stop() - clnt, cancel, err := client.Create(cmd.Context(), cfg.Client) + clnt, err := client.Create(cmd.Context(), cfg.Client) if err != nil { return err } - defer cancel() - ctx := client.SetMetadata(cmd.Context(), cfg.Client, namespaceID) - res, err := clnt.GetAllAssets(ctx, &compassv1beta1.GetAllAssetsRequest{ + req := client.NewRequest(cfg.Client, namespaceID, &compassv1beta1.GetAllAssetsRequest{ Q: q, QFields: qFields, Types: types, @@ -94,7 +91,7 @@ func listAllAssetsCommand(cfg *Config) *cobra.Command { Size: size, Offset: page, }) - + res, err := clnt.GetAllAssets(cmd.Context(), req) if err != nil { return err } @@ -103,14 +100,14 @@ func listAllAssetsCommand(cfg *Config) *cobra.Command { if output != "json" { report := [][]string{} report = append(report, []string{"ID", "TYPE", "SERVICE", "URN", "NAME", "VERSION"}) - for _, i := range res.GetData() { + for _, i := range res.Msg.GetData() { report = append(report, []string{i.Id, i.Type, i.Service, i.Urn, printer.Bluef("%s", i.Name), i.Version}) } printer.Table(os.Stdout, report) fmt.Println(printer.Cyanf("To view all the data in JSON format, use flag `-o json`")) } else { - fmt.Println(printer.Bluef("%s", prettyPrint(res.GetData()))) + fmt.Println(printer.Bluef("%s", prettyPrint(res.Msg.GetData()))) } return nil @@ -147,23 +144,22 @@ func viewAssetByIDCommand(cfg *Config) *cobra.Command { spinner := printer.Spin("") defer spinner.Stop() - clnt, cancel, err := client.Create(cmd.Context(), cfg.Client) + clnt, err := client.Create(cmd.Context(), cfg.Client) if err != nil { return err } - defer cancel() assetID := args[0] - ctx := client.SetMetadata(cmd.Context(), cfg.Client, namespaceID) - res, err := clnt.GetAssetByID(ctx, &compassv1beta1.GetAssetByIDRequest{ + req := client.NewRequest(cfg.Client, namespaceID, &compassv1beta1.GetAssetByIDRequest{ Id: assetID, }) + res, err := clnt.GetAssetByID(cmd.Context(), req) if err != nil { return err } spinner.Stop() - fmt.Println(printer.Bluef("%s", prettyPrint(res.GetData()))) + fmt.Println(printer.Bluef("%s", prettyPrint(res.Msg.GetData()))) return nil }, } @@ -196,24 +192,22 @@ func editAssetCommand(cfg *Config) *cobra.Command { return err } - clnt, cancel, err := client.Create(cmd.Context(), cfg.Client) + clnt, err := client.Create(cmd.Context(), cfg.Client) if err != nil { return err } - defer cancel() - ctx := client.SetMetadata(cmd.Context(), cfg.Client, namespaceID) - res, err := clnt.UpsertPatchAsset(ctx, &compassv1beta1.UpsertPatchAssetRequest{ + req := client.NewRequest(cfg.Client, namespaceID, &compassv1beta1.UpsertPatchAssetRequest{ Asset: reqBody.Asset, Upstreams: reqBody.Upstreams, }) - + res, err := clnt.UpsertPatchAsset(cmd.Context(), req) if err != nil { return err } spinner.Stop() - fmt.Println("ID: \t", printer.Greenf("%s", res.Id)) + fmt.Println("ID: \t", printer.Greenf("%s", res.Msg.Id)) return nil }, } @@ -230,7 +224,7 @@ func deleteAssetByIDCommand(cfg *Config) *cobra.Command { Use: "delete ", Short: "delete asset with the given ID", Example: heredoc.Doc(` - $ compass asset delete + $ compass asset delete `), Args: cobra.ExactArgs(1), Annotations: map[string]string{ @@ -240,17 +234,16 @@ func deleteAssetByIDCommand(cfg *Config) *cobra.Command { spinner := printer.Spin("") defer spinner.Stop() - clnt, cancel, err := client.Create(cmd.Context(), cfg.Client) + clnt, err := client.Create(cmd.Context(), cfg.Client) if err != nil { return err } - defer cancel() assetID := args[0] - ctx := client.SetMetadata(cmd.Context(), cfg.Client, namespaceID) - _, err = clnt.DeleteAsset(ctx, &compassv1beta1.DeleteAssetRequest{ + req := client.NewRequest(cfg.Client, namespaceID, &compassv1beta1.DeleteAssetRequest{ Id: assetID, }) + _, err = clnt.DeleteAsset(cmd.Context(), req) if err != nil { return err } @@ -281,28 +274,26 @@ func listAllTypesCommand(cfg *Config) *cobra.Command { spinner := printer.Spin("") defer spinner.Stop() - clnt, cancel, err := client.Create(cmd.Context(), cfg.Client) + clnt, err := client.Create(cmd.Context(), cfg.Client) if err != nil { return err } - defer cancel() - ctx := client.SetMetadata(cmd.Context(), cfg.Client, "") - res, err := clnt.GetAllTypes(ctx, &compassv1beta1.GetAllTypesRequest{ + req := client.NewRequest(cfg.Client, "", &compassv1beta1.GetAllTypesRequest{ Q: q, QFields: qFields, Types: types, Services: services, Data: data, }) - + res, err := clnt.GetAllTypes(cmd.Context(), req) if err != nil { return err } spinner.Stop() report := [][]string{{"NAME", "COUNT"}} - for _, i := range res.GetData() { + for _, i := range res.Msg.GetData() { report = append(report, []string{printer.Bluef("%s", i.Name), fmt.Sprintf("%v", i.Count)}) } printer.Table(os.Stdout, report) @@ -332,24 +323,23 @@ func listAssetStargazerCommand(cfg *Config) *cobra.Command { spinner := printer.Spin("") defer spinner.Stop() - clnt, cancel, err := client.Create(cmd.Context(), cfg.Client) + clnt, err := client.Create(cmd.Context(), cfg.Client) if err != nil { return err } - defer cancel() assetID := args[0] - ctx := client.SetMetadata(cmd.Context(), cfg.Client, namespaceID) - res, err := clnt.GetAssetStargazers(ctx, &compassv1beta1.GetAssetStargazersRequest{ + req := client.NewRequest(cfg.Client, namespaceID, &compassv1beta1.GetAssetStargazersRequest{ Id: assetID, Size: size, Offset: page, }) + res, err := clnt.GetAssetStargazers(cmd.Context(), req) if err != nil { return err } spinner.Stop() - fmt.Println(printer.Bluef("%s", prettyPrint(res.GetData()))) + fmt.Println(printer.Bluef("%s", prettyPrint(res.Msg.GetData()))) return nil }, } @@ -371,17 +361,16 @@ func starAssetCommand(cfg *Config) *cobra.Command { spinner := printer.Spin("") defer spinner.Stop() - clnt, cancel, err := client.Create(cmd.Context(), cfg.Client) + clnt, err := client.Create(cmd.Context(), cfg.Client) if err != nil { return err } - defer cancel() assetID := args[0] - ctx := client.SetMetadata(cmd.Context(), cfg.Client, namespaceID) - _, err = clnt.StarAsset(ctx, &compassv1beta1.StarAssetRequest{ + req := client.NewRequest(cfg.Client, namespaceID, &compassv1beta1.StarAssetRequest{ AssetId: assetID, }) + _, err = clnt.StarAsset(cmd.Context(), req) if err != nil { return err } @@ -407,17 +396,16 @@ func unstarAssetCommand(cfg *Config) *cobra.Command { spinner := printer.Spin("") defer spinner.Stop() - clnt, cancel, err := client.Create(cmd.Context(), cfg.Client) + clnt, err := client.Create(cmd.Context(), cfg.Client) if err != nil { return err } - defer cancel() assetID := args[0] - ctx := client.SetMetadata(cmd.Context(), cfg.Client, namespaceID) - _, err = clnt.UnstarAsset(ctx, &compassv1beta1.UnstarAssetRequest{ + req := client.NewRequest(cfg.Client, namespaceID, &compassv1beta1.UnstarAssetRequest{ AssetId: assetID, }) + _, err = clnt.UnstarAsset(cmd.Context(), req) if err != nil { return err } @@ -447,17 +435,16 @@ func starredAssetCommand(cfg *Config) *cobra.Command { spinner := printer.Spin("") defer spinner.Stop() - clnt, cancel, err := client.Create(cmd.Context(), cfg.Client) + clnt, err := client.Create(cmd.Context(), cfg.Client) if err != nil { return err } - defer cancel() - ctx := client.SetMetadata(cmd.Context(), cfg.Client, namespaceID) - res, err := clnt.GetMyStarredAssets(ctx, &compassv1beta1.GetMyStarredAssetsRequest{ + req := client.NewRequest(cfg.Client, namespaceID, &compassv1beta1.GetMyStarredAssetsRequest{ Size: size, Offset: page, }) + res, err := clnt.GetMyStarredAssets(cmd.Context(), req) if err != nil { return err } @@ -466,14 +453,14 @@ func starredAssetCommand(cfg *Config) *cobra.Command { if output != "json" { report := [][]string{} report = append(report, []string{"ID", "TYPE", "SERVICE", "URN", "NAME", "VERSION"}) - for _, i := range res.GetData() { + for _, i := range res.Msg.GetData() { report = append(report, []string{i.Id, i.Type, i.Service, i.Urn, printer.Bluef("%s", i.Name), i.Version}) } printer.Table(os.Stdout, report) fmt.Println(printer.Cyanf("To view all the data in JSON format, use flag `-o json`")) } else { - fmt.Println(printer.Bluef("%s", prettyPrint(res.GetData()))) + fmt.Println(printer.Bluef("%s", prettyPrint(res.Msg.GetData()))) } return nil @@ -498,25 +485,24 @@ func versionHistoryAssetCommand(cfg *Config) *cobra.Command { spinner := printer.Spin("") defer spinner.Stop() - clnt, cancel, err := client.Create(cmd.Context(), cfg.Client) + clnt, err := client.Create(cmd.Context(), cfg.Client) if err != nil { return err } - defer cancel() assetID := args[0] - ctx := client.SetMetadata(cmd.Context(), cfg.Client, namespaceID) - res, err := clnt.GetAssetVersionHistory(ctx, &compassv1beta1.GetAssetVersionHistoryRequest{ + req := client.NewRequest(cfg.Client, namespaceID, &compassv1beta1.GetAssetVersionHistoryRequest{ Id: assetID, Size: size, Offset: page, }) + res, err := clnt.GetAssetVersionHistory(cmd.Context(), req) if err != nil { return err } spinner.Stop() - fmt.Println(printer.Bluef("%s", prettyPrint(res.GetData()))) + fmt.Println(printer.Bluef("%s", prettyPrint(res.Msg.GetData()))) return nil }, @@ -541,25 +527,24 @@ func viewAssetByVersionCommand(cfg *Config) *cobra.Command { spinner := printer.Spin("") defer spinner.Stop() - clnt, cancel, err := client.Create(cmd.Context(), cfg.Client) + clnt, err := client.Create(cmd.Context(), cfg.Client) if err != nil { return err } - defer cancel() assetID := args[0] assetVersion := args[1] - ctx := client.SetMetadata(cmd.Context(), cfg.Client, namespaceID) - res, err := clnt.GetAssetByVersion(ctx, &compassv1beta1.GetAssetByVersionRequest{ + req := client.NewRequest(cfg.Client, namespaceID, &compassv1beta1.GetAssetByVersionRequest{ Id: assetID, Version: assetVersion, }) + res, err := clnt.GetAssetByVersion(cmd.Context(), req) if err != nil { return err } spinner.Stop() - fmt.Println(printer.Bluef("%s", prettyPrint(res.GetData()))) + fmt.Println(printer.Bluef("%s", prettyPrint(res.Msg.GetData()))) return nil }, diff --git a/cli/discussions.go b/cli/discussions.go index d9818e93..3cd132a4 100644 --- a/cli/discussions.go +++ b/cli/discussions.go @@ -2,14 +2,13 @@ package cli import ( "fmt" - "github.com/raystack/compass/core/namespace" "os" + "github.com/MakeNowJust/heredoc" + "github.com/raystack/compass/core/namespace" "github.com/raystack/compass/internal/client" - compassv1beta1 "github.com/raystack/compass/proto/raystack/compass/v1beta1" + compassv1beta1 "github.com/raystack/compass/proto/compassv1beta1" "github.com/raystack/salt/cli/printer" - - "github.com/MakeNowJust/heredoc" "github.com/spf13/cobra" ) @@ -52,14 +51,13 @@ func listAllDiscussionsCommand(cfg *Config) *cobra.Command { spinner := printer.Spin("") defer spinner.Stop() - clnt, cancel, err := client.Create(cmd.Context(), cfg.Client) + clnt, err := client.Create(cmd.Context(), cfg.Client) if err != nil { return err } - defer cancel() - ctx := client.SetMetadata(cmd.Context(), cfg.Client, namespaceID) - res, err := clnt.GetAllDiscussions(ctx, &compassv1beta1.GetAllDiscussionsRequest{}) + req := client.NewRequest(cfg.Client, namespaceID, &compassv1beta1.GetAllDiscussionsRequest{}) + res, err := clnt.GetAllDiscussions(cmd.Context(), req) if err != nil { return err } @@ -68,7 +66,7 @@ func listAllDiscussionsCommand(cfg *Config) *cobra.Command { report := [][]string{} report = append(report, []string{"ID", "TITLE", "TYPE", "STATE"}) index := 1 - for _, i := range res.GetData() { + for _, i := range res.Msg.GetData() { report = append(report, []string{i.Id, i.Title, i.Type, i.State}) index++ } @@ -76,7 +74,7 @@ func listAllDiscussionsCommand(cfg *Config) *cobra.Command { fmt.Println(printer.Cyanf("To view all the data in JSON format, use flag `-o json`")) } else { - fmt.Println(printer.Bluef("%s", prettyPrint(res.GetData()))) + fmt.Println(printer.Bluef("%s", prettyPrint(res.Msg.GetData()))) } return nil @@ -102,23 +100,22 @@ func viewDiscussionByIDCommand(cfg *Config) *cobra.Command { spinner := printer.Spin("") defer spinner.Stop() - clnt, cancel, err := client.Create(cmd.Context(), cfg.Client) + clnt, err := client.Create(cmd.Context(), cfg.Client) if err != nil { return err } - defer cancel() discussionID := args[0] - ctx := client.SetMetadata(cmd.Context(), cfg.Client, namespaceID) - res, err := clnt.GetDiscussion(ctx, &compassv1beta1.GetDiscussionRequest{ + req := client.NewRequest(cfg.Client, namespaceID, &compassv1beta1.GetDiscussionRequest{ Id: discussionID, }) + res, err := clnt.GetDiscussion(cmd.Context(), req) if err != nil { return err } spinner.Stop() - fmt.Println(printer.Bluef("%s", prettyPrint(res.GetData()))) + fmt.Println(printer.Bluef("%s", prettyPrint(res.Msg.GetData()))) return nil }, } @@ -151,14 +148,12 @@ func postDiscussionCommand(cfg *Config) *cobra.Command { return err } - clnt, cancel, err := client.Create(cmd.Context(), cfg.Client) + clnt, err := client.Create(cmd.Context(), cfg.Client) if err != nil { return err } - defer cancel() - ctx := client.SetMetadata(cmd.Context(), cfg.Client, namespaceID) - res, err := clnt.CreateDiscussion(ctx, &compassv1beta1.CreateDiscussionRequest{ + req := client.NewRequest(cfg.Client, namespaceID, &compassv1beta1.CreateDiscussionRequest{ Title: reqBody.Title, Body: reqBody.Body, Type: reqBody.Type, @@ -166,13 +161,13 @@ func postDiscussionCommand(cfg *Config) *cobra.Command { Labels: reqBody.Labels, Assets: reqBody.Assets, }) - + res, err := clnt.CreateDiscussion(cmd.Context(), req) if err != nil { return err } spinner.Stop() - fmt.Println("ID: \t", printer.Greenf("%s", res.Id)) + fmt.Println("ID: \t", printer.Greenf("%s", res.Msg.Id)) return nil }, } diff --git a/cli/lineage.go b/cli/lineage.go index 3e5f1395..655005c0 100644 --- a/cli/lineage.go +++ b/cli/lineage.go @@ -2,11 +2,11 @@ package cli import ( "fmt" - "github.com/raystack/compass/core/namespace" "github.com/MakeNowJust/heredoc" + "github.com/raystack/compass/core/namespace" "github.com/raystack/compass/internal/client" - compassv1beta1 "github.com/raystack/compass/proto/raystack/compass/v1beta1" + compassv1beta1 "github.com/raystack/compass/proto/compassv1beta1" "github.com/raystack/salt/cli/printer" "github.com/spf13/cobra" ) @@ -28,22 +28,20 @@ func lineageCommand(cfg *Config) *cobra.Command { spinner := printer.Spin("") defer spinner.Stop() - clnt, cancel, err := client.Create(cmd.Context(), cfg.Client) + clnt, err := client.Create(cmd.Context(), cfg.Client) if err != nil { return err } - defer cancel() - - ctx := client.SetMetadata(cmd.Context(), cfg.Client, namespaceID) - res, err := clnt.GetGraph(ctx, &compassv1beta1.GetGraphRequest{ + req := client.NewRequest(cfg.Client, namespaceID, &compassv1beta1.GetGraphRequest{ Urn: args[0], }) + res, err := clnt.GetGraph(cmd.Context(), req) if err != nil { return err } - fmt.Println(printer.Bluef("%s", prettyPrint(res.GetData()))) + fmt.Println(printer.Bluef("%s", prettyPrint(res.Msg.GetData()))) return nil }, diff --git a/cli/namespace.go b/cli/namespace.go index a081e242..82dd6e77 100644 --- a/cli/namespace.go +++ b/cli/namespace.go @@ -3,15 +3,14 @@ package cli import ( "errors" "fmt" - "github.com/raystack/compass/core/namespace" "os" "strings" + "github.com/MakeNowJust/heredoc" + "github.com/raystack/compass/core/namespace" "github.com/raystack/compass/internal/client" - compassv1beta1 "github.com/raystack/compass/proto/raystack/compass/v1beta1" + compassv1beta1 "github.com/raystack/compass/proto/compassv1beta1" "github.com/raystack/salt/cli/printer" - - "github.com/MakeNowJust/heredoc" "github.com/spf13/cobra" ) @@ -53,14 +52,13 @@ func listNamespacesCommand(cfg *Config) *cobra.Command { spinner := printer.Spin("") defer spinner.Stop() - cl, cancel, err := client.Create(cmd.Context(), cfg.Client) + cl, err := client.Create(cmd.Context(), cfg.Client) if err != nil { return err } - defer cancel() - ctx := client.SetMetadata(cmd.Context(), cfg.Client, "") - res, err := cl.ListNamespaces(ctx, &compassv1beta1.ListNamespacesRequest{}) + req := client.NewRequest(cfg.Client, "", &compassv1beta1.ListNamespacesRequest{}) + res, err := cl.ListNamespaces(cmd.Context(), req) if err != nil { return err } @@ -69,7 +67,7 @@ func listNamespacesCommand(cfg *Config) *cobra.Command { var report [][]string report = append(report, []string{"ID", "NAME", "STATE"}) index := 1 - for _, i := range res.GetNamespaces() { + for _, i := range res.Msg.GetNamespaces() { report = append(report, []string{i.GetId(), i.GetName(), i.GetState()}) index++ } @@ -77,7 +75,7 @@ func listNamespacesCommand(cfg *Config) *cobra.Command { fmt.Println(printer.Cyanf("To view all the data in JSON format, use flag `-o json`")) } else { - fmt.Println(printer.Bluef("%s", prettyPrint(res.GetNamespaces()))) + fmt.Println(printer.Bluef("%s", prettyPrint(res.Msg.GetNamespaces()))) } return nil }, @@ -101,23 +99,22 @@ func getNamespaceCommand(cfg *Config) *cobra.Command { spinner := printer.Spin("") defer spinner.Stop() - cl, cancel, err := client.Create(cmd.Context(), cfg.Client) + cl, err := client.Create(cmd.Context(), cfg.Client) if err != nil { return err } - defer cancel() urn := args[0] - ctx := client.SetMetadata(cmd.Context(), cfg.Client, "") - res, err := cl.GetNamespace(ctx, &compassv1beta1.GetNamespaceRequest{ + req := client.NewRequest(cfg.Client, "", &compassv1beta1.GetNamespaceRequest{ Urn: urn, }) + res, err := cl.GetNamespace(cmd.Context(), req) if err != nil { return err } spinner.Stop() - fmt.Println(printer.Bluef("%s", prettyPrint(res.GetNamespace()))) + fmt.Println(printer.Bluef("%s", prettyPrint(res.Msg.GetNamespace()))) return nil }, } @@ -143,24 +140,22 @@ func createNamespaceCommand(cfg *Config) *cobra.Command { return errors.New("namespace length should be of at least 3 character, without space and special characters") } - cl, cancel, err := client.Create(cmd.Context(), cfg.Client) + cl, err := client.Create(cmd.Context(), cfg.Client) if err != nil { return err } - defer cancel() - ctx := client.SetMetadata(cmd.Context(), cfg.Client, "") - res, err := cl.CreateNamespace(ctx, &compassv1beta1.CreateNamespaceRequest{ + req := client.NewRequest(cfg.Client, "", &compassv1beta1.CreateNamespaceRequest{ Name: name, State: state, }) - + res, err := cl.CreateNamespace(cmd.Context(), req) if err != nil { return err } spinner.Stop() - fmt.Println("ID: \t", printer.Greenf("%s", res.Id)) + fmt.Println("ID: \t", printer.Greenf("%s", res.Msg.Id)) return nil }, } diff --git a/cli/search.go b/cli/search.go index 74accdbc..85a36826 100644 --- a/cli/search.go +++ b/cli/search.go @@ -2,11 +2,11 @@ package cli import ( "fmt" - "github.com/raystack/compass/core/namespace" "github.com/MakeNowJust/heredoc" + "github.com/raystack/compass/core/namespace" "github.com/raystack/compass/internal/client" - compassv1beta1 "github.com/raystack/compass/proto/raystack/compass/v1beta1" + compassv1beta1 "github.com/raystack/compass/proto/compassv1beta1" "github.com/raystack/salt/cli/printer" "github.com/spf13/cobra" ) @@ -30,19 +30,19 @@ func searchCommand(cfg *Config) *cobra.Command { spinner := printer.Spin("") defer spinner.Stop() - clnt, cancel, err := client.Create(cmd.Context(), cfg.Client) + clnt, err := client.Create(cmd.Context(), cfg.Client) if err != nil { return err } - defer cancel() - ctx := client.SetMetadata(cmd.Context(), cfg.Client, namespaceID) - res, err := clnt.SearchAssets(ctx, makeSearchAssetRequest(namespaceID, args[0], filter, query, rankBy, size)) + searchReq := makeSearchAssetRequest(namespaceID, args[0], filter, query, rankBy, size) + req := client.NewRequest(cfg.Client, namespaceID, searchReq) + res, err := clnt.SearchAssets(cmd.Context(), req) if err != nil { return err } - fmt.Println(printer.Bluef("%s", prettyPrint(res.GetData()))) + fmt.Println(printer.Bluef("%s", prettyPrint(res.Msg.GetData()))) return nil }, diff --git a/cli/server.go b/cli/server.go index faf45cd8..bae6c665 100644 --- a/cli/server.go +++ b/cli/server.go @@ -2,6 +2,7 @@ package cli import ( "context" + "errors" "fmt" "github.com/raystack/compass/core/namespace" "os" @@ -256,7 +257,7 @@ func runMigrations(ctx context.Context, config *Config) error { nsService := namespace.NewService(logger, postgres.NewNamespaceRepository(pgClient), esStore.NewDiscoveryRepository(esClient)) - if _, err = nsService.GetByID(ctx, namespace.DefaultNamespace.ID); err == postgres.ErrNamespaceNotFound { + if _, err = nsService.GetByID(ctx, namespace.DefaultNamespace.ID); errors.Is(err, namespace.ErrNotFound) { // create default if _, err := nsService.MigrateDefault(ctx); err != nil { return fmt.Errorf("problem with migration %w", err) diff --git a/config/config.yaml b/config/config.yaml index 8aad36a3..33e27146 100644 --- a/config/config.yaml +++ b/config/config.yaml @@ -31,12 +31,8 @@ service: # namespace_claim_key is used to get the namespace from the jwt token, if not set default is "namespace_id" # used for multi-tenancy namespace_claim_key: project_id - grpc: - port: 8081 - max_send_msg_size: 33554432 - max_recv_msg_size: 33554432 client: - host: localhost:8081 + host: localhost:8080 serverheaderkey_uuid: Compass-User-UUID # if omitted, will use value on service.identity.headerkey_uuid serverheadervalue_uuid: raystack@email.com diff --git a/core/namespace/namespace.go b/core/namespace/namespace.go index 6a78fbf1..e5d50489 100644 --- a/core/namespace/namespace.go +++ b/core/namespace/namespace.go @@ -4,10 +4,13 @@ package namespace //go:generate mockery --name=DiscoveryRepository -r --case underscore --with-expecter --structname NamespaceDiscoveryRepository --filename discovery_repository.go --output=./mocks import ( "context" + "errors" "fmt" "github.com/google/uuid" ) +var ErrNotFound = errors.New("namespace not found") + var ( // DefaultNamespace is used for compass single tenant applications DefaultNamespace = &Namespace{ diff --git a/docs/docs/concepts/internals.md b/docs/docs/concepts/internals.md index dbeef15d..bb782d0b 100644 --- a/docs/docs/concepts/internals.md +++ b/docs/docs/concepts/internals.md @@ -48,7 +48,7 @@ ALTER DEFAULT PRIVILEGES IN SCHEMA "public" GRANT USAGE ON SEQUENCES TO "compass ALTER DEFAULT PRIVILEGES IN SCHEMA "public" GRANT EXECUTE ON FUNCTIONS TO "compass_user"; ``` -A middleware for grpc looks for `x-namespace` header to extract tenant id if not found falls back to `default` namespace. +A middleware looks for `x-namespace` header to extract tenant id if not found falls back to `default` namespace. Same could be passed in a `jwt token` of Authentication Bearer with `namespace_id` as a claim. ## Search diff --git a/docs/docs/configuration.md b/docs/docs/configuration.md index 360777c7..f2a70b15 100644 --- a/docs/docs/configuration.md +++ b/docs/docs/configuration.md @@ -56,10 +56,6 @@ service: headerkey_uuid: Compass-User-UUID #required headerkey_email: Compass-User-Email #optional provider_default_name: shield #optional - grpc: - port: 8081 #required - max_send_msg_size: 33554432 - max_recv_msg_size: 33554432 ``` ### Using environment variable @@ -82,9 +78,6 @@ SERVICE_PORT=8080 SERVICE_IDENTITY_HEADERKEY_UUID=Compass-User-UUID SERVICE_IDENTITY_HEADERKEY_EMAIL=Compass-User-Email SERVICE_IDENTITY_PROVIDER_DEFAULT_NAME=shield -SERVICE_GRPC_PORT=8081 -SERVICE_GRPC_MAX_SEND_MSG_SIZE=33554432 -SERVICE_GRPC_MAX_RECV_MSG_SIZE=33554432 ``` Set the env variable using export @@ -243,7 +236,6 @@ app: config: COMPASS_SERVICE_PORT: 8080 - COMPASS_SERVICE_GRPC_PORT: 8081 # COMPASS_SERVICE_HOST: 0.0.0.0 # COMPASS_STATSD_ENABLED: false # COMPASS_STATSD_PREFIX: compass @@ -276,14 +268,14 @@ Add client configurations in the same `~/compass.yaml` file in root of current d ```yml client: - host: localhost:8081 + host: localhost:8080 serverheaderkey_uuid: Compass-User-UUID serverheadervalue_uuid: john.doe@example.com ``` #### Required Header/Metadata in API -Compass has a concept of [User](./concepts/user.md). In the current version, all HTTP & gRPC APIs in Compass requires an identity header/metadata in the request. The header key is configurable but the default name is `Compass-User-UUID`. +Compass has a concept of [User](./concepts/user.md). In the current version, all APIs in Compass require an identity header in the request. The header key is configurable but the default name is `Compass-User-UUID`. Compass APIs also expect an additional optional e-mail header. This is also configurable and the default name is `Compass-User-Email`. The purpose of having this optional e-mail header is described in the [User](./concepts/user.md) section. diff --git a/go.mod b/go.mod index 4c113960..d513cdf7 100644 --- a/go.mod +++ b/go.mod @@ -5,6 +5,9 @@ go 1.25.0 toolchain go1.26.1 require ( + connectrpc.com/connect v1.18.1 + connectrpc.com/grpcreflect v1.2.0 + connectrpc.com/otelconnect v0.7.1 github.com/DataDog/datadog-go/v5 v5.8.3 github.com/MakeNowJust/heredoc v1.0.0 github.com/Masterminds/semver/v3 v3.4.0 @@ -19,8 +22,6 @@ require ( github.com/google/go-cmp v0.7.0 github.com/google/uuid v1.6.0 github.com/gorilla/handlers v1.5.2 - github.com/grpc-ecosystem/go-grpc-middleware/v2 v2.3.3 - github.com/grpc-ecosystem/grpc-gateway/v2 v2.28.0 github.com/jackc/pgerrcode v0.0.0-20250907135507-afb5586c32a6 github.com/jackc/pgx/v5 v5.9.1 github.com/jmoiron/sqlx v1.4.0 @@ -28,21 +29,18 @@ require ( github.com/lib/pq v1.12.0 github.com/newrelic/go-agent/v3 v3.42.0 github.com/newrelic/go-agent/v3/integrations/nrelasticsearch-v7 v1.0.3 - github.com/newrelic/go-agent/v3/integrations/nrgrpc v1.4.7 github.com/ory/dockertest/v3 v3.12.0 github.com/peterbourgon/mergemap v0.0.1 github.com/r3labs/diff/v3 v3.0.2 github.com/raystack/salt v0.7.0 github.com/spf13/cobra v1.10.2 github.com/stretchr/testify v1.11.1 - go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.67.0 go.opentelemetry.io/otel v1.42.0 go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.42.0 go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.42.0 go.opentelemetry.io/otel/sdk v1.42.0 go.opentelemetry.io/otel/sdk/metric v1.42.0 - google.golang.org/genproto/googleapis/api v0.0.0-20260209200024-4cfbd4190f57 - google.golang.org/grpc v1.79.2 + golang.org/x/net v0.51.0 google.golang.org/protobuf v1.36.11 gopkg.in/yaml.v2 v2.4.0 gotest.tools v2.2.0+incompatible @@ -71,7 +69,6 @@ require ( github.com/fatih/color v1.15.0 // indirect github.com/goccy/go-json v0.10.3 // indirect github.com/gogo/protobuf v1.3.2 // indirect - github.com/golang/protobuf v1.5.4 // indirect github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect github.com/gorilla/css v1.0.0 // indirect github.com/hashicorp/go-version v1.3.0 // indirect @@ -98,7 +95,6 @@ require ( github.com/moby/term v0.5.0 // indirect github.com/muesli/reflow v0.3.0 // indirect github.com/muesli/termenv v0.11.1-0.20220212125758-44cd13922739 // indirect - github.com/oklog/run v1.1.0 // indirect github.com/olekukonko/tablewriter v0.0.5 // indirect github.com/opencontainers/go-digest v1.0.0 // indirect github.com/opencontainers/image-spec v1.1.0 // indirect @@ -118,7 +114,6 @@ require ( github.com/xeipuuv/gojsonschema v1.2.0 // indirect github.com/yuin/goldmark v1.4.13 // indirect github.com/yuin/goldmark-emoji v1.0.1 // indirect - golang.org/x/net v0.51.0 // indirect golang.org/x/sys v0.41.0 // indirect golang.org/x/term v0.40.0 // indirect golang.org/x/text v0.34.0 // indirect @@ -140,12 +135,12 @@ require ( github.com/go-logr/stdr v1.2.2 // indirect github.com/go-playground/validator v9.31.0+incompatible // indirect github.com/go-viper/mapstructure/v2 v2.1.0 // indirect + github.com/grpc-ecosystem/grpc-gateway/v2 v2.28.0 // indirect github.com/jackc/pgservicefile v0.0.0-20240606120523-5a60cdf6a761 // indirect github.com/jackc/puddle/v2 v2.2.2 // indirect github.com/mitchellh/mapstructure v1.5.0 // indirect github.com/moby/docker-image-spec v1.3.1 // indirect github.com/moby/sys/user v0.3.0 // indirect - github.com/newrelic/csec-go-agent v1.6.0 // indirect github.com/pelletier/go-toml/v2 v2.2.2 // indirect github.com/sagikazarmark/locafero v0.4.0 // indirect github.com/sagikazarmark/slog-shim v0.1.0 // indirect @@ -164,10 +159,11 @@ require ( go.uber.org/multierr v1.9.0 // indirect go.uber.org/zap v1.21.0 // indirect go.yaml.in/yaml/v3 v3.0.4 // indirect - golang.org/x/arch v0.25.0 // indirect golang.org/x/crypto v0.48.0 // indirect golang.org/x/exp v0.0.0-20240325151524-a685a6edb6d8 // indirect golang.org/x/sync v0.19.0 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20260209200024-4cfbd4190f57 // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20260226221140-a57be14db171 // indirect + google.golang.org/grpc v1.79.2 // indirect gopkg.in/ini.v1 v1.67.0 // indirect ) diff --git a/go.sum b/go.sum index 1a5c29c5..cf3a9df4 100644 --- a/go.sum +++ b/go.sum @@ -1,3 +1,9 @@ +connectrpc.com/connect v1.18.1 h1:PAg7CjSAGvscaf6YZKUefjoih5Z/qYkyaTrBW8xvYPw= +connectrpc.com/connect v1.18.1/go.mod h1:0292hj1rnx8oFrStN7cB4jjVBeqs+Yx5yDIC2prWDO8= +connectrpc.com/grpcreflect v1.2.0 h1:Q6og1S7HinmtbEuBvARLNwYmTbhEGRpHDhqrPNlmK+U= +connectrpc.com/grpcreflect v1.2.0/go.mod h1:nwSOKmE8nU5u/CidgHtPYk1PFI3U9ignz7iDMxOYkSY= +connectrpc.com/otelconnect v0.7.1 h1:scO5pOb0i4yUE66CnNrHeK1x51yq0bE0ehPg6WvzXJY= +connectrpc.com/otelconnect v0.7.1/go.mod h1:dh3bFgHBTb2bkqGCeVVOtHJreSns7uu9wwL2Tbz17ms= dario.cat/mergo v1.0.0 h1:AGCNq9Evsj31mOgNPcLyXc+4PNABt905YmuqPYYpBWk= dario.cat/mergo v1.0.0/go.mod h1:uNxQE+84aUszobStD9th8a29P2fMDhsBdgRYvZOxGmk= filippo.io/edwards25519 v1.1.0 h1:FNf4tywRC1HmFuKW5xopWpigGjJKiJSV0Cqo0cJWDaA= @@ -17,8 +23,6 @@ github.com/Microsoft/go-winio v0.6.2 h1:F2VQgta7ecxGYO8k3ZZz3RS8fVIXVxONVUPlNERo github.com/Microsoft/go-winio v0.6.2/go.mod h1:yd8OoFMLzJbo9gZq8j5qaps8bJ9aShtEA8Ipt1oGCvU= github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5 h1:TngWCqHvy9oXAN6lEVMRuU21PR1EtLVZJmdB18Gu3Rw= github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5/go.mod h1:lmUJ/7eu/Q8D7ML55dXQrVaamCz2vxCfdQBasLZfHKk= -github.com/adhocore/gronx v1.19.1 h1:S4c3uVp5jPjnk00De0lslyTenGJ4nA3Ydbkj1SbdPVc= -github.com/adhocore/gronx v1.19.1/go.mod h1:7oUY1WAU8rEJWmAxXR2DN0JaO4gi9khSgKjiRypqteg= github.com/alecthomas/assert v0.0.0-20170929043011-405dbfeb8e38 h1:smF2tmSOzy2Mm+0dGI2AIUHY+w0BUc+4tn40djz7+6U= github.com/alecthomas/assert v0.0.0-20170929043011-405dbfeb8e38/go.mod h1:r7bzyVFMNntcxPZXK3/+KdruV1H5KSlyVY0gc+NgInI= github.com/alecthomas/chroma v0.8.2 h1:x3zkuE2lUk/RIekyAJ3XRqSCP4zwWDfcw/YJCuCAACg= @@ -140,10 +144,6 @@ github.com/gorilla/css v1.0.0 h1:BQqNyPTi50JCFMTw/b67hByjMVXZRwGha6wxVGkeihY= github.com/gorilla/css v1.0.0/go.mod h1:Dn721qIggHpt4+EFCcTLTU/vk5ySda2ReITrtgBl60c= github.com/gorilla/handlers v1.5.2 h1:cLTUSsNkgcwhgRqvCNmdbRWG0A3N4F+M2nWKdScwyEE= github.com/gorilla/handlers v1.5.2/go.mod h1:dX+xVpaxdSw+q0Qek8SSsl3dfMk3jNddUkMzo0GtH0w= -github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc= -github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= -github.com/grpc-ecosystem/go-grpc-middleware/v2 v2.3.3 h1:B+8ClL/kCQkRiU82d9xajRPKYMrB7E0MbtzWVi1K4ns= -github.com/grpc-ecosystem/go-grpc-middleware/v2 v2.3.3/go.mod h1:NbCUVmiS4foBGBHOYlCT25+YmGpJ32dZPi75pGEUpj4= github.com/grpc-ecosystem/grpc-gateway/v2 v2.28.0 h1:HWRh5R2+9EifMyIHV7ZV+MIZqgz+PMpZ14Jynv3O2Zs= github.com/grpc-ecosystem/grpc-gateway/v2 v2.28.0/go.mod h1:JfhWUomR1baixubs02l85lZYYOm7LV6om4ceouMv45c= github.com/hashicorp/go-version v1.3.0 h1:McDWVJIU/y+u1BRV06dPaLfLCaT7fUTJLp5r04x7iNw= @@ -167,8 +167,6 @@ github.com/jeremywohl/flatten v1.0.1/go.mod h1:4AmD/VxjWcI5SRB0n6szE2A6s2fsNHDLO github.com/jmoiron/sqlx v1.4.0 h1:1PLqN7S1UYp5t4SrVVnt4nUVNemrDAtxlulVe+Qgm3o= github.com/jmoiron/sqlx v1.4.0/go.mod h1:ZrZ7UsYB/weZdl2Bxg6jCRO9c3YHl8r3ahlKmRT4JLY= github.com/k0kubun/go-ansi v0.0.0-20180517002512-3bf9e2903213/go.mod h1:vNUNkEQ1e29fT/6vq2aBdFsgNPmy8qMdSay1npru+Sw= -github.com/k2io/hookingo v1.0.6 h1:HBSKd1tNbW5BCj8VLNqemyBKjrQ8g0HkXcbC/DEHODE= -github.com/k2io/hookingo v1.0.6/go.mod h1:2L1jdNjdB3NkbzSVv9Q5fq7SJhRkWyAhe65XsAp5iXk= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= @@ -242,19 +240,11 @@ github.com/muesli/reflow v0.3.0/go.mod h1:pbwTDkVPibjO2kyvBQRBxTWEEGDGq0FlB1BIKt github.com/muesli/termenv v0.8.1/go.mod h1:kzt/D/4a88RoheZmwfqorY3A+tnsSMA9HJC/fQSFKo0= github.com/muesli/termenv v0.11.1-0.20220212125758-44cd13922739 h1:QANkGiGr39l1EESqrE0gZw0/AJNYzIvoGLhIoVYtluI= github.com/muesli/termenv v0.11.1-0.20220212125758-44cd13922739/go.mod h1:Bd5NYQ7pd+SrtBSrSNoBBmXlcY8+Xj4BMJgh8qcZrvs= -github.com/newrelic/csec-go-agent v1.6.0 h1:OCShRZgiE+kg37jk+QXHw9e9EQ9BvLOeQTk+ovJhnrE= -github.com/newrelic/csec-go-agent v1.6.0/go.mod h1:LiLGm6a+q+hkmTnrxrYw1ToToirThOHydjrrLMtci5M= github.com/newrelic/go-agent/v3 v3.42.0 h1:aA2Ea1RT5eD59LtOS1KGFXSmaDs6kM3Jeqo7PpuQoFQ= github.com/newrelic/go-agent/v3 v3.42.0/go.mod h1:sCgxDCVydoKD/C4S8BFxDtmFHvdWHtaIz/a3kiyNB/k= github.com/newrelic/go-agent/v3/integrations/nrelasticsearch-v7 v1.0.3 h1:LYB53RAGRJjWZx7MBl/pnrT6QVuUoSsqCi3k4bkQhY8= github.com/newrelic/go-agent/v3/integrations/nrelasticsearch-v7 v1.0.3/go.mod h1:D+iyf5S3FN/gJHCOYqqCF4Gr5goNlv3R6FbC1oNmWX8= -github.com/newrelic/go-agent/v3/integrations/nrgrpc v1.4.7 h1:QE9VlVJZBWmFr5/LxbOegDXW5QZMmk1lK5eu48Dyn1M= -github.com/newrelic/go-agent/v3/integrations/nrgrpc v1.4.7/go.mod h1:CFe6nTKFh4CznvfJ23tb7wBplhXJjFr53s9Au5AcUq8= -github.com/newrelic/go-agent/v3/integrations/nrsecurityagent v1.1.0 h1:gqkTDYUHWUyiG+u0PJQCRh98rcHLxP/w7GtIbJDVULY= -github.com/newrelic/go-agent/v3/integrations/nrsecurityagent v1.1.0/go.mod h1:3wugGvRmOVYov/08y+D8tB1uYIZds5bweVdr5vo4Gbs= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= -github.com/oklog/run v1.1.0 h1:GEenZ1cK0+q0+wsJew9qUg/DyD8k3JzYsZAi5gYi2mA= -github.com/oklog/run v1.1.0/go.mod h1:sVPdnTZT1zYwAJeCMu2Th4T21pA3FPOQRfWjQlk7DVU= github.com/olekukonko/tablewriter v0.0.5 h1:P2Ga83D34wi1o9J6Wh1mRuqd4mF/x/lgBS7N7AbDhec= github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6HuIJcUGPhkA7kY= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= @@ -350,8 +340,6 @@ github.com/yuin/goldmark-emoji v1.0.1 h1:ctuWEyzGBwiucEqxzwe0SOYDXPAucOrE9NQC18W github.com/yuin/goldmark-emoji v1.0.1/go.mod h1:2w1E6FEWLcDQkoTE+7HU6QF1F6SLlNGjRIBbIZQFqkQ= go.opentelemetry.io/auto/sdk v1.2.1 h1:jXsnJ4Lmnqd11kwkBV2LgLoFMZKizbCi5fNZ/ipaZ64= go.opentelemetry.io/auto/sdk v1.2.1/go.mod h1:KRTj+aOaElaLi+wW1kO/DZRXwkF4C5xPbEe3ZiIhN7Y= -go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.67.0 h1:yI1/OhfEPy7J9eoa6Sj051C7n5dvpj0QX8g4sRchg04= -go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.67.0/go.mod h1:NoUCKYWK+3ecatC4HjkRktREheMeEtrXoQxrqYFeHSc= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.61.0 h1:F7Jx+6hwnZ41NSFTO5q4LYDtJRXBf2PD0rNBkeB/lus= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.61.0/go.mod h1:UHB22Z8QsdRDrnAtX4PntOl36ajSxcdUMt1sF7Y6E7Q= go.opentelemetry.io/otel v1.42.0 h1:lSQGzTgVR3+sgJDAU/7/ZMjN9Z+vUip7leaqBKy4sho= @@ -385,8 +373,6 @@ go.uber.org/zap v1.21.0 h1:WefMeulhovoZ2sYXz7st6K0sLj7bBhpiFaud4r4zST8= go.uber.org/zap v1.21.0/go.mod h1:wjWOCqI0f2ZZrJF/UufIOkiC8ii6tm1iqIsLo76RfJw= go.yaml.in/yaml/v3 v3.0.4 h1:tfq32ie2Jv2UxXFdLJdh3jXuOzWiL1fo0bu/FbuKpbc= go.yaml.in/yaml/v3 v3.0.4/go.mod h1:DhzuOOF2ATzADvBadXxruRBLzYTpT36CKvDb3+aBEFg= -golang.org/x/arch v0.25.0 h1:qnk6Ksugpi5Bz32947rkUgDt9/s5qvqDPl/gBKdMJLE= -golang.org/x/arch v0.25.0/go.mod h1:0X+GdSIP+kL5wPmpK7sdkEVTt2XoYP0cSjQSbZBwOi8= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= diff --git a/internal/client/client.go b/internal/client/client.go index 3fcd3496..b0e7cbcd 100644 --- a/internal/client/client.go +++ b/internal/client/client.go @@ -2,12 +2,11 @@ package client import ( "context" + "net/http" "time" - compassv1beta1 "github.com/raystack/compass/proto/raystack/compass/v1beta1" - "google.golang.org/grpc" - "google.golang.org/grpc/credentials/insecure" - "google.golang.org/grpc/metadata" + "connectrpc.com/connect" + "github.com/raystack/compass/proto/compassv1beta1/compassv1beta1connect" ) // NamespaceHeaderKey specify what namespace request is targeted for @@ -15,38 +14,44 @@ import ( const NamespaceHeaderKey = "x-namespace" type Config struct { - Host string `mapstructure:"host" default:"localhost:8081"` + Host string `mapstructure:"host" default:"localhost:8080"` ServerHeaderKeyUserUUID string `yaml:"serverheaderkey_uuid" mapstructure:"serverheaderkey_uuid" default:"Compass-User-UUID"` ServerHeaderValueUserUUID string `yaml:"serverheadervalue_uuid" mapstructure:"serverheadervalue_uuid" default:"compass@raystack.com"` } -func Create(ctx context.Context, cfg Config) (compassv1beta1.CompassServiceClient, func(), error) { - dialTimeoutCtx, dialCancel := context.WithTimeout(ctx, time.Second*2) - conn, err := createConnection(dialTimeoutCtx, cfg) - if err != nil { - dialCancel() - return nil, nil, err - } +// Client wraps the Connect client with header configuration +type Client struct { + compassv1beta1connect.CompassServiceClient + cfg Config +} - cancel := func() { - dialCancel() - conn.Close() +// Create creates a new Connect client for the Compass service. +func Create(ctx context.Context, cfg Config) (*Client, error) { + httpClient := &http.Client{ + Timeout: time.Second * 30, } - client := compassv1beta1.NewCompassServiceClient(conn) - return client, cancel, nil -} + // Build base URL + baseURL := "http://" + cfg.Host -func SetMetadata(ctx context.Context, cfg Config, namespaceID string) context.Context { - md := metadata.New(map[string]string{ - cfg.ServerHeaderKeyUserUUID: cfg.ServerHeaderValueUserUUID, - NamespaceHeaderKey: namespaceID, - }) - return metadata.NewOutgoingContext(ctx, md) + connectClient := compassv1beta1connect.NewCompassServiceClient( + httpClient, + baseURL, + connect.WithProtoJSON(), // Use Connect protocol with JSON encoding + ) + + return &Client{ + CompassServiceClient: connectClient, + cfg: cfg, + }, nil } -func createConnection(ctx context.Context, cfg Config) (*grpc.ClientConn, error) { - return grpc.NewClient(cfg.Host, - grpc.WithTransportCredentials(insecure.NewCredentials()), - ) +// NewRequest creates a new Connect request with the configured headers. +func NewRequest[T any](cfg Config, namespaceID string, msg *T) *connect.Request[T] { + req := connect.NewRequest(msg) + req.Header().Set(cfg.ServerHeaderKeyUserUUID, cfg.ServerHeaderValueUserUUID) + if namespaceID != "" { + req.Header().Set(NamespaceHeaderKey, namespaceID) + } + return req } diff --git a/internal/server/health/health.go b/internal/server/health/health.go deleted file mode 100644 index 35ce0dc4..00000000 --- a/internal/server/health/health.go +++ /dev/null @@ -1,31 +0,0 @@ -package health - -import ( - "context" - - "google.golang.org/grpc/codes" - "google.golang.org/grpc/health/grpc_health_v1" - "google.golang.org/grpc/status" -) - -type HealthHandler struct{} - -func (h *HealthHandler) Check(ctx context.Context, in *grpc_health_v1.HealthCheckRequest) (*grpc_health_v1.HealthCheckResponse, error) { - return &grpc_health_v1.HealthCheckResponse{Status: grpc_health_v1.HealthCheckResponse_SERVING}, nil -} - -func (h *HealthHandler) Watch(in *grpc_health_v1.HealthCheckRequest, _ grpc_health_v1.Health_WatchServer) error { - return status.Error(codes.Unimplemented, "unimplemented") -} - -func (h *HealthHandler) List(ctx context.Context, in *grpc_health_v1.HealthListRequest) (*grpc_health_v1.HealthListResponse, error) { - return &grpc_health_v1.HealthListResponse{ - Statuses: map[string]*grpc_health_v1.HealthCheckResponse{ - "": {Status: grpc_health_v1.HealthCheckResponse_SERVING}, - }, - }, nil -} - -func NewHandler() *HealthHandler { - return &HealthHandler{} -} diff --git a/internal/server/health/health_test.go b/internal/server/health/health_test.go deleted file mode 100644 index 3f64b3a3..00000000 --- a/internal/server/health/health_test.go +++ /dev/null @@ -1,77 +0,0 @@ -package health - -import ( - "context" - "testing" - - "google.golang.org/grpc/codes" - "google.golang.org/grpc/health/grpc_health_v1" - "google.golang.org/grpc/status" -) - -func TestHealthCheck(t *testing.T) { - type testCase struct { - Description string - Request *grpc_health_v1.HealthCheckRequest - ExpectStatus codes.Code - PostCheck func(resp *grpc_health_v1.HealthCheckResponse) error - } - - var testCases = []testCase{ - { - Description: `should return OK if server is serving`, - ExpectStatus: codes.OK, - Request: &grpc_health_v1.HealthCheckRequest{Service: "compass"}, - }, - } - for _, tc := range testCases { - t.Run(tc.Description, func(t *testing.T) { - ctx := context.Background() - - healthHandler := &HealthHandler{} - - got, err := healthHandler.Check(ctx, tc.Request) - code := status.Code(err) - if code != tc.ExpectStatus { - t.Errorf("expected handler to return Code %s, returned Code %s instead", tc.ExpectStatus.String(), code.String()) - return - } - if tc.PostCheck != nil { - if err := tc.PostCheck(got); err != nil { - t.Error(err) - return - } - } - }) - } -} - -func TestHealthWatch(t *testing.T) { - type testCase struct { - Description string - Request *grpc_health_v1.HealthCheckRequest - ExpectStatus codes.Code - PostCheck func(wc grpc_health_v1.Health_WatchClient) error - } - - var testCases = []testCase{ - { - Description: `should return unimplemented`, - ExpectStatus: codes.Unimplemented, - Request: &grpc_health_v1.HealthCheckRequest{Service: "compass"}, - }, - } - for _, tc := range testCases { - t.Run(tc.Description, func(t *testing.T) { - - healthHandler := NewHandler() - - err := healthHandler.Watch(tc.Request, nil) - code := status.Code(err) - if code != tc.ExpectStatus { - t.Errorf("expected handler to return Code %s, returned Code %s instead", tc.ExpectStatus.String(), code.String()) - return - } - }) - } -} diff --git a/internal/server/server.go b/internal/server/server.go index 391238c3..24f5c009 100644 --- a/internal/server/server.go +++ b/internal/server/server.go @@ -4,30 +4,21 @@ import ( "context" "errors" "fmt" - "github.com/raystack/compass/internal/client" "net/http" - "strings" "time" + "connectrpc.com/connect" + "connectrpc.com/grpcreflect" + "connectrpc.com/otelconnect" "github.com/gorilla/handlers" - "github.com/grpc-ecosystem/go-grpc-middleware/v2/interceptors/recovery" - "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" - "github.com/newrelic/go-agent/v3/integrations/nrgrpc" "github.com/newrelic/go-agent/v3/newrelic" - "go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc" - "github.com/raystack/compass/internal/server/health" handlersv1beta1 "github.com/raystack/compass/internal/server/v1beta1" "github.com/raystack/compass/internal/store/postgres" - "github.com/raystack/compass/pkg/grpc_interceptor" - compassv1beta1 "github.com/raystack/compass/proto/raystack/compass/v1beta1" + "github.com/raystack/compass/pkg/server/interceptor" + "github.com/raystack/compass/proto/compassv1beta1/compassv1beta1connect" log "github.com/raystack/salt/observability/logger" - "github.com/raystack/salt/server/mux" - "google.golang.org/grpc" - "google.golang.org/grpc/credentials/insecure" - _ "google.golang.org/grpc/encoding/gzip" // Install the gzip compressor - "google.golang.org/grpc/health/grpc_health_v1" - "google.golang.org/grpc/reflection" - "google.golang.org/protobuf/encoding/protojson" + "golang.org/x/net/http2" + "golang.org/x/net/http2/h2c" ) type Config struct { @@ -38,12 +29,12 @@ type Config struct { // User Identity Identity IdentityConfig `mapstructure:"identity"` - // GRPC Config - GRPC GRPCConfig `mapstructure:"grpc"` + // Message size limits (for compatibility) + MaxRecvMsgSize int `yaml:"max_recv_msg_size" mapstructure:"max_recv_msg_size" default:"33554432"` + MaxSendMsgSize int `yaml:"max_send_msg_size" mapstructure:"max_send_msg_size" default:"33554432"` } -func (cfg Config) addr() string { return fmt.Sprintf("%s:%d", cfg.Host, cfg.Port) } -func (cfg Config) grpcAddr() string { return fmt.Sprintf("%s:%d", cfg.Host, cfg.GRPC.Port) } +func (cfg Config) addr() string { return fmt.Sprintf("%s:%d", cfg.Host, cfg.Port) } type IdentityConfig struct { // User Identity @@ -55,12 +46,6 @@ type IdentityConfig struct { NamespaceClaimKey string `yaml:"namespace_claim_key" mapstructure:"namespace_claim_key" default:"namespace_id"` } -type GRPCConfig struct { - Port int `yaml:"port" mapstructure:"port" default:"8081"` - MaxRecvMsgSize int `yaml:"max_recv_msg_size" mapstructure:"max_recv_msg_size" default:"33554432"` - MaxSendMsgSize int `yaml:"max_send_msg_size" mapstructure:"max_send_msg_size" default:"33554432"` -} - func Serve( ctx context.Context, config Config, @@ -86,61 +71,56 @@ func Serve( userService, ) - healthHandler := health.NewHandler() - - // init grpc - grpcServer := grpc.NewServer( - grpc.MaxRecvMsgSize(config.GRPC.MaxRecvMsgSize), - grpc.MaxSendMsgSize(config.GRPC.MaxSendMsgSize), - grpc.StatsHandler(otelgrpc.NewServerHandler()), - grpc.ChainUnaryInterceptor( - recovery.UnaryServerInterceptor(), - nrgrpc.UnaryServerInterceptor(nrApp), - grpc_interceptor.NamespaceUnaryInterceptor(namespaceService, config.Identity.NamespaceClaimKey, config.Identity.HeaderKeyUserUUID), - grpc_interceptor.UserHeaderCtx(config.Identity.HeaderKeyUserUUID, config.Identity.HeaderKeyUserEmail), - ), - ) - reflection.Register(grpcServer) - - compassv1beta1.RegisterCompassServiceServer(grpcServer, v1beta1Handler) - grpc_health_v1.RegisterHealthServer(grpcServer, healthHandler) - - // init http proxy - headerMatcher := makeHeaderMatcher(config) - - grpcConn, err := grpc.NewClient( - config.grpcAddr(), - grpc.WithTransportCredentials(insecure.NewCredentials()), - grpc.WithDefaultCallOptions( - grpc.MaxCallRecvMsgSize(config.GRPC.MaxRecvMsgSize), - grpc.MaxCallSendMsgSize(config.GRPC.MaxSendMsgSize), - )) + // Build interceptor chain + otelInterceptor, err := otelconnect.NewInterceptor() if err != nil { - return err + return fmt.Errorf("failed to create otel interceptor: %w", err) } - runtimeCtx, runtimeCancel := context.WithCancel(ctx) - defer runtimeCancel() - - gwmux := runtime.NewServeMux( - runtime.WithErrorHandler(runtime.DefaultHTTPErrorHandler), - runtime.WithIncomingHeaderMatcher(headerMatcher), - runtime.WithMarshalerOption(runtime.MIMEWildcard, &runtime.JSONPb{ - MarshalOptions: protojson.MarshalOptions{ - UseProtoNames: true, - EmitUnpopulated: true, - }, - UnmarshalOptions: protojson.UnmarshalOptions{ - DiscardUnknown: true, - }, - }), - runtime.WithHealthEndpointAt(grpc_health_v1.NewHealthClient(grpcConn), "/ping"), + interceptors := connect.WithInterceptors( + otelInterceptor, + interceptor.Recovery(), + interceptor.Logger(logger), + interceptor.ErrorResponse(logger), + interceptor.Namespace(namespaceService, config.Identity.NamespaceClaimKey, config.Identity.HeaderKeyUserUUID), + interceptor.UserHeaderCtx(config.Identity.HeaderKeyUserUUID, config.Identity.HeaderKeyUserEmail), ) - if err := compassv1beta1.RegisterCompassServiceHandler(runtimeCtx, gwmux, grpcConn); err != nil { - return err + // Create HTTP mux + mux := http.NewServeMux() + + // Register Connect service handler + path, handler := compassv1beta1connect.NewCompassServiceHandler( + v1beta1Handler, + interceptors, + connect.WithReadMaxBytes(config.MaxRecvMsgSize), + connect.WithSendMaxBytes(config.MaxSendMsgSize), + ) + mux.Handle(path, handler) + + // Register gRPC reflection for tooling compatibility (grpcurl, etc.) + reflector := grpcreflect.NewStaticReflector( + "raystack.compass.v1beta1.CompassService", + ) + mux.Handle(grpcreflect.NewHandlerV1(reflector)) + mux.Handle(grpcreflect.NewHandlerV1Alpha(reflector)) + + // Health check endpoint + mux.HandleFunc("/ping", func(w http.ResponseWriter, r *http.Request) { + w.WriteHeader(http.StatusOK) + _, _ = w.Write([]byte("pong")) + }) + + // Create HTTP server with h2c support for HTTP/2 without TLS + server := &http.Server{ + Addr: config.addr(), + Handler: h2c.NewHandler(handlers.CompressHandler(mux), &http2.Server{}), + ReadTimeout: 60 * time.Second, + WriteTimeout: 60 * time.Second, + IdleTimeout: 120 * time.Second, } + // Cleanup on shutdown defer func() { if pgClient != nil { logger.Warn("closing db...") @@ -151,38 +131,29 @@ func Serve( } }() - logger.Info("Starting server", "http_port", config.addr(), "grpc_port", config.grpcAddr()) - if err := mux.Serve( - ctx, - mux.WithHTTPTarget(config.addr(), &http.Server{ - Handler: handlers.CompressHandler(gwmux), - ReadTimeout: 60 * time.Second, - WriteTimeout: 60 * time.Second, - IdleTimeout: 120 * time.Second, - }), - mux.WithGRPCTarget(config.grpcAddr(), grpcServer), - mux.WithGracePeriod(5*time.Second), - ); !errors.Is(err, context.Canceled) { - logger.Error("mux serve error", "err", err) + // Start server in goroutine + errChan := make(chan error, 1) + go func() { + logger.Info("Starting server", "addr", config.addr()) + if err := server.ListenAndServe(); err != nil && !errors.Is(err, http.ErrServerClosed) { + errChan <- err + } + }() + + // Wait for context cancellation or error + select { + case <-ctx.Done(): + logger.Info("shutting down server...") + shutdownCtx, cancel := context.WithTimeout(context.Background(), 5*time.Second) + defer cancel() + if err := server.Shutdown(shutdownCtx); err != nil { + logger.Error("server shutdown error", "err", err) + } + case err := <-errChan: + logger.Error("server error", "err", err) + return err } logger.Info("server stopped") return nil } - -// makeHeaderMatcher overrides the default grpc gateway behaviour of only mapping http headers -// that start with "grpc-metadata-" prefix -func makeHeaderMatcher(c Config) func(key string) (string, bool) { - return func(key string) (string, bool) { - switch strings.ToLower(key) { - case strings.ToLower(c.Identity.HeaderKeyUserUUID): - return key, true - case strings.ToLower(c.Identity.HeaderKeyUserEmail): - return key, true - case client.NamespaceHeaderKey: - return key, true - default: - return runtime.DefaultHeaderMatcher(key) - } - } -} diff --git a/internal/server/v1beta1/asset.go b/internal/server/v1beta1/asset.go index f331b80d..0d873d0b 100644 --- a/internal/server/v1beta1/asset.go +++ b/internal/server/v1beta1/asset.go @@ -5,17 +5,16 @@ import ( "context" "errors" "fmt" - "github.com/raystack/compass/core/namespace" - "github.com/raystack/compass/pkg/grpc_interceptor" "time" + "connectrpc.com/connect" + "github.com/r3labs/diff/v3" "github.com/raystack/compass/core/asset" + "github.com/raystack/compass/core/namespace" "github.com/raystack/compass/core/star" "github.com/raystack/compass/core/user" - compassv1beta1 "github.com/raystack/compass/proto/raystack/compass/v1beta1" - "github.com/r3labs/diff/v3" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/status" + "github.com/raystack/compass/pkg/server/interceptor" + compassv1beta1 "github.com/raystack/compass/proto/compassv1beta1" "google.golang.org/protobuf/types/known/structpb" "google.golang.org/protobuf/types/known/timestamppb" ) @@ -40,35 +39,35 @@ type AssetService interface { GroupAssets(ctx context.Context, cfg asset.GroupConfig) ([]asset.GroupResult, error) } -func (server *APIServer) GetAllAssets(ctx context.Context, req *compassv1beta1.GetAllAssetsRequest) (*compassv1beta1.GetAllAssetsResponse, error) { - if err := req.ValidateAll(); err != nil { - return nil, status.Error(codes.InvalidArgument, bodyParserErrorMsg(err)) +func (server *APIServer) GetAllAssets(ctx context.Context, req *connect.Request[compassv1beta1.GetAllAssetsRequest]) (*connect.Response[compassv1beta1.GetAllAssetsResponse], error) { + if err := req.Msg.ValidateAll(); err != nil { + return nil, connect.NewError(connect.CodeInvalidArgument, errors.New(bodyParserErrorMsg(err))) } - ns := grpc_interceptor.FetchNamespaceFromContext(ctx) + ns := interceptor.FetchNamespaceFromContext(ctx) if _, err := server.validateUserInCtx(ctx, ns); err != nil { return nil, err } fb := asset.NewFilterBuilder(). - Types(req.GetTypes()). - Services(req.GetServices()). - Q(req.GetQ()). - QFields(req.GetQFields()). - Size(int(req.GetSize())). - Offset(int(req.GetOffset())). - SortBy(req.GetSort()). - SortDirection(req.GetDirection()). - Data(req.GetData()) - if req.GetIsDeleted() { + Types(req.Msg.GetTypes()). + Services(req.Msg.GetServices()). + Q(req.Msg.GetQ()). + QFields(req.Msg.GetQFields()). + Size(int(req.Msg.GetSize())). + Offset(int(req.Msg.GetOffset())). + SortBy(req.Msg.GetSort()). + SortDirection(req.Msg.GetDirection()). + Data(req.Msg.GetData()) + if req.Msg.GetIsDeleted() { fb = fb.IsDeleted(true) } flt, err := fb.Build() if err != nil { - return nil, status.Error(codes.InvalidArgument, bodyParserErrorMsg(err)) + return nil, connect.NewError(connect.CodeInvalidArgument, errors.New(bodyParserErrorMsg(err))) } - assets, totalCount, err := server.assetService.GetAllAssets(ctx, flt, req.GetWithTotal()) + assets, totalCount, err := server.assetService.GetAllAssets(ctx, flt, req.Msg.GetWithTotal()) if err != nil { return nil, internalServerError(server.logger, err.Error()) } @@ -86,30 +85,30 @@ func (server *APIServer) GetAllAssets(ctx context.Context, req *compassv1beta1.G Data: assetsProto, } - if req.GetWithTotal() { + if req.Msg.GetWithTotal() { response.Total = totalCount } - return response, nil + return connect.NewResponse(response), nil } -func (server *APIServer) GetAssetByID(ctx context.Context, req *compassv1beta1.GetAssetByIDRequest) (*compassv1beta1.GetAssetByIDResponse, error) { - if err := req.ValidateAll(); err != nil { - return nil, status.Error(codes.InvalidArgument, bodyParserErrorMsg(err)) +func (server *APIServer) GetAssetByID(ctx context.Context, req *connect.Request[compassv1beta1.GetAssetByIDRequest]) (*connect.Response[compassv1beta1.GetAssetByIDResponse], error) { + if err := req.Msg.ValidateAll(); err != nil { + return nil, connect.NewError(connect.CodeInvalidArgument, errors.New(bodyParserErrorMsg(err))) } - ns := grpc_interceptor.FetchNamespaceFromContext(ctx) + ns := interceptor.FetchNamespaceFromContext(ctx) if _, err := server.validateUserInCtx(ctx, ns); err != nil { return nil, err } - ast, err := server.assetService.GetAssetByID(ctx, req.GetId()) + ast, err := server.assetService.GetAssetByID(ctx, req.Msg.GetId()) if err != nil { if errors.As(err, new(asset.InvalidError)) { - return nil, status.Error(codes.InvalidArgument, err.Error()) + return nil, connect.NewError(connect.CodeInvalidArgument, err) } if errors.As(err, new(asset.NotFoundError)) { - return nil, status.Error(codes.NotFound, err.Error()) + return nil, connect.NewError(connect.CodeNotFound, err) } return nil, internalServerError(server.logger, err.Error()) } @@ -119,31 +118,31 @@ func (server *APIServer) GetAssetByID(ctx context.Context, req *compassv1beta1.G return nil, internalServerError(server.logger, err.Error()) } - return &compassv1beta1.GetAssetByIDResponse{ + return connect.NewResponse(&compassv1beta1.GetAssetByIDResponse{ Data: astProto, - }, nil + }), nil } -func (server *APIServer) GetAssetStargazers(ctx context.Context, req *compassv1beta1.GetAssetStargazersRequest) (*compassv1beta1.GetAssetStargazersResponse, error) { - if err := req.ValidateAll(); err != nil { - return nil, status.Error(codes.InvalidArgument, bodyParserErrorMsg(err)) +func (server *APIServer) GetAssetStargazers(ctx context.Context, req *connect.Request[compassv1beta1.GetAssetStargazersRequest]) (*connect.Response[compassv1beta1.GetAssetStargazersResponse], error) { + if err := req.Msg.ValidateAll(); err != nil { + return nil, connect.NewError(connect.CodeInvalidArgument, errors.New(bodyParserErrorMsg(err))) } - ns := grpc_interceptor.FetchNamespaceFromContext(ctx) + ns := interceptor.FetchNamespaceFromContext(ctx) if _, err := server.validateUserInCtx(ctx, ns); err != nil { return nil, err } users, err := server.starService.GetStargazers(ctx, star.Filter{ - Size: int(req.GetSize()), - Offset: int(req.GetOffset()), - }, req.GetId()) + Size: int(req.Msg.GetSize()), + Offset: int(req.Msg.GetOffset()), + }, req.Msg.GetId()) if err != nil { if errors.Is(err, star.ErrEmptyUserID) || errors.Is(err, star.ErrEmptyAssetID) || errors.As(err, new(star.InvalidError)) { - return nil, status.Error(codes.InvalidArgument, err.Error()) + return nil, connect.NewError(connect.CodeInvalidArgument, err) } if errors.As(err, new(star.NotFoundError)) { - return nil, status.Error(codes.NotFound, err.Error()) + return nil, connect.NewError(connect.CodeNotFound, err) } return nil, internalServerError(server.logger, err.Error()) } @@ -153,31 +152,31 @@ func (server *APIServer) GetAssetStargazers(ctx context.Context, req *compassv1b usersPB = append(usersPB, userToProto(us)) } - return &compassv1beta1.GetAssetStargazersResponse{ + return connect.NewResponse(&compassv1beta1.GetAssetStargazersResponse{ Data: usersPB, - }, nil + }), nil } -func (server *APIServer) GetAssetVersionHistory(ctx context.Context, req *compassv1beta1.GetAssetVersionHistoryRequest) (*compassv1beta1.GetAssetVersionHistoryResponse, error) { - if err := req.ValidateAll(); err != nil { - return nil, status.Error(codes.InvalidArgument, bodyParserErrorMsg(err)) +func (server *APIServer) GetAssetVersionHistory(ctx context.Context, req *connect.Request[compassv1beta1.GetAssetVersionHistoryRequest]) (*connect.Response[compassv1beta1.GetAssetVersionHistoryResponse], error) { + if err := req.Msg.ValidateAll(); err != nil { + return nil, connect.NewError(connect.CodeInvalidArgument, errors.New(bodyParserErrorMsg(err))) } - ns := grpc_interceptor.FetchNamespaceFromContext(ctx) + ns := interceptor.FetchNamespaceFromContext(ctx) if _, err := server.validateUserInCtx(ctx, ns); err != nil { return nil, err } assetVersions, err := server.assetService.GetAssetVersionHistory(ctx, asset.Filter{ - Size: int(req.GetSize()), - Offset: int(req.GetOffset()), - }, req.GetId()) + Size: int(req.Msg.GetSize()), + Offset: int(req.Msg.GetOffset()), + }, req.Msg.GetId()) if err != nil { if errors.As(err, new(asset.InvalidError)) { - return nil, status.Error(codes.InvalidArgument, err.Error()) + return nil, connect.NewError(connect.CodeInvalidArgument, err) } if errors.As(err, new(asset.NotFoundError)) { - return nil, status.Error(codes.NotFound, err.Error()) + return nil, connect.NewError(connect.CodeNotFound, err) } return nil, internalServerError(server.logger, err.Error()) } @@ -191,32 +190,32 @@ func (server *APIServer) GetAssetVersionHistory(ctx context.Context, req *compas assetsPB = append(assetsPB, avPB) } - return &compassv1beta1.GetAssetVersionHistoryResponse{ + return connect.NewResponse(&compassv1beta1.GetAssetVersionHistoryResponse{ Data: assetsPB, - }, nil + }), nil } -func (server *APIServer) GetAssetByVersion(ctx context.Context, req *compassv1beta1.GetAssetByVersionRequest) (*compassv1beta1.GetAssetByVersionResponse, error) { - if err := req.ValidateAll(); err != nil { - return nil, status.Error(codes.InvalidArgument, bodyParserErrorMsg(err)) +func (server *APIServer) GetAssetByVersion(ctx context.Context, req *connect.Request[compassv1beta1.GetAssetByVersionRequest]) (*connect.Response[compassv1beta1.GetAssetByVersionResponse], error) { + if err := req.Msg.ValidateAll(); err != nil { + return nil, connect.NewError(connect.CodeInvalidArgument, errors.New(bodyParserErrorMsg(err))) } - ns := grpc_interceptor.FetchNamespaceFromContext(ctx) + ns := interceptor.FetchNamespaceFromContext(ctx) if _, err := server.validateUserInCtx(ctx, ns); err != nil { return nil, err } - if _, err := asset.ParseVersion(req.GetVersion()); err != nil { - return nil, status.Error(codes.NotFound, err.Error()) + if _, err := asset.ParseVersion(req.Msg.GetVersion()); err != nil { + return nil, connect.NewError(connect.CodeInvalidArgument, err) } - ast, err := server.assetService.GetAssetByVersion(ctx, req.GetId(), req.GetVersion()) + ast, err := server.assetService.GetAssetByVersion(ctx, req.Msg.GetId(), req.Msg.GetVersion()) if err != nil { if errors.As(err, new(asset.InvalidError)) { - return nil, status.Error(codes.InvalidArgument, err.Error()) + return nil, connect.NewError(connect.CodeInvalidArgument, err) } if errors.As(err, new(asset.NotFoundError)) { - return nil, status.Error(codes.NotFound, err.Error()) + return nil, connect.NewError(connect.CodeNotFound, err) } return nil, internalServerError(server.logger, err.Error()) } @@ -226,25 +225,25 @@ func (server *APIServer) GetAssetByVersion(ctx context.Context, req *compassv1be return nil, internalServerError(server.logger, err.Error()) } - return &compassv1beta1.GetAssetByVersionResponse{ + return connect.NewResponse(&compassv1beta1.GetAssetByVersionResponse{ Data: assetPB, - }, nil + }), nil } -func (server *APIServer) UpsertAsset(ctx context.Context, req *compassv1beta1.UpsertAssetRequest) (*compassv1beta1.UpsertAssetResponse, error) { - if err := req.ValidateAll(); err != nil { - return nil, status.Error(codes.InvalidArgument, bodyParserErrorMsg(err)) +func (server *APIServer) UpsertAsset(ctx context.Context, req *connect.Request[compassv1beta1.UpsertAssetRequest]) (*connect.Response[compassv1beta1.UpsertAssetResponse], error) { + if err := req.Msg.ValidateAll(); err != nil { + return nil, connect.NewError(connect.CodeInvalidArgument, errors.New(bodyParserErrorMsg(err))) } - ns := grpc_interceptor.FetchNamespaceFromContext(ctx) + ns := interceptor.FetchNamespaceFromContext(ctx) userID, err := server.validateUserInCtx(ctx, ns) if err != nil { return nil, err } - baseAsset := req.GetAsset() + baseAsset := req.Msg.GetAsset() if baseAsset == nil { - return nil, status.Error(codes.InvalidArgument, "asset cannot be empty") + return nil, connect.NewError(connect.CodeInvalidArgument, errors.New("asset cannot be empty")) } ast := server.buildAsset(baseAsset) @@ -255,47 +254,47 @@ func (server *APIServer) UpsertAsset(ctx context.Context, req *compassv1beta1.Up ns, ast, "asset_upsert", - req.GetUpstreams(), - req.GetDownstreams(), + req.Msg.GetUpstreams(), + req.Msg.GetDownstreams(), ) if err != nil { - if req.GetUpdateOnly() && errors.As(err, new(asset.NotFoundError)) { - return &compassv1beta1.UpsertAssetResponse{Id: ""}, nil + if req.Msg.GetUpdateOnly() && errors.As(err, new(asset.NotFoundError)) { + return connect.NewResponse(&compassv1beta1.UpsertAssetResponse{Id: ""}), nil } return nil, err } - return &compassv1beta1.UpsertAssetResponse{ + return connect.NewResponse(&compassv1beta1.UpsertAssetResponse{ Id: assetID, - }, nil + }), nil } -func (server *APIServer) UpsertPatchAsset(ctx context.Context, req *compassv1beta1.UpsertPatchAssetRequest) (*compassv1beta1.UpsertPatchAssetResponse, error) { - if err := req.ValidateAll(); err != nil { - return nil, status.Error(codes.InvalidArgument, bodyParserErrorMsg(err)) +func (server *APIServer) UpsertPatchAsset(ctx context.Context, req *connect.Request[compassv1beta1.UpsertPatchAssetRequest]) (*connect.Response[compassv1beta1.UpsertPatchAssetResponse], error) { + if err := req.Msg.ValidateAll(); err != nil { + return nil, connect.NewError(connect.CodeInvalidArgument, errors.New(bodyParserErrorMsg(err))) } - ns := grpc_interceptor.FetchNamespaceFromContext(ctx) + ns := interceptor.FetchNamespaceFromContext(ctx) userID, err := server.validateUserInCtx(ctx, ns) if err != nil { return nil, err } - baseAsset := req.GetAsset() + baseAsset := req.Msg.GetAsset() if baseAsset == nil { - return nil, status.Error(codes.InvalidArgument, "asset cannot be empty") + return nil, connect.NewError(connect.CodeInvalidArgument, errors.New("asset cannot be empty")) } urn, err := server.validatePatchAsset(baseAsset) if err != nil { - return nil, status.Error(codes.InvalidArgument, err.Error()) + return nil, connect.NewError(connect.CodeInvalidArgument, err) } ast, err := server.assetService.GetAssetByID(ctx, urn) if err != nil { if errors.As(err, &asset.NotFoundError{}) { - if req.GetUpdateOnly() { - return &compassv1beta1.UpsertPatchAssetResponse{Id: ""}, nil + if req.Msg.GetUpdateOnly() { + return connect.NewResponse(&compassv1beta1.UpsertPatchAssetResponse{Id: ""}), nil } } else { return nil, internalServerError(server.logger, err.Error()) @@ -307,9 +306,9 @@ func (server *APIServer) UpsertPatchAsset(ctx context.Context, req *compassv1bet ast.UpdatedBy.ID = userID var assetID string - if len(req.Upstreams) != 0 || len(req.Downstreams) != 0 || req.OverwriteLineage { + if len(req.Msg.Upstreams) != 0 || len(req.Msg.Downstreams) != 0 || req.Msg.OverwriteLineage { assetID, err = server.upsertAsset( - ctx, ns, ast, "asset_upsert_patch", req.GetUpstreams(), req.GetDownstreams(), + ctx, ns, ast, "asset_upsert_patch", req.Msg.GetUpstreams(), req.Msg.GetDownstreams(), ) } else { assetID, err = server.upsertAssetWithoutLineage(ctx, ns, ast) @@ -318,67 +317,67 @@ func (server *APIServer) UpsertPatchAsset(ctx context.Context, req *compassv1bet return nil, err } - return &compassv1beta1.UpsertPatchAssetResponse{ + return connect.NewResponse(&compassv1beta1.UpsertPatchAssetResponse{ Id: assetID, - }, nil + }), nil } -func (server *APIServer) DeleteAsset(ctx context.Context, req *compassv1beta1.DeleteAssetRequest) (*compassv1beta1.DeleteAssetResponse, error) { - if err := req.ValidateAll(); err != nil { - return nil, status.Error(codes.InvalidArgument, bodyParserErrorMsg(err)) +func (server *APIServer) DeleteAsset(ctx context.Context, req *connect.Request[compassv1beta1.DeleteAssetRequest]) (*connect.Response[compassv1beta1.DeleteAssetResponse], error) { + if err := req.Msg.ValidateAll(); err != nil { + return nil, connect.NewError(connect.CodeInvalidArgument, errors.New(bodyParserErrorMsg(err))) } - ns := grpc_interceptor.FetchNamespaceFromContext(ctx) + ns := interceptor.FetchNamespaceFromContext(ctx) if _, err := server.validateUserInCtx(ctx, ns); err != nil { return nil, err } - if err := server.assetService.DeleteAsset(ctx, ns, req.GetId()); err != nil { + if err := server.assetService.DeleteAsset(ctx, ns, req.Msg.GetId()); err != nil { if errors.As(err, new(asset.InvalidError)) { - return nil, status.Error(codes.InvalidArgument, err.Error()) + return nil, connect.NewError(connect.CodeInvalidArgument, err) } if errors.As(err, new(asset.NotFoundError)) { - return nil, status.Error(codes.NotFound, err.Error()) + return nil, connect.NewError(connect.CodeNotFound, err) } return nil, internalServerError(server.logger, err.Error()) } - return &compassv1beta1.DeleteAssetResponse{}, nil + return connect.NewResponse(&compassv1beta1.DeleteAssetResponse{}), nil } -func (server *APIServer) CreateAssetProbe(ctx context.Context, req *compassv1beta1.CreateAssetProbeRequest) (*compassv1beta1.CreateAssetProbeResponse, error) { - ns := grpc_interceptor.FetchNamespaceFromContext(ctx) +func (server *APIServer) CreateAssetProbe(ctx context.Context, req *connect.Request[compassv1beta1.CreateAssetProbeRequest]) (*connect.Response[compassv1beta1.CreateAssetProbeResponse], error) { + ns := interceptor.FetchNamespaceFromContext(ctx) if _, err := server.validateUserInCtx(ctx, ns); err != nil { return nil, err } - if err := req.ValidateAll(); err != nil { - return nil, status.Error(codes.InvalidArgument, bodyParserErrorMsg(err)) + if err := req.Msg.ValidateAll(); err != nil { + return nil, connect.NewError(connect.CodeInvalidArgument, errors.New(bodyParserErrorMsg(err))) } - if req.Probe.Status == "" { - return nil, status.Error(codes.InvalidArgument, "Status is required") + if req.Msg.Probe.Status == "" { + return nil, connect.NewError(connect.CodeInvalidArgument, errors.New("status is required")) } - if !req.Probe.Timestamp.IsValid() { - return nil, status.Error(codes.InvalidArgument, "Timestamp is required") + if !req.Msg.Probe.Timestamp.IsValid() { + return nil, connect.NewError(connect.CodeInvalidArgument, errors.New("timestamp is required")) } probe := asset.Probe{ - Status: req.Probe.Status, - StatusReason: req.Probe.StatusReason, - Metadata: req.Probe.Metadata.AsMap(), - Timestamp: req.Probe.Timestamp.AsTime(), + Status: req.Msg.Probe.Status, + StatusReason: req.Msg.Probe.StatusReason, + Metadata: req.Msg.Probe.Metadata.AsMap(), + Timestamp: req.Msg.Probe.Timestamp.AsTime(), } - if err := server.assetService.AddProbe(ctx, ns, req.AssetUrn, &probe); err != nil { + if err := server.assetService.AddProbe(ctx, ns, req.Msg.AssetUrn, &probe); err != nil { if errors.As(err, &asset.NotFoundError{}) { - return nil, status.Error(codes.NotFound, err.Error()) + return nil, connect.NewError(connect.CodeNotFound, err) } - return nil, status.Error(codes.Internal, err.Error()) + return nil, internalServerError(server.logger, err.Error()) } - return &compassv1beta1.CreateAssetProbeResponse{ + return connect.NewResponse(&compassv1beta1.CreateAssetProbeResponse{ Id: probe.ID, - }, nil + }), nil } func (server *APIServer) upsertAsset( @@ -390,7 +389,7 @@ func (server *APIServer) upsertAsset( reqDownstreams []*compassv1beta1.LineageNode, ) (assetID string, err error) { if err := server.validateAsset(ast); err != nil { - return "", status.Error(codes.InvalidArgument, err.Error()) + return "", connect.NewError(connect.CodeInvalidArgument, err) } upstreams := make([]string, 0, len(reqUpstreams)) @@ -404,7 +403,7 @@ func (server *APIServer) upsertAsset( assetID, err = server.assetService.UpsertAsset(ctx, ns, &ast, upstreams, downstreams) if errors.As(err, new(asset.InvalidError)) { - return "", status.Error(codes.InvalidArgument, err.Error()) + return "", connect.NewError(connect.CodeInvalidArgument, err) } else if err != nil { return "", internalServerError(server.logger, err.Error()) } @@ -414,13 +413,13 @@ func (server *APIServer) upsertAsset( func (server *APIServer) upsertAssetWithoutLineage(ctx context.Context, ns *namespace.Namespace, ast asset.Asset) (string, error) { if err := server.validateAsset(ast); err != nil { - return "", status.Error(codes.InvalidArgument, err.Error()) + return "", connect.NewError(connect.CodeInvalidArgument, err) } assetID, err := server.assetService.UpsertAssetWithoutLineage(ctx, ns, &ast) if err != nil { if errors.As(err, new(asset.InvalidError)) { - return "", status.Error(codes.InvalidArgument, err.Error()) + return "", connect.NewError(connect.CodeInvalidArgument, err) } return "", internalServerError(server.logger, err.Error()) } diff --git a/internal/server/v1beta1/asset_test.go b/internal/server/v1beta1/asset_test.go index 109c4b2a..a087ccc3 100644 --- a/internal/server/v1beta1/asset_test.go +++ b/internal/server/v1beta1/asset_test.go @@ -4,25 +4,26 @@ import ( "context" "errors" "fmt" - "github.com/raystack/compass/core/namespace" - "github.com/raystack/compass/pkg/grpc_interceptor" "reflect" "testing" "time" + "connectrpc.com/connect" "github.com/google/go-cmp/cmp" "github.com/google/uuid" + "github.com/r3labs/diff/v3" "github.com/raystack/compass/core/asset" + "github.com/raystack/compass/core/namespace" "github.com/raystack/compass/core/star" "github.com/raystack/compass/core/user" "github.com/raystack/compass/internal/server/v1beta1/mocks" - compassv1beta1 "github.com/raystack/compass/proto/raystack/compass/v1beta1" + "github.com/raystack/compass/pkg/server/interceptor" + compassv1beta1 "github.com/raystack/compass/proto/compassv1beta1" log "github.com/raystack/salt/observability/logger" - "github.com/r3labs/diff/v3" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/status" + + "google.golang.org/protobuf/testing/protocmp" "google.golang.org/protobuf/types/known/structpb" "google.golang.org/protobuf/types/known/timestamppb" @@ -37,7 +38,7 @@ func TestGetAllAssets(t *testing.T) { type testCase struct { Description string Request *compassv1beta1.GetAllAssetsRequest - ExpectStatus codes.Code + ExpectStatus connect.Code Setup func(context.Context, *mocks.AssetService, *mocks.NamespaceService) PostCheck func(resp *compassv1beta1.GetAllAssetsResponse) error } @@ -48,13 +49,13 @@ func TestGetAllAssets(t *testing.T) { Metadata: nil, } ctx := user.NewContext(context.Background(), user.User{UUID: userUUID}) - ctx = grpc_interceptor.BuildContextWithNamespace(ctx, ns) + ctx = interceptor.BuildContextWithNamespace(ctx, ns) defaultFilter, _ := asset.NewFilterBuilder().Build() var testCases = []testCase{ { Description: `should return internal server error if fetching fails`, - ExpectStatus: codes.Internal, + ExpectStatus: connect.CodeInternal, Request: &compassv1beta1.GetAllAssetsRequest{}, Setup: func(ctx context.Context, as *mocks.AssetService, nss *mocks.NamespaceService) { as.EXPECT().GetAllAssets(ctx, defaultFilter, false).Return([]asset.Asset{}, 0, errors.New("unknown error")) @@ -65,7 +66,7 @@ func TestGetAllAssets(t *testing.T) { Request: &compassv1beta1.GetAllAssetsRequest{ WithTotal: true, }, - ExpectStatus: codes.Internal, + ExpectStatus: connect.CodeInternal, Setup: func(ctx context.Context, as *mocks.AssetService, nss *mocks.NamespaceService) { as.EXPECT().GetAllAssets(ctx, defaultFilter, true).Return([]asset.Asset{}, 0, errors.New("unknown error")) }, @@ -87,7 +88,7 @@ func TestGetAllAssets(t *testing.T) { Offset: 50, WithTotal: false, }, - ExpectStatus: codes.OK, + ExpectStatus: 0, Setup: func(ctx context.Context, as *mocks.AssetService, nss *mocks.NamespaceService) { cfg := asset.Filter{ Types: []asset.Type{"table", "topic"}, @@ -108,7 +109,7 @@ func TestGetAllAssets(t *testing.T) { }, { Description: "should return status OK along with list of assets", - ExpectStatus: codes.OK, + ExpectStatus: 0, Request: &compassv1beta1.GetAllAssetsRequest{}, Setup: func(ctx context.Context, as *mocks.AssetService, nss *mocks.NamespaceService) { as.EXPECT().GetAllAssets(ctx, defaultFilter, false).Return([]asset.Asset{ @@ -132,7 +133,7 @@ func TestGetAllAssets(t *testing.T) { }, { Description: "should return total in the payload if with_total flag is given", - ExpectStatus: codes.OK, + ExpectStatus: 0, Request: &compassv1beta1.GetAllAssetsRequest{ Types: "job", Services: "kafka", @@ -187,14 +188,21 @@ func TestGetAllAssets(t *testing.T) { handler := NewAPIServer(logger, mockNamespaceSvc, mockAssetSvc, nil, nil, nil, nil, mockUserSvc) - got, err := handler.GetAllAssets(ctx, tc.Request) - code := status.Code(err) - if code != tc.ExpectStatus { - t.Errorf("expected handler to return Code %s, returned Code %sinstead", tc.ExpectStatus.String(), code.String()) - return + got, err := handler.GetAllAssets(ctx, connect.NewRequest(tc.Request)) + if tc.ExpectStatus == 0 { + if err != nil { + t.Errorf("expected no error but got: %v", err) + return + } + } else { + code := connect.CodeOf(err) + if code != tc.ExpectStatus { + t.Errorf("expected handler to return Code %s, returned Code %s instead", tc.ExpectStatus.String(), code.String()) + return + } } if tc.PostCheck != nil { - if err := tc.PostCheck(got); err != nil { + if err := tc.PostCheck(got.Msg); err != nil { t.Error(err) return } @@ -242,11 +250,11 @@ func TestGetAssetByID(t *testing.T) { } ) ctx := user.NewContext(context.Background(), user.User{UUID: userUUID}) - ctx = grpc_interceptor.BuildContextWithNamespace(ctx, ns) + ctx = interceptor.BuildContextWithNamespace(ctx, ns) type testCase struct { Description string - ExpectStatus codes.Code + ExpectStatus connect.Code Setup func(context.Context, *mocks.AssetService, *mocks.NamespaceService) PostCheck func(resp *compassv1beta1.GetAssetByIDResponse) error } @@ -254,28 +262,28 @@ func TestGetAssetByID(t *testing.T) { var testCases = []testCase{ { Description: `should return invalid argument if asset id is not uuid`, - ExpectStatus: codes.InvalidArgument, + ExpectStatus: connect.CodeInvalidArgument, Setup: func(ctx context.Context, as *mocks.AssetService, nss *mocks.NamespaceService) { as.EXPECT().GetAssetByID(ctx, assetID).Return(asset.Asset{}, asset.InvalidError{AssetID: assetID}) }, }, { Description: `should return not found if asset doesn't exist`, - ExpectStatus: codes.NotFound, + ExpectStatus: connect.CodeNotFound, Setup: func(ctx context.Context, as *mocks.AssetService, nss *mocks.NamespaceService) { as.EXPECT().GetAssetByID(ctx, assetID).Return(asset.Asset{}, asset.NotFoundError{AssetID: assetID}) }, }, { Description: `should return internal server error if fetching fails`, - ExpectStatus: codes.Internal, + ExpectStatus: connect.CodeInternal, Setup: func(ctx context.Context, as *mocks.AssetService, nss *mocks.NamespaceService) { as.EXPECT().GetAssetByID(ctx, assetID).Return(asset.Asset{}, errors.New("unknown error")) }, }, { Description: "should return http 200 status along with the asset, if found", - ExpectStatus: codes.OK, + ExpectStatus: 0, Setup: func(ctx context.Context, as *mocks.AssetService, nss *mocks.NamespaceService) { as.EXPECT().GetAssetByID(ctx, assetID).Return(ast, nil) }, @@ -327,16 +335,23 @@ func TestGetAssetByID(t *testing.T) { handler := NewAPIServer(logger, mockNamespaceSvc, mockAssetSvc, nil, nil, nil, nil, mockUserSvc) - got, err := handler.GetAssetByID(ctx, &compassv1beta1.GetAssetByIDRequest{ + got, err := handler.GetAssetByID(ctx, connect.NewRequest(&compassv1beta1.GetAssetByIDRequest{ Id: assetID, - }) - code := status.Code(err) - if code != tc.ExpectStatus { - t.Errorf("expected handler to return Code %s, returned Code %sinstead", tc.ExpectStatus.String(), code.String()) - return + })) + if tc.ExpectStatus == 0 { + if err != nil { + t.Errorf("expected no error but got: %v", err) + return + } + } else { + code := connect.CodeOf(err) + if code != tc.ExpectStatus { + t.Errorf("expected handler to return Code %s, returned Code %s instead", tc.ExpectStatus.String(), code.String()) + return + } } if tc.PostCheck != nil { - if err := tc.PostCheck(got); err != nil { + if err := tc.PostCheck(got.Msg); err != nil { t.Error(err) return } @@ -388,11 +403,11 @@ func TestUpsertAsset(t *testing.T) { } ) ctx := user.NewContext(context.Background(), user.User{UUID: userUUID}) - ctx = grpc_interceptor.BuildContextWithNamespace(ctx, ns) + ctx = interceptor.BuildContextWithNamespace(ctx, ns) type testCase struct { Description string Request *compassv1beta1.UpsertAssetRequest - ExpectStatus codes.Code + ExpectStatus connect.Code Setup func(context.Context, *mocks.AssetService, *mocks.NamespaceService) PostCheck func(resp *compassv1beta1.UpsertAssetResponse) error } @@ -401,14 +416,14 @@ func TestUpsertAsset(t *testing.T) { { Description: "empty payload will return invalid argument", Request: &compassv1beta1.UpsertAssetRequest{}, - ExpectStatus: codes.InvalidArgument, + ExpectStatus: connect.CodeInvalidArgument, Setup: func(ctx context.Context, as *mocks.AssetService, nss *mocks.NamespaceService) { }, }, { Description: "empty asset will return invalid argument", Request: &compassv1beta1.UpsertAssetRequest{Asset: &compassv1beta1.UpsertAssetRequest_Asset{}}, - ExpectStatus: codes.InvalidArgument, + ExpectStatus: connect.CodeInvalidArgument, Setup: func(ctx context.Context, as *mocks.AssetService, nss *mocks.NamespaceService) { }, }, @@ -425,7 +440,7 @@ func TestUpsertAsset(t *testing.T) { }, Setup: func(ctx context.Context, as *mocks.AssetService, nss *mocks.NamespaceService) { }, - ExpectStatus: codes.InvalidArgument, + ExpectStatus: connect.CodeInvalidArgument, }, { Description: "empty service will return invalid argument", @@ -438,7 +453,7 @@ func TestUpsertAsset(t *testing.T) { Type: "table", }, }, - ExpectStatus: codes.InvalidArgument, + ExpectStatus: connect.CodeInvalidArgument, Setup: func(ctx context.Context, as *mocks.AssetService, nss *mocks.NamespaceService) { }, }, @@ -453,7 +468,7 @@ func TestUpsertAsset(t *testing.T) { Type: "", }, }, - ExpectStatus: codes.InvalidArgument, + ExpectStatus: connect.CodeInvalidArgument, Setup: func(ctx context.Context, as *mocks.AssetService, nss *mocks.NamespaceService) { }, }, @@ -468,7 +483,7 @@ func TestUpsertAsset(t *testing.T) { Type: "invalid type", }, }, - ExpectStatus: codes.InvalidArgument, + ExpectStatus: connect.CodeInvalidArgument, Setup: func(ctx context.Context, as *mocks.AssetService, nss *mocks.NamespaceService) { }, }, @@ -485,7 +500,7 @@ func TestUpsertAsset(t *testing.T) { ).Return("", expectedErr) }, Request: validPayload, - ExpectStatus: codes.Internal, + ExpectStatus: connect.CodeInternal, }, { Description: "should return OK and asset's ID if the asset is successfully created/updated", @@ -511,7 +526,7 @@ func TestUpsertAsset(t *testing.T) { }) }, Request: validPayload, - ExpectStatus: codes.OK, + ExpectStatus: 0, PostCheck: func(resp *compassv1beta1.UpsertAssetResponse) error { expected := &compassv1beta1.UpsertAssetResponse{ Id: assetID, @@ -541,14 +556,21 @@ func TestUpsertAsset(t *testing.T) { handler := NewAPIServer(logger, mockNamespaceSvc, mockAssetSvc, nil, nil, nil, nil, mockUserSvc) - got, err := handler.UpsertAsset(ctx, tc.Request) - code := status.Code(err) - if code != tc.ExpectStatus { - t.Errorf("expected handler to return Code %s, returned Code %sinstead", tc.ExpectStatus.String(), code.String()) - return + got, err := handler.UpsertAsset(ctx, connect.NewRequest(tc.Request)) + if tc.ExpectStatus == 0 { + if err != nil { + t.Errorf("expected no error but got: %v", err) + return + } + } else { + code := connect.CodeOf(err) + if code != tc.ExpectStatus { + t.Errorf("expected handler to return Code %s, returned Code %s instead", tc.ExpectStatus.String(), code.String()) + return + } } if tc.PostCheck != nil { - if err := tc.PostCheck(got); err != nil { + if err := tc.PostCheck(got.Msg); err != nil { t.Error(err) return } @@ -610,11 +632,11 @@ func TestUpsertPatchAsset(t *testing.T) { } ) ctx := user.NewContext(context.Background(), user.User{UUID: userUUID}) - ctx = grpc_interceptor.BuildContextWithNamespace(ctx, ns) + ctx = interceptor.BuildContextWithNamespace(ctx, ns) type testCase struct { Description string Request *compassv1beta1.UpsertPatchAssetRequest - ExpectStatus codes.Code + ExpectStatus connect.Code Setup func(context.Context, *mocks.AssetService, *mocks.NamespaceService) PostCheck func(resp *compassv1beta1.UpsertPatchAssetResponse) error } @@ -623,14 +645,14 @@ func TestUpsertPatchAsset(t *testing.T) { { Description: "empty payload will return invalid argument", Request: &compassv1beta1.UpsertPatchAssetRequest{}, - ExpectStatus: codes.InvalidArgument, + ExpectStatus: connect.CodeInvalidArgument, Setup: func(ctx context.Context, as *mocks.AssetService, nss *mocks.NamespaceService) { }, }, { Description: "empty asset will return invalid argument", Request: &compassv1beta1.UpsertPatchAssetRequest{Asset: &compassv1beta1.UpsertPatchAssetRequest_Asset{}}, - ExpectStatus: codes.InvalidArgument, + ExpectStatus: connect.CodeInvalidArgument, Setup: func(ctx context.Context, as *mocks.AssetService, nss *mocks.NamespaceService) { }, }, @@ -645,7 +667,7 @@ func TestUpsertPatchAsset(t *testing.T) { Type: "table", }, }, - ExpectStatus: codes.InvalidArgument, + ExpectStatus: connect.CodeInvalidArgument, Setup: func(ctx context.Context, as *mocks.AssetService, nss *mocks.NamespaceService) { }, }, @@ -660,7 +682,7 @@ func TestUpsertPatchAsset(t *testing.T) { Type: "table", }, }, - ExpectStatus: codes.InvalidArgument, + ExpectStatus: connect.CodeInvalidArgument, Setup: func(ctx context.Context, as *mocks.AssetService, nss *mocks.NamespaceService) { }, }, @@ -675,7 +697,7 @@ func TestUpsertPatchAsset(t *testing.T) { Type: "", }, }, - ExpectStatus: codes.InvalidArgument, + ExpectStatus: connect.CodeInvalidArgument, Setup: func(ctx context.Context, as *mocks.AssetService, nss *mocks.NamespaceService) { }, }, @@ -690,7 +712,7 @@ func TestUpsertPatchAsset(t *testing.T) { Type: "invalid type", }, }, - ExpectStatus: codes.InvalidArgument, + ExpectStatus: connect.CodeInvalidArgument, Setup: func(ctx context.Context, as *mocks.AssetService, nss *mocks.NamespaceService) { }, }, @@ -701,7 +723,7 @@ func TestUpsertPatchAsset(t *testing.T) { as.EXPECT().GetAssetByID(ctx, "test dagger").Return(currentAsset, expectedErr) }, Request: validPayload, - ExpectStatus: codes.Internal, + ExpectStatus: connect.CodeInternal, }, { Description: "should return internal server error when upserting asset service failed", @@ -711,7 +733,7 @@ func TestUpsertPatchAsset(t *testing.T) { as.EXPECT().UpsertAsset(ctx, ns, mock.AnythingOfType("*asset.Asset"), mock.AnythingOfType("[]string"), mock.AnythingOfType("[]string")).Return("1234-5678", expectedErr) }, Request: validPayload, - ExpectStatus: codes.Internal, + ExpectStatus: connect.CodeInternal, }, { Description: "should return OK and asset's ID if the asset is successfully created/patched", @@ -738,7 +760,7 @@ func TestUpsertPatchAsset(t *testing.T) { }) }, Request: validPayload, - ExpectStatus: codes.OK, + ExpectStatus: 0, PostCheck: func(resp *compassv1beta1.UpsertPatchAssetResponse) error { expected := &compassv1beta1.UpsertPatchAssetResponse{ Id: assetID, @@ -784,7 +806,7 @@ func TestUpsertPatchAsset(t *testing.T) { Owners: []*compassv1beta1.User{{Id: "id", Uuid: "", Email: "email@email.com", Provider: "provider"}}, }, }, - ExpectStatus: codes.OK, + ExpectStatus: 0, PostCheck: func(resp *compassv1beta1.UpsertPatchAssetResponse) error { expected := &compassv1beta1.UpsertPatchAssetResponse{ Id: assetID, @@ -831,7 +853,7 @@ func TestUpsertPatchAsset(t *testing.T) { }, OverwriteLineage: true, }, - ExpectStatus: codes.OK, + ExpectStatus: 0, PostCheck: func(resp *compassv1beta1.UpsertPatchAssetResponse) error { expected := &compassv1beta1.UpsertPatchAssetResponse{ Id: assetID, @@ -862,14 +884,21 @@ func TestUpsertPatchAsset(t *testing.T) { handler := NewAPIServer(logger, mockNamespaceSvc, mockAssetSvc, nil, nil, nil, nil, mockUserSvc) - got, err := handler.UpsertPatchAsset(ctx, tc.Request) - code := status.Code(err) - if code != tc.ExpectStatus { - t.Errorf("expected handler to return Code %s, returned Code %sinstead", tc.ExpectStatus.String(), code.String()) - return + got, err := handler.UpsertPatchAsset(ctx, connect.NewRequest(tc.Request)) + if tc.ExpectStatus == 0 { + if err != nil { + t.Errorf("expected no error but got: %v", err) + return + } + } else { + code := connect.CodeOf(err) + if code != tc.ExpectStatus { + t.Errorf("expected handler to return Code %s, returned Code %s instead", tc.ExpectStatus.String(), code.String()) + return + } } if tc.PostCheck != nil { - if err := tc.PostCheck(got); err != nil { + if err := tc.PostCheck(got.Msg); err != nil { t.Error(err) return } @@ -890,11 +919,11 @@ func TestDeleteAsset(t *testing.T) { } ) ctx := user.NewContext(context.Background(), user.User{UUID: userUUID}) - ctx = grpc_interceptor.BuildContextWithNamespace(ctx, ns) + ctx = interceptor.BuildContextWithNamespace(ctx, ns) type TestCase struct { Description string AssetID string - ExpectStatus codes.Code + ExpectStatus connect.Code Setup func(ctx context.Context, as *mocks.AssetService, astID string, nss *mocks.NamespaceService) } @@ -902,7 +931,7 @@ func TestDeleteAsset(t *testing.T) { { Description: "should return invalid argument when asset id is not uuid", AssetID: "not-uuid", - ExpectStatus: codes.InvalidArgument, + ExpectStatus: connect.CodeInvalidArgument, Setup: func(ctx context.Context, as *mocks.AssetService, astID string, nss *mocks.NamespaceService) { as.EXPECT().DeleteAsset(ctx, ns, "not-uuid").Return(asset.InvalidError{AssetID: astID}) }, @@ -910,7 +939,7 @@ func TestDeleteAsset(t *testing.T) { { Description: "should return not found when asset cannot be found", AssetID: assetID, - ExpectStatus: codes.NotFound, + ExpectStatus: connect.CodeNotFound, Setup: func(ctx context.Context, as *mocks.AssetService, astID string, nss *mocks.NamespaceService) { as.EXPECT().DeleteAsset(ctx, ns, astID).Return(asset.NotFoundError{AssetID: astID}) }, @@ -918,7 +947,7 @@ func TestDeleteAsset(t *testing.T) { { Description: "should return 500 on error deleting asset", AssetID: assetID, - ExpectStatus: codes.Internal, + ExpectStatus: connect.CodeInternal, Setup: func(ctx context.Context, as *mocks.AssetService, astID string, nss *mocks.NamespaceService) { as.EXPECT().DeleteAsset(ctx, ns, astID).Return(errors.New("error deleting asset")) }, @@ -926,7 +955,7 @@ func TestDeleteAsset(t *testing.T) { { Description: "should return OK on success", AssetID: assetID, - ExpectStatus: codes.OK, + ExpectStatus: 0, Setup: func(ctx context.Context, as *mocks.AssetService, astID string, nss *mocks.NamespaceService) { as.EXPECT().DeleteAsset(ctx, ns, astID).Return(nil) }, @@ -950,13 +979,20 @@ func TestDeleteAsset(t *testing.T) { handler := NewAPIServer(logger, mockNamespaceSvc, mockAssetSvc, nil, nil, nil, nil, mockUserSvc) - _, err := handler.DeleteAsset(ctx, &compassv1beta1.DeleteAssetRequest{ + _, err := handler.DeleteAsset(ctx, connect.NewRequest(&compassv1beta1.DeleteAssetRequest{ Id: tc.AssetID, - }) - code := status.Code(err) - if code != tc.ExpectStatus { - t.Errorf("expected handler to return Code %s, returned Code %sinstead", tc.ExpectStatus.String(), code.String()) - return + })) + if tc.ExpectStatus == 0 { + if err != nil { + t.Errorf("expected no error but got: %v", err) + return + } + } else { + code := connect.CodeOf(err) + if code != tc.ExpectStatus { + t.Errorf("expected handler to return Code %s, returned Code %s instead", tc.ExpectStatus.String(), code.String()) + return + } } }) } @@ -978,11 +1014,11 @@ func TestGetAssetStargazers(t *testing.T) { userUUID = uuid.NewString() ) ctx := user.NewContext(context.Background(), user.User{UUID: userUUID}) - ctx = grpc_interceptor.BuildContextWithNamespace(ctx, ns) + ctx = interceptor.BuildContextWithNamespace(ctx, ns) type TestCase struct { Description string Request *compassv1beta1.GetAssetStargazersRequest - ExpectStatus codes.Code + ExpectStatus connect.Code Setup func(ctx context.Context, ss *mocks.StarService, nss *mocks.NamespaceService) PostCheck func(resp *compassv1beta1.GetAssetStargazersResponse) error } @@ -990,7 +1026,7 @@ func TestGetAssetStargazers(t *testing.T) { var testCases = []TestCase{ { Description: "should return internal server error if failed to fetch star repository", - ExpectStatus: codes.Internal, + ExpectStatus: connect.CodeInternal, Request: &compassv1beta1.GetAssetStargazersRequest{ Id: assetID, Size: uint32(size), @@ -1002,7 +1038,7 @@ func TestGetAssetStargazers(t *testing.T) { }, { Description: "should return not found if star repository return not found error", - ExpectStatus: codes.NotFound, + ExpectStatus: connect.CodeNotFound, Request: &compassv1beta1.GetAssetStargazersRequest{ Id: assetID, Size: uint32(size), @@ -1014,7 +1050,7 @@ func TestGetAssetStargazers(t *testing.T) { }, { Description: "should return OK if star repository return nil error", - ExpectStatus: codes.OK, + ExpectStatus: 0, Request: &compassv1beta1.GetAssetStargazersRequest{ Id: assetID, Size: uint32(size), @@ -1042,14 +1078,21 @@ func TestGetAssetStargazers(t *testing.T) { handler := NewAPIServer(logger, mockNamespaceSvc, nil, mockStarSvc, nil, nil, nil, mockUserSvc) - got, err := handler.GetAssetStargazers(ctx, tc.Request) - code := status.Code(err) - if code != tc.ExpectStatus { - t.Errorf("expected handler to return Code %s, returned Code %sinstead", tc.ExpectStatus.String(), code.String()) - return + got, err := handler.GetAssetStargazers(ctx, connect.NewRequest(tc.Request)) + if tc.ExpectStatus == 0 { + if err != nil { + t.Errorf("expected no error but got: %v", err) + return + } + } else { + code := connect.CodeOf(err) + if code != tc.ExpectStatus { + t.Errorf("expected handler to return Code %s, returned Code %s instead", tc.ExpectStatus.String(), code.String()) + return + } } if tc.PostCheck != nil { - if err := tc.PostCheck(got); err != nil { + if err := tc.PostCheck(got.Msg); err != nil { t.Error(err) return } @@ -1071,11 +1114,11 @@ func TestGetAssetVersionHistory(t *testing.T) { userUUID = uuid.NewString() ) ctx := user.NewContext(context.Background(), user.User{UUID: userUUID}) - ctx = grpc_interceptor.BuildContextWithNamespace(ctx, ns) + ctx = interceptor.BuildContextWithNamespace(ctx, ns) type TestCase struct { Description string Request *compassv1beta1.GetAssetVersionHistoryRequest - ExpectStatus codes.Code + ExpectStatus connect.Code Setup func(context.Context, *mocks.AssetService, *mocks.NamespaceService) PostCheck func(resp *compassv1beta1.GetAssetVersionHistoryResponse) error } @@ -1083,7 +1126,7 @@ func TestGetAssetVersionHistory(t *testing.T) { var testCases = []TestCase{ { Description: `should return invalid argument if asset id is not uuid`, - ExpectStatus: codes.InvalidArgument, + ExpectStatus: connect.CodeInvalidArgument, Request: &compassv1beta1.GetAssetVersionHistoryRequest{ Id: assetID, }, @@ -1093,7 +1136,7 @@ func TestGetAssetVersionHistory(t *testing.T) { }, { Description: `should return internal server error if fetching fails`, - ExpectStatus: codes.Internal, + ExpectStatus: connect.CodeInternal, Request: &compassv1beta1.GetAssetVersionHistoryRequest{ Id: assetID, }, @@ -1108,7 +1151,7 @@ func TestGetAssetVersionHistory(t *testing.T) { Size: 30, Offset: 50, }, - ExpectStatus: codes.OK, + ExpectStatus: 0, Setup: func(ctx context.Context, as *mocks.AssetService, nss *mocks.NamespaceService) { as.EXPECT().GetAssetVersionHistory(ctx, asset.Filter{ Size: 30, @@ -1118,7 +1161,7 @@ func TestGetAssetVersionHistory(t *testing.T) { }, { Description: "should return status OK along with list of asset versions", - ExpectStatus: codes.OK, + ExpectStatus: 0, Request: &compassv1beta1.GetAssetVersionHistoryRequest{ Id: assetID, }, @@ -1164,14 +1207,21 @@ func TestGetAssetVersionHistory(t *testing.T) { handler := NewAPIServer(logger, mockNamespaceSvc, mockAssetSvc, nil, nil, nil, nil, mockUserSvc) - got, err := handler.GetAssetVersionHistory(ctx, tc.Request) - code := status.Code(err) - if code != tc.ExpectStatus { - t.Errorf("expected handler to return Code %s, returned Code %sinstead", tc.ExpectStatus.String(), code.String()) - return + got, err := handler.GetAssetVersionHistory(ctx, connect.NewRequest(tc.Request)) + if tc.ExpectStatus == 0 { + if err != nil { + t.Errorf("expected no error but got: %v", err) + return + } + } else { + code := connect.CodeOf(err) + if code != tc.ExpectStatus { + t.Errorf("expected handler to return Code %s, returned Code %s instead", tc.ExpectStatus.String(), code.String()) + return + } } if tc.PostCheck != nil { - if err := tc.PostCheck(got); err != nil { + if err := tc.PostCheck(got.Msg); err != nil { t.Error(err) return } @@ -1200,11 +1250,11 @@ func TestGetAssetByVersion(t *testing.T) { } ) ctx := user.NewContext(context.Background(), user.User{UUID: userUUID}) - ctx = grpc_interceptor.BuildContextWithNamespace(ctx, ns) + ctx = interceptor.BuildContextWithNamespace(ctx, ns) type TestCase struct { Description string Request *compassv1beta1.GetAssetByVersionRequest - ExpectStatus codes.Code + ExpectStatus connect.Code Setup func(context.Context, *mocks.AssetService, *mocks.NamespaceService) PostCheck func(resp *compassv1beta1.GetAssetByVersionResponse) error } @@ -1216,14 +1266,14 @@ func TestGetAssetByVersion(t *testing.T) { Id: assetID, Version: version, }, - ExpectStatus: codes.InvalidArgument, + ExpectStatus: connect.CodeInvalidArgument, Setup: func(ctx context.Context, as *mocks.AssetService, nss *mocks.NamespaceService) { as.EXPECT().GetAssetByVersion(ctx, assetID, version).Return(asset.Asset{}, asset.InvalidError{AssetID: assetID}) }, }, { Description: `should return not found if asset doesn't exist`, - ExpectStatus: codes.NotFound, + ExpectStatus: connect.CodeNotFound, Request: &compassv1beta1.GetAssetByVersionRequest{ Id: assetID, Version: version, @@ -1234,7 +1284,7 @@ func TestGetAssetByVersion(t *testing.T) { }, { Description: `should return internal server error if fetching fails`, - ExpectStatus: codes.Internal, + ExpectStatus: connect.CodeInternal, Request: &compassv1beta1.GetAssetByVersionRequest{ Id: assetID, Version: version, @@ -1245,7 +1295,7 @@ func TestGetAssetByVersion(t *testing.T) { }, { Description: "should return status OK along with the asset if found", - ExpectStatus: codes.OK, + ExpectStatus: 0, Request: &compassv1beta1.GetAssetByVersionRequest{ Id: assetID, Version: version, @@ -1286,14 +1336,21 @@ func TestGetAssetByVersion(t *testing.T) { handler := NewAPIServer(logger, mockNamespaceSvc, mockAssetSvc, nil, nil, nil, nil, mockUserSvc) - got, err := handler.GetAssetByVersion(ctx, tc.Request) - code := status.Code(err) - if code != tc.ExpectStatus { - t.Errorf("expected handler to return Code %s, returned Code %sinstead", tc.ExpectStatus.String(), code.String()) - return + got, err := handler.GetAssetByVersion(ctx, connect.NewRequest(tc.Request)) + if tc.ExpectStatus == 0 { + if err != nil { + t.Errorf("expected no error but got: %v", err) + return + } + } else { + code := connect.CodeOf(err) + if code != tc.ExpectStatus { + t.Errorf("expected handler to return Code %s, returned Code %s instead", tc.ExpectStatus.String(), code.String()) + return + } } if tc.PostCheck != nil { - if err := tc.PostCheck(got); err != nil { + if err := tc.PostCheck(got.Msg); err != nil { t.Error(err) return } @@ -1317,11 +1374,11 @@ func TestCreateAssetProbe(t *testing.T) { probeID = uuid.NewString() ) ctx := user.NewContext(context.Background(), user.User{UUID: userUUID}) - ctx = grpc_interceptor.BuildContextWithNamespace(ctx, ns) + ctx = interceptor.BuildContextWithNamespace(ctx, ns) type testCase struct { Description string Request *compassv1beta1.CreateAssetProbeRequest - ExpectStatus codes.Code + ExpectStatus connect.Code Setup func(context.Context, *mocks.AssetService, *mocks.NamespaceService) PostCheck func(resp *compassv1beta1.CreateAssetProbeResponse) error } @@ -1329,7 +1386,7 @@ func TestCreateAssetProbe(t *testing.T) { var testCases = []testCase{ { Description: `should return error if status is missing`, - ExpectStatus: codes.InvalidArgument, + ExpectStatus: connect.CodeInvalidArgument, Request: &compassv1beta1.CreateAssetProbeRequest{ AssetUrn: assetURN, Probe: &compassv1beta1.CreateAssetProbeRequest_Probe{ @@ -1341,7 +1398,7 @@ func TestCreateAssetProbe(t *testing.T) { }, { Description: `should return error if timestamp is missing`, - ExpectStatus: codes.InvalidArgument, + ExpectStatus: connect.CodeInvalidArgument, Request: &compassv1beta1.CreateAssetProbeRequest{ AssetUrn: assetURN, Probe: &compassv1beta1.CreateAssetProbeRequest_Probe{ @@ -1353,7 +1410,7 @@ func TestCreateAssetProbe(t *testing.T) { }, { Description: `should return not found if asset doesn't exist`, - ExpectStatus: codes.NotFound, + ExpectStatus: connect.CodeNotFound, Request: &compassv1beta1.CreateAssetProbeRequest{ AssetUrn: assetURN, Probe: &compassv1beta1.CreateAssetProbeRequest_Probe{ @@ -1369,7 +1426,7 @@ func TestCreateAssetProbe(t *testing.T) { }, { Description: `should return internal server error if adding probe fails`, - ExpectStatus: codes.Internal, + ExpectStatus: connect.CodeInternal, Request: &compassv1beta1.CreateAssetProbeRequest{ AssetUrn: assetURN, Probe: &compassv1beta1.CreateAssetProbeRequest_Probe{ @@ -1385,7 +1442,7 @@ func TestCreateAssetProbe(t *testing.T) { }, { Description: "should return probe on success", - ExpectStatus: codes.OK, + ExpectStatus: 0, Request: &compassv1beta1.CreateAssetProbeRequest{ AssetUrn: assetURN, Probe: &compassv1beta1.CreateAssetProbeRequest_Probe{ @@ -1439,14 +1496,21 @@ func TestCreateAssetProbe(t *testing.T) { handler := NewAPIServer(logger, mockNamespaceSvc, mockAssetSvc, nil, nil, nil, nil, mockUserSvc) - got, err := handler.CreateAssetProbe(ctx, tc.Request) - code := status.Code(err) - if code != tc.ExpectStatus { - t.Errorf("expected handler to return Code %s, returned Code %sinstead", tc.ExpectStatus.String(), code.String()) - return + got, err := handler.CreateAssetProbe(ctx, connect.NewRequest(tc.Request)) + if tc.ExpectStatus == 0 { + if err != nil { + t.Errorf("expected no error but got: %v", err) + return + } + } else { + code := connect.CodeOf(err) + if code != tc.ExpectStatus { + t.Errorf("expected handler to return Code %s, returned Code %s instead", tc.ExpectStatus.String(), code.String()) + return + } } if tc.PostCheck != nil { - if err := tc.PostCheck(got); err != nil { + if err := tc.PostCheck(got.Msg); err != nil { t.Error(err) return } diff --git a/internal/server/v1beta1/comment.go b/internal/server/v1beta1/comment.go index 1552fac6..91ed1388 100644 --- a/internal/server/v1beta1/comment.go +++ b/internal/server/v1beta1/comment.go @@ -3,75 +3,74 @@ package handlersv1beta1 import ( "context" "errors" - "github.com/raystack/compass/pkg/grpc_interceptor" "strings" "time" + "connectrpc.com/connect" "github.com/raystack/compass/core/discussion" "github.com/raystack/compass/core/user" - compassv1beta1 "github.com/raystack/compass/proto/raystack/compass/v1beta1" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/status" + "github.com/raystack/compass/pkg/server/interceptor" + compassv1beta1 "github.com/raystack/compass/proto/compassv1beta1" "google.golang.org/protobuf/types/known/timestamppb" ) // CreateComment will create a new comment of a discussion // field body is mandatory -func (server *APIServer) CreateComment(ctx context.Context, req *compassv1beta1.CreateCommentRequest) (*compassv1beta1.CreateCommentResponse, error) { - ns := grpc_interceptor.FetchNamespaceFromContext(ctx) +func (server *APIServer) CreateComment(ctx context.Context, req *connect.Request[compassv1beta1.CreateCommentRequest]) (*connect.Response[compassv1beta1.CreateCommentResponse], error) { + ns := interceptor.FetchNamespaceFromContext(ctx) userID, err := server.validateUserInCtx(ctx, ns) if err != nil { return nil, err } - if err := req.ValidateAll(); err != nil { - return nil, status.Error(codes.InvalidArgument, bodyParserErrorMsg(err)) + if err := req.Msg.ValidateAll(); err != nil { + return nil, connect.NewError(connect.CodeInvalidArgument, errors.New(bodyParserErrorMsg(err))) } - if err := server.validateIDInteger(req.DiscussionId); err != nil { - return nil, status.Error(codes.InvalidArgument, bodyParserErrorMsg(discussion.InvalidError{DiscussionID: req.DiscussionId})) + if err := server.validateIDInteger(req.Msg.DiscussionId); err != nil { + return nil, connect.NewError(connect.CodeInvalidArgument, errors.New(bodyParserErrorMsg(discussion.InvalidError{DiscussionID: req.Msg.DiscussionId}))) } cmt := discussion.Comment{ - DiscussionID: req.DiscussionId, - Body: req.Body, + DiscussionID: req.Msg.DiscussionId, + Body: req.Msg.Body, Owner: user.User{ID: userID}, UpdatedBy: user.User{ID: userID}, } if err := cmt.Validate(); err != nil { - return nil, status.Error(codes.InvalidArgument, err.Error()) + return nil, connect.NewError(connect.CodeInvalidArgument, err) } id, err := server.discussionService.CreateComment(ctx, ns, &cmt) if errors.As(err, new(discussion.NotFoundError)) { - return nil, status.Error(codes.NotFound, err.Error()) + return nil, connect.NewError(connect.CodeNotFound, err) } if err != nil { return nil, internalServerError(server.logger, err.Error()) } - return &compassv1beta1.CreateCommentResponse{Id: id}, nil + return connect.NewResponse(&compassv1beta1.CreateCommentResponse{Id: id}), nil } // GetAllComments returns all comments of a discussion -func (server *APIServer) GetAllComments(ctx context.Context, req *compassv1beta1.GetAllCommentsRequest) (*compassv1beta1.GetAllCommentsResponse, error) { - if err := req.ValidateAll(); err != nil { - return nil, status.Error(codes.InvalidArgument, bodyParserErrorMsg(err)) +func (server *APIServer) GetAllComments(ctx context.Context, req *connect.Request[compassv1beta1.GetAllCommentsRequest]) (*connect.Response[compassv1beta1.GetAllCommentsResponse], error) { + if err := req.Msg.ValidateAll(); err != nil { + return nil, connect.NewError(connect.CodeInvalidArgument, errors.New(bodyParserErrorMsg(err))) } - ns := grpc_interceptor.FetchNamespaceFromContext(ctx) + ns := interceptor.FetchNamespaceFromContext(ctx) if _, err := server.validateUserInCtx(ctx, ns); err != nil { return nil, err } - if err := server.validateIDInteger(req.DiscussionId); err != nil { - return nil, status.Error(codes.InvalidArgument, bodyParserErrorMsg(discussion.InvalidError{DiscussionID: req.DiscussionId})) + if err := server.validateIDInteger(req.Msg.DiscussionId); err != nil { + return nil, connect.NewError(connect.CodeInvalidArgument, errors.New(bodyParserErrorMsg(discussion.InvalidError{DiscussionID: req.Msg.DiscussionId}))) } - flt, err := server.buildGetAllCommentsFilter(req) + flt, err := server.buildGetAllCommentsFilter(req.Msg) if err != nil { - return nil, status.Error(codes.InvalidArgument, bodyParserErrorMsg(err)) + return nil, connect.NewError(connect.CodeInvalidArgument, errors.New(bodyParserErrorMsg(err))) } - cmts, err := server.discussionService.GetComments(ctx, req.DiscussionId, flt) + cmts, err := server.discussionService.GetComments(ctx, req.Msg.DiscussionId, flt) if err != nil { return nil, internalServerError(server.logger, err.Error()) } @@ -81,108 +80,104 @@ func (server *APIServer) GetAllComments(ctx context.Context, req *compassv1beta1 commentsProto = append(commentsProto, commentToProto(cmt)) } - return &compassv1beta1.GetAllCommentsResponse{Data: commentsProto}, nil + return connect.NewResponse(&compassv1beta1.GetAllCommentsResponse{Data: commentsProto}), nil } // GetComment returns a comment discussion by id from path -func (server *APIServer) GetComment(ctx context.Context, req *compassv1beta1.GetCommentRequest) (*compassv1beta1.GetCommentResponse, error) { - if err := req.ValidateAll(); err != nil { - return nil, status.Error(codes.InvalidArgument, bodyParserErrorMsg(err)) +func (server *APIServer) GetComment(ctx context.Context, req *connect.Request[compassv1beta1.GetCommentRequest]) (*connect.Response[compassv1beta1.GetCommentResponse], error) { + if err := req.Msg.ValidateAll(); err != nil { + return nil, connect.NewError(connect.CodeInvalidArgument, errors.New(bodyParserErrorMsg(err))) } - ns := grpc_interceptor.FetchNamespaceFromContext(ctx) + ns := interceptor.FetchNamespaceFromContext(ctx) if _, err := server.validateUserInCtx(ctx, ns); err != nil { return nil, err } - if err := server.validateIDInteger(req.DiscussionId); err != nil { - return nil, status.Error(codes.InvalidArgument, bodyParserErrorMsg(discussion.InvalidError{DiscussionID: req.DiscussionId})) + if err := server.validateIDInteger(req.Msg.DiscussionId); err != nil { + return nil, connect.NewError(connect.CodeInvalidArgument, errors.New(bodyParserErrorMsg(discussion.InvalidError{DiscussionID: req.Msg.DiscussionId}))) } - if err := server.validateIDInteger(req.Id); err != nil { - return nil, status.Error(codes.InvalidArgument, bodyParserErrorMsg(discussion.InvalidError{DiscussionID: req.DiscussionId, CommentID: req.Id})) + if err := server.validateIDInteger(req.Msg.Id); err != nil { + return nil, connect.NewError(connect.CodeInvalidArgument, errors.New(bodyParserErrorMsg(discussion.InvalidError{DiscussionID: req.Msg.DiscussionId, CommentID: req.Msg.Id}))) } - cmt, err := server.discussionService.GetComment(ctx, req.Id, req.DiscussionId) + cmt, err := server.discussionService.GetComment(ctx, req.Msg.Id, req.Msg.DiscussionId) if errors.As(err, new(discussion.NotFoundError)) { - return nil, status.Error(codes.NotFound, errMissingUserInfo.Error()) + return nil, connect.NewError(connect.CodeNotFound, err) } if err != nil { return nil, internalServerError(server.logger, err.Error()) } - return &compassv1beta1.GetCommentResponse{Data: commentToProto(cmt)}, nil + return connect.NewResponse(&compassv1beta1.GetCommentResponse{Data: commentToProto(cmt)}), nil } // UpdateComment is an api to update a comment by discussion id -func (server *APIServer) UpdateComment(ctx context.Context, req *compassv1beta1.UpdateCommentRequest) (*compassv1beta1.UpdateCommentResponse, error) { - ns := grpc_interceptor.FetchNamespaceFromContext(ctx) +func (server *APIServer) UpdateComment(ctx context.Context, req *connect.Request[compassv1beta1.UpdateCommentRequest]) (*connect.Response[compassv1beta1.UpdateCommentResponse], error) { + ns := interceptor.FetchNamespaceFromContext(ctx) userID, err := server.validateUserInCtx(ctx, ns) if err != nil { return nil, err } - if err := req.ValidateAll(); err != nil { - return nil, status.Error(codes.InvalidArgument, bodyParserErrorMsg(err)) + if err := req.Msg.ValidateAll(); err != nil { + return nil, connect.NewError(connect.CodeInvalidArgument, errors.New(bodyParserErrorMsg(err))) } - if err := req.ValidateAll(); err != nil { - return nil, status.Error(codes.InvalidArgument, bodyParserErrorMsg(err)) + if err := server.validateIDInteger(req.Msg.DiscussionId); err != nil { + return nil, connect.NewError(connect.CodeInvalidArgument, errors.New(bodyParserErrorMsg(discussion.InvalidError{DiscussionID: req.Msg.DiscussionId}))) } - if err := server.validateIDInteger(req.DiscussionId); err != nil { - return nil, status.Error(codes.InvalidArgument, bodyParserErrorMsg(discussion.InvalidError{DiscussionID: req.DiscussionId})) - } - - if err := server.validateIDInteger(req.Id); err != nil { - return nil, status.Error(codes.InvalidArgument, bodyParserErrorMsg(discussion.InvalidError{DiscussionID: req.DiscussionId, CommentID: req.Id})) + if err := server.validateIDInteger(req.Msg.Id); err != nil { + return nil, connect.NewError(connect.CodeInvalidArgument, errors.New(bodyParserErrorMsg(discussion.InvalidError{DiscussionID: req.Msg.DiscussionId, CommentID: req.Msg.Id}))) } cmt := discussion.Comment{ - ID: req.Id, - DiscussionID: req.DiscussionId, - Body: req.Body, + ID: req.Msg.Id, + DiscussionID: req.Msg.DiscussionId, + Body: req.Msg.Body, UpdatedBy: user.User{ID: userID}, } if err := cmt.Validate(); err != nil { - return nil, status.Error(codes.InvalidArgument, err.Error()) + return nil, connect.NewError(connect.CodeInvalidArgument, err) } err = server.discussionService.UpdateComment(ctx, &cmt) if errors.As(err, new(discussion.NotFoundError)) { - return nil, status.Error(codes.NotFound, err.Error()) + return nil, connect.NewError(connect.CodeNotFound, err) } if err != nil { return nil, internalServerError(server.logger, err.Error()) } - return &compassv1beta1.UpdateCommentResponse{}, nil + return connect.NewResponse(&compassv1beta1.UpdateCommentResponse{}), nil } // DeleteComment is an api to delete a comment by discussion id -func (server *APIServer) DeleteComment(ctx context.Context, req *compassv1beta1.DeleteCommentRequest) (*compassv1beta1.DeleteCommentResponse, error) { - if err := req.ValidateAll(); err != nil { - return nil, status.Error(codes.InvalidArgument, bodyParserErrorMsg(err)) +func (server *APIServer) DeleteComment(ctx context.Context, req *connect.Request[compassv1beta1.DeleteCommentRequest]) (*connect.Response[compassv1beta1.DeleteCommentResponse], error) { + if err := req.Msg.ValidateAll(); err != nil { + return nil, connect.NewError(connect.CodeInvalidArgument, errors.New(bodyParserErrorMsg(err))) } - ns := grpc_interceptor.FetchNamespaceFromContext(ctx) + ns := interceptor.FetchNamespaceFromContext(ctx) if _, err := server.validateUserInCtx(ctx, ns); err != nil { return nil, err } - if err := server.validateIDInteger(req.DiscussionId); err != nil { - return nil, status.Error(codes.InvalidArgument, bodyParserErrorMsg(discussion.InvalidError{DiscussionID: req.DiscussionId})) + if err := server.validateIDInteger(req.Msg.DiscussionId); err != nil { + return nil, connect.NewError(connect.CodeInvalidArgument, errors.New(bodyParserErrorMsg(discussion.InvalidError{DiscussionID: req.Msg.DiscussionId}))) } - if err := server.validateIDInteger(req.Id); err != nil { - return nil, status.Error(codes.InvalidArgument, bodyParserErrorMsg(discussion.InvalidError{DiscussionID: req.DiscussionId, CommentID: req.Id})) + if err := server.validateIDInteger(req.Msg.Id); err != nil { + return nil, connect.NewError(connect.CodeInvalidArgument, errors.New(bodyParserErrorMsg(discussion.InvalidError{DiscussionID: req.Msg.DiscussionId, CommentID: req.Msg.Id}))) } - err := server.discussionService.DeleteComment(ctx, req.Id, req.DiscussionId) + err := server.discussionService.DeleteComment(ctx, req.Msg.Id, req.Msg.DiscussionId) if errors.As(err, new(discussion.NotFoundError)) { - return nil, status.Error(codes.NotFound, err.Error()) + return nil, connect.NewError(connect.CodeNotFound, err) } if err != nil { return nil, internalServerError(server.logger, err.Error()) } - return &compassv1beta1.DeleteCommentResponse{}, nil + return connect.NewResponse(&compassv1beta1.DeleteCommentResponse{}), nil } func (server *APIServer) buildGetAllDiscussionsFilter(req *compassv1beta1.GetAllDiscussionsRequest) (discussion.Filter, error) { diff --git a/internal/server/v1beta1/comment_test.go b/internal/server/v1beta1/comment_test.go index 7bf212e8..f12728b3 100644 --- a/internal/server/v1beta1/comment_test.go +++ b/internal/server/v1beta1/comment_test.go @@ -4,22 +4,23 @@ import ( "context" "errors" "fmt" - "github.com/raystack/compass/core/namespace" - "github.com/raystack/compass/pkg/grpc_interceptor" "reflect" "testing" "time" + "connectrpc.com/connect" "github.com/google/go-cmp/cmp" "github.com/google/uuid" "github.com/raystack/compass/core/discussion" + "github.com/raystack/compass/core/namespace" "github.com/raystack/compass/core/user" "github.com/raystack/compass/internal/server/v1beta1/mocks" - compassv1beta1 "github.com/raystack/compass/proto/raystack/compass/v1beta1" + "github.com/raystack/compass/pkg/server/interceptor" + compassv1beta1 "github.com/raystack/compass/proto/compassv1beta1" log "github.com/raystack/salt/observability/logger" "github.com/stretchr/testify/mock" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/status" + + "google.golang.org/protobuf/testing/protocmp" "google.golang.org/protobuf/types/known/timestamppb" ) @@ -41,11 +42,11 @@ func TestCreateComment(t *testing.T) { } ) ctx := user.NewContext(context.Background(), user.User{UUID: userUUID}) - ctx = grpc_interceptor.BuildContextWithNamespace(ctx, ns) + ctx = interceptor.BuildContextWithNamespace(ctx, ns) type TestCase struct { Description string Request *compassv1beta1.CreateCommentRequest - ExpectStatus codes.Code + ExpectStatus connect.Code Result string Setup func(context.Context, *mocks.DiscussionService, *mocks.NamespaceService) } @@ -56,7 +57,7 @@ func TestCreateComment(t *testing.T) { Request: &compassv1beta1.CreateCommentRequest{ DiscussionId: discussionID, }, - ExpectStatus: codes.InvalidArgument, + ExpectStatus: connect.CodeInvalidArgument, Setup: func(ctx context.Context, ds *mocks.DiscussionService, nss *mocks.NamespaceService) { }, }, @@ -66,7 +67,7 @@ func TestCreateComment(t *testing.T) { DiscussionId: "test", Body: validRequest.Body, }, - ExpectStatus: codes.InvalidArgument, + ExpectStatus: connect.CodeInvalidArgument, Setup: func(ctx context.Context, ds *mocks.DiscussionService, nss *mocks.NamespaceService) { }, }, @@ -76,7 +77,7 @@ func TestCreateComment(t *testing.T) { DiscussionId: "0", Body: validRequest.Body, }, - ExpectStatus: codes.InvalidArgument, + ExpectStatus: connect.CodeInvalidArgument, Setup: func(ctx context.Context, ds *mocks.DiscussionService, nss *mocks.NamespaceService) { }, }, @@ -86,7 +87,7 @@ func TestCreateComment(t *testing.T) { DiscussionId: validRequest.GetDiscussionId(), Body: validRequest.GetBody(), }, - ExpectStatus: codes.Internal, + ExpectStatus: connect.CodeInternal, Setup: func(ctx context.Context, ds *mocks.DiscussionService, nss *mocks.NamespaceService) { expectedErr := errors.New("unknown error") ds.EXPECT().CreateComment(ctx, ns, mock.AnythingOfType("*discussion.Comment")).Return("", expectedErr) @@ -98,7 +99,7 @@ func TestCreateComment(t *testing.T) { DiscussionId: validRequest.GetDiscussionId(), Body: validRequest.GetBody(), }, - ExpectStatus: codes.OK, + ExpectStatus: 0, Setup: func(ctx context.Context, ds *mocks.DiscussionService, nss *mocks.NamespaceService) { ds.EXPECT().CreateComment(ctx, ns, mock.AnythingOfType("*discussion.Comment")).Return("", nil) }, @@ -122,14 +123,21 @@ func TestCreateComment(t *testing.T) { handler := NewAPIServer(logger, mockNamespaceSvc, nil, nil, mockSvc, nil, nil, mockUserSvc) - got, err := handler.CreateComment(ctx, tc.Request) - code := status.Code(err) - if code != tc.ExpectStatus { - t.Errorf("expected handler to return Code %s, returned Code %sinstead", tc.ExpectStatus.String(), code.String()) - return + got, err := handler.CreateComment(ctx, connect.NewRequest(tc.Request)) + if tc.ExpectStatus == 0 { + if err != nil { + t.Errorf("expected no error but got: %v", err) + return + } + } else { + code := connect.CodeOf(err) + if code != tc.ExpectStatus { + t.Errorf("expected handler to return Code %s, returned Code %s instead", tc.ExpectStatus.String(), code.String()) + return + } } - if got.GetId() != tc.Result { - t.Errorf("expected result to return id %s, returned id %s instead", tc.Result, got.Id) + if err == nil && got != nil && got.Msg.GetId() != tc.Result { + t.Errorf("expected result to return id %s, returned id %s instead", tc.Result, got.Msg.Id) return } }) @@ -149,11 +157,11 @@ func TestGetAllComments(t *testing.T) { } ) ctx := user.NewContext(context.Background(), user.User{UUID: userUUID}) - ctx = grpc_interceptor.BuildContextWithNamespace(ctx, ns) + ctx = interceptor.BuildContextWithNamespace(ctx, ns) type testCase struct { Description string Request *compassv1beta1.GetAllCommentsRequest - ExpectStatus codes.Code + ExpectStatus connect.Code Setup func(context.Context, *mocks.DiscussionService, *mocks.NamespaceService) PostCheck func(resp *compassv1beta1.GetAllCommentsResponse) error } @@ -163,7 +171,7 @@ func TestGetAllComments(t *testing.T) { Request: &compassv1beta1.GetAllCommentsRequest{ DiscussionId: "test", }, - ExpectStatus: codes.InvalidArgument, + ExpectStatus: connect.CodeInvalidArgument, Setup: func(ctx context.Context, ds *mocks.DiscussionService, nss *mocks.NamespaceService) { }, }, @@ -172,7 +180,7 @@ func TestGetAllComments(t *testing.T) { Request: &compassv1beta1.GetAllCommentsRequest{ DiscussionId: "0", }, - ExpectStatus: codes.InvalidArgument, + ExpectStatus: connect.CodeInvalidArgument, Setup: func(ctx context.Context, ds *mocks.DiscussionService, nss *mocks.NamespaceService) { }, }, @@ -181,7 +189,7 @@ func TestGetAllComments(t *testing.T) { Request: &compassv1beta1.GetAllCommentsRequest{ DiscussionId: discussionID, }, - ExpectStatus: codes.Internal, + ExpectStatus: connect.CodeInternal, Setup: func(ctx context.Context, ds *mocks.DiscussionService, nss *mocks.NamespaceService) { ds.EXPECT().GetComments(ctx, discussionID, discussion.Filter{ Type: "all", @@ -200,7 +208,7 @@ func TestGetAllComments(t *testing.T) { Size: 30, Offset: 50, }, - ExpectStatus: codes.OK, + ExpectStatus: 0, Setup: func(ctx context.Context, ds *mocks.DiscussionService, nss *mocks.NamespaceService) { ds.EXPECT().GetComments(ctx, discussionID, discussion.Filter{ Type: "all", @@ -217,7 +225,7 @@ func TestGetAllComments(t *testing.T) { Request: &compassv1beta1.GetAllCommentsRequest{ DiscussionId: discussionID, }, - ExpectStatus: codes.OK, + ExpectStatus: 0, Setup: func(ctx context.Context, ds *mocks.DiscussionService, nss *mocks.NamespaceService) { ds.EXPECT().GetComments(ctx, discussionID, discussion.Filter{ Type: "all", @@ -261,14 +269,21 @@ func TestGetAllComments(t *testing.T) { handler := NewAPIServer(logger, mockNamespaceSvc, nil, nil, mockSvc, nil, nil, mockUserSvc) - got, err := handler.GetAllComments(ctx, tc.Request) - code := status.Code(err) - if code != tc.ExpectStatus { - t.Errorf("expected handler to return Code %s, returned Code %sinstead", tc.ExpectStatus.String(), code.String()) - return + got, err := handler.GetAllComments(ctx, connect.NewRequest(tc.Request)) + if tc.ExpectStatus == 0 { + if err != nil { + t.Errorf("expected no error but got: %v", err) + return + } + } else { + code := connect.CodeOf(err) + if code != tc.ExpectStatus { + t.Errorf("expected handler to return Code %s, returned Code %s instead", tc.ExpectStatus.String(), code.String()) + return + } } if tc.PostCheck != nil { - if err := tc.PostCheck(got); err != nil { + if err := tc.PostCheck(got.Msg); err != nil { t.Error(err) return } @@ -291,18 +306,18 @@ func TestGetComment(t *testing.T) { } ) ctx := user.NewContext(context.Background(), user.User{UUID: userUUID}) - ctx = grpc_interceptor.BuildContextWithNamespace(ctx, ns) + ctx = interceptor.BuildContextWithNamespace(ctx, ns) type testCase struct { Description string Request *compassv1beta1.GetCommentRequest - ExpectStatus codes.Code + ExpectStatus connect.Code Setup func(context.Context, *mocks.DiscussionService, *mocks.NamespaceService) PostCheck func(resp *compassv1beta1.GetCommentResponse) error } var testCases = []testCase{ { Description: `should return internal server error if fetching fails`, - ExpectStatus: codes.Internal, + ExpectStatus: connect.CodeInternal, Request: &compassv1beta1.GetCommentRequest{ Id: commentID, DiscussionId: discussionID, @@ -313,7 +328,7 @@ func TestGetComment(t *testing.T) { }, { Description: `should return invalid argument if discussion id not integer`, - ExpectStatus: codes.InvalidArgument, + ExpectStatus: connect.CodeInvalidArgument, Request: &compassv1beta1.GetCommentRequest{ Id: commentID, DiscussionId: "random", @@ -323,7 +338,7 @@ func TestGetComment(t *testing.T) { }, { Description: `should return invalid argument if discussion id < 0`, - ExpectStatus: codes.InvalidArgument, + ExpectStatus: connect.CodeInvalidArgument, Request: &compassv1beta1.GetCommentRequest{ Id: commentID, DiscussionId: "-1", @@ -333,7 +348,7 @@ func TestGetComment(t *testing.T) { }, { Description: `should return invalid argument if comment id not integer`, - ExpectStatus: codes.InvalidArgument, + ExpectStatus: connect.CodeInvalidArgument, Request: &compassv1beta1.GetCommentRequest{ Id: "random", DiscussionId: discussionID, @@ -343,7 +358,7 @@ func TestGetComment(t *testing.T) { }, { Description: `should return invalid argument if comment id < 0`, - ExpectStatus: codes.InvalidArgument, + ExpectStatus: connect.CodeInvalidArgument, Request: &compassv1beta1.GetCommentRequest{ Id: "-1", DiscussionId: discussionID, @@ -353,7 +368,7 @@ func TestGetComment(t *testing.T) { }, { Description: `should return Not Found if comment or discussion not found`, - ExpectStatus: codes.NotFound, + ExpectStatus: connect.CodeNotFound, Request: &compassv1beta1.GetCommentRequest{ Id: commentID, DiscussionId: discussionID, @@ -364,7 +379,7 @@ func TestGetComment(t *testing.T) { }, { Description: "should return status OK along with comment of a discussion", - ExpectStatus: codes.OK, + ExpectStatus: 0, Request: &compassv1beta1.GetCommentRequest{ Id: commentID, DiscussionId: discussionID, @@ -404,14 +419,21 @@ func TestGetComment(t *testing.T) { handler := NewAPIServer(logger, mockNamespaceSvc, nil, nil, mockSvc, nil, nil, mockUserSvc) - got, err := handler.GetComment(ctx, tc.Request) - code := status.Code(err) - if code != tc.ExpectStatus { - t.Errorf("expected handler to return Code %s, returned Code %sinstead", tc.ExpectStatus.String(), code.String()) - return + got, err := handler.GetComment(ctx, connect.NewRequest(tc.Request)) + if tc.ExpectStatus == 0 { + if err != nil { + t.Errorf("expected no error but got: %v", err) + return + } + } else { + code := connect.CodeOf(err) + if code != tc.ExpectStatus { + t.Errorf("expected handler to return Code %s, returned Code %s instead", tc.ExpectStatus.String(), code.String()) + return + } } if tc.PostCheck != nil { - if err := tc.PostCheck(got); err != nil { + if err := tc.PostCheck(got.Msg); err != nil { t.Error(err) return } @@ -434,7 +456,7 @@ func TestUpdateComment(t *testing.T) { } ) ctx := user.NewContext(context.Background(), user.User{UUID: userUUID}) - ctx = grpc_interceptor.BuildContextWithNamespace(ctx, ns) + ctx = interceptor.BuildContextWithNamespace(ctx, ns) var validRequest = &compassv1beta1.UpdateCommentRequest{ Id: commentID, DiscussionId: discussionID, @@ -443,7 +465,7 @@ func TestUpdateComment(t *testing.T) { testCases := []struct { Description string Request *compassv1beta1.UpdateCommentRequest - ExpectStatus codes.Code + ExpectStatus connect.Code Setup func(context.Context, *mocks.DiscussionService, *mocks.NamespaceService) }{ { @@ -452,7 +474,7 @@ func TestUpdateComment(t *testing.T) { Id: commentID, DiscussionId: "random", }, - ExpectStatus: codes.InvalidArgument, + ExpectStatus: connect.CodeInvalidArgument, }, { Description: "discussion id is < 0 return bad request", @@ -460,7 +482,7 @@ func TestUpdateComment(t *testing.T) { Id: commentID, DiscussionId: "-1", }, - ExpectStatus: codes.InvalidArgument, + ExpectStatus: connect.CodeInvalidArgument, }, { Description: "comment id is not integer return bad request", @@ -468,7 +490,7 @@ func TestUpdateComment(t *testing.T) { Id: "random", DiscussionId: discussionID, }, - ExpectStatus: codes.InvalidArgument, + ExpectStatus: connect.CodeInvalidArgument, }, { Description: "comment id is < 0 return bad request", @@ -476,7 +498,7 @@ func TestUpdateComment(t *testing.T) { Id: "-1", DiscussionId: discussionID, }, - ExpectStatus: codes.InvalidArgument, + ExpectStatus: connect.CodeInvalidArgument, Setup: func(ctx context.Context, ds *mocks.DiscussionService, nss *mocks.NamespaceService) { }, }, @@ -486,7 +508,7 @@ func TestUpdateComment(t *testing.T) { Id: commentID, DiscussionId: discussionID, }, - ExpectStatus: codes.InvalidArgument, + ExpectStatus: connect.CodeInvalidArgument, }, { Description: "empty body return bad request", @@ -495,12 +517,12 @@ func TestUpdateComment(t *testing.T) { DiscussionId: discussionID, Body: "", }, - ExpectStatus: codes.InvalidArgument, + ExpectStatus: connect.CodeInvalidArgument, }, { Description: "should return internal server error if the update comment failed", Request: validRequest, - ExpectStatus: codes.Internal, + ExpectStatus: connect.CodeInternal, Setup: func(ctx context.Context, ds *mocks.DiscussionService, nss *mocks.NamespaceService) { cmt := &discussion.Comment{ ID: validRequest.Id, @@ -515,7 +537,7 @@ func TestUpdateComment(t *testing.T) { { Description: "should return Not Found if the discussion id or comment id not found", Request: validRequest, - ExpectStatus: codes.NotFound, + ExpectStatus: connect.CodeNotFound, Setup: func(ctx context.Context, ds *mocks.DiscussionService, nss *mocks.NamespaceService) { cmt := &discussion.Comment{ ID: validRequest.Id, @@ -530,7 +552,7 @@ func TestUpdateComment(t *testing.T) { { Description: "should return status OK if the comment is successfully updated", Request: validRequest, - ExpectStatus: codes.OK, + ExpectStatus: 0, Setup: func(ctx context.Context, ds *mocks.DiscussionService, nss *mocks.NamespaceService) { cmt := &discussion.Comment{ ID: validRequest.Id, @@ -559,11 +581,18 @@ func TestUpdateComment(t *testing.T) { mockUserSvc.EXPECT().ValidateUser(ctx, ns, userUUID, "").Return(userID, nil) handler := NewAPIServer(logger, mockNamespaceSvc, nil, nil, mockSvc, nil, nil, mockUserSvc) - _, err := handler.UpdateComment(ctx, tc.Request) - code := status.Code(err) - if code != tc.ExpectStatus { - t.Errorf("expected handler to return Code %s, returned Code %sinstead", tc.ExpectStatus, code.String()) - return + _, err := handler.UpdateComment(ctx, connect.NewRequest(tc.Request)) + if tc.ExpectStatus == 0 { + if err != nil { + t.Errorf("expected no error but got: %v", err) + return + } + } else { + code := connect.CodeOf(err) + if code != tc.ExpectStatus { + t.Errorf("expected handler to return Code %s, returned Code %s instead", tc.ExpectStatus.String(), code.String()) + return + } } }) } @@ -583,16 +612,16 @@ func TestDeleteComment(t *testing.T) { } ) ctx := user.NewContext(context.Background(), user.User{UUID: userUUID}) - ctx = grpc_interceptor.BuildContextWithNamespace(ctx, ns) + ctx = interceptor.BuildContextWithNamespace(ctx, ns) testCases := []struct { Description string Request *compassv1beta1.DeleteCommentRequest - ExpectStatus codes.Code + ExpectStatus connect.Code Setup func(context.Context, *mocks.DiscussionService, *mocks.NamespaceService) }{ { Description: "discussion id is not integer return bad request", - ExpectStatus: codes.InvalidArgument, + ExpectStatus: connect.CodeInvalidArgument, Request: &compassv1beta1.DeleteCommentRequest{ Id: commentID, DiscussionId: "random", @@ -600,7 +629,7 @@ func TestDeleteComment(t *testing.T) { }, { Description: "discussion id is < 0 return bad request", - ExpectStatus: codes.InvalidArgument, + ExpectStatus: connect.CodeInvalidArgument, Request: &compassv1beta1.DeleteCommentRequest{ Id: commentID, DiscussionId: "-1", @@ -608,7 +637,7 @@ func TestDeleteComment(t *testing.T) { }, { Description: "comment id is not integer return bad request", - ExpectStatus: codes.InvalidArgument, + ExpectStatus: connect.CodeInvalidArgument, Request: &compassv1beta1.DeleteCommentRequest{ Id: "random", DiscussionId: discussionID, @@ -616,7 +645,7 @@ func TestDeleteComment(t *testing.T) { }, { Description: "comment id is < 0 return bad request", - ExpectStatus: codes.InvalidArgument, + ExpectStatus: connect.CodeInvalidArgument, Request: &compassv1beta1.DeleteCommentRequest{ Id: "-1", DiscussionId: discussionID, @@ -624,7 +653,7 @@ func TestDeleteComment(t *testing.T) { }, { Description: "should return internal server error if the delete comment failed", - ExpectStatus: codes.Internal, + ExpectStatus: connect.CodeInternal, Request: &compassv1beta1.DeleteCommentRequest{ Id: commentID, DiscussionId: discussionID, @@ -636,7 +665,7 @@ func TestDeleteComment(t *testing.T) { }, { Description: "should return invalid argument if the discussion id or comment id not found", - ExpectStatus: codes.NotFound, + ExpectStatus: connect.CodeNotFound, Request: &compassv1beta1.DeleteCommentRequest{ Id: commentID, DiscussionId: discussionID, @@ -648,7 +677,7 @@ func TestDeleteComment(t *testing.T) { }, { Description: "should return OK if the comment is successfully deleted", - ExpectStatus: codes.OK, + ExpectStatus: 0, Request: &compassv1beta1.DeleteCommentRequest{ Id: commentID, DiscussionId: discussionID, @@ -676,11 +705,18 @@ func TestDeleteComment(t *testing.T) { handler := NewAPIServer(logger, mockNamespaceSvc, nil, nil, mockSvc, nil, nil, mockUserSvc) - _, err := handler.DeleteComment(ctx, tc.Request) - code := status.Code(err) - if code != tc.ExpectStatus { - t.Errorf("expected handler to return Code %s, returned Code %sinstead", tc.ExpectStatus.String(), code.String()) - return + _, err := handler.DeleteComment(ctx, connect.NewRequest(tc.Request)) + if tc.ExpectStatus == 0 { + if err != nil { + t.Errorf("expected no error but got: %v", err) + return + } + } else { + code := connect.CodeOf(err) + if code != tc.ExpectStatus { + t.Errorf("expected handler to return Code %s, returned Code %s instead", tc.ExpectStatus.String(), code.String()) + return + } } }) } diff --git a/internal/server/v1beta1/discussion.go b/internal/server/v1beta1/discussion.go index e23c85dc..cb979988 100644 --- a/internal/server/v1beta1/discussion.go +++ b/internal/server/v1beta1/discussion.go @@ -4,16 +4,15 @@ package handlersv1beta1 import ( "context" "errors" - "github.com/raystack/compass/core/namespace" - "github.com/raystack/compass/pkg/grpc_interceptor" "strconv" "time" + "connectrpc.com/connect" "github.com/raystack/compass/core/discussion" + "github.com/raystack/compass/core/namespace" "github.com/raystack/compass/core/user" - compassv1beta1 "github.com/raystack/compass/proto/raystack/compass/v1beta1" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/status" + "github.com/raystack/compass/pkg/server/interceptor" + compassv1beta1 "github.com/raystack/compass/proto/compassv1beta1" "google.golang.org/protobuf/types/known/timestamppb" ) @@ -33,17 +32,17 @@ type DiscussionService interface { // supported query params are type,state,owner,assignee,asset,labels (supporterd array separated by comma) // query params sort,direction to sort asc or desc // query params size,offset for pagination -func (server *APIServer) GetAllDiscussions(ctx context.Context, req *compassv1beta1.GetAllDiscussionsRequest) (*compassv1beta1.GetAllDiscussionsResponse, error) { - if err := req.ValidateAll(); err != nil { - return nil, status.Error(codes.InvalidArgument, bodyParserErrorMsg(err)) +func (server *APIServer) GetAllDiscussions(ctx context.Context, req *connect.Request[compassv1beta1.GetAllDiscussionsRequest]) (*connect.Response[compassv1beta1.GetAllDiscussionsResponse], error) { + if err := req.Msg.ValidateAll(); err != nil { + return nil, connect.NewError(connect.CodeInvalidArgument, errors.New(bodyParserErrorMsg(err))) } - ns := grpc_interceptor.FetchNamespaceFromContext(ctx) + ns := interceptor.FetchNamespaceFromContext(ctx) if _, err := server.validateUserInCtx(ctx, ns); err != nil { return nil, err } - flt, err := server.buildGetAllDiscussionsFilter(req) + flt, err := server.buildGetAllDiscussionsFilter(req.Msg) if err != nil { - return nil, status.Error(codes.InvalidArgument, bodyParserErrorMsg(err)) + return nil, connect.NewError(connect.CodeInvalidArgument, errors.New(bodyParserErrorMsg(err))) } dscs, err := server.discussionService.GetDiscussions(ctx, flt) @@ -56,34 +55,34 @@ func (server *APIServer) GetAllDiscussions(ctx context.Context, req *compassv1be discussionsProto = append(discussionsProto, discussionToProto(dsc)) } - return &compassv1beta1.GetAllDiscussionsResponse{Data: discussionsProto}, nil + return connect.NewResponse(&compassv1beta1.GetAllDiscussionsResponse{Data: discussionsProto}), nil } // CreateDiscussion will create a new discussion // field title, body, and type are mandatory -func (server *APIServer) CreateDiscussion(ctx context.Context, req *compassv1beta1.CreateDiscussionRequest) (*compassv1beta1.CreateDiscussionResponse, error) { - ns := grpc_interceptor.FetchNamespaceFromContext(ctx) +func (server *APIServer) CreateDiscussion(ctx context.Context, req *connect.Request[compassv1beta1.CreateDiscussionRequest]) (*connect.Response[compassv1beta1.CreateDiscussionResponse], error) { + ns := interceptor.FetchNamespaceFromContext(ctx) userID, err := server.validateUserInCtx(ctx, ns) if err != nil { return nil, err } - if err := req.ValidateAll(); err != nil { - return nil, status.Error(codes.InvalidArgument, bodyParserErrorMsg(err)) + if err := req.Msg.ValidateAll(); err != nil { + return nil, connect.NewError(connect.CodeInvalidArgument, errors.New(bodyParserErrorMsg(err))) } dsc := discussion.Discussion{ - Title: req.Title, - Body: req.Body, - Type: discussion.Type(req.Type), - State: discussion.GetStateEnum(req.State), - Labels: req.GetLabels(), - Assets: req.Assets, - Assignees: req.Assignees, + Title: req.Msg.Title, + Body: req.Msg.Body, + Type: discussion.Type(req.Msg.Type), + State: discussion.GetStateEnum(req.Msg.State), + Labels: req.Msg.GetLabels(), + Assets: req.Msg.Assets, + Assignees: req.Msg.Assignees, Owner: user.User{ID: userID}, } if err := dsc.Validate(); err != nil { - return nil, status.Error(codes.InvalidArgument, err.Error()) + return nil, connect.NewError(connect.CodeInvalidArgument, err) } id, err := server.discussionService.CreateDiscussion(ctx, ns, &dsc) @@ -91,79 +90,79 @@ func (server *APIServer) CreateDiscussion(ctx context.Context, req *compassv1bet return nil, internalServerError(server.logger, err.Error()) } - return &compassv1beta1.CreateDiscussionResponse{Id: id}, nil + return connect.NewResponse(&compassv1beta1.CreateDiscussionResponse{Id: id}), nil } -func (server *APIServer) GetDiscussion(ctx context.Context, req *compassv1beta1.GetDiscussionRequest) (*compassv1beta1.GetDiscussionResponse, error) { - if err := req.ValidateAll(); err != nil { - return nil, status.Error(codes.InvalidArgument, bodyParserErrorMsg(err)) +func (server *APIServer) GetDiscussion(ctx context.Context, req *connect.Request[compassv1beta1.GetDiscussionRequest]) (*connect.Response[compassv1beta1.GetDiscussionResponse], error) { + if err := req.Msg.ValidateAll(); err != nil { + return nil, connect.NewError(connect.CodeInvalidArgument, errors.New(bodyParserErrorMsg(err))) } - ns := grpc_interceptor.FetchNamespaceFromContext(ctx) + ns := interceptor.FetchNamespaceFromContext(ctx) if _, err := server.validateUserInCtx(ctx, ns); err != nil { return nil, err } - if err := server.validateIDInteger(req.Id); err != nil { - return nil, status.Error(codes.InvalidArgument, bodyParserErrorMsg(discussion.ErrInvalidID)) + if err := server.validateIDInteger(req.Msg.Id); err != nil { + return nil, connect.NewError(connect.CodeInvalidArgument, errors.New(bodyParserErrorMsg(discussion.ErrInvalidID))) } - dsc, err := server.discussionService.GetDiscussion(ctx, req.Id) + dsc, err := server.discussionService.GetDiscussion(ctx, req.Msg.Id) if errors.As(err, new(discussion.NotFoundError)) { - return nil, status.Error(codes.NotFound, err.Error()) + return nil, connect.NewError(connect.CodeNotFound, err) } if err != nil { return nil, internalServerError(server.logger, err.Error()) } - return &compassv1beta1.GetDiscussionResponse{Data: discussionToProto(dsc)}, nil + return connect.NewResponse(&compassv1beta1.GetDiscussionResponse{Data: discussionToProto(dsc)}), nil } // PatchDiscussion updates a specific field in discussion // empty array in assets,labels,assignees will be considered // and clear all assets,labels,assignees from the discussion -func (server *APIServer) PatchDiscussion(ctx context.Context, req *compassv1beta1.PatchDiscussionRequest) (*compassv1beta1.PatchDiscussionResponse, error) { - if err := req.ValidateAll(); err != nil { - return nil, status.Error(codes.InvalidArgument, bodyParserErrorMsg(err)) +func (server *APIServer) PatchDiscussion(ctx context.Context, req *connect.Request[compassv1beta1.PatchDiscussionRequest]) (*connect.Response[compassv1beta1.PatchDiscussionResponse], error) { + if err := req.Msg.ValidateAll(); err != nil { + return nil, connect.NewError(connect.CodeInvalidArgument, errors.New(bodyParserErrorMsg(err))) } - ns := grpc_interceptor.FetchNamespaceFromContext(ctx) + ns := interceptor.FetchNamespaceFromContext(ctx) if _, err := server.validateUserInCtx(ctx, ns); err != nil { return nil, err } - if err := server.validateIDInteger(req.Id); err != nil { - return nil, status.Error(codes.InvalidArgument, bodyParserErrorMsg(discussion.ErrInvalidID)) + if err := server.validateIDInteger(req.Msg.Id); err != nil { + return nil, connect.NewError(connect.CodeInvalidArgument, errors.New(bodyParserErrorMsg(discussion.ErrInvalidID))) } dsc := discussion.Discussion{ - ID: req.GetId(), - Title: req.GetTitle(), - Body: req.GetBody(), - Type: discussion.Type(req.GetType()), - State: discussion.State(req.GetState()), - Labels: req.GetLabels(), - Assets: req.GetAssets(), - Assignees: req.GetAssignees(), + ID: req.Msg.GetId(), + Title: req.Msg.GetTitle(), + Body: req.Msg.GetBody(), + Type: discussion.Type(req.Msg.GetType()), + State: discussion.State(req.Msg.GetState()), + Labels: req.Msg.GetLabels(), + Assets: req.Msg.GetAssets(), + Assignees: req.Msg.GetAssignees(), } if isEmpty := dsc.IsEmpty(); isEmpty { err := errors.New("empty discussion body") - return nil, status.Error(codes.InvalidArgument, bodyParserErrorMsg(err)) + return nil, connect.NewError(connect.CodeInvalidArgument, errors.New(bodyParserErrorMsg(err))) } if err := dsc.ValidateConstraint(); err != nil { - return nil, status.Error(codes.InvalidArgument, err.Error()) + return nil, connect.NewError(connect.CodeInvalidArgument, err) } err := server.discussionService.PatchDiscussion(ctx, &dsc) if errors.Is(err, discussion.ErrInvalidID) { - return nil, status.Error(codes.InvalidArgument, err.Error()) + return nil, connect.NewError(connect.CodeInvalidArgument, err) } if errors.As(err, new(discussion.NotFoundError)) { - return nil, status.Error(codes.NotFound, err.Error()) + return nil, connect.NewError(connect.CodeNotFound, err) } if err != nil { return nil, internalServerError(server.logger, err.Error()) } - return &compassv1beta1.PatchDiscussionResponse{}, nil + return connect.NewResponse(&compassv1beta1.PatchDiscussionResponse{}), nil } func (server *APIServer) validateIDInteger(id string) error { diff --git a/internal/server/v1beta1/discussion_test.go b/internal/server/v1beta1/discussion_test.go index d45f9130..dd2a1e8b 100644 --- a/internal/server/v1beta1/discussion_test.go +++ b/internal/server/v1beta1/discussion_test.go @@ -4,23 +4,24 @@ import ( "context" "errors" "fmt" - "github.com/raystack/compass/core/namespace" - "github.com/raystack/compass/pkg/grpc_interceptor" "reflect" "testing" "time" + "connectrpc.com/connect" "github.com/google/go-cmp/cmp" "github.com/google/uuid" "github.com/raystack/compass/core/discussion" + "github.com/raystack/compass/core/namespace" "github.com/raystack/compass/core/user" "github.com/raystack/compass/internal/server/v1beta1/mocks" - compassv1beta1 "github.com/raystack/compass/proto/raystack/compass/v1beta1" + "github.com/raystack/compass/pkg/server/interceptor" + compassv1beta1 "github.com/raystack/compass/proto/compassv1beta1" log "github.com/raystack/salt/observability/logger" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/status" + + "google.golang.org/protobuf/testing/protocmp" "google.golang.org/protobuf/types/known/timestamppb" ) @@ -37,12 +38,12 @@ func TestGetAllDiscussions(t *testing.T) { } ) ctx := user.NewContext(context.Background(), user.User{UUID: userUUID}) - ctx = grpc_interceptor.BuildContextWithNamespace(ctx, ns) + ctx = interceptor.BuildContextWithNamespace(ctx, ns) type testCase struct { Description string Request *compassv1beta1.GetAllDiscussionsRequest Setup func(context.Context, *mocks.DiscussionService, *mocks.NamespaceService) - ExpectStatus codes.Code + ExpectStatus connect.Code PostCheck func(resp *compassv1beta1.GetAllDiscussionsResponse) error } @@ -57,7 +58,7 @@ func TestGetAllDiscussions(t *testing.T) { SortDirection: "desc", }).Return([]discussion.Discussion{}, errors.New("unknown error")) }, - ExpectStatus: codes.Internal, + ExpectStatus: connect.CodeInternal, }, { Description: `should parse querystring to get filter`, @@ -87,7 +88,7 @@ func TestGetAllDiscussions(t *testing.T) { Offset: 50, }).Return([]discussion.Discussion{}, nil) }, - ExpectStatus: codes.OK, + ExpectStatus: 0, }, { Description: "should return status OK along with list of discussions", @@ -115,7 +116,7 @@ func TestGetAllDiscussions(t *testing.T) { } return nil }, - ExpectStatus: codes.OK, + ExpectStatus: 0, }, } @@ -136,14 +137,21 @@ func TestGetAllDiscussions(t *testing.T) { handler := NewAPIServer(logger, mockNamespaceSvc, nil, nil, mockSvc, nil, nil, mockUserSvc) - got, err := handler.GetAllDiscussions(ctx, tc.Request) - code := status.Code(err) - if code != tc.ExpectStatus { - t.Errorf("expected handler to return Code %s, returned Code %sinstead", code.String(), tc.ExpectStatus.String()) - return + got, err := handler.GetAllDiscussions(ctx, connect.NewRequest(tc.Request)) + if tc.ExpectStatus == 0 { + if err != nil { + t.Errorf("expected no error but got: %v", err) + return + } + } else { + code := connect.CodeOf(err) + if code != tc.ExpectStatus { + t.Errorf("expected handler to return Code %s, returned Code %s instead", tc.ExpectStatus.String(), code.String()) + return + } } if tc.PostCheck != nil { - if err := tc.PostCheck(got); err != nil { + if err := tc.PostCheck(got.Msg); err != nil { assert.Error(t, err) return } @@ -164,7 +172,7 @@ func TestCreateDiscussion(t *testing.T) { } ) ctx := user.NewContext(context.Background(), user.User{UUID: userUUID}) - ctx = grpc_interceptor.BuildContextWithNamespace(ctx, ns) + ctx = interceptor.BuildContextWithNamespace(ctx, ns) var validRequest = &compassv1beta1.CreateDiscussionRequest{ Title: "Lorem Ipsum", Body: "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.", @@ -175,14 +183,14 @@ func TestCreateDiscussion(t *testing.T) { Description string Request *compassv1beta1.CreateDiscussionRequest Setup func(context.Context, *mocks.DiscussionService, *mocks.NamespaceService) - ExpectStatus codes.Code + ExpectStatus connect.Code } var testCases = []testCase{ { Description: "should return invalid argument if empty object", Request: &compassv1beta1.CreateDiscussionRequest{}, - ExpectStatus: codes.InvalidArgument, + ExpectStatus: connect.CodeInvalidArgument, }, { Description: "should return invalid argument if empty title", @@ -190,7 +198,7 @@ func TestCreateDiscussion(t *testing.T) { Body: "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.", Type: discussion.TypeQAndA.String(), }, - ExpectStatus: codes.InvalidArgument, + ExpectStatus: connect.CodeInvalidArgument, }, { Description: "should return invalid argument if no body", @@ -198,7 +206,7 @@ func TestCreateDiscussion(t *testing.T) { Title: "Lorem Ipsum", Type: discussion.TypeQAndA.String(), }, - ExpectStatus: codes.InvalidArgument, + ExpectStatus: connect.CodeInvalidArgument, }, { Description: "should return invalid argument if empty body", @@ -207,7 +215,7 @@ func TestCreateDiscussion(t *testing.T) { Body: "", Type: discussion.TypeQAndA.String(), }, - ExpectStatus: codes.InvalidArgument, + ExpectStatus: connect.CodeInvalidArgument, }, { Description: "should return invalid argument if wrong type", @@ -216,12 +224,12 @@ func TestCreateDiscussion(t *testing.T) { Body: "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.", Type: "wrongtype", }, - ExpectStatus: codes.InvalidArgument, + ExpectStatus: connect.CodeInvalidArgument, }, { Description: "should return internal server error if the discussion creation fails", Request: validRequest, - ExpectStatus: codes.Internal, + ExpectStatus: connect.CodeInternal, Setup: func(ctx context.Context, ds *mocks.DiscussionService, nss *mocks.NamespaceService) { ds.EXPECT().CreateDiscussion(ctx, ns, mock.AnythingOfType("*discussion.Discussion")).Return("", errors.New("some error")) }, @@ -233,12 +241,12 @@ func TestCreateDiscussion(t *testing.T) { Body: "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.", Type: "", }, - ExpectStatus: codes.InvalidArgument, + ExpectStatus: connect.CodeInvalidArgument, }, { Description: "should return OK and discussion ID if the discussion is successfully created", Request: validRequest, - ExpectStatus: codes.OK, + ExpectStatus: 0, Setup: func(ctx context.Context, ds *mocks.DiscussionService, nss *mocks.NamespaceService) { dsc := discussion.Discussion{ Title: "Lorem Ipsum", @@ -272,11 +280,18 @@ func TestCreateDiscussion(t *testing.T) { mockUserSvc.EXPECT().ValidateUser(ctx, ns, userUUID, "").Return(userID, nil) handler := NewAPIServer(logger, mockNamespaceSvc, nil, nil, mockSvc, nil, nil, mockUserSvc) - _, err := handler.CreateDiscussion(ctx, tc.Request) - code := status.Code(err) - if code != tc.ExpectStatus { - t.Errorf("expected handler to return Code %s, returned Code %sinstead", tc.ExpectStatus.String(), code.String()) - return + _, err := handler.CreateDiscussion(ctx, connect.NewRequest(tc.Request)) + if tc.ExpectStatus == 0 { + if err != nil { + t.Errorf("expected no error but got: %v", err) + return + } + } else { + code := connect.CodeOf(err) + if code != tc.ExpectStatus { + t.Errorf("expected handler to return Code %s, returned Code %s instead", tc.ExpectStatus.String(), code.String()) + return + } } }) } @@ -295,19 +310,19 @@ func TestGetDiscussion(t *testing.T) { } ) ctx := user.NewContext(context.Background(), user.User{UUID: userUUID}) - ctx = grpc_interceptor.BuildContextWithNamespace(ctx, ns) + ctx = interceptor.BuildContextWithNamespace(ctx, ns) type TestCase struct { Description string Request *compassv1beta1.GetDiscussionRequest Setup func(context.Context, *mocks.DiscussionService, *mocks.NamespaceService) - ExpectStatus codes.Code + ExpectStatus connect.Code PostCheck func(resp *compassv1beta1.GetDiscussionResponse) error } var testCases = []TestCase{ { Description: `should return internal server error if fetching fails`, - ExpectStatus: codes.Internal, + ExpectStatus: connect.CodeInternal, Request: &compassv1beta1.GetDiscussionRequest{ Id: discussionID, }, @@ -317,21 +332,21 @@ func TestGetDiscussion(t *testing.T) { }, { Description: `should return invalid argument if discussion id not integer`, - ExpectStatus: codes.InvalidArgument, + ExpectStatus: connect.CodeInvalidArgument, Request: &compassv1beta1.GetDiscussionRequest{ Id: "random", }, }, { Description: `should return invalid argument if discussion id < 0`, - ExpectStatus: codes.InvalidArgument, + ExpectStatus: connect.CodeInvalidArgument, Request: &compassv1beta1.GetDiscussionRequest{ Id: "-1", }, }, { Description: `should return not found if discussion not found`, - ExpectStatus: codes.NotFound, + ExpectStatus: connect.CodeNotFound, Request: &compassv1beta1.GetDiscussionRequest{ Id: discussionID, }, @@ -341,7 +356,7 @@ func TestGetDiscussion(t *testing.T) { }, { Description: "should return status OK along with discussions", - ExpectStatus: codes.OK, + ExpectStatus: 0, Request: &compassv1beta1.GetDiscussionRequest{ Id: discussionID, }, @@ -379,14 +394,21 @@ func TestGetDiscussion(t *testing.T) { mockUserSvc.EXPECT().ValidateUser(ctx, ns, userUUID, "").Return(userID, nil) handler := NewAPIServer(logger, mockNamespaceSvc, nil, nil, mockSvc, nil, nil, mockUserSvc) - got, err := handler.GetDiscussion(ctx, tc.Request) - code := status.Code(err) - if code != tc.ExpectStatus { - t.Errorf("expected handler to return Code %s, returned Code %sinstead", code.String(), tc.ExpectStatus.String()) - return + got, err := handler.GetDiscussion(ctx, connect.NewRequest(tc.Request)) + if tc.ExpectStatus == 0 { + if err != nil { + t.Errorf("expected no error but got: %v", err) + return + } + } else { + code := connect.CodeOf(err) + if code != tc.ExpectStatus { + t.Errorf("expected handler to return Code %s, returned Code %s instead", tc.ExpectStatus.String(), code.String()) + return + } } if tc.PostCheck != nil { - if err := tc.PostCheck(got); err != nil { + if err := tc.PostCheck(got.Msg); err != nil { assert.Error(t, err) return } @@ -408,13 +430,13 @@ func TestPatchDiscussion(t *testing.T) { } ) ctx := user.NewContext(context.Background(), user.User{UUID: userUUID}) - ctx = grpc_interceptor.BuildContextWithNamespace(ctx, ns) + ctx = interceptor.BuildContextWithNamespace(ctx, ns) var validRequest = &compassv1beta1.PatchDiscussionRequest{Id: discussionID, Title: "lorem ipsum"} type TestCase struct { Description string Request *compassv1beta1.PatchDiscussionRequest - ExpectStatus codes.Code + ExpectStatus connect.Code Setup func(context.Context, *mocks.DiscussionService, *mocks.NamespaceService) } @@ -424,21 +446,21 @@ func TestPatchDiscussion(t *testing.T) { Request: &compassv1beta1.PatchDiscussionRequest{ Id: "random", }, - ExpectStatus: codes.InvalidArgument, + ExpectStatus: connect.CodeInvalidArgument, }, { Description: "should return invalid argument if discussion id is < 0 return invalid argument", Request: &compassv1beta1.PatchDiscussionRequest{ Id: "-1", }, - ExpectStatus: codes.InvalidArgument, + ExpectStatus: connect.CodeInvalidArgument, }, { Description: "should return invalid argument if empty object return invalid argument", Request: &compassv1beta1.PatchDiscussionRequest{ Id: discussionID, }, - ExpectStatus: codes.InvalidArgument, + ExpectStatus: connect.CodeInvalidArgument, }, { Description: "should return invalid argument if invalid type return invalid argument", @@ -446,7 +468,7 @@ func TestPatchDiscussion(t *testing.T) { Id: discussionID, Type: "random", }, - ExpectStatus: codes.InvalidArgument, + ExpectStatus: connect.CodeInvalidArgument, }, { Description: "should return invalid argument if invalid state return invalid argument", @@ -454,7 +476,7 @@ func TestPatchDiscussion(t *testing.T) { Id: discussionID, State: "random", }, - ExpectStatus: codes.InvalidArgument, + ExpectStatus: connect.CodeInvalidArgument, }, { Description: "should return invalid argument if assignees more than limit should return invalid argument", @@ -462,7 +484,7 @@ func TestPatchDiscussion(t *testing.T) { Id: discussionID, Assignees: []string{"1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11"}, }, - ExpectStatus: codes.InvalidArgument, + ExpectStatus: connect.CodeInvalidArgument, }, { Description: "should return invalid argument if assets more than limit should return invalid argument", @@ -470,7 +492,7 @@ func TestPatchDiscussion(t *testing.T) { Id: discussionID, Assets: []string{"1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11"}, }, - ExpectStatus: codes.InvalidArgument, + ExpectStatus: connect.CodeInvalidArgument, }, { Description: "should return invalid argument if labels more than limit should return invalid argument", @@ -478,12 +500,12 @@ func TestPatchDiscussion(t *testing.T) { Id: discussionID, Labels: []string{"1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11"}, }, - ExpectStatus: codes.InvalidArgument, + ExpectStatus: connect.CodeInvalidArgument, }, { Description: "should return internal server error if the discussion patch fails", Request: validRequest, - ExpectStatus: codes.Internal, + ExpectStatus: connect.CodeInternal, Setup: func(ctx context.Context, ds *mocks.DiscussionService, nss *mocks.NamespaceService) { expectedErr := errors.New("unknown error") ds.EXPECT().PatchDiscussion(ctx, mock.AnythingOfType("*discussion.Discussion")).Return(expectedErr) @@ -492,7 +514,7 @@ func TestPatchDiscussion(t *testing.T) { { Description: "should return Not Found if the discussion id is invalid", Request: validRequest, - ExpectStatus: codes.NotFound, + ExpectStatus: connect.CodeNotFound, Setup: func(ctx context.Context, ds *mocks.DiscussionService, nss *mocks.NamespaceService) { expectedErr := discussion.NotFoundError{DiscussionID: discussionID} ds.EXPECT().PatchDiscussion(ctx, mock.AnythingOfType("*discussion.Discussion")).Return(expectedErr) @@ -501,7 +523,7 @@ func TestPatchDiscussion(t *testing.T) { { Description: "should return OK if the discussion is successfully patched", Request: validRequest, - ExpectStatus: codes.OK, + ExpectStatus: 0, Setup: func(ctx context.Context, ds *mocks.DiscussionService, nss *mocks.NamespaceService) { ds.EXPECT().PatchDiscussion(ctx, mock.AnythingOfType("*discussion.Discussion")).Return(nil) }, @@ -524,11 +546,18 @@ func TestPatchDiscussion(t *testing.T) { mockUserSvc.EXPECT().ValidateUser(ctx, ns, userUUID, "").Return(userID, nil) handler := NewAPIServer(logger, mockNamespaceSvc, nil, nil, mockSvc, nil, nil, mockUserSvc) - _, err := handler.PatchDiscussion(ctx, tc.Request) - code := status.Code(err) - if code != tc.ExpectStatus { - t.Errorf("expected handler to return Code %s, returned Code %sinstead", tc.ExpectStatus.String(), code.String()) - return + _, err := handler.PatchDiscussion(ctx, connect.NewRequest(tc.Request)) + if tc.ExpectStatus == 0 { + if err != nil { + t.Errorf("expected no error but got: %v", err) + return + } + } else { + code := connect.CodeOf(err) + if code != tc.ExpectStatus { + t.Errorf("expected handler to return Code %s, returned Code %s instead", tc.ExpectStatus.String(), code.String()) + return + } } }) } diff --git a/internal/server/v1beta1/lineage.go b/internal/server/v1beta1/lineage.go index 6ea0f358..51afc944 100644 --- a/internal/server/v1beta1/lineage.go +++ b/internal/server/v1beta1/lineage.go @@ -2,41 +2,41 @@ package handlersv1beta1 import ( "context" + "errors" "fmt" - "github.com/raystack/compass/pkg/grpc_interceptor" + "connectrpc.com/connect" "github.com/raystack/compass/core/asset" - compassv1beta1 "github.com/raystack/compass/proto/raystack/compass/v1beta1" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/status" + "github.com/raystack/compass/pkg/server/interceptor" + compassv1beta1 "github.com/raystack/compass/proto/compassv1beta1" "google.golang.org/protobuf/types/known/structpb" ) -func (server *APIServer) GetGraph(ctx context.Context, req *compassv1beta1.GetGraphRequest) (*compassv1beta1.GetGraphResponse, error) { - if err := req.ValidateAll(); err != nil { - return nil, status.Error(codes.InvalidArgument, bodyParserErrorMsg(err)) +func (server *APIServer) GetGraph(ctx context.Context, req *connect.Request[compassv1beta1.GetGraphRequest]) (*connect.Response[compassv1beta1.GetGraphResponse], error) { + if err := req.Msg.ValidateAll(); err != nil { + return nil, connect.NewError(connect.CodeInvalidArgument, errors.New(bodyParserErrorMsg(err))) } - ns := grpc_interceptor.FetchNamespaceFromContext(ctx) + ns := interceptor.FetchNamespaceFromContext(ctx) if _, err := server.validateUserInCtx(ctx, ns); err != nil { return nil, err } - direction := asset.LineageDirection(req.GetDirection()) + direction := asset.LineageDirection(req.Msg.GetDirection()) if !direction.IsValid() { - return nil, status.Error(codes.InvalidArgument, "invalid direction value") + return nil, connect.NewError(connect.CodeInvalidArgument, errors.New("invalid direction value")) } // Default to true for backward compatibility withAttributes := true - if req.WithAttributes != nil { - withAttributes = *req.WithAttributes + if req.Msg.WithAttributes != nil { + withAttributes = *req.Msg.WithAttributes } - lineage, err := server.assetService.GetLineage(ctx, req.GetUrn(), asset.LineageQuery{ - Level: int(req.GetLevel()), + lineage, err := server.assetService.GetLineage(ctx, req.Msg.GetUrn(), asset.LineageQuery{ + Level: int(req.Msg.GetLevel()), Direction: direction, WithAttributes: withAttributes, - IncludeDeleted: req.GetIncludeDeleted(), + IncludeDeleted: req.Msg.GetIncludeDeleted(), }) if err != nil { return nil, internalServerError(server.logger, err.Error()) @@ -63,10 +63,10 @@ func (server *APIServer) GetGraph(ctx context.Context, req *compassv1beta1.GetGr } } - return &compassv1beta1.GetGraphResponse{ + return connect.NewResponse(&compassv1beta1.GetGraphResponse{ Data: edges, NodeAttrs: nodeAttrs, - }, nil + }), nil } func lineageEdgeToProto(e asset.LineageEdge) (*compassv1beta1.LineageEdge, error) { diff --git a/internal/server/v1beta1/lineage_test.go b/internal/server/v1beta1/lineage_test.go index 4ee485ff..ccd44c55 100644 --- a/internal/server/v1beta1/lineage_test.go +++ b/internal/server/v1beta1/lineage_test.go @@ -2,20 +2,21 @@ package handlersv1beta1 import ( "context" - "github.com/raystack/compass/core/namespace" - "github.com/raystack/compass/pkg/grpc_interceptor" "testing" "time" + "connectrpc.com/connect" "github.com/google/go-cmp/cmp" "github.com/google/uuid" "github.com/raystack/compass/core/asset" + "github.com/raystack/compass/core/namespace" "github.com/raystack/compass/core/user" "github.com/raystack/compass/internal/server/v1beta1/mocks" - compassv1beta1 "github.com/raystack/compass/proto/raystack/compass/v1beta1" + "github.com/raystack/compass/pkg/server/interceptor" + compassv1beta1 "github.com/raystack/compass/proto/compassv1beta1" log "github.com/raystack/salt/observability/logger" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/status" + + "google.golang.org/protobuf/testing/protocmp" "google.golang.org/protobuf/types/known/timestamppb" ) @@ -33,7 +34,7 @@ func TestGetLineageGraph(t *testing.T) { } ) ctx := user.NewContext(context.Background(), user.User{UUID: userUUID}) - ctx = grpc_interceptor.BuildContextWithNamespace(ctx, ns) + ctx = interceptor.BuildContextWithNamespace(ctx, ns) t.Run("get Lineage", func(t *testing.T) { t.Run("should return a graph containing the requested resource, along with it's related resources", func(t *testing.T) { logger := log.NewNoop() @@ -74,14 +75,13 @@ func TestGetLineageGraph(t *testing.T) { handler := NewAPIServer(logger, mockNamespaceSvc, mockSvc, nil, nil, nil, nil, mockUserSvc) - got, err := handler.GetGraph(ctx, &compassv1beta1.GetGraphRequest{ + got, err := handler.GetGraph(ctx, connect.NewRequest(&compassv1beta1.GetGraphRequest{ Urn: nodeURN, Level: uint32(level), Direction: string(direction), - }) - code := status.Code(err) - if code != codes.OK { - t.Errorf("expected handler to return Code %s, returned Code %s instead", codes.OK, code.String()) + })) + if err != nil { + t.Errorf("expected no error but got: %v", err) return } @@ -113,8 +113,8 @@ func TestGetLineageGraph(t *testing.T) { }, }, } - if diff := cmp.Diff(got, expected, protocmp.Transform()); diff != "" { - t.Errorf("expected: %+v\ngot: %+v\ndiff: %s\n", expected, got, diff) + if diff := cmp.Diff(got.Msg, expected, protocmp.Transform()); diff != "" { + t.Errorf("expected: %+v\ngot: %+v\ndiff: %s\n", expected, got.Msg, diff) } }) diff --git a/internal/server/v1beta1/namespace.go b/internal/server/v1beta1/namespace.go index 54bcc3ac..bb52ab9e 100644 --- a/internal/server/v1beta1/namespace.go +++ b/internal/server/v1beta1/namespace.go @@ -4,11 +4,12 @@ package handlersv1beta1 import ( "context" + "errors" + + "connectrpc.com/connect" "github.com/google/uuid" "github.com/raystack/compass/core/namespace" - compassv1beta1 "github.com/raystack/compass/proto/raystack/compass/v1beta1" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/status" + compassv1beta1 "github.com/raystack/compass/proto/compassv1beta1" "google.golang.org/protobuf/types/known/structpb" ) @@ -20,97 +21,113 @@ type NamespaceService interface { List(ctx context.Context) ([]*namespace.Namespace, error) } -func (server *APIServer) ListNamespaces(ctx context.Context, req *compassv1beta1.ListNamespacesRequest) (*compassv1beta1.ListNamespacesResponse, error) { +func (server *APIServer) ListNamespaces(ctx context.Context, req *connect.Request[compassv1beta1.ListNamespacesRequest]) (*connect.Response[compassv1beta1.ListNamespacesResponse], error) { namespaces, err := server.namespaceService.List(ctx) if err != nil { - return nil, status.Error(codes.Internal, err.Error()) + return nil, connect.NewError(connect.CodeInternal, err) } var protoNamespaces []*compassv1beta1.Namespace for _, ns := range namespaces { protoNamespace, err := namespaceToProto(ns) if err != nil { - return nil, status.Error(codes.Internal, err.Error()) + return nil, connect.NewError(connect.CodeInternal, err) } protoNamespaces = append(protoNamespaces, protoNamespace) } - return &compassv1beta1.ListNamespacesResponse{ + return connect.NewResponse(&compassv1beta1.ListNamespacesResponse{ Namespaces: protoNamespaces, - }, nil + }), nil } -func (server *APIServer) GetNamespace(ctx context.Context, req *compassv1beta1.GetNamespaceRequest) (*compassv1beta1.GetNamespaceResponse, error) { +func (server *APIServer) GetNamespace(ctx context.Context, req *connect.Request[compassv1beta1.GetNamespaceRequest]) (*connect.Response[compassv1beta1.GetNamespaceResponse], error) { + if req.Msg.GetUrn() == "" { + return nil, connect.NewError(connect.CodeInvalidArgument, errors.New("urn is required")) + } + var ns *namespace.Namespace - if nsID, err := uuid.Parse(req.GetUrn()); err == nil { - if ns, err = server.namespaceService.GetByID(ctx, nsID); err != nil { - return nil, status.Error(codes.NotFound, err.Error()) + if nsID, err := uuid.Parse(req.Msg.GetUrn()); err == nil { + ns, err = server.namespaceService.GetByID(ctx, nsID) + if err != nil { + if errors.Is(err, namespace.ErrNotFound) { + return nil, connect.NewError(connect.CodeNotFound, err) + } + return nil, connect.NewError(connect.CodeInternal, err) } } else { - if ns, err = server.namespaceService.GetByName(ctx, req.GetUrn()); err != nil { - return nil, status.Error(codes.NotFound, err.Error()) + ns, err = server.namespaceService.GetByName(ctx, req.Msg.GetUrn()) + if err != nil { + if errors.Is(err, namespace.ErrNotFound) { + return nil, connect.NewError(connect.CodeNotFound, err) + } + return nil, connect.NewError(connect.CodeInternal, err) } } protoNamespace, err := namespaceToProto(ns) if err != nil { - return nil, status.Error(codes.Internal, err.Error()) + return nil, connect.NewError(connect.CodeInternal, err) } - return &compassv1beta1.GetNamespaceResponse{ + return connect.NewResponse(&compassv1beta1.GetNamespaceResponse{ Namespace: protoNamespace, - }, nil + }), nil } -func (server *APIServer) CreateNamespace(ctx context.Context, req *compassv1beta1.CreateNamespaceRequest) (*compassv1beta1.CreateNamespaceResponse, error) { - if err := req.Validate(); err != nil { - return nil, status.Error(codes.InvalidArgument, err.Error()) +func (server *APIServer) CreateNamespace(ctx context.Context, req *connect.Request[compassv1beta1.CreateNamespaceRequest]) (*connect.Response[compassv1beta1.CreateNamespaceResponse], error) { + if err := req.Msg.Validate(); err != nil { + return nil, connect.NewError(connect.CodeInvalidArgument, err) } var metadata map[string]interface{} - if req.GetMetadata() != nil { - metadata = req.GetMetadata().AsMap() + if req.Msg.GetMetadata() != nil { + metadata = req.Msg.GetMetadata().AsMap() } namespaceID := uuid.New() - if id, err := uuid.Parse(req.GetId()); err == nil { + if id, err := uuid.Parse(req.Msg.GetId()); err == nil { namespaceID = id } ns := &namespace.Namespace{ ID: namespaceID, - Name: req.GetName(), - State: namespace.State(req.GetState()), + Name: req.Msg.GetName(), + State: namespace.State(req.Msg.GetState()), Metadata: metadata, } nsID, err := server.namespaceService.Create(ctx, ns) if err != nil { - return nil, status.Error(codes.Internal, err.Error()) + return nil, connect.NewError(connect.CodeInternal, err) } - return &compassv1beta1.CreateNamespaceResponse{ + return connect.NewResponse(&compassv1beta1.CreateNamespaceResponse{ Id: nsID, - }, nil + }), nil } -func (server *APIServer) UpdateNamespace(ctx context.Context, req *compassv1beta1.UpdateNamespaceRequest) (*compassv1beta1.UpdateNamespaceResponse, error) { +func (server *APIServer) UpdateNamespace(ctx context.Context, req *connect.Request[compassv1beta1.UpdateNamespaceRequest]) (*connect.Response[compassv1beta1.UpdateNamespaceResponse], error) { + if req.Msg.GetUrn() == "" { + return nil, connect.NewError(connect.CodeInvalidArgument, errors.New("urn is required")) + } + var nsID uuid.UUID var nsName string - if id, err := uuid.Parse(req.GetUrn()); err == nil { + if id, err := uuid.Parse(req.Msg.GetUrn()); err == nil { nsID = id } else { - nsName = req.GetUrn() + nsName = req.Msg.GetUrn() } var metadata map[string]interface{} - if req.GetMetadata() != nil { - metadata = req.GetMetadata().AsMap() + if req.Msg.GetMetadata() != nil { + metadata = req.Msg.GetMetadata().AsMap() } ns := &namespace.Namespace{ ID: nsID, Name: nsName, - State: namespace.State(req.GetState()), + State: namespace.State(req.Msg.GetState()), Metadata: metadata, } if err := server.namespaceService.Update(ctx, ns); err != nil { - return nil, status.Error(codes.Internal, err.Error()) + return nil, connect.NewError(connect.CodeInternal, err) } - return &compassv1beta1.UpdateNamespaceResponse{}, nil + return connect.NewResponse(&compassv1beta1.UpdateNamespaceResponse{}), nil } func namespaceToProto(ns *namespace.Namespace) (*compassv1beta1.Namespace, error) { diff --git a/internal/server/v1beta1/namespace_test.go b/internal/server/v1beta1/namespace_test.go index 5f485769..c02e87d8 100644 --- a/internal/server/v1beta1/namespace_test.go +++ b/internal/server/v1beta1/namespace_test.go @@ -3,18 +3,20 @@ package handlersv1beta1 import ( "context" "errors" + "testing" + + "connectrpc.com/connect" "github.com/google/uuid" "github.com/raystack/compass/core/namespace" "github.com/raystack/compass/core/user" "github.com/raystack/compass/internal/server/v1beta1/mocks" - compassv1beta1 "github.com/raystack/compass/proto/raystack/compass/v1beta1" + compassv1beta1 "github.com/raystack/compass/proto/compassv1beta1" log "github.com/raystack/salt/observability/logger" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/status" + + "google.golang.org/protobuf/types/known/structpb" - "testing" ) func TestAPIServer_ListNamespaces(t *testing.T) { @@ -38,7 +40,7 @@ func TestAPIServer_ListNamespaces(t *testing.T) { type testCase struct { name string Request *compassv1beta1.ListNamespacesRequest - ExpectStatus codes.Code + ExpectStatus connect.Code Setup func(context.Context, *mocks.NamespaceService) PostCheck func(resp *compassv1beta1.ListNamespacesResponse) error } @@ -46,7 +48,7 @@ func TestAPIServer_ListNamespaces(t *testing.T) { { name: "list namespace items successfully", Request: &compassv1beta1.ListNamespacesRequest{}, - ExpectStatus: codes.OK, + ExpectStatus: 0, Setup: func(ctx context.Context, nss *mocks.NamespaceService) { nss.EXPECT().List(ctx).Return(mockedNamespaces, nil) }, @@ -71,14 +73,21 @@ func TestAPIServer_ListNamespaces(t *testing.T) { handler := NewAPIServer(logger, mockNamespaceSvc, nil, nil, nil, nil, nil, mockUserSvc) - got, err := handler.ListNamespaces(ctx, tc.Request) - code := status.Code(err) - if code != tc.ExpectStatus { - t.Errorf("expected handler to return Code %s, returned Code %sinstead", tc.ExpectStatus.String(), code.String()) - return + got, err := handler.ListNamespaces(ctx, connect.NewRequest(tc.Request)) + if tc.ExpectStatus == 0 { + if err != nil { + t.Errorf("expected no error but got: %v", err) + return + } + } else { + code := connect.CodeOf(err) + if code != tc.ExpectStatus { + t.Errorf("expected handler to return Code %s, returned Code %s instead", tc.ExpectStatus.String(), code.String()) + return + } } if tc.PostCheck != nil { - if err := tc.PostCheck(got); err != nil { + if err := tc.PostCheck(got.Msg); err != nil { t.Error(err) return } @@ -102,7 +111,7 @@ func TestAPIServer_GetNamespaces(t *testing.T) { type testCase struct { name string Request *compassv1beta1.GetNamespaceRequest - ExpectStatus codes.Code + ExpectStatus connect.Code Setup func(context.Context, *mocks.NamespaceService) PostCheck func(resp *compassv1beta1.GetNamespaceResponse) error } @@ -112,7 +121,7 @@ func TestAPIServer_GetNamespaces(t *testing.T) { Request: &compassv1beta1.GetNamespaceRequest{ Urn: mockedNamespaces[0].ID.String(), }, - ExpectStatus: codes.OK, + ExpectStatus: 0, Setup: func(ctx context.Context, nss *mocks.NamespaceService) { nss.EXPECT().GetByID(ctx, mockedNamespaces[0].ID).Return(mockedNamespaces[0], nil) }, @@ -127,7 +136,7 @@ func TestAPIServer_GetNamespaces(t *testing.T) { Request: &compassv1beta1.GetNamespaceRequest{ Urn: mockedNamespaces[0].Name, }, - ExpectStatus: codes.OK, + ExpectStatus: 0, Setup: func(ctx context.Context, nss *mocks.NamespaceService) { nss.EXPECT().GetByName(ctx, mockedNamespaces[0].Name).Return(mockedNamespaces[0], nil) }, @@ -153,14 +162,21 @@ func TestAPIServer_GetNamespaces(t *testing.T) { handler := NewAPIServer(logger, mockNamespaceSvc, nil, nil, nil, nil, nil, mockUserSvc) - got, err := handler.GetNamespace(ctx, tc.Request) - code := status.Code(err) - if code != tc.ExpectStatus { - t.Errorf("expected handler to return Code %s, returned Code %sinstead", tc.ExpectStatus.String(), code.String()) - return + got, err := handler.GetNamespace(ctx, connect.NewRequest(tc.Request)) + if tc.ExpectStatus == 0 { + if err != nil { + t.Errorf("expected no error but got: %v", err) + return + } + } else { + code := connect.CodeOf(err) + if code != tc.ExpectStatus { + t.Errorf("expected handler to return Code %s, returned Code %s instead", tc.ExpectStatus.String(), code.String()) + return + } } if tc.PostCheck != nil { - if err := tc.PostCheck(got); err != nil { + if err := tc.PostCheck(got.Msg); err != nil { t.Error(err) return } @@ -189,7 +205,7 @@ func TestAPIServer_CreateNamespaces(t *testing.T) { type testCase struct { name string Request *compassv1beta1.CreateNamespaceRequest - ExpectStatus codes.Code + ExpectStatus connect.Code Setup func(context.Context, *mocks.NamespaceService) PostCheck func(resp *compassv1beta1.CreateNamespaceResponse) error } @@ -201,7 +217,7 @@ func TestAPIServer_CreateNamespaces(t *testing.T) { State: mockedNamespaces[0].State.String(), Metadata: mockedNamespace0Meta, }, - ExpectStatus: codes.OK, + ExpectStatus: 0, Setup: func(ctx context.Context, nss *mocks.NamespaceService) { nss.EXPECT().Create(ctx, mock.AnythingOfType("*namespace.Namespace")).Return(mockedNamespaces[0].ID.String(), nil) }, @@ -217,7 +233,7 @@ func TestAPIServer_CreateNamespaces(t *testing.T) { State: mockedNamespaces[0].State.String(), Metadata: mockedNamespace0Meta, }, - ExpectStatus: codes.Internal, + ExpectStatus: connect.CodeInternal, Setup: func(ctx context.Context, nss *mocks.NamespaceService) { nss.EXPECT().Create(ctx, mock.AnythingOfType("*namespace.Namespace")).Return("", errors.New("already exists")) }, @@ -238,14 +254,21 @@ func TestAPIServer_CreateNamespaces(t *testing.T) { handler := NewAPIServer(logger, mockNamespaceSvc, nil, nil, nil, nil, nil, mockUserSvc) - got, err := handler.CreateNamespace(ctx, tc.Request) - code := status.Code(err) - if code != tc.ExpectStatus { - t.Errorf("expected handler to return Code %s, returned Code %sinstead", tc.ExpectStatus.String(), code.String()) - return + got, err := handler.CreateNamespace(ctx, connect.NewRequest(tc.Request)) + if tc.ExpectStatus == 0 { + if err != nil { + t.Errorf("expected no error but got: %v", err) + return + } + } else { + code := connect.CodeOf(err) + if code != tc.ExpectStatus { + t.Errorf("expected handler to return Code %s, returned Code %s instead", tc.ExpectStatus.String(), code.String()) + return + } } if tc.PostCheck != nil { - if err := tc.PostCheck(got); err != nil { + if err := tc.PostCheck(got.Msg); err != nil { t.Error(err) return } @@ -269,7 +292,7 @@ func TestAPIServer_UpdateNamespaces(t *testing.T) { type testCase struct { name string Request *compassv1beta1.UpdateNamespaceRequest - ExpectStatus codes.Code + ExpectStatus connect.Code Setup func(context.Context, *mocks.NamespaceService) PostCheck func(resp *compassv1beta1.UpdateNamespaceResponse) error } @@ -281,7 +304,7 @@ func TestAPIServer_UpdateNamespaces(t *testing.T) { State: mockedNamespaces[0].State.String(), Metadata: nil, }, - ExpectStatus: codes.OK, + ExpectStatus: 0, Setup: func(ctx context.Context, nss *mocks.NamespaceService) { nss.EXPECT().Update(ctx, &namespace.Namespace{ ID: mockedNamespaces[0].ID, @@ -307,14 +330,21 @@ func TestAPIServer_UpdateNamespaces(t *testing.T) { handler := NewAPIServer(logger, mockNamespaceSvc, nil, nil, nil, nil, nil, mockUserSvc) - got, err := handler.UpdateNamespace(ctx, tc.Request) - code := status.Code(err) - if code != tc.ExpectStatus { - t.Errorf("expected handler to return Code %s, returned Code %sinstead", tc.ExpectStatus.String(), code.String()) - return + got, err := handler.UpdateNamespace(ctx, connect.NewRequest(tc.Request)) + if tc.ExpectStatus == 0 { + if err != nil { + t.Errorf("expected no error but got: %v", err) + return + } + } else { + code := connect.CodeOf(err) + if code != tc.ExpectStatus { + t.Errorf("expected handler to return Code %s, returned Code %s instead", tc.ExpectStatus.String(), code.String()) + return + } } if tc.PostCheck != nil { - if err := tc.PostCheck(got); err != nil { + if err := tc.PostCheck(got.Msg); err != nil { t.Error(err) return } diff --git a/internal/server/v1beta1/search.go b/internal/server/v1beta1/search.go index dc8177da..dfc09f64 100644 --- a/internal/server/v1beta1/search.go +++ b/internal/server/v1beta1/search.go @@ -5,31 +5,30 @@ import ( "fmt" "strings" + "connectrpc.com/connect" "github.com/raystack/compass/core/asset" - "github.com/raystack/compass/pkg/grpc_interceptor" - compassv1beta1 "github.com/raystack/compass/proto/raystack/compass/v1beta1" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/status" + "github.com/raystack/compass/pkg/server/interceptor" + compassv1beta1 "github.com/raystack/compass/proto/compassv1beta1" ) -func (server *APIServer) SearchAssets(ctx context.Context, req *compassv1beta1.SearchAssetsRequest) (*compassv1beta1.SearchAssetsResponse, error) { - if err := req.ValidateAll(); err != nil { - return nil, status.Error(codes.InvalidArgument, bodyParserErrorMsg(err)) +func (server *APIServer) SearchAssets(ctx context.Context, req *connect.Request[compassv1beta1.SearchAssetsRequest]) (*connect.Response[compassv1beta1.SearchAssetsResponse], error) { + if err := req.Msg.ValidateAll(); err != nil { + return nil, connect.NewError(connect.CodeInvalidArgument, fmt.Errorf("%s", bodyParserErrorMsg(err))) } - ns := grpc_interceptor.FetchNamespaceFromContext(ctx) + ns := interceptor.FetchNamespaceFromContext(ctx) if _, err := server.validateUserInCtx(ctx, ns); err != nil { return nil, err } cfg := asset.SearchConfig{ - Text: strings.TrimSpace(req.GetText()), - MaxResults: int(req.GetSize()), - Offset: int(req.GetOffset()), - Filters: filterConfigFromValues(req.GetFilter()), - RankBy: req.GetRankby(), - Queries: req.GetQuery(), - IncludeFields: req.GetIncludeFields(), - Flags: getSearchFlagsFromProto(req.GetFlags()), + Text: strings.TrimSpace(req.Msg.GetText()), + MaxResults: int(req.Msg.GetSize()), + Offset: int(req.Msg.GetOffset()), + Filters: filterConfigFromValues(req.Msg.GetFilter()), + RankBy: req.Msg.GetRankby(), + Queries: req.Msg.GetQuery(), + IncludeFields: req.Msg.GetIncludeFields(), + Flags: getSearchFlagsFromProto(req.Msg.GetFlags()), Namespace: ns, } @@ -47,23 +46,23 @@ func (server *APIServer) SearchAssets(ctx context.Context, req *compassv1beta1.S assetsPB = append(assetsPB, assetPB) } - return &compassv1beta1.SearchAssetsResponse{ + return connect.NewResponse(&compassv1beta1.SearchAssetsResponse{ Data: assetsPB, - }, nil + }), nil } -func (server *APIServer) SuggestAssets(ctx context.Context, req *compassv1beta1.SuggestAssetsRequest) (*compassv1beta1.SuggestAssetsResponse, error) { - if err := req.ValidateAll(); err != nil { - return nil, status.Error(codes.InvalidArgument, bodyParserErrorMsg(err)) +func (server *APIServer) SuggestAssets(ctx context.Context, req *connect.Request[compassv1beta1.SuggestAssetsRequest]) (*connect.Response[compassv1beta1.SuggestAssetsResponse], error) { + if err := req.Msg.ValidateAll(); err != nil { + return nil, connect.NewError(connect.CodeInvalidArgument, fmt.Errorf("%s", bodyParserErrorMsg(err))) } - ns := grpc_interceptor.FetchNamespaceFromContext(ctx) + ns := interceptor.FetchNamespaceFromContext(ctx) if _, err := server.validateUserInCtx(ctx, ns); err != nil { return nil, err } - text := strings.TrimSpace(req.GetText()) + text := strings.TrimSpace(req.Msg.GetText()) if text == "" { - return nil, status.Error(codes.InvalidArgument, "'text' must be specified") + return nil, connect.NewError(connect.CodeInvalidArgument, fmt.Errorf("'text' must be specified")) } cfg := asset.SearchConfig{ @@ -75,29 +74,29 @@ func (server *APIServer) SuggestAssets(ctx context.Context, req *compassv1beta1. return nil, internalServerError(server.logger, err.Error()) } - return &compassv1beta1.SuggestAssetsResponse{ + return connect.NewResponse(&compassv1beta1.SuggestAssetsResponse{ Data: suggestions, - }, nil + }), nil } -func (server *APIServer) GroupAssets(ctx context.Context, req *compassv1beta1.GroupAssetsRequest) (*compassv1beta1.GroupAssetsResponse, error) { - if err := req.ValidateAll(); err != nil { - return nil, status.Error(codes.InvalidArgument, bodyParserErrorMsg(err)) +func (server *APIServer) GroupAssets(ctx context.Context, req *connect.Request[compassv1beta1.GroupAssetsRequest]) (*connect.Response[compassv1beta1.GroupAssetsResponse], error) { + if err := req.Msg.ValidateAll(); err != nil { + return nil, connect.NewError(connect.CodeInvalidArgument, fmt.Errorf("%s", bodyParserErrorMsg(err))) } - ns := grpc_interceptor.FetchNamespaceFromContext(ctx) + ns := interceptor.FetchNamespaceFromContext(ctx) if _, err := server.validateUserInCtx(ctx, ns); err != nil { return nil, err } - if len(req.GetGroupby()) == 0 { - return nil, status.Error(codes.InvalidArgument, "groupby must be specified") + if len(req.Msg.GetGroupby()) == 0 { + return nil, connect.NewError(connect.CodeInvalidArgument, fmt.Errorf("groupby must be specified")) } cfg := asset.GroupConfig{ - GroupBy: req.GetGroupby(), - Filters: filterConfigFromValues(req.GetFilter()), - IncludeFields: req.GetIncludeFields(), - Size: int(req.GetSize()), + GroupBy: req.Msg.GetGroupby(), + Filters: filterConfigFromValues(req.Msg.GetFilter()), + IncludeFields: req.Msg.GetIncludeFields(), + Size: int(req.Msg.GetSize()), Namespace: ns, } @@ -129,9 +128,9 @@ func (server *APIServer) GroupAssets(ctx context.Context, req *compassv1beta1.Gr }) } - return &compassv1beta1.GroupAssetsResponse{ + return connect.NewResponse(&compassv1beta1.GroupAssetsResponse{ AssetGroups: groups, - }, nil + }), nil } func getSearchFlagsFromProto(flags *compassv1beta1.SearchFlags) asset.SearchFlags { diff --git a/internal/server/v1beta1/search_test.go b/internal/server/v1beta1/search_test.go index a132cf15..d2e72ff5 100644 --- a/internal/server/v1beta1/search_test.go +++ b/internal/server/v1beta1/search_test.go @@ -4,19 +4,20 @@ import ( "context" "fmt" "github.com/raystack/compass/core/namespace" - "github.com/raystack/compass/pkg/grpc_interceptor" + "github.com/raystack/compass/pkg/server/interceptor" "testing" + "connectrpc.com/connect" "github.com/google/go-cmp/cmp" "github.com/google/uuid" "github.com/raystack/compass/core/asset" "github.com/raystack/compass/core/user" "github.com/raystack/compass/internal/server/v1beta1/mocks" - compassv1beta1 "github.com/raystack/compass/proto/raystack/compass/v1beta1" + compassv1beta1 "github.com/raystack/compass/proto/compassv1beta1" log "github.com/raystack/salt/observability/logger" "github.com/stretchr/testify/mock" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/status" + + "google.golang.org/protobuf/testing/protocmp" ) @@ -32,11 +33,11 @@ func TestSearch(t *testing.T) { } ) ctx := user.NewContext(context.Background(), user.User{UUID: userUUID}) - ctx = grpc_interceptor.BuildContextWithNamespace(ctx, ns) + ctx = interceptor.BuildContextWithNamespace(ctx, ns) type testCase struct { Description string Request *compassv1beta1.SearchAssetsRequest - ExpectStatus codes.Code + ExpectStatus connect.Code Setup func(context.Context, *mocks.AssetService, *mocks.NamespaceService) PostCheck func(resp *compassv1beta1.SearchAssetsResponse) error } @@ -44,7 +45,7 @@ func TestSearch(t *testing.T) { var testCases = []testCase{ { Description: "should allow empty text search", - ExpectStatus: codes.OK, + ExpectStatus: 0, Request: &compassv1beta1.SearchAssetsRequest{}, Setup: func(ctx context.Context, as *mocks.AssetService, nss *mocks.NamespaceService) { cfg := asset.SearchConfig{ @@ -65,7 +66,7 @@ func TestSearch(t *testing.T) { as.EXPECT().SearchAssets(ctx, mock.AnythingOfType("asset.SearchConfig")). Return([]asset.SearchResult{}, err) }, - ExpectStatus: codes.Internal, + ExpectStatus: connect.CodeInternal, }, { Description: "should pass filter to search config format", @@ -233,14 +234,21 @@ func TestSearch(t *testing.T) { handler := NewAPIServer(logger, mockNamespaceSvc, mockSvc, nil, nil, nil, nil, mockUserSvc) - got, err := handler.SearchAssets(ctx, tc.Request) - code := status.Code(err) - if code != tc.ExpectStatus { - t.Errorf("expected handler to return Code %s, returned Code %sinstead", tc.ExpectStatus.String(), code.String()) - return + got, err := handler.SearchAssets(ctx, connect.NewRequest(tc.Request)) + if tc.ExpectStatus == 0 { + if err != nil { + t.Errorf("expected no error but got: %v", err) + return + } + } else { + code := connect.CodeOf(err) + if code != tc.ExpectStatus { + t.Errorf("expected handler to return Code %s, returned Code %s instead", tc.ExpectStatus.String(), code.String()) + return + } } if tc.PostCheck != nil { - if err := tc.PostCheck(got); err != nil { + if err := tc.PostCheck(got.Msg); err != nil { t.Error(err) return } @@ -261,11 +269,11 @@ func TestSuggest(t *testing.T) { } ) ctx := user.NewContext(context.Background(), user.User{UUID: userUUID}) - ctx = grpc_interceptor.BuildContextWithNamespace(ctx, ns) + ctx = interceptor.BuildContextWithNamespace(ctx, ns) type testCase struct { Description string Request *compassv1beta1.SuggestAssetsRequest - ExpectStatus codes.Code + ExpectStatus connect.Code Setup func(context.Context, *mocks.AssetService, *mocks.NamespaceService) PostCheck func(resp *compassv1beta1.SuggestAssetsResponse) error } @@ -273,7 +281,7 @@ func TestSuggest(t *testing.T) { var testCases = []testCase{ { Description: "should return invalid arguments if 'text' parameter is empty or missing", - ExpectStatus: codes.InvalidArgument, + ExpectStatus: connect.CodeInvalidArgument, Request: &compassv1beta1.SuggestAssetsRequest{}, Setup: func(ctx context.Context, as *mocks.AssetService, nss *mocks.NamespaceService) { }, @@ -290,7 +298,7 @@ func TestSuggest(t *testing.T) { } as.EXPECT().SuggestAssets(ctx, cfg).Return([]string{}, fmt.Errorf("service unavailable")) }, - ExpectStatus: codes.Internal, + ExpectStatus: connect.CodeInternal, }, { Description: "should return suggestions", @@ -344,14 +352,21 @@ func TestSuggest(t *testing.T) { handler := NewAPIServer(logger, mockNamespaceSvc, mockSvc, nil, nil, nil, nil, mockUserSvc) - got, err := handler.SuggestAssets(ctx, tc.Request) - code := status.Code(err) - if code != tc.ExpectStatus { - t.Errorf("expected handler to return Code %s, returned Code %sinstead", tc.ExpectStatus.String(), code.String()) - return + got, err := handler.SuggestAssets(ctx, connect.NewRequest(tc.Request)) + if tc.ExpectStatus == 0 { + if err != nil { + t.Errorf("expected no error but got: %v", err) + return + } + } else { + code := connect.CodeOf(err) + if code != tc.ExpectStatus { + t.Errorf("expected handler to return Code %s, returned Code %s instead", tc.ExpectStatus.String(), code.String()) + return + } } if tc.PostCheck != nil { - if err := tc.PostCheck(got); err != nil { + if err := tc.PostCheck(got.Msg); err != nil { t.Error(err) return } diff --git a/internal/server/v1beta1/server.go b/internal/server/v1beta1/server.go index 2a266f17..840ac89c 100644 --- a/internal/server/v1beta1/server.go +++ b/internal/server/v1beta1/server.go @@ -4,19 +4,16 @@ import ( "context" "errors" "fmt" - "github.com/raystack/compass/core/namespace" "net/http" "time" + "connectrpc.com/connect" + "github.com/raystack/compass/core/namespace" "github.com/raystack/compass/core/user" - compassv1beta1 "github.com/raystack/compass/proto/raystack/compass/v1beta1" log "github.com/raystack/salt/observability/logger" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/status" ) type APIServer struct { - compassv1beta1.UnimplementedCompassServiceServer namespaceService NamespaceService assetService AssetService starService StarService @@ -58,15 +55,15 @@ func (server *APIServer) validateUserInCtx(ctx context.Context, ns *namespace.Na userID, err := server.userService.ValidateUser(ctx, ns, usr.UUID, usr.Email) if err != nil { if errors.Is(err, user.ErrNoUserInformation) { - return "", status.Error(codes.InvalidArgument, err.Error()) + return "", connect.NewError(connect.CodeInvalidArgument, err) } if errors.As(err, &user.DuplicateRecordError{UUID: usr.UUID, Email: usr.Email}) { - return "", status.Error(codes.AlreadyExists, err.Error()) + return "", connect.NewError(connect.CodeAlreadyExists, err) } - return "", status.Error(codes.Internal, err.Error()) + return "", internalServerError(server.logger, err.Error()) } if userID == "" { - return "", status.Error(codes.InvalidArgument, errMissingUserInfo.Error()) + return "", connect.NewError(connect.CodeInvalidArgument, errMissingUserInfo) } return userID, nil } @@ -75,7 +72,7 @@ func internalServerError(logger log.Logger, msg string) error { ref := time.Now().Unix() logger.Error(msg, "ref", ref) - return status.Error(codes.Internal, fmt.Sprintf( + return connect.NewError(connect.CodeInternal, fmt.Errorf( "%s - ref (%d)", http.StatusText(http.StatusInternalServerError), ref, diff --git a/internal/server/v1beta1/tag.go b/internal/server/v1beta1/tag.go index b13e3cd3..301db223 100644 --- a/internal/server/v1beta1/tag.go +++ b/internal/server/v1beta1/tag.go @@ -5,14 +5,13 @@ import ( "context" "errors" "fmt" - "github.com/raystack/compass/core/namespace" - "github.com/raystack/compass/pkg/grpc_interceptor" "time" + "connectrpc.com/connect" + "github.com/raystack/compass/core/namespace" "github.com/raystack/compass/core/tag" - compassv1beta1 "github.com/raystack/compass/proto/raystack/compass/v1beta1" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/status" + "github.com/raystack/compass/pkg/server/interceptor" + compassv1beta1 "github.com/raystack/compass/proto/compassv1beta1" "google.golang.org/protobuf/types/known/structpb" "google.golang.org/protobuf/types/known/timestamppb" ) @@ -33,11 +32,11 @@ type TagService interface { } // GetTagByAssetAndTemplate handles get tag by asset requests -func (server *APIServer) GetTagByAssetAndTemplate(ctx context.Context, req *compassv1beta1.GetTagByAssetAndTemplateRequest) (*compassv1beta1.GetTagByAssetAndTemplateResponse, error) { - if err := req.ValidateAll(); err != nil { - return nil, status.Error(codes.InvalidArgument, bodyParserErrorMsg(err)) +func (server *APIServer) GetTagByAssetAndTemplate(ctx context.Context, req *connect.Request[compassv1beta1.GetTagByAssetAndTemplateRequest]) (*connect.Response[compassv1beta1.GetTagByAssetAndTemplateResponse], error) { + if err := req.Msg.ValidateAll(); err != nil { + return nil, connect.NewError(connect.CodeInvalidArgument, fmt.Errorf("%s", bodyParserErrorMsg(err))) } - ns := grpc_interceptor.FetchNamespaceFromContext(ctx) + ns := interceptor.FetchNamespaceFromContext(ctx) if _, err := server.validateUserInCtx(ctx, ns); err != nil { return nil, err } @@ -46,17 +45,17 @@ func (server *APIServer) GetTagByAssetAndTemplate(ctx context.Context, req *comp return nil, internalServerError(server.logger, errNilTagService.Error()) } - if req.GetAssetId() == "" { - return nil, status.Error(codes.InvalidArgument, errEmptyAssetID.Error()) + if req.Msg.GetAssetId() == "" { + return nil, connect.NewError(connect.CodeInvalidArgument, errEmptyAssetID) } - if req.GetTemplateUrn() == "" { - return nil, status.Error(codes.InvalidArgument, errEmptyTemplateURN.Error()) + if req.Msg.GetTemplateUrn() == "" { + return nil, connect.NewError(connect.CodeInvalidArgument, errEmptyTemplateURN) } - tg, err := server.tagService.FindTagByAssetIDAndTemplateURN(ctx, req.GetAssetId(), req.GetTemplateUrn()) + tg, err := server.tagService.FindTagByAssetIDAndTemplateURN(ctx, req.Msg.GetAssetId(), req.Msg.GetTemplateUrn()) if err != nil { if errors.As(err, new(tag.NotFoundError)) || errors.As(err, new(tag.TemplateNotFoundError)) { - return nil, status.Error(codes.NotFound, err.Error()) + return nil, connect.NewError(connect.CodeNotFound, err) } return nil, internalServerError(server.logger, fmt.Sprintf("error finding a tag with asset and template: %s", err.Error())) } @@ -66,17 +65,17 @@ func (server *APIServer) GetTagByAssetAndTemplate(ctx context.Context, req *comp return nil, internalServerError(server.logger, err.Error()) } - return &compassv1beta1.GetTagByAssetAndTemplateResponse{ + return connect.NewResponse(&compassv1beta1.GetTagByAssetAndTemplateResponse{ Data: tagPB, - }, nil + }), nil } // CreateTagAsset handles tag creation requests -func (server *APIServer) CreateTagAsset(ctx context.Context, req *compassv1beta1.CreateTagAssetRequest) (*compassv1beta1.CreateTagAssetResponse, error) { - if err := req.ValidateAll(); err != nil { - return nil, status.Error(codes.InvalidArgument, bodyParserErrorMsg(err)) +func (server *APIServer) CreateTagAsset(ctx context.Context, req *connect.Request[compassv1beta1.CreateTagAssetRequest]) (*connect.Response[compassv1beta1.CreateTagAssetResponse], error) { + if err := req.Msg.ValidateAll(); err != nil { + return nil, connect.NewError(connect.CodeInvalidArgument, fmt.Errorf("%s", bodyParserErrorMsg(err))) } - ns := grpc_interceptor.FetchNamespaceFromContext(ctx) + ns := interceptor.FetchNamespaceFromContext(ctx) if _, err := server.validateUserInCtx(ctx, ns); err != nil { return nil, err } @@ -85,43 +84,41 @@ func (server *APIServer) CreateTagAsset(ctx context.Context, req *compassv1beta1 return nil, internalServerError(server.logger, errNilTagService.Error()) } - if req.GetAssetId() == "" { - return nil, status.Error(codes.InvalidArgument, errEmptyAssetID.Error()) + if req.Msg.GetAssetId() == "" { + return nil, connect.NewError(connect.CodeInvalidArgument, errEmptyAssetID) } - if req.GetTemplateUrn() == "" { - return nil, status.Error(codes.InvalidArgument, errEmptyTemplateURN.Error()) + if req.Msg.GetTemplateUrn() == "" { + return nil, connect.NewError(connect.CodeInvalidArgument, errEmptyTemplateURN) } - if req.GetTagValues() == nil { - return nil, status.Error(codes.InvalidArgument, "empty tag values") + if len(req.Msg.GetTagValues()) == 0 { + return nil, connect.NewError(connect.CodeInvalidArgument, fmt.Errorf("empty tag values")) } var tagValues []tag.TagValue - for _, tvPB := range req.GetTagValues() { + for _, tvPB := range req.Msg.GetTagValues() { tagValues = append(tagValues, tagValueFromProto(tvPB)) } tagDomain := tag.Tag{ - AssetID: req.GetAssetId(), - TemplateURN: req.GetTemplateUrn(), + AssetID: req.Msg.GetAssetId(), + TemplateURN: req.Msg.GetTemplateUrn(), TagValues: tagValues, - TemplateDisplayName: req.GetTemplateDisplayName(), - TemplateDescription: req.GetTemplateDescription(), + TemplateDisplayName: req.Msg.GetTemplateDisplayName(), + TemplateDescription: req.Msg.GetTemplateDescription(), } err := server.tagService.CreateTag(ctx, ns, &tagDomain) if errors.As(err, new(tag.DuplicateError)) { - return nil, status.Error(codes.AlreadyExists, err.Error()) - + return nil, connect.NewError(connect.CodeAlreadyExists, err) } if errors.As(err, new(tag.TemplateNotFoundError)) { - return nil, status.Error(codes.NotFound, err.Error()) + return nil, connect.NewError(connect.CodeNotFound, err) } if errors.As(err, new(tag.ValidationError)) { - return nil, status.Error(codes.InvalidArgument, err.Error()) + return nil, connect.NewError(connect.CodeInvalidArgument, err) } if err != nil { return nil, internalServerError(server.logger, fmt.Sprintf("error creating tag: %s", err.Error())) - } tagPB, err := tagToProto(tagDomain) @@ -129,17 +126,17 @@ func (server *APIServer) CreateTagAsset(ctx context.Context, req *compassv1beta1 return nil, internalServerError(server.logger, err.Error()) } - return &compassv1beta1.CreateTagAssetResponse{ + return connect.NewResponse(&compassv1beta1.CreateTagAssetResponse{ Data: tagPB, - }, nil + }), nil } // UpdateTagAsset handles tag update requests -func (server *APIServer) UpdateTagAsset(ctx context.Context, req *compassv1beta1.UpdateTagAssetRequest) (*compassv1beta1.UpdateTagAssetResponse, error) { - if err := req.ValidateAll(); err != nil { - return nil, status.Error(codes.InvalidArgument, bodyParserErrorMsg(err)) +func (server *APIServer) UpdateTagAsset(ctx context.Context, req *connect.Request[compassv1beta1.UpdateTagAssetRequest]) (*connect.Response[compassv1beta1.UpdateTagAssetResponse], error) { + if err := req.Msg.ValidateAll(); err != nil { + return nil, connect.NewError(connect.CodeInvalidArgument, fmt.Errorf("%s", bodyParserErrorMsg(err))) } - ns := grpc_interceptor.FetchNamespaceFromContext(ctx) + ns := interceptor.FetchNamespaceFromContext(ctx) if _, err := server.validateUserInCtx(ctx, ns); err != nil { return nil, err } @@ -148,37 +145,37 @@ func (server *APIServer) UpdateTagAsset(ctx context.Context, req *compassv1beta1 return nil, internalServerError(server.logger, errNilTagService.Error()) } - if req.GetAssetId() == "" { - return nil, status.Error(codes.InvalidArgument, errEmptyAssetID.Error()) + if req.Msg.GetAssetId() == "" { + return nil, connect.NewError(connect.CodeInvalidArgument, errEmptyAssetID) } - if req.GetTemplateUrn() == "" { - return nil, status.Error(codes.InvalidArgument, errEmptyTemplateURN.Error()) + if req.Msg.GetTemplateUrn() == "" { + return nil, connect.NewError(connect.CodeInvalidArgument, errEmptyTemplateURN) } - if req.GetTagValues() == nil { - return nil, status.Error(codes.InvalidArgument, "empty tag values") + if len(req.Msg.GetTagValues()) == 0 { + return nil, connect.NewError(connect.CodeInvalidArgument, fmt.Errorf("empty tag values")) } var tagValues []tag.TagValue - for _, tvPB := range req.GetTagValues() { + for _, tvPB := range req.Msg.GetTagValues() { tagValues = append(tagValues, tagValueFromProto(tvPB)) } tagDomain := tag.Tag{ - AssetID: req.GetAssetId(), - TemplateURN: req.GetTemplateUrn(), + AssetID: req.Msg.GetAssetId(), + TemplateURN: req.Msg.GetTemplateUrn(), TagValues: tagValues, - TemplateDisplayName: req.GetTemplateDisplayName(), - TemplateDescription: req.GetTemplateDescription(), + TemplateDisplayName: req.Msg.GetTemplateDisplayName(), + TemplateDescription: req.Msg.GetTemplateDescription(), } err := server.tagService.UpdateTag(ctx, &tagDomain) if err != nil { if errors.As(err, new(tag.NotFoundError)) || errors.As(err, new(tag.TemplateNotFoundError)) { - return nil, status.Error(codes.NotFound, err.Error()) + return nil, connect.NewError(connect.CodeNotFound, err) } if errors.As(err, new(tag.ValidationError)) { - return nil, status.Error(codes.InvalidArgument, err.Error()) + return nil, connect.NewError(connect.CodeInvalidArgument, err) } return nil, internalServerError(server.logger, fmt.Sprintf("error updating an asset's tag: %s", err.Error())) } @@ -188,17 +185,17 @@ func (server *APIServer) UpdateTagAsset(ctx context.Context, req *compassv1beta1 return nil, internalServerError(server.logger, err.Error()) } - return &compassv1beta1.UpdateTagAssetResponse{ + return connect.NewResponse(&compassv1beta1.UpdateTagAssetResponse{ Data: tagPB, - }, nil + }), nil } // DeleteTagAsset handles delete tag by asset and template requests -func (server *APIServer) DeleteTagAsset(ctx context.Context, req *compassv1beta1.DeleteTagAssetRequest) (*compassv1beta1.DeleteTagAssetResponse, error) { - if err := req.ValidateAll(); err != nil { - return nil, status.Error(codes.InvalidArgument, bodyParserErrorMsg(err)) +func (server *APIServer) DeleteTagAsset(ctx context.Context, req *connect.Request[compassv1beta1.DeleteTagAssetRequest]) (*connect.Response[compassv1beta1.DeleteTagAssetResponse], error) { + if err := req.Msg.ValidateAll(); err != nil { + return nil, connect.NewError(connect.CodeInvalidArgument, fmt.Errorf("%s", bodyParserErrorMsg(err))) } - ns := grpc_interceptor.FetchNamespaceFromContext(ctx) + ns := interceptor.FetchNamespaceFromContext(ctx) if _, err := server.validateUserInCtx(ctx, ns); err != nil { return nil, err } @@ -207,30 +204,30 @@ func (server *APIServer) DeleteTagAsset(ctx context.Context, req *compassv1beta1 return nil, internalServerError(server.logger, errNilTagService.Error()) } - if req.GetAssetId() == "" { - return nil, status.Error(codes.InvalidArgument, errEmptyAssetID.Error()) + if req.Msg.GetAssetId() == "" { + return nil, connect.NewError(connect.CodeInvalidArgument, errEmptyAssetID) } - if req.GetTemplateUrn() == "" { - return nil, status.Error(codes.InvalidArgument, errEmptyTemplateURN.Error()) + if req.Msg.GetTemplateUrn() == "" { + return nil, connect.NewError(connect.CodeInvalidArgument, errEmptyTemplateURN) } - err := server.tagService.DeleteTag(ctx, req.GetAssetId(), req.GetTemplateUrn()) + err := server.tagService.DeleteTag(ctx, req.Msg.GetAssetId(), req.Msg.GetTemplateUrn()) if err != nil { if errors.As(err, new(tag.TemplateNotFoundError)) || errors.As(err, new(tag.NotFoundError)) { - return nil, status.Error(codes.NotFound, err.Error()) + return nil, connect.NewError(connect.CodeNotFound, err) } return nil, internalServerError(server.logger, fmt.Sprintf("error deleting a tag: %s", err.Error())) } - return &compassv1beta1.DeleteTagAssetResponse{}, nil + return connect.NewResponse(&compassv1beta1.DeleteTagAssetResponse{}), nil } // GetAllTagsByAsset handles get all tags by asset requests -func (server *APIServer) GetAllTagsByAsset(ctx context.Context, req *compassv1beta1.GetAllTagsByAssetRequest) (*compassv1beta1.GetAllTagsByAssetResponse, error) { - if err := req.ValidateAll(); err != nil { - return nil, status.Error(codes.InvalidArgument, bodyParserErrorMsg(err)) +func (server *APIServer) GetAllTagsByAsset(ctx context.Context, req *connect.Request[compassv1beta1.GetAllTagsByAssetRequest]) (*connect.Response[compassv1beta1.GetAllTagsByAssetResponse], error) { + if err := req.Msg.ValidateAll(); err != nil { + return nil, connect.NewError(connect.CodeInvalidArgument, fmt.Errorf("%s", bodyParserErrorMsg(err))) } - ns := grpc_interceptor.FetchNamespaceFromContext(ctx) + ns := interceptor.FetchNamespaceFromContext(ctx) if _, err := server.validateUserInCtx(ctx, ns); err != nil { return nil, err } @@ -239,11 +236,11 @@ func (server *APIServer) GetAllTagsByAsset(ctx context.Context, req *compassv1be return nil, internalServerError(server.logger, errNilTagService.Error()) } - if req.GetAssetId() == "" { - return nil, status.Error(codes.InvalidArgument, errEmptyAssetID.Error()) + if req.Msg.GetAssetId() == "" { + return nil, connect.NewError(connect.CodeInvalidArgument, errEmptyAssetID) } - tags, err := server.tagService.GetTagsByAssetID(ctx, req.GetAssetId()) + tags, err := server.tagService.GetTagsByAssetID(ctx, req.Msg.GetAssetId()) if err != nil { return nil, internalServerError(server.logger, fmt.Sprintf("error getting asset tags: %s", err.Error())) } @@ -257,9 +254,9 @@ func (server *APIServer) GetAllTagsByAsset(ctx context.Context, req *compassv1be tagsPB = append(tagsPB, tgPB) } - return &compassv1beta1.GetAllTagsByAssetResponse{ + return connect.NewResponse(&compassv1beta1.GetAllTagsByAssetResponse{ Data: tagsPB, - }, nil + }), nil } // tagToProto convert domain to protobuf diff --git a/internal/server/v1beta1/tag_template.go b/internal/server/v1beta1/tag_template.go index d4c95d57..381cc675 100644 --- a/internal/server/v1beta1/tag_template.go +++ b/internal/server/v1beta1/tag_template.go @@ -5,14 +5,13 @@ import ( "context" "errors" "fmt" - "github.com/raystack/compass/core/namespace" - "github.com/raystack/compass/pkg/grpc_interceptor" "time" + "connectrpc.com/connect" + "github.com/raystack/compass/core/namespace" "github.com/raystack/compass/core/tag" - compassv1beta1 "github.com/raystack/compass/proto/raystack/compass/v1beta1" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/status" + "github.com/raystack/compass/pkg/server/interceptor" + compassv1beta1 "github.com/raystack/compass/proto/compassv1beta1" "google.golang.org/protobuf/types/known/timestamppb" ) @@ -26,16 +25,16 @@ type TagTemplateService interface { } // GetAllTagTemplates handles template read requests -func (server *APIServer) GetAllTagTemplates(ctx context.Context, req *compassv1beta1.GetAllTagTemplatesRequest) (*compassv1beta1.GetAllTagTemplatesResponse, error) { - if err := req.ValidateAll(); err != nil { - return nil, status.Error(codes.InvalidArgument, bodyParserErrorMsg(err)) +func (server *APIServer) GetAllTagTemplates(ctx context.Context, req *connect.Request[compassv1beta1.GetAllTagTemplatesRequest]) (*connect.Response[compassv1beta1.GetAllTagTemplatesResponse], error) { + if err := req.Msg.ValidateAll(); err != nil { + return nil, connect.NewError(connect.CodeInvalidArgument, fmt.Errorf("%s", bodyParserErrorMsg(err))) } - ns := grpc_interceptor.FetchNamespaceFromContext(ctx) + ns := interceptor.FetchNamespaceFromContext(ctx) if _, err := server.validateUserInCtx(ctx, ns); err != nil { return nil, err } - listOfDomainTemplate, err := server.tagTemplateService.GetTemplates(ctx, req.GetUrn()) + listOfDomainTemplate, err := server.tagTemplateService.GetTemplates(ctx, req.Msg.GetUrn()) if err != nil { return nil, internalServerError(server.logger, fmt.Sprintf("error finding templates: %s", err.Error())) } @@ -45,144 +44,144 @@ func (server *APIServer) GetAllTagTemplates(ctx context.Context, req *compassv1b templatesPB = append(templatesPB, tagTemplateToProto(template)) } - return &compassv1beta1.GetAllTagTemplatesResponse{ + return connect.NewResponse(&compassv1beta1.GetAllTagTemplatesResponse{ Data: templatesPB, - }, nil + }), nil } // CreateTagTemplate handles template creation requests -func (server *APIServer) CreateTagTemplate(ctx context.Context, req *compassv1beta1.CreateTagTemplateRequest) (*compassv1beta1.CreateTagTemplateResponse, error) { - if err := req.ValidateAll(); err != nil { - return nil, status.Error(codes.InvalidArgument, bodyParserErrorMsg(err)) +func (server *APIServer) CreateTagTemplate(ctx context.Context, req *connect.Request[compassv1beta1.CreateTagTemplateRequest]) (*connect.Response[compassv1beta1.CreateTagTemplateResponse], error) { + if err := req.Msg.ValidateAll(); err != nil { + return nil, connect.NewError(connect.CodeInvalidArgument, fmt.Errorf("%s", bodyParserErrorMsg(err))) } - ns := grpc_interceptor.FetchNamespaceFromContext(ctx) + ns := interceptor.FetchNamespaceFromContext(ctx) if _, err := server.validateUserInCtx(ctx, ns); err != nil { return nil, err } - if req.GetUrn() == "" { - return nil, status.Error(codes.InvalidArgument, "empty urn") + if req.Msg.GetUrn() == "" { + return nil, connect.NewError(connect.CodeInvalidArgument, fmt.Errorf("empty urn")) } - if req.GetDisplayName() == "" { - return nil, status.Error(codes.InvalidArgument, "empty display name") + if req.Msg.GetDisplayName() == "" { + return nil, connect.NewError(connect.CodeInvalidArgument, fmt.Errorf("empty display name")) } - if req.GetDescription() == "" { - return nil, status.Error(codes.InvalidArgument, "empty description") + if req.Msg.GetDescription() == "" { + return nil, connect.NewError(connect.CodeInvalidArgument, fmt.Errorf("empty description")) } - if req.GetFields() == nil { - return nil, status.Error(codes.InvalidArgument, "empty fields") + if req.Msg.GetFields() == nil { + return nil, connect.NewError(connect.CodeInvalidArgument, fmt.Errorf("empty fields")) } var templateFields []tag.Field - for _, fPB := range req.GetFields() { + for _, fPB := range req.Msg.GetFields() { templateFields = append(templateFields, tagTemplateFieldFromProto(fPB)) } template := tag.Template{ - URN: req.GetUrn(), - DisplayName: req.GetDisplayName(), - Description: req.GetDescription(), + URN: req.Msg.GetUrn(), + DisplayName: req.Msg.GetDisplayName(), + Description: req.Msg.GetDescription(), Fields: templateFields, } err := server.tagTemplateService.CreateTemplate(ctx, ns, &template) if errors.As(err, new(tag.DuplicateTemplateError)) { - return nil, status.Error(codes.AlreadyExists, err.Error()) + return nil, connect.NewError(connect.CodeAlreadyExists, err) } if err != nil { return nil, internalServerError(server.logger, fmt.Sprintf("error creating tag template: %s", err.Error())) } - return &compassv1beta1.CreateTagTemplateResponse{ + return connect.NewResponse(&compassv1beta1.CreateTagTemplateResponse{ Data: tagTemplateToProto(template), - }, nil + }), nil } // GetTagTemplate handles template read requests based on URN -func (server *APIServer) GetTagTemplate(ctx context.Context, req *compassv1beta1.GetTagTemplateRequest) (*compassv1beta1.GetTagTemplateResponse, error) { - if err := req.ValidateAll(); err != nil { - return nil, status.Error(codes.InvalidArgument, bodyParserErrorMsg(err)) +func (server *APIServer) GetTagTemplate(ctx context.Context, req *connect.Request[compassv1beta1.GetTagTemplateRequest]) (*connect.Response[compassv1beta1.GetTagTemplateResponse], error) { + if err := req.Msg.ValidateAll(); err != nil { + return nil, connect.NewError(connect.CodeInvalidArgument, fmt.Errorf("%s", bodyParserErrorMsg(err))) } - ns := grpc_interceptor.FetchNamespaceFromContext(ctx) + ns := interceptor.FetchNamespaceFromContext(ctx) if _, err := server.validateUserInCtx(ctx, ns); err != nil { return nil, err } - domainTemplate, err := server.tagTemplateService.GetTemplate(ctx, req.GetTemplateUrn()) + domainTemplate, err := server.tagTemplateService.GetTemplate(ctx, req.Msg.GetTemplateUrn()) if err != nil { if errors.As(err, new(tag.TemplateNotFoundError)) { - return nil, status.Error(codes.NotFound, err.Error()) + return nil, connect.NewError(connect.CodeNotFound, err) } return nil, internalServerError(server.logger, fmt.Sprintf("error finding a template: %s", err.Error())) } - return &compassv1beta1.GetTagTemplateResponse{ + return connect.NewResponse(&compassv1beta1.GetTagTemplateResponse{ Data: tagTemplateToProto(domainTemplate), - }, nil + }), nil } -func (server *APIServer) UpdateTagTemplate(ctx context.Context, req *compassv1beta1.UpdateTagTemplateRequest) (*compassv1beta1.UpdateTagTemplateResponse, error) { - if err := req.ValidateAll(); err != nil { - return nil, status.Error(codes.InvalidArgument, bodyParserErrorMsg(err)) +func (server *APIServer) UpdateTagTemplate(ctx context.Context, req *connect.Request[compassv1beta1.UpdateTagTemplateRequest]) (*connect.Response[compassv1beta1.UpdateTagTemplateResponse], error) { + if err := req.Msg.ValidateAll(); err != nil { + return nil, connect.NewError(connect.CodeInvalidArgument, fmt.Errorf("%s", bodyParserErrorMsg(err))) } - ns := grpc_interceptor.FetchNamespaceFromContext(ctx) + ns := interceptor.FetchNamespaceFromContext(ctx) if _, err := server.validateUserInCtx(ctx, ns); err != nil { return nil, err } - if req.GetDisplayName() == "" { - return nil, status.Error(codes.InvalidArgument, "empty display name") + if req.Msg.GetDisplayName() == "" { + return nil, connect.NewError(connect.CodeInvalidArgument, fmt.Errorf("empty display name")) } - if req.GetDescription() == "" { - return nil, status.Error(codes.InvalidArgument, "empty description") + if req.Msg.GetDescription() == "" { + return nil, connect.NewError(connect.CodeInvalidArgument, fmt.Errorf("empty description")) } - if req.GetFields() == nil { - return nil, status.Error(codes.InvalidArgument, "empty fields") + if req.Msg.GetFields() == nil { + return nil, connect.NewError(connect.CodeInvalidArgument, fmt.Errorf("empty fields")) } var templateFields []tag.Field - for _, fPB := range req.GetFields() { + for _, fPB := range req.Msg.GetFields() { templateFields = append(templateFields, tagTemplateFieldFromProto(fPB)) } template := tag.Template{ - URN: req.GetTemplateUrn(), - DisplayName: req.GetDisplayName(), - Description: req.GetDescription(), + URN: req.Msg.GetTemplateUrn(), + DisplayName: req.Msg.GetDisplayName(), + Description: req.Msg.GetDescription(), Fields: templateFields, } - if err := server.tagTemplateService.UpdateTemplate(ctx, ns, req.TemplateUrn, &template); err != nil { + if err := server.tagTemplateService.UpdateTemplate(ctx, ns, req.Msg.TemplateUrn, &template); err != nil { if errors.As(err, new(tag.TemplateNotFoundError)) { - return nil, status.Error(codes.NotFound, err.Error()) + return nil, connect.NewError(connect.CodeNotFound, err) } if errors.As(err, new(tag.ValidationError)) { - return nil, status.Error(codes.InvalidArgument, err.Error()) + return nil, connect.NewError(connect.CodeInvalidArgument, err) } return nil, internalServerError(server.logger, fmt.Sprintf("error updating template: %s", err.Error())) } - return &compassv1beta1.UpdateTagTemplateResponse{ + return connect.NewResponse(&compassv1beta1.UpdateTagTemplateResponse{ Data: tagTemplateToProto(template), - }, nil + }), nil } // DeleteTagTemplate handles template delete request based on URN -func (server *APIServer) DeleteTagTemplate(ctx context.Context, req *compassv1beta1.DeleteTagTemplateRequest) (*compassv1beta1.DeleteTagTemplateResponse, error) { - if err := req.ValidateAll(); err != nil { - return nil, status.Error(codes.InvalidArgument, bodyParserErrorMsg(err)) +func (server *APIServer) DeleteTagTemplate(ctx context.Context, req *connect.Request[compassv1beta1.DeleteTagTemplateRequest]) (*connect.Response[compassv1beta1.DeleteTagTemplateResponse], error) { + if err := req.Msg.ValidateAll(); err != nil { + return nil, connect.NewError(connect.CodeInvalidArgument, fmt.Errorf("%s", bodyParserErrorMsg(err))) } - ns := grpc_interceptor.FetchNamespaceFromContext(ctx) + ns := interceptor.FetchNamespaceFromContext(ctx) if _, err := server.validateUserInCtx(ctx, ns); err != nil { return nil, err } - err := server.tagTemplateService.DeleteTemplate(ctx, req.GetTemplateUrn()) + err := server.tagTemplateService.DeleteTemplate(ctx, req.Msg.GetTemplateUrn()) if errors.As(err, new(tag.TemplateNotFoundError)) { - return nil, status.Error(codes.NotFound, err.Error()) + return nil, connect.NewError(connect.CodeNotFound, err) } if err != nil { return nil, internalServerError(server.logger, fmt.Sprintf("error deleting a template: %s", err.Error())) } - return &compassv1beta1.DeleteTagTemplateResponse{}, nil + return connect.NewResponse(&compassv1beta1.DeleteTagTemplateResponse{}), nil } // tagTemplateToProto convert domain to protobuf diff --git a/internal/server/v1beta1/tag_template_test.go b/internal/server/v1beta1/tag_template_test.go index aed23735..046dca59 100644 --- a/internal/server/v1beta1/tag_template_test.go +++ b/internal/server/v1beta1/tag_template_test.go @@ -4,21 +4,22 @@ import ( "context" "errors" "fmt" - "github.com/raystack/compass/core/namespace" - "github.com/raystack/compass/pkg/grpc_interceptor" "reflect" "testing" "time" + "connectrpc.com/connect" "github.com/google/go-cmp/cmp" "github.com/google/uuid" + "github.com/raystack/compass/core/namespace" "github.com/raystack/compass/core/tag" "github.com/raystack/compass/core/user" "github.com/raystack/compass/internal/server/v1beta1/mocks" - compassv1beta1 "github.com/raystack/compass/proto/raystack/compass/v1beta1" + "github.com/raystack/compass/pkg/server/interceptor" + compassv1beta1 "github.com/raystack/compass/proto/compassv1beta1" log "github.com/raystack/salt/observability/logger" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/status" + + "google.golang.org/protobuf/testing/protocmp" "google.golang.org/protobuf/types/known/timestamppb" ) @@ -85,11 +86,11 @@ func TestGetAllTagTemplates(t *testing.T) { } ) ctx := user.NewContext(context.Background(), user.User{UUID: userUUID}) - ctx = grpc_interceptor.BuildContextWithNamespace(ctx, ns) + ctx = interceptor.BuildContextWithNamespace(ctx, ns) type testCase struct { Description string Request *compassv1beta1.GetAllTagTemplatesRequest - ExpectStatus codes.Code + ExpectStatus connect.Code Setup func(context.Context, *mocks.TagService, *mocks.TagTemplateService) PostCheck func(resp *compassv1beta1.GetAllTagTemplatesResponse) error } @@ -100,7 +101,7 @@ func TestGetAllTagTemplates(t *testing.T) { Request: &compassv1beta1.GetAllTagTemplatesRequest{ Urn: sampleTemplate.URN, }, - ExpectStatus: codes.Internal, + ExpectStatus: connect.CodeInternal, Setup: func(ctx context.Context, ts *mocks.TagService, tts *mocks.TagTemplateService) { tts.EXPECT().GetTemplates(ctx, sampleTemplate.URN).Return(nil, errors.New("unexpected error")) }, @@ -110,7 +111,7 @@ func TestGetAllTagTemplates(t *testing.T) { Request: &compassv1beta1.GetAllTagTemplatesRequest{ Urn: sampleTemplate.URN, }, - ExpectStatus: codes.OK, + ExpectStatus: 0, Setup: func(ctx context.Context, ts *mocks.TagService, tts *mocks.TagTemplateService) { tts.EXPECT().GetTemplates(ctx, sampleTemplate.URN).Return([]tag.Template{sampleTemplate}, nil) }, @@ -129,7 +130,7 @@ func TestGetAllTagTemplates(t *testing.T) { }, { Description: `should return all templates if no urn query params`, Request: &compassv1beta1.GetAllTagTemplatesRequest{}, - ExpectStatus: codes.OK, + ExpectStatus: 0, Setup: func(ctx context.Context, ts *mocks.TagService, tts *mocks.TagTemplateService) { tts.EXPECT().GetTemplates(ctx, "").Return([]tag.Template{sampleTemplate}, nil) }, @@ -166,14 +167,21 @@ func TestGetAllTagTemplates(t *testing.T) { handler := NewAPIServer(logger, mockNamespaceSvc, nil, nil, nil, mockTagSvc, mockTemplateSvc, mockUserSvc) - got, err := handler.GetAllTagTemplates(ctx, tc.Request) - code := status.Code(err) - if code != tc.ExpectStatus { - t.Errorf("expected handler to return Code %s, returned Code %sinstead", tc.ExpectStatus.String(), code.String()) - return + got, err := handler.GetAllTagTemplates(ctx, connect.NewRequest(tc.Request)) + if tc.ExpectStatus == 0 { + if err != nil { + t.Errorf("expected no error but got: %v", err) + return + } + } else { + code := connect.CodeOf(err) + if code != tc.ExpectStatus { + t.Errorf("expected handler to return Code %s, returned Code %s instead", tc.ExpectStatus.String(), code.String()) + return + } } if tc.PostCheck != nil { - if err := tc.PostCheck(got); err != nil { + if err := tc.PostCheck(got.Msg); err != nil { t.Error(err) return } @@ -200,11 +208,11 @@ func TestCreateTagTemplate(t *testing.T) { } ) ctx := user.NewContext(context.Background(), user.User{UUID: userUUID}) - ctx = grpc_interceptor.BuildContextWithNamespace(ctx, ns) + ctx = interceptor.BuildContextWithNamespace(ctx, ns) type testCase struct { Description string Request *compassv1beta1.CreateTagTemplateRequest - ExpectStatus codes.Code + ExpectStatus connect.Code Setup func(context.Context, *mocks.TagService, *mocks.TagTemplateService) PostCheck func(resp *compassv1beta1.CreateTagTemplateResponse) error } @@ -213,7 +221,7 @@ func TestCreateTagTemplate(t *testing.T) { { Description: `should return already exist if duplicate template`, Request: validRequest, - ExpectStatus: codes.AlreadyExists, + ExpectStatus: connect.CodeAlreadyExists, Setup: func(ctx context.Context, ts *mocks.TagService, tts *mocks.TagTemplateService) { tts.EXPECT().CreateTemplate(ctx, ns, &sampleTemplate).Return(tag.DuplicateTemplateError{URN: sampleTemplate.URN}) }, @@ -221,7 +229,7 @@ func TestCreateTagTemplate(t *testing.T) { { Description: `should return internal server error if found error during insert`, Request: validRequest, - ExpectStatus: codes.Internal, + ExpectStatus: connect.CodeInternal, Setup: func(ctx context.Context, ts *mocks.TagService, tts *mocks.TagTemplateService) { tts.EXPECT().CreateTemplate(ctx, ns, &sampleTemplate).Return(errors.New("unexpected error during insert")) }, @@ -229,7 +237,7 @@ func TestCreateTagTemplate(t *testing.T) { { Description: `should return ok and domain is inserted if found no error`, Request: validRequest, - ExpectStatus: codes.OK, + ExpectStatus: 0, Setup: func(ctx context.Context, ts *mocks.TagService, tts *mocks.TagTemplateService) { tts.EXPECT().CreateTemplate(ctx, ns, &sampleTemplate).Return(nil) }, @@ -263,14 +271,21 @@ func TestCreateTagTemplate(t *testing.T) { handler := NewAPIServer(logger, mockNamespaceSvc, nil, nil, nil, mockTagSvc, mockTemplateSvc, mockUserSvc) - got, err := handler.CreateTagTemplate(ctx, tc.Request) - code := status.Code(err) - if code != tc.ExpectStatus { - t.Errorf("expected handler to return Code %s, returned Code %sinstead", tc.ExpectStatus.String(), code.String()) - return + got, err := handler.CreateTagTemplate(ctx, connect.NewRequest(tc.Request)) + if tc.ExpectStatus == 0 { + if err != nil { + t.Errorf("expected no error but got: %v", err) + return + } + } else { + code := connect.CodeOf(err) + if code != tc.ExpectStatus { + t.Errorf("expected handler to return Code %s, returned Code %s instead", tc.ExpectStatus.String(), code.String()) + return + } } if tc.PostCheck != nil { - if err := tc.PostCheck(got); err != nil { + if err := tc.PostCheck(got.Msg); err != nil { t.Error(err) return } @@ -294,11 +309,11 @@ func TestGetTagTemplate(t *testing.T) { } ) ctx := user.NewContext(context.Background(), user.User{UUID: userUUID}) - ctx = grpc_interceptor.BuildContextWithNamespace(ctx, ns) + ctx = interceptor.BuildContextWithNamespace(ctx, ns) type testCase struct { Description string Request *compassv1beta1.GetTagTemplateRequest - ExpectStatus codes.Code + ExpectStatus connect.Code Setup func(context.Context, *mocks.TagService, *mocks.TagTemplateService) PostCheck func(resp *compassv1beta1.GetTagTemplateResponse) error } @@ -307,7 +322,7 @@ func TestGetTagTemplate(t *testing.T) { { Description: `should return not found if template is not found`, Request: validRequest, - ExpectStatus: codes.NotFound, + ExpectStatus: connect.CodeNotFound, Setup: func(ctx context.Context, ts *mocks.TagService, tts *mocks.TagTemplateService) { tts.EXPECT().GetTemplate(ctx, sampleTemplate.URN).Return(tag.Template{}, tag.TemplateNotFoundError{URN: sampleTemplate.URN}) }, @@ -315,7 +330,7 @@ func TestGetTagTemplate(t *testing.T) { { Description: `should return ok and template if domain template is found`, Request: validRequest, - ExpectStatus: codes.OK, + ExpectStatus: 0, Setup: func(ctx context.Context, ts *mocks.TagService, tts *mocks.TagTemplateService) { tts.EXPECT().GetTemplate(ctx, sampleTemplate.URN).Return(sampleTemplate, nil) }, @@ -349,14 +364,21 @@ func TestGetTagTemplate(t *testing.T) { mockUserSvc.EXPECT().ValidateUser(ctx, ns, userUUID, "").Return(userID, nil) handler := NewAPIServer(logger, mockNamespaceSvc, nil, nil, nil, mockTagSvc, mockTemplateSvc, mockUserSvc) - got, err := handler.GetTagTemplate(ctx, tc.Request) - code := status.Code(err) - if code != tc.ExpectStatus { - t.Errorf("expected handler to return Code %s, returned Code %s instead", tc.ExpectStatus.String(), code.String()) - return + got, err := handler.GetTagTemplate(ctx, connect.NewRequest(tc.Request)) + if tc.ExpectStatus == 0 { + if err != nil { + t.Errorf("expected no error but got: %v", err) + return + } + } else { + code := connect.CodeOf(err) + if code != tc.ExpectStatus { + t.Errorf("expected handler to return Code %s, returned Code %s instead", tc.ExpectStatus.String(), code.String()) + return + } } if tc.PostCheck != nil { - if err := tc.PostCheck(got); err != nil { + if err := tc.PostCheck(got.Msg); err != nil { t.Error(err) return } @@ -383,11 +405,11 @@ func TestUpdateTagTemplate(t *testing.T) { } ) ctx := user.NewContext(context.Background(), user.User{UUID: userUUID}) - ctx = grpc_interceptor.BuildContextWithNamespace(ctx, ns) + ctx = interceptor.BuildContextWithNamespace(ctx, ns) type testCase struct { Description string Request *compassv1beta1.UpdateTagTemplateRequest - ExpectStatus codes.Code + ExpectStatus connect.Code Setup func(context.Context, *mocks.TagService, *mocks.TagTemplateService) PostCheck func(resp *compassv1beta1.UpdateTagTemplateResponse) error } @@ -396,7 +418,7 @@ func TestUpdateTagTemplate(t *testing.T) { { Description: `should return not found if template is not found`, Request: validRequest, - ExpectStatus: codes.NotFound, + ExpectStatus: connect.CodeNotFound, Setup: func(ctx context.Context, ts *mocks.TagService, tts *mocks.TagTemplateService) { tts.EXPECT().UpdateTemplate(ctx, ns, sampleTemplate.URN, &sampleTemplate).Return(tag.TemplateNotFoundError{URN: sampleTemplate.URN}) }, @@ -404,7 +426,7 @@ func TestUpdateTagTemplate(t *testing.T) { { Description: `should return invalid argument if there is validation error`, Request: validRequest, - ExpectStatus: codes.InvalidArgument, + ExpectStatus: connect.CodeInvalidArgument, Setup: func(ctx context.Context, ts *mocks.TagService, tts *mocks.TagTemplateService) { tts.EXPECT().UpdateTemplate(ctx, ns, sampleTemplate.URN, &sampleTemplate).Return(tag.ValidationError{Err: errors.New("validation error")}) }, @@ -412,7 +434,7 @@ func TestUpdateTagTemplate(t *testing.T) { { Description: `should return internal server error if encountered error during update`, Request: validRequest, - ExpectStatus: codes.Internal, + ExpectStatus: connect.CodeInternal, Setup: func(ctx context.Context, ts *mocks.TagService, tts *mocks.TagTemplateService) { tts.EXPECT().UpdateTemplate(ctx, ns, sampleTemplate.URN, &sampleTemplate).Return(errors.New("unexpected error")) }, @@ -420,7 +442,7 @@ func TestUpdateTagTemplate(t *testing.T) { { Description: `should return status ok and its message if successfully updated`, Request: validRequest, - ExpectStatus: codes.OK, + ExpectStatus: 0, Setup: func(ctx context.Context, ts *mocks.TagService, tts *mocks.TagTemplateService) { tts.EXPECT().UpdateTemplate(ctx, ns, sampleTemplate.URN, &sampleTemplate).Run(func(ctx context.Context, ns *namespace.Namespace, templateURN string, template *tag.Template) { template.UpdatedAt = time.Now() @@ -458,14 +480,21 @@ func TestUpdateTagTemplate(t *testing.T) { mockUserSvc.EXPECT().ValidateUser(ctx, ns, userUUID, "").Return(userID, nil) handler := NewAPIServer(logger, mockNamespaceSvc, nil, nil, nil, mockTagSvc, mockTemplateSvc, mockUserSvc) - got, err := handler.UpdateTagTemplate(ctx, tc.Request) - code := status.Code(err) - if code != tc.ExpectStatus { - t.Errorf("expected handler to return Code %s, returned Code %sinstead", tc.ExpectStatus.String(), code.String()) - return + got, err := handler.UpdateTagTemplate(ctx, connect.NewRequest(tc.Request)) + if tc.ExpectStatus == 0 { + if err != nil { + t.Errorf("expected no error but got: %v", err) + return + } + } else { + code := connect.CodeOf(err) + if code != tc.ExpectStatus { + t.Errorf("expected handler to return Code %s, returned Code %s instead", tc.ExpectStatus.String(), code.String()) + return + } } if tc.PostCheck != nil { - if err := tc.PostCheck(got); err != nil { + if err := tc.PostCheck(got.Msg); err != nil { t.Error(err) return } @@ -489,11 +518,11 @@ func TestDeleteTagTemplate(t *testing.T) { } ) ctx := user.NewContext(context.Background(), user.User{UUID: userUUID}) - ctx = grpc_interceptor.BuildContextWithNamespace(ctx, ns) + ctx = interceptor.BuildContextWithNamespace(ctx, ns) type testCase struct { Description string Request *compassv1beta1.DeleteTagTemplateRequest - ExpectStatus codes.Code + ExpectStatus connect.Code Setup func(context.Context, *mocks.TagService, *mocks.TagTemplateService) } @@ -501,7 +530,7 @@ func TestDeleteTagTemplate(t *testing.T) { { Description: `should return not found if template is not found`, Request: validRequest, - ExpectStatus: codes.NotFound, + ExpectStatus: connect.CodeNotFound, Setup: func(ctx context.Context, ts *mocks.TagService, tts *mocks.TagTemplateService) { tts.EXPECT().DeleteTemplate(ctx, sampleTemplate.URN).Return(tag.TemplateNotFoundError{URN: sampleTemplate.URN}) }, @@ -509,7 +538,7 @@ func TestDeleteTagTemplate(t *testing.T) { { Description: `should return status ok and template if domain template is found`, Request: validRequest, - ExpectStatus: codes.OK, + ExpectStatus: 0, Setup: func(ctx context.Context, ts *mocks.TagService, tts *mocks.TagTemplateService) { tts.EXPECT().DeleteTemplate(ctx, sampleTemplate.URN).Return(nil) }, @@ -533,11 +562,18 @@ func TestDeleteTagTemplate(t *testing.T) { handler := NewAPIServer(logger, mockNamespaceSvc, nil, nil, nil, mockTagSvc, mockTemplateSvc, mockUserSvc) - _, err := handler.DeleteTagTemplate(ctx, tc.Request) - code := status.Code(err) - if code != tc.ExpectStatus { - t.Errorf("expected handler to return Code %s, returned Code %sinstead", tc.ExpectStatus.String(), code.String()) - return + _, err := handler.DeleteTagTemplate(ctx, connect.NewRequest(tc.Request)) + if tc.ExpectStatus == 0 { + if err != nil { + t.Errorf("expected no error but got: %v", err) + return + } + } else { + code := connect.CodeOf(err) + if code != tc.ExpectStatus { + t.Errorf("expected handler to return Code %s, returned Code %s instead", tc.ExpectStatus.String(), code.String()) + return + } } }) } diff --git a/internal/server/v1beta1/tag_test.go b/internal/server/v1beta1/tag_test.go index 0d77d7c6..164b8cf2 100644 --- a/internal/server/v1beta1/tag_test.go +++ b/internal/server/v1beta1/tag_test.go @@ -4,21 +4,22 @@ import ( "context" "errors" "fmt" - "github.com/raystack/compass/core/namespace" - "github.com/raystack/compass/pkg/grpc_interceptor" "reflect" "testing" "time" + "connectrpc.com/connect" "github.com/google/go-cmp/cmp" "github.com/google/uuid" + "github.com/raystack/compass/core/namespace" "github.com/raystack/compass/core/tag" "github.com/raystack/compass/core/user" "github.com/raystack/compass/internal/server/v1beta1/mocks" - compassv1beta1 "github.com/raystack/compass/proto/raystack/compass/v1beta1" + "github.com/raystack/compass/pkg/server/interceptor" + compassv1beta1 "github.com/raystack/compass/proto/compassv1beta1" log "github.com/raystack/salt/observability/logger" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/status" + + "google.golang.org/protobuf/testing/protocmp" "google.golang.org/protobuf/types/known/structpb" "google.golang.org/protobuf/types/known/timestamppb" @@ -93,11 +94,11 @@ func TestGetTagByAssetAndTemplate(t *testing.T) { } ) ctx := user.NewContext(context.Background(), user.User{UUID: userUUID}) - ctx = grpc_interceptor.BuildContextWithNamespace(ctx, ns) + ctx = interceptor.BuildContextWithNamespace(ctx, ns) type testCase struct { Description string Request *compassv1beta1.GetTagByAssetAndTemplateRequest - ExpectStatus codes.Code + ExpectStatus connect.Code Setup func(context.Context, *mocks.TagService, *mocks.TagTemplateService) PostCheck func(resp *compassv1beta1.GetTagByAssetAndTemplateResponse) error } @@ -109,7 +110,7 @@ func TestGetTagByAssetAndTemplate(t *testing.T) { AssetId: "", TemplateUrn: "sample-template", }, - ExpectStatus: codes.InvalidArgument, + ExpectStatus: connect.CodeInvalidArgument, }, { Description: `should return invalid argument if template urn is empty`, @@ -117,7 +118,7 @@ func TestGetTagByAssetAndTemplate(t *testing.T) { AssetId: assetID, TemplateUrn: "", }, - ExpectStatus: codes.InvalidArgument, + ExpectStatus: connect.CodeInvalidArgument, }, { Description: `should return not found if template does not exist`, @@ -125,7 +126,7 @@ func TestGetTagByAssetAndTemplate(t *testing.T) { AssetId: assetID, TemplateUrn: sampleTemplate.URN, }, - ExpectStatus: codes.NotFound, + ExpectStatus: connect.CodeNotFound, Setup: func(ctx context.Context, ts *mocks.TagService, tts *mocks.TagTemplateService) { ts.EXPECT().FindTagByAssetIDAndTemplateURN(ctx, assetID, sampleTemplate.URN).Return(tag.Tag{}, tag.TemplateNotFoundError{URN: sampleTemplate.URN}) }, @@ -136,7 +137,7 @@ func TestGetTagByAssetAndTemplate(t *testing.T) { AssetId: assetID, TemplateUrn: sampleTemplate.URN, }, - ExpectStatus: codes.NotFound, + ExpectStatus: connect.CodeNotFound, Setup: func(ctx context.Context, ts *mocks.TagService, tts *mocks.TagTemplateService) { ts.EXPECT().FindTagByAssetIDAndTemplateURN(ctx, assetID, sampleTemplate.URN).Return(tag.Tag{}, tag.NotFoundError{ AssetID: assetID, @@ -150,7 +151,7 @@ func TestGetTagByAssetAndTemplate(t *testing.T) { AssetId: assetID, TemplateUrn: sampleTemplate.URN, }, - ExpectStatus: codes.Internal, + ExpectStatus: connect.CodeInternal, Setup: func(ctx context.Context, ts *mocks.TagService, tts *mocks.TagTemplateService) { ts.EXPECT().FindTagByAssetIDAndTemplateURN(ctx, assetID, sampleTemplate.URN).Return(tag.Tag{}, errors.New("unexpected error")) }, @@ -161,7 +162,7 @@ func TestGetTagByAssetAndTemplate(t *testing.T) { AssetId: assetID, TemplateUrn: sampleTemplate.URN, }, - ExpectStatus: codes.OK, + ExpectStatus: 0, Setup: func(ctx context.Context, ts *mocks.TagService, tts *mocks.TagTemplateService) { ts.EXPECT().FindTagByAssetIDAndTemplateURN(ctx, assetID, sampleTemplate.URN).Return(sampleTag, nil) }, @@ -212,14 +213,21 @@ func TestGetTagByAssetAndTemplate(t *testing.T) { handler := NewAPIServer(logger, mockNamespaceSvc, nil, nil, nil, mockTagSvc, mockTemplateSvc, mockUserSvc) - got, err := handler.GetTagByAssetAndTemplate(ctx, tc.Request) - code := status.Code(err) - if code != tc.ExpectStatus { - t.Errorf("expected handler to return Code %s, returned Code %sinstead", tc.ExpectStatus.String(), code.String()) - return + got, err := handler.GetTagByAssetAndTemplate(ctx, connect.NewRequest(tc.Request)) + if tc.ExpectStatus == 0 { + if err != nil { + t.Errorf("expected no error but got: %v", err) + return + } + } else { + code := connect.CodeOf(err) + if code != tc.ExpectStatus { + t.Errorf("expected handler to return Code %s, returned Code %s instead", tc.ExpectStatus.String(), code.String()) + return + } } if tc.PostCheck != nil { - if err := tc.PostCheck(got); err != nil { + if err := tc.PostCheck(got.Msg); err != nil { t.Error(err) return } @@ -247,11 +255,11 @@ func TestCreateTagAsset(t *testing.T) { } ) ctx := user.NewContext(context.Background(), user.User{UUID: userUUID}) - ctx = grpc_interceptor.BuildContextWithNamespace(ctx, ns) + ctx = interceptor.BuildContextWithNamespace(ctx, ns) type testCase struct { Description string Request *compassv1beta1.CreateTagAssetRequest - ExpectStatus codes.Code + ExpectStatus connect.Code Setup func(context.Context, *mocks.TagService, *mocks.TagTemplateService) PostCheck func(resp *compassv1beta1.CreateTagAssetResponse) error } @@ -264,7 +272,7 @@ func TestCreateTagAsset(t *testing.T) { TemplateUrn: sampleTagPB.GetTemplateUrn(), TagValues: sampleTagPB.TagValues, }, - ExpectStatus: codes.InvalidArgument, + ExpectStatus: connect.CodeInvalidArgument, }, { Description: `should return invalid argument if template urn is empty`, @@ -273,7 +281,7 @@ func TestCreateTagAsset(t *testing.T) { TemplateUrn: "", TagValues: sampleTagPB.TagValues, }, - ExpectStatus: codes.InvalidArgument, + ExpectStatus: connect.CodeInvalidArgument, }, { Description: `should return invalid argument if tag values is empty`, @@ -281,12 +289,12 @@ func TestCreateTagAsset(t *testing.T) { AssetId: assetID, TemplateUrn: sampleTagPB.GetTemplateUrn(), }, - ExpectStatus: codes.InvalidArgument, + ExpectStatus: connect.CodeInvalidArgument, }, { Description: `should return not found if template does not exist`, Request: validRequest, - ExpectStatus: codes.NotFound, + ExpectStatus: connect.CodeNotFound, Setup: func(ctx context.Context, ts *mocks.TagService, tts *mocks.TagTemplateService) { ts.EXPECT().CreateTag(ctx, ns, &sampleTag).Return(tag.TemplateNotFoundError{URN: sampleTemplate.URN}) }, @@ -294,7 +302,7 @@ func TestCreateTagAsset(t *testing.T) { { Description: `should return invalid argument if there is validation error`, Request: validRequest, - ExpectStatus: codes.InvalidArgument, + ExpectStatus: connect.CodeInvalidArgument, Setup: func(ctx context.Context, ts *mocks.TagService, tts *mocks.TagTemplateService) { ts.EXPECT().CreateTag(ctx, ns, &sampleTag).Return(tag.ValidationError{Err: errors.New("validation error")}) }, @@ -302,7 +310,7 @@ func TestCreateTagAsset(t *testing.T) { { Description: `should return internal server error if found error during insert`, Request: validRequest, - ExpectStatus: codes.Internal, + ExpectStatus: connect.CodeInternal, Setup: func(ctx context.Context, ts *mocks.TagService, tts *mocks.TagTemplateService) { ts.EXPECT().CreateTag(ctx, ns, &sampleTag).Return(errors.New("unexpected error during insert")) }, @@ -310,7 +318,7 @@ func TestCreateTagAsset(t *testing.T) { { Description: `should return already exist if found duplicated asset during insert`, Request: validRequest, - ExpectStatus: codes.AlreadyExists, + ExpectStatus: connect.CodeAlreadyExists, Setup: func(ctx context.Context, ts *mocks.TagService, tts *mocks.TagTemplateService) { ts.EXPECT().CreateTag(ctx, ns, &sampleTag).Return(tag.DuplicateError{}) }, @@ -318,7 +326,7 @@ func TestCreateTagAsset(t *testing.T) { { Description: `should return ok and domain is inserted if found no error`, Request: validRequest, - ExpectStatus: codes.OK, + ExpectStatus: 0, Setup: func(ctx context.Context, ts *mocks.TagService, tts *mocks.TagTemplateService) { ts.EXPECT().CreateTag(ctx, ns, &sampleTag).Return(nil) }, @@ -353,14 +361,21 @@ func TestCreateTagAsset(t *testing.T) { handler := NewAPIServer(logger, mockNamespaceSvc, nil, nil, nil, mockTagSvc, mockTemplateSvc, mockUserSvc) - got, err := handler.CreateTagAsset(ctx, tc.Request) - code := status.Code(err) - if code != tc.ExpectStatus { - t.Errorf("expected handler to return Code %s, returned Code %sinstead", tc.ExpectStatus.String(), code.String()) - return + got, err := handler.CreateTagAsset(ctx, connect.NewRequest(tc.Request)) + if tc.ExpectStatus == 0 { + if err != nil { + t.Errorf("expected no error but got: %v", err) + return + } + } else { + code := connect.CodeOf(err) + if code != tc.ExpectStatus { + t.Errorf("expected handler to return Code %s, returned Code %s instead", tc.ExpectStatus.String(), code.String()) + return + } } if tc.PostCheck != nil { - if err := tc.PostCheck(got); err != nil { + if err := tc.PostCheck(got.Msg); err != nil { t.Error(err) return } @@ -388,11 +403,11 @@ func TestUpdateTagAsset(t *testing.T) { } ) ctx := user.NewContext(context.Background(), user.User{UUID: userUUID}) - ctx = grpc_interceptor.BuildContextWithNamespace(ctx, ns) + ctx = interceptor.BuildContextWithNamespace(ctx, ns) type testCase struct { Description string Request *compassv1beta1.UpdateTagAssetRequest - ExpectStatus codes.Code + ExpectStatus connect.Code Setup func(context.Context, *mocks.TagService, *mocks.TagTemplateService) PostCheck func(resp *compassv1beta1.UpdateTagAssetResponse) error } @@ -405,7 +420,7 @@ func TestUpdateTagAsset(t *testing.T) { TemplateUrn: sampleTagPB.GetTemplateUrn(), TagValues: sampleTagPB.TagValues, }, - ExpectStatus: codes.InvalidArgument, + ExpectStatus: connect.CodeInvalidArgument, }, { Description: `should return invalid argument if template urn is empty`, @@ -414,7 +429,7 @@ func TestUpdateTagAsset(t *testing.T) { TemplateUrn: "", TagValues: sampleTagPB.TagValues, }, - ExpectStatus: codes.InvalidArgument, + ExpectStatus: connect.CodeInvalidArgument, }, { Description: `should return invalid argument if tag values is empty`, @@ -422,12 +437,12 @@ func TestUpdateTagAsset(t *testing.T) { AssetId: assetID, TemplateUrn: sampleTagPB.GetTemplateUrn(), }, - ExpectStatus: codes.InvalidArgument, + ExpectStatus: connect.CodeInvalidArgument, }, { Description: `should return not found if tag could not be found`, Request: validRequest, - ExpectStatus: codes.NotFound, + ExpectStatus: connect.CodeNotFound, Setup: func(ctx context.Context, ts *mocks.TagService, tts *mocks.TagTemplateService) { ts.EXPECT().UpdateTag(ctx, &sampleTag).Return(tag.NotFoundError{}) }, @@ -435,7 +450,7 @@ func TestUpdateTagAsset(t *testing.T) { { Description: `should return internal server error if found error during update`, Request: validRequest, - ExpectStatus: codes.Internal, + ExpectStatus: connect.CodeInternal, Setup: func(ctx context.Context, ts *mocks.TagService, tts *mocks.TagTemplateService) { ts.EXPECT().UpdateTag(ctx, &sampleTag).Return(errors.New("unexpected error during update")) }, @@ -443,7 +458,7 @@ func TestUpdateTagAsset(t *testing.T) { { Description: `should return ok and domain is updated if found no error`, Request: validRequest, - ExpectStatus: codes.OK, + ExpectStatus: 0, Setup: func(ctx context.Context, ts *mocks.TagService, tts *mocks.TagTemplateService) { ts.EXPECT().UpdateTag(ctx, &sampleTag).Return(nil) }, @@ -478,14 +493,21 @@ func TestUpdateTagAsset(t *testing.T) { handler := NewAPIServer(logger, mockNamespaceSvc, nil, nil, nil, mockTagSvc, mockTemplateSvc, mockUserSvc) - got, err := handler.UpdateTagAsset(ctx, tc.Request) - code := status.Code(err) - if code != tc.ExpectStatus { - t.Errorf("expected handler to return Code %s, returned Code %sinstead", tc.ExpectStatus.String(), code.String()) - return + got, err := handler.UpdateTagAsset(ctx, connect.NewRequest(tc.Request)) + if tc.ExpectStatus == 0 { + if err != nil { + t.Errorf("expected no error but got: %v", err) + return + } + } else { + code := connect.CodeOf(err) + if code != tc.ExpectStatus { + t.Errorf("expected handler to return Code %s, returned Code %s instead", tc.ExpectStatus.String(), code.String()) + return + } } if tc.PostCheck != nil { - if err := tc.PostCheck(got); err != nil { + if err := tc.PostCheck(got.Msg); err != nil { t.Error(err) return } @@ -506,11 +528,11 @@ func TestDeleteTagAsset(t *testing.T) { } ) ctx := user.NewContext(context.Background(), user.User{UUID: userUUID}) - ctx = grpc_interceptor.BuildContextWithNamespace(ctx, ns) + ctx = interceptor.BuildContextWithNamespace(ctx, ns) type testCase struct { Description string Request *compassv1beta1.DeleteTagAssetRequest - ExpectStatus codes.Code + ExpectStatus connect.Code Setup func(context.Context, *mocks.TagService, *mocks.TagTemplateService) } @@ -521,7 +543,7 @@ func TestDeleteTagAsset(t *testing.T) { AssetId: "", TemplateUrn: sampleTagPB.GetTemplateUrn(), }, - ExpectStatus: codes.InvalidArgument, + ExpectStatus: connect.CodeInvalidArgument, }, { Description: `should return invalid argument if template urn is empty`, @@ -529,7 +551,7 @@ func TestDeleteTagAsset(t *testing.T) { AssetId: assetID, TemplateUrn: "", }, - ExpectStatus: codes.InvalidArgument, + ExpectStatus: connect.CodeInvalidArgument, }, { Description: `should return not found if template does not exist`, @@ -537,7 +559,7 @@ func TestDeleteTagAsset(t *testing.T) { AssetId: assetID, TemplateUrn: sampleTagPB.GetTemplateUrn(), }, - ExpectStatus: codes.NotFound, + ExpectStatus: connect.CodeNotFound, Setup: func(ctx context.Context, ts *mocks.TagService, tts *mocks.TagTemplateService) { ts.EXPECT().DeleteTag(ctx, assetID, sampleTagPB.TemplateUrn).Return(tag.TemplateNotFoundError{}) }, @@ -548,7 +570,7 @@ func TestDeleteTagAsset(t *testing.T) { AssetId: assetID, TemplateUrn: sampleTagPB.GetTemplateUrn(), }, - ExpectStatus: codes.Internal, + ExpectStatus: connect.CodeInternal, Setup: func(ctx context.Context, ts *mocks.TagService, tts *mocks.TagTemplateService) { ts.EXPECT().DeleteTag(ctx, assetID, sampleTagPB.TemplateUrn).Return(errors.New("unexpected error")) }, @@ -559,7 +581,7 @@ func TestDeleteTagAsset(t *testing.T) { AssetId: assetID, TemplateUrn: sampleTagPB.GetTemplateUrn(), }, - ExpectStatus: codes.OK, + ExpectStatus: 0, Setup: func(ctx context.Context, ts *mocks.TagService, tts *mocks.TagTemplateService) { ts.EXPECT().DeleteTag(ctx, assetID, sampleTagPB.TemplateUrn).Return(nil) }, @@ -584,11 +606,18 @@ func TestDeleteTagAsset(t *testing.T) { handler := NewAPIServer(logger, mockNamespaceSvc, nil, nil, nil, mockTagSvc, mockTemplateSvc, mockUserSvc) - _, err := handler.DeleteTagAsset(ctx, tc.Request) - code := status.Code(err) - if code != tc.ExpectStatus { - t.Errorf("expected handler to return Code %s, returned Code %sinstead", tc.ExpectStatus.String(), code.String()) - return + _, err := handler.DeleteTagAsset(ctx, connect.NewRequest(tc.Request)) + if tc.ExpectStatus == 0 { + if err != nil { + t.Errorf("expected no error but got: %v", err) + return + } + } else { + code := connect.CodeOf(err) + if code != tc.ExpectStatus { + t.Errorf("expected handler to return Code %s, returned Code %s instead", tc.ExpectStatus.String(), code.String()) + return + } } }) } @@ -609,11 +638,11 @@ func TestGetAllTagsByAsset(t *testing.T) { } ) ctx := user.NewContext(context.Background(), user.User{UUID: userUUID}) - ctx = grpc_interceptor.BuildContextWithNamespace(ctx, ns) + ctx = interceptor.BuildContextWithNamespace(ctx, ns) type testCase struct { Description string Request *compassv1beta1.GetAllTagsByAssetRequest - ExpectStatus codes.Code + ExpectStatus connect.Code Setup func(context.Context, *mocks.TagService, *mocks.TagTemplateService) PostCheck func(resp *compassv1beta1.GetAllTagsByAssetResponse) error } @@ -624,12 +653,12 @@ func TestGetAllTagsByAsset(t *testing.T) { Request: &compassv1beta1.GetAllTagsByAssetRequest{ AssetId: "", }, - ExpectStatus: codes.InvalidArgument, + ExpectStatus: connect.CodeInvalidArgument, }, { Description: `should return internal server error if found unexpected error`, Request: validRequest, - ExpectStatus: codes.Internal, + ExpectStatus: connect.CodeInternal, Setup: func(ctx context.Context, ts *mocks.TagService, tts *mocks.TagTemplateService) { ts.EXPECT().GetTagsByAssetID(ctx, sampleTagPB.AssetId).Return(nil, errors.New("unexpected error")) }, @@ -637,7 +666,7 @@ func TestGetAllTagsByAsset(t *testing.T) { { Description: `should return ok and tags for the specified asset`, Request: validRequest, - ExpectStatus: codes.OK, + ExpectStatus: 0, Setup: func(ctx context.Context, ts *mocks.TagService, tts *mocks.TagTemplateService) { ts.EXPECT().GetTagsByAssetID(ctx, sampleTagPB.AssetId).Return([]tag.Tag{sampleTag}, nil) }, @@ -672,14 +701,21 @@ func TestGetAllTagsByAsset(t *testing.T) { handler := NewAPIServer(logger, mockNamespaceSvc, nil, nil, nil, mockTagSvc, mockTemplateSvc, mockUserSvc) - got, err := handler.GetAllTagsByAsset(ctx, tc.Request) - code := status.Code(err) - if code != tc.ExpectStatus { - t.Errorf("expected handler to return Code %s, returned Code %sinstead", tc.ExpectStatus.String(), code.String()) - return + got, err := handler.GetAllTagsByAsset(ctx, connect.NewRequest(tc.Request)) + if tc.ExpectStatus == 0 { + if err != nil { + t.Errorf("expected no error but got: %v", err) + return + } + } else { + code := connect.CodeOf(err) + if code != tc.ExpectStatus { + t.Errorf("expected handler to return Code %s, returned Code %s instead", tc.ExpectStatus.String(), code.String()) + return + } } if tc.PostCheck != nil { - if err := tc.PostCheck(got); err != nil { + if err := tc.PostCheck(got.Msg); err != nil { t.Error(err) return } diff --git a/internal/server/v1beta1/type.go b/internal/server/v1beta1/type.go index ab7191eb..97ec775b 100644 --- a/internal/server/v1beta1/type.go +++ b/internal/server/v1beta1/type.go @@ -3,26 +3,26 @@ package handlersv1beta1 import ( "context" "fmt" + + "connectrpc.com/connect" "github.com/raystack/compass/core/asset" - compassv1beta1 "github.com/raystack/compass/proto/raystack/compass/v1beta1" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/status" + compassv1beta1 "github.com/raystack/compass/proto/compassv1beta1" ) -func (server *APIServer) GetAllTypes(ctx context.Context, req *compassv1beta1.GetAllTypesRequest) (*compassv1beta1.GetAllTypesResponse, error) { - if err := req.ValidateAll(); err != nil { - return nil, status.Error(codes.InvalidArgument, bodyParserErrorMsg(err)) +func (server *APIServer) GetAllTypes(ctx context.Context, req *connect.Request[compassv1beta1.GetAllTypesRequest]) (*connect.Response[compassv1beta1.GetAllTypesResponse], error) { + if err := req.Msg.ValidateAll(); err != nil { + return nil, connect.NewError(connect.CodeInvalidArgument, fmt.Errorf("%s", bodyParserErrorMsg(err))) } flt, err := asset.NewFilterBuilder(). - Types(req.GetTypes()). - Services(req.GetServices()). - Q(req.GetQ()). - QFields(req.GetQFields()). - Data(req.GetData()). + Types(req.Msg.GetTypes()). + Services(req.Msg.GetServices()). + Q(req.Msg.GetQ()). + QFields(req.Msg.GetQFields()). + Data(req.Msg.GetData()). Build() if err != nil { - return nil, status.Error(codes.InvalidArgument, bodyParserErrorMsg(err)) + return nil, connect.NewError(connect.CodeInvalidArgument, fmt.Errorf("%s", bodyParserErrorMsg(err))) } typesNameMap, err := server.assetService.GetTypes(ctx, flt) @@ -39,7 +39,7 @@ func (server *APIServer) GetAllTypes(ctx context.Context, req *compassv1beta1.Ge }) } - return &compassv1beta1.GetAllTypesResponse{ + return connect.NewResponse(&compassv1beta1.GetAllTypesResponse{ Data: results, - }, nil + }), nil } diff --git a/internal/server/v1beta1/type_test.go b/internal/server/v1beta1/type_test.go index 1792d48f..0651e74a 100644 --- a/internal/server/v1beta1/type_test.go +++ b/internal/server/v1beta1/type_test.go @@ -4,19 +4,20 @@ import ( "context" "errors" "fmt" - "github.com/raystack/compass/core/namespace" - "github.com/raystack/compass/pkg/grpc_interceptor" "testing" + "connectrpc.com/connect" "github.com/google/go-cmp/cmp" "github.com/google/uuid" "github.com/raystack/compass/core/asset" + "github.com/raystack/compass/core/namespace" "github.com/raystack/compass/core/user" "github.com/raystack/compass/internal/server/v1beta1/mocks" - compassv1beta1 "github.com/raystack/compass/proto/raystack/compass/v1beta1" + "github.com/raystack/compass/pkg/server/interceptor" + compassv1beta1 "github.com/raystack/compass/proto/compassv1beta1" log "github.com/raystack/salt/observability/logger" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/status" + + "google.golang.org/protobuf/testing/protocmp" ) @@ -32,7 +33,7 @@ func TestGetTypes(t *testing.T) { ) type testCase struct { Description string - ExpectStatus codes.Code + ExpectStatus connect.Code Setup func(tc *testCase, ctx context.Context, as *mocks.AssetService) PostCheck func(resp *compassv1beta1.GetAllTypesResponse) error } @@ -40,21 +41,21 @@ func TestGetTypes(t *testing.T) { var testCases = []testCase{ { Description: "should return internal server error if failing to fetch types", - ExpectStatus: codes.Internal, + ExpectStatus: connect.CodeInternal, Setup: func(tc *testCase, ctx context.Context, as *mocks.AssetService) { as.EXPECT().GetTypes(ctx, asset.Filter{}).Return(map[asset.Type]int{}, errors.New("failed to fetch type")) }, }, { Description: "should return internal server error if failing to fetch counts", - ExpectStatus: codes.Internal, + ExpectStatus: connect.CodeInternal, Setup: func(tc *testCase, ctx context.Context, as *mocks.AssetService) { as.EXPECT().GetTypes(ctx, asset.Filter{}).Return(map[asset.Type]int{}, errors.New("failed to fetch assets count")) }, }, { Description: "should return all valid types with its asset count", - ExpectStatus: codes.OK, + ExpectStatus: 0, Setup: func(tc *testCase, ctx context.Context, as *mocks.AssetService) { as.EXPECT().GetTypes(ctx, asset.Filter{}).Return(map[asset.Type]int{ asset.Type("table"): 10, @@ -118,7 +119,7 @@ func TestGetTypes(t *testing.T) { for _, tc := range testCases { t.Run(tc.Description, func(t *testing.T) { ctx := user.NewContext(context.Background(), user.User{UUID: userUUID}) - ctx = grpc_interceptor.BuildContextWithNamespace(ctx, ns) + ctx = interceptor.BuildContextWithNamespace(ctx, ns) mockSvc := new(mocks.AssetService) logger := log.NewNoop() @@ -129,14 +130,21 @@ func TestGetTypes(t *testing.T) { handler := NewAPIServer(logger, nil, mockSvc, nil, nil, nil, nil, nil) - got, err := handler.GetAllTypes(ctx, &compassv1beta1.GetAllTypesRequest{}) - code := status.Code(err) - if code != tc.ExpectStatus { - t.Errorf("expected handler to return Code %s, returned Code %sinstead", tc.ExpectStatus.String(), code.String()) - return + got, err := handler.GetAllTypes(ctx, connect.NewRequest(&compassv1beta1.GetAllTypesRequest{})) + if tc.ExpectStatus == 0 { + if err != nil { + t.Errorf("expected no error but got: %v", err) + return + } + } else { + code := connect.CodeOf(err) + if code != tc.ExpectStatus { + t.Errorf("expected handler to return Code %s, returned Code %s instead", tc.ExpectStatus.String(), code.String()) + return + } } if tc.PostCheck != nil { - if err := tc.PostCheck(got); err != nil { + if err := tc.PostCheck(got.Msg); err != nil { t.Error(err) return } diff --git a/internal/server/v1beta1/user.go b/internal/server/v1beta1/user.go index e4e92df9..77f5cc76 100644 --- a/internal/server/v1beta1/user.go +++ b/internal/server/v1beta1/user.go @@ -4,18 +4,18 @@ package handlersv1beta1 import ( "context" "errors" - "github.com/raystack/compass/core/namespace" - "github.com/raystack/compass/pkg/grpc_interceptor" + "fmt" "strings" "time" + "connectrpc.com/connect" "github.com/raystack/compass/core/discussion" + "github.com/raystack/compass/core/namespace" "github.com/raystack/compass/core/star" "github.com/raystack/compass/core/user" "github.com/raystack/compass/core/validator" - compassv1beta1 "github.com/raystack/compass/proto/raystack/compass/v1beta1" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/status" + "github.com/raystack/compass/pkg/server/interceptor" + compassv1beta1 "github.com/raystack/compass/proto/compassv1beta1" "google.golang.org/protobuf/types/known/timestamppb" ) @@ -23,27 +23,27 @@ type UserService interface { ValidateUser(ctx context.Context, ns *namespace.Namespace, uuid, email string) (string, error) } -func (server *APIServer) GetUserStarredAssets(ctx context.Context, req *compassv1beta1.GetUserStarredAssetsRequest) (*compassv1beta1.GetUserStarredAssetsResponse, error) { - if err := req.ValidateAll(); err != nil { - return nil, status.Error(codes.InvalidArgument, bodyParserErrorMsg(err)) +func (server *APIServer) GetUserStarredAssets(ctx context.Context, req *connect.Request[compassv1beta1.GetUserStarredAssetsRequest]) (*connect.Response[compassv1beta1.GetUserStarredAssetsResponse], error) { + if err := req.Msg.ValidateAll(); err != nil { + return nil, connect.NewError(connect.CodeInvalidArgument, fmt.Errorf("%s", bodyParserErrorMsg(err))) } - ns := grpc_interceptor.FetchNamespaceFromContext(ctx) + ns := interceptor.FetchNamespaceFromContext(ctx) if _, err := server.validateUserInCtx(ctx, ns); err != nil { return nil, err } starFilter := star.Filter{ - Size: int(req.GetSize()), - Offset: int(req.GetOffset()), + Size: int(req.Msg.GetSize()), + Offset: int(req.Msg.GetOffset()), } - starredAssets, err := server.starService.GetStarredAssetsByUserID(ctx, starFilter, req.GetUserId()) + starredAssets, err := server.starService.GetStarredAssetsByUserID(ctx, starFilter, req.Msg.GetUserId()) if errors.Is(err, star.ErrEmptyUserID) || errors.As(err, new(star.InvalidError)) { - return nil, status.Error(codes.InvalidArgument, err.Error()) + return nil, connect.NewError(connect.CodeInvalidArgument, err) } if errors.As(err, new(star.NotFoundError)) { - return nil, status.Error(codes.NotFound, err.Error()) + return nil, connect.NewError(connect.CodeNotFound, err) } if err != nil { return nil, internalServerError(server.logger, err.Error()) @@ -58,33 +58,33 @@ func (server *APIServer) GetUserStarredAssets(ctx context.Context, req *compassv starredAssetsPB = append(starredAssetsPB, astPB) } - return &compassv1beta1.GetUserStarredAssetsResponse{ + return connect.NewResponse(&compassv1beta1.GetUserStarredAssetsResponse{ Data: starredAssetsPB, - }, nil + }), nil } -func (server *APIServer) GetMyStarredAssets(ctx context.Context, req *compassv1beta1.GetMyStarredAssetsRequest) (*compassv1beta1.GetMyStarredAssetsResponse, error) { - if err := req.ValidateAll(); err != nil { - return nil, status.Error(codes.InvalidArgument, bodyParserErrorMsg(err)) +func (server *APIServer) GetMyStarredAssets(ctx context.Context, req *connect.Request[compassv1beta1.GetMyStarredAssetsRequest]) (*connect.Response[compassv1beta1.GetMyStarredAssetsResponse], error) { + if err := req.Msg.ValidateAll(); err != nil { + return nil, connect.NewError(connect.CodeInvalidArgument, fmt.Errorf("%s", bodyParserErrorMsg(err))) } - ns := grpc_interceptor.FetchNamespaceFromContext(ctx) + ns := interceptor.FetchNamespaceFromContext(ctx) userID, err := server.validateUserInCtx(ctx, ns) if err != nil { return nil, err } starFilter := star.Filter{ - Size: int(req.GetSize()), - Offset: int(req.GetOffset()), + Size: int(req.Msg.GetSize()), + Offset: int(req.Msg.GetOffset()), } starredAssets, err := server.starService.GetStarredAssetsByUserID(ctx, starFilter, userID) if errors.Is(err, star.ErrEmptyUserID) || errors.As(err, new(star.InvalidError)) { - return nil, status.Error(codes.InvalidArgument, err.Error()) + return nil, connect.NewError(connect.CodeInvalidArgument, err) } if errors.As(err, new(star.NotFoundError)) { - return nil, status.Error(codes.NotFound, err.Error()) + return nil, connect.NewError(connect.CodeNotFound, err) } if err != nil { return nil, internalServerError(server.logger, err.Error()) @@ -99,27 +99,27 @@ func (server *APIServer) GetMyStarredAssets(ctx context.Context, req *compassv1b starredAssetsPB = append(starredAssetsPB, astPB) } - return &compassv1beta1.GetMyStarredAssetsResponse{ + return connect.NewResponse(&compassv1beta1.GetMyStarredAssetsResponse{ Data: starredAssetsPB, - }, nil + }), nil } -func (server *APIServer) GetMyStarredAsset(ctx context.Context, req *compassv1beta1.GetMyStarredAssetRequest) (*compassv1beta1.GetMyStarredAssetResponse, error) { - if err := req.ValidateAll(); err != nil { - return nil, status.Error(codes.InvalidArgument, bodyParserErrorMsg(err)) +func (server *APIServer) GetMyStarredAsset(ctx context.Context, req *connect.Request[compassv1beta1.GetMyStarredAssetRequest]) (*connect.Response[compassv1beta1.GetMyStarredAssetResponse], error) { + if err := req.Msg.ValidateAll(); err != nil { + return nil, connect.NewError(connect.CodeInvalidArgument, fmt.Errorf("%s", bodyParserErrorMsg(err))) } - ns := grpc_interceptor.FetchNamespaceFromContext(ctx) + ns := interceptor.FetchNamespaceFromContext(ctx) userID, err := server.validateUserInCtx(ctx, ns) if err != nil { return nil, err } - ast, err := server.starService.GetStarredAssetByUserID(ctx, userID, req.GetAssetId()) + ast, err := server.starService.GetStarredAssetByUserID(ctx, userID, req.Msg.GetAssetId()) if errors.Is(err, star.ErrEmptyAssetID) || errors.Is(err, star.ErrEmptyUserID) || errors.As(err, new(star.InvalidError)) { - return nil, status.Error(codes.InvalidArgument, err.Error()) + return nil, connect.NewError(connect.CodeInvalidArgument, err) } if errors.As(err, new(star.NotFoundError)) { - return nil, status.Error(codes.NotFound, err.Error()) + return nil, connect.NewError(connect.CodeNotFound, err) } if err != nil { return nil, internalServerError(server.logger, err.Error()) @@ -130,80 +130,80 @@ func (server *APIServer) GetMyStarredAsset(ctx context.Context, req *compassv1be return nil, internalServerError(server.logger, err.Error()) } - return &compassv1beta1.GetMyStarredAssetResponse{ + return connect.NewResponse(&compassv1beta1.GetMyStarredAssetResponse{ Data: astPB, - }, nil + }), nil } -func (server *APIServer) StarAsset(ctx context.Context, req *compassv1beta1.StarAssetRequest) (*compassv1beta1.StarAssetResponse, error) { - if err := req.ValidateAll(); err != nil { - return nil, status.Error(codes.InvalidArgument, bodyParserErrorMsg(err)) +func (server *APIServer) StarAsset(ctx context.Context, req *connect.Request[compassv1beta1.StarAssetRequest]) (*connect.Response[compassv1beta1.StarAssetResponse], error) { + if err := req.Msg.ValidateAll(); err != nil { + return nil, connect.NewError(connect.CodeInvalidArgument, fmt.Errorf("%s", bodyParserErrorMsg(err))) } - ns := grpc_interceptor.FetchNamespaceFromContext(ctx) + ns := interceptor.FetchNamespaceFromContext(ctx) userID, err := server.validateUserInCtx(ctx, ns) if err != nil { return nil, err } - starID, err := server.starService.Stars(ctx, ns, userID, req.GetAssetId()) + starID, err := server.starService.Stars(ctx, ns, userID, req.Msg.GetAssetId()) if err != nil { if errors.Is(err, star.ErrEmptyAssetID) || errors.Is(err, star.ErrEmptyUserID) || errors.As(err, new(star.InvalidError)) { - return nil, status.Error(codes.InvalidArgument, err.Error()) + return nil, connect.NewError(connect.CodeInvalidArgument, err) } if errors.As(err, new(star.UserNotFoundError)) { - return nil, status.Error(codes.InvalidArgument, err.Error()) + return nil, connect.NewError(connect.CodeInvalidArgument, err) } if errors.As(err, new(star.DuplicateRecordError)) { // idempotent - return &compassv1beta1.StarAssetResponse{ + return connect.NewResponse(&compassv1beta1.StarAssetResponse{ Id: starID, - }, nil + }), nil } return nil, internalServerError(server.logger, err.Error()) } - return &compassv1beta1.StarAssetResponse{ + return connect.NewResponse(&compassv1beta1.StarAssetResponse{ Id: starID, - }, nil + }), nil } -func (server *APIServer) UnstarAsset(ctx context.Context, req *compassv1beta1.UnstarAssetRequest) (*compassv1beta1.UnstarAssetResponse, error) { - if err := req.ValidateAll(); err != nil { - return nil, status.Error(codes.InvalidArgument, bodyParserErrorMsg(err)) +func (server *APIServer) UnstarAsset(ctx context.Context, req *connect.Request[compassv1beta1.UnstarAssetRequest]) (*connect.Response[compassv1beta1.UnstarAssetResponse], error) { + if err := req.Msg.ValidateAll(); err != nil { + return nil, connect.NewError(connect.CodeInvalidArgument, fmt.Errorf("%s", bodyParserErrorMsg(err))) } - ns := grpc_interceptor.FetchNamespaceFromContext(ctx) + ns := interceptor.FetchNamespaceFromContext(ctx) userID, err := server.validateUserInCtx(ctx, ns) if err != nil { return nil, err } - err = server.starService.Unstars(ctx, userID, req.GetAssetId()) + err = server.starService.Unstars(ctx, userID, req.Msg.GetAssetId()) if err != nil { if errors.Is(err, star.ErrEmptyAssetID) || errors.Is(err, star.ErrEmptyUserID) || errors.As(err, new(star.InvalidError)) { - return nil, status.Error(codes.InvalidArgument, err.Error()) + return nil, connect.NewError(connect.CodeInvalidArgument, err) } if errors.As(err, new(star.NotFoundError)) { - return nil, status.Error(codes.NotFound, err.Error()) + return nil, connect.NewError(connect.CodeNotFound, err) } return nil, internalServerError(server.logger, err.Error()) } - return &compassv1beta1.UnstarAssetResponse{}, nil + return connect.NewResponse(&compassv1beta1.UnstarAssetResponse{}), nil } -func (server *APIServer) GetMyDiscussions(ctx context.Context, req *compassv1beta1.GetMyDiscussionsRequest) (*compassv1beta1.GetMyDiscussionsResponse, error) { - if err := req.ValidateAll(); err != nil { - return nil, status.Error(codes.InvalidArgument, bodyParserErrorMsg(err)) +func (server *APIServer) GetMyDiscussions(ctx context.Context, req *connect.Request[compassv1beta1.GetMyDiscussionsRequest]) (*connect.Response[compassv1beta1.GetMyDiscussionsResponse], error) { + if err := req.Msg.ValidateAll(); err != nil { + return nil, connect.NewError(connect.CodeInvalidArgument, fmt.Errorf("%s", bodyParserErrorMsg(err))) } - ns := grpc_interceptor.FetchNamespaceFromContext(ctx) + ns := interceptor.FetchNamespaceFromContext(ctx) userID, err := server.validateUserInCtx(ctx, ns) if err != nil { return nil, err } - flt, err := server.buildGetDiscussionsFilter(req, userID) + flt, err := server.buildGetDiscussionsFilter(req.Msg, userID) if err != nil { - return nil, status.Error(codes.InvalidArgument, err.Error()) + return nil, connect.NewError(connect.CodeInvalidArgument, err) } dscs, err := server.discussionService.GetDiscussions(ctx, flt) @@ -216,9 +216,9 @@ func (server *APIServer) GetMyDiscussions(ctx context.Context, req *compassv1bet dscsPB = append(dscsPB, discussionToProto(dsc)) } - return &compassv1beta1.GetMyDiscussionsResponse{ + return connect.NewResponse(&compassv1beta1.GetMyDiscussionsResponse{ Data: dscsPB, - }, nil + }), nil } func (server *APIServer) buildGetDiscussionsFilter(req *compassv1beta1.GetMyDiscussionsRequest, userID string) (discussion.Filter, error) { diff --git a/internal/server/v1beta1/user_test.go b/internal/server/v1beta1/user_test.go index 3e38c902..d32d6aab 100644 --- a/internal/server/v1beta1/user_test.go +++ b/internal/server/v1beta1/user_test.go @@ -4,23 +4,22 @@ import ( "context" "errors" "fmt" - "github.com/raystack/compass/core/namespace" - "github.com/raystack/compass/pkg/grpc_interceptor" "reflect" "testing" "time" + "connectrpc.com/connect" "github.com/google/go-cmp/cmp" "github.com/google/uuid" "github.com/raystack/compass/core/asset" "github.com/raystack/compass/core/discussion" + "github.com/raystack/compass/core/namespace" "github.com/raystack/compass/core/star" "github.com/raystack/compass/core/user" "github.com/raystack/compass/internal/server/v1beta1/mocks" - compassv1beta1 "github.com/raystack/compass/proto/raystack/compass/v1beta1" + "github.com/raystack/compass/pkg/server/interceptor" + compassv1beta1 "github.com/raystack/compass/proto/compassv1beta1" log "github.com/raystack/salt/observability/logger" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/status" "google.golang.org/protobuf/testing/protocmp" "google.golang.org/protobuf/types/known/timestamppb" ) @@ -40,7 +39,7 @@ func TestGetUserStarredAssets(t *testing.T) { ) type testCase struct { Description string - ExpectStatus codes.Code + ExpectStatus connect.Code Setup func(context.Context, *mocks.StarService) PostCheck func(resp *compassv1beta1.GetUserStarredAssetsResponse) error } @@ -48,28 +47,28 @@ func TestGetUserStarredAssets(t *testing.T) { var testCases = []testCase{ { Description: "should return internal server error if failed to fetch starred", - ExpectStatus: codes.Internal, + ExpectStatus: connect.CodeInternal, Setup: func(ctx context.Context, ss *mocks.StarService) { ss.EXPECT().GetStarredAssetsByUserID(ctx, star.Filter{Offset: offset, Size: size}, userID).Return(nil, errors.New("failed to fetch starred")) }, }, { Description: "should return invalid argument if star repository return invalid error", - ExpectStatus: codes.InvalidArgument, + ExpectStatus: connect.CodeInvalidArgument, Setup: func(ctx context.Context, ss *mocks.StarService) { ss.EXPECT().GetStarredAssetsByUserID(ctx, star.Filter{Offset: offset, Size: size}, userID).Return(nil, star.InvalidError{}) }, }, { Description: "should return not found if starred not found", - ExpectStatus: codes.NotFound, + ExpectStatus: connect.CodeNotFound, Setup: func(ctx context.Context, ss *mocks.StarService) { ss.EXPECT().GetStarredAssetsByUserID(ctx, star.Filter{Offset: offset, Size: size}, userID).Return(nil, star.NotFoundError{}) }, }, { Description: "should return starred assets of a user if no error", - ExpectStatus: codes.OK, + ExpectStatus: 0, Setup: func(ctx context.Context, ss *mocks.StarService) { ss.EXPECT().GetStarredAssetsByUserID(ctx, star.Filter{Offset: offset, Size: size}, userID).Return([]asset.Asset{ {ID: "1", URN: "asset-urn-1", Type: "asset-type"}, @@ -108,7 +107,7 @@ func TestGetUserStarredAssets(t *testing.T) { for _, tc := range testCases { t.Run(tc.Description, func(t *testing.T) { ctx := user.NewContext(context.Background(), user.User{UUID: userUUID}) - ctx = grpc_interceptor.BuildContextWithNamespace(ctx, ns) + ctx = interceptor.BuildContextWithNamespace(ctx, ns) logger := log.NewNoop() @@ -126,18 +125,25 @@ func TestGetUserStarredAssets(t *testing.T) { handler := NewAPIServer(logger, mockNamespaceSvc, nil, mockStarSvc, nil, nil, nil, mockUserSvc) - got, err := handler.GetUserStarredAssets(ctx, &compassv1beta1.GetUserStarredAssetsRequest{ + got, err := handler.GetUserStarredAssets(ctx, connect.NewRequest(&compassv1beta1.GetUserStarredAssetsRequest{ UserId: userID, Offset: uint32(offset), Size: uint32(size), - }) - code := status.Code(err) - if code != tc.ExpectStatus { - t.Errorf("expected handler to return Code %s, returned Code %sinstead", tc.ExpectStatus.String(), code.String()) - return + })) + if tc.ExpectStatus == 0 { + if err != nil { + t.Errorf("expected no error but got: %v", err) + return + } + } else { + code := connect.CodeOf(err) + if code != tc.ExpectStatus { + t.Errorf("expected handler to return Code %s, returned Code %s instead", tc.ExpectStatus.String(), code.String()) + return + } } if tc.PostCheck != nil { - if err := tc.PostCheck(got); err != nil { + if err := tc.PostCheck(got.Msg); err != nil { t.Error(err) return } @@ -161,7 +167,7 @@ func TestGetMyStarredAssets(t *testing.T) { ) type testCase struct { Description string - ExpectStatus codes.Code + ExpectStatus connect.Code Setup func(context.Context, *mocks.StarService) PostCheck func(resp *compassv1beta1.GetMyStarredAssetsResponse) error } @@ -169,28 +175,28 @@ func TestGetMyStarredAssets(t *testing.T) { var testCases = []testCase{ { Description: "should return internal server error if failed to fetch starred", - ExpectStatus: codes.Internal, + ExpectStatus: connect.CodeInternal, Setup: func(ctx context.Context, ss *mocks.StarService) { ss.EXPECT().GetStarredAssetsByUserID(ctx, star.Filter{Offset: offset, Size: size}, userID).Return(nil, errors.New("failed to fetch starred")) }, }, { Description: "should return invalid argument if star repository return invalid error", - ExpectStatus: codes.InvalidArgument, + ExpectStatus: connect.CodeInvalidArgument, Setup: func(ctx context.Context, ss *mocks.StarService) { ss.EXPECT().GetStarredAssetsByUserID(ctx, star.Filter{Offset: offset, Size: size}, userID).Return(nil, star.InvalidError{}) }, }, { Description: "should return not found if starred not found", - ExpectStatus: codes.NotFound, + ExpectStatus: connect.CodeNotFound, Setup: func(ctx context.Context, ss *mocks.StarService) { ss.EXPECT().GetStarredAssetsByUserID(ctx, star.Filter{Offset: offset, Size: size}, userID).Return(nil, star.NotFoundError{}) }, }, { Description: "should return starred assets of a user if no error", - ExpectStatus: codes.OK, + ExpectStatus: 0, Setup: func(ctx context.Context, ss *mocks.StarService) { ss.EXPECT().GetStarredAssetsByUserID(ctx, star.Filter{Offset: offset, Size: size}, userID).Return([]asset.Asset{ {ID: "1", URN: "asset-urn-1", Type: "asset-type"}, @@ -229,7 +235,7 @@ func TestGetMyStarredAssets(t *testing.T) { for _, tc := range testCases { t.Run(tc.Description, func(t *testing.T) { ctx := user.NewContext(context.Background(), user.User{UUID: userUUID}) - ctx = grpc_interceptor.BuildContextWithNamespace(ctx, ns) + ctx = interceptor.BuildContextWithNamespace(ctx, ns) logger := log.NewNoop() @@ -247,17 +253,24 @@ func TestGetMyStarredAssets(t *testing.T) { handler := NewAPIServer(logger, mockNamespaceSvc, nil, mockStarSvc, nil, nil, nil, mockUserSvc) - got, err := handler.GetMyStarredAssets(ctx, &compassv1beta1.GetMyStarredAssetsRequest{ + got, err := handler.GetMyStarredAssets(ctx, connect.NewRequest(&compassv1beta1.GetMyStarredAssetsRequest{ Offset: uint32(offset), Size: uint32(size), - }) - code := status.Code(err) - if code != tc.ExpectStatus { - t.Errorf("expected handler to return Code %s, returned Code %sinstead", tc.ExpectStatus.String(), code.String()) - return + })) + if tc.ExpectStatus == 0 { + if err != nil { + t.Errorf("expected no error but got: %v", err) + return + } + } else { + code := connect.CodeOf(err) + if code != tc.ExpectStatus { + t.Errorf("expected handler to return Code %s, returned Code %s instead", tc.ExpectStatus.String(), code.String()) + return + } } if tc.PostCheck != nil { - if err := tc.PostCheck(got); err != nil { + if err := tc.PostCheck(got.Msg); err != nil { t.Error(err) return } @@ -282,7 +295,7 @@ func TestGetMyStarredAsset(t *testing.T) { ) type testCase struct { Description string - ExpectStatus codes.Code + ExpectStatus connect.Code Setup func(context.Context, *mocks.StarService) PostCheck func(resp *compassv1beta1.GetMyStarredAssetResponse) error } @@ -290,35 +303,35 @@ func TestGetMyStarredAsset(t *testing.T) { var testCases = []testCase{ { Description: "should return invalid argument if asset id is empty", - ExpectStatus: codes.InvalidArgument, + ExpectStatus: connect.CodeInvalidArgument, Setup: func(ctx context.Context, ss *mocks.StarService) { ss.EXPECT().GetStarredAssetByUserID(ctx, userID, assetID).Return(asset.Asset{}, star.ErrEmptyAssetID) }, }, { Description: "should return invalid argument if repository return invalid error", - ExpectStatus: codes.InvalidArgument, + ExpectStatus: connect.CodeInvalidArgument, Setup: func(ctx context.Context, ss *mocks.StarService) { ss.EXPECT().GetStarredAssetByUserID(ctx, userID, assetID).Return(asset.Asset{}, star.InvalidError{}) }, }, { Description: "should return not found if star not found", - ExpectStatus: codes.NotFound, + ExpectStatus: connect.CodeNotFound, Setup: func(ctx context.Context, ss *mocks.StarService) { ss.EXPECT().GetStarredAssetByUserID(ctx, userID, assetID).Return(asset.Asset{}, star.NotFoundError{}) }, }, { Description: "should return internal server error if failed to fetch a starred asset", - ExpectStatus: codes.Internal, + ExpectStatus: connect.CodeInternal, Setup: func(ctx context.Context, ss *mocks.StarService) { ss.EXPECT().GetStarredAssetByUserID(ctx, userID, assetID).Return(asset.Asset{}, errors.New("failed to fetch starred")) }, }, { Description: "should return a starred assets of a user if no error", - ExpectStatus: codes.OK, + ExpectStatus: 0, Setup: func(ctx context.Context, ss *mocks.StarService) { ss.EXPECT().GetStarredAssetByUserID(ctx, userID, assetID).Return(asset.Asset{Type: asset.Type(assetType), URN: assetURN}, nil) }, @@ -340,7 +353,7 @@ func TestGetMyStarredAsset(t *testing.T) { for _, tc := range testCases { t.Run(tc.Description, func(t *testing.T) { ctx := user.NewContext(context.Background(), user.User{UUID: userUUID}) - ctx = grpc_interceptor.BuildContextWithNamespace(ctx, ns) + ctx = interceptor.BuildContextWithNamespace(ctx, ns) logger := log.NewNoop() @@ -358,16 +371,23 @@ func TestGetMyStarredAsset(t *testing.T) { handler := NewAPIServer(logger, mockNamespaceSvc, nil, mockStarSvc, nil, nil, nil, mockUserSvc) - got, err := handler.GetMyStarredAsset(ctx, &compassv1beta1.GetMyStarredAssetRequest{ + got, err := handler.GetMyStarredAsset(ctx, connect.NewRequest(&compassv1beta1.GetMyStarredAssetRequest{ AssetId: assetID, - }) - code := status.Code(err) - if code != tc.ExpectStatus { - t.Errorf("expected handler to return Code %s, returned Code %sinstead", tc.ExpectStatus.String(), code.String()) - return + })) + if tc.ExpectStatus == 0 { + if err != nil { + t.Errorf("expected no error but got: %v", err) + return + } + } else { + code := connect.CodeOf(err) + if code != tc.ExpectStatus { + t.Errorf("expected handler to return Code %s, returned Code %s instead", tc.ExpectStatus.String(), code.String()) + return + } } if tc.PostCheck != nil { - if err := tc.PostCheck(got); err != nil { + if err := tc.PostCheck(got.Msg); err != nil { t.Error(err) return } @@ -390,49 +410,49 @@ func TestStarAsset(t *testing.T) { ) type testCase struct { Description string - ExpectStatus codes.Code + ExpectStatus connect.Code Setup func(context.Context, *mocks.StarService) } var testCases = []testCase{ { Description: "should return invalid argument if asset id in param is invalid", - ExpectStatus: codes.InvalidArgument, + ExpectStatus: connect.CodeInvalidArgument, Setup: func(ctx context.Context, ss *mocks.StarService) { ss.EXPECT().Stars(ctx, ns, userID, assetID).Return("", star.ErrEmptyAssetID) }, }, { Description: "should return invalid argument if star repository return invalid error", - ExpectStatus: codes.InvalidArgument, + ExpectStatus: connect.CodeInvalidArgument, Setup: func(ctx context.Context, ss *mocks.StarService) { ss.EXPECT().Stars(ctx, ns, userID, assetID).Return("", star.InvalidError{}) }, }, { Description: "should return invalid argument if user not found", - ExpectStatus: codes.InvalidArgument, + ExpectStatus: connect.CodeInvalidArgument, Setup: func(ctx context.Context, ss *mocks.StarService) { ss.EXPECT().Stars(ctx, ns, userID, assetID).Return("", star.UserNotFoundError{UserID: userID}) }, }, { Description: "should return internal server error if failed to star an asset", - ExpectStatus: codes.Internal, + ExpectStatus: connect.CodeInternal, Setup: func(ctx context.Context, ss *mocks.StarService) { ss.EXPECT().Stars(ctx, ns, userID, assetID).Return("", errors.New("failed to star an asset")) }, }, { Description: "should return ok if starring success", - ExpectStatus: codes.OK, + ExpectStatus: 0, Setup: func(ctx context.Context, ss *mocks.StarService) { ss.EXPECT().Stars(ctx, ns, userID, assetID).Return("1234", nil) }, }, { Description: "should return ok if asset is already starred", - ExpectStatus: codes.OK, + ExpectStatus: 0, Setup: func(ctx context.Context, ss *mocks.StarService) { ss.EXPECT().Stars(ctx, ns, userID, assetID).Return("", star.DuplicateRecordError{}) }, @@ -441,7 +461,7 @@ func TestStarAsset(t *testing.T) { for _, tc := range testCases { t.Run(tc.Description, func(t *testing.T) { ctx := user.NewContext(context.Background(), user.User{UUID: userUUID}) - ctx = grpc_interceptor.BuildContextWithNamespace(ctx, ns) + ctx = interceptor.BuildContextWithNamespace(ctx, ns) logger := log.NewNoop() @@ -459,13 +479,20 @@ func TestStarAsset(t *testing.T) { handler := NewAPIServer(logger, mockNamespaceSvc, nil, mockStarSvc, nil, nil, nil, mockUserSvc) - _, err := handler.StarAsset(ctx, &compassv1beta1.StarAssetRequest{ + _, err := handler.StarAsset(ctx, connect.NewRequest(&compassv1beta1.StarAssetRequest{ AssetId: assetID, - }) - code := status.Code(err) - if code != tc.ExpectStatus { - t.Errorf("expected handler to return Code %s, returned Code %sinstead", tc.ExpectStatus.String(), code.String()) - return + })) + if tc.ExpectStatus == 0 { + if err != nil { + t.Errorf("expected no error but got: %v", err) + return + } + } else { + code := connect.CodeOf(err) + if code != tc.ExpectStatus { + t.Errorf("expected handler to return Code %s, returned Code %s instead", tc.ExpectStatus.String(), code.String()) + return + } } }) } @@ -485,35 +512,35 @@ func TestUnstarAsset(t *testing.T) { ) type testCase struct { Description string - ExpectStatus codes.Code + ExpectStatus connect.Code Setup func(context.Context, *mocks.StarService) } var testCases = []testCase{ { Description: "should return invalid argument if asset id in param is empty", - ExpectStatus: codes.InvalidArgument, + ExpectStatus: connect.CodeInvalidArgument, Setup: func(ctx context.Context, ss *mocks.StarService) { ss.EXPECT().Unstars(ctx, userID, assetID).Return(star.ErrEmptyAssetID) }, }, { Description: "should return invalid argument if star repository return invalid error", - ExpectStatus: codes.InvalidArgument, + ExpectStatus: connect.CodeInvalidArgument, Setup: func(ctx context.Context, ss *mocks.StarService) { ss.EXPECT().Unstars(ctx, userID, assetID).Return(star.InvalidError{}) }, }, { Description: "should return internal server error if failed to unstar an asset", - ExpectStatus: codes.Internal, + ExpectStatus: connect.CodeInternal, Setup: func(ctx context.Context, ss *mocks.StarService) { ss.EXPECT().Unstars(ctx, userID, assetID).Return(errors.New("failed to star an asset")) }, }, { Description: "should return ok if unstarring success", - ExpectStatus: codes.OK, + ExpectStatus: 0, Setup: func(ctx context.Context, ss *mocks.StarService) { ss.EXPECT().Unstars(ctx, userID, assetID).Return(nil) }, @@ -522,7 +549,7 @@ func TestUnstarAsset(t *testing.T) { for _, tc := range testCases { t.Run(tc.Description, func(t *testing.T) { ctx := user.NewContext(context.Background(), user.User{UUID: userUUID}) - ctx = grpc_interceptor.BuildContextWithNamespace(ctx, ns) + ctx = interceptor.BuildContextWithNamespace(ctx, ns) logger := log.NewNoop() @@ -540,13 +567,20 @@ func TestUnstarAsset(t *testing.T) { handler := NewAPIServer(logger, mockNamespaceSvc, nil, mockStarSvc, nil, nil, nil, mockUserSvc) - _, err := handler.UnstarAsset(ctx, &compassv1beta1.UnstarAssetRequest{ + _, err := handler.UnstarAsset(ctx, connect.NewRequest(&compassv1beta1.UnstarAssetRequest{ AssetId: assetID, - }) - code := status.Code(err) - if code != tc.ExpectStatus { - t.Errorf("expected handler to return Code %s, returned Code %sinstead", tc.ExpectStatus.String(), code.String()) - return + })) + if tc.ExpectStatus == 0 { + if err != nil { + t.Errorf("expected no error but got: %v", err) + return + } + } else { + code := connect.CodeOf(err) + if code != tc.ExpectStatus { + t.Errorf("expected handler to return Code %s, returned Code %s instead", tc.ExpectStatus.String(), code.String()) + return + } } }) } @@ -565,7 +599,7 @@ func TestGetMyDiscussions(t *testing.T) { ) type testCase struct { Description string - ExpectStatus codes.Code + ExpectStatus connect.Code Request *compassv1beta1.GetMyDiscussionsRequest Setup func(context.Context, *mocks.DiscussionService) PostCheck func(resp *compassv1beta1.GetMyDiscussionsResponse) error @@ -575,7 +609,7 @@ func TestGetMyDiscussions(t *testing.T) { { Description: `should return internal server error if fetching fails`, Request: &compassv1beta1.GetMyDiscussionsRequest{}, - ExpectStatus: codes.Internal, + ExpectStatus: connect.CodeInternal, Setup: func(ctx context.Context, ds *mocks.DiscussionService) { ds.EXPECT().GetDiscussions(ctx, discussion.Filter{ Type: "all", @@ -599,7 +633,7 @@ func TestGetMyDiscussions(t *testing.T) { Size: 30, Offset: 50, }, - ExpectStatus: codes.OK, + ExpectStatus: 0, Setup: func(ctx context.Context, ds *mocks.DiscussionService) { ds.EXPECT().GetDiscussions(ctx, discussion.Filter{ Type: "issues", @@ -619,7 +653,7 @@ func TestGetMyDiscussions(t *testing.T) { Request: &compassv1beta1.GetMyDiscussionsRequest{ Filter: "all", }, - ExpectStatus: codes.OK, + ExpectStatus: 0, Setup: func(ctx context.Context, ds *mocks.DiscussionService) { ds.EXPECT().GetDiscussions(ctx, discussion.Filter{ Type: "all", @@ -634,7 +668,7 @@ func TestGetMyDiscussions(t *testing.T) { }, { Description: `should set filter to default if empty`, - ExpectStatus: codes.OK, + ExpectStatus: 0, Request: &compassv1beta1.GetMyDiscussionsRequest{}, Setup: func(ctx context.Context, ds *mocks.DiscussionService) { ds.EXPECT().GetDiscussions(ctx, discussion.Filter{ @@ -651,7 +685,7 @@ func TestGetMyDiscussions(t *testing.T) { }, { Description: "should return ok along with list of discussions", - ExpectStatus: codes.OK, + ExpectStatus: 0, Request: &compassv1beta1.GetMyDiscussionsRequest{}, Setup: func(ctx context.Context, ds *mocks.DiscussionService) { ds.EXPECT().GetDiscussions(ctx, discussion.Filter{ @@ -684,7 +718,7 @@ func TestGetMyDiscussions(t *testing.T) { for _, tc := range testCases { t.Run(tc.Description, func(t *testing.T) { ctx := user.NewContext(context.Background(), user.User{UUID: userUUID}) - ctx = grpc_interceptor.BuildContextWithNamespace(ctx, ns) + ctx = interceptor.BuildContextWithNamespace(ctx, ns) logger := log.NewNoop() @@ -702,14 +736,21 @@ func TestGetMyDiscussions(t *testing.T) { handler := NewAPIServer(logger, mockNamespaceSvc, nil, nil, mockDiscussionSvc, nil, nil, mockUserSvc) - got, err := handler.GetMyDiscussions(ctx, tc.Request) - code := status.Code(err) - if code != tc.ExpectStatus { - t.Errorf("expected handler to return Code %s, returned Code %sinstead", tc.ExpectStatus.String(), code.String()) - return + got, err := handler.GetMyDiscussions(ctx, connect.NewRequest(tc.Request)) + if tc.ExpectStatus == 0 { + if err != nil { + t.Errorf("expected no error but got: %v", err) + return + } + } else { + code := connect.CodeOf(err) + if code != tc.ExpectStatus { + t.Errorf("expected handler to return Code %s, returned Code %s instead", tc.ExpectStatus.String(), code.String()) + return + } } if tc.PostCheck != nil { - if err := tc.PostCheck(got); err != nil { + if err := tc.PostCheck(got.Msg); err != nil { t.Error(err) return } diff --git a/internal/store/postgres/asset_repository_test.go b/internal/store/postgres/asset_repository_test.go index bc9433b3..30b1fff8 100644 --- a/internal/store/postgres/asset_repository_test.go +++ b/internal/store/postgres/asset_repository_test.go @@ -11,7 +11,7 @@ import ( "time" "github.com/raystack/compass/core/namespace" - "github.com/raystack/compass/pkg/grpc_interceptor" + "github.com/raystack/compass/pkg/server/interceptor" _ "embed" @@ -60,7 +60,7 @@ func (r *AssetRepositoryTestSuite) SetupSuite() { State: namespace.DedicatedState, Metadata: nil, } - r.ctx = grpc_interceptor.BuildContextWithNamespace(context.Background(), r.ns) + r.ctx = interceptor.BuildContextWithNamespace(context.Background(), r.ns) r.userRepo, err = postgres.NewUserRepository(r.client) if err != nil { r.T().Fatal(err) diff --git a/internal/store/postgres/discussion_repository_test.go b/internal/store/postgres/discussion_repository_test.go index 4af4e3c5..3fc7ad7e 100644 --- a/internal/store/postgres/discussion_repository_test.go +++ b/internal/store/postgres/discussion_repository_test.go @@ -5,7 +5,7 @@ import ( "fmt" "github.com/google/uuid" "github.com/raystack/compass/core/namespace" - "github.com/raystack/compass/pkg/grpc_interceptor" + "github.com/raystack/compass/pkg/server/interceptor" "testing" "github.com/raystack/compass/core/asset" @@ -39,7 +39,7 @@ func (r *DiscussionRepositoryTestSuite) SetupSuite() { State: namespace.DedicatedState, Metadata: nil, } - r.ctx = grpc_interceptor.BuildContextWithNamespace(context.Background(), r.ns) + r.ctx = interceptor.BuildContextWithNamespace(context.Background(), r.ns) logger := log.NewLogrus() r.client, r.pool, r.resource, err = newTestClient(logger) diff --git a/internal/store/postgres/lineage_repository_test.go b/internal/store/postgres/lineage_repository_test.go index 07483cec..c1d4d469 100644 --- a/internal/store/postgres/lineage_repository_test.go +++ b/internal/store/postgres/lineage_repository_test.go @@ -5,7 +5,7 @@ import ( "fmt" "github.com/google/uuid" "github.com/raystack/compass/core/namespace" - "github.com/raystack/compass/pkg/grpc_interceptor" + "github.com/raystack/compass/pkg/server/interceptor" "testing" "github.com/raystack/compass/core/asset" @@ -40,7 +40,7 @@ func (r *LineageRepositoryTestSuite) SetupSuite() { State: namespace.SharedState, Metadata: nil, } - r.ctx = grpc_interceptor.BuildContextWithNamespace(context.Background(), r.ns) + r.ctx = interceptor.BuildContextWithNamespace(context.Background(), r.ns) r.repository, err = postgres.NewLineageRepository(r.client) if err != nil { diff --git a/internal/store/postgres/namespace_repository.go b/internal/store/postgres/namespace_repository.go index c2af2712..401af09d 100644 --- a/internal/store/postgres/namespace_repository.go +++ b/internal/store/postgres/namespace_repository.go @@ -15,9 +15,6 @@ const ( namespaceTable = "namespaces" ) -var ( - ErrNamespaceNotFound = errors.New("namespace not found") -) type NamespaceRepository struct { client *Client @@ -88,7 +85,7 @@ func (n *NamespaceRepository) GetByName(ctx context.Context, name string) (*name var nsModel NamespaceModel if err := n.client.GetContext(ctx, &nsModel, query, args...); err != nil { if errors.Is(err, sql.ErrNoRows) { - return nil, ErrNamespaceNotFound + return nil, namespace.ErrNotFound } return nil, err } @@ -106,7 +103,7 @@ func (n *NamespaceRepository) GetByID(ctx context.Context, uuid uuid.UUID) (*nam var nsModel NamespaceModel if err := n.client.GetContext(ctx, &nsModel, query, args...); err != nil { if errors.Is(err, sql.ErrNoRows) { - return nil, ErrNamespaceNotFound + return nil, namespace.ErrNotFound } return nil, err } diff --git a/internal/store/postgres/postgres.go b/internal/store/postgres/postgres.go index b989880d..35862a15 100644 --- a/internal/store/postgres/postgres.go +++ b/internal/store/postgres/postgres.go @@ -14,7 +14,7 @@ import ( "github.com/jackc/pgx/v5/pgconn" _ "github.com/jackc/pgx/v5/stdlib" "github.com/jmoiron/sqlx" - "github.com/raystack/compass/pkg/grpc_interceptor" + "github.com/raystack/compass/pkg/server/interceptor" // Register database postgres _ "github.com/golang-migrate/migrate/v4/database/postgres" @@ -262,5 +262,5 @@ func isValidUUID(u string) bool { } func namespaceFromContext(ctx context.Context) uuid.UUID { - return grpc_interceptor.FetchNamespaceFromContext(ctx).ID + return interceptor.FetchNamespaceFromContext(ctx).ID } diff --git a/internal/store/postgres/star_repository_test.go b/internal/store/postgres/star_repository_test.go index ca79304c..a5cc9375 100644 --- a/internal/store/postgres/star_repository_test.go +++ b/internal/store/postgres/star_repository_test.go @@ -4,7 +4,7 @@ import ( "context" "fmt" "github.com/raystack/compass/core/namespace" - "github.com/raystack/compass/pkg/grpc_interceptor" + "github.com/raystack/compass/pkg/server/interceptor" "testing" "github.com/google/uuid" @@ -42,7 +42,7 @@ func (r *StarRepositoryTestSuite) SetupSuite() { r.T().Fatal(err) } - r.ctx = grpc_interceptor.BuildContextWithNamespace(context.Background(), r.ns) + r.ctx = interceptor.BuildContextWithNamespace(context.Background(), r.ns) r.repository, err = postgres.NewStarRepository(r.client) if err != nil { r.T().Fatal(err) diff --git a/internal/store/postgres/tag_repository_test.go b/internal/store/postgres/tag_repository_test.go index dfb16a34..d76d2bec 100644 --- a/internal/store/postgres/tag_repository_test.go +++ b/internal/store/postgres/tag_repository_test.go @@ -4,7 +4,7 @@ import ( "context" "fmt" "github.com/raystack/compass/core/namespace" - "github.com/raystack/compass/pkg/grpc_interceptor" + "github.com/raystack/compass/pkg/server/interceptor" "sort" "testing" @@ -43,7 +43,7 @@ func (r *TagRepositoryTestSuite) SetupSuite() { State: namespace.SharedState, Metadata: nil, } - r.ctx = grpc_interceptor.BuildContextWithNamespace(context.Background(), r.ns) + r.ctx = interceptor.BuildContextWithNamespace(context.Background(), r.ns) r.repository, err = postgres.NewTagRepository(r.client) if err != nil { r.T().Fatal(err) diff --git a/internal/store/postgres/tag_template_repository_test.go b/internal/store/postgres/tag_template_repository_test.go index c2d1cb19..0ac97d13 100644 --- a/internal/store/postgres/tag_template_repository_test.go +++ b/internal/store/postgres/tag_template_repository_test.go @@ -5,7 +5,7 @@ import ( "encoding/json" "github.com/google/uuid" "github.com/raystack/compass/core/namespace" - "github.com/raystack/compass/pkg/grpc_interceptor" + "github.com/raystack/compass/pkg/server/interceptor" "testing" "time" @@ -40,7 +40,7 @@ func (r *TagTemplateRepositoryTestSuite) SetupSuite() { State: namespace.SharedState, Metadata: nil, } - r.ctx = grpc_interceptor.BuildContextWithNamespace(context.Background(), r.ns) + r.ctx = interceptor.BuildContextWithNamespace(context.Background(), r.ns) r.repository, err = postgres.NewTagTemplateRepository(r.client) if err != nil { r.T().Fatal(err) diff --git a/internal/store/postgres/user_repository_test.go b/internal/store/postgres/user_repository_test.go index 05d353fa..076a2a14 100644 --- a/internal/store/postgres/user_repository_test.go +++ b/internal/store/postgres/user_repository_test.go @@ -4,7 +4,7 @@ import ( "context" "fmt" "github.com/raystack/compass/core/namespace" - "github.com/raystack/compass/pkg/grpc_interceptor" + "github.com/raystack/compass/pkg/server/interceptor" "testing" "github.com/google/uuid" @@ -40,7 +40,7 @@ func (r *UserRepositoryTestSuite) SetupSuite() { State: namespace.SharedState, Metadata: nil, } - r.ctx = grpc_interceptor.BuildContextWithNamespace(context.Background(), r.ns) + r.ctx = interceptor.BuildContextWithNamespace(context.Background(), r.ns) r.repository, err = postgres.NewUserRepository(r.client) if err != nil { r.T().Fatal(err) diff --git a/main.go b/main.go index b559b7af..46ec37b6 100644 --- a/main.go +++ b/main.go @@ -2,14 +2,15 @@ package main import ( "context" + "errors" "fmt" "os" "os/signal" "strings" "syscall" + "connectrpc.com/connect" "github.com/raystack/compass/cli" - "google.golang.org/grpc/status" ) const ( @@ -43,8 +44,8 @@ func main() { } func printError(err error) { - if s, ok := status.FromError(err); ok { - fmt.Fprintf(os.Stderr, "Code: %s Error: %s\n", s.Code(), s.Message()) + if connectErr := new(connect.Error); errors.As(err, &connectErr) { + fmt.Fprintf(os.Stderr, "Code: %s Error: %s\n", connectErr.Code(), connectErr.Message()) return } fmt.Fprintln(os.Stderr, err) diff --git a/pkg/grpc_interceptor/interceptor_test.go b/pkg/grpc_interceptor/interceptor_test.go deleted file mode 100644 index 85921201..00000000 --- a/pkg/grpc_interceptor/interceptor_test.go +++ /dev/null @@ -1 +0,0 @@ -package grpc_interceptor diff --git a/pkg/grpc_interceptor/mocks/namespace_service.go b/pkg/grpc_interceptor/mocks/namespace_service.go deleted file mode 100644 index 5a8c4d14..00000000 --- a/pkg/grpc_interceptor/mocks/namespace_service.go +++ /dev/null @@ -1,151 +0,0 @@ -// Code generated by mockery v2.20.2. DO NOT EDIT. - -package mocks - -import ( - context "context" - - mock "github.com/stretchr/testify/mock" - - namespace "github.com/raystack/compass/core/namespace" - - uuid "github.com/google/uuid" -) - -// NamespaceService is an autogenerated mock type for the NamespaceService type -type NamespaceService struct { - mock.Mock -} - -type NamespaceService_Expecter struct { - mock *mock.Mock -} - -func (_m *NamespaceService) EXPECT() *NamespaceService_Expecter { - return &NamespaceService_Expecter{mock: &_m.Mock} -} - -// GetByID provides a mock function with given fields: ctx, id -func (_m *NamespaceService) GetByID(ctx context.Context, id uuid.UUID) (*namespace.Namespace, error) { - ret := _m.Called(ctx, id) - - var r0 *namespace.Namespace - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, uuid.UUID) (*namespace.Namespace, error)); ok { - return rf(ctx, id) - } - if rf, ok := ret.Get(0).(func(context.Context, uuid.UUID) *namespace.Namespace); ok { - r0 = rf(ctx, id) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*namespace.Namespace) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, uuid.UUID) error); ok { - r1 = rf(ctx, id) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// NamespaceService_GetByID_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetByID' -type NamespaceService_GetByID_Call struct { - *mock.Call -} - -// GetByID is a helper method to define mock.On call -// - ctx context.Context -// - id uuid.UUID -func (_e *NamespaceService_Expecter) GetByID(ctx interface{}, id interface{}) *NamespaceService_GetByID_Call { - return &NamespaceService_GetByID_Call{Call: _e.mock.On("GetByID", ctx, id)} -} - -func (_c *NamespaceService_GetByID_Call) Run(run func(ctx context.Context, id uuid.UUID)) *NamespaceService_GetByID_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(uuid.UUID)) - }) - return _c -} - -func (_c *NamespaceService_GetByID_Call) Return(_a0 *namespace.Namespace, _a1 error) *NamespaceService_GetByID_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *NamespaceService_GetByID_Call) RunAndReturn(run func(context.Context, uuid.UUID) (*namespace.Namespace, error)) *NamespaceService_GetByID_Call { - _c.Call.Return(run) - return _c -} - -// GetByName provides a mock function with given fields: ctx, name -func (_m *NamespaceService) GetByName(ctx context.Context, name string) (*namespace.Namespace, error) { - ret := _m.Called(ctx, name) - - var r0 *namespace.Namespace - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string) (*namespace.Namespace, error)); ok { - return rf(ctx, name) - } - if rf, ok := ret.Get(0).(func(context.Context, string) *namespace.Namespace); ok { - r0 = rf(ctx, name) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*namespace.Namespace) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { - r1 = rf(ctx, name) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// NamespaceService_GetByName_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetByName' -type NamespaceService_GetByName_Call struct { - *mock.Call -} - -// GetByName is a helper method to define mock.On call -// - ctx context.Context -// - name string -func (_e *NamespaceService_Expecter) GetByName(ctx interface{}, name interface{}) *NamespaceService_GetByName_Call { - return &NamespaceService_GetByName_Call{Call: _e.mock.On("GetByName", ctx, name)} -} - -func (_c *NamespaceService_GetByName_Call) Run(run func(ctx context.Context, name string)) *NamespaceService_GetByName_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *NamespaceService_GetByName_Call) Return(_a0 *namespace.Namespace, _a1 error) *NamespaceService_GetByName_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *NamespaceService_GetByName_Call) RunAndReturn(run func(context.Context, string) (*namespace.Namespace, error)) *NamespaceService_GetByName_Call { - _c.Call.Return(run) - return _c -} - -type mockConstructorTestingTNewNamespaceService interface { - mock.TestingT - Cleanup(func()) -} - -// NewNamespaceService creates a new instance of NamespaceService. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewNamespaceService(t mockConstructorTestingTNewNamespaceService) *NamespaceService { - mock := &NamespaceService{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/pkg/grpc_interceptor/namespace_test.go b/pkg/grpc_interceptor/namespace_test.go deleted file mode 100644 index e6352db8..00000000 --- a/pkg/grpc_interceptor/namespace_test.go +++ /dev/null @@ -1,131 +0,0 @@ -package grpc_interceptor_test - -import ( - "context" - "github.com/google/uuid" - "github.com/raystack/compass/core/namespace" - "github.com/raystack/compass/internal/client" - "github.com/raystack/compass/pkg/grpc_interceptor" - "github.com/raystack/compass/pkg/grpc_interceptor/mocks" - "google.golang.org/grpc/metadata" - "reflect" - "testing" -) - -func TestNamespaceUnaryInterceptor(t *testing.T) { - type args struct { - service *mocks.NamespaceService - ctx context.Context - } - type wants struct { - ns *namespace.Namespace - err error - } - mockedID := uuid.MustParse("e167aaea-ca00-4ec1-8f0d-04c067da54b1") - ns := &namespace.Namespace{ - ID: mockedID, - Name: "umbrella", - State: namespace.SharedState, - Metadata: nil, - } - // jwtWithNamespaceID contains namespace_id: "e167aaea-ca00-4ec1-8f0d-04c067da54b1" - jwtWithNamespaceID := `eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwibmFtZXNwYWNlX2lkIjoiZTE2N2FhZWEtY2EwMC00ZWMxLThmMGQtMDRjMDY3ZGE1NGIxIiwiaWF0IjoxNjc5NzI2MTcxLCJleHAiOjI2Nzk3Mjk3NzF9.2KVJnE9wICA7SqK6aIex0Bzx7Sz9csL-3rfib9jI2fQ` - - tests := []struct { - name string - args args - want wants - mocks func(context.Context, *mocks.NamespaceService) - }{ - { - name: "fallback default namespace if none passed in headers", - args: args{ - service: new(mocks.NamespaceService), - ctx: context.Background(), - }, - want: wants{ - ns: namespace.DefaultNamespace, - }, - mocks: func(context.Context, *mocks.NamespaceService) {}, - }, - { - name: "extract from header if passed namespace id in headers", - args: args{ - service: new(mocks.NamespaceService), - ctx: metadata.NewIncomingContext(context.Background(), map[string][]string{ - client.NamespaceHeaderKey: {ns.ID.String()}, - }), - }, - want: wants{ - ns: ns, - }, - mocks: func(ctx context.Context, nss *mocks.NamespaceService) { - nss.EXPECT().GetByID(ctx, ns.ID).Return(ns, nil) - }, - }, - { - name: "extract from header if passed namespace name in headers", - args: args{ - service: new(mocks.NamespaceService), - ctx: metadata.NewIncomingContext(context.Background(), map[string][]string{ - client.NamespaceHeaderKey: {ns.Name}, - }), - }, - want: wants{ - ns: ns, - }, - mocks: func(ctx context.Context, nss *mocks.NamespaceService) { - nss.EXPECT().GetByName(ctx, ns.Name).Return(ns, nil) - }, - }, - { - name: "extract from jwt if passed namespace id in jwt", - args: args{ - service: new(mocks.NamespaceService), - ctx: metadata.NewIncomingContext(context.Background(), map[string][]string{ - "Authorization": {"Bearer " + jwtWithNamespaceID}, - }), - }, - want: wants{ - ns: ns, - }, - mocks: func(ctx context.Context, nss *mocks.NamespaceService) { - nss.EXPECT().GetByID(ctx, mockedID).Return(ns, nil) - }, - }, - { - name: "extract from jwt if passed namespace id in jwt and namespace header", - args: args{ - service: new(mocks.NamespaceService), - ctx: metadata.NewIncomingContext(context.Background(), map[string][]string{ - "Authorization": {"Bearer " + jwtWithNamespaceID}, - client.NamespaceHeaderKey: {namespace.DefaultNamespace.Name}, - }), - }, - want: wants{ - ns: ns, - }, - mocks: func(ctx context.Context, nss *mocks.NamespaceService) { - nss.EXPECT().GetByID(ctx, mockedID).Return(ns, nil) - }, - }, - } - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - tt.mocks(tt.args.ctx, tt.args.service) - - interceptor := grpc_interceptor.NamespaceUnaryInterceptor(tt.args.service, "namespace_id", "") - _, err := interceptor(tt.args.ctx, nil, nil, func(ctx context.Context, req interface{}) (interface{}, error) { - got := grpc_interceptor.FetchNamespaceFromContext(ctx) - if !reflect.DeepEqual(got, tt.want.ns) { - t.Errorf("NamespaceUnaryInterceptor() = %v, want %v", got, tt.want.ns) - } - return nil, nil - }) - if err != tt.want.err { - t.Errorf("NamespaceUnaryInterceptor() = %v, want %v", err, tt.want.err) - } - tt.args.service.AssertExpectations(t) - }) - } -} diff --git a/pkg/grpc_interceptor/user.go b/pkg/grpc_interceptor/user.go deleted file mode 100644 index 14c87462..00000000 --- a/pkg/grpc_interceptor/user.go +++ /dev/null @@ -1,35 +0,0 @@ -package grpc_interceptor - -import ( - "context" - "github.com/raystack/compass/core/user" - "google.golang.org/grpc" - "google.golang.org/grpc/metadata" -) - -// UserHeaderCtx middleware will propagate a valid user ID as string -// within request context -// use `user.FromContext` function to get the user ID string -func UserHeaderCtx(IdentityHeaderKeyUUID, IdentityHeaderKeyEmail string) grpc.UnaryServerInterceptor { - return func(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (resp interface{}, err error) { - var ( - userUUID = "" - userEmail = "" - ) - - if md, ok := metadata.FromIncomingContext(ctx); ok { - metadataValues := md.Get(IdentityHeaderKeyUUID) - if len(metadataValues) > 0 { - userUUID = metadataValues[0] - } - - metadataValues = md.Get(IdentityHeaderKeyEmail) - if len(metadataValues) > 0 { - userEmail = metadataValues[0] - } - - ctx = user.NewContext(ctx, user.User{UUID: userUUID, Email: userEmail}) - } - return handler(ctx, req) - } -} diff --git a/pkg/grpc_interceptor/user_test.go b/pkg/grpc_interceptor/user_test.go deleted file mode 100644 index 4c9dd0db..00000000 --- a/pkg/grpc_interceptor/user_test.go +++ /dev/null @@ -1,61 +0,0 @@ -package grpc_interceptor - -import ( - "context" - "testing" - - "github.com/raystack/compass/core/user" - "github.com/stretchr/testify/require" - "google.golang.org/grpc" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/metadata" - "google.golang.org/grpc/status" -) - -const ( - IdentityHeaderKeyUUID = "Compass-User-ID" - IdentityHeaderKeyEmail = "Compass-User-Email" -) - -func TestUserHeaderCtx(t *testing.T) { - interceptor := UserHeaderCtx(IdentityHeaderKeyUUID, IdentityHeaderKeyEmail) - - // handler mimics a gRPC service that requires user UUID in context - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - u := user.FromContext(ctx) - if u.UUID == "" { - return nil, status.Error(codes.InvalidArgument, "uuid not found") - } - return "ok", nil - } - - info := &grpc.UnaryServerInfo{FullMethod: "/test.Service/Test"} - - t.Run("IdentityHeaderNotPresent", func(t *testing.T) { - ctx := metadata.NewIncomingContext(context.Background(), metadata.MD{}) - _, err := interceptor(ctx, nil, info, handler) - code := status.Code(err) - require.Equal(t, codes.InvalidArgument, code) - require.EqualError(t, err, "rpc error: code = InvalidArgument desc = uuid not found") - }) - - t.Run("HeaderPresentAndEmpty", func(t *testing.T) { - md := metadata.Pairs(IdentityHeaderKeyUUID, "", IdentityHeaderKeyEmail, "") - ctx := metadata.NewIncomingContext(context.Background(), md) - _, err := interceptor(ctx, nil, info, handler) - code := status.Code(err) - require.Equal(t, codes.InvalidArgument, code) - require.EqualError(t, err, "rpc error: code = InvalidArgument desc = uuid not found") - }) - - t.Run("HeaderPresentAndPassed", func(t *testing.T) { - userEmail := "user-email" - userUUID := "user-uuid" - - md := metadata.Pairs(IdentityHeaderKeyUUID, userUUID, IdentityHeaderKeyEmail, userEmail) - ctx := metadata.NewIncomingContext(context.Background(), md) - _, err := interceptor(ctx, nil, info, handler) - code := status.Code(err) - require.Equal(t, codes.OK, code) - }) -} diff --git a/pkg/server/interceptor/error_response.go b/pkg/server/interceptor/error_response.go new file mode 100644 index 00000000..e8acfb15 --- /dev/null +++ b/pkg/server/interceptor/error_response.go @@ -0,0 +1,42 @@ +package interceptor + +import ( + "context" + "errors" + "fmt" + "net/http" + "time" + + "connectrpc.com/connect" + log "github.com/raystack/salt/observability/logger" +) + +// ErrorResponse returns a new unary interceptor that standardizes error formatting. +// It ensures all errors returned from handlers are proper Connect errors. +// Non-Connect errors are sanitized to prevent leaking internal details. +func ErrorResponse(logger log.Logger) connect.UnaryInterceptorFunc { + return func(next connect.UnaryFunc) connect.UnaryFunc { + return func(ctx context.Context, req connect.AnyRequest) (connect.AnyResponse, error) { + resp, err := next(ctx, req) + if err != nil { + return resp, ensureConnectError(logger, err) + } + return resp, nil + } + } +} + +// ensureConnectError wraps non-Connect errors as sanitized internal Connect errors. +func ensureConnectError(logger log.Logger, err error) error { + var connectErr *connect.Error + if errors.As(err, &connectErr) { + return err + } + ref := time.Now().Unix() + logger.Error(err.Error(), "ref", ref) + return connect.NewError(connect.CodeInternal, fmt.Errorf( + "%s - ref (%d)", + http.StatusText(http.StatusInternalServerError), + ref, + )) +} diff --git a/pkg/server/interceptor/interceptor.go b/pkg/server/interceptor/interceptor.go new file mode 100644 index 00000000..b54abd80 --- /dev/null +++ b/pkg/server/interceptor/interceptor.go @@ -0,0 +1,18 @@ +package interceptor + +import ( + "connectrpc.com/connect" +) + +// ChainUnaryInterceptors chains multiple unary interceptors into a single interceptor. +func ChainUnaryInterceptors(interceptors ...connect.UnaryInterceptorFunc) connect.Option { + return connect.WithInterceptors(convertToInterceptors(interceptors)...) +} + +func convertToInterceptors(funcs []connect.UnaryInterceptorFunc) []connect.Interceptor { + interceptors := make([]connect.Interceptor, len(funcs)) + for i, f := range funcs { + interceptors[i] = f + } + return interceptors +} diff --git a/pkg/server/interceptor/logger.go b/pkg/server/interceptor/logger.go new file mode 100644 index 00000000..00740b3b --- /dev/null +++ b/pkg/server/interceptor/logger.go @@ -0,0 +1,41 @@ +package interceptor + +import ( + "context" + "time" + + "connectrpc.com/connect" + log "github.com/raystack/salt/observability/logger" +) + +// Logger returns a new unary interceptor that logs request details. +func Logger(logger log.Logger) connect.UnaryInterceptorFunc { + return func(next connect.UnaryFunc) connect.UnaryFunc { + return func(ctx context.Context, req connect.AnyRequest) (connect.AnyResponse, error) { + start := time.Now() + procedure := req.Spec().Procedure + + resp, err := next(ctx, req) + + duration := time.Since(start) + fields := []interface{}{ + "procedure", procedure, + "duration_ms", duration.Milliseconds(), + "peer_addr", req.Peer().Addr, + } + + if err != nil { + fields = append(fields, "error", err.Error()) + connectErr, ok := err.(*connect.Error) + if ok { + fields = append(fields, "code", connectErr.Code().String()) + } + logger.Error("request failed", fields...) + } else { + logger.Debug("request completed", fields...) + } + + return resp, err + } + } +} diff --git a/pkg/grpc_interceptor/namespace.go b/pkg/server/interceptor/namespace.go similarity index 50% rename from pkg/grpc_interceptor/namespace.go rename to pkg/server/interceptor/namespace.go index c98e7e29..fb23b099 100644 --- a/pkg/grpc_interceptor/namespace.go +++ b/pkg/server/interceptor/namespace.go @@ -1,17 +1,15 @@ -package grpc_interceptor +package interceptor import ( "context" - "github.com/google/uuid" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/status" + "errors" "strings" + "connectrpc.com/connect" + "github.com/google/uuid" "github.com/lestrrat-go/jwx/v2/jwt" "github.com/raystack/compass/core/namespace" "github.com/raystack/compass/internal/client" - "google.golang.org/grpc" - "google.golang.org/grpc/metadata" ) // NamespaceKey is injected in context with the tenant context @@ -23,22 +21,23 @@ type NamespaceService interface { GetByName(ctx context.Context, name string) (*namespace.Namespace, error) } -// NamespaceUnaryInterceptor namespace can be passed in jwt token or headers, if none provided -// it falls back to default -func NamespaceUnaryInterceptor(service NamespaceService, namespaceClaimKey, userUUIDHeaderKey string) grpc.UnaryServerInterceptor { - return func(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (interface{}, error) { - namespaceForRequest := namespace.DefaultNamespace - if incomingMD, ok := metadata.FromIncomingContext(ctx); ok { - // extract if jwt is set with namespace id - // jwt token has higher priority then header +// Namespace returns a new unary interceptor that extracts namespace from: +// 1. JWT token (priority 1) - uses namespaceClaimKey +// 2. x-namespace header (priority 2) +// 3. Defaults to DefaultNamespace +func Namespace(service NamespaceService, namespaceClaimKey, userUUIDHeaderKey string) connect.UnaryInterceptorFunc { + return func(next connect.UnaryFunc) connect.UnaryFunc { + return func(ctx context.Context, req connect.AnyRequest) (connect.AnyResponse, error) { + namespaceForRequest := namespace.DefaultNamespace - if bearers := incomingMD.Get("Authorization"); len(bearers) > 0 { - // Parse the token - rawToken := strings.TrimPrefix(bearers[0], "Bearer ") + // Extract if jwt is set with namespace id + // jwt token has higher priority than header + if authorization := req.Header().Get("Authorization"); authorization != "" { + rawToken := strings.TrimPrefix(authorization, "Bearer ") if rawToken != "" { token, err := jwt.ParseInsecure([]byte(rawToken)) if err == nil { - // check if namespace is passed as claim + // Check if namespace is passed as claim if namespaceID, okClaim := token.Get(namespaceClaimKey); okClaim { ns, err := getNamespaceByNameOrID(ctx, service, namespaceID.(string)) if err != nil { @@ -47,56 +46,59 @@ func NamespaceUnaryInterceptor(service NamespaceService, namespaceClaimKey, user namespaceForRequest = ns } - // override the user uuid if passed as claim + // Override the user uuid if passed as claim if userUUID := token.Subject(); userUUID != "" && userUUIDHeaderKey != "" { - incomingMD.Set(userUUIDHeaderKey, userUUID) - ctx = metadata.NewIncomingContext(ctx, incomingMD) + req.Header().Set(userUUIDHeaderKey, userUUID) } } } } - // if we have not already found a namespace, check in header + // If we have not already found a namespace, check in header if namespaceForRequest.ID == namespace.DefaultNamespace.ID { - // check if namespace is passed as header - namespaceHeaders := incomingMD.Get(client.NamespaceHeaderKey) - if len(namespaceHeaders) > 0 { - ns, err := getNamespaceByNameOrID(ctx, service, strings.TrimSpace(namespaceHeaders[0])) + // Check if namespace is passed as header + namespaceHeader := req.Header().Get(client.NamespaceHeaderKey) + if namespaceHeader != "" { + ns, err := getNamespaceByNameOrID(ctx, service, strings.TrimSpace(namespaceHeader)) if err != nil { return nil, err } namespaceForRequest = ns } } - } - // fallback to default namespace - ctx = BuildContextWithNamespace(ctx, namespaceForRequest) - return handler(ctx, req) + // Build context with namespace + ctx = BuildContextWithNamespace(ctx, namespaceForRequest) + return next(ctx, req) + } } } func getNamespaceByNameOrID(ctx context.Context, service NamespaceService, urn string) (*namespace.Namespace, error) { var ns *namespace.Namespace - nsID, err := uuid.Parse(urn) - if err != nil { - // if fail to parse a valid uuid, must be a name - if ns, err = service.GetByName(ctx, urn); err != nil { - return nil, status.Error(codes.NotFound, err.Error()) - } + var err error + nsID, parseErr := uuid.Parse(urn) + if parseErr != nil { + // If fail to parse a valid uuid, must be a name + ns, err = service.GetByName(ctx, urn) } else { - if ns, err = service.GetByID(ctx, nsID); err != nil { - return nil, status.Error(codes.NotFound, err.Error()) + ns, err = service.GetByID(ctx, nsID) + } + if err != nil { + if errors.Is(err, namespace.ErrNotFound) { + return nil, connect.NewError(connect.CodeNotFound, err) } + return nil, connect.NewError(connect.CodeInternal, err) } return ns, nil } +// BuildContextWithNamespace stores the namespace in context. func BuildContextWithNamespace(ctx context.Context, ns *namespace.Namespace) context.Context { return context.WithValue(ctx, NamespaceKey{}, ns) } -// FetchNamespaceFromContext if not found, fallback to default +// FetchNamespaceFromContext retrieves namespace from context, returns default if not found. func FetchNamespaceFromContext(ctx context.Context) *namespace.Namespace { if ns, ok := ctx.Value(NamespaceKey{}).(*namespace.Namespace); ok && ns != nil { return ns diff --git a/pkg/server/interceptor/recovery.go b/pkg/server/interceptor/recovery.go new file mode 100644 index 00000000..2882e07c --- /dev/null +++ b/pkg/server/interceptor/recovery.go @@ -0,0 +1,29 @@ +package interceptor + +import ( + "context" + "fmt" + "log" + "runtime/debug" + + "connectrpc.com/connect" +) + +// Recovery returns a new unary interceptor that recovers from panics. +func Recovery() connect.UnaryInterceptorFunc { + return func(next connect.UnaryFunc) connect.UnaryFunc { + return func(ctx context.Context, req connect.AnyRequest) (resp connect.AnyResponse, err error) { + defer func() { + if r := recover(); r != nil { + stack := debug.Stack() + log.Printf("panic recovered: %v\n%s", r, string(stack)) + err = connect.NewError( + connect.CodeInternal, + fmt.Errorf("internal server error"), + ) + } + }() + return next(ctx, req) + } + } +} diff --git a/pkg/server/interceptor/user.go b/pkg/server/interceptor/user.go new file mode 100644 index 00000000..2bb71bf1 --- /dev/null +++ b/pkg/server/interceptor/user.go @@ -0,0 +1,23 @@ +package interceptor + +import ( + "context" + + "connectrpc.com/connect" + "github.com/raystack/compass/core/user" +) + +// UserHeaderCtx returns a new unary interceptor that propagates a valid user ID +// from request headers within the request context. +// Use `user.FromContext` function to get the user. +func UserHeaderCtx(identityHeaderKeyUUID, identityHeaderKeyEmail string) connect.UnaryInterceptorFunc { + return func(next connect.UnaryFunc) connect.UnaryFunc { + return func(ctx context.Context, req connect.AnyRequest) (connect.AnyResponse, error) { + userUUID := req.Header().Get(identityHeaderKeyUUID) + userEmail := req.Header().Get(identityHeaderKeyEmail) + + ctx = user.NewContext(ctx, user.User{UUID: userUUID, Email: userEmail}) + return next(ctx, req) + } + } +} diff --git a/proto/compass.swagger.yaml b/proto/compass.swagger.yaml deleted file mode 100644 index b52425fe..00000000 --- a/proto/compass.swagger.yaml +++ /dev/null @@ -1,2845 +0,0 @@ -swagger: "2.0" -info: - title: Compass - description: Documentation of our Compass API with gRPC and gRPC-Gateway. - version: 0.3.0 - license: - name: Apache License 2.0 - url: https://github.com/raystack/compass/blob/main/LICENSE -tags: - - name: CompassService -schemes: - - http - - https -consumes: - - application/json -produces: - - application/json -paths: - /v1beta1/assets: - get: - summary: Get list of assets - description: 'Returns list of assets, optionally filtered by types, services, sorting, fields in asset.data and querying fields ' - operationId: CompassService_GetAllAssets - responses: - "200": - description: A successful response. - schema: - $ref: '#/definitions/GetAllAssetsResponse' - "400": - description: Returned when the data that user input is wrong. - schema: - $ref: '#/definitions/Status' - "404": - description: Returned when the resource does not exist. - schema: - $ref: '#/definitions/Status' - "409": - description: Returned when the resource already exist. - schema: - $ref: '#/definitions/Status' - "500": - description: Returned when theres is something wrong on the server side. - schema: - $ref: '#/definitions/Status' - default: - description: An unexpected error response. - schema: - $ref: '#/definitions/Status' - parameters: - - name: q - description: filter by specific query - in: query - required: false - type: string - - name: q_fields - description: filter by multiple query fields - in: query - required: false - type: string - - name: types - description: filter by multiple types - in: query - required: false - type: string - - name: services - description: filter by multiple services - in: query - required: false - type: string - - name: sort - description: sorting based on fields - in: query - required: false - type: string - - name: direction - description: 'sorting direction can either be asc or desc ' - in: query - required: false - type: string - - name: data[string] - description: This is a request variable of the map type. The query format is "map_name[key]=value", e.g. If the map name is Age, the key type is string, and the value type is integer, the query parameter is expressed as Age["bob"]=18 - in: query - required: false - type: string - - name: size - description: maximum size to fetch - in: query - required: false - type: integer - format: int64 - - name: offset - description: offset to fetch from - in: query - required: false - type: integer - format: int64 - - name: with_total - description: if set include total field in response - in: query - required: false - type: boolean - - name: is_deleted - description: filter assets by deletion status - in: query - required: false - type: boolean - tags: - - Asset - put: - summary: Update/Create an asset - description: Upsert will update an asset or create a new one if it does not exist yet - operationId: CompassService_UpsertAsset - responses: - "200": - description: A successful response. - schema: - $ref: '#/definitions/UpsertAssetResponse' - "400": - description: Returned when the data that user input is wrong. - schema: - $ref: '#/definitions/Status' - "404": - description: Returned when the resource does not exist. - schema: - $ref: '#/definitions/Status' - "409": - description: Returned when the resource already exist. - schema: - $ref: '#/definitions/Status' - "500": - description: Returned when theres is something wrong on the server side. - schema: - $ref: '#/definitions/Status' - default: - description: An unexpected error response. - schema: - $ref: '#/definitions/Status' - parameters: - - name: body - in: body - required: true - schema: - $ref: '#/definitions/UpsertAssetRequest' - tags: - - Asset - patch: - summary: Patch/Create an asset - description: Similar to Upsert but with patch strategy and different body format - operationId: CompassService_UpsertPatchAsset - responses: - "200": - description: A successful response. - schema: - $ref: '#/definitions/UpsertPatchAssetResponse' - "400": - description: Returned when the data that user input is wrong. - schema: - $ref: '#/definitions/Status' - "404": - description: Returned when the resource does not exist. - schema: - $ref: '#/definitions/Status' - "409": - description: Returned when the resource already exist. - schema: - $ref: '#/definitions/Status' - "500": - description: Returned when theres is something wrong on the server side. - schema: - $ref: '#/definitions/Status' - default: - description: An unexpected error response. - schema: - $ref: '#/definitions/Status' - parameters: - - name: body - in: body - required: true - schema: - $ref: '#/definitions/UpsertPatchAssetRequest' - tags: - - Asset - /v1beta1/assets/{asset_urn}/probes: - post: - summary: Create asset's probe - description: Add a new probe to an asset - operationId: CompassService_CreateAssetProbe - responses: - "200": - description: A successful response. - schema: - $ref: '#/definitions/CreateAssetProbeResponse' - "400": - description: Returned when the data that user input is wrong. - schema: - $ref: '#/definitions/Status' - "404": - description: Returned when the resource does not exist. - schema: - $ref: '#/definitions/Status' - "409": - description: Returned when the resource already exist. - schema: - $ref: '#/definitions/Status' - "500": - description: Returned when theres is something wrong on the server side. - schema: - $ref: '#/definitions/Status' - default: - description: An unexpected error response. - schema: - $ref: '#/definitions/Status' - parameters: - - name: asset_urn - in: path - required: true - type: string - - name: probe - in: body - required: true - schema: - $ref: '#/definitions/CreateAssetProbeRequest.Probe' - tags: - - Asset - /v1beta1/assets/{id}: - get: - summary: Find an asset - description: Returns a single asset with given ID - operationId: CompassService_GetAssetByID - responses: - "200": - description: A successful response. - schema: - $ref: '#/definitions/GetAssetByIDResponse' - "400": - description: Returned when the data that user input is wrong. - schema: - $ref: '#/definitions/Status' - "404": - description: Returned when the resource does not exist. - schema: - $ref: '#/definitions/Status' - "409": - description: Returned when the resource already exist. - schema: - $ref: '#/definitions/Status' - "500": - description: Returned when theres is something wrong on the server side. - schema: - $ref: '#/definitions/Status' - default: - description: An unexpected error response. - schema: - $ref: '#/definitions/Status' - parameters: - - name: id - in: path - required: true - type: string - tags: - - Asset - delete: - summary: Delete an asset - description: Delete a single asset with given ID - operationId: CompassService_DeleteAsset - responses: - "200": - description: A successful response. - schema: - $ref: '#/definitions/DeleteAssetResponse' - "400": - description: Returned when the data that user input is wrong. - schema: - $ref: '#/definitions/Status' - "404": - description: Returned when the resource does not exist. - schema: - $ref: '#/definitions/Status' - "409": - description: Returned when the resource already exist. - schema: - $ref: '#/definitions/Status' - "500": - description: Returned when theres is something wrong on the server side. - schema: - $ref: '#/definitions/Status' - default: - description: An unexpected error response. - schema: - $ref: '#/definitions/Status' - parameters: - - name: id - in: path - required: true - type: string - tags: - - Asset - /v1beta1/assets/{id}/stargazers: - get: - summary: Find users that stars an asset - description: Returns a list of users that stars an asset - operationId: CompassService_GetAssetStargazers - responses: - "200": - description: A successful response. - schema: - $ref: '#/definitions/GetAssetStargazersResponse' - "400": - description: Returned when the data that user input is wrong. - schema: - $ref: '#/definitions/Status' - "404": - description: Returned when the resource does not exist. - schema: - $ref: '#/definitions/Status' - "409": - description: Returned when the resource already exist. - schema: - $ref: '#/definitions/Status' - "500": - description: Returned when theres is something wrong on the server side. - schema: - $ref: '#/definitions/Status' - default: - description: An unexpected error response. - schema: - $ref: '#/definitions/Status' - parameters: - - name: id - in: path - required: true - type: string - - name: size - in: query - required: false - type: integer - format: int64 - - name: offset - in: query - required: false - type: integer - format: int64 - tags: - - Asset - /v1beta1/assets/{id}/versions: - get: - summary: Get version history of an asset - description: Returns a list of asset version history - operationId: CompassService_GetAssetVersionHistory - responses: - "200": - description: A successful response. - schema: - $ref: '#/definitions/GetAssetVersionHistoryResponse' - "400": - description: Returned when the data that user input is wrong. - schema: - $ref: '#/definitions/Status' - "404": - description: Returned when the resource does not exist. - schema: - $ref: '#/definitions/Status' - "409": - description: Returned when the resource already exist. - schema: - $ref: '#/definitions/Status' - "500": - description: Returned when theres is something wrong on the server side. - schema: - $ref: '#/definitions/Status' - default: - description: An unexpected error response. - schema: - $ref: '#/definitions/Status' - parameters: - - name: id - in: path - required: true - type: string - - name: size - in: query - required: false - type: integer - format: int64 - - name: offset - in: query - required: false - type: integer - format: int64 - tags: - - Asset - /v1beta1/assets/{id}/versions/{version}: - get: - summary: Get asset's previous version - description: Returns a specific version of an asset - operationId: CompassService_GetAssetByVersion - responses: - "200": - description: A successful response. - schema: - $ref: '#/definitions/GetAssetByVersionResponse' - "400": - description: Returned when the data that user input is wrong. - schema: - $ref: '#/definitions/Status' - "404": - description: Returned when the resource does not exist. - schema: - $ref: '#/definitions/Status' - "409": - description: Returned when the resource already exist. - schema: - $ref: '#/definitions/Status' - "500": - description: Returned when theres is something wrong on the server side. - schema: - $ref: '#/definitions/Status' - default: - description: An unexpected error response. - schema: - $ref: '#/definitions/Status' - parameters: - - name: id - in: path - required: true - type: string - - name: version - in: path - required: true - type: string - tags: - - Asset - /v1beta1/discussions: - get: - summary: Get all discussions - operationId: CompassService_GetAllDiscussions - responses: - "200": - description: A successful response. - schema: - $ref: '#/definitions/GetAllDiscussionsResponse' - "400": - description: Returned when the data that user input is wrong. - schema: - $ref: '#/definitions/Status' - "404": - description: Returned when the resource does not exist. - schema: - $ref: '#/definitions/Status' - "409": - description: Returned when the resource already exist. - schema: - $ref: '#/definitions/Status' - "500": - description: Returned when theres is something wrong on the server side. - schema: - $ref: '#/definitions/Status' - default: - description: An unexpected error response. - schema: - $ref: '#/definitions/Status' - parameters: - - name: type - in: query - required: false - type: string - - name: state - in: query - required: false - type: string - - name: owner - in: query - required: false - type: string - - name: assignee - in: query - required: false - type: string - - name: asset - in: query - required: false - type: string - - name: labels - in: query - required: false - type: string - - name: sort - in: query - required: false - type: string - - name: direction - in: query - required: false - type: string - - name: size - in: query - required: false - type: integer - format: int64 - - name: offset - in: query - required: false - type: integer - format: int64 - tags: - - Discussion - post: - summary: Create a discussion - operationId: CompassService_CreateDiscussion - responses: - "200": - description: A successful response. - schema: - $ref: '#/definitions/CreateDiscussionResponse' - "400": - description: Returned when the data that user input is wrong. - schema: - $ref: '#/definitions/Status' - "404": - description: Returned when the resource does not exist. - schema: - $ref: '#/definitions/Status' - "409": - description: Returned when the resource already exist. - schema: - $ref: '#/definitions/Status' - "500": - description: Returned when theres is something wrong on the server side. - schema: - $ref: '#/definitions/Status' - default: - description: An unexpected error response. - schema: - $ref: '#/definitions/Status' - parameters: - - name: body - description: Request to be sent to create a discussion - in: body - required: true - schema: - $ref: '#/definitions/CreateDiscussionRequest' - tags: - - Discussion - /v1beta1/discussions/{discussion_id}/comments: - get: - summary: Get all comments of a discussion - operationId: CompassService_GetAllComments - responses: - "200": - description: A successful response. - schema: - $ref: '#/definitions/GetAllCommentsResponse' - "400": - description: Returned when the data that user input is wrong. - schema: - $ref: '#/definitions/Status' - "404": - description: Returned when the resource does not exist. - schema: - $ref: '#/definitions/Status' - "409": - description: Returned when the resource already exist. - schema: - $ref: '#/definitions/Status' - "500": - description: Returned when theres is something wrong on the server side. - schema: - $ref: '#/definitions/Status' - default: - description: An unexpected error response. - schema: - $ref: '#/definitions/Status' - parameters: - - name: discussion_id - in: path - required: true - type: string - - name: sort - in: query - required: false - type: string - - name: direction - in: query - required: false - type: string - - name: size - in: query - required: false - type: integer - format: int64 - - name: offset - in: query - required: false - type: integer - format: int64 - tags: - - Discussion - - Comment - post: - summary: Create a comment of a discussion - operationId: CompassService_CreateComment - responses: - "200": - description: A successful response. - schema: - $ref: '#/definitions/CreateCommentResponse' - "400": - description: Returned when the data that user input is wrong. - schema: - $ref: '#/definitions/Status' - "404": - description: Returned when the resource does not exist. - schema: - $ref: '#/definitions/Status' - "409": - description: Returned when the resource already exist. - schema: - $ref: '#/definitions/Status' - "500": - description: Returned when theres is something wrong on the server side. - schema: - $ref: '#/definitions/Status' - default: - description: An unexpected error response. - schema: - $ref: '#/definitions/Status' - parameters: - - name: discussion_id - in: path - required: true - type: string - - name: body - in: body - required: true - schema: - type: object - properties: - body: - type: string - tags: - - Discussion - - Comment - /v1beta1/discussions/{discussion_id}/comments/{id}: - get: - summary: Get a comment of a discussion - operationId: CompassService_GetComment - responses: - "200": - description: A successful response. - schema: - $ref: '#/definitions/GetCommentResponse' - "400": - description: Returned when the data that user input is wrong. - schema: - $ref: '#/definitions/Status' - "404": - description: Returned when the resource does not exist. - schema: - $ref: '#/definitions/Status' - "409": - description: Returned when the resource already exist. - schema: - $ref: '#/definitions/Status' - "500": - description: Returned when theres is something wrong on the server side. - schema: - $ref: '#/definitions/Status' - default: - description: An unexpected error response. - schema: - $ref: '#/definitions/Status' - parameters: - - name: discussion_id - in: path - required: true - type: string - - name: id - in: path - required: true - type: string - tags: - - Discussion - - Comment - delete: - summary: Delete a comment of a discussion - operationId: CompassService_DeleteComment - responses: - "200": - description: A successful response. - schema: - $ref: '#/definitions/DeleteCommentResponse' - "400": - description: Returned when the data that user input is wrong. - schema: - $ref: '#/definitions/Status' - "404": - description: Returned when the resource does not exist. - schema: - $ref: '#/definitions/Status' - "409": - description: Returned when the resource already exist. - schema: - $ref: '#/definitions/Status' - "500": - description: Returned when theres is something wrong on the server side. - schema: - $ref: '#/definitions/Status' - default: - description: An unexpected error response. - schema: - $ref: '#/definitions/Status' - parameters: - - name: discussion_id - in: path - required: true - type: string - - name: id - in: path - required: true - type: string - tags: - - Discussion - - Comment - put: - summary: Update a comment of a discussion - operationId: CompassService_UpdateComment - responses: - "200": - description: A successful response. - schema: - $ref: '#/definitions/UpdateCommentResponse' - "400": - description: Returned when the data that user input is wrong. - schema: - $ref: '#/definitions/Status' - "404": - description: Returned when the resource does not exist. - schema: - $ref: '#/definitions/Status' - "409": - description: Returned when the resource already exist. - schema: - $ref: '#/definitions/Status' - "500": - description: Returned when theres is something wrong on the server side. - schema: - $ref: '#/definitions/Status' - default: - description: An unexpected error response. - schema: - $ref: '#/definitions/Status' - parameters: - - name: discussion_id - in: path - required: true - type: string - - name: id - in: path - required: true - type: string - - name: body - in: body - required: true - schema: - type: object - properties: - body: - type: string - tags: - - Discussion - - Comment - /v1beta1/discussions/{id}: - get: - summary: Get a discussion - operationId: CompassService_GetDiscussion - responses: - "200": - description: A successful response. - schema: - $ref: '#/definitions/GetDiscussionResponse' - "400": - description: Returned when the data that user input is wrong. - schema: - $ref: '#/definitions/Status' - "404": - description: Returned when the resource does not exist. - schema: - $ref: '#/definitions/Status' - "409": - description: Returned when the resource already exist. - schema: - $ref: '#/definitions/Status' - "500": - description: Returned when theres is something wrong on the server side. - schema: - $ref: '#/definitions/Status' - default: - description: An unexpected error response. - schema: - $ref: '#/definitions/Status' - parameters: - - name: id - in: path - required: true - type: string - tags: - - Discussion - patch: - summary: Patch a discussion - operationId: CompassService_PatchDiscussion - responses: - "200": - description: A successful response. - schema: - $ref: '#/definitions/PatchDiscussionResponse' - "400": - description: Returned when the data that user input is wrong. - schema: - $ref: '#/definitions/Status' - "404": - description: Returned when the resource does not exist. - schema: - $ref: '#/definitions/Status' - "409": - description: Returned when the resource already exist. - schema: - $ref: '#/definitions/Status' - "500": - description: Returned when theres is something wrong on the server side. - schema: - $ref: '#/definitions/Status' - default: - description: An unexpected error response. - schema: - $ref: '#/definitions/Status' - parameters: - - name: id - in: path - required: true - type: string - - name: body - in: body - required: true - schema: - type: object - properties: - title: - type: string - body: - type: string - type: - type: string - state: - type: string - labels: - type: array - items: - type: string - assets: - type: array - items: - type: string - assignees: - type: array - items: - type: string - tags: - - Discussion - /v1beta1/groupassets: - get: - summary: Group assets - description: API for grouping assets by specified fields with filtering support. - operationId: CompassService_GroupAssets - responses: - "200": - description: A successful response. - schema: - $ref: '#/definitions/GroupAssetsResponse' - "400": - description: Returned when the data that user input is wrong. - schema: - $ref: '#/definitions/Status' - "404": - description: Returned when the resource does not exist. - schema: - $ref: '#/definitions/Status' - "409": - description: Returned when the resource already exist. - schema: - $ref: '#/definitions/Status' - "500": - description: Returned when theres is something wrong on the server side. - schema: - $ref: '#/definitions/Status' - default: - description: An unexpected error response. - schema: - $ref: '#/definitions/Status' - parameters: - - name: groupby - in: query - required: false - type: array - items: - type: string - collectionFormat: multi - - name: filter[string] - description: This is a request variable of the map type. The query format is "map_name[key]=value", e.g. If the map name is Age, the key type is string, and the value type is integer, the query parameter is expressed as Age["bob"]=18 - in: query - required: false - type: string - - name: include_fields - in: query - required: false - type: array - items: - type: string - collectionFormat: multi - - name: size - description: number of results per group to return - in: query - required: false - type: integer - format: int64 - tags: - - Search - - Asset - /v1beta1/lineage/{urn}: - get: - summary: Get Lineage Graph - description: Returns the lineage graph. Each entry in the graph describes a (edge) directed relation of assets with source and destination using it's urn, type, and service. - operationId: CompassService_GetGraph - responses: - "200": - description: A successful response. - schema: - $ref: '#/definitions/GetGraphResponse' - "400": - description: Returned when the data that user input is wrong. - schema: - $ref: '#/definitions/Status' - "404": - description: Returned when the resource does not exist. - schema: - $ref: '#/definitions/Status' - "409": - description: Returned when the resource already exist. - schema: - $ref: '#/definitions/Status' - "500": - description: Returned when theres is something wrong on the server side. - schema: - $ref: '#/definitions/Status' - default: - description: An unexpected error response. - schema: - $ref: '#/definitions/Status' - parameters: - - name: urn - in: path - required: true - type: string - pattern: .+ - - name: level - in: query - required: false - type: integer - format: int64 - - name: direction - in: query - required: false - type: string - - name: with_attributes - description: if set to false, node attributes (probes) will not be returned - in: query - required: false - type: boolean - - name: include_deleted - description: if true, include soft deleted assets in the lineage graph result - in: query - required: false - type: boolean - tags: - - Lineage - - Asset - /v1beta1/me/discussions: - get: - summary: Get all discussions of a user - description: Returns all discussions given possible filters of a user - operationId: CompassService_GetMyDiscussions - responses: - "200": - description: A successful response. - schema: - $ref: '#/definitions/GetMyDiscussionsResponse' - "400": - description: Returned when the data that user input is wrong. - schema: - $ref: '#/definitions/Status' - "404": - description: Returned when the resource does not exist. - schema: - $ref: '#/definitions/Status' - "409": - description: Returned when the resource already exist. - schema: - $ref: '#/definitions/Status' - "500": - description: Returned when theres is something wrong on the server side. - schema: - $ref: '#/definitions/Status' - default: - description: An unexpected error response. - schema: - $ref: '#/definitions/Status' - parameters: - - name: filter - in: query - required: false - type: string - - name: type - in: query - required: false - type: string - - name: state - in: query - required: false - type: string - - name: asset - in: query - required: false - type: string - - name: labels - in: query - required: false - type: string - - name: sort - in: query - required: false - type: string - - name: direction - in: query - required: false - type: string - - name: size - in: query - required: false - type: integer - format: int64 - - name: offset - in: query - required: false - type: integer - format: int64 - tags: - - User - - Discussion - /v1beta1/me/starred: - get: - summary: Get my starred assets - description: Get all assets starred by me - operationId: CompassService_GetMyStarredAssets - responses: - "200": - description: A successful response. - schema: - $ref: '#/definitions/GetMyStarredAssetsResponse' - "400": - description: Returned when the data that user input is wrong. - schema: - $ref: '#/definitions/Status' - "404": - description: Returned when the resource does not exist. - schema: - $ref: '#/definitions/Status' - "409": - description: Returned when the resource already exist. - schema: - $ref: '#/definitions/Status' - "500": - description: Returned when theres is something wrong on the server side. - schema: - $ref: '#/definitions/Status' - default: - description: An unexpected error response. - schema: - $ref: '#/definitions/Status' - parameters: - - name: size - in: query - required: false - type: integer - format: int64 - - name: offset - in: query - required: false - type: integer - format: int64 - tags: - - User - - Star - /v1beta1/me/starred/{asset_id}: - get: - summary: Get my starred asset - description: Get an asset starred by me - operationId: CompassService_GetMyStarredAsset - responses: - "200": - description: A successful response. - schema: - $ref: '#/definitions/GetMyStarredAssetResponse' - "400": - description: Returned when the data that user input is wrong. - schema: - $ref: '#/definitions/Status' - "404": - description: Returned when the resource does not exist. - schema: - $ref: '#/definitions/Status' - "409": - description: Returned when the resource already exist. - schema: - $ref: '#/definitions/Status' - "500": - description: Returned when theres is something wrong on the server side. - schema: - $ref: '#/definitions/Status' - default: - description: An unexpected error response. - schema: - $ref: '#/definitions/Status' - parameters: - - name: asset_id - in: path - required: true - type: string - tags: - - User - - Star - delete: - summary: Unstar an asset - description: Unmark my starred asset - operationId: CompassService_UnstarAsset - responses: - "200": - description: A successful response. - schema: - $ref: '#/definitions/UnstarAssetResponse' - "400": - description: Returned when the data that user input is wrong. - schema: - $ref: '#/definitions/Status' - "404": - description: Returned when the resource does not exist. - schema: - $ref: '#/definitions/Status' - "409": - description: Returned when the resource already exist. - schema: - $ref: '#/definitions/Status' - "500": - description: Returned when theres is something wrong on the server side. - schema: - $ref: '#/definitions/Status' - default: - description: An unexpected error response. - schema: - $ref: '#/definitions/Status' - parameters: - - name: asset_id - in: path - required: true - type: string - tags: - - User - - Star - put: - summary: Star an asset - description: Mark an asset with a star - operationId: CompassService_StarAsset - responses: - "200": - description: A successful response. - schema: - $ref: '#/definitions/StarAssetResponse' - "400": - description: Returned when the data that user input is wrong. - schema: - $ref: '#/definitions/Status' - "404": - description: Returned when the resource does not exist. - schema: - $ref: '#/definitions/Status' - "409": - description: Returned when the resource already exist. - schema: - $ref: '#/definitions/Status' - "500": - description: Returned when theres is something wrong on the server side. - schema: - $ref: '#/definitions/Status' - default: - description: An unexpected error response. - schema: - $ref: '#/definitions/Status' - parameters: - - name: asset_id - in: path - required: true - type: string - tags: - - User - - Star - /v1beta1/namespaces: - get: - summary: List namespace - description: List all created namespaces - operationId: CompassService_ListNamespaces - responses: - "200": - description: A successful response. - schema: - $ref: '#/definitions/ListNamespacesResponse' - "400": - description: Returned when the data that user input is wrong. - schema: - $ref: '#/definitions/Status' - "404": - description: Returned when the resource does not exist. - schema: - $ref: '#/definitions/Status' - "409": - description: Returned when the resource already exist. - schema: - $ref: '#/definitions/Status' - "500": - description: Returned when theres is something wrong on the server side. - schema: - $ref: '#/definitions/Status' - default: - description: An unexpected error response. - schema: - $ref: '#/definitions/Status' - tags: - - Namespace - post: - summary: Create a namespace - description: Create a new namespace, throws error if already exists - operationId: CompassService_CreateNamespace - responses: - "200": - description: A successful response. - schema: - $ref: '#/definitions/CreateNamespaceResponse' - "400": - description: Returned when the data that user input is wrong. - schema: - $ref: '#/definitions/Status' - "404": - description: Returned when the resource does not exist. - schema: - $ref: '#/definitions/Status' - "409": - description: Returned when the resource already exist. - schema: - $ref: '#/definitions/Status' - "500": - description: Returned when theres is something wrong on the server side. - schema: - $ref: '#/definitions/Status' - default: - description: An unexpected error response. - schema: - $ref: '#/definitions/Status' - parameters: - - name: body - in: body - required: true - schema: - $ref: '#/definitions/CreateNamespaceRequest' - tags: - - Namespace - /v1beta1/namespaces/{urn}: - get: - summary: Get namespace - description: Fetch a namespace details, throws error if doesn't exists. Use id or name as urn. - operationId: CompassService_GetNamespace - responses: - "200": - description: A successful response. - schema: - $ref: '#/definitions/GetNamespaceResponse' - "400": - description: Returned when the data that user input is wrong. - schema: - $ref: '#/definitions/Status' - "404": - description: Returned when the resource does not exist. - schema: - $ref: '#/definitions/Status' - "409": - description: Returned when the resource already exist. - schema: - $ref: '#/definitions/Status' - "500": - description: Returned when theres is something wrong on the server side. - schema: - $ref: '#/definitions/Status' - default: - description: An unexpected error response. - schema: - $ref: '#/definitions/Status' - parameters: - - name: urn - description: set either id or name - in: path - required: true - type: string - tags: - - Namespace - put: - summary: Update namespace - description: Update an existing namespace, throws error if doesn't exists. Use id or name as urn. - operationId: CompassService_UpdateNamespace - responses: - "200": - description: A successful response. - schema: - $ref: '#/definitions/UpdateNamespaceResponse' - "400": - description: Returned when the data that user input is wrong. - schema: - $ref: '#/definitions/Status' - "404": - description: Returned when the resource does not exist. - schema: - $ref: '#/definitions/Status' - "409": - description: Returned when the resource already exist. - schema: - $ref: '#/definitions/Status' - "500": - description: Returned when theres is something wrong on the server side. - schema: - $ref: '#/definitions/Status' - default: - description: An unexpected error response. - schema: - $ref: '#/definitions/Status' - parameters: - - name: urn - description: set either id or name - in: path - required: true - type: string - - name: body - in: body - required: true - schema: - type: object - properties: - state: - type: string - metadata: - type: object - description: key value pairs as metadata for the namespace - tags: - - Namespace - /v1beta1/search: - get: - summary: Search for an asset - description: API for querying documents. 'text' is fuzzy matched against all the available datasets, and matched results are returned. You can specify additional match criteria using 'filter[.*]' query parameters. You can specify each filter multiple times to specify a set of values for those filters. For instance, to specify two landscape 'vn' and 'th', the query could be `/search/?text=&filter[environment]=integration&filter[landscape]=vn&filter[landscape]=th`. As an alternative, this API also supports fuzzy filter match with 'query' query params. For instance, searching assets that has 'bigqu' term in its description `/search/?text=&query[description]=bigqu` - operationId: CompassService_SearchAssets - responses: - "200": - description: A successful response. - schema: - $ref: '#/definitions/SearchAssetsResponse' - "400": - description: Returned when the data that user input is wrong. - schema: - $ref: '#/definitions/Status' - "404": - description: Returned when the resource does not exist. - schema: - $ref: '#/definitions/Status' - "409": - description: Returned when the resource already exist. - schema: - $ref: '#/definitions/Status' - "500": - description: Returned when theres is something wrong on the server side. - schema: - $ref: '#/definitions/Status' - default: - description: An unexpected error response. - schema: - $ref: '#/definitions/Status' - parameters: - - name: text - description: text to search for (fuzzy) - in: query - required: false - type: string - - name: rankby - description: descendingly sort based on a numeric field in the asset. the nested field is written with period separated field name. eg, "rankby[data.profile.usage_count]" - in: query - required: false - type: string - - name: size - description: number of results to return - in: query - required: false - type: integer - format: int64 - - name: filter[string] - description: This is a request variable of the map type. The query format is "map_name[key]=value", e.g. If the map name is Age, the key type is string, and the value type is integer, the query parameter is expressed as Age["bob"]=18 - in: query - required: false - type: string - - name: query[string] - description: This is a request variable of the map type. The query format is "map_name[key]=value", e.g. If the map name is Age, the key type is string, and the value type is integer, the query parameter is expressed as Age["bob"]=18 - in: query - required: false - type: string - - name: include_fields - in: query - required: false - type: array - items: - type: string - collectionFormat: multi - - name: offset - description: offset parameter defines the offset from the first result you want to fetch - in: query - required: false - type: integer - format: int64 - - name: flags.is_column_search - in: query - required: false - type: boolean - - name: flags.disable_fuzzy - in: query - required: false - type: boolean - - name: flags.enable_highlight - in: query - required: false - type: boolean - tags: - - Search - - Asset - /v1beta1/search/suggest: - get: - summary: Suggest an asset - description: API for retreiving N number of asset names that similar with the `text`. By default, N = 5 for now and hardcoded in the code. - operationId: CompassService_SuggestAssets - responses: - "200": - description: A successful response. - schema: - $ref: '#/definitions/SuggestAssetsResponse' - "400": - description: Returned when the data that user input is wrong. - schema: - $ref: '#/definitions/Status' - "404": - description: Returned when the resource does not exist. - schema: - $ref: '#/definitions/Status' - "409": - description: Returned when the resource already exist. - schema: - $ref: '#/definitions/Status' - "500": - description: Returned when theres is something wrong on the server side. - schema: - $ref: '#/definitions/Status' - default: - description: An unexpected error response. - schema: - $ref: '#/definitions/Status' - parameters: - - name: text - description: text to search for suggestions - in: query - required: false - type: string - tags: - - Search - - Asset - /v1beta1/tags/assets: - post: - summary: Tag an asset - description: Tag an asset with a tag template - operationId: CompassService_CreateTagAsset - responses: - "200": - description: A successful response. - schema: - $ref: '#/definitions/CreateTagAssetResponse' - "400": - description: Returned when the data that user input is wrong. - schema: - $ref: '#/definitions/Status' - "404": - description: Returned when the resource does not exist. - schema: - $ref: '#/definitions/Status' - "409": - description: Returned when the resource already exist. - schema: - $ref: '#/definitions/Status' - "500": - description: Returned when theres is something wrong on the server side. - schema: - $ref: '#/definitions/Status' - default: - description: An unexpected error response. - schema: - $ref: '#/definitions/Status' - parameters: - - name: body - description: Request to be sent to create a tag - in: body - required: true - schema: - $ref: '#/definitions/CreateTagAssetRequest' - tags: - - Tag - /v1beta1/tags/assets/{asset_id}: - get: - summary: Get an asset's tags - description: Get all tags for an assets - operationId: CompassService_GetAllTagsByAsset - responses: - "200": - description: A successful response. - schema: - $ref: '#/definitions/GetAllTagsByAssetResponse' - "400": - description: Returned when the data that user input is wrong. - schema: - $ref: '#/definitions/Status' - "404": - description: Returned when the resource does not exist. - schema: - $ref: '#/definitions/Status' - "409": - description: Returned when the resource already exist. - schema: - $ref: '#/definitions/Status' - "500": - description: Returned when theres is something wrong on the server side. - schema: - $ref: '#/definitions/Status' - default: - description: An unexpected error response. - schema: - $ref: '#/definitions/Status' - parameters: - - name: asset_id - in: path - required: true - type: string - tags: - - Tag - /v1beta1/tags/assets/{asset_id}/templates/{template_urn}: - get: - summary: Find a tag by asset and template - description: Find a single tag using asset id and template urn - operationId: CompassService_GetTagByAssetAndTemplate - responses: - "200": - description: A successful response. - schema: - $ref: '#/definitions/GetTagByAssetAndTemplateResponse' - "400": - description: Returned when the data that user input is wrong. - schema: - $ref: '#/definitions/Status' - "404": - description: Returned when the resource does not exist. - schema: - $ref: '#/definitions/Status' - "409": - description: Returned when the resource already exist. - schema: - $ref: '#/definitions/Status' - "500": - description: Returned when theres is something wrong on the server side. - schema: - $ref: '#/definitions/Status' - default: - description: An unexpected error response. - schema: - $ref: '#/definitions/Status' - parameters: - - name: asset_id - in: path - required: true - type: string - - name: template_urn - in: path - required: true - type: string - tags: - - Tag - delete: - summary: Remove a tag on an asset - description: Remove a tag on an asset in a type - operationId: CompassService_DeleteTagAsset - responses: - "200": - description: A successful response. - schema: - $ref: '#/definitions/DeleteTagAssetResponse' - "400": - description: Returned when the data that user input is wrong. - schema: - $ref: '#/definitions/Status' - "404": - description: Returned when the resource does not exist. - schema: - $ref: '#/definitions/Status' - "409": - description: Returned when the resource already exist. - schema: - $ref: '#/definitions/Status' - "500": - description: Returned when theres is something wrong on the server side. - schema: - $ref: '#/definitions/Status' - default: - description: An unexpected error response. - schema: - $ref: '#/definitions/Status' - parameters: - - name: asset_id - in: path - required: true - type: string - - name: template_urn - in: path - required: true - type: string - tags: - - Tag - put: - summary: Update a tag on an asset - description: Update a tag on an asset - operationId: CompassService_UpdateTagAsset - responses: - "200": - description: A successful response. - schema: - $ref: '#/definitions/UpdateTagAssetResponse' - "400": - description: Returned when the data that user input is wrong. - schema: - $ref: '#/definitions/Status' - "404": - description: Returned when the resource does not exist. - schema: - $ref: '#/definitions/Status' - "409": - description: Returned when the resource already exist. - schema: - $ref: '#/definitions/Status' - "500": - description: Returned when theres is something wrong on the server side. - schema: - $ref: '#/definitions/Status' - default: - description: An unexpected error response. - schema: - $ref: '#/definitions/Status' - parameters: - - name: asset_id - description: required - in: path - required: true - type: string - - name: template_urn - in: path - required: true - type: string - - name: body - in: body - required: true - schema: - type: object - properties: - tag_values: - type: array - items: - type: object - $ref: '#/definitions/TagValue' - title: required - template_display_name: - type: string - template_description: - type: string - description: Request to be sent to update an asset tag - title: UpdateTagAssetRequest - required: - - tag_values - tags: - - Tag - /v1beta1/tags/templates: - get: - summary: Get all tag templates - description: Get all available tag templates - operationId: CompassService_GetAllTagTemplates - responses: - "200": - description: A successful response. - schema: - $ref: '#/definitions/GetAllTagTemplatesResponse' - "400": - description: Returned when the data that user input is wrong. - schema: - $ref: '#/definitions/Status' - "404": - description: Returned when the resource does not exist. - schema: - $ref: '#/definitions/Status' - "409": - description: Returned when the resource already exist. - schema: - $ref: '#/definitions/Status' - "500": - description: Returned when theres is something wrong on the server side. - schema: - $ref: '#/definitions/Status' - default: - description: An unexpected error response. - schema: - $ref: '#/definitions/Status' - parameters: - - name: urn - in: query - required: false - type: string - tags: - - Tag - post: - summary: Create a template - description: Create a new tag template - operationId: CompassService_CreateTagTemplate - responses: - "200": - description: A successful response. - schema: - $ref: '#/definitions/CreateTagTemplateResponse' - "400": - description: Returned when the data that user input is wrong. - schema: - $ref: '#/definitions/Status' - "404": - description: Returned when the resource does not exist. - schema: - $ref: '#/definitions/Status' - "409": - description: Returned when the resource already exist. - schema: - $ref: '#/definitions/Status' - "500": - description: Returned when theres is something wrong on the server side. - schema: - $ref: '#/definitions/Status' - default: - description: An unexpected error response. - schema: - $ref: '#/definitions/Status' - parameters: - - name: body - description: Request to be sent to create a tag's template - in: body - required: true - schema: - $ref: '#/definitions/CreateTagTemplateRequest' - tags: - - Tag - /v1beta1/tags/templates/{template_urn}: - get: - summary: Get a tag template - description: Get a single tag template - operationId: CompassService_GetTagTemplate - responses: - "200": - description: A successful response. - schema: - $ref: '#/definitions/GetTagTemplateResponse' - "400": - description: Returned when the data that user input is wrong. - schema: - $ref: '#/definitions/Status' - "404": - description: Returned when the resource does not exist. - schema: - $ref: '#/definitions/Status' - "409": - description: Returned when the resource already exist. - schema: - $ref: '#/definitions/Status' - "500": - description: Returned when theres is something wrong on the server side. - schema: - $ref: '#/definitions/Status' - default: - description: An unexpected error response. - schema: - $ref: '#/definitions/Status' - parameters: - - name: template_urn - in: path - required: true - type: string - tags: - - Tag - delete: - summary: Delete a tag template - description: Delete a single tag template - operationId: CompassService_DeleteTagTemplate - responses: - "200": - description: A successful response. - schema: - $ref: '#/definitions/DeleteTagTemplateResponse' - "400": - description: Returned when the data that user input is wrong. - schema: - $ref: '#/definitions/Status' - "404": - description: Returned when the resource does not exist. - schema: - $ref: '#/definitions/Status' - "409": - description: Returned when the resource already exist. - schema: - $ref: '#/definitions/Status' - "500": - description: Returned when theres is something wrong on the server side. - schema: - $ref: '#/definitions/Status' - default: - description: An unexpected error response. - schema: - $ref: '#/definitions/Status' - parameters: - - name: template_urn - in: path - required: true - type: string - tags: - - Tag - put: - summary: Update a template - description: Update an existing tag template - operationId: CompassService_UpdateTagTemplate - responses: - "200": - description: A successful response. - schema: - $ref: '#/definitions/UpdateTagTemplateResponse' - "400": - description: Returned when the data that user input is wrong. - schema: - $ref: '#/definitions/Status' - "404": - description: Returned when the resource does not exist. - schema: - $ref: '#/definitions/Status' - "409": - description: Returned when the resource already exist. - schema: - $ref: '#/definitions/Status' - "500": - description: Returned when theres is something wrong on the server side. - schema: - $ref: '#/definitions/Status' - default: - description: An unexpected error response. - schema: - $ref: '#/definitions/Status' - parameters: - - name: template_urn - in: path - required: true - type: string - - name: body - in: body - required: true - schema: - type: object - properties: - display_name: - type: string - title: required - description: - type: string - title: required - fields: - type: array - items: - type: object - $ref: '#/definitions/TagTemplateField' - title: required - description: Request to be sent to update a tag's template - title: UpdateTagTemplateRequest - required: - - display_name - - description - - fields - tags: - - Tag - /v1beta1/types: - get: - summary: fetch all types - description: Fetch all types supported in Compass - operationId: CompassService_GetAllTypes - responses: - "200": - description: A successful response. - schema: - $ref: '#/definitions/GetAllTypesResponse' - "400": - description: Returned when the data that user input is wrong. - schema: - $ref: '#/definitions/Status' - "404": - description: Returned when the resource does not exist. - schema: - $ref: '#/definitions/Status' - "409": - description: Returned when the resource already exist. - schema: - $ref: '#/definitions/Status' - "500": - description: Returned when theres is something wrong on the server side. - schema: - $ref: '#/definitions/Status' - default: - description: An unexpected error response. - schema: - $ref: '#/definitions/Status' - parameters: - - name: q - description: filter by specific query - in: query - required: false - type: string - - name: q_fields - description: filter by multiple query fields - in: query - required: false - type: string - - name: types - description: filter by multiple types - in: query - required: false - type: string - - name: services - description: filter by multiple services - in: query - required: false - type: string - - name: data[string] - description: This is a request variable of the map type. The query format is "map_name[key]=value", e.g. If the map name is Age, the key type is string, and the value type is integer, the query parameter is expressed as Age["bob"]=18 - in: query - required: false - type: string - tags: - - Type - /v1beta1/users/{user_id}/starred: - get: - summary: Get assets starred by a user - description: Get all assets starred by a user - operationId: CompassService_GetUserStarredAssets - responses: - "200": - description: A successful response. - schema: - $ref: '#/definitions/GetUserStarredAssetsResponse' - "400": - description: Returned when the data that user input is wrong. - schema: - $ref: '#/definitions/Status' - "404": - description: Returned when the resource does not exist. - schema: - $ref: '#/definitions/Status' - "409": - description: Returned when the resource already exist. - schema: - $ref: '#/definitions/Status' - "500": - description: Returned when theres is something wrong on the server side. - schema: - $ref: '#/definitions/Status' - default: - description: An unexpected error response. - schema: - $ref: '#/definitions/Status' - parameters: - - name: user_id - in: path - required: true - type: string - - name: size - in: query - required: false - type: integer - format: int64 - - name: offset - in: query - required: false - type: integer - format: int64 - tags: - - User - - Star -definitions: - Any: - type: object - properties: - '@type': - type: string - additionalProperties: {} - AssetGroup: - type: object - properties: - group_fields: - type: array - items: - type: object - $ref: '#/definitions/GroupField' - assets: - type: array - items: - type: object - $ref: '#/definitions/v1beta1.Asset' - Change: - type: object - properties: - type: - type: string - path: - type: array - items: - type: string - from: {} - to: {} - title: Change - Comment: - type: object - properties: - id: - type: string - discussion_id: - type: string - body: - type: string - owner: - $ref: '#/definitions/User' - updated_by: - $ref: '#/definitions/User' - created_at: - type: string - format: date-time - updated_at: - type: string - format: date-time - title: Comment - CreateAssetProbeRequest.Probe: - type: object - properties: - status: - type: string - status_reason: - type: string - metadata: - type: object - timestamp: - type: string - format: date-time - id: - type: string - description: optional probe ID, if not provided will be auto-generated - required: - - status - CreateAssetProbeResponse: - type: object - properties: - id: - type: string - CreateCommentResponse: - type: object - properties: - id: - type: string - CreateDiscussionRequest: - type: object - properties: - title: - type: string - body: - type: string - type: - type: string - state: - type: string - labels: - type: array - items: - type: string - assets: - type: array - items: - type: string - assignees: - type: array - items: - type: string - description: Request to be sent to create a discussion - required: - - title - - body - CreateDiscussionResponse: - type: object - properties: - id: - type: string - CreateNamespaceRequest: - type: object - properties: - id: - type: string - description: optional, if not specified will be auto generated - name: - type: string - state: - type: string - metadata: - type: object - description: key value pairs as metadata for the namespace - CreateNamespaceResponse: - type: object - properties: - id: - type: string - CreateTagAssetRequest: - type: object - properties: - asset_id: - type: string - title: required - template_urn: - type: string - title: required - tag_values: - type: array - items: - type: object - $ref: '#/definitions/TagValue' - title: required - template_display_name: - type: string - template_description: - type: string - description: Request to be sent to create a tag - title: CreateTagAssetRequest - required: - - asset_id - - template_urn - - tag_values - CreateTagAssetResponse: - type: object - properties: - data: - $ref: '#/definitions/v1beta1.Tag' - CreateTagTemplateRequest: - type: object - properties: - urn: - type: string - title: required - display_name: - type: string - title: required - description: - type: string - title: required - fields: - type: array - items: - type: object - $ref: '#/definitions/TagTemplateField' - title: required - description: Request to be sent to create a tag's template - title: CreateTagTemplateRequest - required: - - urn - - display_name - - description - - tag_values - CreateTagTemplateResponse: - type: object - properties: - data: - $ref: '#/definitions/TagTemplate' - DeleteAssetResponse: - type: object - DeleteCommentResponse: - type: object - DeleteTagAssetResponse: - type: object - DeleteTagTemplateResponse: - type: object - Discussion: - type: object - properties: - id: - type: string - title: - type: string - body: - type: string - type: - type: string - state: - type: string - labels: - type: array - items: - type: string - assets: - type: array - items: - type: string - assignees: - type: array - items: - type: string - owner: - $ref: '#/definitions/User' - created_at: - type: string - format: date-time - updated_at: - type: string - format: date-time - title: Discussion - GetAllAssetsResponse: - type: object - properties: - data: - type: array - items: - type: object - $ref: '#/definitions/v1beta1.Asset' - total: - type: integer - format: int64 - GetAllCommentsResponse: - type: object - properties: - data: - type: array - items: - type: object - $ref: '#/definitions/Comment' - GetAllDiscussionsResponse: - type: object - properties: - data: - type: array - items: - type: object - $ref: '#/definitions/Discussion' - GetAllTagTemplatesResponse: - type: object - properties: - data: - type: array - items: - type: object - $ref: '#/definitions/TagTemplate' - GetAllTagsByAssetResponse: - type: object - properties: - data: - type: array - items: - type: object - $ref: '#/definitions/v1beta1.Tag' - GetAllTypesResponse: - type: object - properties: - data: - type: array - items: - type: object - $ref: '#/definitions/v1beta1.Type' - GetAssetByIDResponse: - type: object - properties: - data: - $ref: '#/definitions/v1beta1.Asset' - GetAssetByVersionResponse: - type: object - properties: - data: - $ref: '#/definitions/v1beta1.Asset' - GetAssetStargazersResponse: - type: object - properties: - data: - type: array - items: - type: object - $ref: '#/definitions/User' - GetAssetVersionHistoryResponse: - type: object - properties: - data: - type: array - items: - type: object - $ref: '#/definitions/v1beta1.Asset' - GetCommentResponse: - type: object - properties: - data: - $ref: '#/definitions/Comment' - GetDiscussionResponse: - type: object - properties: - data: - $ref: '#/definitions/Discussion' - GetGraphResponse: - type: object - properties: - data: - type: array - items: - type: object - $ref: '#/definitions/LineageEdge' - description: Edges in the graph. - node_attrs: - type: object - additionalProperties: - $ref: '#/definitions/NodeAttributes' - description: |- - Key is the asset URN. Node attributes, if present, will be returned for - source and target nodes in the LineageEdge. - GetMyDiscussionsResponse: - type: object - properties: - data: - type: array - items: - type: object - $ref: '#/definitions/Discussion' - GetMyStarredAssetResponse: - type: object - properties: - data: - $ref: '#/definitions/v1beta1.Asset' - GetMyStarredAssetsResponse: - type: object - properties: - data: - type: array - items: - type: object - $ref: '#/definitions/v1beta1.Asset' - GetNamespaceResponse: - type: object - properties: - namespace: - $ref: '#/definitions/Namespace' - GetTagByAssetAndTemplateResponse: - type: object - properties: - data: - $ref: '#/definitions/v1beta1.Tag' - GetTagTemplateResponse: - type: object - properties: - data: - $ref: '#/definitions/TagTemplate' - GetUserStarredAssetsResponse: - type: object - properties: - data: - type: array - items: - type: object - $ref: '#/definitions/v1beta1.Asset' - GroupAssetsResponse: - type: object - properties: - asset_groups: - type: array - items: - type: object - $ref: '#/definitions/AssetGroup' - GroupField: - type: object - properties: - group_key: - type: string - group_value: - type: string - LineageEdge: - type: object - properties: - source: - type: string - target: - type: string - prop: - type: object - title: LineageEdge - LineageNode: - type: object - properties: - urn: - type: string - type: - type: string - service: - type: string - title: LineageNode - ListNamespacesResponse: - type: object - properties: - namespaces: - type: array - items: - type: object - $ref: '#/definitions/Namespace' - Namespace: - type: object - properties: - id: - type: string - name: - type: string - state: - type: string - metadata: - type: object - description: key value pairs as metadata for the namespace - NodeAttributes: - type: object - properties: - probes: - $ref: '#/definitions/ProbesInfo' - NullValue: - type: string - enum: - - NULL_VALUE - default: NULL_VALUE - description: |- - `NullValue` is a singleton enumeration to represent the null value for the - `Value` type union. - - The JSON representation for `NullValue` is JSON `null`. - - - NULL_VALUE: Null value. - PatchDiscussionResponse: - type: object - ProbesInfo: - type: object - properties: - latest: - $ref: '#/definitions/v1beta1.Probe' - SearchAssetsResponse: - type: object - properties: - data: - type: array - items: - type: object - $ref: '#/definitions/v1beta1.Asset' - SearchFlags: - type: object - properties: - is_column_search: - type: boolean - disable_fuzzy: - type: boolean - enable_highlight: - type: boolean - StarAssetResponse: - type: object - properties: - id: - type: string - Status: - type: object - properties: - code: - type: integer - format: int32 - message: - type: string - details: - type: array - items: - type: object - $ref: '#/definitions/Any' - SuggestAssetsResponse: - type: object - properties: - data: - type: array - items: - type: string - TagTemplate: - type: object - properties: - urn: - type: string - display_name: - type: string - description: - type: string - fields: - type: array - items: - type: object - $ref: '#/definitions/TagTemplateField' - created_at: - type: string - format: date-time - updated_at: - type: string - format: date-time - title: TagTemplate - TagTemplateField: - type: object - properties: - id: - type: integer - format: int64 - urn: - type: string - display_name: - type: string - description: - type: string - data_type: - type: string - options: - type: array - items: - type: string - required: - type: boolean - created_at: - type: string - format: date-time - updated_at: - type: string - format: date-time - title: TagTemplateField - TagValue: - type: object - properties: - field_id: - type: integer - format: int64 - field_value: {} - field_urn: - type: string - field_display_name: - type: string - field_description: - type: string - field_data_type: - type: string - field_options: - type: array - items: - type: string - field_required: - type: boolean - created_at: - type: string - format: date-time - updated_at: - type: string - format: date-time - title: TagValue - UnstarAssetResponse: - type: object - UpdateCommentResponse: - type: object - UpdateNamespaceResponse: - type: object - UpdateTagAssetResponse: - type: object - properties: - data: - $ref: '#/definitions/v1beta1.Tag' - UpdateTagTemplateResponse: - type: object - properties: - data: - $ref: '#/definitions/TagTemplate' - UpsertAssetRequest: - type: object - properties: - asset: - $ref: '#/definitions/UpsertAssetRequest.Asset' - upstreams: - type: array - items: - type: object - $ref: '#/definitions/LineageNode' - downstreams: - type: array - items: - type: object - $ref: '#/definitions/LineageNode' - update_only: - type: boolean - description: if true, only update existing assets, do not create new ones - UpsertAssetRequest.Asset: - type: object - properties: - urn: - type: string - type: - type: string - name: - type: string - service: - type: string - description: - type: string - data: - type: object - description: dynamic data of an asset - labels: - type: object - additionalProperties: - type: string - description: labels of an asset - owners: - type: array - items: - type: object - $ref: '#/definitions/User' - description: list of owners of the asset - url: - type: string - UpsertAssetResponse: - type: object - properties: - id: - type: string - UpsertPatchAssetRequest: - type: object - properties: - asset: - $ref: '#/definitions/UpsertPatchAssetRequest.Asset' - upstreams: - type: array - items: - type: object - $ref: '#/definitions/LineageNode' - downstreams: - type: array - items: - type: object - $ref: '#/definitions/LineageNode' - overwrite_lineage: - type: boolean - description: |- - overwrite_lineage determines whether the asset's lineage should be - overwritten with the upstreams and downstreams specified in the request. - Currently, it is only applicable when both upstreams and downstreams are - empty/not specified. - update_only: - type: boolean - description: if true, only update existing assets, do not create new ones - UpsertPatchAssetRequest.Asset: - type: object - properties: - urn: - type: string - type: - type: string - name: - type: string - description: name of an asset - service: - type: string - description: - type: string - description: description of an asset - data: - type: object - description: dynamic data of an asset - labels: - type: object - additionalProperties: - type: string - description: labels of an asset - owners: - type: array - items: - type: object - $ref: '#/definitions/User' - description: list of owners of the asset - url: - type: string - UpsertPatchAssetResponse: - type: object - properties: - id: - type: string - User: - type: object - properties: - id: - type: string - uuid: - type: string - email: - type: string - provider: - type: string - created_at: - type: string - format: date-time - updated_at: - type: string - format: date-time - title: User - v1beta1.Asset: - type: object - properties: - id: - type: string - urn: - type: string - type: - type: string - service: - type: string - name: - type: string - description: - type: string - data: - type: object - labels: - type: object - additionalProperties: - type: string - owners: - type: array - items: - type: object - $ref: '#/definitions/User' - version: - type: string - updated_by: - $ref: '#/definitions/User' - changelog: - type: array - items: - type: object - $ref: '#/definitions/Change' - created_at: - type: string - format: date-time - updated_at: - type: string - format: date-time - url: - type: string - probes: - type: array - items: - type: object - $ref: '#/definitions/v1beta1.Probe' - is_deleted: - type: boolean - title: Asset - v1beta1.Probe: - type: object - properties: - id: - type: string - asset_urn: - type: string - status: - type: string - status_reason: - type: string - metadata: - type: object - timestamp: - type: string - format: date-time - created_at: - type: string - format: date-time - title: Probe - v1beta1.Tag: - type: object - properties: - asset_id: - type: string - template_urn: - type: string - tag_values: - type: array - items: - type: object - $ref: '#/definitions/TagValue' - template_display_name: - type: string - template_description: - type: string - title: Tag - v1beta1.Type: - type: object - properties: - name: - type: string - count: - type: integer - format: int64 -externalDocs: - description: More about Compass - url: https://raystack.gitbook.io/compass/ diff --git a/proto/compassv1beta1/compassv1beta1connect/service.connect.go b/proto/compassv1beta1/compassv1beta1connect/service.connect.go new file mode 100644 index 00000000..87d50674 --- /dev/null +++ b/proto/compassv1beta1/compassv1beta1connect/service.connect.go @@ -0,0 +1,1337 @@ +// Code generated by protoc-gen-connect-go. DO NOT EDIT. +// +// Source: raystack/compass/v1beta1/service.proto + +package compassv1beta1connect + +import ( + connect "connectrpc.com/connect" + context "context" + errors "errors" + compassv1beta1 "github.com/raystack/compass/proto/compassv1beta1" + http "net/http" + strings "strings" +) + +// This is a compile-time assertion to ensure that this generated file and the connect package are +// compatible. If you get a compiler error that this constant is not defined, this code was +// generated with a version of connect newer than the one compiled into your binary. You can fix the +// problem by either regenerating this code with an older version of connect or updating the connect +// version compiled into your binary. +const _ = connect.IsAtLeastVersion1_13_0 + +const ( + // CompassServiceName is the fully-qualified name of the CompassService service. + CompassServiceName = "raystack.compass.v1beta1.CompassService" +) + +// These constants are the fully-qualified names of the RPCs defined in this package. They're +// exposed at runtime as Spec.Procedure and as the final two segments of the HTTP route. +// +// Note that these are different from the fully-qualified method names used by +// google.golang.org/protobuf/reflect/protoreflect. To convert from these constants to +// reflection-formatted method names, remove the leading slash and convert the remaining slash to a +// period. +const ( + // CompassServiceGetAllDiscussionsProcedure is the fully-qualified name of the CompassService's + // GetAllDiscussions RPC. + CompassServiceGetAllDiscussionsProcedure = "/raystack.compass.v1beta1.CompassService/GetAllDiscussions" + // CompassServiceCreateDiscussionProcedure is the fully-qualified name of the CompassService's + // CreateDiscussion RPC. + CompassServiceCreateDiscussionProcedure = "/raystack.compass.v1beta1.CompassService/CreateDiscussion" + // CompassServiceGetDiscussionProcedure is the fully-qualified name of the CompassService's + // GetDiscussion RPC. + CompassServiceGetDiscussionProcedure = "/raystack.compass.v1beta1.CompassService/GetDiscussion" + // CompassServicePatchDiscussionProcedure is the fully-qualified name of the CompassService's + // PatchDiscussion RPC. + CompassServicePatchDiscussionProcedure = "/raystack.compass.v1beta1.CompassService/PatchDiscussion" + // CompassServiceCreateCommentProcedure is the fully-qualified name of the CompassService's + // CreateComment RPC. + CompassServiceCreateCommentProcedure = "/raystack.compass.v1beta1.CompassService/CreateComment" + // CompassServiceGetAllCommentsProcedure is the fully-qualified name of the CompassService's + // GetAllComments RPC. + CompassServiceGetAllCommentsProcedure = "/raystack.compass.v1beta1.CompassService/GetAllComments" + // CompassServiceGetCommentProcedure is the fully-qualified name of the CompassService's GetComment + // RPC. + CompassServiceGetCommentProcedure = "/raystack.compass.v1beta1.CompassService/GetComment" + // CompassServiceUpdateCommentProcedure is the fully-qualified name of the CompassService's + // UpdateComment RPC. + CompassServiceUpdateCommentProcedure = "/raystack.compass.v1beta1.CompassService/UpdateComment" + // CompassServiceDeleteCommentProcedure is the fully-qualified name of the CompassService's + // DeleteComment RPC. + CompassServiceDeleteCommentProcedure = "/raystack.compass.v1beta1.CompassService/DeleteComment" + // CompassServiceSearchAssetsProcedure is the fully-qualified name of the CompassService's + // SearchAssets RPC. + CompassServiceSearchAssetsProcedure = "/raystack.compass.v1beta1.CompassService/SearchAssets" + // CompassServiceSuggestAssetsProcedure is the fully-qualified name of the CompassService's + // SuggestAssets RPC. + CompassServiceSuggestAssetsProcedure = "/raystack.compass.v1beta1.CompassService/SuggestAssets" + // CompassServiceGroupAssetsProcedure is the fully-qualified name of the CompassService's + // GroupAssets RPC. + CompassServiceGroupAssetsProcedure = "/raystack.compass.v1beta1.CompassService/GroupAssets" + // CompassServiceGetGraphProcedure is the fully-qualified name of the CompassService's GetGraph RPC. + CompassServiceGetGraphProcedure = "/raystack.compass.v1beta1.CompassService/GetGraph" + // CompassServiceGetAllTypesProcedure is the fully-qualified name of the CompassService's + // GetAllTypes RPC. + CompassServiceGetAllTypesProcedure = "/raystack.compass.v1beta1.CompassService/GetAllTypes" + // CompassServiceGetAllAssetsProcedure is the fully-qualified name of the CompassService's + // GetAllAssets RPC. + CompassServiceGetAllAssetsProcedure = "/raystack.compass.v1beta1.CompassService/GetAllAssets" + // CompassServiceGetAssetByIDProcedure is the fully-qualified name of the CompassService's + // GetAssetByID RPC. + CompassServiceGetAssetByIDProcedure = "/raystack.compass.v1beta1.CompassService/GetAssetByID" + // CompassServiceUpsertAssetProcedure is the fully-qualified name of the CompassService's + // UpsertAsset RPC. + CompassServiceUpsertAssetProcedure = "/raystack.compass.v1beta1.CompassService/UpsertAsset" + // CompassServiceUpsertPatchAssetProcedure is the fully-qualified name of the CompassService's + // UpsertPatchAsset RPC. + CompassServiceUpsertPatchAssetProcedure = "/raystack.compass.v1beta1.CompassService/UpsertPatchAsset" + // CompassServiceDeleteAssetProcedure is the fully-qualified name of the CompassService's + // DeleteAsset RPC. + CompassServiceDeleteAssetProcedure = "/raystack.compass.v1beta1.CompassService/DeleteAsset" + // CompassServiceGetAssetStargazersProcedure is the fully-qualified name of the CompassService's + // GetAssetStargazers RPC. + CompassServiceGetAssetStargazersProcedure = "/raystack.compass.v1beta1.CompassService/GetAssetStargazers" + // CompassServiceGetAssetVersionHistoryProcedure is the fully-qualified name of the CompassService's + // GetAssetVersionHistory RPC. + CompassServiceGetAssetVersionHistoryProcedure = "/raystack.compass.v1beta1.CompassService/GetAssetVersionHistory" + // CompassServiceGetAssetByVersionProcedure is the fully-qualified name of the CompassService's + // GetAssetByVersion RPC. + CompassServiceGetAssetByVersionProcedure = "/raystack.compass.v1beta1.CompassService/GetAssetByVersion" + // CompassServiceCreateAssetProbeProcedure is the fully-qualified name of the CompassService's + // CreateAssetProbe RPC. + CompassServiceCreateAssetProbeProcedure = "/raystack.compass.v1beta1.CompassService/CreateAssetProbe" + // CompassServiceGetUserStarredAssetsProcedure is the fully-qualified name of the CompassService's + // GetUserStarredAssets RPC. + CompassServiceGetUserStarredAssetsProcedure = "/raystack.compass.v1beta1.CompassService/GetUserStarredAssets" + // CompassServiceGetMyStarredAssetsProcedure is the fully-qualified name of the CompassService's + // GetMyStarredAssets RPC. + CompassServiceGetMyStarredAssetsProcedure = "/raystack.compass.v1beta1.CompassService/GetMyStarredAssets" + // CompassServiceGetMyStarredAssetProcedure is the fully-qualified name of the CompassService's + // GetMyStarredAsset RPC. + CompassServiceGetMyStarredAssetProcedure = "/raystack.compass.v1beta1.CompassService/GetMyStarredAsset" + // CompassServiceStarAssetProcedure is the fully-qualified name of the CompassService's StarAsset + // RPC. + CompassServiceStarAssetProcedure = "/raystack.compass.v1beta1.CompassService/StarAsset" + // CompassServiceUnstarAssetProcedure is the fully-qualified name of the CompassService's + // UnstarAsset RPC. + CompassServiceUnstarAssetProcedure = "/raystack.compass.v1beta1.CompassService/UnstarAsset" + // CompassServiceGetMyDiscussionsProcedure is the fully-qualified name of the CompassService's + // GetMyDiscussions RPC. + CompassServiceGetMyDiscussionsProcedure = "/raystack.compass.v1beta1.CompassService/GetMyDiscussions" + // CompassServiceCreateTagAssetProcedure is the fully-qualified name of the CompassService's + // CreateTagAsset RPC. + CompassServiceCreateTagAssetProcedure = "/raystack.compass.v1beta1.CompassService/CreateTagAsset" + // CompassServiceGetTagByAssetAndTemplateProcedure is the fully-qualified name of the + // CompassService's GetTagByAssetAndTemplate RPC. + CompassServiceGetTagByAssetAndTemplateProcedure = "/raystack.compass.v1beta1.CompassService/GetTagByAssetAndTemplate" + // CompassServiceUpdateTagAssetProcedure is the fully-qualified name of the CompassService's + // UpdateTagAsset RPC. + CompassServiceUpdateTagAssetProcedure = "/raystack.compass.v1beta1.CompassService/UpdateTagAsset" + // CompassServiceDeleteTagAssetProcedure is the fully-qualified name of the CompassService's + // DeleteTagAsset RPC. + CompassServiceDeleteTagAssetProcedure = "/raystack.compass.v1beta1.CompassService/DeleteTagAsset" + // CompassServiceGetAllTagsByAssetProcedure is the fully-qualified name of the CompassService's + // GetAllTagsByAsset RPC. + CompassServiceGetAllTagsByAssetProcedure = "/raystack.compass.v1beta1.CompassService/GetAllTagsByAsset" + // CompassServiceGetAllTagTemplatesProcedure is the fully-qualified name of the CompassService's + // GetAllTagTemplates RPC. + CompassServiceGetAllTagTemplatesProcedure = "/raystack.compass.v1beta1.CompassService/GetAllTagTemplates" + // CompassServiceCreateTagTemplateProcedure is the fully-qualified name of the CompassService's + // CreateTagTemplate RPC. + CompassServiceCreateTagTemplateProcedure = "/raystack.compass.v1beta1.CompassService/CreateTagTemplate" + // CompassServiceGetTagTemplateProcedure is the fully-qualified name of the CompassService's + // GetTagTemplate RPC. + CompassServiceGetTagTemplateProcedure = "/raystack.compass.v1beta1.CompassService/GetTagTemplate" + // CompassServiceUpdateTagTemplateProcedure is the fully-qualified name of the CompassService's + // UpdateTagTemplate RPC. + CompassServiceUpdateTagTemplateProcedure = "/raystack.compass.v1beta1.CompassService/UpdateTagTemplate" + // CompassServiceDeleteTagTemplateProcedure is the fully-qualified name of the CompassService's + // DeleteTagTemplate RPC. + CompassServiceDeleteTagTemplateProcedure = "/raystack.compass.v1beta1.CompassService/DeleteTagTemplate" + // CompassServiceCreateNamespaceProcedure is the fully-qualified name of the CompassService's + // CreateNamespace RPC. + CompassServiceCreateNamespaceProcedure = "/raystack.compass.v1beta1.CompassService/CreateNamespace" + // CompassServiceGetNamespaceProcedure is the fully-qualified name of the CompassService's + // GetNamespace RPC. + CompassServiceGetNamespaceProcedure = "/raystack.compass.v1beta1.CompassService/GetNamespace" + // CompassServiceUpdateNamespaceProcedure is the fully-qualified name of the CompassService's + // UpdateNamespace RPC. + CompassServiceUpdateNamespaceProcedure = "/raystack.compass.v1beta1.CompassService/UpdateNamespace" + // CompassServiceListNamespacesProcedure is the fully-qualified name of the CompassService's + // ListNamespaces RPC. + CompassServiceListNamespacesProcedure = "/raystack.compass.v1beta1.CompassService/ListNamespaces" +) + +// CompassServiceClient is a client for the raystack.compass.v1beta1.CompassService service. +type CompassServiceClient interface { + // Domain: Discussion + GetAllDiscussions(context.Context, *connect.Request[compassv1beta1.GetAllDiscussionsRequest]) (*connect.Response[compassv1beta1.GetAllDiscussionsResponse], error) + CreateDiscussion(context.Context, *connect.Request[compassv1beta1.CreateDiscussionRequest]) (*connect.Response[compassv1beta1.CreateDiscussionResponse], error) + GetDiscussion(context.Context, *connect.Request[compassv1beta1.GetDiscussionRequest]) (*connect.Response[compassv1beta1.GetDiscussionResponse], error) + PatchDiscussion(context.Context, *connect.Request[compassv1beta1.PatchDiscussionRequest]) (*connect.Response[compassv1beta1.PatchDiscussionResponse], error) + CreateComment(context.Context, *connect.Request[compassv1beta1.CreateCommentRequest]) (*connect.Response[compassv1beta1.CreateCommentResponse], error) + GetAllComments(context.Context, *connect.Request[compassv1beta1.GetAllCommentsRequest]) (*connect.Response[compassv1beta1.GetAllCommentsResponse], error) + GetComment(context.Context, *connect.Request[compassv1beta1.GetCommentRequest]) (*connect.Response[compassv1beta1.GetCommentResponse], error) + UpdateComment(context.Context, *connect.Request[compassv1beta1.UpdateCommentRequest]) (*connect.Response[compassv1beta1.UpdateCommentResponse], error) + DeleteComment(context.Context, *connect.Request[compassv1beta1.DeleteCommentRequest]) (*connect.Response[compassv1beta1.DeleteCommentResponse], error) + // Domain: Asset + SearchAssets(context.Context, *connect.Request[compassv1beta1.SearchAssetsRequest]) (*connect.Response[compassv1beta1.SearchAssetsResponse], error) + SuggestAssets(context.Context, *connect.Request[compassv1beta1.SuggestAssetsRequest]) (*connect.Response[compassv1beta1.SuggestAssetsResponse], error) + GroupAssets(context.Context, *connect.Request[compassv1beta1.GroupAssetsRequest]) (*connect.Response[compassv1beta1.GroupAssetsResponse], error) + GetGraph(context.Context, *connect.Request[compassv1beta1.GetGraphRequest]) (*connect.Response[compassv1beta1.GetGraphResponse], error) + GetAllTypes(context.Context, *connect.Request[compassv1beta1.GetAllTypesRequest]) (*connect.Response[compassv1beta1.GetAllTypesResponse], error) + GetAllAssets(context.Context, *connect.Request[compassv1beta1.GetAllAssetsRequest]) (*connect.Response[compassv1beta1.GetAllAssetsResponse], error) + GetAssetByID(context.Context, *connect.Request[compassv1beta1.GetAssetByIDRequest]) (*connect.Response[compassv1beta1.GetAssetByIDResponse], error) + UpsertAsset(context.Context, *connect.Request[compassv1beta1.UpsertAssetRequest]) (*connect.Response[compassv1beta1.UpsertAssetResponse], error) + UpsertPatchAsset(context.Context, *connect.Request[compassv1beta1.UpsertPatchAssetRequest]) (*connect.Response[compassv1beta1.UpsertPatchAssetResponse], error) + DeleteAsset(context.Context, *connect.Request[compassv1beta1.DeleteAssetRequest]) (*connect.Response[compassv1beta1.DeleteAssetResponse], error) + GetAssetStargazers(context.Context, *connect.Request[compassv1beta1.GetAssetStargazersRequest]) (*connect.Response[compassv1beta1.GetAssetStargazersResponse], error) + GetAssetVersionHistory(context.Context, *connect.Request[compassv1beta1.GetAssetVersionHistoryRequest]) (*connect.Response[compassv1beta1.GetAssetVersionHistoryResponse], error) + GetAssetByVersion(context.Context, *connect.Request[compassv1beta1.GetAssetByVersionRequest]) (*connect.Response[compassv1beta1.GetAssetByVersionResponse], error) + CreateAssetProbe(context.Context, *connect.Request[compassv1beta1.CreateAssetProbeRequest]) (*connect.Response[compassv1beta1.CreateAssetProbeResponse], error) + // Domain: User * Star + GetUserStarredAssets(context.Context, *connect.Request[compassv1beta1.GetUserStarredAssetsRequest]) (*connect.Response[compassv1beta1.GetUserStarredAssetsResponse], error) + GetMyStarredAssets(context.Context, *connect.Request[compassv1beta1.GetMyStarredAssetsRequest]) (*connect.Response[compassv1beta1.GetMyStarredAssetsResponse], error) + GetMyStarredAsset(context.Context, *connect.Request[compassv1beta1.GetMyStarredAssetRequest]) (*connect.Response[compassv1beta1.GetMyStarredAssetResponse], error) + StarAsset(context.Context, *connect.Request[compassv1beta1.StarAssetRequest]) (*connect.Response[compassv1beta1.StarAssetResponse], error) + UnstarAsset(context.Context, *connect.Request[compassv1beta1.UnstarAssetRequest]) (*connect.Response[compassv1beta1.UnstarAssetResponse], error) + GetMyDiscussions(context.Context, *connect.Request[compassv1beta1.GetMyDiscussionsRequest]) (*connect.Response[compassv1beta1.GetMyDiscussionsResponse], error) + // Domain: Tag Templates + CreateTagAsset(context.Context, *connect.Request[compassv1beta1.CreateTagAssetRequest]) (*connect.Response[compassv1beta1.CreateTagAssetResponse], error) + GetTagByAssetAndTemplate(context.Context, *connect.Request[compassv1beta1.GetTagByAssetAndTemplateRequest]) (*connect.Response[compassv1beta1.GetTagByAssetAndTemplateResponse], error) + UpdateTagAsset(context.Context, *connect.Request[compassv1beta1.UpdateTagAssetRequest]) (*connect.Response[compassv1beta1.UpdateTagAssetResponse], error) + DeleteTagAsset(context.Context, *connect.Request[compassv1beta1.DeleteTagAssetRequest]) (*connect.Response[compassv1beta1.DeleteTagAssetResponse], error) + GetAllTagsByAsset(context.Context, *connect.Request[compassv1beta1.GetAllTagsByAssetRequest]) (*connect.Response[compassv1beta1.GetAllTagsByAssetResponse], error) + GetAllTagTemplates(context.Context, *connect.Request[compassv1beta1.GetAllTagTemplatesRequest]) (*connect.Response[compassv1beta1.GetAllTagTemplatesResponse], error) + CreateTagTemplate(context.Context, *connect.Request[compassv1beta1.CreateTagTemplateRequest]) (*connect.Response[compassv1beta1.CreateTagTemplateResponse], error) + GetTagTemplate(context.Context, *connect.Request[compassv1beta1.GetTagTemplateRequest]) (*connect.Response[compassv1beta1.GetTagTemplateResponse], error) + UpdateTagTemplate(context.Context, *connect.Request[compassv1beta1.UpdateTagTemplateRequest]) (*connect.Response[compassv1beta1.UpdateTagTemplateResponse], error) + DeleteTagTemplate(context.Context, *connect.Request[compassv1beta1.DeleteTagTemplateRequest]) (*connect.Response[compassv1beta1.DeleteTagTemplateResponse], error) + // Domain: Namespace + CreateNamespace(context.Context, *connect.Request[compassv1beta1.CreateNamespaceRequest]) (*connect.Response[compassv1beta1.CreateNamespaceResponse], error) + GetNamespace(context.Context, *connect.Request[compassv1beta1.GetNamespaceRequest]) (*connect.Response[compassv1beta1.GetNamespaceResponse], error) + UpdateNamespace(context.Context, *connect.Request[compassv1beta1.UpdateNamespaceRequest]) (*connect.Response[compassv1beta1.UpdateNamespaceResponse], error) + ListNamespaces(context.Context, *connect.Request[compassv1beta1.ListNamespacesRequest]) (*connect.Response[compassv1beta1.ListNamespacesResponse], error) +} + +// NewCompassServiceClient constructs a client for the raystack.compass.v1beta1.CompassService +// service. By default, it uses the Connect protocol with the binary Protobuf Codec, asks for +// gzipped responses, and sends uncompressed requests. To use the gRPC or gRPC-Web protocols, supply +// the connect.WithGRPC() or connect.WithGRPCWeb() options. +// +// The URL supplied here should be the base URL for the Connect or gRPC server (for example, +// http://api.acme.com or https://acme.com/grpc). +func NewCompassServiceClient(httpClient connect.HTTPClient, baseURL string, opts ...connect.ClientOption) CompassServiceClient { + baseURL = strings.TrimRight(baseURL, "/") + compassServiceMethods := compassv1beta1.File_raystack_compass_v1beta1_service_proto.Services().ByName("CompassService").Methods() + return &compassServiceClient{ + getAllDiscussions: connect.NewClient[compassv1beta1.GetAllDiscussionsRequest, compassv1beta1.GetAllDiscussionsResponse]( + httpClient, + baseURL+CompassServiceGetAllDiscussionsProcedure, + connect.WithSchema(compassServiceMethods.ByName("GetAllDiscussions")), + connect.WithClientOptions(opts...), + ), + createDiscussion: connect.NewClient[compassv1beta1.CreateDiscussionRequest, compassv1beta1.CreateDiscussionResponse]( + httpClient, + baseURL+CompassServiceCreateDiscussionProcedure, + connect.WithSchema(compassServiceMethods.ByName("CreateDiscussion")), + connect.WithClientOptions(opts...), + ), + getDiscussion: connect.NewClient[compassv1beta1.GetDiscussionRequest, compassv1beta1.GetDiscussionResponse]( + httpClient, + baseURL+CompassServiceGetDiscussionProcedure, + connect.WithSchema(compassServiceMethods.ByName("GetDiscussion")), + connect.WithClientOptions(opts...), + ), + patchDiscussion: connect.NewClient[compassv1beta1.PatchDiscussionRequest, compassv1beta1.PatchDiscussionResponse]( + httpClient, + baseURL+CompassServicePatchDiscussionProcedure, + connect.WithSchema(compassServiceMethods.ByName("PatchDiscussion")), + connect.WithClientOptions(opts...), + ), + createComment: connect.NewClient[compassv1beta1.CreateCommentRequest, compassv1beta1.CreateCommentResponse]( + httpClient, + baseURL+CompassServiceCreateCommentProcedure, + connect.WithSchema(compassServiceMethods.ByName("CreateComment")), + connect.WithClientOptions(opts...), + ), + getAllComments: connect.NewClient[compassv1beta1.GetAllCommentsRequest, compassv1beta1.GetAllCommentsResponse]( + httpClient, + baseURL+CompassServiceGetAllCommentsProcedure, + connect.WithSchema(compassServiceMethods.ByName("GetAllComments")), + connect.WithClientOptions(opts...), + ), + getComment: connect.NewClient[compassv1beta1.GetCommentRequest, compassv1beta1.GetCommentResponse]( + httpClient, + baseURL+CompassServiceGetCommentProcedure, + connect.WithSchema(compassServiceMethods.ByName("GetComment")), + connect.WithClientOptions(opts...), + ), + updateComment: connect.NewClient[compassv1beta1.UpdateCommentRequest, compassv1beta1.UpdateCommentResponse]( + httpClient, + baseURL+CompassServiceUpdateCommentProcedure, + connect.WithSchema(compassServiceMethods.ByName("UpdateComment")), + connect.WithClientOptions(opts...), + ), + deleteComment: connect.NewClient[compassv1beta1.DeleteCommentRequest, compassv1beta1.DeleteCommentResponse]( + httpClient, + baseURL+CompassServiceDeleteCommentProcedure, + connect.WithSchema(compassServiceMethods.ByName("DeleteComment")), + connect.WithClientOptions(opts...), + ), + searchAssets: connect.NewClient[compassv1beta1.SearchAssetsRequest, compassv1beta1.SearchAssetsResponse]( + httpClient, + baseURL+CompassServiceSearchAssetsProcedure, + connect.WithSchema(compassServiceMethods.ByName("SearchAssets")), + connect.WithClientOptions(opts...), + ), + suggestAssets: connect.NewClient[compassv1beta1.SuggestAssetsRequest, compassv1beta1.SuggestAssetsResponse]( + httpClient, + baseURL+CompassServiceSuggestAssetsProcedure, + connect.WithSchema(compassServiceMethods.ByName("SuggestAssets")), + connect.WithClientOptions(opts...), + ), + groupAssets: connect.NewClient[compassv1beta1.GroupAssetsRequest, compassv1beta1.GroupAssetsResponse]( + httpClient, + baseURL+CompassServiceGroupAssetsProcedure, + connect.WithSchema(compassServiceMethods.ByName("GroupAssets")), + connect.WithClientOptions(opts...), + ), + getGraph: connect.NewClient[compassv1beta1.GetGraphRequest, compassv1beta1.GetGraphResponse]( + httpClient, + baseURL+CompassServiceGetGraphProcedure, + connect.WithSchema(compassServiceMethods.ByName("GetGraph")), + connect.WithClientOptions(opts...), + ), + getAllTypes: connect.NewClient[compassv1beta1.GetAllTypesRequest, compassv1beta1.GetAllTypesResponse]( + httpClient, + baseURL+CompassServiceGetAllTypesProcedure, + connect.WithSchema(compassServiceMethods.ByName("GetAllTypes")), + connect.WithClientOptions(opts...), + ), + getAllAssets: connect.NewClient[compassv1beta1.GetAllAssetsRequest, compassv1beta1.GetAllAssetsResponse]( + httpClient, + baseURL+CompassServiceGetAllAssetsProcedure, + connect.WithSchema(compassServiceMethods.ByName("GetAllAssets")), + connect.WithClientOptions(opts...), + ), + getAssetByID: connect.NewClient[compassv1beta1.GetAssetByIDRequest, compassv1beta1.GetAssetByIDResponse]( + httpClient, + baseURL+CompassServiceGetAssetByIDProcedure, + connect.WithSchema(compassServiceMethods.ByName("GetAssetByID")), + connect.WithClientOptions(opts...), + ), + upsertAsset: connect.NewClient[compassv1beta1.UpsertAssetRequest, compassv1beta1.UpsertAssetResponse]( + httpClient, + baseURL+CompassServiceUpsertAssetProcedure, + connect.WithSchema(compassServiceMethods.ByName("UpsertAsset")), + connect.WithClientOptions(opts...), + ), + upsertPatchAsset: connect.NewClient[compassv1beta1.UpsertPatchAssetRequest, compassv1beta1.UpsertPatchAssetResponse]( + httpClient, + baseURL+CompassServiceUpsertPatchAssetProcedure, + connect.WithSchema(compassServiceMethods.ByName("UpsertPatchAsset")), + connect.WithClientOptions(opts...), + ), + deleteAsset: connect.NewClient[compassv1beta1.DeleteAssetRequest, compassv1beta1.DeleteAssetResponse]( + httpClient, + baseURL+CompassServiceDeleteAssetProcedure, + connect.WithSchema(compassServiceMethods.ByName("DeleteAsset")), + connect.WithClientOptions(opts...), + ), + getAssetStargazers: connect.NewClient[compassv1beta1.GetAssetStargazersRequest, compassv1beta1.GetAssetStargazersResponse]( + httpClient, + baseURL+CompassServiceGetAssetStargazersProcedure, + connect.WithSchema(compassServiceMethods.ByName("GetAssetStargazers")), + connect.WithClientOptions(opts...), + ), + getAssetVersionHistory: connect.NewClient[compassv1beta1.GetAssetVersionHistoryRequest, compassv1beta1.GetAssetVersionHistoryResponse]( + httpClient, + baseURL+CompassServiceGetAssetVersionHistoryProcedure, + connect.WithSchema(compassServiceMethods.ByName("GetAssetVersionHistory")), + connect.WithClientOptions(opts...), + ), + getAssetByVersion: connect.NewClient[compassv1beta1.GetAssetByVersionRequest, compassv1beta1.GetAssetByVersionResponse]( + httpClient, + baseURL+CompassServiceGetAssetByVersionProcedure, + connect.WithSchema(compassServiceMethods.ByName("GetAssetByVersion")), + connect.WithClientOptions(opts...), + ), + createAssetProbe: connect.NewClient[compassv1beta1.CreateAssetProbeRequest, compassv1beta1.CreateAssetProbeResponse]( + httpClient, + baseURL+CompassServiceCreateAssetProbeProcedure, + connect.WithSchema(compassServiceMethods.ByName("CreateAssetProbe")), + connect.WithClientOptions(opts...), + ), + getUserStarredAssets: connect.NewClient[compassv1beta1.GetUserStarredAssetsRequest, compassv1beta1.GetUserStarredAssetsResponse]( + httpClient, + baseURL+CompassServiceGetUserStarredAssetsProcedure, + connect.WithSchema(compassServiceMethods.ByName("GetUserStarredAssets")), + connect.WithClientOptions(opts...), + ), + getMyStarredAssets: connect.NewClient[compassv1beta1.GetMyStarredAssetsRequest, compassv1beta1.GetMyStarredAssetsResponse]( + httpClient, + baseURL+CompassServiceGetMyStarredAssetsProcedure, + connect.WithSchema(compassServiceMethods.ByName("GetMyStarredAssets")), + connect.WithClientOptions(opts...), + ), + getMyStarredAsset: connect.NewClient[compassv1beta1.GetMyStarredAssetRequest, compassv1beta1.GetMyStarredAssetResponse]( + httpClient, + baseURL+CompassServiceGetMyStarredAssetProcedure, + connect.WithSchema(compassServiceMethods.ByName("GetMyStarredAsset")), + connect.WithClientOptions(opts...), + ), + starAsset: connect.NewClient[compassv1beta1.StarAssetRequest, compassv1beta1.StarAssetResponse]( + httpClient, + baseURL+CompassServiceStarAssetProcedure, + connect.WithSchema(compassServiceMethods.ByName("StarAsset")), + connect.WithClientOptions(opts...), + ), + unstarAsset: connect.NewClient[compassv1beta1.UnstarAssetRequest, compassv1beta1.UnstarAssetResponse]( + httpClient, + baseURL+CompassServiceUnstarAssetProcedure, + connect.WithSchema(compassServiceMethods.ByName("UnstarAsset")), + connect.WithClientOptions(opts...), + ), + getMyDiscussions: connect.NewClient[compassv1beta1.GetMyDiscussionsRequest, compassv1beta1.GetMyDiscussionsResponse]( + httpClient, + baseURL+CompassServiceGetMyDiscussionsProcedure, + connect.WithSchema(compassServiceMethods.ByName("GetMyDiscussions")), + connect.WithClientOptions(opts...), + ), + createTagAsset: connect.NewClient[compassv1beta1.CreateTagAssetRequest, compassv1beta1.CreateTagAssetResponse]( + httpClient, + baseURL+CompassServiceCreateTagAssetProcedure, + connect.WithSchema(compassServiceMethods.ByName("CreateTagAsset")), + connect.WithClientOptions(opts...), + ), + getTagByAssetAndTemplate: connect.NewClient[compassv1beta1.GetTagByAssetAndTemplateRequest, compassv1beta1.GetTagByAssetAndTemplateResponse]( + httpClient, + baseURL+CompassServiceGetTagByAssetAndTemplateProcedure, + connect.WithSchema(compassServiceMethods.ByName("GetTagByAssetAndTemplate")), + connect.WithClientOptions(opts...), + ), + updateTagAsset: connect.NewClient[compassv1beta1.UpdateTagAssetRequest, compassv1beta1.UpdateTagAssetResponse]( + httpClient, + baseURL+CompassServiceUpdateTagAssetProcedure, + connect.WithSchema(compassServiceMethods.ByName("UpdateTagAsset")), + connect.WithClientOptions(opts...), + ), + deleteTagAsset: connect.NewClient[compassv1beta1.DeleteTagAssetRequest, compassv1beta1.DeleteTagAssetResponse]( + httpClient, + baseURL+CompassServiceDeleteTagAssetProcedure, + connect.WithSchema(compassServiceMethods.ByName("DeleteTagAsset")), + connect.WithClientOptions(opts...), + ), + getAllTagsByAsset: connect.NewClient[compassv1beta1.GetAllTagsByAssetRequest, compassv1beta1.GetAllTagsByAssetResponse]( + httpClient, + baseURL+CompassServiceGetAllTagsByAssetProcedure, + connect.WithSchema(compassServiceMethods.ByName("GetAllTagsByAsset")), + connect.WithClientOptions(opts...), + ), + getAllTagTemplates: connect.NewClient[compassv1beta1.GetAllTagTemplatesRequest, compassv1beta1.GetAllTagTemplatesResponse]( + httpClient, + baseURL+CompassServiceGetAllTagTemplatesProcedure, + connect.WithSchema(compassServiceMethods.ByName("GetAllTagTemplates")), + connect.WithClientOptions(opts...), + ), + createTagTemplate: connect.NewClient[compassv1beta1.CreateTagTemplateRequest, compassv1beta1.CreateTagTemplateResponse]( + httpClient, + baseURL+CompassServiceCreateTagTemplateProcedure, + connect.WithSchema(compassServiceMethods.ByName("CreateTagTemplate")), + connect.WithClientOptions(opts...), + ), + getTagTemplate: connect.NewClient[compassv1beta1.GetTagTemplateRequest, compassv1beta1.GetTagTemplateResponse]( + httpClient, + baseURL+CompassServiceGetTagTemplateProcedure, + connect.WithSchema(compassServiceMethods.ByName("GetTagTemplate")), + connect.WithClientOptions(opts...), + ), + updateTagTemplate: connect.NewClient[compassv1beta1.UpdateTagTemplateRequest, compassv1beta1.UpdateTagTemplateResponse]( + httpClient, + baseURL+CompassServiceUpdateTagTemplateProcedure, + connect.WithSchema(compassServiceMethods.ByName("UpdateTagTemplate")), + connect.WithClientOptions(opts...), + ), + deleteTagTemplate: connect.NewClient[compassv1beta1.DeleteTagTemplateRequest, compassv1beta1.DeleteTagTemplateResponse]( + httpClient, + baseURL+CompassServiceDeleteTagTemplateProcedure, + connect.WithSchema(compassServiceMethods.ByName("DeleteTagTemplate")), + connect.WithClientOptions(opts...), + ), + createNamespace: connect.NewClient[compassv1beta1.CreateNamespaceRequest, compassv1beta1.CreateNamespaceResponse]( + httpClient, + baseURL+CompassServiceCreateNamespaceProcedure, + connect.WithSchema(compassServiceMethods.ByName("CreateNamespace")), + connect.WithClientOptions(opts...), + ), + getNamespace: connect.NewClient[compassv1beta1.GetNamespaceRequest, compassv1beta1.GetNamespaceResponse]( + httpClient, + baseURL+CompassServiceGetNamespaceProcedure, + connect.WithSchema(compassServiceMethods.ByName("GetNamespace")), + connect.WithClientOptions(opts...), + ), + updateNamespace: connect.NewClient[compassv1beta1.UpdateNamespaceRequest, compassv1beta1.UpdateNamespaceResponse]( + httpClient, + baseURL+CompassServiceUpdateNamespaceProcedure, + connect.WithSchema(compassServiceMethods.ByName("UpdateNamespace")), + connect.WithClientOptions(opts...), + ), + listNamespaces: connect.NewClient[compassv1beta1.ListNamespacesRequest, compassv1beta1.ListNamespacesResponse]( + httpClient, + baseURL+CompassServiceListNamespacesProcedure, + connect.WithSchema(compassServiceMethods.ByName("ListNamespaces")), + connect.WithClientOptions(opts...), + ), + } +} + +// compassServiceClient implements CompassServiceClient. +type compassServiceClient struct { + getAllDiscussions *connect.Client[compassv1beta1.GetAllDiscussionsRequest, compassv1beta1.GetAllDiscussionsResponse] + createDiscussion *connect.Client[compassv1beta1.CreateDiscussionRequest, compassv1beta1.CreateDiscussionResponse] + getDiscussion *connect.Client[compassv1beta1.GetDiscussionRequest, compassv1beta1.GetDiscussionResponse] + patchDiscussion *connect.Client[compassv1beta1.PatchDiscussionRequest, compassv1beta1.PatchDiscussionResponse] + createComment *connect.Client[compassv1beta1.CreateCommentRequest, compassv1beta1.CreateCommentResponse] + getAllComments *connect.Client[compassv1beta1.GetAllCommentsRequest, compassv1beta1.GetAllCommentsResponse] + getComment *connect.Client[compassv1beta1.GetCommentRequest, compassv1beta1.GetCommentResponse] + updateComment *connect.Client[compassv1beta1.UpdateCommentRequest, compassv1beta1.UpdateCommentResponse] + deleteComment *connect.Client[compassv1beta1.DeleteCommentRequest, compassv1beta1.DeleteCommentResponse] + searchAssets *connect.Client[compassv1beta1.SearchAssetsRequest, compassv1beta1.SearchAssetsResponse] + suggestAssets *connect.Client[compassv1beta1.SuggestAssetsRequest, compassv1beta1.SuggestAssetsResponse] + groupAssets *connect.Client[compassv1beta1.GroupAssetsRequest, compassv1beta1.GroupAssetsResponse] + getGraph *connect.Client[compassv1beta1.GetGraphRequest, compassv1beta1.GetGraphResponse] + getAllTypes *connect.Client[compassv1beta1.GetAllTypesRequest, compassv1beta1.GetAllTypesResponse] + getAllAssets *connect.Client[compassv1beta1.GetAllAssetsRequest, compassv1beta1.GetAllAssetsResponse] + getAssetByID *connect.Client[compassv1beta1.GetAssetByIDRequest, compassv1beta1.GetAssetByIDResponse] + upsertAsset *connect.Client[compassv1beta1.UpsertAssetRequest, compassv1beta1.UpsertAssetResponse] + upsertPatchAsset *connect.Client[compassv1beta1.UpsertPatchAssetRequest, compassv1beta1.UpsertPatchAssetResponse] + deleteAsset *connect.Client[compassv1beta1.DeleteAssetRequest, compassv1beta1.DeleteAssetResponse] + getAssetStargazers *connect.Client[compassv1beta1.GetAssetStargazersRequest, compassv1beta1.GetAssetStargazersResponse] + getAssetVersionHistory *connect.Client[compassv1beta1.GetAssetVersionHistoryRequest, compassv1beta1.GetAssetVersionHistoryResponse] + getAssetByVersion *connect.Client[compassv1beta1.GetAssetByVersionRequest, compassv1beta1.GetAssetByVersionResponse] + createAssetProbe *connect.Client[compassv1beta1.CreateAssetProbeRequest, compassv1beta1.CreateAssetProbeResponse] + getUserStarredAssets *connect.Client[compassv1beta1.GetUserStarredAssetsRequest, compassv1beta1.GetUserStarredAssetsResponse] + getMyStarredAssets *connect.Client[compassv1beta1.GetMyStarredAssetsRequest, compassv1beta1.GetMyStarredAssetsResponse] + getMyStarredAsset *connect.Client[compassv1beta1.GetMyStarredAssetRequest, compassv1beta1.GetMyStarredAssetResponse] + starAsset *connect.Client[compassv1beta1.StarAssetRequest, compassv1beta1.StarAssetResponse] + unstarAsset *connect.Client[compassv1beta1.UnstarAssetRequest, compassv1beta1.UnstarAssetResponse] + getMyDiscussions *connect.Client[compassv1beta1.GetMyDiscussionsRequest, compassv1beta1.GetMyDiscussionsResponse] + createTagAsset *connect.Client[compassv1beta1.CreateTagAssetRequest, compassv1beta1.CreateTagAssetResponse] + getTagByAssetAndTemplate *connect.Client[compassv1beta1.GetTagByAssetAndTemplateRequest, compassv1beta1.GetTagByAssetAndTemplateResponse] + updateTagAsset *connect.Client[compassv1beta1.UpdateTagAssetRequest, compassv1beta1.UpdateTagAssetResponse] + deleteTagAsset *connect.Client[compassv1beta1.DeleteTagAssetRequest, compassv1beta1.DeleteTagAssetResponse] + getAllTagsByAsset *connect.Client[compassv1beta1.GetAllTagsByAssetRequest, compassv1beta1.GetAllTagsByAssetResponse] + getAllTagTemplates *connect.Client[compassv1beta1.GetAllTagTemplatesRequest, compassv1beta1.GetAllTagTemplatesResponse] + createTagTemplate *connect.Client[compassv1beta1.CreateTagTemplateRequest, compassv1beta1.CreateTagTemplateResponse] + getTagTemplate *connect.Client[compassv1beta1.GetTagTemplateRequest, compassv1beta1.GetTagTemplateResponse] + updateTagTemplate *connect.Client[compassv1beta1.UpdateTagTemplateRequest, compassv1beta1.UpdateTagTemplateResponse] + deleteTagTemplate *connect.Client[compassv1beta1.DeleteTagTemplateRequest, compassv1beta1.DeleteTagTemplateResponse] + createNamespace *connect.Client[compassv1beta1.CreateNamespaceRequest, compassv1beta1.CreateNamespaceResponse] + getNamespace *connect.Client[compassv1beta1.GetNamespaceRequest, compassv1beta1.GetNamespaceResponse] + updateNamespace *connect.Client[compassv1beta1.UpdateNamespaceRequest, compassv1beta1.UpdateNamespaceResponse] + listNamespaces *connect.Client[compassv1beta1.ListNamespacesRequest, compassv1beta1.ListNamespacesResponse] +} + +// GetAllDiscussions calls raystack.compass.v1beta1.CompassService.GetAllDiscussions. +func (c *compassServiceClient) GetAllDiscussions(ctx context.Context, req *connect.Request[compassv1beta1.GetAllDiscussionsRequest]) (*connect.Response[compassv1beta1.GetAllDiscussionsResponse], error) { + return c.getAllDiscussions.CallUnary(ctx, req) +} + +// CreateDiscussion calls raystack.compass.v1beta1.CompassService.CreateDiscussion. +func (c *compassServiceClient) CreateDiscussion(ctx context.Context, req *connect.Request[compassv1beta1.CreateDiscussionRequest]) (*connect.Response[compassv1beta1.CreateDiscussionResponse], error) { + return c.createDiscussion.CallUnary(ctx, req) +} + +// GetDiscussion calls raystack.compass.v1beta1.CompassService.GetDiscussion. +func (c *compassServiceClient) GetDiscussion(ctx context.Context, req *connect.Request[compassv1beta1.GetDiscussionRequest]) (*connect.Response[compassv1beta1.GetDiscussionResponse], error) { + return c.getDiscussion.CallUnary(ctx, req) +} + +// PatchDiscussion calls raystack.compass.v1beta1.CompassService.PatchDiscussion. +func (c *compassServiceClient) PatchDiscussion(ctx context.Context, req *connect.Request[compassv1beta1.PatchDiscussionRequest]) (*connect.Response[compassv1beta1.PatchDiscussionResponse], error) { + return c.patchDiscussion.CallUnary(ctx, req) +} + +// CreateComment calls raystack.compass.v1beta1.CompassService.CreateComment. +func (c *compassServiceClient) CreateComment(ctx context.Context, req *connect.Request[compassv1beta1.CreateCommentRequest]) (*connect.Response[compassv1beta1.CreateCommentResponse], error) { + return c.createComment.CallUnary(ctx, req) +} + +// GetAllComments calls raystack.compass.v1beta1.CompassService.GetAllComments. +func (c *compassServiceClient) GetAllComments(ctx context.Context, req *connect.Request[compassv1beta1.GetAllCommentsRequest]) (*connect.Response[compassv1beta1.GetAllCommentsResponse], error) { + return c.getAllComments.CallUnary(ctx, req) +} + +// GetComment calls raystack.compass.v1beta1.CompassService.GetComment. +func (c *compassServiceClient) GetComment(ctx context.Context, req *connect.Request[compassv1beta1.GetCommentRequest]) (*connect.Response[compassv1beta1.GetCommentResponse], error) { + return c.getComment.CallUnary(ctx, req) +} + +// UpdateComment calls raystack.compass.v1beta1.CompassService.UpdateComment. +func (c *compassServiceClient) UpdateComment(ctx context.Context, req *connect.Request[compassv1beta1.UpdateCommentRequest]) (*connect.Response[compassv1beta1.UpdateCommentResponse], error) { + return c.updateComment.CallUnary(ctx, req) +} + +// DeleteComment calls raystack.compass.v1beta1.CompassService.DeleteComment. +func (c *compassServiceClient) DeleteComment(ctx context.Context, req *connect.Request[compassv1beta1.DeleteCommentRequest]) (*connect.Response[compassv1beta1.DeleteCommentResponse], error) { + return c.deleteComment.CallUnary(ctx, req) +} + +// SearchAssets calls raystack.compass.v1beta1.CompassService.SearchAssets. +func (c *compassServiceClient) SearchAssets(ctx context.Context, req *connect.Request[compassv1beta1.SearchAssetsRequest]) (*connect.Response[compassv1beta1.SearchAssetsResponse], error) { + return c.searchAssets.CallUnary(ctx, req) +} + +// SuggestAssets calls raystack.compass.v1beta1.CompassService.SuggestAssets. +func (c *compassServiceClient) SuggestAssets(ctx context.Context, req *connect.Request[compassv1beta1.SuggestAssetsRequest]) (*connect.Response[compassv1beta1.SuggestAssetsResponse], error) { + return c.suggestAssets.CallUnary(ctx, req) +} + +// GroupAssets calls raystack.compass.v1beta1.CompassService.GroupAssets. +func (c *compassServiceClient) GroupAssets(ctx context.Context, req *connect.Request[compassv1beta1.GroupAssetsRequest]) (*connect.Response[compassv1beta1.GroupAssetsResponse], error) { + return c.groupAssets.CallUnary(ctx, req) +} + +// GetGraph calls raystack.compass.v1beta1.CompassService.GetGraph. +func (c *compassServiceClient) GetGraph(ctx context.Context, req *connect.Request[compassv1beta1.GetGraphRequest]) (*connect.Response[compassv1beta1.GetGraphResponse], error) { + return c.getGraph.CallUnary(ctx, req) +} + +// GetAllTypes calls raystack.compass.v1beta1.CompassService.GetAllTypes. +func (c *compassServiceClient) GetAllTypes(ctx context.Context, req *connect.Request[compassv1beta1.GetAllTypesRequest]) (*connect.Response[compassv1beta1.GetAllTypesResponse], error) { + return c.getAllTypes.CallUnary(ctx, req) +} + +// GetAllAssets calls raystack.compass.v1beta1.CompassService.GetAllAssets. +func (c *compassServiceClient) GetAllAssets(ctx context.Context, req *connect.Request[compassv1beta1.GetAllAssetsRequest]) (*connect.Response[compassv1beta1.GetAllAssetsResponse], error) { + return c.getAllAssets.CallUnary(ctx, req) +} + +// GetAssetByID calls raystack.compass.v1beta1.CompassService.GetAssetByID. +func (c *compassServiceClient) GetAssetByID(ctx context.Context, req *connect.Request[compassv1beta1.GetAssetByIDRequest]) (*connect.Response[compassv1beta1.GetAssetByIDResponse], error) { + return c.getAssetByID.CallUnary(ctx, req) +} + +// UpsertAsset calls raystack.compass.v1beta1.CompassService.UpsertAsset. +func (c *compassServiceClient) UpsertAsset(ctx context.Context, req *connect.Request[compassv1beta1.UpsertAssetRequest]) (*connect.Response[compassv1beta1.UpsertAssetResponse], error) { + return c.upsertAsset.CallUnary(ctx, req) +} + +// UpsertPatchAsset calls raystack.compass.v1beta1.CompassService.UpsertPatchAsset. +func (c *compassServiceClient) UpsertPatchAsset(ctx context.Context, req *connect.Request[compassv1beta1.UpsertPatchAssetRequest]) (*connect.Response[compassv1beta1.UpsertPatchAssetResponse], error) { + return c.upsertPatchAsset.CallUnary(ctx, req) +} + +// DeleteAsset calls raystack.compass.v1beta1.CompassService.DeleteAsset. +func (c *compassServiceClient) DeleteAsset(ctx context.Context, req *connect.Request[compassv1beta1.DeleteAssetRequest]) (*connect.Response[compassv1beta1.DeleteAssetResponse], error) { + return c.deleteAsset.CallUnary(ctx, req) +} + +// GetAssetStargazers calls raystack.compass.v1beta1.CompassService.GetAssetStargazers. +func (c *compassServiceClient) GetAssetStargazers(ctx context.Context, req *connect.Request[compassv1beta1.GetAssetStargazersRequest]) (*connect.Response[compassv1beta1.GetAssetStargazersResponse], error) { + return c.getAssetStargazers.CallUnary(ctx, req) +} + +// GetAssetVersionHistory calls raystack.compass.v1beta1.CompassService.GetAssetVersionHistory. +func (c *compassServiceClient) GetAssetVersionHistory(ctx context.Context, req *connect.Request[compassv1beta1.GetAssetVersionHistoryRequest]) (*connect.Response[compassv1beta1.GetAssetVersionHistoryResponse], error) { + return c.getAssetVersionHistory.CallUnary(ctx, req) +} + +// GetAssetByVersion calls raystack.compass.v1beta1.CompassService.GetAssetByVersion. +func (c *compassServiceClient) GetAssetByVersion(ctx context.Context, req *connect.Request[compassv1beta1.GetAssetByVersionRequest]) (*connect.Response[compassv1beta1.GetAssetByVersionResponse], error) { + return c.getAssetByVersion.CallUnary(ctx, req) +} + +// CreateAssetProbe calls raystack.compass.v1beta1.CompassService.CreateAssetProbe. +func (c *compassServiceClient) CreateAssetProbe(ctx context.Context, req *connect.Request[compassv1beta1.CreateAssetProbeRequest]) (*connect.Response[compassv1beta1.CreateAssetProbeResponse], error) { + return c.createAssetProbe.CallUnary(ctx, req) +} + +// GetUserStarredAssets calls raystack.compass.v1beta1.CompassService.GetUserStarredAssets. +func (c *compassServiceClient) GetUserStarredAssets(ctx context.Context, req *connect.Request[compassv1beta1.GetUserStarredAssetsRequest]) (*connect.Response[compassv1beta1.GetUserStarredAssetsResponse], error) { + return c.getUserStarredAssets.CallUnary(ctx, req) +} + +// GetMyStarredAssets calls raystack.compass.v1beta1.CompassService.GetMyStarredAssets. +func (c *compassServiceClient) GetMyStarredAssets(ctx context.Context, req *connect.Request[compassv1beta1.GetMyStarredAssetsRequest]) (*connect.Response[compassv1beta1.GetMyStarredAssetsResponse], error) { + return c.getMyStarredAssets.CallUnary(ctx, req) +} + +// GetMyStarredAsset calls raystack.compass.v1beta1.CompassService.GetMyStarredAsset. +func (c *compassServiceClient) GetMyStarredAsset(ctx context.Context, req *connect.Request[compassv1beta1.GetMyStarredAssetRequest]) (*connect.Response[compassv1beta1.GetMyStarredAssetResponse], error) { + return c.getMyStarredAsset.CallUnary(ctx, req) +} + +// StarAsset calls raystack.compass.v1beta1.CompassService.StarAsset. +func (c *compassServiceClient) StarAsset(ctx context.Context, req *connect.Request[compassv1beta1.StarAssetRequest]) (*connect.Response[compassv1beta1.StarAssetResponse], error) { + return c.starAsset.CallUnary(ctx, req) +} + +// UnstarAsset calls raystack.compass.v1beta1.CompassService.UnstarAsset. +func (c *compassServiceClient) UnstarAsset(ctx context.Context, req *connect.Request[compassv1beta1.UnstarAssetRequest]) (*connect.Response[compassv1beta1.UnstarAssetResponse], error) { + return c.unstarAsset.CallUnary(ctx, req) +} + +// GetMyDiscussions calls raystack.compass.v1beta1.CompassService.GetMyDiscussions. +func (c *compassServiceClient) GetMyDiscussions(ctx context.Context, req *connect.Request[compassv1beta1.GetMyDiscussionsRequest]) (*connect.Response[compassv1beta1.GetMyDiscussionsResponse], error) { + return c.getMyDiscussions.CallUnary(ctx, req) +} + +// CreateTagAsset calls raystack.compass.v1beta1.CompassService.CreateTagAsset. +func (c *compassServiceClient) CreateTagAsset(ctx context.Context, req *connect.Request[compassv1beta1.CreateTagAssetRequest]) (*connect.Response[compassv1beta1.CreateTagAssetResponse], error) { + return c.createTagAsset.CallUnary(ctx, req) +} + +// GetTagByAssetAndTemplate calls raystack.compass.v1beta1.CompassService.GetTagByAssetAndTemplate. +func (c *compassServiceClient) GetTagByAssetAndTemplate(ctx context.Context, req *connect.Request[compassv1beta1.GetTagByAssetAndTemplateRequest]) (*connect.Response[compassv1beta1.GetTagByAssetAndTemplateResponse], error) { + return c.getTagByAssetAndTemplate.CallUnary(ctx, req) +} + +// UpdateTagAsset calls raystack.compass.v1beta1.CompassService.UpdateTagAsset. +func (c *compassServiceClient) UpdateTagAsset(ctx context.Context, req *connect.Request[compassv1beta1.UpdateTagAssetRequest]) (*connect.Response[compassv1beta1.UpdateTagAssetResponse], error) { + return c.updateTagAsset.CallUnary(ctx, req) +} + +// DeleteTagAsset calls raystack.compass.v1beta1.CompassService.DeleteTagAsset. +func (c *compassServiceClient) DeleteTagAsset(ctx context.Context, req *connect.Request[compassv1beta1.DeleteTagAssetRequest]) (*connect.Response[compassv1beta1.DeleteTagAssetResponse], error) { + return c.deleteTagAsset.CallUnary(ctx, req) +} + +// GetAllTagsByAsset calls raystack.compass.v1beta1.CompassService.GetAllTagsByAsset. +func (c *compassServiceClient) GetAllTagsByAsset(ctx context.Context, req *connect.Request[compassv1beta1.GetAllTagsByAssetRequest]) (*connect.Response[compassv1beta1.GetAllTagsByAssetResponse], error) { + return c.getAllTagsByAsset.CallUnary(ctx, req) +} + +// GetAllTagTemplates calls raystack.compass.v1beta1.CompassService.GetAllTagTemplates. +func (c *compassServiceClient) GetAllTagTemplates(ctx context.Context, req *connect.Request[compassv1beta1.GetAllTagTemplatesRequest]) (*connect.Response[compassv1beta1.GetAllTagTemplatesResponse], error) { + return c.getAllTagTemplates.CallUnary(ctx, req) +} + +// CreateTagTemplate calls raystack.compass.v1beta1.CompassService.CreateTagTemplate. +func (c *compassServiceClient) CreateTagTemplate(ctx context.Context, req *connect.Request[compassv1beta1.CreateTagTemplateRequest]) (*connect.Response[compassv1beta1.CreateTagTemplateResponse], error) { + return c.createTagTemplate.CallUnary(ctx, req) +} + +// GetTagTemplate calls raystack.compass.v1beta1.CompassService.GetTagTemplate. +func (c *compassServiceClient) GetTagTemplate(ctx context.Context, req *connect.Request[compassv1beta1.GetTagTemplateRequest]) (*connect.Response[compassv1beta1.GetTagTemplateResponse], error) { + return c.getTagTemplate.CallUnary(ctx, req) +} + +// UpdateTagTemplate calls raystack.compass.v1beta1.CompassService.UpdateTagTemplate. +func (c *compassServiceClient) UpdateTagTemplate(ctx context.Context, req *connect.Request[compassv1beta1.UpdateTagTemplateRequest]) (*connect.Response[compassv1beta1.UpdateTagTemplateResponse], error) { + return c.updateTagTemplate.CallUnary(ctx, req) +} + +// DeleteTagTemplate calls raystack.compass.v1beta1.CompassService.DeleteTagTemplate. +func (c *compassServiceClient) DeleteTagTemplate(ctx context.Context, req *connect.Request[compassv1beta1.DeleteTagTemplateRequest]) (*connect.Response[compassv1beta1.DeleteTagTemplateResponse], error) { + return c.deleteTagTemplate.CallUnary(ctx, req) +} + +// CreateNamespace calls raystack.compass.v1beta1.CompassService.CreateNamespace. +func (c *compassServiceClient) CreateNamespace(ctx context.Context, req *connect.Request[compassv1beta1.CreateNamespaceRequest]) (*connect.Response[compassv1beta1.CreateNamespaceResponse], error) { + return c.createNamespace.CallUnary(ctx, req) +} + +// GetNamespace calls raystack.compass.v1beta1.CompassService.GetNamespace. +func (c *compassServiceClient) GetNamespace(ctx context.Context, req *connect.Request[compassv1beta1.GetNamespaceRequest]) (*connect.Response[compassv1beta1.GetNamespaceResponse], error) { + return c.getNamespace.CallUnary(ctx, req) +} + +// UpdateNamespace calls raystack.compass.v1beta1.CompassService.UpdateNamespace. +func (c *compassServiceClient) UpdateNamespace(ctx context.Context, req *connect.Request[compassv1beta1.UpdateNamespaceRequest]) (*connect.Response[compassv1beta1.UpdateNamespaceResponse], error) { + return c.updateNamespace.CallUnary(ctx, req) +} + +// ListNamespaces calls raystack.compass.v1beta1.CompassService.ListNamespaces. +func (c *compassServiceClient) ListNamespaces(ctx context.Context, req *connect.Request[compassv1beta1.ListNamespacesRequest]) (*connect.Response[compassv1beta1.ListNamespacesResponse], error) { + return c.listNamespaces.CallUnary(ctx, req) +} + +// CompassServiceHandler is an implementation of the raystack.compass.v1beta1.CompassService +// service. +type CompassServiceHandler interface { + // Domain: Discussion + GetAllDiscussions(context.Context, *connect.Request[compassv1beta1.GetAllDiscussionsRequest]) (*connect.Response[compassv1beta1.GetAllDiscussionsResponse], error) + CreateDiscussion(context.Context, *connect.Request[compassv1beta1.CreateDiscussionRequest]) (*connect.Response[compassv1beta1.CreateDiscussionResponse], error) + GetDiscussion(context.Context, *connect.Request[compassv1beta1.GetDiscussionRequest]) (*connect.Response[compassv1beta1.GetDiscussionResponse], error) + PatchDiscussion(context.Context, *connect.Request[compassv1beta1.PatchDiscussionRequest]) (*connect.Response[compassv1beta1.PatchDiscussionResponse], error) + CreateComment(context.Context, *connect.Request[compassv1beta1.CreateCommentRequest]) (*connect.Response[compassv1beta1.CreateCommentResponse], error) + GetAllComments(context.Context, *connect.Request[compassv1beta1.GetAllCommentsRequest]) (*connect.Response[compassv1beta1.GetAllCommentsResponse], error) + GetComment(context.Context, *connect.Request[compassv1beta1.GetCommentRequest]) (*connect.Response[compassv1beta1.GetCommentResponse], error) + UpdateComment(context.Context, *connect.Request[compassv1beta1.UpdateCommentRequest]) (*connect.Response[compassv1beta1.UpdateCommentResponse], error) + DeleteComment(context.Context, *connect.Request[compassv1beta1.DeleteCommentRequest]) (*connect.Response[compassv1beta1.DeleteCommentResponse], error) + // Domain: Asset + SearchAssets(context.Context, *connect.Request[compassv1beta1.SearchAssetsRequest]) (*connect.Response[compassv1beta1.SearchAssetsResponse], error) + SuggestAssets(context.Context, *connect.Request[compassv1beta1.SuggestAssetsRequest]) (*connect.Response[compassv1beta1.SuggestAssetsResponse], error) + GroupAssets(context.Context, *connect.Request[compassv1beta1.GroupAssetsRequest]) (*connect.Response[compassv1beta1.GroupAssetsResponse], error) + GetGraph(context.Context, *connect.Request[compassv1beta1.GetGraphRequest]) (*connect.Response[compassv1beta1.GetGraphResponse], error) + GetAllTypes(context.Context, *connect.Request[compassv1beta1.GetAllTypesRequest]) (*connect.Response[compassv1beta1.GetAllTypesResponse], error) + GetAllAssets(context.Context, *connect.Request[compassv1beta1.GetAllAssetsRequest]) (*connect.Response[compassv1beta1.GetAllAssetsResponse], error) + GetAssetByID(context.Context, *connect.Request[compassv1beta1.GetAssetByIDRequest]) (*connect.Response[compassv1beta1.GetAssetByIDResponse], error) + UpsertAsset(context.Context, *connect.Request[compassv1beta1.UpsertAssetRequest]) (*connect.Response[compassv1beta1.UpsertAssetResponse], error) + UpsertPatchAsset(context.Context, *connect.Request[compassv1beta1.UpsertPatchAssetRequest]) (*connect.Response[compassv1beta1.UpsertPatchAssetResponse], error) + DeleteAsset(context.Context, *connect.Request[compassv1beta1.DeleteAssetRequest]) (*connect.Response[compassv1beta1.DeleteAssetResponse], error) + GetAssetStargazers(context.Context, *connect.Request[compassv1beta1.GetAssetStargazersRequest]) (*connect.Response[compassv1beta1.GetAssetStargazersResponse], error) + GetAssetVersionHistory(context.Context, *connect.Request[compassv1beta1.GetAssetVersionHistoryRequest]) (*connect.Response[compassv1beta1.GetAssetVersionHistoryResponse], error) + GetAssetByVersion(context.Context, *connect.Request[compassv1beta1.GetAssetByVersionRequest]) (*connect.Response[compassv1beta1.GetAssetByVersionResponse], error) + CreateAssetProbe(context.Context, *connect.Request[compassv1beta1.CreateAssetProbeRequest]) (*connect.Response[compassv1beta1.CreateAssetProbeResponse], error) + // Domain: User * Star + GetUserStarredAssets(context.Context, *connect.Request[compassv1beta1.GetUserStarredAssetsRequest]) (*connect.Response[compassv1beta1.GetUserStarredAssetsResponse], error) + GetMyStarredAssets(context.Context, *connect.Request[compassv1beta1.GetMyStarredAssetsRequest]) (*connect.Response[compassv1beta1.GetMyStarredAssetsResponse], error) + GetMyStarredAsset(context.Context, *connect.Request[compassv1beta1.GetMyStarredAssetRequest]) (*connect.Response[compassv1beta1.GetMyStarredAssetResponse], error) + StarAsset(context.Context, *connect.Request[compassv1beta1.StarAssetRequest]) (*connect.Response[compassv1beta1.StarAssetResponse], error) + UnstarAsset(context.Context, *connect.Request[compassv1beta1.UnstarAssetRequest]) (*connect.Response[compassv1beta1.UnstarAssetResponse], error) + GetMyDiscussions(context.Context, *connect.Request[compassv1beta1.GetMyDiscussionsRequest]) (*connect.Response[compassv1beta1.GetMyDiscussionsResponse], error) + // Domain: Tag Templates + CreateTagAsset(context.Context, *connect.Request[compassv1beta1.CreateTagAssetRequest]) (*connect.Response[compassv1beta1.CreateTagAssetResponse], error) + GetTagByAssetAndTemplate(context.Context, *connect.Request[compassv1beta1.GetTagByAssetAndTemplateRequest]) (*connect.Response[compassv1beta1.GetTagByAssetAndTemplateResponse], error) + UpdateTagAsset(context.Context, *connect.Request[compassv1beta1.UpdateTagAssetRequest]) (*connect.Response[compassv1beta1.UpdateTagAssetResponse], error) + DeleteTagAsset(context.Context, *connect.Request[compassv1beta1.DeleteTagAssetRequest]) (*connect.Response[compassv1beta1.DeleteTagAssetResponse], error) + GetAllTagsByAsset(context.Context, *connect.Request[compassv1beta1.GetAllTagsByAssetRequest]) (*connect.Response[compassv1beta1.GetAllTagsByAssetResponse], error) + GetAllTagTemplates(context.Context, *connect.Request[compassv1beta1.GetAllTagTemplatesRequest]) (*connect.Response[compassv1beta1.GetAllTagTemplatesResponse], error) + CreateTagTemplate(context.Context, *connect.Request[compassv1beta1.CreateTagTemplateRequest]) (*connect.Response[compassv1beta1.CreateTagTemplateResponse], error) + GetTagTemplate(context.Context, *connect.Request[compassv1beta1.GetTagTemplateRequest]) (*connect.Response[compassv1beta1.GetTagTemplateResponse], error) + UpdateTagTemplate(context.Context, *connect.Request[compassv1beta1.UpdateTagTemplateRequest]) (*connect.Response[compassv1beta1.UpdateTagTemplateResponse], error) + DeleteTagTemplate(context.Context, *connect.Request[compassv1beta1.DeleteTagTemplateRequest]) (*connect.Response[compassv1beta1.DeleteTagTemplateResponse], error) + // Domain: Namespace + CreateNamespace(context.Context, *connect.Request[compassv1beta1.CreateNamespaceRequest]) (*connect.Response[compassv1beta1.CreateNamespaceResponse], error) + GetNamespace(context.Context, *connect.Request[compassv1beta1.GetNamespaceRequest]) (*connect.Response[compassv1beta1.GetNamespaceResponse], error) + UpdateNamespace(context.Context, *connect.Request[compassv1beta1.UpdateNamespaceRequest]) (*connect.Response[compassv1beta1.UpdateNamespaceResponse], error) + ListNamespaces(context.Context, *connect.Request[compassv1beta1.ListNamespacesRequest]) (*connect.Response[compassv1beta1.ListNamespacesResponse], error) +} + +// NewCompassServiceHandler builds an HTTP handler from the service implementation. It returns the +// path on which to mount the handler and the handler itself. +// +// By default, handlers support the Connect, gRPC, and gRPC-Web protocols with the binary Protobuf +// and JSON codecs. They also support gzip compression. +func NewCompassServiceHandler(svc CompassServiceHandler, opts ...connect.HandlerOption) (string, http.Handler) { + compassServiceMethods := compassv1beta1.File_raystack_compass_v1beta1_service_proto.Services().ByName("CompassService").Methods() + compassServiceGetAllDiscussionsHandler := connect.NewUnaryHandler( + CompassServiceGetAllDiscussionsProcedure, + svc.GetAllDiscussions, + connect.WithSchema(compassServiceMethods.ByName("GetAllDiscussions")), + connect.WithHandlerOptions(opts...), + ) + compassServiceCreateDiscussionHandler := connect.NewUnaryHandler( + CompassServiceCreateDiscussionProcedure, + svc.CreateDiscussion, + connect.WithSchema(compassServiceMethods.ByName("CreateDiscussion")), + connect.WithHandlerOptions(opts...), + ) + compassServiceGetDiscussionHandler := connect.NewUnaryHandler( + CompassServiceGetDiscussionProcedure, + svc.GetDiscussion, + connect.WithSchema(compassServiceMethods.ByName("GetDiscussion")), + connect.WithHandlerOptions(opts...), + ) + compassServicePatchDiscussionHandler := connect.NewUnaryHandler( + CompassServicePatchDiscussionProcedure, + svc.PatchDiscussion, + connect.WithSchema(compassServiceMethods.ByName("PatchDiscussion")), + connect.WithHandlerOptions(opts...), + ) + compassServiceCreateCommentHandler := connect.NewUnaryHandler( + CompassServiceCreateCommentProcedure, + svc.CreateComment, + connect.WithSchema(compassServiceMethods.ByName("CreateComment")), + connect.WithHandlerOptions(opts...), + ) + compassServiceGetAllCommentsHandler := connect.NewUnaryHandler( + CompassServiceGetAllCommentsProcedure, + svc.GetAllComments, + connect.WithSchema(compassServiceMethods.ByName("GetAllComments")), + connect.WithHandlerOptions(opts...), + ) + compassServiceGetCommentHandler := connect.NewUnaryHandler( + CompassServiceGetCommentProcedure, + svc.GetComment, + connect.WithSchema(compassServiceMethods.ByName("GetComment")), + connect.WithHandlerOptions(opts...), + ) + compassServiceUpdateCommentHandler := connect.NewUnaryHandler( + CompassServiceUpdateCommentProcedure, + svc.UpdateComment, + connect.WithSchema(compassServiceMethods.ByName("UpdateComment")), + connect.WithHandlerOptions(opts...), + ) + compassServiceDeleteCommentHandler := connect.NewUnaryHandler( + CompassServiceDeleteCommentProcedure, + svc.DeleteComment, + connect.WithSchema(compassServiceMethods.ByName("DeleteComment")), + connect.WithHandlerOptions(opts...), + ) + compassServiceSearchAssetsHandler := connect.NewUnaryHandler( + CompassServiceSearchAssetsProcedure, + svc.SearchAssets, + connect.WithSchema(compassServiceMethods.ByName("SearchAssets")), + connect.WithHandlerOptions(opts...), + ) + compassServiceSuggestAssetsHandler := connect.NewUnaryHandler( + CompassServiceSuggestAssetsProcedure, + svc.SuggestAssets, + connect.WithSchema(compassServiceMethods.ByName("SuggestAssets")), + connect.WithHandlerOptions(opts...), + ) + compassServiceGroupAssetsHandler := connect.NewUnaryHandler( + CompassServiceGroupAssetsProcedure, + svc.GroupAssets, + connect.WithSchema(compassServiceMethods.ByName("GroupAssets")), + connect.WithHandlerOptions(opts...), + ) + compassServiceGetGraphHandler := connect.NewUnaryHandler( + CompassServiceGetGraphProcedure, + svc.GetGraph, + connect.WithSchema(compassServiceMethods.ByName("GetGraph")), + connect.WithHandlerOptions(opts...), + ) + compassServiceGetAllTypesHandler := connect.NewUnaryHandler( + CompassServiceGetAllTypesProcedure, + svc.GetAllTypes, + connect.WithSchema(compassServiceMethods.ByName("GetAllTypes")), + connect.WithHandlerOptions(opts...), + ) + compassServiceGetAllAssetsHandler := connect.NewUnaryHandler( + CompassServiceGetAllAssetsProcedure, + svc.GetAllAssets, + connect.WithSchema(compassServiceMethods.ByName("GetAllAssets")), + connect.WithHandlerOptions(opts...), + ) + compassServiceGetAssetByIDHandler := connect.NewUnaryHandler( + CompassServiceGetAssetByIDProcedure, + svc.GetAssetByID, + connect.WithSchema(compassServiceMethods.ByName("GetAssetByID")), + connect.WithHandlerOptions(opts...), + ) + compassServiceUpsertAssetHandler := connect.NewUnaryHandler( + CompassServiceUpsertAssetProcedure, + svc.UpsertAsset, + connect.WithSchema(compassServiceMethods.ByName("UpsertAsset")), + connect.WithHandlerOptions(opts...), + ) + compassServiceUpsertPatchAssetHandler := connect.NewUnaryHandler( + CompassServiceUpsertPatchAssetProcedure, + svc.UpsertPatchAsset, + connect.WithSchema(compassServiceMethods.ByName("UpsertPatchAsset")), + connect.WithHandlerOptions(opts...), + ) + compassServiceDeleteAssetHandler := connect.NewUnaryHandler( + CompassServiceDeleteAssetProcedure, + svc.DeleteAsset, + connect.WithSchema(compassServiceMethods.ByName("DeleteAsset")), + connect.WithHandlerOptions(opts...), + ) + compassServiceGetAssetStargazersHandler := connect.NewUnaryHandler( + CompassServiceGetAssetStargazersProcedure, + svc.GetAssetStargazers, + connect.WithSchema(compassServiceMethods.ByName("GetAssetStargazers")), + connect.WithHandlerOptions(opts...), + ) + compassServiceGetAssetVersionHistoryHandler := connect.NewUnaryHandler( + CompassServiceGetAssetVersionHistoryProcedure, + svc.GetAssetVersionHistory, + connect.WithSchema(compassServiceMethods.ByName("GetAssetVersionHistory")), + connect.WithHandlerOptions(opts...), + ) + compassServiceGetAssetByVersionHandler := connect.NewUnaryHandler( + CompassServiceGetAssetByVersionProcedure, + svc.GetAssetByVersion, + connect.WithSchema(compassServiceMethods.ByName("GetAssetByVersion")), + connect.WithHandlerOptions(opts...), + ) + compassServiceCreateAssetProbeHandler := connect.NewUnaryHandler( + CompassServiceCreateAssetProbeProcedure, + svc.CreateAssetProbe, + connect.WithSchema(compassServiceMethods.ByName("CreateAssetProbe")), + connect.WithHandlerOptions(opts...), + ) + compassServiceGetUserStarredAssetsHandler := connect.NewUnaryHandler( + CompassServiceGetUserStarredAssetsProcedure, + svc.GetUserStarredAssets, + connect.WithSchema(compassServiceMethods.ByName("GetUserStarredAssets")), + connect.WithHandlerOptions(opts...), + ) + compassServiceGetMyStarredAssetsHandler := connect.NewUnaryHandler( + CompassServiceGetMyStarredAssetsProcedure, + svc.GetMyStarredAssets, + connect.WithSchema(compassServiceMethods.ByName("GetMyStarredAssets")), + connect.WithHandlerOptions(opts...), + ) + compassServiceGetMyStarredAssetHandler := connect.NewUnaryHandler( + CompassServiceGetMyStarredAssetProcedure, + svc.GetMyStarredAsset, + connect.WithSchema(compassServiceMethods.ByName("GetMyStarredAsset")), + connect.WithHandlerOptions(opts...), + ) + compassServiceStarAssetHandler := connect.NewUnaryHandler( + CompassServiceStarAssetProcedure, + svc.StarAsset, + connect.WithSchema(compassServiceMethods.ByName("StarAsset")), + connect.WithHandlerOptions(opts...), + ) + compassServiceUnstarAssetHandler := connect.NewUnaryHandler( + CompassServiceUnstarAssetProcedure, + svc.UnstarAsset, + connect.WithSchema(compassServiceMethods.ByName("UnstarAsset")), + connect.WithHandlerOptions(opts...), + ) + compassServiceGetMyDiscussionsHandler := connect.NewUnaryHandler( + CompassServiceGetMyDiscussionsProcedure, + svc.GetMyDiscussions, + connect.WithSchema(compassServiceMethods.ByName("GetMyDiscussions")), + connect.WithHandlerOptions(opts...), + ) + compassServiceCreateTagAssetHandler := connect.NewUnaryHandler( + CompassServiceCreateTagAssetProcedure, + svc.CreateTagAsset, + connect.WithSchema(compassServiceMethods.ByName("CreateTagAsset")), + connect.WithHandlerOptions(opts...), + ) + compassServiceGetTagByAssetAndTemplateHandler := connect.NewUnaryHandler( + CompassServiceGetTagByAssetAndTemplateProcedure, + svc.GetTagByAssetAndTemplate, + connect.WithSchema(compassServiceMethods.ByName("GetTagByAssetAndTemplate")), + connect.WithHandlerOptions(opts...), + ) + compassServiceUpdateTagAssetHandler := connect.NewUnaryHandler( + CompassServiceUpdateTagAssetProcedure, + svc.UpdateTagAsset, + connect.WithSchema(compassServiceMethods.ByName("UpdateTagAsset")), + connect.WithHandlerOptions(opts...), + ) + compassServiceDeleteTagAssetHandler := connect.NewUnaryHandler( + CompassServiceDeleteTagAssetProcedure, + svc.DeleteTagAsset, + connect.WithSchema(compassServiceMethods.ByName("DeleteTagAsset")), + connect.WithHandlerOptions(opts...), + ) + compassServiceGetAllTagsByAssetHandler := connect.NewUnaryHandler( + CompassServiceGetAllTagsByAssetProcedure, + svc.GetAllTagsByAsset, + connect.WithSchema(compassServiceMethods.ByName("GetAllTagsByAsset")), + connect.WithHandlerOptions(opts...), + ) + compassServiceGetAllTagTemplatesHandler := connect.NewUnaryHandler( + CompassServiceGetAllTagTemplatesProcedure, + svc.GetAllTagTemplates, + connect.WithSchema(compassServiceMethods.ByName("GetAllTagTemplates")), + connect.WithHandlerOptions(opts...), + ) + compassServiceCreateTagTemplateHandler := connect.NewUnaryHandler( + CompassServiceCreateTagTemplateProcedure, + svc.CreateTagTemplate, + connect.WithSchema(compassServiceMethods.ByName("CreateTagTemplate")), + connect.WithHandlerOptions(opts...), + ) + compassServiceGetTagTemplateHandler := connect.NewUnaryHandler( + CompassServiceGetTagTemplateProcedure, + svc.GetTagTemplate, + connect.WithSchema(compassServiceMethods.ByName("GetTagTemplate")), + connect.WithHandlerOptions(opts...), + ) + compassServiceUpdateTagTemplateHandler := connect.NewUnaryHandler( + CompassServiceUpdateTagTemplateProcedure, + svc.UpdateTagTemplate, + connect.WithSchema(compassServiceMethods.ByName("UpdateTagTemplate")), + connect.WithHandlerOptions(opts...), + ) + compassServiceDeleteTagTemplateHandler := connect.NewUnaryHandler( + CompassServiceDeleteTagTemplateProcedure, + svc.DeleteTagTemplate, + connect.WithSchema(compassServiceMethods.ByName("DeleteTagTemplate")), + connect.WithHandlerOptions(opts...), + ) + compassServiceCreateNamespaceHandler := connect.NewUnaryHandler( + CompassServiceCreateNamespaceProcedure, + svc.CreateNamespace, + connect.WithSchema(compassServiceMethods.ByName("CreateNamespace")), + connect.WithHandlerOptions(opts...), + ) + compassServiceGetNamespaceHandler := connect.NewUnaryHandler( + CompassServiceGetNamespaceProcedure, + svc.GetNamespace, + connect.WithSchema(compassServiceMethods.ByName("GetNamespace")), + connect.WithHandlerOptions(opts...), + ) + compassServiceUpdateNamespaceHandler := connect.NewUnaryHandler( + CompassServiceUpdateNamespaceProcedure, + svc.UpdateNamespace, + connect.WithSchema(compassServiceMethods.ByName("UpdateNamespace")), + connect.WithHandlerOptions(opts...), + ) + compassServiceListNamespacesHandler := connect.NewUnaryHandler( + CompassServiceListNamespacesProcedure, + svc.ListNamespaces, + connect.WithSchema(compassServiceMethods.ByName("ListNamespaces")), + connect.WithHandlerOptions(opts...), + ) + return "/raystack.compass.v1beta1.CompassService/", http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + switch r.URL.Path { + case CompassServiceGetAllDiscussionsProcedure: + compassServiceGetAllDiscussionsHandler.ServeHTTP(w, r) + case CompassServiceCreateDiscussionProcedure: + compassServiceCreateDiscussionHandler.ServeHTTP(w, r) + case CompassServiceGetDiscussionProcedure: + compassServiceGetDiscussionHandler.ServeHTTP(w, r) + case CompassServicePatchDiscussionProcedure: + compassServicePatchDiscussionHandler.ServeHTTP(w, r) + case CompassServiceCreateCommentProcedure: + compassServiceCreateCommentHandler.ServeHTTP(w, r) + case CompassServiceGetAllCommentsProcedure: + compassServiceGetAllCommentsHandler.ServeHTTP(w, r) + case CompassServiceGetCommentProcedure: + compassServiceGetCommentHandler.ServeHTTP(w, r) + case CompassServiceUpdateCommentProcedure: + compassServiceUpdateCommentHandler.ServeHTTP(w, r) + case CompassServiceDeleteCommentProcedure: + compassServiceDeleteCommentHandler.ServeHTTP(w, r) + case CompassServiceSearchAssetsProcedure: + compassServiceSearchAssetsHandler.ServeHTTP(w, r) + case CompassServiceSuggestAssetsProcedure: + compassServiceSuggestAssetsHandler.ServeHTTP(w, r) + case CompassServiceGroupAssetsProcedure: + compassServiceGroupAssetsHandler.ServeHTTP(w, r) + case CompassServiceGetGraphProcedure: + compassServiceGetGraphHandler.ServeHTTP(w, r) + case CompassServiceGetAllTypesProcedure: + compassServiceGetAllTypesHandler.ServeHTTP(w, r) + case CompassServiceGetAllAssetsProcedure: + compassServiceGetAllAssetsHandler.ServeHTTP(w, r) + case CompassServiceGetAssetByIDProcedure: + compassServiceGetAssetByIDHandler.ServeHTTP(w, r) + case CompassServiceUpsertAssetProcedure: + compassServiceUpsertAssetHandler.ServeHTTP(w, r) + case CompassServiceUpsertPatchAssetProcedure: + compassServiceUpsertPatchAssetHandler.ServeHTTP(w, r) + case CompassServiceDeleteAssetProcedure: + compassServiceDeleteAssetHandler.ServeHTTP(w, r) + case CompassServiceGetAssetStargazersProcedure: + compassServiceGetAssetStargazersHandler.ServeHTTP(w, r) + case CompassServiceGetAssetVersionHistoryProcedure: + compassServiceGetAssetVersionHistoryHandler.ServeHTTP(w, r) + case CompassServiceGetAssetByVersionProcedure: + compassServiceGetAssetByVersionHandler.ServeHTTP(w, r) + case CompassServiceCreateAssetProbeProcedure: + compassServiceCreateAssetProbeHandler.ServeHTTP(w, r) + case CompassServiceGetUserStarredAssetsProcedure: + compassServiceGetUserStarredAssetsHandler.ServeHTTP(w, r) + case CompassServiceGetMyStarredAssetsProcedure: + compassServiceGetMyStarredAssetsHandler.ServeHTTP(w, r) + case CompassServiceGetMyStarredAssetProcedure: + compassServiceGetMyStarredAssetHandler.ServeHTTP(w, r) + case CompassServiceStarAssetProcedure: + compassServiceStarAssetHandler.ServeHTTP(w, r) + case CompassServiceUnstarAssetProcedure: + compassServiceUnstarAssetHandler.ServeHTTP(w, r) + case CompassServiceGetMyDiscussionsProcedure: + compassServiceGetMyDiscussionsHandler.ServeHTTP(w, r) + case CompassServiceCreateTagAssetProcedure: + compassServiceCreateTagAssetHandler.ServeHTTP(w, r) + case CompassServiceGetTagByAssetAndTemplateProcedure: + compassServiceGetTagByAssetAndTemplateHandler.ServeHTTP(w, r) + case CompassServiceUpdateTagAssetProcedure: + compassServiceUpdateTagAssetHandler.ServeHTTP(w, r) + case CompassServiceDeleteTagAssetProcedure: + compassServiceDeleteTagAssetHandler.ServeHTTP(w, r) + case CompassServiceGetAllTagsByAssetProcedure: + compassServiceGetAllTagsByAssetHandler.ServeHTTP(w, r) + case CompassServiceGetAllTagTemplatesProcedure: + compassServiceGetAllTagTemplatesHandler.ServeHTTP(w, r) + case CompassServiceCreateTagTemplateProcedure: + compassServiceCreateTagTemplateHandler.ServeHTTP(w, r) + case CompassServiceGetTagTemplateProcedure: + compassServiceGetTagTemplateHandler.ServeHTTP(w, r) + case CompassServiceUpdateTagTemplateProcedure: + compassServiceUpdateTagTemplateHandler.ServeHTTP(w, r) + case CompassServiceDeleteTagTemplateProcedure: + compassServiceDeleteTagTemplateHandler.ServeHTTP(w, r) + case CompassServiceCreateNamespaceProcedure: + compassServiceCreateNamespaceHandler.ServeHTTP(w, r) + case CompassServiceGetNamespaceProcedure: + compassServiceGetNamespaceHandler.ServeHTTP(w, r) + case CompassServiceUpdateNamespaceProcedure: + compassServiceUpdateNamespaceHandler.ServeHTTP(w, r) + case CompassServiceListNamespacesProcedure: + compassServiceListNamespacesHandler.ServeHTTP(w, r) + default: + http.NotFound(w, r) + } + }) +} + +// UnimplementedCompassServiceHandler returns CodeUnimplemented from all methods. +type UnimplementedCompassServiceHandler struct{} + +func (UnimplementedCompassServiceHandler) GetAllDiscussions(context.Context, *connect.Request[compassv1beta1.GetAllDiscussionsRequest]) (*connect.Response[compassv1beta1.GetAllDiscussionsResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("raystack.compass.v1beta1.CompassService.GetAllDiscussions is not implemented")) +} + +func (UnimplementedCompassServiceHandler) CreateDiscussion(context.Context, *connect.Request[compassv1beta1.CreateDiscussionRequest]) (*connect.Response[compassv1beta1.CreateDiscussionResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("raystack.compass.v1beta1.CompassService.CreateDiscussion is not implemented")) +} + +func (UnimplementedCompassServiceHandler) GetDiscussion(context.Context, *connect.Request[compassv1beta1.GetDiscussionRequest]) (*connect.Response[compassv1beta1.GetDiscussionResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("raystack.compass.v1beta1.CompassService.GetDiscussion is not implemented")) +} + +func (UnimplementedCompassServiceHandler) PatchDiscussion(context.Context, *connect.Request[compassv1beta1.PatchDiscussionRequest]) (*connect.Response[compassv1beta1.PatchDiscussionResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("raystack.compass.v1beta1.CompassService.PatchDiscussion is not implemented")) +} + +func (UnimplementedCompassServiceHandler) CreateComment(context.Context, *connect.Request[compassv1beta1.CreateCommentRequest]) (*connect.Response[compassv1beta1.CreateCommentResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("raystack.compass.v1beta1.CompassService.CreateComment is not implemented")) +} + +func (UnimplementedCompassServiceHandler) GetAllComments(context.Context, *connect.Request[compassv1beta1.GetAllCommentsRequest]) (*connect.Response[compassv1beta1.GetAllCommentsResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("raystack.compass.v1beta1.CompassService.GetAllComments is not implemented")) +} + +func (UnimplementedCompassServiceHandler) GetComment(context.Context, *connect.Request[compassv1beta1.GetCommentRequest]) (*connect.Response[compassv1beta1.GetCommentResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("raystack.compass.v1beta1.CompassService.GetComment is not implemented")) +} + +func (UnimplementedCompassServiceHandler) UpdateComment(context.Context, *connect.Request[compassv1beta1.UpdateCommentRequest]) (*connect.Response[compassv1beta1.UpdateCommentResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("raystack.compass.v1beta1.CompassService.UpdateComment is not implemented")) +} + +func (UnimplementedCompassServiceHandler) DeleteComment(context.Context, *connect.Request[compassv1beta1.DeleteCommentRequest]) (*connect.Response[compassv1beta1.DeleteCommentResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("raystack.compass.v1beta1.CompassService.DeleteComment is not implemented")) +} + +func (UnimplementedCompassServiceHandler) SearchAssets(context.Context, *connect.Request[compassv1beta1.SearchAssetsRequest]) (*connect.Response[compassv1beta1.SearchAssetsResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("raystack.compass.v1beta1.CompassService.SearchAssets is not implemented")) +} + +func (UnimplementedCompassServiceHandler) SuggestAssets(context.Context, *connect.Request[compassv1beta1.SuggestAssetsRequest]) (*connect.Response[compassv1beta1.SuggestAssetsResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("raystack.compass.v1beta1.CompassService.SuggestAssets is not implemented")) +} + +func (UnimplementedCompassServiceHandler) GroupAssets(context.Context, *connect.Request[compassv1beta1.GroupAssetsRequest]) (*connect.Response[compassv1beta1.GroupAssetsResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("raystack.compass.v1beta1.CompassService.GroupAssets is not implemented")) +} + +func (UnimplementedCompassServiceHandler) GetGraph(context.Context, *connect.Request[compassv1beta1.GetGraphRequest]) (*connect.Response[compassv1beta1.GetGraphResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("raystack.compass.v1beta1.CompassService.GetGraph is not implemented")) +} + +func (UnimplementedCompassServiceHandler) GetAllTypes(context.Context, *connect.Request[compassv1beta1.GetAllTypesRequest]) (*connect.Response[compassv1beta1.GetAllTypesResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("raystack.compass.v1beta1.CompassService.GetAllTypes is not implemented")) +} + +func (UnimplementedCompassServiceHandler) GetAllAssets(context.Context, *connect.Request[compassv1beta1.GetAllAssetsRequest]) (*connect.Response[compassv1beta1.GetAllAssetsResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("raystack.compass.v1beta1.CompassService.GetAllAssets is not implemented")) +} + +func (UnimplementedCompassServiceHandler) GetAssetByID(context.Context, *connect.Request[compassv1beta1.GetAssetByIDRequest]) (*connect.Response[compassv1beta1.GetAssetByIDResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("raystack.compass.v1beta1.CompassService.GetAssetByID is not implemented")) +} + +func (UnimplementedCompassServiceHandler) UpsertAsset(context.Context, *connect.Request[compassv1beta1.UpsertAssetRequest]) (*connect.Response[compassv1beta1.UpsertAssetResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("raystack.compass.v1beta1.CompassService.UpsertAsset is not implemented")) +} + +func (UnimplementedCompassServiceHandler) UpsertPatchAsset(context.Context, *connect.Request[compassv1beta1.UpsertPatchAssetRequest]) (*connect.Response[compassv1beta1.UpsertPatchAssetResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("raystack.compass.v1beta1.CompassService.UpsertPatchAsset is not implemented")) +} + +func (UnimplementedCompassServiceHandler) DeleteAsset(context.Context, *connect.Request[compassv1beta1.DeleteAssetRequest]) (*connect.Response[compassv1beta1.DeleteAssetResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("raystack.compass.v1beta1.CompassService.DeleteAsset is not implemented")) +} + +func (UnimplementedCompassServiceHandler) GetAssetStargazers(context.Context, *connect.Request[compassv1beta1.GetAssetStargazersRequest]) (*connect.Response[compassv1beta1.GetAssetStargazersResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("raystack.compass.v1beta1.CompassService.GetAssetStargazers is not implemented")) +} + +func (UnimplementedCompassServiceHandler) GetAssetVersionHistory(context.Context, *connect.Request[compassv1beta1.GetAssetVersionHistoryRequest]) (*connect.Response[compassv1beta1.GetAssetVersionHistoryResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("raystack.compass.v1beta1.CompassService.GetAssetVersionHistory is not implemented")) +} + +func (UnimplementedCompassServiceHandler) GetAssetByVersion(context.Context, *connect.Request[compassv1beta1.GetAssetByVersionRequest]) (*connect.Response[compassv1beta1.GetAssetByVersionResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("raystack.compass.v1beta1.CompassService.GetAssetByVersion is not implemented")) +} + +func (UnimplementedCompassServiceHandler) CreateAssetProbe(context.Context, *connect.Request[compassv1beta1.CreateAssetProbeRequest]) (*connect.Response[compassv1beta1.CreateAssetProbeResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("raystack.compass.v1beta1.CompassService.CreateAssetProbe is not implemented")) +} + +func (UnimplementedCompassServiceHandler) GetUserStarredAssets(context.Context, *connect.Request[compassv1beta1.GetUserStarredAssetsRequest]) (*connect.Response[compassv1beta1.GetUserStarredAssetsResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("raystack.compass.v1beta1.CompassService.GetUserStarredAssets is not implemented")) +} + +func (UnimplementedCompassServiceHandler) GetMyStarredAssets(context.Context, *connect.Request[compassv1beta1.GetMyStarredAssetsRequest]) (*connect.Response[compassv1beta1.GetMyStarredAssetsResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("raystack.compass.v1beta1.CompassService.GetMyStarredAssets is not implemented")) +} + +func (UnimplementedCompassServiceHandler) GetMyStarredAsset(context.Context, *connect.Request[compassv1beta1.GetMyStarredAssetRequest]) (*connect.Response[compassv1beta1.GetMyStarredAssetResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("raystack.compass.v1beta1.CompassService.GetMyStarredAsset is not implemented")) +} + +func (UnimplementedCompassServiceHandler) StarAsset(context.Context, *connect.Request[compassv1beta1.StarAssetRequest]) (*connect.Response[compassv1beta1.StarAssetResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("raystack.compass.v1beta1.CompassService.StarAsset is not implemented")) +} + +func (UnimplementedCompassServiceHandler) UnstarAsset(context.Context, *connect.Request[compassv1beta1.UnstarAssetRequest]) (*connect.Response[compassv1beta1.UnstarAssetResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("raystack.compass.v1beta1.CompassService.UnstarAsset is not implemented")) +} + +func (UnimplementedCompassServiceHandler) GetMyDiscussions(context.Context, *connect.Request[compassv1beta1.GetMyDiscussionsRequest]) (*connect.Response[compassv1beta1.GetMyDiscussionsResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("raystack.compass.v1beta1.CompassService.GetMyDiscussions is not implemented")) +} + +func (UnimplementedCompassServiceHandler) CreateTagAsset(context.Context, *connect.Request[compassv1beta1.CreateTagAssetRequest]) (*connect.Response[compassv1beta1.CreateTagAssetResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("raystack.compass.v1beta1.CompassService.CreateTagAsset is not implemented")) +} + +func (UnimplementedCompassServiceHandler) GetTagByAssetAndTemplate(context.Context, *connect.Request[compassv1beta1.GetTagByAssetAndTemplateRequest]) (*connect.Response[compassv1beta1.GetTagByAssetAndTemplateResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("raystack.compass.v1beta1.CompassService.GetTagByAssetAndTemplate is not implemented")) +} + +func (UnimplementedCompassServiceHandler) UpdateTagAsset(context.Context, *connect.Request[compassv1beta1.UpdateTagAssetRequest]) (*connect.Response[compassv1beta1.UpdateTagAssetResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("raystack.compass.v1beta1.CompassService.UpdateTagAsset is not implemented")) +} + +func (UnimplementedCompassServiceHandler) DeleteTagAsset(context.Context, *connect.Request[compassv1beta1.DeleteTagAssetRequest]) (*connect.Response[compassv1beta1.DeleteTagAssetResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("raystack.compass.v1beta1.CompassService.DeleteTagAsset is not implemented")) +} + +func (UnimplementedCompassServiceHandler) GetAllTagsByAsset(context.Context, *connect.Request[compassv1beta1.GetAllTagsByAssetRequest]) (*connect.Response[compassv1beta1.GetAllTagsByAssetResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("raystack.compass.v1beta1.CompassService.GetAllTagsByAsset is not implemented")) +} + +func (UnimplementedCompassServiceHandler) GetAllTagTemplates(context.Context, *connect.Request[compassv1beta1.GetAllTagTemplatesRequest]) (*connect.Response[compassv1beta1.GetAllTagTemplatesResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("raystack.compass.v1beta1.CompassService.GetAllTagTemplates is not implemented")) +} + +func (UnimplementedCompassServiceHandler) CreateTagTemplate(context.Context, *connect.Request[compassv1beta1.CreateTagTemplateRequest]) (*connect.Response[compassv1beta1.CreateTagTemplateResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("raystack.compass.v1beta1.CompassService.CreateTagTemplate is not implemented")) +} + +func (UnimplementedCompassServiceHandler) GetTagTemplate(context.Context, *connect.Request[compassv1beta1.GetTagTemplateRequest]) (*connect.Response[compassv1beta1.GetTagTemplateResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("raystack.compass.v1beta1.CompassService.GetTagTemplate is not implemented")) +} + +func (UnimplementedCompassServiceHandler) UpdateTagTemplate(context.Context, *connect.Request[compassv1beta1.UpdateTagTemplateRequest]) (*connect.Response[compassv1beta1.UpdateTagTemplateResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("raystack.compass.v1beta1.CompassService.UpdateTagTemplate is not implemented")) +} + +func (UnimplementedCompassServiceHandler) DeleteTagTemplate(context.Context, *connect.Request[compassv1beta1.DeleteTagTemplateRequest]) (*connect.Response[compassv1beta1.DeleteTagTemplateResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("raystack.compass.v1beta1.CompassService.DeleteTagTemplate is not implemented")) +} + +func (UnimplementedCompassServiceHandler) CreateNamespace(context.Context, *connect.Request[compassv1beta1.CreateNamespaceRequest]) (*connect.Response[compassv1beta1.CreateNamespaceResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("raystack.compass.v1beta1.CompassService.CreateNamespace is not implemented")) +} + +func (UnimplementedCompassServiceHandler) GetNamespace(context.Context, *connect.Request[compassv1beta1.GetNamespaceRequest]) (*connect.Response[compassv1beta1.GetNamespaceResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("raystack.compass.v1beta1.CompassService.GetNamespace is not implemented")) +} + +func (UnimplementedCompassServiceHandler) UpdateNamespace(context.Context, *connect.Request[compassv1beta1.UpdateNamespaceRequest]) (*connect.Response[compassv1beta1.UpdateNamespaceResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("raystack.compass.v1beta1.CompassService.UpdateNamespace is not implemented")) +} + +func (UnimplementedCompassServiceHandler) ListNamespaces(context.Context, *connect.Request[compassv1beta1.ListNamespacesRequest]) (*connect.Response[compassv1beta1.ListNamespacesResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("raystack.compass.v1beta1.CompassService.ListNamespaces is not implemented")) +} diff --git a/proto/raystack/compass/v1beta1/service.pb.go b/proto/compassv1beta1/service.pb.go similarity index 66% rename from proto/raystack/compass/v1beta1/service.pb.go rename to proto/compassv1beta1/service.pb.go index 22379209..cc308675 100644 --- a/proto/raystack/compass/v1beta1/service.pb.go +++ b/proto/compassv1beta1/service.pb.go @@ -8,8 +8,6 @@ package compassv1beta1 import ( _ "github.com/envoyproxy/protoc-gen-validate/validate" - _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" - _ "google.golang.org/genproto/googleapis/api/annotations" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" structpb "google.golang.org/protobuf/types/known/structpb" @@ -6721,511 +6719,342 @@ var file_raystack_compass_v1beta1_service_proto_rawDesc = []byte{ 0x73, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x18, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, - 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2f, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, - 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, - 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2d, 0x67, 0x65, 0x6e, 0x2d, 0x6f, 0x70, 0x65, 0x6e, - 0x61, 0x70, 0x69, 0x76, 0x32, 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x61, 0x6e, - 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, - 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, - 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x95, 0x03, 0x0a, 0x18, 0x47, 0x65, 0x74, - 0x41, 0x6c, 0x6c, 0x44, 0x69, 0x73, 0x63, 0x75, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x72, 0x03, 0xd0, 0x01, 0x01, 0x52, 0x04, 0x74, - 0x79, 0x70, 0x65, 0x12, 0x1e, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x72, 0x03, 0xd0, 0x01, 0x01, 0x52, 0x05, 0x73, 0x74, - 0x61, 0x74, 0x65, 0x12, 0x1e, 0x0a, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x09, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x72, 0x03, 0xd0, 0x01, 0x01, 0x52, 0x05, 0x6f, 0x77, - 0x6e, 0x65, 0x72, 0x12, 0x24, 0x0a, 0x08, 0x61, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x65, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x72, 0x03, 0xd0, 0x01, 0x01, 0x52, - 0x08, 0x61, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x65, 0x12, 0x1e, 0x0a, 0x05, 0x61, 0x73, 0x73, - 0x65, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x72, 0x03, 0xd0, - 0x01, 0x01, 0x52, 0x05, 0x61, 0x73, 0x73, 0x65, 0x74, 0x12, 0x20, 0x0a, 0x06, 0x6c, 0x61, 0x62, - 0x65, 0x6c, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x72, 0x03, - 0xd0, 0x01, 0x01, 0x52, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x12, 0x1c, 0x0a, 0x04, 0x73, - 0x6f, 0x72, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x72, 0x03, - 0xd0, 0x01, 0x01, 0x52, 0x04, 0x73, 0x6f, 0x72, 0x74, 0x12, 0x26, 0x0a, 0x09, 0x64, 0x69, 0x72, - 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x42, 0x08, 0xfa, 0x42, - 0x05, 0x72, 0x03, 0xd0, 0x01, 0x01, 0x52, 0x09, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x12, 0x1d, 0x0a, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0d, 0x42, - 0x09, 0xfa, 0x42, 0x06, 0x2a, 0x04, 0x28, 0x00, 0x40, 0x01, 0x52, 0x04, 0x73, 0x69, 0x7a, 0x65, - 0x12, 0x21, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0d, - 0x42, 0x09, 0xfa, 0x42, 0x06, 0x2a, 0x04, 0x28, 0x00, 0x40, 0x01, 0x52, 0x06, 0x6f, 0x66, 0x66, - 0x73, 0x65, 0x74, 0x3a, 0x2b, 0x92, 0x41, 0x28, 0x0a, 0x26, 0x32, 0x24, 0x53, 0x6f, 0x6d, 0x65, - 0x20, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x20, 0x74, 0x6f, 0x20, 0x66, - 0x65, 0x74, 0x63, 0x68, 0x20, 0x64, 0x69, 0x73, 0x63, 0x75, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, - 0x22, 0x55, 0x0a, 0x19, 0x47, 0x65, 0x74, 0x41, 0x6c, 0x6c, 0x44, 0x69, 0x73, 0x63, 0x75, 0x73, - 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x38, 0x0a, - 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x72, 0x61, - 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x73, 0x73, 0x2e, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x44, 0x69, 0x73, 0x63, 0x75, 0x73, 0x73, 0x69, 0x6f, - 0x6e, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0xbc, 0x02, 0x0a, 0x17, 0x43, 0x72, 0x65, 0x61, - 0x74, 0x65, 0x44, 0x69, 0x73, 0x63, 0x75, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x05, 0x74, 0x69, 0x74, - 0x6c, 0x65, 0x12, 0x1b, 0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, - 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x12, - 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, - 0x79, 0x70, 0x65, 0x12, 0x1e, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x05, 0x20, 0x01, - 0x28, 0x09, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x72, 0x03, 0xd0, 0x01, 0x01, 0x52, 0x05, 0x73, 0x74, - 0x61, 0x74, 0x65, 0x12, 0x22, 0x0a, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x18, 0x06, 0x20, + 0x61, 0x31, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2f, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, + 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xe8, 0x02, 0x0a, 0x18, 0x47, + 0x65, 0x74, 0x41, 0x6c, 0x6c, 0x44, 0x69, 0x73, 0x63, 0x75, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x72, 0x03, 0xd0, 0x01, 0x01, 0x52, + 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x1e, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x72, 0x03, 0xd0, 0x01, 0x01, 0x52, 0x05, + 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x1e, 0x0a, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x09, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x72, 0x03, 0xd0, 0x01, 0x01, 0x52, 0x05, + 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x12, 0x24, 0x0a, 0x08, 0x61, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x65, + 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x72, 0x03, 0xd0, 0x01, + 0x01, 0x52, 0x08, 0x61, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x65, 0x12, 0x1e, 0x0a, 0x05, 0x61, + 0x73, 0x73, 0x65, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x72, + 0x03, 0xd0, 0x01, 0x01, 0x52, 0x05, 0x61, 0x73, 0x73, 0x65, 0x74, 0x12, 0x20, 0x0a, 0x06, 0x6c, + 0x61, 0x62, 0x65, 0x6c, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x42, 0x08, 0xfa, 0x42, 0x05, + 0x72, 0x03, 0xd0, 0x01, 0x01, 0x52, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x12, 0x1c, 0x0a, + 0x04, 0x73, 0x6f, 0x72, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x42, 0x08, 0xfa, 0x42, 0x05, + 0x72, 0x03, 0xd0, 0x01, 0x01, 0x52, 0x04, 0x73, 0x6f, 0x72, 0x74, 0x12, 0x26, 0x0a, 0x09, 0x64, + 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x42, 0x08, + 0xfa, 0x42, 0x05, 0x72, 0x03, 0xd0, 0x01, 0x01, 0x52, 0x09, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x12, 0x1d, 0x0a, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, + 0x0d, 0x42, 0x09, 0xfa, 0x42, 0x06, 0x2a, 0x04, 0x28, 0x00, 0x40, 0x01, 0x52, 0x04, 0x73, 0x69, + 0x7a, 0x65, 0x12, 0x21, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x0a, 0x20, 0x01, + 0x28, 0x0d, 0x42, 0x09, 0xfa, 0x42, 0x06, 0x2a, 0x04, 0x28, 0x00, 0x40, 0x01, 0x52, 0x06, 0x6f, + 0x66, 0x66, 0x73, 0x65, 0x74, 0x22, 0x55, 0x0a, 0x19, 0x47, 0x65, 0x74, 0x41, 0x6c, 0x6c, 0x44, + 0x69, 0x73, 0x63, 0x75, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x38, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x24, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6d, 0x70, + 0x61, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x44, 0x69, 0x73, 0x63, + 0x75, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0xfb, 0x01, 0x0a, + 0x17, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x44, 0x69, 0x73, 0x63, 0x75, 0x73, 0x73, 0x69, 0x6f, + 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, + 0x52, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x12, 0x1b, 0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x04, + 0x62, 0x6f, 0x64, 0x79, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x1e, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, + 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x72, 0x03, 0xd0, 0x01, + 0x01, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x22, 0x0a, 0x06, 0x6c, 0x61, 0x62, 0x65, + 0x6c, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x09, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x92, 0x01, 0x04, + 0x18, 0x01, 0x28, 0x01, 0x52, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x12, 0x22, 0x0a, 0x06, + 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x09, 0x42, 0x0a, 0xfa, 0x42, + 0x07, 0x92, 0x01, 0x04, 0x18, 0x01, 0x28, 0x01, 0x52, 0x06, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, + 0x12, 0x28, 0x0a, 0x09, 0x61, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x65, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, 0x09, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x92, 0x01, 0x04, 0x18, 0x01, 0x28, 0x01, 0x52, - 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x12, 0x22, 0x0a, 0x06, 0x61, 0x73, 0x73, 0x65, 0x74, - 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x09, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x92, 0x01, 0x04, 0x18, - 0x01, 0x28, 0x01, 0x52, 0x06, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x12, 0x28, 0x0a, 0x09, 0x61, - 0x73, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x65, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, 0x09, 0x42, 0x0a, - 0xfa, 0x42, 0x07, 0x92, 0x01, 0x04, 0x18, 0x01, 0x28, 0x01, 0x52, 0x09, 0x61, 0x73, 0x73, 0x69, - 0x67, 0x6e, 0x65, 0x65, 0x73, 0x3a, 0x3f, 0x92, 0x41, 0x3c, 0x0a, 0x3a, 0x32, 0x29, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x20, 0x74, 0x6f, 0x20, 0x62, 0x65, 0x20, 0x73, 0x65, 0x6e, 0x74, - 0x20, 0x74, 0x6f, 0x20, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x20, 0x61, 0x20, 0x64, 0x69, 0x73, - 0x63, 0x75, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0xd2, 0x01, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0xd2, - 0x01, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x22, 0x2a, 0x0a, 0x18, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, - 0x44, 0x69, 0x73, 0x63, 0x75, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, - 0x69, 0x64, 0x22, 0x26, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x44, 0x69, 0x73, 0x63, 0x75, 0x73, 0x73, - 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x51, 0x0a, 0x15, 0x47, 0x65, - 0x74, 0x44, 0x69, 0x73, 0x63, 0x75, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x38, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x24, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6d, - 0x70, 0x61, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x44, 0x69, 0x73, - 0x63, 0x75, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x96, 0x02, - 0x0a, 0x16, 0x50, 0x61, 0x74, 0x63, 0x68, 0x44, 0x69, 0x73, 0x63, 0x75, 0x73, 0x73, 0x69, 0x6f, - 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1e, 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x72, 0x03, 0xd0, 0x01, - 0x01, 0x52, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x12, 0x1c, 0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x72, 0x03, 0xd0, 0x01, 0x01, - 0x52, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x12, 0x1c, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x09, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x72, 0x03, 0xd0, 0x01, 0x01, 0x52, 0x04, - 0x74, 0x79, 0x70, 0x65, 0x12, 0x1e, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x05, 0x20, - 0x01, 0x28, 0x09, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x72, 0x03, 0xd0, 0x01, 0x01, 0x52, 0x05, 0x73, - 0x74, 0x61, 0x74, 0x65, 0x12, 0x22, 0x0a, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x18, 0x06, - 0x20, 0x03, 0x28, 0x09, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x92, 0x01, 0x04, 0x18, 0x01, 0x28, 0x01, - 0x52, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x12, 0x22, 0x0a, 0x06, 0x61, 0x73, 0x73, 0x65, - 0x74, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x09, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x92, 0x01, 0x04, - 0x18, 0x01, 0x28, 0x01, 0x52, 0x06, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x12, 0x28, 0x0a, 0x09, - 0x61, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x65, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, 0x09, 0x42, - 0x0a, 0xfa, 0x42, 0x07, 0x92, 0x01, 0x04, 0x18, 0x01, 0x28, 0x01, 0x52, 0x09, 0x61, 0x73, 0x73, - 0x69, 0x67, 0x6e, 0x65, 0x65, 0x73, 0x22, 0x58, 0x0a, 0x14, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, - 0x43, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x23, - 0x0a, 0x0d, 0x64, 0x69, 0x73, 0x63, 0x75, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x64, 0x69, 0x73, 0x63, 0x75, 0x73, 0x73, 0x69, 0x6f, - 0x6e, 0x49, 0x64, 0x12, 0x1b, 0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x04, 0x62, 0x6f, 0x64, 0x79, - 0x22, 0x19, 0x0a, 0x17, 0x50, 0x61, 0x74, 0x63, 0x68, 0x44, 0x69, 0x73, 0x63, 0x75, 0x73, 0x73, - 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x27, 0x0a, 0x15, 0x43, - 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x02, 0x69, 0x64, 0x22, 0xc4, 0x01, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x41, 0x6c, 0x6c, 0x43, - 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x23, - 0x0a, 0x0d, 0x64, 0x69, 0x73, 0x63, 0x75, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x64, 0x69, 0x73, 0x63, 0x75, 0x73, 0x73, 0x69, 0x6f, - 0x6e, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x04, 0x73, 0x6f, 0x72, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x72, 0x03, 0xd0, 0x01, 0x01, 0x52, 0x04, 0x73, 0x6f, 0x72, - 0x74, 0x12, 0x26, 0x0a, 0x09, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x09, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x72, 0x03, 0xd0, 0x01, 0x01, 0x52, 0x09, - 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1d, 0x0a, 0x04, 0x73, 0x69, 0x7a, - 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x42, 0x09, 0xfa, 0x42, 0x06, 0x2a, 0x04, 0x28, 0x00, - 0x40, 0x01, 0x52, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x12, 0x21, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, - 0x65, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0d, 0x42, 0x09, 0xfa, 0x42, 0x06, 0x2a, 0x04, 0x28, - 0x00, 0x40, 0x01, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x22, 0x4f, 0x0a, 0x16, 0x47, - 0x65, 0x74, 0x41, 0x6c, 0x6c, 0x43, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x35, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x63, - 0x6f, 0x6d, 0x70, 0x61, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, - 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x48, 0x0a, 0x11, - 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x12, 0x23, 0x0a, 0x0d, 0x64, 0x69, 0x73, 0x63, 0x75, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, - 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x64, 0x69, 0x73, 0x63, 0x75, 0x73, - 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x4b, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6d, - 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x35, 0x0a, 0x04, - 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x72, 0x61, 0x79, - 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x73, 0x73, 0x2e, 0x76, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x04, 0x64, - 0x61, 0x74, 0x61, 0x22, 0x68, 0x0a, 0x14, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6d, - 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x23, 0x0a, 0x0d, 0x64, - 0x69, 0x73, 0x63, 0x75, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x0c, 0x64, 0x69, 0x73, 0x63, 0x75, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x64, - 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, - 0x12, 0x1b, 0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, - 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x22, 0x17, 0x0a, - 0x15, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x4b, 0x0a, 0x14, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, - 0x43, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x23, - 0x0a, 0x0d, 0x64, 0x69, 0x73, 0x63, 0x75, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x64, 0x69, 0x73, 0x63, 0x75, 0x73, 0x73, 0x69, 0x6f, - 0x6e, 0x49, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x02, 0x69, 0x64, 0x22, 0x17, 0x0a, 0x15, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x43, 0x6f, 0x6d, - 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x84, 0x09, 0x0a, - 0x13, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x41, 0x73, 0x73, 0x65, 0x74, 0x73, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x12, 0x3b, 0x0a, 0x04, 0x74, 0x65, 0x78, 0x74, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x42, 0x27, 0x92, 0x41, 0x1c, 0x32, 0x1a, 0x74, 0x65, 0x78, 0x74, 0x20, 0x74, 0x6f, - 0x20, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x28, 0x66, 0x75, 0x7a, - 0x7a, 0x79, 0x29, 0xfa, 0x42, 0x05, 0x72, 0x03, 0xd0, 0x01, 0x01, 0x52, 0x04, 0x74, 0x65, 0x78, - 0x74, 0x12, 0xc5, 0x01, 0x0a, 0x06, 0x72, 0x61, 0x6e, 0x6b, 0x62, 0x79, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x42, 0xac, 0x01, 0x92, 0x41, 0xa0, 0x01, 0x32, 0x9d, 0x01, 0x64, 0x65, 0x73, 0x63, - 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x6c, 0x79, 0x20, 0x73, 0x6f, 0x72, 0x74, 0x20, 0x62, 0x61, - 0x73, 0x65, 0x64, 0x20, 0x6f, 0x6e, 0x20, 0x61, 0x20, 0x6e, 0x75, 0x6d, 0x65, 0x72, 0x69, 0x63, - 0x20, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x20, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x61, 0x73, - 0x73, 0x65, 0x74, 0x2e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x20, - 0x66, 0x69, 0x65, 0x6c, 0x64, 0x20, 0x69, 0x73, 0x20, 0x77, 0x72, 0x69, 0x74, 0x74, 0x65, 0x6e, - 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x20, 0x73, 0x65, 0x70, - 0x61, 0x72, 0x61, 0x74, 0x65, 0x64, 0x20, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x20, 0x6e, 0x61, 0x6d, - 0x65, 0x2e, 0x20, 0x65, 0x67, 0x2c, 0x20, 0x22, 0x72, 0x61, 0x6e, 0x6b, 0x62, 0x79, 0x5b, 0x64, - 0x61, 0x74, 0x61, 0x2e, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x2e, 0x75, 0x73, 0x61, 0x67, - 0x65, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5d, 0x22, 0xfa, 0x42, 0x05, 0x72, 0x03, 0xd0, 0x01, - 0x01, 0x52, 0x06, 0x72, 0x61, 0x6e, 0x6b, 0x62, 0x79, 0x12, 0x3d, 0x0a, 0x04, 0x73, 0x69, 0x7a, - 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x42, 0x29, 0x92, 0x41, 0x1d, 0x32, 0x1b, 0x6e, 0x75, - 0x6d, 0x62, 0x65, 0x72, 0x20, 0x6f, 0x66, 0x20, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x20, - 0x74, 0x6f, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0xfa, 0x42, 0x06, 0x2a, 0x04, 0x28, 0x00, - 0x40, 0x01, 0x52, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x12, 0xeb, 0x01, 0x0a, 0x06, 0x66, 0x69, 0x6c, - 0x74, 0x65, 0x72, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x39, 0x2e, 0x72, 0x61, 0x79, 0x73, + 0x09, 0x61, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x65, 0x73, 0x22, 0x2a, 0x0a, 0x18, 0x43, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x44, 0x69, 0x73, 0x63, 0x75, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x26, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x44, 0x69, 0x73, + 0x63, 0x75, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, + 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x51, + 0x0a, 0x15, 0x47, 0x65, 0x74, 0x44, 0x69, 0x73, 0x63, 0x75, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x38, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, + 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x2e, 0x44, 0x69, 0x73, 0x63, 0x75, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x04, 0x64, 0x61, 0x74, + 0x61, 0x22, 0x96, 0x02, 0x0a, 0x16, 0x50, 0x61, 0x74, 0x63, 0x68, 0x44, 0x69, 0x73, 0x63, 0x75, + 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, + 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1e, 0x0a, 0x05, + 0x74, 0x69, 0x74, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x08, 0xfa, 0x42, 0x05, + 0x72, 0x03, 0xd0, 0x01, 0x01, 0x52, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x12, 0x1c, 0x0a, 0x04, + 0x62, 0x6f, 0x64, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x72, + 0x03, 0xd0, 0x01, 0x01, 0x52, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x12, 0x1c, 0x0a, 0x04, 0x74, 0x79, + 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x72, 0x03, 0xd0, + 0x01, 0x01, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x1e, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, + 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x72, 0x03, 0xd0, 0x01, + 0x01, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x22, 0x0a, 0x06, 0x6c, 0x61, 0x62, 0x65, + 0x6c, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x09, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x92, 0x01, 0x04, + 0x18, 0x01, 0x28, 0x01, 0x52, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x12, 0x22, 0x0a, 0x06, + 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x09, 0x42, 0x0a, 0xfa, 0x42, + 0x07, 0x92, 0x01, 0x04, 0x18, 0x01, 0x28, 0x01, 0x52, 0x06, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, + 0x12, 0x28, 0x0a, 0x09, 0x61, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x65, 0x73, 0x18, 0x08, 0x20, + 0x03, 0x28, 0x09, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x92, 0x01, 0x04, 0x18, 0x01, 0x28, 0x01, 0x52, + 0x09, 0x61, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x65, 0x73, 0x22, 0x58, 0x0a, 0x14, 0x43, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x23, 0x0a, 0x0d, 0x64, 0x69, 0x73, 0x63, 0x75, 0x73, 0x73, 0x69, 0x6f, 0x6e, + 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x64, 0x69, 0x73, 0x63, 0x75, + 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x1b, 0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x04, + 0x62, 0x6f, 0x64, 0x79, 0x22, 0x19, 0x0a, 0x17, 0x50, 0x61, 0x74, 0x63, 0x68, 0x44, 0x69, 0x73, + 0x63, 0x75, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x27, 0x0a, 0x15, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0xc4, 0x01, 0x0a, 0x15, 0x47, 0x65, 0x74, + 0x41, 0x6c, 0x6c, 0x43, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x23, 0x0a, 0x0d, 0x64, 0x69, 0x73, 0x63, 0x75, 0x73, 0x73, 0x69, 0x6f, 0x6e, + 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x64, 0x69, 0x73, 0x63, 0x75, + 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x04, 0x73, 0x6f, 0x72, 0x74, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x72, 0x03, 0xd0, 0x01, 0x01, 0x52, + 0x04, 0x73, 0x6f, 0x72, 0x74, 0x12, 0x26, 0x0a, 0x09, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x72, 0x03, 0xd0, + 0x01, 0x01, 0x52, 0x09, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1d, 0x0a, + 0x04, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x42, 0x09, 0xfa, 0x42, 0x06, + 0x2a, 0x04, 0x28, 0x00, 0x40, 0x01, 0x52, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x12, 0x21, 0x0a, 0x06, + 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0d, 0x42, 0x09, 0xfa, 0x42, + 0x06, 0x2a, 0x04, 0x28, 0x00, 0x40, 0x01, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x22, + 0x4f, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x41, 0x6c, 0x6c, 0x43, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, + 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x35, 0x0a, 0x04, 0x64, 0x61, 0x74, + 0x61, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, + 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, + 0x22, 0x48, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x23, 0x0a, 0x0d, 0x64, 0x69, 0x73, 0x63, 0x75, 0x73, 0x73, + 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x64, 0x69, + 0x73, 0x63, 0x75, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x4b, 0x0a, 0x12, 0x47, 0x65, + 0x74, 0x43, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x35, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, + 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x73, + 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, + 0x74, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x68, 0x0a, 0x14, 0x55, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x43, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x23, 0x0a, 0x0d, 0x64, 0x69, 0x73, 0x63, 0x75, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x64, 0x69, 0x73, 0x63, 0x75, 0x73, 0x73, 0x69, + 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x02, 0x69, 0x64, 0x12, 0x1b, 0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x04, 0x62, 0x6f, 0x64, + 0x79, 0x22, 0x17, 0x0a, 0x15, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6d, 0x6d, 0x65, + 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x4b, 0x0a, 0x14, 0x44, 0x65, + 0x6c, 0x65, 0x74, 0x65, 0x43, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x23, 0x0a, 0x0d, 0x64, 0x69, 0x73, 0x63, 0x75, 0x73, 0x73, 0x69, 0x6f, 0x6e, + 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x64, 0x69, 0x73, 0x63, 0x75, + 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x17, 0x0a, 0x15, 0x44, 0x65, 0x6c, 0x65, 0x74, + 0x65, 0x43, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x9f, 0x04, 0x0a, 0x13, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x41, 0x73, 0x73, 0x65, 0x74, + 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x04, 0x74, 0x65, 0x78, 0x74, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x72, 0x03, 0xd0, 0x01, 0x01, + 0x52, 0x04, 0x74, 0x65, 0x78, 0x74, 0x12, 0x20, 0x0a, 0x06, 0x72, 0x61, 0x6e, 0x6b, 0x62, 0x79, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x72, 0x03, 0xd0, 0x01, 0x01, + 0x52, 0x06, 0x72, 0x61, 0x6e, 0x6b, 0x62, 0x79, 0x12, 0x1d, 0x0a, 0x04, 0x73, 0x69, 0x7a, 0x65, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x42, 0x09, 0xfa, 0x42, 0x06, 0x2a, 0x04, 0x28, 0x00, 0x40, + 0x01, 0x52, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x12, 0x51, 0x0a, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, + 0x72, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x39, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, + 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x2e, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x41, 0x73, 0x73, 0x65, 0x74, 0x73, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x45, 0x6e, 0x74, + 0x72, 0x79, 0x52, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x4e, 0x0a, 0x05, 0x71, 0x75, + 0x65, 0x72, 0x79, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x38, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x41, 0x73, 0x73, 0x65, 0x74, - 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x45, - 0x6e, 0x74, 0x72, 0x79, 0x42, 0x97, 0x01, 0x92, 0x41, 0x93, 0x01, 0x32, 0x90, 0x01, 0x66, 0x69, - 0x6c, 0x74, 0x65, 0x72, 0x20, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x20, 0x62, 0x61, 0x73, 0x65, - 0x64, 0x20, 0x6f, 0x6e, 0x20, 0x61, 0x20, 0x28, 0x6e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x29, 0x20, - 0x66, 0x69, 0x65, 0x6c, 0x64, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x61, 0x73, 0x73, - 0x65, 0x74, 0x2e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x20, 0x66, - 0x69, 0x65, 0x6c, 0x64, 0x20, 0x69, 0x73, 0x20, 0x77, 0x72, 0x69, 0x74, 0x74, 0x65, 0x6e, 0x20, - 0x77, 0x69, 0x74, 0x68, 0x20, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x20, 0x73, 0x65, 0x70, 0x61, - 0x72, 0x61, 0x74, 0x65, 0x64, 0x20, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x20, 0x6e, 0x61, 0x6d, 0x65, - 0x2e, 0x20, 0x65, 0x67, 0x2c, 0x20, 0x22, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x5b, 0x64, 0x61, - 0x74, 0x61, 0x2e, 0x6c, 0x61, 0x6e, 0x64, 0x73, 0x63, 0x61, 0x70, 0x65, 0x5d, 0x22, 0x52, 0x06, - 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0xe2, 0x01, 0x0a, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, - 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x38, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, - 0x6b, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0x2e, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x41, 0x73, 0x73, 0x65, 0x74, 0x73, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x45, 0x6e, 0x74, 0x72, 0x79, - 0x42, 0x91, 0x01, 0x92, 0x41, 0x8d, 0x01, 0x32, 0x8a, 0x01, 0x71, 0x75, 0x65, 0x72, 0x79, 0x20, - 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x20, 0x62, 0x61, 0x73, 0x65, 0x64, 0x20, 0x6f, 0x6e, 0x20, - 0x61, 0x20, 0x28, 0x6e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x29, 0x20, 0x66, 0x69, 0x65, 0x6c, 0x64, - 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x61, 0x73, 0x73, 0x65, 0x74, 0x2e, 0x20, 0x74, - 0x68, 0x65, 0x20, 0x6e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x20, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x20, - 0x69, 0x73, 0x20, 0x77, 0x72, 0x69, 0x74, 0x74, 0x65, 0x6e, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, - 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x20, 0x73, 0x65, 0x70, 0x61, 0x72, 0x61, 0x74, 0x65, 0x64, - 0x20, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x2e, 0x20, 0x65, 0x67, 0x2c, - 0x20, 0x22, 0x71, 0x75, 0x65, 0x72, 0x79, 0x5b, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x6f, 0x77, 0x6e, - 0x65, 0x72, 0x5d, 0x22, 0x52, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x12, 0x31, 0x0a, 0x0e, 0x69, - 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x18, 0x06, 0x20, - 0x03, 0x28, 0x09, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x92, 0x01, 0x04, 0x18, 0x01, 0x28, 0x01, 0x52, - 0x0d, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x12, 0x71, - 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0d, 0x42, 0x59, - 0x92, 0x41, 0x4d, 0x32, 0x4b, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x20, 0x70, 0x61, 0x72, 0x61, - 0x6d, 0x65, 0x74, 0x65, 0x72, 0x20, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x73, 0x20, 0x74, 0x68, - 0x65, 0x20, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x20, 0x66, 0x72, 0x6f, 0x6d, 0x20, 0x74, 0x68, - 0x65, 0x20, 0x66, 0x69, 0x72, 0x73, 0x74, 0x20, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x20, 0x79, - 0x6f, 0x75, 0x20, 0x77, 0x61, 0x6e, 0x74, 0x20, 0x74, 0x6f, 0x20, 0x66, 0x65, 0x74, 0x63, 0x68, - 0xfa, 0x42, 0x06, 0x2a, 0x04, 0x28, 0x00, 0x40, 0x01, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, - 0x74, 0x12, 0x3b, 0x0a, 0x05, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x25, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6d, 0x70, - 0x61, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x53, 0x65, 0x61, 0x72, - 0x63, 0x68, 0x46, 0x6c, 0x61, 0x67, 0x73, 0x52, 0x05, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x1a, 0x39, - 0x0a, 0x0b, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x45, 0x6e, 0x74, 0x72, 0x79, 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, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x38, 0x0a, 0x0a, 0x51, 0x75, 0x65, - 0x72, 0x79, 0x45, 0x6e, 0x74, 0x72, 0x79, 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, 0x3a, - 0x02, 0x38, 0x01, 0x22, 0x87, 0x01, 0x0a, 0x0b, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x46, 0x6c, - 0x61, 0x67, 0x73, 0x12, 0x28, 0x0a, 0x10, 0x69, 0x73, 0x5f, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, - 0x5f, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x69, - 0x73, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x12, 0x23, 0x0a, - 0x0d, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x66, 0x75, 0x7a, 0x7a, 0x79, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x46, 0x75, 0x7a, - 0x7a, 0x79, 0x12, 0x29, 0x0a, 0x10, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x68, 0x69, 0x67, - 0x68, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0f, 0x65, 0x6e, - 0x61, 0x62, 0x6c, 0x65, 0x48, 0x69, 0x67, 0x68, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x22, 0x4b, 0x0a, - 0x14, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x41, 0x73, 0x73, 0x65, 0x74, 0x73, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x33, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x63, - 0x6f, 0x6d, 0x70, 0x61, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x41, - 0x73, 0x73, 0x65, 0x74, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x57, 0x0a, 0x14, 0x53, 0x75, - 0x67, 0x67, 0x65, 0x73, 0x74, 0x41, 0x73, 0x73, 0x65, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x12, 0x3f, 0x0a, 0x04, 0x74, 0x65, 0x78, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x42, 0x2b, 0x92, 0x41, 0x20, 0x32, 0x1e, 0x74, 0x65, 0x78, 0x74, 0x20, 0x74, 0x6f, 0x20, 0x73, - 0x65, 0x61, 0x72, 0x63, 0x68, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x73, 0x75, 0x67, 0x67, 0x65, 0x73, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0xfa, 0x42, 0x05, 0x72, 0x03, 0xd0, 0x01, 0x01, 0x52, 0x04, 0x74, - 0x65, 0x78, 0x74, 0x22, 0x2b, 0x0a, 0x15, 0x53, 0x75, 0x67, 0x67, 0x65, 0x73, 0x74, 0x41, 0x73, - 0x73, 0x65, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, - 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, - 0x22, 0xdf, 0x02, 0x0a, 0x12, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x41, 0x73, 0x73, 0x65, 0x74, 0x73, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x22, 0x0a, 0x07, 0x67, 0x72, 0x6f, 0x75, 0x70, - 0x62, 0x79, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x92, 0x01, 0x02, - 0x08, 0x01, 0x52, 0x07, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x62, 0x79, 0x12, 0x7a, 0x0a, 0x06, 0x66, - 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x38, 0x2e, 0x72, 0x61, - 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x73, 0x73, 0x2e, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x41, 0x73, 0x73, 0x65, - 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, - 0x45, 0x6e, 0x74, 0x72, 0x79, 0x42, 0x28, 0x92, 0x41, 0x25, 0x32, 0x23, 0x66, 0x69, 0x6c, 0x74, - 0x65, 0x72, 0x20, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x20, 0x62, 0x61, 0x73, 0x65, 0x64, 0x20, - 0x6f, 0x6e, 0x20, 0x61, 0x73, 0x73, 0x65, 0x74, 0x20, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x52, - 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x25, 0x0a, 0x0e, 0x69, 0x6e, 0x63, 0x6c, 0x75, - 0x64, 0x65, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, - 0x0d, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x12, 0x47, - 0x0a, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x42, 0x33, 0x92, 0x41, - 0x27, 0x32, 0x25, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x20, 0x6f, 0x66, 0x20, 0x72, 0x65, 0x73, - 0x75, 0x6c, 0x74, 0x73, 0x20, 0x70, 0x65, 0x72, 0x20, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x20, 0x74, - 0x6f, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0xfa, 0x42, 0x06, 0x2a, 0x04, 0x28, 0x00, 0x40, - 0x01, 0x52, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x1a, 0x39, 0x0a, 0x0b, 0x46, 0x69, 0x6c, 0x74, 0x65, - 0x72, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, + 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x45, 0x6e, + 0x74, 0x72, 0x79, 0x52, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x12, 0x31, 0x0a, 0x0e, 0x69, 0x6e, + 0x63, 0x6c, 0x75, 0x64, 0x65, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x18, 0x06, 0x20, 0x03, + 0x28, 0x09, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x92, 0x01, 0x04, 0x18, 0x01, 0x28, 0x01, 0x52, 0x0d, + 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x12, 0x21, 0x0a, + 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0d, 0x42, 0x09, 0xfa, + 0x42, 0x06, 0x2a, 0x04, 0x28, 0x00, 0x40, 0x01, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, + 0x12, 0x3b, 0x0a, 0x05, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x25, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x61, + 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x53, 0x65, 0x61, 0x72, 0x63, + 0x68, 0x46, 0x6c, 0x61, 0x67, 0x73, 0x52, 0x05, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x1a, 0x39, 0x0a, + 0x0b, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x45, 0x6e, 0x74, 0x72, 0x79, 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, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x38, 0x0a, 0x0a, 0x51, 0x75, 0x65, 0x72, + 0x79, 0x45, 0x6e, 0x74, 0x72, 0x79, 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, 0x3a, 0x02, - 0x38, 0x01, 0x22, 0x5e, 0x0a, 0x13, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x41, 0x73, 0x73, 0x65, 0x74, - 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x47, 0x0a, 0x0c, 0x61, 0x73, 0x73, - 0x65, 0x74, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x24, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x61, - 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x41, 0x73, 0x73, 0x65, 0x74, - 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x0b, 0x61, 0x73, 0x73, 0x65, 0x74, 0x47, 0x72, 0x6f, 0x75, - 0x70, 0x73, 0x22, 0x8e, 0x01, 0x0a, 0x0a, 0x41, 0x73, 0x73, 0x65, 0x74, 0x47, 0x72, 0x6f, 0x75, - 0x70, 0x12, 0x47, 0x0a, 0x0c, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, - 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, + 0x38, 0x01, 0x22, 0x87, 0x01, 0x0a, 0x0b, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x46, 0x6c, 0x61, + 0x67, 0x73, 0x12, 0x28, 0x0a, 0x10, 0x69, 0x73, 0x5f, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x5f, + 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x69, 0x73, + 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x12, 0x23, 0x0a, 0x0d, + 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x66, 0x75, 0x7a, 0x7a, 0x79, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x08, 0x52, 0x0c, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x46, 0x75, 0x7a, 0x7a, + 0x79, 0x12, 0x29, 0x0a, 0x10, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x68, 0x69, 0x67, 0x68, + 0x6c, 0x69, 0x67, 0x68, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0f, 0x65, 0x6e, 0x61, + 0x62, 0x6c, 0x65, 0x48, 0x69, 0x67, 0x68, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x22, 0x4b, 0x0a, 0x14, + 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x41, 0x73, 0x73, 0x65, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x33, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x63, 0x6f, + 0x6d, 0x70, 0x61, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x41, 0x73, + 0x73, 0x65, 0x74, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x34, 0x0a, 0x14, 0x53, 0x75, 0x67, + 0x67, 0x65, 0x73, 0x74, 0x41, 0x73, 0x73, 0x65, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x1c, 0x0a, 0x04, 0x74, 0x65, 0x78, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, + 0x08, 0xfa, 0x42, 0x05, 0x72, 0x03, 0xd0, 0x01, 0x01, 0x52, 0x04, 0x74, 0x65, 0x78, 0x74, 0x22, + 0x2b, 0x0a, 0x15, 0x53, 0x75, 0x67, 0x67, 0x65, 0x73, 0x74, 0x41, 0x73, 0x73, 0x65, 0x74, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, + 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x8b, 0x02, 0x0a, + 0x12, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x41, 0x73, 0x73, 0x65, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x22, 0x0a, 0x07, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x62, 0x79, 0x18, 0x01, + 0x20, 0x03, 0x28, 0x09, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x92, 0x01, 0x02, 0x08, 0x01, 0x52, 0x07, + 0x67, 0x72, 0x6f, 0x75, 0x70, 0x62, 0x79, 0x12, 0x50, 0x0a, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, + 0x72, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x38, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x52, 0x0b, 0x67, - 0x72, 0x6f, 0x75, 0x70, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x12, 0x37, 0x0a, 0x06, 0x61, 0x73, - 0x73, 0x65, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x72, 0x61, 0x79, - 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x73, 0x73, 0x2e, 0x76, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x41, 0x73, 0x73, 0x65, 0x74, 0x52, 0x06, 0x61, 0x73, 0x73, - 0x65, 0x74, 0x73, 0x22, 0x4a, 0x0a, 0x0a, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x46, 0x69, 0x65, 0x6c, - 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x4b, 0x65, 0x79, 0x12, 0x1f, - 0x0a, 0x0b, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x0a, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x22, - 0xed, 0x02, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x47, 0x72, 0x61, 0x70, 0x68, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x03, 0x75, 0x72, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x3b, 0x0a, 0x09, 0x64, - 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x1d, - 0xfa, 0x42, 0x1a, 0x72, 0x18, 0x52, 0x08, 0x75, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x52, - 0x0a, 0x64, 0x6f, 0x77, 0x6e, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x52, 0x00, 0x52, 0x09, 0x64, - 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x71, 0x0a, 0x0f, 0x77, 0x69, 0x74, 0x68, - 0x5f, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x08, 0x42, 0x43, 0x92, 0x41, 0x40, 0x32, 0x3e, 0x69, 0x66, 0x20, 0x73, 0x65, 0x74, 0x20, 0x74, - 0x6f, 0x20, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x2c, 0x20, 0x6e, 0x6f, 0x64, 0x65, 0x20, 0x61, 0x74, - 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x20, 0x28, 0x70, 0x72, 0x6f, 0x62, 0x65, 0x73, - 0x29, 0x20, 0x77, 0x69, 0x6c, 0x6c, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x62, 0x65, 0x20, 0x72, 0x65, - 0x74, 0x75, 0x72, 0x6e, 0x65, 0x64, 0x48, 0x00, 0x52, 0x0e, 0x77, 0x69, 0x74, 0x68, 0x41, 0x74, - 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x88, 0x01, 0x01, 0x12, 0x6e, 0x0a, 0x0f, 0x69, - 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x5f, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x18, 0x05, - 0x20, 0x01, 0x28, 0x08, 0x42, 0x45, 0x92, 0x41, 0x42, 0x32, 0x40, 0x69, 0x66, 0x20, 0x74, 0x72, - 0x75, 0x65, 0x2c, 0x20, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x20, 0x73, 0x6f, 0x66, 0x74, - 0x20, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x20, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x20, - 0x69, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6c, 0x69, 0x6e, 0x65, 0x61, 0x67, 0x65, 0x20, 0x67, - 0x72, 0x61, 0x70, 0x68, 0x20, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x0e, 0x69, 0x6e, 0x63, - 0x6c, 0x75, 0x64, 0x65, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x42, 0x12, 0x0a, 0x10, 0x5f, - 0x77, 0x69, 0x74, 0x68, 0x5f, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x22, - 0xc8, 0x03, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x47, 0x72, 0x61, 0x70, 0x68, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x39, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x63, 0x6f, - 0x6d, 0x70, 0x61, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4c, 0x69, - 0x6e, 0x65, 0x61, 0x67, 0x65, 0x45, 0x64, 0x67, 0x65, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, - 0x58, 0x0a, 0x0a, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x61, 0x74, 0x74, 0x72, 0x73, 0x18, 0x02, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x39, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x63, - 0x6f, 0x6d, 0x70, 0x61, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, - 0x65, 0x74, 0x47, 0x72, 0x61, 0x70, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, - 0x4e, 0x6f, 0x64, 0x65, 0x41, 0x74, 0x74, 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x09, - 0x6e, 0x6f, 0x64, 0x65, 0x41, 0x74, 0x74, 0x72, 0x73, 0x1a, 0x45, 0x0a, 0x0a, 0x50, 0x72, 0x6f, - 0x62, 0x65, 0x73, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x37, 0x0a, 0x06, 0x6c, 0x61, 0x74, 0x65, 0x73, - 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, + 0x61, 0x31, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x41, 0x73, 0x73, 0x65, 0x74, 0x73, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x45, 0x6e, 0x74, 0x72, + 0x79, 0x52, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x25, 0x0a, 0x0e, 0x69, 0x6e, 0x63, + 0x6c, 0x75, 0x64, 0x65, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, + 0x09, 0x52, 0x0d, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x73, + 0x12, 0x1d, 0x0a, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x42, 0x09, + 0xfa, 0x42, 0x06, 0x2a, 0x04, 0x28, 0x00, 0x40, 0x01, 0x52, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x1a, + 0x39, 0x0a, 0x0b, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x45, 0x6e, 0x74, 0x72, 0x79, 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, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x5e, 0x0a, 0x13, 0x47, 0x72, + 0x6f, 0x75, 0x70, 0x41, 0x73, 0x73, 0x65, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x47, 0x0a, 0x0c, 0x61, 0x73, 0x73, 0x65, 0x74, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, + 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x62, 0x65, 0x52, 0x06, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x74, - 0x1a, 0x5f, 0x0a, 0x0e, 0x4e, 0x6f, 0x64, 0x65, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, - 0x65, 0x73, 0x12, 0x4d, 0x0a, 0x06, 0x70, 0x72, 0x6f, 0x62, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x35, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x63, 0x6f, - 0x6d, 0x70, 0x61, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x65, - 0x74, 0x47, 0x72, 0x61, 0x70, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x50, - 0x72, 0x6f, 0x62, 0x65, 0x73, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x06, 0x70, 0x72, 0x6f, 0x62, 0x65, - 0x73, 0x1a, 0x77, 0x0a, 0x0e, 0x4e, 0x6f, 0x64, 0x65, 0x41, 0x74, 0x74, 0x72, 0x73, 0x45, 0x6e, - 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x4f, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x39, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, - 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, + 0x61, 0x31, 0x2e, 0x41, 0x73, 0x73, 0x65, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x0b, 0x61, + 0x73, 0x73, 0x65, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x22, 0x8e, 0x01, 0x0a, 0x0a, 0x41, + 0x73, 0x73, 0x65, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x47, 0x0a, 0x0c, 0x67, 0x72, 0x6f, + 0x75, 0x70, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x24, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x61, + 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, + 0x46, 0x69, 0x65, 0x6c, 0x64, 0x52, 0x0b, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x46, 0x69, 0x65, 0x6c, + 0x64, 0x73, 0x12, 0x37, 0x0a, 0x06, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x63, 0x6f, + 0x6d, 0x70, 0x61, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x41, 0x73, + 0x73, 0x65, 0x74, 0x52, 0x06, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x22, 0x4a, 0x0a, 0x0a, 0x47, + 0x72, 0x6f, 0x75, 0x70, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x67, 0x72, 0x6f, + 0x75, 0x70, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x67, 0x72, + 0x6f, 0x75, 0x70, 0x4b, 0x65, 0x79, 0x12, 0x1f, 0x0a, 0x0b, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x67, 0x72, 0x6f, + 0x75, 0x70, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x22, 0xe1, 0x01, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x47, + 0x72, 0x61, 0x70, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x75, + 0x72, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6e, 0x12, 0x14, 0x0a, + 0x05, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x6c, 0x65, + 0x76, 0x65, 0x6c, 0x12, 0x3b, 0x0a, 0x09, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x1d, 0xfa, 0x42, 0x1a, 0x72, 0x18, 0x52, 0x08, 0x75, + 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x52, 0x0a, 0x64, 0x6f, 0x77, 0x6e, 0x73, 0x74, 0x72, + 0x65, 0x61, 0x6d, 0x52, 0x00, 0x52, 0x09, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x12, 0x2c, 0x0a, 0x0f, 0x77, 0x69, 0x74, 0x68, 0x5f, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, + 0x74, 0x65, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x0e, 0x77, 0x69, 0x74, + 0x68, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x88, 0x01, 0x01, 0x12, 0x27, + 0x0a, 0x0f, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x5f, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, + 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, + 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x42, 0x12, 0x0a, 0x10, 0x5f, 0x77, 0x69, 0x74, 0x68, + 0x5f, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x22, 0xc8, 0x03, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x47, 0x72, 0x61, 0x70, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x52, - 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xb4, 0x04, 0x0a, 0x12, 0x47, - 0x65, 0x74, 0x41, 0x6c, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x12, 0x33, 0x0a, 0x01, 0x71, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x25, 0x92, 0x41, - 0x1a, 0x32, 0x18, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x20, 0x62, 0x79, 0x20, 0x73, 0x70, 0x65, - 0x63, 0x69, 0x66, 0x69, 0x63, 0x20, 0x71, 0x75, 0x65, 0x72, 0x79, 0xfa, 0x42, 0x05, 0x72, 0x03, - 0xd0, 0x01, 0x01, 0x52, 0x01, 0x71, 0x12, 0x47, 0x0a, 0x08, 0x71, 0x5f, 0x66, 0x69, 0x65, 0x6c, - 0x64, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x2c, 0x92, 0x41, 0x21, 0x32, 0x1f, 0x66, - 0x69, 0x6c, 0x74, 0x65, 0x72, 0x20, 0x62, 0x79, 0x20, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, - 0x65, 0x20, 0x71, 0x75, 0x65, 0x72, 0x79, 0x20, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0xfa, 0x42, - 0x05, 0x72, 0x03, 0xd0, 0x01, 0x01, 0x52, 0x07, 0x71, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x12, - 0x3b, 0x0a, 0x05, 0x74, 0x79, 0x70, 0x65, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x25, - 0x92, 0x41, 0x1a, 0x32, 0x18, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x20, 0x62, 0x79, 0x20, 0x6d, - 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x65, 0x20, 0x74, 0x79, 0x70, 0x65, 0x73, 0xfa, 0x42, 0x05, - 0x72, 0x03, 0xd0, 0x01, 0x01, 0x52, 0x05, 0x74, 0x79, 0x70, 0x65, 0x73, 0x12, 0x44, 0x0a, 0x08, - 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x28, - 0x92, 0x41, 0x1d, 0x32, 0x1b, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x20, 0x62, 0x79, 0x20, 0x6d, - 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x65, 0x20, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, - 0xfa, 0x42, 0x05, 0x72, 0x03, 0xd0, 0x01, 0x01, 0x52, 0x08, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, - 0x65, 0x73, 0x12, 0xe3, 0x01, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x05, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x36, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6d, - 0x70, 0x61, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, - 0x41, 0x6c, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, - 0x44, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x42, 0x96, 0x01, 0x92, 0x41, 0x92, 0x01, - 0x32, 0x8f, 0x01, 0x71, 0x75, 0x65, 0x72, 0x79, 0x20, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x20, - 0x62, 0x61, 0x73, 0x65, 0x64, 0x20, 0x6f, 0x6e, 0x20, 0x61, 0x20, 0x28, 0x6e, 0x65, 0x73, 0x74, - 0x65, 0x64, 0x29, 0x20, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, - 0x20, 0x64, 0x61, 0x74, 0x61, 0x20, 0x61, 0x73, 0x73, 0x65, 0x74, 0x2e, 0x20, 0x74, 0x68, 0x65, - 0x20, 0x6e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x20, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x20, 0x69, 0x73, - 0x20, 0x77, 0x72, 0x69, 0x74, 0x74, 0x65, 0x6e, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x70, 0x65, - 0x72, 0x69, 0x6f, 0x64, 0x20, 0x73, 0x65, 0x70, 0x61, 0x72, 0x61, 0x74, 0x65, 0x64, 0x20, 0x66, - 0x69, 0x65, 0x6c, 0x64, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x2e, 0x20, 0x65, 0x67, 0x2c, 0x20, 0x22, - 0x64, 0x61, 0x74, 0x61, 0x5b, 0x6e, 0x61, 0x6d, 0x65, 0x2e, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, - 0x5d, 0x22, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x1a, 0x37, 0x0a, 0x09, 0x44, 0x61, 0x74, 0x61, - 0x45, 0x6e, 0x74, 0x72, 0x79, 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, 0x3a, 0x02, 0x38, - 0x01, 0x22, 0x49, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x41, 0x6c, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x73, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x32, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, - 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, - 0x6b, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0xd0, 0x07, 0x0a, - 0x13, 0x47, 0x65, 0x74, 0x41, 0x6c, 0x6c, 0x41, 0x73, 0x73, 0x65, 0x74, 0x73, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x12, 0x33, 0x0a, 0x01, 0x71, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, - 0x25, 0x92, 0x41, 0x1a, 0x32, 0x18, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x20, 0x62, 0x79, 0x20, - 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, 0x20, 0x71, 0x75, 0x65, 0x72, 0x79, 0xfa, 0x42, - 0x05, 0x72, 0x03, 0xd0, 0x01, 0x01, 0x52, 0x01, 0x71, 0x12, 0x47, 0x0a, 0x08, 0x71, 0x5f, 0x66, - 0x69, 0x65, 0x6c, 0x64, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x2c, 0x92, 0x41, 0x21, - 0x32, 0x1f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x20, 0x62, 0x79, 0x20, 0x6d, 0x75, 0x6c, 0x74, - 0x69, 0x70, 0x6c, 0x65, 0x20, 0x71, 0x75, 0x65, 0x72, 0x79, 0x20, 0x66, 0x69, 0x65, 0x6c, 0x64, - 0x73, 0xfa, 0x42, 0x05, 0x72, 0x03, 0xd0, 0x01, 0x01, 0x52, 0x07, 0x71, 0x46, 0x69, 0x65, 0x6c, - 0x64, 0x73, 0x12, 0x3b, 0x0a, 0x05, 0x74, 0x79, 0x70, 0x65, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x09, 0x42, 0x25, 0x92, 0x41, 0x1a, 0x32, 0x18, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x20, 0x62, - 0x79, 0x20, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x65, 0x20, 0x74, 0x79, 0x70, 0x65, 0x73, - 0xfa, 0x42, 0x05, 0x72, 0x03, 0xd0, 0x01, 0x01, 0x52, 0x05, 0x74, 0x79, 0x70, 0x65, 0x73, 0x12, - 0x44, 0x0a, 0x08, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x09, 0x42, 0x28, 0x92, 0x41, 0x1d, 0x32, 0x1b, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x20, 0x62, - 0x79, 0x20, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x65, 0x20, 0x73, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0x73, 0xfa, 0x42, 0x05, 0x72, 0x03, 0xd0, 0x01, 0x01, 0x52, 0x08, 0x73, 0x65, 0x72, - 0x76, 0x69, 0x63, 0x65, 0x73, 0x12, 0x38, 0x0a, 0x04, 0x73, 0x6f, 0x72, 0x74, 0x18, 0x05, 0x20, - 0x01, 0x28, 0x09, 0x42, 0x24, 0x92, 0x41, 0x19, 0x32, 0x17, 0x73, 0x6f, 0x72, 0x74, 0x69, 0x6e, - 0x67, 0x20, 0x62, 0x61, 0x73, 0x65, 0x64, 0x20, 0x6f, 0x6e, 0x20, 0x66, 0x69, 0x65, 0x6c, 0x64, - 0x73, 0xfa, 0x42, 0x05, 0x72, 0x03, 0xd0, 0x01, 0x01, 0x52, 0x04, 0x73, 0x6f, 0x72, 0x74, 0x12, - 0x57, 0x0a, 0x09, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x01, - 0x28, 0x09, 0x42, 0x39, 0x92, 0x41, 0x2e, 0x32, 0x2c, 0x73, 0x6f, 0x72, 0x74, 0x69, 0x6e, 0x67, - 0x20, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x63, 0x61, 0x6e, 0x20, 0x65, - 0x69, 0x74, 0x68, 0x65, 0x72, 0x20, 0x62, 0x65, 0x20, 0x61, 0x73, 0x63, 0x20, 0x6f, 0x72, 0x20, - 0x64, 0x65, 0x73, 0x63, 0x20, 0xfa, 0x42, 0x05, 0x72, 0x03, 0xd0, 0x01, 0x01, 0x52, 0x09, 0x64, - 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0xe4, 0x01, 0x0a, 0x04, 0x64, 0x61, 0x74, - 0x61, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x37, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, - 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x6c, 0x6c, 0x41, 0x73, 0x73, 0x65, 0x74, 0x73, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, - 0x42, 0x96, 0x01, 0x92, 0x41, 0x92, 0x01, 0x32, 0x8f, 0x01, 0x71, 0x75, 0x65, 0x72, 0x79, 0x20, - 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x20, 0x62, 0x61, 0x73, 0x65, 0x64, 0x20, 0x6f, 0x6e, 0x20, - 0x61, 0x20, 0x28, 0x6e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x29, 0x20, 0x66, 0x69, 0x65, 0x6c, 0x64, - 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x64, 0x61, 0x74, 0x61, 0x20, 0x61, 0x73, 0x73, - 0x65, 0x74, 0x2e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x20, 0x66, - 0x69, 0x65, 0x6c, 0x64, 0x20, 0x69, 0x73, 0x20, 0x77, 0x72, 0x69, 0x74, 0x74, 0x65, 0x6e, 0x20, - 0x77, 0x69, 0x74, 0x68, 0x20, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x20, 0x73, 0x65, 0x70, 0x61, - 0x72, 0x61, 0x74, 0x65, 0x64, 0x20, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x20, 0x6e, 0x61, 0x6d, 0x65, - 0x2e, 0x20, 0x65, 0x67, 0x2c, 0x20, 0x22, 0x64, 0x61, 0x74, 0x61, 0x5b, 0x6e, 0x61, 0x6d, 0x65, - 0x2e, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x5d, 0x22, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, - 0x37, 0x0a, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0d, 0x42, 0x23, 0x92, - 0x41, 0x17, 0x32, 0x15, 0x6d, 0x61, 0x78, 0x69, 0x6d, 0x75, 0x6d, 0x20, 0x73, 0x69, 0x7a, 0x65, - 0x20, 0x74, 0x6f, 0x20, 0x66, 0x65, 0x74, 0x63, 0x68, 0xfa, 0x42, 0x06, 0x2a, 0x04, 0x28, 0x00, - 0x40, 0x01, 0x52, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x12, 0x3a, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, - 0x65, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0d, 0x42, 0x22, 0x92, 0x41, 0x16, 0x32, 0x14, 0x6f, - 0x66, 0x66, 0x73, 0x65, 0x74, 0x20, 0x74, 0x6f, 0x20, 0x66, 0x65, 0x74, 0x63, 0x68, 0x20, 0x66, - 0x72, 0x6f, 0x6d, 0xfa, 0x42, 0x06, 0x2a, 0x04, 0x28, 0x00, 0x40, 0x01, 0x52, 0x06, 0x6f, 0x66, - 0x66, 0x73, 0x65, 0x74, 0x12, 0x4a, 0x0a, 0x0a, 0x77, 0x69, 0x74, 0x68, 0x5f, 0x74, 0x6f, 0x74, - 0x61, 0x6c, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x08, 0x42, 0x2b, 0x92, 0x41, 0x28, 0x32, 0x26, 0x69, - 0x66, 0x20, 0x73, 0x65, 0x74, 0x20, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x20, 0x74, 0x6f, - 0x74, 0x61, 0x6c, 0x20, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x20, 0x69, 0x6e, 0x20, 0x72, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x09, 0x77, 0x69, 0x74, 0x68, 0x54, 0x6f, 0x74, 0x61, 0x6c, - 0x12, 0x44, 0x0a, 0x0a, 0x69, 0x73, 0x5f, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x18, 0x0b, - 0x20, 0x01, 0x28, 0x08, 0x42, 0x25, 0x92, 0x41, 0x22, 0x32, 0x20, 0x66, 0x69, 0x6c, 0x74, 0x65, - 0x72, 0x20, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x20, 0x62, 0x79, 0x20, 0x64, 0x65, 0x6c, 0x65, - 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x09, 0x69, 0x73, 0x44, - 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x1a, 0x37, 0x0a, 0x09, 0x44, 0x61, 0x74, 0x61, 0x45, 0x6e, - 0x74, 0x72, 0x79, 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, 0x3a, 0x02, 0x38, 0x01, 0x22, - 0x61, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x41, 0x6c, 0x6c, 0x41, 0x73, 0x73, 0x65, 0x74, 0x73, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x33, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, - 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, - 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x2e, 0x41, 0x73, 0x73, 0x65, 0x74, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x14, 0x0a, 0x05, - 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x74, 0x6f, 0x74, - 0x61, 0x6c, 0x22, 0x25, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x41, 0x73, 0x73, 0x65, 0x74, 0x42, 0x79, - 0x49, 0x44, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x4b, 0x0a, 0x14, 0x47, 0x65, 0x74, - 0x41, 0x73, 0x73, 0x65, 0x74, 0x42, 0x79, 0x49, 0x44, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x33, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x1f, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x61, - 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x41, 0x73, 0x73, 0x65, 0x74, - 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0xb4, 0x06, 0x0a, 0x12, 0x55, 0x70, 0x73, 0x65, 0x72, - 0x74, 0x41, 0x73, 0x73, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x48, 0x0a, - 0x05, 0x61, 0x73, 0x73, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x72, - 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x73, 0x73, 0x2e, - 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x55, 0x70, 0x73, 0x65, 0x72, 0x74, 0x41, 0x73, - 0x73, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x41, 0x73, 0x73, 0x65, 0x74, - 0x52, 0x05, 0x61, 0x73, 0x73, 0x65, 0x74, 0x12, 0x43, 0x0a, 0x09, 0x75, 0x70, 0x73, 0x74, 0x72, - 0x65, 0x61, 0x6d, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x72, 0x61, 0x79, + 0x12, 0x39, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, + 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x73, + 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x6e, 0x65, 0x61, 0x67, + 0x65, 0x45, 0x64, 0x67, 0x65, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x58, 0x0a, 0x0a, 0x6e, + 0x6f, 0x64, 0x65, 0x5f, 0x61, 0x74, 0x74, 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x39, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x61, + 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x47, 0x72, + 0x61, 0x70, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x4e, 0x6f, 0x64, 0x65, + 0x41, 0x74, 0x74, 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x09, 0x6e, 0x6f, 0x64, 0x65, + 0x41, 0x74, 0x74, 0x72, 0x73, 0x1a, 0x45, 0x0a, 0x0a, 0x50, 0x72, 0x6f, 0x62, 0x65, 0x73, 0x49, + 0x6e, 0x66, 0x6f, 0x12, 0x37, 0x0a, 0x06, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x63, + 0x6f, 0x6d, 0x70, 0x61, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, + 0x72, 0x6f, 0x62, 0x65, 0x52, 0x06, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x1a, 0x5f, 0x0a, 0x0e, + 0x4e, 0x6f, 0x64, 0x65, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x12, 0x4d, + 0x0a, 0x06, 0x70, 0x72, 0x6f, 0x62, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x35, + 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x73, + 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x47, 0x72, 0x61, + 0x70, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x50, 0x72, 0x6f, 0x62, 0x65, + 0x73, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x06, 0x70, 0x72, 0x6f, 0x62, 0x65, 0x73, 0x1a, 0x77, 0x0a, + 0x0e, 0x4e, 0x6f, 0x64, 0x65, 0x41, 0x74, 0x74, 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, + 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, + 0x79, 0x12, 0x4f, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x39, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6d, 0x70, + 0x61, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x47, + 0x72, 0x61, 0x70, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x4e, 0x6f, 0x64, + 0x65, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x52, 0x05, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x9c, 0x02, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x41, 0x6c, + 0x6c, 0x54, 0x79, 0x70, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, + 0x01, 0x71, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x72, 0x03, 0xd0, + 0x01, 0x01, 0x52, 0x01, 0x71, 0x12, 0x23, 0x0a, 0x08, 0x71, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, + 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x72, 0x03, 0xd0, 0x01, + 0x01, 0x52, 0x07, 0x71, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x12, 0x1e, 0x0a, 0x05, 0x74, 0x79, + 0x70, 0x65, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x72, 0x03, + 0xd0, 0x01, 0x01, 0x52, 0x05, 0x74, 0x79, 0x70, 0x65, 0x73, 0x12, 0x24, 0x0a, 0x08, 0x73, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x08, 0xfa, 0x42, + 0x05, 0x72, 0x03, 0xd0, 0x01, 0x01, 0x52, 0x08, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, + 0x12, 0x4a, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x36, + 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x73, + 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x6c, 0x6c, + 0x54, 0x79, 0x70, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x44, 0x61, 0x74, + 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x1a, 0x37, 0x0a, 0x09, + 0x44, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 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, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x49, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x41, 0x6c, 0x6c, 0x54, + 0x79, 0x70, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x32, 0x0a, 0x04, + 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x73, 0x73, 0x2e, 0x76, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x6e, 0x65, 0x61, 0x67, 0x65, 0x4e, 0x6f, 0x64, - 0x65, 0x52, 0x09, 0x75, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x12, 0x47, 0x0a, 0x0b, - 0x64, 0x6f, 0x77, 0x6e, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x25, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6d, - 0x70, 0x61, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x6e, - 0x65, 0x61, 0x67, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x0b, 0x64, 0x6f, 0x77, 0x6e, 0x73, 0x74, - 0x72, 0x65, 0x61, 0x6d, 0x73, 0x12, 0x62, 0x0a, 0x0b, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, - 0x6f, 0x6e, 0x6c, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x42, 0x41, 0x92, 0x41, 0x3e, 0x32, - 0x3c, 0x69, 0x66, 0x20, 0x74, 0x72, 0x75, 0x65, 0x2c, 0x20, 0x6f, 0x6e, 0x6c, 0x79, 0x20, 0x75, - 0x70, 0x64, 0x61, 0x74, 0x65, 0x20, 0x65, 0x78, 0x69, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x20, 0x61, - 0x73, 0x73, 0x65, 0x74, 0x73, 0x2c, 0x20, 0x64, 0x6f, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x63, 0x72, - 0x65, 0x61, 0x74, 0x65, 0x20, 0x6e, 0x65, 0x77, 0x20, 0x6f, 0x6e, 0x65, 0x73, 0x52, 0x0a, 0x75, - 0x70, 0x64, 0x61, 0x74, 0x65, 0x4f, 0x6e, 0x6c, 0x79, 0x1a, 0xe1, 0x03, 0x0a, 0x05, 0x41, 0x73, - 0x73, 0x65, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x03, 0x75, 0x72, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, - 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a, - 0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, - 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, - 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, - 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x4a, 0x0a, 0x04, 0x64, 0x61, 0x74, - 0x61, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, - 0x42, 0x1d, 0x92, 0x41, 0x1a, 0x32, 0x18, 0x64, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x20, 0x64, - 0x61, 0x74, 0x61, 0x20, 0x6f, 0x66, 0x20, 0x61, 0x6e, 0x20, 0x61, 0x73, 0x73, 0x65, 0x74, 0x52, - 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x6f, 0x0a, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x18, - 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3e, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, - 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x2e, 0x55, 0x70, 0x73, 0x65, 0x72, 0x74, 0x41, 0x73, 0x73, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x2e, 0x41, 0x73, 0x73, 0x65, 0x74, 0x2e, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, - 0x45, 0x6e, 0x74, 0x72, 0x79, 0x42, 0x17, 0x92, 0x41, 0x14, 0x32, 0x12, 0x6c, 0x61, 0x62, 0x65, - 0x6c, 0x73, 0x20, 0x6f, 0x66, 0x20, 0x61, 0x6e, 0x20, 0x61, 0x73, 0x73, 0x65, 0x74, 0x52, 0x06, - 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x12, 0x58, 0x0a, 0x06, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x73, - 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, - 0x6b, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x42, 0x20, 0x92, 0x41, 0x1d, 0x32, 0x1b, 0x6c, 0x69, 0x73, - 0x74, 0x20, 0x6f, 0x66, 0x20, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x73, 0x20, 0x6f, 0x66, 0x20, 0x74, - 0x68, 0x65, 0x20, 0x61, 0x73, 0x73, 0x65, 0x74, 0x52, 0x06, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x73, - 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, - 0x72, 0x6c, 0x1a, 0x39, 0x0a, 0x0b, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, - 0x79, 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, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x25, 0x0a, - 0x13, 0x55, 0x70, 0x73, 0x65, 0x72, 0x74, 0x41, 0x73, 0x73, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x02, 0x69, 0x64, 0x22, 0xf1, 0x07, 0x0a, 0x17, 0x55, 0x70, 0x73, 0x65, 0x72, 0x74, 0x50, - 0x61, 0x74, 0x63, 0x68, 0x41, 0x73, 0x73, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x12, 0x4d, 0x0a, 0x05, 0x61, 0x73, 0x73, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, + 0x22, 0xe4, 0x03, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x41, 0x6c, 0x6c, 0x41, 0x73, 0x73, 0x65, 0x74, + 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x01, 0x71, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x72, 0x03, 0xd0, 0x01, 0x01, 0x52, 0x01, 0x71, + 0x12, 0x23, 0x0a, 0x08, 0x71, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x72, 0x03, 0xd0, 0x01, 0x01, 0x52, 0x07, 0x71, 0x46, + 0x69, 0x65, 0x6c, 0x64, 0x73, 0x12, 0x1e, 0x0a, 0x05, 0x74, 0x79, 0x70, 0x65, 0x73, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x09, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x72, 0x03, 0xd0, 0x01, 0x01, 0x52, 0x05, + 0x74, 0x79, 0x70, 0x65, 0x73, 0x12, 0x24, 0x0a, 0x08, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x72, 0x03, 0xd0, 0x01, + 0x01, 0x52, 0x08, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x12, 0x1c, 0x0a, 0x04, 0x73, + 0x6f, 0x72, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x72, 0x03, + 0xd0, 0x01, 0x01, 0x52, 0x04, 0x73, 0x6f, 0x72, 0x74, 0x12, 0x26, 0x0a, 0x09, 0x64, 0x69, 0x72, + 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x42, 0x08, 0xfa, 0x42, + 0x05, 0x72, 0x03, 0xd0, 0x01, 0x01, 0x52, 0x09, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x12, 0x4b, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x37, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x61, - 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x55, 0x70, 0x73, 0x65, 0x72, - 0x74, 0x50, 0x61, 0x74, 0x63, 0x68, 0x41, 0x73, 0x73, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x6c, + 0x6c, 0x41, 0x73, 0x73, 0x65, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x44, + 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x1d, + 0x0a, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0d, 0x42, 0x09, 0xfa, 0x42, + 0x06, 0x2a, 0x04, 0x28, 0x00, 0x40, 0x01, 0x52, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x12, 0x21, 0x0a, + 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0d, 0x42, 0x09, 0xfa, + 0x42, 0x06, 0x2a, 0x04, 0x28, 0x00, 0x40, 0x01, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, + 0x12, 0x1d, 0x0a, 0x0a, 0x77, 0x69, 0x74, 0x68, 0x5f, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x18, 0x0a, + 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x77, 0x69, 0x74, 0x68, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x12, + 0x1d, 0x0a, 0x0a, 0x69, 0x73, 0x5f, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x18, 0x0b, 0x20, + 0x01, 0x28, 0x08, 0x52, 0x09, 0x69, 0x73, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x1a, 0x37, + 0x0a, 0x09, 0x44, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 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, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x61, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x41, 0x6c, + 0x6c, 0x41, 0x73, 0x73, 0x65, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x33, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, + 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x73, 0x73, + 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x41, 0x73, 0x73, 0x65, 0x74, 0x52, 0x04, + 0x64, 0x61, 0x74, 0x61, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0d, 0x52, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x22, 0x25, 0x0a, 0x13, 0x47, 0x65, + 0x74, 0x41, 0x73, 0x73, 0x65, 0x74, 0x42, 0x79, 0x49, 0x44, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, + 0x64, 0x22, 0x4b, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x41, 0x73, 0x73, 0x65, 0x74, 0x42, 0x79, 0x49, + 0x44, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x33, 0x0a, 0x04, 0x64, 0x61, 0x74, + 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, + 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x2e, 0x41, 0x73, 0x73, 0x65, 0x74, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x97, + 0x05, 0x0a, 0x12, 0x55, 0x70, 0x73, 0x65, 0x72, 0x74, 0x41, 0x73, 0x73, 0x65, 0x74, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x48, 0x0a, 0x05, 0x61, 0x73, 0x73, 0x65, 0x74, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, + 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, + 0x55, 0x70, 0x73, 0x65, 0x72, 0x74, 0x41, 0x73, 0x73, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x41, 0x73, 0x73, 0x65, 0x74, 0x52, 0x05, 0x61, 0x73, 0x73, 0x65, 0x74, 0x12, 0x43, 0x0a, 0x09, 0x75, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x63, 0x6f, @@ -7235,338 +7064,336 @@ var file_raystack_compass_v1beta1_service_proto_rawDesc = []byte{ 0x61, 0x6d, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x6e, 0x65, 0x61, 0x67, 0x65, 0x4e, 0x6f, 0x64, 0x65, - 0x52, 0x0b, 0x64, 0x6f, 0x77, 0x6e, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x12, 0x2b, 0x0a, - 0x11, 0x6f, 0x76, 0x65, 0x72, 0x77, 0x72, 0x69, 0x74, 0x65, 0x5f, 0x6c, 0x69, 0x6e, 0x65, 0x61, - 0x67, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x10, 0x6f, 0x76, 0x65, 0x72, 0x77, 0x72, - 0x69, 0x74, 0x65, 0x4c, 0x69, 0x6e, 0x65, 0x61, 0x67, 0x65, 0x12, 0x62, 0x0a, 0x0b, 0x75, 0x70, - 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6f, 0x6e, 0x6c, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x42, - 0x41, 0x92, 0x41, 0x3e, 0x32, 0x3c, 0x69, 0x66, 0x20, 0x74, 0x72, 0x75, 0x65, 0x2c, 0x20, 0x6f, - 0x6e, 0x6c, 0x79, 0x20, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x20, 0x65, 0x78, 0x69, 0x73, 0x74, - 0x69, 0x6e, 0x67, 0x20, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2c, 0x20, 0x64, 0x6f, 0x20, 0x6e, - 0x6f, 0x74, 0x20, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x20, 0x6e, 0x65, 0x77, 0x20, 0x6f, 0x6e, - 0x65, 0x73, 0x52, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4f, 0x6e, 0x6c, 0x79, 0x1a, 0xe7, - 0x04, 0x0a, 0x05, 0x41, 0x73, 0x73, 0x65, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6e, 0x18, + 0x52, 0x0b, 0x64, 0x6f, 0x77, 0x6e, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x12, 0x1f, 0x0a, + 0x0b, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6f, 0x6e, 0x6c, 0x79, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x08, 0x52, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4f, 0x6e, 0x6c, 0x79, 0x1a, 0x87, + 0x03, 0x0a, 0x05, 0x41, 0x73, 0x73, 0x65, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, - 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x4f, - 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, + 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x12, + 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x20, 0x0a, 0x0b, + 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2b, + 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, - 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x1d, 0x92, 0x41, 0x12, 0x32, - 0x10, 0x6e, 0x61, 0x6d, 0x65, 0x20, 0x6f, 0x66, 0x20, 0x61, 0x6e, 0x20, 0x61, 0x73, 0x73, 0x65, - 0x74, 0xfa, 0x42, 0x05, 0x72, 0x03, 0xd0, 0x01, 0x01, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, - 0x18, 0x0a, 0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x64, 0x0a, 0x0b, 0x64, 0x65, 0x73, - 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x24, 0x92, 0x41, - 0x19, 0x32, 0x17, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6f, - 0x66, 0x20, 0x61, 0x6e, 0x20, 0x61, 0x73, 0x73, 0x65, 0x74, 0xfa, 0x42, 0x05, 0x72, 0x03, 0xd0, - 0x01, 0x01, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, - 0x4a, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x42, 0x1d, 0x92, 0x41, 0x1a, 0x32, 0x18, 0x64, 0x79, 0x6e, - 0x61, 0x6d, 0x69, 0x63, 0x20, 0x64, 0x61, 0x74, 0x61, 0x20, 0x6f, 0x66, 0x20, 0x61, 0x6e, 0x20, - 0x61, 0x73, 0x73, 0x65, 0x74, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x74, 0x0a, 0x06, 0x6c, - 0x61, 0x62, 0x65, 0x6c, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x43, 0x2e, 0x72, 0x61, + 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x56, 0x0a, 0x06, 0x6c, + 0x61, 0x62, 0x65, 0x6c, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3e, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x73, 0x73, 0x2e, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x55, 0x70, 0x73, 0x65, 0x72, 0x74, 0x50, 0x61, 0x74, - 0x63, 0x68, 0x41, 0x73, 0x73, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x41, - 0x73, 0x73, 0x65, 0x74, 0x2e, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, - 0x42, 0x17, 0x92, 0x41, 0x14, 0x32, 0x12, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x20, 0x6f, 0x66, - 0x20, 0x61, 0x6e, 0x20, 0x61, 0x73, 0x73, 0x65, 0x74, 0x52, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, - 0x73, 0x12, 0x58, 0x0a, 0x06, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x1e, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6d, - 0x70, 0x61, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x55, 0x73, 0x65, - 0x72, 0x42, 0x20, 0x92, 0x41, 0x1d, 0x32, 0x1b, 0x6c, 0x69, 0x73, 0x74, 0x20, 0x6f, 0x66, 0x20, - 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x73, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x61, 0x73, - 0x73, 0x65, 0x74, 0x52, 0x06, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x73, 0x12, 0x10, 0x0a, 0x03, 0x75, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x55, 0x70, 0x73, 0x65, 0x72, 0x74, 0x41, 0x73, 0x73, + 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x41, 0x73, 0x73, 0x65, 0x74, 0x2e, + 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x06, 0x6c, 0x61, 0x62, + 0x65, 0x6c, 0x73, 0x12, 0x36, 0x0a, 0x06, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x73, 0x18, 0x08, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x63, + 0x6f, 0x6d, 0x70, 0x61, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x55, + 0x73, 0x65, 0x72, 0x52, 0x06, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x73, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6c, 0x1a, 0x39, 0x0a, 0x0b, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 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, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x2a, 0x0a, 0x18, 0x55, 0x70, 0x73, 0x65, - 0x72, 0x74, 0x50, 0x61, 0x74, 0x63, 0x68, 0x41, 0x73, 0x73, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x02, 0x69, 0x64, 0x22, 0x24, 0x0a, 0x12, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x41, 0x73, - 0x73, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x15, 0x0a, 0x13, 0x44, 0x65, - 0x6c, 0x65, 0x74, 0x65, 0x41, 0x73, 0x73, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x6d, 0x0a, 0x19, 0x47, 0x65, 0x74, 0x41, 0x73, 0x73, 0x65, 0x74, 0x53, 0x74, 0x61, - 0x72, 0x67, 0x61, 0x7a, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, - 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1d, - 0x0a, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x42, 0x09, 0xfa, 0x42, - 0x06, 0x2a, 0x04, 0x28, 0x00, 0x40, 0x01, 0x52, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x12, 0x21, 0x0a, - 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x42, 0x09, 0xfa, - 0x42, 0x06, 0x2a, 0x04, 0x28, 0x00, 0x40, 0x01, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, - 0x22, 0x50, 0x0a, 0x1a, 0x47, 0x65, 0x74, 0x41, 0x73, 0x73, 0x65, 0x74, 0x53, 0x74, 0x61, 0x72, - 0x67, 0x61, 0x7a, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x32, - 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x72, - 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x73, 0x73, 0x2e, - 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x04, 0x64, 0x61, - 0x74, 0x61, 0x22, 0x71, 0x0a, 0x1d, 0x47, 0x65, 0x74, 0x41, 0x73, 0x73, 0x65, 0x74, 0x56, 0x65, - 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x02, 0x69, 0x64, 0x12, 0x1d, 0x0a, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0d, 0x42, 0x09, 0xfa, 0x42, 0x06, 0x2a, 0x04, 0x28, 0x00, 0x40, 0x01, 0x52, 0x04, 0x73, 0x69, - 0x7a, 0x65, 0x12, 0x21, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x0d, 0x42, 0x09, 0xfa, 0x42, 0x06, 0x2a, 0x04, 0x28, 0x00, 0x40, 0x01, 0x52, 0x06, 0x6f, - 0x66, 0x66, 0x73, 0x65, 0x74, 0x22, 0x55, 0x0a, 0x1e, 0x47, 0x65, 0x74, 0x41, 0x73, 0x73, 0x65, - 0x74, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x52, + 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x25, 0x0a, 0x13, 0x55, 0x70, 0x73, 0x65, + 0x72, 0x74, 0x41, 0x73, 0x73, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, + 0xa3, 0x06, 0x0a, 0x17, 0x55, 0x70, 0x73, 0x65, 0x72, 0x74, 0x50, 0x61, 0x74, 0x63, 0x68, 0x41, + 0x73, 0x73, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x4d, 0x0a, 0x05, 0x61, + 0x73, 0x73, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x37, 0x2e, 0x72, 0x61, 0x79, + 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x73, 0x73, 0x2e, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x55, 0x70, 0x73, 0x65, 0x72, 0x74, 0x50, 0x61, 0x74, 0x63, + 0x68, 0x41, 0x73, 0x73, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x41, 0x73, + 0x73, 0x65, 0x74, 0x52, 0x05, 0x61, 0x73, 0x73, 0x65, 0x74, 0x12, 0x43, 0x0a, 0x09, 0x75, 0x70, + 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, + 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x73, 0x73, + 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x6e, 0x65, 0x61, 0x67, 0x65, + 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x09, 0x75, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x12, + 0x47, 0x0a, 0x0b, 0x64, 0x6f, 0x77, 0x6e, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x18, 0x03, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, + 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, + 0x4c, 0x69, 0x6e, 0x65, 0x61, 0x67, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x0b, 0x64, 0x6f, 0x77, + 0x6e, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x12, 0x2b, 0x0a, 0x11, 0x6f, 0x76, 0x65, 0x72, + 0x77, 0x72, 0x69, 0x74, 0x65, 0x5f, 0x6c, 0x69, 0x6e, 0x65, 0x61, 0x67, 0x65, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x08, 0x52, 0x10, 0x6f, 0x76, 0x65, 0x72, 0x77, 0x72, 0x69, 0x74, 0x65, 0x4c, 0x69, + 0x6e, 0x65, 0x61, 0x67, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, + 0x6f, 0x6e, 0x6c, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x75, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x4f, 0x6e, 0x6c, 0x79, 0x1a, 0xdc, 0x03, 0x0a, 0x05, 0x41, 0x73, 0x73, 0x65, 0x74, + 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, + 0x72, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x3a, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, + 0x75, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x72, 0x03, 0xd0, 0x01, 0x01, 0x52, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x48, 0x0a, 0x0b, + 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, + 0x08, 0xfa, 0x42, 0x05, 0x72, 0x03, 0xd0, 0x01, 0x01, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, + 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2b, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x06, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, 0x04, 0x64, + 0x61, 0x74, 0x61, 0x12, 0x5b, 0x0a, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x18, 0x07, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x43, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x63, + 0x6f, 0x6d, 0x70, 0x61, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x55, + 0x70, 0x73, 0x65, 0x72, 0x74, 0x50, 0x61, 0x74, 0x63, 0x68, 0x41, 0x73, 0x73, 0x65, 0x74, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x41, 0x73, 0x73, 0x65, 0x74, 0x2e, 0x4c, 0x61, 0x62, + 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, + 0x12, 0x36, 0x0a, 0x06, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x1e, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6d, 0x70, + 0x61, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, + 0x52, 0x06, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x73, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, + 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6c, 0x1a, 0x39, 0x0a, 0x0b, 0x4c, 0x61, + 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 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, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x2a, 0x0a, 0x18, 0x55, 0x70, 0x73, 0x65, 0x72, 0x74, 0x50, + 0x61, 0x74, 0x63, 0x68, 0x41, 0x73, 0x73, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, + 0x64, 0x22, 0x24, 0x0a, 0x12, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x41, 0x73, 0x73, 0x65, 0x74, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x15, 0x0a, 0x13, 0x44, 0x65, 0x6c, 0x65, 0x74, + 0x65, 0x41, 0x73, 0x73, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x6d, + 0x0a, 0x19, 0x47, 0x65, 0x74, 0x41, 0x73, 0x73, 0x65, 0x74, 0x53, 0x74, 0x61, 0x72, 0x67, 0x61, + 0x7a, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1d, 0x0a, 0x04, 0x73, + 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x42, 0x09, 0xfa, 0x42, 0x06, 0x2a, 0x04, + 0x28, 0x00, 0x40, 0x01, 0x52, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x12, 0x21, 0x0a, 0x06, 0x6f, 0x66, + 0x66, 0x73, 0x65, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x42, 0x09, 0xfa, 0x42, 0x06, 0x2a, + 0x04, 0x28, 0x00, 0x40, 0x01, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x22, 0x50, 0x0a, + 0x1a, 0x47, 0x65, 0x74, 0x41, 0x73, 0x73, 0x65, 0x74, 0x53, 0x74, 0x61, 0x72, 0x67, 0x61, 0x7a, + 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x32, 0x0a, 0x04, 0x64, + 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x72, 0x61, 0x79, 0x73, + 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, + 0x71, 0x0a, 0x1d, 0x47, 0x65, 0x74, 0x41, 0x73, 0x73, 0x65, 0x74, 0x56, 0x65, 0x72, 0x73, 0x69, + 0x6f, 0x6e, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, + 0x12, 0x1d, 0x0a, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x42, 0x09, + 0xfa, 0x42, 0x06, 0x2a, 0x04, 0x28, 0x00, 0x40, 0x01, 0x52, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x12, + 0x21, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x42, + 0x09, 0xfa, 0x42, 0x06, 0x2a, 0x04, 0x28, 0x00, 0x40, 0x01, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, + 0x65, 0x74, 0x22, 0x55, 0x0a, 0x1e, 0x47, 0x65, 0x74, 0x41, 0x73, 0x73, 0x65, 0x74, 0x56, 0x65, + 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x33, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x63, 0x6f, + 0x6d, 0x70, 0x61, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x41, 0x73, + 0x73, 0x65, 0x74, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x44, 0x0a, 0x18, 0x47, 0x65, 0x74, + 0x41, 0x73, 0x73, 0x65, 0x74, 0x42, 0x79, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, + 0x50, 0x0a, 0x19, 0x47, 0x65, 0x74, 0x41, 0x73, 0x73, 0x65, 0x74, 0x42, 0x79, 0x56, 0x65, 0x72, + 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x33, 0x0a, 0x04, + 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x72, 0x61, 0x79, + 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x73, 0x73, 0x2e, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x41, 0x73, 0x73, 0x65, 0x74, 0x52, 0x04, 0x64, 0x61, 0x74, + 0x61, 0x22, 0xdd, 0x02, 0x0a, 0x17, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, 0x73, 0x73, 0x65, + 0x74, 0x50, 0x72, 0x6f, 0x62, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x24, 0x0a, + 0x09, 0x61, 0x73, 0x73, 0x65, 0x74, 0x5f, 0x75, 0x72, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x08, 0x61, 0x73, 0x73, 0x65, 0x74, + 0x55, 0x72, 0x6e, 0x12, 0x4d, 0x0a, 0x05, 0x70, 0x72, 0x6f, 0x62, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x37, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x63, 0x6f, + 0x6d, 0x70, 0x61, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x41, 0x73, 0x73, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x62, 0x65, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x50, 0x72, 0x6f, 0x62, 0x65, 0x52, 0x05, 0x70, 0x72, 0x6f, + 0x62, 0x65, 0x1a, 0xcc, 0x01, 0x0a, 0x05, 0x50, 0x72, 0x6f, 0x62, 0x65, 0x12, 0x1f, 0x0a, 0x06, + 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, + 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x23, 0x0a, + 0x0d, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x5f, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x61, 0x73, + 0x6f, 0x6e, 0x12, 0x33, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, 0x08, 0x6d, + 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x38, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, + 0x74, 0x61, 0x6d, 0x70, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, + 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, + 0x70, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, + 0x64, 0x22, 0x2a, 0x0a, 0x18, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, 0x73, 0x73, 0x65, 0x74, + 0x50, 0x72, 0x6f, 0x62, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x0e, 0x0a, + 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x78, 0x0a, + 0x1b, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x53, 0x74, 0x61, 0x72, 0x72, 0x65, 0x64, 0x41, + 0x73, 0x73, 0x65, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x17, 0x0a, 0x07, + 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, + 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0d, 0x42, 0x09, 0xfa, 0x42, 0x06, 0x2a, 0x04, 0x28, 0x00, 0x40, 0x01, 0x52, 0x04, + 0x73, 0x69, 0x7a, 0x65, 0x12, 0x21, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x0d, 0x42, 0x09, 0xfa, 0x42, 0x06, 0x2a, 0x04, 0x28, 0x00, 0x40, 0x01, 0x52, + 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x22, 0x53, 0x0a, 0x1c, 0x47, 0x65, 0x74, 0x55, 0x73, + 0x65, 0x72, 0x53, 0x74, 0x61, 0x72, 0x72, 0x65, 0x64, 0x41, 0x73, 0x73, 0x65, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x33, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x2e, 0x41, 0x73, 0x73, 0x65, 0x74, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x44, 0x0a, 0x18, - 0x47, 0x65, 0x74, 0x41, 0x73, 0x73, 0x65, 0x74, 0x42, 0x79, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, - 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, - 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, - 0x6f, 0x6e, 0x22, 0x50, 0x0a, 0x19, 0x47, 0x65, 0x74, 0x41, 0x73, 0x73, 0x65, 0x74, 0x42, 0x79, - 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x33, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, - 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x73, 0x73, - 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x41, 0x73, 0x73, 0x65, 0x74, 0x52, 0x04, - 0x64, 0x61, 0x74, 0x61, 0x22, 0xa9, 0x03, 0x0a, 0x17, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, - 0x73, 0x73, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x62, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x12, 0x24, 0x0a, 0x09, 0x61, 0x73, 0x73, 0x65, 0x74, 0x5f, 0x75, 0x72, 0x6e, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x08, 0x61, 0x73, - 0x73, 0x65, 0x74, 0x55, 0x72, 0x6e, 0x12, 0x4d, 0x0a, 0x05, 0x70, 0x72, 0x6f, 0x62, 0x65, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x37, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, - 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, 0x73, 0x73, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x62, - 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x50, 0x72, 0x6f, 0x62, 0x65, 0x52, 0x05, - 0x70, 0x72, 0x6f, 0x62, 0x65, 0x1a, 0x98, 0x02, 0x0a, 0x05, 0x50, 0x72, 0x6f, 0x62, 0x65, 0x12, - 0x2b, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, - 0x13, 0x92, 0x41, 0x09, 0xd2, 0x01, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0xfa, 0x42, 0x04, - 0x72, 0x02, 0x10, 0x01, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x23, 0x0a, 0x0d, - 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x5f, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x0c, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x61, 0x73, 0x6f, - 0x6e, 0x12, 0x33, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, 0x08, 0x6d, 0x65, - 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x38, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, - 0x61, 0x6d, 0x70, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, - 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, - 0x12, 0x4e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x42, 0x3e, 0x92, 0x41, - 0x3b, 0x32, 0x39, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x20, 0x70, 0x72, 0x6f, 0x62, - 0x65, 0x20, 0x49, 0x44, 0x2c, 0x20, 0x69, 0x66, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x70, 0x72, 0x6f, - 0x76, 0x69, 0x64, 0x65, 0x64, 0x20, 0x77, 0x69, 0x6c, 0x6c, 0x20, 0x62, 0x65, 0x20, 0x61, 0x75, - 0x74, 0x6f, 0x2d, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x52, 0x02, 0x69, 0x64, - 0x22, 0x2a, 0x0a, 0x18, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, 0x73, 0x73, 0x65, 0x74, 0x50, - 0x72, 0x6f, 0x62, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x0e, 0x0a, 0x02, - 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x78, 0x0a, 0x1b, - 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x53, 0x74, 0x61, 0x72, 0x72, 0x65, 0x64, 0x41, 0x73, - 0x73, 0x65, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x17, 0x0a, 0x07, 0x75, - 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, - 0x65, 0x72, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x0d, 0x42, 0x09, 0xfa, 0x42, 0x06, 0x2a, 0x04, 0x28, 0x00, 0x40, 0x01, 0x52, 0x04, 0x73, - 0x69, 0x7a, 0x65, 0x12, 0x21, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x0d, 0x42, 0x09, 0xfa, 0x42, 0x06, 0x2a, 0x04, 0x28, 0x00, 0x40, 0x01, 0x52, 0x06, - 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x22, 0x53, 0x0a, 0x1c, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, - 0x72, 0x53, 0x74, 0x61, 0x72, 0x72, 0x65, 0x64, 0x41, 0x73, 0x73, 0x65, 0x74, 0x73, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x33, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, - 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, - 0x41, 0x73, 0x73, 0x65, 0x74, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x5d, 0x0a, 0x19, 0x47, + 0x2e, 0x41, 0x73, 0x73, 0x65, 0x74, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x5d, 0x0a, 0x19, + 0x47, 0x65, 0x74, 0x4d, 0x79, 0x53, 0x74, 0x61, 0x72, 0x72, 0x65, 0x64, 0x41, 0x73, 0x73, 0x65, + 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x04, 0x73, 0x69, 0x7a, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x42, 0x09, 0xfa, 0x42, 0x06, 0x2a, 0x04, 0x28, 0x00, + 0x40, 0x01, 0x52, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x12, 0x21, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, + 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x42, 0x09, 0xfa, 0x42, 0x06, 0x2a, 0x04, 0x28, + 0x00, 0x40, 0x01, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x22, 0x51, 0x0a, 0x1a, 0x47, 0x65, 0x74, 0x4d, 0x79, 0x53, 0x74, 0x61, 0x72, 0x72, 0x65, 0x64, 0x41, 0x73, 0x73, 0x65, 0x74, - 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x04, 0x73, 0x69, 0x7a, 0x65, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x42, 0x09, 0xfa, 0x42, 0x06, 0x2a, 0x04, 0x28, 0x00, 0x40, - 0x01, 0x52, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x12, 0x21, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, - 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x42, 0x09, 0xfa, 0x42, 0x06, 0x2a, 0x04, 0x28, 0x00, - 0x40, 0x01, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x22, 0x51, 0x0a, 0x1a, 0x47, 0x65, - 0x74, 0x4d, 0x79, 0x53, 0x74, 0x61, 0x72, 0x72, 0x65, 0x64, 0x41, 0x73, 0x73, 0x65, 0x74, 0x73, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x33, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, - 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, - 0x6b, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0x2e, 0x41, 0x73, 0x73, 0x65, 0x74, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x35, 0x0a, - 0x18, 0x47, 0x65, 0x74, 0x4d, 0x79, 0x53, 0x74, 0x61, 0x72, 0x72, 0x65, 0x64, 0x41, 0x73, 0x73, - 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x61, 0x73, 0x73, - 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x73, 0x73, - 0x65, 0x74, 0x49, 0x64, 0x22, 0x50, 0x0a, 0x19, 0x47, 0x65, 0x74, 0x4d, 0x79, 0x53, 0x74, 0x61, - 0x72, 0x72, 0x65, 0x64, 0x41, 0x73, 0x73, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x33, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x1f, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x61, - 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x41, 0x73, 0x73, 0x65, 0x74, - 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x2d, 0x0a, 0x10, 0x53, 0x74, 0x61, 0x72, 0x41, 0x73, + 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x33, 0x0a, 0x04, 0x64, 0x61, 0x74, + 0x61, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, + 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x2e, 0x41, 0x73, 0x73, 0x65, 0x74, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x35, + 0x0a, 0x18, 0x47, 0x65, 0x74, 0x4d, 0x79, 0x53, 0x74, 0x61, 0x72, 0x72, 0x65, 0x64, 0x41, 0x73, 0x73, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x61, 0x73, 0x73, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x73, - 0x73, 0x65, 0x74, 0x49, 0x64, 0x22, 0x23, 0x0a, 0x11, 0x53, 0x74, 0x61, 0x72, 0x41, 0x73, 0x73, - 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x2f, 0x0a, 0x12, 0x55, 0x6e, - 0x73, 0x74, 0x61, 0x72, 0x41, 0x73, 0x73, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x12, 0x19, 0x0a, 0x08, 0x61, 0x73, 0x73, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x07, 0x61, 0x73, 0x73, 0x65, 0x74, 0x49, 0x64, 0x22, 0x15, 0x0a, 0x13, 0x55, - 0x6e, 0x73, 0x74, 0x61, 0x72, 0x41, 0x73, 0x73, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0xc3, 0x02, 0x0a, 0x17, 0x47, 0x65, 0x74, 0x4d, 0x79, 0x44, 0x69, 0x73, 0x63, - 0x75, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x20, - 0x0a, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x08, - 0xfa, 0x42, 0x05, 0x72, 0x03, 0xd0, 0x01, 0x01, 0x52, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, - 0x12, 0x1c, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x08, - 0xfa, 0x42, 0x05, 0x72, 0x03, 0xd0, 0x01, 0x01, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x1e, - 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x08, 0xfa, - 0x42, 0x05, 0x72, 0x03, 0xd0, 0x01, 0x01, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x1e, - 0x0a, 0x05, 0x61, 0x73, 0x73, 0x65, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x08, 0xfa, - 0x42, 0x05, 0x72, 0x03, 0xd0, 0x01, 0x01, 0x52, 0x05, 0x61, 0x73, 0x73, 0x65, 0x74, 0x12, 0x20, - 0x0a, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x42, 0x08, - 0xfa, 0x42, 0x05, 0x72, 0x03, 0xd0, 0x01, 0x01, 0x52, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, - 0x12, 0x1c, 0x0a, 0x04, 0x73, 0x6f, 0x72, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x42, 0x08, - 0xfa, 0x42, 0x05, 0x72, 0x03, 0xd0, 0x01, 0x01, 0x52, 0x04, 0x73, 0x6f, 0x72, 0x74, 0x12, 0x26, - 0x0a, 0x09, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x07, 0x20, 0x01, 0x28, - 0x09, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x72, 0x03, 0xd0, 0x01, 0x01, 0x52, 0x09, 0x64, 0x69, 0x72, - 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1d, 0x0a, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x08, - 0x20, 0x01, 0x28, 0x0d, 0x42, 0x09, 0xfa, 0x42, 0x06, 0x2a, 0x04, 0x28, 0x00, 0x40, 0x01, 0x52, - 0x04, 0x73, 0x69, 0x7a, 0x65, 0x12, 0x21, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, - 0x09, 0x20, 0x01, 0x28, 0x0d, 0x42, 0x09, 0xfa, 0x42, 0x06, 0x2a, 0x04, 0x28, 0x00, 0x40, 0x01, - 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x22, 0x54, 0x0a, 0x18, 0x47, 0x65, 0x74, 0x4d, - 0x79, 0x44, 0x69, 0x73, 0x63, 0x75, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x38, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x63, 0x6f, - 0x6d, 0x70, 0x61, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x44, 0x69, - 0x73, 0x63, 0x75, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0xe8, - 0x02, 0x0a, 0x15, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x61, 0x67, 0x41, 0x73, 0x73, 0x65, - 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x61, 0x73, 0x73, 0x65, - 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x73, 0x73, 0x65, - 0x74, 0x49, 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x5f, - 0x75, 0x72, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x74, 0x65, 0x6d, 0x70, 0x6c, - 0x61, 0x74, 0x65, 0x55, 0x72, 0x6e, 0x12, 0x41, 0x0a, 0x0a, 0x74, 0x61, 0x67, 0x5f, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x72, 0x61, 0x79, - 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x73, 0x73, 0x2e, 0x76, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x54, 0x61, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x09, - 0x74, 0x61, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x32, 0x0a, 0x15, 0x74, 0x65, 0x6d, - 0x70, 0x6c, 0x61, 0x74, 0x65, 0x5f, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x5f, 0x6e, 0x61, - 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x13, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, - 0x74, 0x65, 0x44, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x31, 0x0a, - 0x14, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x5f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, - 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x13, 0x74, 0x65, 0x6d, - 0x70, 0x6c, 0x61, 0x74, 0x65, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, - 0x3a, 0x67, 0x92, 0x41, 0x64, 0x0a, 0x62, 0x2a, 0x15, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, - 0x61, 0x67, 0x41, 0x73, 0x73, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x32, 0x22, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x20, 0x74, 0x6f, 0x20, 0x62, 0x65, 0x20, 0x73, 0x65, - 0x6e, 0x74, 0x20, 0x74, 0x6f, 0x20, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x20, 0x61, 0x20, 0x74, - 0x61, 0x67, 0xd2, 0x01, 0x08, 0x61, 0x73, 0x73, 0x65, 0x74, 0x5f, 0x69, 0x64, 0xd2, 0x01, 0x0c, - 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x5f, 0x75, 0x72, 0x6e, 0xd2, 0x01, 0x0a, 0x74, - 0x61, 0x67, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x22, 0x4b, 0x0a, 0x16, 0x43, 0x72, 0x65, - 0x61, 0x74, 0x65, 0x54, 0x61, 0x67, 0x41, 0x73, 0x73, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x31, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x1d, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6d, - 0x70, 0x61, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x54, 0x61, 0x67, - 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x5f, 0x0a, 0x1f, 0x47, 0x65, 0x74, 0x54, 0x61, 0x67, - 0x42, 0x79, 0x41, 0x73, 0x73, 0x65, 0x74, 0x41, 0x6e, 0x64, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, - 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x61, 0x73, 0x73, + 0x73, 0x65, 0x74, 0x49, 0x64, 0x22, 0x50, 0x0a, 0x19, 0x47, 0x65, 0x74, 0x4d, 0x79, 0x53, 0x74, + 0x61, 0x72, 0x72, 0x65, 0x64, 0x41, 0x73, 0x73, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x33, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1f, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6d, 0x70, + 0x61, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x41, 0x73, 0x73, 0x65, + 0x74, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x2d, 0x0a, 0x10, 0x53, 0x74, 0x61, 0x72, 0x41, + 0x73, 0x73, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x61, + 0x73, 0x73, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, + 0x73, 0x73, 0x65, 0x74, 0x49, 0x64, 0x22, 0x23, 0x0a, 0x11, 0x53, 0x74, 0x61, 0x72, 0x41, 0x73, + 0x73, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x2f, 0x0a, 0x12, 0x55, + 0x6e, 0x73, 0x74, 0x61, 0x72, 0x41, 0x73, 0x73, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x19, 0x0a, 0x08, 0x61, 0x73, 0x73, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x73, 0x73, 0x65, 0x74, 0x49, 0x64, 0x22, 0x15, 0x0a, 0x13, + 0x55, 0x6e, 0x73, 0x74, 0x61, 0x72, 0x41, 0x73, 0x73, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0xc3, 0x02, 0x0a, 0x17, 0x47, 0x65, 0x74, 0x4d, 0x79, 0x44, 0x69, 0x73, + 0x63, 0x75, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x20, 0x0a, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, + 0x08, 0xfa, 0x42, 0x05, 0x72, 0x03, 0xd0, 0x01, 0x01, 0x52, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, + 0x72, 0x12, 0x1c, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, + 0x08, 0xfa, 0x42, 0x05, 0x72, 0x03, 0xd0, 0x01, 0x01, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, + 0x1e, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x08, + 0xfa, 0x42, 0x05, 0x72, 0x03, 0xd0, 0x01, 0x01, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, + 0x1e, 0x0a, 0x05, 0x61, 0x73, 0x73, 0x65, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x08, + 0xfa, 0x42, 0x05, 0x72, 0x03, 0xd0, 0x01, 0x01, 0x52, 0x05, 0x61, 0x73, 0x73, 0x65, 0x74, 0x12, + 0x20, 0x0a, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x42, + 0x08, 0xfa, 0x42, 0x05, 0x72, 0x03, 0xd0, 0x01, 0x01, 0x52, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, + 0x73, 0x12, 0x1c, 0x0a, 0x04, 0x73, 0x6f, 0x72, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x42, + 0x08, 0xfa, 0x42, 0x05, 0x72, 0x03, 0xd0, 0x01, 0x01, 0x52, 0x04, 0x73, 0x6f, 0x72, 0x74, 0x12, + 0x26, 0x0a, 0x09, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x07, 0x20, 0x01, + 0x28, 0x09, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x72, 0x03, 0xd0, 0x01, 0x01, 0x52, 0x09, 0x64, 0x69, + 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1d, 0x0a, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x18, + 0x08, 0x20, 0x01, 0x28, 0x0d, 0x42, 0x09, 0xfa, 0x42, 0x06, 0x2a, 0x04, 0x28, 0x00, 0x40, 0x01, + 0x52, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x12, 0x21, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, + 0x18, 0x09, 0x20, 0x01, 0x28, 0x0d, 0x42, 0x09, 0xfa, 0x42, 0x06, 0x2a, 0x04, 0x28, 0x00, 0x40, + 0x01, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x22, 0x54, 0x0a, 0x18, 0x47, 0x65, 0x74, + 0x4d, 0x79, 0x44, 0x69, 0x73, 0x63, 0x75, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x38, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x63, + 0x6f, 0x6d, 0x70, 0x61, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x44, + 0x69, 0x73, 0x63, 0x75, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, + 0xff, 0x01, 0x0a, 0x15, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x61, 0x67, 0x41, 0x73, 0x73, + 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x61, 0x73, 0x73, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x73, 0x73, 0x65, 0x74, 0x49, 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, - 0x5f, 0x75, 0x72, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x74, 0x65, 0x6d, 0x70, - 0x6c, 0x61, 0x74, 0x65, 0x55, 0x72, 0x6e, 0x22, 0x55, 0x0a, 0x20, 0x47, 0x65, 0x74, 0x54, 0x61, - 0x67, 0x42, 0x79, 0x41, 0x73, 0x73, 0x65, 0x74, 0x41, 0x6e, 0x64, 0x54, 0x65, 0x6d, 0x70, 0x6c, - 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x31, 0x0a, 0x04, 0x64, - 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x72, 0x61, 0x79, 0x73, - 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x2e, 0x54, 0x61, 0x67, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0xe0, - 0x02, 0x0a, 0x15, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x61, 0x67, 0x41, 0x73, 0x73, 0x65, - 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x61, 0x73, 0x73, 0x65, - 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x73, 0x73, 0x65, - 0x74, 0x49, 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x5f, - 0x75, 0x72, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x74, 0x65, 0x6d, 0x70, 0x6c, - 0x61, 0x74, 0x65, 0x55, 0x72, 0x6e, 0x12, 0x41, 0x0a, 0x0a, 0x74, 0x61, 0x67, 0x5f, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x72, 0x61, 0x79, - 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x73, 0x73, 0x2e, 0x76, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x54, 0x61, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x09, - 0x74, 0x61, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x32, 0x0a, 0x15, 0x74, 0x65, 0x6d, - 0x70, 0x6c, 0x61, 0x74, 0x65, 0x5f, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x5f, 0x6e, 0x61, - 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x13, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, - 0x74, 0x65, 0x44, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x31, 0x0a, - 0x14, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x5f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, - 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x13, 0x74, 0x65, 0x6d, - 0x70, 0x6c, 0x61, 0x74, 0x65, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, - 0x3a, 0x5f, 0x92, 0x41, 0x5c, 0x0a, 0x5a, 0x2a, 0x15, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, - 0x61, 0x67, 0x41, 0x73, 0x73, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x32, 0x29, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x20, 0x74, 0x6f, 0x20, 0x62, 0x65, 0x20, 0x73, 0x65, - 0x6e, 0x74, 0x20, 0x74, 0x6f, 0x20, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x20, 0x61, 0x6e, 0x20, - 0x61, 0x73, 0x73, 0x65, 0x74, 0x20, 0x74, 0x61, 0x67, 0xd2, 0x01, 0x08, 0x61, 0x73, 0x73, 0x65, - 0x74, 0x5f, 0x69, 0x64, 0xd2, 0x01, 0x0a, 0x74, 0x61, 0x67, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x73, 0x22, 0x4b, 0x0a, 0x16, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x61, 0x67, 0x41, 0x73, + 0x5f, 0x75, 0x72, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x74, 0x65, 0x6d, 0x70, + 0x6c, 0x61, 0x74, 0x65, 0x55, 0x72, 0x6e, 0x12, 0x41, 0x0a, 0x0a, 0x74, 0x61, 0x67, 0x5f, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x72, 0x61, + 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x73, 0x73, 0x2e, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x54, 0x61, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, + 0x09, 0x74, 0x61, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x32, 0x0a, 0x15, 0x74, 0x65, + 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x5f, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x5f, 0x6e, + 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x13, 0x74, 0x65, 0x6d, 0x70, 0x6c, + 0x61, 0x74, 0x65, 0x44, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x31, + 0x0a, 0x14, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x5f, 0x64, 0x65, 0x73, 0x63, 0x72, + 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x13, 0x74, 0x65, + 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, + 0x6e, 0x22, 0x4b, 0x0a, 0x16, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x61, 0x67, 0x41, 0x73, 0x73, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x31, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x2e, 0x54, 0x61, 0x67, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x55, - 0x0a, 0x15, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x54, 0x61, 0x67, 0x41, 0x73, 0x73, 0x65, 0x74, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x61, 0x73, 0x73, 0x65, 0x74, - 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x73, 0x73, 0x65, 0x74, - 0x49, 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x5f, 0x75, - 0x72, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, - 0x74, 0x65, 0x55, 0x72, 0x6e, 0x22, 0x18, 0x0a, 0x16, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x54, - 0x61, 0x67, 0x41, 0x73, 0x73, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x35, 0x0a, 0x18, 0x47, 0x65, 0x74, 0x41, 0x6c, 0x6c, 0x54, 0x61, 0x67, 0x73, 0x42, 0x79, 0x41, - 0x73, 0x73, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x61, - 0x73, 0x73, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, - 0x73, 0x73, 0x65, 0x74, 0x49, 0x64, 0x22, 0x4e, 0x0a, 0x19, 0x47, 0x65, 0x74, 0x41, 0x6c, 0x6c, - 0x54, 0x61, 0x67, 0x73, 0x42, 0x79, 0x41, 0x73, 0x73, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x31, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x03, 0x28, + 0x65, 0x74, 0x61, 0x31, 0x2e, 0x54, 0x61, 0x67, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x5f, + 0x0a, 0x1f, 0x47, 0x65, 0x74, 0x54, 0x61, 0x67, 0x42, 0x79, 0x41, 0x73, 0x73, 0x65, 0x74, 0x41, + 0x6e, 0x64, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x19, 0x0a, 0x08, 0x61, 0x73, 0x73, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x73, 0x73, 0x65, 0x74, 0x49, 0x64, 0x12, 0x21, 0x0a, 0x0c, + 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x5f, 0x75, 0x72, 0x6e, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0b, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x55, 0x72, 0x6e, 0x22, + 0x55, 0x0a, 0x20, 0x47, 0x65, 0x74, 0x54, 0x61, 0x67, 0x42, 0x79, 0x41, 0x73, 0x73, 0x65, 0x74, + 0x41, 0x6e, 0x64, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x31, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x54, 0x61, 0x67, - 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x2d, 0x0a, 0x19, 0x47, 0x65, 0x74, 0x41, 0x6c, 0x6c, - 0x54, 0x61, 0x67, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x03, 0x75, 0x72, 0x6e, 0x22, 0x57, 0x0a, 0x1a, 0x47, 0x65, 0x74, 0x41, 0x6c, 0x6c, 0x54, - 0x61, 0x67, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x39, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x25, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6d, - 0x70, 0x61, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x54, 0x61, 0x67, - 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0xb5, - 0x02, 0x0a, 0x18, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x61, 0x67, 0x54, 0x65, 0x6d, 0x70, - 0x6c, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x75, - 0x72, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6e, 0x12, 0x21, 0x0a, - 0x0c, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x4e, 0x61, 0x6d, 0x65, - 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, - 0x6f, 0x6e, 0x12, 0x42, 0x0a, 0x06, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x18, 0x04, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x63, 0x6f, - 0x6d, 0x70, 0x61, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x54, 0x61, - 0x67, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x52, 0x06, - 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x3a, 0x7e, 0x92, 0x41, 0x7b, 0x0a, 0x79, 0x2a, 0x18, 0x43, - 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x61, 0x67, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x32, 0x2d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x20, 0x74, 0x6f, 0x20, 0x62, 0x65, 0x20, 0x73, 0x65, 0x6e, 0x74, 0x20, 0x74, 0x6f, 0x20, 0x63, - 0x72, 0x65, 0x61, 0x74, 0x65, 0x20, 0x61, 0x20, 0x74, 0x61, 0x67, 0x27, 0x73, 0x20, 0x74, 0x65, - 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0xd2, 0x01, 0x03, 0x75, 0x72, 0x6e, 0xd2, 0x01, 0x0c, 0x64, - 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0xd2, 0x01, 0x0b, 0x64, 0x65, - 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0xd2, 0x01, 0x0a, 0x74, 0x61, 0x67, 0x5f, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x22, 0x56, 0x0a, 0x19, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, - 0x54, 0x61, 0x67, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x39, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x25, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6d, - 0x70, 0x61, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x54, 0x61, 0x67, - 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x3a, - 0x0a, 0x15, 0x47, 0x65, 0x74, 0x54, 0x61, 0x67, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x74, 0x65, 0x6d, 0x70, 0x6c, - 0x61, 0x74, 0x65, 0x5f, 0x75, 0x72, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x74, - 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x55, 0x72, 0x6e, 0x22, 0x53, 0x0a, 0x16, 0x47, 0x65, - 0x74, 0x54, 0x61, 0x67, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x39, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x63, 0x6f, + 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0xff, 0x01, 0x0a, 0x15, 0x55, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x54, 0x61, 0x67, 0x41, 0x73, 0x73, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x19, 0x0a, 0x08, 0x61, 0x73, 0x73, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x07, 0x61, 0x73, 0x73, 0x65, 0x74, 0x49, 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x74, + 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x5f, 0x75, 0x72, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0b, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x55, 0x72, 0x6e, 0x12, 0x41, + 0x0a, 0x0a, 0x74, 0x61, 0x67, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x54, 0x61, - 0x67, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, - 0xcd, 0x02, 0x0a, 0x18, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x61, 0x67, 0x54, 0x65, 0x6d, - 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x21, 0x0a, 0x0c, - 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x5f, 0x75, 0x72, 0x6e, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x0b, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x55, 0x72, 0x6e, 0x12, - 0x21, 0x0a, 0x0c, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x4e, 0x61, - 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, - 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, - 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x42, 0x0a, 0x06, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x18, 0x04, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, - 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, - 0x54, 0x61, 0x67, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x46, 0x69, 0x65, 0x6c, 0x64, - 0x52, 0x06, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x3a, 0x84, 0x01, 0x92, 0x41, 0x80, 0x01, 0x0a, - 0x7e, 0x2a, 0x18, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x61, 0x67, 0x54, 0x65, 0x6d, 0x70, - 0x6c, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x32, 0x2d, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x20, 0x74, 0x6f, 0x20, 0x62, 0x65, 0x20, 0x73, 0x65, 0x6e, 0x74, 0x20, - 0x74, 0x6f, 0x20, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x20, 0x61, 0x20, 0x74, 0x61, 0x67, 0x27, - 0x73, 0x20, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0xd2, 0x01, 0x0c, 0x74, 0x65, 0x6d, - 0x70, 0x6c, 0x61, 0x74, 0x65, 0x5f, 0x75, 0x72, 0x6e, 0xd2, 0x01, 0x0c, 0x64, 0x69, 0x73, 0x70, - 0x6c, 0x61, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0xd2, 0x01, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, - 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0xd2, 0x01, 0x06, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x22, + 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x09, 0x74, 0x61, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, + 0x73, 0x12, 0x32, 0x0a, 0x15, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x5f, 0x64, 0x69, + 0x73, 0x70, 0x6c, 0x61, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x13, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x44, 0x69, 0x73, 0x70, 0x6c, 0x61, + 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x31, 0x0a, 0x14, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, + 0x65, 0x5f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x13, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x44, 0x65, 0x73, + 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x4b, 0x0a, 0x16, 0x55, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x54, 0x61, 0x67, 0x41, 0x73, 0x73, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x31, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1d, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6d, 0x70, + 0x61, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x54, 0x61, 0x67, 0x52, + 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x55, 0x0a, 0x15, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x54, + 0x61, 0x67, 0x41, 0x73, 0x73, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x19, + 0x0a, 0x08, 0x61, 0x73, 0x73, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x07, 0x61, 0x73, 0x73, 0x65, 0x74, 0x49, 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x74, 0x65, 0x6d, + 0x70, 0x6c, 0x61, 0x74, 0x65, 0x5f, 0x75, 0x72, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0b, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x55, 0x72, 0x6e, 0x22, 0x18, 0x0a, 0x16, + 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x54, 0x61, 0x67, 0x41, 0x73, 0x73, 0x65, 0x74, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x35, 0x0a, 0x18, 0x47, 0x65, 0x74, 0x41, 0x6c, 0x6c, + 0x54, 0x61, 0x67, 0x73, 0x42, 0x79, 0x41, 0x73, 0x73, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x61, 0x73, 0x73, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x73, 0x73, 0x65, 0x74, 0x49, 0x64, 0x22, 0x4e, 0x0a, + 0x19, 0x47, 0x65, 0x74, 0x41, 0x6c, 0x6c, 0x54, 0x61, 0x67, 0x73, 0x42, 0x79, 0x41, 0x73, 0x73, + 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x31, 0x0a, 0x04, 0x64, 0x61, + 0x74, 0x61, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, + 0x61, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x2e, 0x54, 0x61, 0x67, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x2d, 0x0a, + 0x19, 0x47, 0x65, 0x74, 0x41, 0x6c, 0x6c, 0x54, 0x61, 0x67, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, + 0x74, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, + 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6e, 0x22, 0x57, 0x0a, 0x1a, + 0x47, 0x65, 0x74, 0x41, 0x6c, 0x6c, 0x54, 0x61, 0x67, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, + 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x39, 0x0a, 0x04, 0x64, 0x61, + 0x74, 0x61, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, + 0x61, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x2e, 0x54, 0x61, 0x67, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, + 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0xb5, 0x01, 0x0a, 0x18, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x54, 0x61, 0x67, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x03, 0x75, 0x72, 0x6e, 0x12, 0x21, 0x0a, 0x0c, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x5f, + 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x69, 0x73, 0x70, + 0x6c, 0x61, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, + 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, + 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x42, 0x0a, 0x06, 0x66, 0x69, 0x65, + 0x6c, 0x64, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x72, 0x61, 0x79, 0x73, + 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x2e, 0x54, 0x61, 0x67, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, + 0x46, 0x69, 0x65, 0x6c, 0x64, 0x52, 0x06, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x22, 0x56, 0x0a, + 0x19, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x61, 0x67, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, + 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x39, 0x0a, 0x04, 0x64, 0x61, + 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, + 0x61, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x2e, 0x54, 0x61, 0x67, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, + 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x3a, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x54, 0x61, 0x67, 0x54, + 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x21, + 0x0a, 0x0c, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x5f, 0x75, 0x72, 0x6e, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x55, 0x72, + 0x6e, 0x22, 0x53, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x54, 0x61, 0x67, 0x54, 0x65, 0x6d, 0x70, 0x6c, + 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x39, 0x0a, 0x04, 0x64, + 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x72, 0x61, 0x79, 0x73, + 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x2e, 0x54, 0x61, 0x67, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, + 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0xc6, 0x01, 0x0a, 0x18, 0x55, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x54, 0x61, 0x67, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x5f, + 0x75, 0x72, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x74, 0x65, 0x6d, 0x70, 0x6c, + 0x61, 0x74, 0x65, 0x55, 0x72, 0x6e, 0x12, 0x21, 0x0a, 0x0c, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, + 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x69, + 0x73, 0x70, 0x6c, 0x61, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, + 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, + 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x42, 0x0a, 0x06, 0x66, + 0x69, 0x65, 0x6c, 0x64, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x72, 0x61, + 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x73, 0x73, 0x2e, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x54, 0x61, 0x67, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, + 0x74, 0x65, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x52, 0x06, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x22, 0x56, 0x0a, 0x19, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x61, 0x67, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x39, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x72, 0x61, 0x79, @@ -7578,1030 +7405,619 @@ var file_raystack_compass_v1beta1_service_proto_rawDesc = []byte{ 0x75, 0x72, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x55, 0x72, 0x6e, 0x22, 0x1b, 0x0a, 0x19, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x54, 0x61, 0x67, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0xfc, 0x01, 0x0a, 0x16, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4e, 0x61, - 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x46, - 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x36, 0x92, 0x41, 0x33, 0x32, - 0x31, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x2c, 0x20, 0x69, 0x66, 0x20, 0x6e, 0x6f, - 0x74, 0x20, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x20, 0x77, 0x69, 0x6c, 0x6c, - 0x20, 0x62, 0x65, 0x20, 0x61, 0x75, 0x74, 0x6f, 0x20, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, - 0x65, 0x64, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1b, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x03, 0x52, 0x04, 0x6e, - 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x67, 0x0a, 0x08, 0x6d, 0x65, 0x74, - 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, - 0x72, 0x75, 0x63, 0x74, 0x42, 0x32, 0x92, 0x41, 0x2f, 0x32, 0x2d, 0x6b, 0x65, 0x79, 0x20, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x20, 0x70, 0x61, 0x69, 0x72, 0x73, 0x20, 0x61, 0x73, 0x20, 0x6d, 0x65, - 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6e, - 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, - 0x74, 0x61, 0x22, 0x29, 0x0a, 0x17, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4e, 0x61, 0x6d, 0x65, - 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x0e, 0x0a, - 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x43, 0x0a, - 0x13, 0x47, 0x65, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x12, 0x2c, 0x0a, 0x03, 0x75, 0x72, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x42, 0x1a, 0x92, 0x41, 0x17, 0x32, 0x15, 0x73, 0x65, 0x74, 0x20, 0x65, 0x69, 0x74, 0x68, - 0x65, 0x72, 0x20, 0x69, 0x64, 0x20, 0x6f, 0x72, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x52, 0x03, 0x75, - 0x72, 0x6e, 0x22, 0x59, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, - 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x41, 0x0a, 0x09, 0x6e, 0x61, - 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, - 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x73, 0x73, - 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, - 0x63, 0x65, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x22, 0xc5, 0x01, - 0x0a, 0x16, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, - 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2c, 0x0a, 0x03, 0x75, 0x72, 0x6e, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x1a, 0x92, 0x41, 0x17, 0x32, 0x15, 0x73, 0x65, 0x74, 0x20, - 0x65, 0x69, 0x74, 0x68, 0x65, 0x72, 0x20, 0x69, 0x64, 0x20, 0x6f, 0x72, 0x20, 0x6e, 0x61, 0x6d, - 0x65, 0x52, 0x03, 0x75, 0x72, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x67, 0x0a, 0x08, - 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x42, 0x32, 0x92, 0x41, 0x2f, 0x32, 0x2d, 0x6b, 0x65, - 0x79, 0x20, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x70, 0x61, 0x69, 0x72, 0x73, 0x20, 0x61, 0x73, - 0x20, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x74, 0x68, - 0x65, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x08, 0x6d, 0x65, 0x74, - 0x61, 0x64, 0x61, 0x74, 0x61, 0x22, 0x19, 0x0a, 0x17, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4e, - 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x17, 0x0a, 0x15, 0x4c, 0x69, 0x73, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, - 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x5d, 0x0a, 0x16, 0x4c, 0x69, 0x73, - 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x43, 0x0a, 0x0a, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, - 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, - 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x0a, 0x6e, 0x61, - 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x22, 0xdf, 0x01, 0x0a, 0x04, 0x55, 0x73, 0x65, - 0x72, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, - 0x64, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x04, 0x75, 0x75, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x1a, 0x0a, 0x08, 0x70, - 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, - 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x12, 0x39, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, - 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, - 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, - 0x41, 0x74, 0x12, 0x39, 0x0a, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, - 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, - 0x6d, 0x70, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x3a, 0x0b, 0x92, - 0x41, 0x08, 0x0a, 0x06, 0x2a, 0x04, 0x55, 0x73, 0x65, 0x72, 0x22, 0x93, 0x01, 0x0a, 0x06, 0x43, - 0x68, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, - 0x68, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x2a, 0x0a, - 0x04, 0x66, 0x72, 0x6f, 0x6d, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x56, 0x61, - 0x6c, 0x75, 0x65, 0x52, 0x04, 0x66, 0x72, 0x6f, 0x6d, 0x12, 0x26, 0x0a, 0x02, 0x74, 0x6f, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x02, 0x74, - 0x6f, 0x3a, 0x0d, 0x92, 0x41, 0x0a, 0x0a, 0x08, 0x2a, 0x06, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, - 0x22, 0xf9, 0x05, 0x0a, 0x05, 0x41, 0x73, 0x73, 0x65, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, - 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6e, 0x12, 0x12, 0x0a, 0x04, - 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, - 0x12, 0x18, 0x0a, 0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, - 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x20, - 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x06, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, - 0x12, 0x2b, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x43, 0x0a, - 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2b, 0x2e, - 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x73, 0x73, - 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x41, 0x73, 0x73, 0x65, 0x74, 0x2e, 0x4c, - 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x06, 0x6c, 0x61, 0x62, 0x65, - 0x6c, 0x73, 0x12, 0x36, 0x0a, 0x06, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x73, 0x18, 0x09, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x63, 0x6f, - 0x6d, 0x70, 0x61, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x55, 0x73, - 0x65, 0x72, 0x52, 0x06, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, - 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, - 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x3d, 0x0a, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, - 0x62, 0x79, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, - 0x61, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, - 0x64, 0x42, 0x79, 0x12, 0x3e, 0x0a, 0x09, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x6c, 0x6f, 0x67, - 0x18, 0x0c, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, - 0x6b, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x09, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, - 0x6c, 0x6f, 0x67, 0x12, 0x39, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, - 0x74, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, - 0x61, 0x6d, 0x70, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x39, - 0x0a, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x0e, 0x20, 0x01, + 0x6e, 0x73, 0x65, 0x22, 0x90, 0x01, 0x0a, 0x16, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4e, 0x61, + 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, + 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1b, + 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, + 0x04, 0x72, 0x02, 0x10, 0x03, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, + 0x74, 0x61, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, + 0x65, 0x12, 0x33, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, 0x08, 0x6d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x22, 0x29, 0x0a, 0x17, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, + 0x64, 0x22, 0x27, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, + 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6e, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6e, 0x22, 0x59, 0x0a, 0x14, 0x47, 0x65, + 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x41, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, + 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, + 0x73, 0x70, 0x61, 0x63, 0x65, 0x22, 0x75, 0x0a, 0x16, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4e, + 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, + 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x33, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, + 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, + 0x63, 0x74, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x22, 0x19, 0x0a, 0x17, + 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x17, 0x0a, 0x15, 0x4c, 0x69, 0x73, 0x74, 0x4e, + 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x22, 0x5d, 0x0a, 0x16, 0x4c, 0x69, 0x73, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, + 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x43, 0x0a, 0x0a, 0x6e, 0x61, + 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, + 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x73, + 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, + 0x61, 0x63, 0x65, 0x52, 0x0a, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x22, + 0xd2, 0x01, 0x0a, 0x04, 0x55, 0x73, 0x65, 0x72, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x75, 0x69, 0x64, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x75, 0x75, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, + 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x6d, 0x61, + 0x69, 0x6c, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x12, 0x39, + 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, - 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, - 0x18, 0x0f, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6c, 0x12, 0x37, 0x0a, 0x06, 0x70, - 0x72, 0x6f, 0x62, 0x65, 0x73, 0x18, 0x10, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x72, 0x61, - 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x73, 0x73, 0x2e, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x62, 0x65, 0x52, 0x06, 0x70, 0x72, - 0x6f, 0x62, 0x65, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x69, 0x73, 0x5f, 0x64, 0x65, 0x6c, 0x65, 0x74, - 0x65, 0x64, 0x18, 0x11, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x69, 0x73, 0x44, 0x65, 0x6c, 0x65, - 0x74, 0x65, 0x64, 0x1a, 0x39, 0x0a, 0x0b, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, - 0x72, 0x79, 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, 0x3a, 0x02, 0x38, 0x01, 0x3a, 0x0c, - 0x92, 0x41, 0x09, 0x0a, 0x07, 0x2a, 0x05, 0x41, 0x73, 0x73, 0x65, 0x74, 0x22, 0xa9, 0x02, 0x0a, - 0x05, 0x50, 0x72, 0x6f, 0x62, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x61, 0x73, 0x73, 0x65, 0x74, 0x5f, - 0x75, 0x72, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x61, 0x73, 0x73, 0x65, 0x74, - 0x55, 0x72, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x23, 0x0a, 0x0d, 0x73, - 0x74, 0x61, 0x74, 0x75, 0x73, 0x5f, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x0c, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, - 0x12, 0x33, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x05, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, 0x08, 0x6d, 0x65, 0x74, - 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x38, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, - 0x6d, 0x70, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, - 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, - 0x39, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x07, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, - 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x3a, 0x0c, 0x92, 0x41, 0x09, 0x0a, - 0x07, 0x2a, 0x05, 0x50, 0x72, 0x6f, 0x62, 0x65, 0x22, 0xfd, 0x02, 0x0a, 0x0a, 0x44, 0x69, 0x73, - 0x63, 0x75, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x12, 0x12, 0x0a, - 0x04, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x62, 0x6f, 0x64, - 0x79, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x05, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x6c, - 0x61, 0x62, 0x65, 0x6c, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x6c, 0x61, 0x62, - 0x65, 0x6c, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x18, 0x07, 0x20, - 0x03, 0x28, 0x09, 0x52, 0x06, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x61, - 0x73, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x65, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, - 0x61, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x65, 0x73, 0x12, 0x34, 0x0a, 0x05, 0x6f, 0x77, 0x6e, - 0x65, 0x72, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, + 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x39, 0x0a, 0x0a, 0x75, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x64, 0x41, 0x74, 0x22, 0x84, 0x01, 0x0a, 0x06, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x12, + 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, + 0x79, 0x70, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x02, 0x20, 0x03, 0x28, + 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x2a, 0x0a, 0x04, 0x66, 0x72, 0x6f, 0x6d, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x04, 0x66, + 0x72, 0x6f, 0x6d, 0x12, 0x26, 0x0a, 0x02, 0x74, 0x6f, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x02, 0x74, 0x6f, 0x22, 0xeb, 0x05, 0x0a, 0x05, + 0x41, 0x73, 0x73, 0x65, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6e, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x73, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, + 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, + 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2b, 0x0a, 0x04, 0x64, + 0x61, 0x74, 0x61, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, + 0x63, 0x74, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x43, 0x0a, 0x06, 0x6c, 0x61, 0x62, 0x65, + 0x6c, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x12, - 0x39, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x0a, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, - 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x39, 0x0a, 0x0a, 0x75, 0x70, - 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, - 0x74, 0x65, 0x64, 0x41, 0x74, 0x3a, 0x11, 0x92, 0x41, 0x0e, 0x0a, 0x0c, 0x2a, 0x0a, 0x44, 0x69, - 0x73, 0x63, 0x75, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0xcd, 0x02, 0x0a, 0x07, 0x43, 0x6f, 0x6d, - 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x02, 0x69, 0x64, 0x12, 0x23, 0x0a, 0x0d, 0x64, 0x69, 0x73, 0x63, 0x75, 0x73, 0x73, 0x69, - 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x64, 0x69, 0x73, - 0x63, 0x75, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x62, 0x6f, 0x64, - 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x12, 0x34, 0x0a, - 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x72, - 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x73, 0x73, 0x2e, - 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x05, 0x6f, 0x77, - 0x6e, 0x65, 0x72, 0x12, 0x3d, 0x0a, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x62, - 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, - 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, - 0x42, 0x79, 0x12, 0x39, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, - 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, - 0x6d, 0x70, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x39, 0x0a, - 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x75, - 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x3a, 0x0e, 0x92, 0x41, 0x0b, 0x0a, 0x09, 0x2a, - 0x07, 0x43, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x22, 0x7e, 0x0a, 0x0b, 0x4c, 0x69, 0x6e, 0x65, - 0x61, 0x67, 0x65, 0x45, 0x64, 0x67, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, - 0x16, 0x0a, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x12, 0x2b, 0x0a, 0x04, 0x70, 0x72, 0x6f, 0x70, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, 0x04, - 0x70, 0x72, 0x6f, 0x70, 0x3a, 0x12, 0x92, 0x41, 0x0f, 0x0a, 0x0d, 0x2a, 0x0b, 0x4c, 0x69, 0x6e, - 0x65, 0x61, 0x67, 0x65, 0x45, 0x64, 0x67, 0x65, 0x22, 0x69, 0x0a, 0x0b, 0x4c, 0x69, 0x6e, 0x65, - 0x61, 0x67, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6e, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6e, 0x12, 0x16, 0x0a, 0x04, 0x74, 0x79, 0x70, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x02, 0x18, 0x01, 0x52, 0x04, 0x74, 0x79, 0x70, - 0x65, 0x12, 0x1c, 0x0a, 0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x09, 0x42, 0x02, 0x18, 0x01, 0x52, 0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x3a, - 0x12, 0x92, 0x41, 0x0f, 0x0a, 0x0d, 0x2a, 0x0b, 0x4c, 0x69, 0x6e, 0x65, 0x61, 0x67, 0x65, 0x4e, - 0x6f, 0x64, 0x65, 0x22, 0xf9, 0x01, 0x0a, 0x03, 0x54, 0x61, 0x67, 0x12, 0x19, 0x0a, 0x08, 0x61, - 0x73, 0x73, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, - 0x73, 0x73, 0x65, 0x74, 0x49, 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, - 0x74, 0x65, 0x5f, 0x75, 0x72, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x74, 0x65, - 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x55, 0x72, 0x6e, 0x12, 0x41, 0x0a, 0x0a, 0x74, 0x61, 0x67, - 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, + 0x74, 0x61, 0x31, 0x2e, 0x41, 0x73, 0x73, 0x65, 0x74, 0x2e, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, + 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x12, 0x36, 0x0a, + 0x06, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x73, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x73, 0x73, - 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x54, 0x61, 0x67, 0x56, 0x61, 0x6c, 0x75, - 0x65, 0x52, 0x09, 0x74, 0x61, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x32, 0x0a, 0x15, - 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x5f, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, - 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x13, 0x74, 0x65, 0x6d, - 0x70, 0x6c, 0x61, 0x74, 0x65, 0x44, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x4e, 0x61, 0x6d, 0x65, - 0x12, 0x31, 0x0a, 0x14, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x5f, 0x64, 0x65, 0x73, - 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x13, - 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, - 0x69, 0x6f, 0x6e, 0x3a, 0x0a, 0x92, 0x41, 0x07, 0x0a, 0x05, 0x2a, 0x03, 0x54, 0x61, 0x67, 0x22, - 0xd1, 0x03, 0x0a, 0x08, 0x54, 0x61, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x19, 0x0a, 0x08, - 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x07, - 0x66, 0x69, 0x65, 0x6c, 0x64, 0x49, 0x64, 0x12, 0x37, 0x0a, 0x0b, 0x66, 0x69, 0x65, 0x6c, 0x64, - 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x56, - 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0a, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x56, 0x61, 0x6c, 0x75, 0x65, - 0x12, 0x1b, 0x0a, 0x09, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x75, 0x72, 0x6e, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x08, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x55, 0x72, 0x6e, 0x12, 0x2c, 0x0a, - 0x12, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x5f, 0x6e, - 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x66, 0x69, 0x65, 0x6c, 0x64, - 0x44, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x2b, 0x0a, 0x11, 0x66, - 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, - 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x44, 0x65, 0x73, - 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x26, 0x0a, 0x0f, 0x66, 0x69, 0x65, 0x6c, - 0x64, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0d, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x44, 0x61, 0x74, 0x61, 0x54, 0x79, 0x70, 0x65, - 0x12, 0x23, 0x0a, 0x0d, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0c, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x25, 0x0a, 0x0e, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x72, - 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 0x66, - 0x69, 0x65, 0x6c, 0x64, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x12, 0x39, 0x0a, 0x0a, - 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, + 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x06, 0x6f, + 0x77, 0x6e, 0x65, 0x72, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, + 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, + 0x3d, 0x0a, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x62, 0x79, 0x18, 0x0b, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x63, + 0x6f, 0x6d, 0x70, 0x61, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x55, + 0x73, 0x65, 0x72, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x42, 0x79, 0x12, 0x3e, + 0x0a, 0x09, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x6c, 0x6f, 0x67, 0x18, 0x0c, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x20, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6d, + 0x70, 0x61, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x68, 0x61, + 0x6e, 0x67, 0x65, 0x52, 0x09, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x6c, 0x6f, 0x67, 0x12, 0x39, + 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x0d, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, + 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x39, 0x0a, 0x0a, 0x75, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x64, 0x41, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x0f, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x03, 0x75, 0x72, 0x6c, 0x12, 0x37, 0x0a, 0x06, 0x70, 0x72, 0x6f, 0x62, 0x65, 0x73, + 0x18, 0x10, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, + 0x6b, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x62, 0x65, 0x52, 0x06, 0x70, 0x72, 0x6f, 0x62, 0x65, 0x73, 0x12, + 0x1d, 0x0a, 0x0a, 0x69, 0x73, 0x5f, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x18, 0x11, 0x20, + 0x01, 0x28, 0x08, 0x52, 0x09, 0x69, 0x73, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x1a, 0x39, + 0x0a, 0x0b, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 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, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x9b, 0x02, 0x0a, 0x05, 0x50, 0x72, + 0x6f, 0x62, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x02, 0x69, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x61, 0x73, 0x73, 0x65, 0x74, 0x5f, 0x75, 0x72, 0x6e, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x61, 0x73, 0x73, 0x65, 0x74, 0x55, 0x72, 0x6e, + 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x23, 0x0a, 0x0d, 0x73, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x5f, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0c, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x12, 0x33, 0x0a, + 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, + 0x74, 0x61, 0x12, 0x38, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, + 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, + 0x70, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x39, 0x0a, 0x0a, + 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x63, 0x72, - 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x39, 0x0a, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, - 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, - 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, - 0x41, 0x74, 0x3a, 0x0f, 0x92, 0x41, 0x0c, 0x0a, 0x0a, 0x2a, 0x08, 0x54, 0x61, 0x67, 0x56, 0x61, - 0x6c, 0x75, 0x65, 0x22, 0xb2, 0x02, 0x0a, 0x0b, 0x54, 0x61, 0x67, 0x54, 0x65, 0x6d, 0x70, 0x6c, - 0x61, 0x74, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x03, 0x75, 0x72, 0x6e, 0x12, 0x21, 0x0a, 0x0c, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, - 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x69, 0x73, - 0x70, 0x6c, 0x61, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, - 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, - 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x42, 0x0a, 0x06, 0x66, 0x69, - 0x65, 0x6c, 0x64, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x72, 0x61, 0x79, - 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x73, 0x73, 0x2e, 0x76, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x54, 0x61, 0x67, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, - 0x65, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x52, 0x06, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x12, 0x39, - 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x05, 0x20, 0x01, + 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x22, 0xea, 0x02, 0x0a, 0x0a, 0x44, 0x69, 0x73, 0x63, + 0x75, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x12, 0x12, 0x0a, 0x04, + 0x62, 0x6f, 0x64, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x62, 0x6f, 0x64, 0x79, + 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, + 0x74, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x6c, 0x61, + 0x62, 0x65, 0x6c, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x6c, 0x61, 0x62, 0x65, + 0x6c, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x18, 0x07, 0x20, 0x03, + 0x28, 0x09, 0x52, 0x06, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x61, 0x73, + 0x73, 0x69, 0x67, 0x6e, 0x65, 0x65, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x61, + 0x73, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x65, 0x73, 0x12, 0x34, 0x0a, 0x05, 0x6f, 0x77, 0x6e, 0x65, + 0x72, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, + 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x12, 0x39, + 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x39, 0x0a, 0x0a, 0x75, 0x70, 0x64, - 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, + 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, - 0x65, 0x64, 0x41, 0x74, 0x3a, 0x12, 0x92, 0x41, 0x0f, 0x0a, 0x0d, 0x2a, 0x0b, 0x54, 0x61, 0x67, - 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x22, 0xdb, 0x02, 0x0a, 0x10, 0x54, 0x61, 0x67, - 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x0e, 0x0a, - 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x02, 0x69, 0x64, 0x12, 0x10, 0x0a, - 0x03, 0x75, 0x72, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6e, 0x12, - 0x21, 0x0a, 0x0c, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x4e, 0x61, - 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, - 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, - 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1b, 0x0a, 0x09, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x74, 0x79, 0x70, - 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x64, 0x61, 0x74, 0x61, 0x54, 0x79, 0x70, - 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x06, 0x20, 0x03, - 0x28, 0x09, 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x72, - 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x72, - 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x12, 0x39, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, - 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, - 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, - 0x41, 0x74, 0x12, 0x39, 0x0a, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, - 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, - 0x6d, 0x70, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x3a, 0x17, 0x92, - 0x41, 0x14, 0x0a, 0x12, 0x2a, 0x10, 0x54, 0x61, 0x67, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, - 0x65, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x22, 0x30, 0x0a, 0x04, 0x54, 0x79, 0x70, 0x65, 0x12, 0x12, - 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, - 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0d, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0xb7, 0x01, 0x0a, 0x09, 0x4e, 0x61, 0x6d, - 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1b, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x03, 0x52, 0x04, 0x6e, - 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x67, 0x0a, 0x08, 0x6d, 0x65, 0x74, - 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, - 0x72, 0x75, 0x63, 0x74, 0x42, 0x32, 0x92, 0x41, 0x2f, 0x32, 0x2d, 0x6b, 0x65, 0x79, 0x20, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x20, 0x70, 0x61, 0x69, 0x72, 0x73, 0x20, 0x61, 0x73, 0x20, 0x6d, 0x65, - 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6e, - 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, - 0x74, 0x61, 0x32, 0xd4, 0x54, 0x0a, 0x0e, 0x43, 0x6f, 0x6d, 0x70, 0x61, 0x73, 0x73, 0x53, 0x65, - 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0xbe, 0x01, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x41, 0x6c, 0x6c, - 0x44, 0x69, 0x73, 0x63, 0x75, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x32, 0x2e, 0x72, 0x61, - 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x73, 0x73, 0x2e, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x6c, 0x6c, 0x44, 0x69, 0x73, - 0x63, 0x75, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x33, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x61, - 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x6c, - 0x6c, 0x44, 0x69, 0x73, 0x63, 0x75, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x40, 0x92, 0x41, 0x21, 0x0a, 0x0a, 0x44, 0x69, 0x73, 0x63, 0x75, - 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x13, 0x47, 0x65, 0x74, 0x20, 0x61, 0x6c, 0x6c, 0x20, 0x64, - 0x69, 0x73, 0x63, 0x75, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x16, - 0x12, 0x14, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x64, 0x69, 0x73, 0x63, 0x75, - 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0xbe, 0x01, 0x0a, 0x10, 0x43, 0x72, 0x65, 0x61, 0x74, - 0x65, 0x44, 0x69, 0x73, 0x63, 0x75, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x31, 0x2e, 0x72, 0x61, - 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x73, 0x73, 0x2e, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x44, 0x69, 0x73, - 0x63, 0x75, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x32, - 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x73, - 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, - 0x44, 0x69, 0x73, 0x63, 0x75, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x43, 0x92, 0x41, 0x21, 0x0a, 0x0a, 0x44, 0x69, 0x73, 0x63, 0x75, 0x73, 0x73, - 0x69, 0x6f, 0x6e, 0x12, 0x13, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x20, 0x61, 0x20, 0x64, 0x69, - 0x73, 0x63, 0x75, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x19, 0x3a, 0x01, - 0x2a, 0x22, 0x14, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x64, 0x69, 0x73, 0x63, - 0x75, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0xb4, 0x01, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x44, + 0x65, 0x64, 0x41, 0x74, 0x22, 0xbd, 0x02, 0x0a, 0x07, 0x43, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, + 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, + 0x12, 0x23, 0x0a, 0x0d, 0x64, 0x69, 0x73, 0x63, 0x75, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x69, + 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x64, 0x69, 0x73, 0x63, 0x75, 0x73, 0x73, + 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x12, 0x34, 0x0a, 0x05, 0x6f, 0x77, 0x6e, + 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, + 0x61, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x12, + 0x3d, 0x0a, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x62, 0x79, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x63, + 0x6f, 0x6d, 0x70, 0x61, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x55, + 0x73, 0x65, 0x72, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x42, 0x79, 0x12, 0x39, + 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x06, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, + 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x39, 0x0a, 0x0a, 0x75, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x64, 0x41, 0x74, 0x22, 0x6a, 0x0a, 0x0b, 0x4c, 0x69, 0x6e, 0x65, 0x61, 0x67, 0x65, 0x45, + 0x64, 0x67, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x74, + 0x61, 0x72, 0x67, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x74, 0x61, 0x72, + 0x67, 0x65, 0x74, 0x12, 0x2b, 0x0a, 0x04, 0x70, 0x72, 0x6f, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, 0x04, 0x70, 0x72, 0x6f, 0x70, + 0x22, 0x55, 0x0a, 0x0b, 0x4c, 0x69, 0x6e, 0x65, 0x61, 0x67, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x12, + 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, + 0x6e, 0x12, 0x16, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, + 0x02, 0x18, 0x01, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x1c, 0x0a, 0x07, 0x73, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x02, 0x18, 0x01, 0x52, 0x07, + 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x22, 0xed, 0x01, 0x0a, 0x03, 0x54, 0x61, 0x67, 0x12, + 0x19, 0x0a, 0x08, 0x61, 0x73, 0x73, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x07, 0x61, 0x73, 0x73, 0x65, 0x74, 0x49, 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x74, 0x65, + 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x5f, 0x75, 0x72, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0b, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x55, 0x72, 0x6e, 0x12, 0x41, 0x0a, + 0x0a, 0x74, 0x61, 0x67, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x22, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6d, + 0x70, 0x61, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x54, 0x61, 0x67, + 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x09, 0x74, 0x61, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, + 0x12, 0x32, 0x0a, 0x15, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x5f, 0x64, 0x69, 0x73, + 0x70, 0x6c, 0x61, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x13, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x44, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, + 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x31, 0x0a, 0x14, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, + 0x5f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x13, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x44, 0x65, 0x73, 0x63, + 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xc0, 0x03, 0x0a, 0x08, 0x54, 0x61, 0x67, 0x56, + 0x61, 0x6c, 0x75, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x69, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x07, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x49, 0x64, 0x12, + 0x37, 0x0a, 0x0b, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0a, 0x66, 0x69, + 0x65, 0x6c, 0x64, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x66, 0x69, 0x65, 0x6c, + 0x64, 0x5f, 0x75, 0x72, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x66, 0x69, 0x65, + 0x6c, 0x64, 0x55, 0x72, 0x6e, 0x12, 0x2c, 0x0a, 0x12, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x64, + 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x10, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x44, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x4e, + 0x61, 0x6d, 0x65, 0x12, 0x2b, 0x0a, 0x11, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x64, 0x65, 0x73, + 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, + 0x66, 0x69, 0x65, 0x6c, 0x64, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, + 0x12, 0x26, 0x0a, 0x0f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x74, + 0x79, 0x70, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x66, 0x69, 0x65, 0x6c, 0x64, + 0x44, 0x61, 0x74, 0x61, 0x54, 0x79, 0x70, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x66, 0x69, 0x65, 0x6c, + 0x64, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x09, 0x52, + 0x0c, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x25, 0x0a, + 0x0e, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x18, + 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x52, 0x65, 0x71, 0x75, + 0x69, 0x72, 0x65, 0x64, 0x12, 0x39, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, + 0x61, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, + 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, + 0x39, 0x0a, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x0a, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, + 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x22, 0x9e, 0x02, 0x0a, 0x0b, 0x54, + 0x61, 0x67, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, + 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6e, 0x12, 0x21, 0x0a, 0x0c, + 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0b, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, + 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, + 0x6e, 0x12, 0x42, 0x0a, 0x06, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x2a, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6d, + 0x70, 0x61, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x54, 0x61, 0x67, + 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x52, 0x06, 0x66, + 0x69, 0x65, 0x6c, 0x64, 0x73, 0x12, 0x39, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, + 0x5f, 0x61, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, + 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, + 0x12, 0x39, 0x0a, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x06, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, + 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x22, 0xc2, 0x02, 0x0a, 0x10, + 0x54, 0x61, 0x67, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x46, 0x69, 0x65, 0x6c, 0x64, + 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x02, 0x69, 0x64, + 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, + 0x72, 0x6e, 0x12, 0x21, 0x0a, 0x0c, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x5f, 0x6e, 0x61, + 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, + 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, + 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, + 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1b, 0x0a, 0x09, 0x64, 0x61, 0x74, 0x61, 0x5f, + 0x74, 0x79, 0x70, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x64, 0x61, 0x74, 0x61, + 0x54, 0x79, 0x70, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, + 0x06, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x1a, + 0x0a, 0x08, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, + 0x52, 0x08, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x12, 0x39, 0x0a, 0x0a, 0x63, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x39, 0x0a, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, + 0x5f, 0x61, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, + 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, + 0x22, 0x30, 0x0a, 0x04, 0x54, 0x79, 0x70, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x22, 0x83, 0x01, 0x0a, 0x09, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, + 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, + 0x12, 0x1b, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, + 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x03, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, + 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, 0x74, + 0x61, 0x74, 0x65, 0x12, 0x33, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, 0x08, + 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x32, 0xde, 0x28, 0x0a, 0x0e, 0x43, 0x6f, 0x6d, + 0x70, 0x61, 0x73, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x7e, 0x0a, 0x11, 0x47, + 0x65, 0x74, 0x41, 0x6c, 0x6c, 0x44, 0x69, 0x73, 0x63, 0x75, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, + 0x12, 0x32, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6d, 0x70, + 0x61, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x41, + 0x6c, 0x6c, 0x44, 0x69, 0x73, 0x63, 0x75, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x33, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, + 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, + 0x47, 0x65, 0x74, 0x41, 0x6c, 0x6c, 0x44, 0x69, 0x73, 0x63, 0x75, 0x73, 0x73, 0x69, 0x6f, 0x6e, + 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x7b, 0x0a, 0x10, 0x43, + 0x72, 0x65, 0x61, 0x74, 0x65, 0x44, 0x69, 0x73, 0x63, 0x75, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, + 0x31, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x61, + 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x44, 0x69, 0x73, 0x63, 0x75, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x32, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x63, 0x6f, + 0x6d, 0x70, 0x61, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x44, 0x69, 0x73, 0x63, 0x75, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x72, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x44, 0x69, 0x73, 0x63, 0x75, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x2e, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x44, 0x69, 0x73, 0x63, 0x75, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2f, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x44, 0x69, 0x73, 0x63, 0x75, 0x73, 0x73, 0x69, - 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x42, 0x92, 0x41, 0x1e, 0x0a, - 0x0a, 0x44, 0x69, 0x73, 0x63, 0x75, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x10, 0x47, 0x65, 0x74, - 0x20, 0x61, 0x20, 0x64, 0x69, 0x73, 0x63, 0x75, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x82, 0xd3, 0xe4, - 0x93, 0x02, 0x1b, 0x12, 0x19, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x64, 0x69, - 0x73, 0x63, 0x75, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12, 0xbf, - 0x01, 0x0a, 0x0f, 0x50, 0x61, 0x74, 0x63, 0x68, 0x44, 0x69, 0x73, 0x63, 0x75, 0x73, 0x73, 0x69, - 0x6f, 0x6e, 0x12, 0x30, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x63, 0x6f, - 0x6d, 0x70, 0x61, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, - 0x74, 0x63, 0x68, 0x44, 0x69, 0x73, 0x63, 0x75, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x31, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, - 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, - 0x50, 0x61, 0x74, 0x63, 0x68, 0x44, 0x69, 0x73, 0x63, 0x75, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x47, 0x92, 0x41, 0x20, 0x0a, 0x0a, 0x44, 0x69, - 0x73, 0x63, 0x75, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x50, 0x61, 0x74, 0x63, 0x68, 0x20, - 0x61, 0x20, 0x64, 0x69, 0x73, 0x63, 0x75, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x82, 0xd3, 0xe4, 0x93, - 0x02, 0x1e, 0x3a, 0x01, 0x2a, 0x32, 0x19, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, - 0x64, 0x69, 0x73, 0x63, 0x75, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, - 0x12, 0xe4, 0x01, 0x0a, 0x0d, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6d, 0x6d, 0x65, - 0x6e, 0x74, 0x12, 0x2e, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x63, 0x6f, - 0x6d, 0x70, 0x61, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x72, - 0x65, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x2f, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x63, 0x6f, - 0x6d, 0x70, 0x61, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x72, - 0x65, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x72, 0x92, 0x41, 0x37, 0x0a, 0x0a, 0x44, 0x69, 0x73, 0x63, 0x75, 0x73, - 0x73, 0x69, 0x6f, 0x6e, 0x0a, 0x07, 0x43, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x20, 0x43, - 0x72, 0x65, 0x61, 0x74, 0x65, 0x20, 0x61, 0x20, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x20, - 0x6f, 0x66, 0x20, 0x61, 0x20, 0x64, 0x69, 0x73, 0x63, 0x75, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x82, - 0xd3, 0xe4, 0x93, 0x02, 0x32, 0x3a, 0x01, 0x2a, 0x22, 0x2d, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0x2f, 0x64, 0x69, 0x73, 0x63, 0x75, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, - 0x64, 0x69, 0x73, 0x63, 0x75, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x7d, 0x2f, 0x63, - 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, 0xe4, 0x01, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x41, - 0x6c, 0x6c, 0x43, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x2f, 0x2e, 0x72, 0x61, 0x79, - 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x73, 0x73, 0x2e, 0x76, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x6c, 0x6c, 0x43, 0x6f, 0x6d, 0x6d, - 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x30, 0x2e, 0x72, 0x61, - 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x73, 0x73, 0x2e, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x6c, 0x6c, 0x43, 0x6f, 0x6d, - 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x6f, 0x92, - 0x41, 0x37, 0x0a, 0x0a, 0x44, 0x69, 0x73, 0x63, 0x75, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x0a, 0x07, - 0x43, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x20, 0x47, 0x65, 0x74, 0x20, 0x61, 0x6c, 0x6c, - 0x20, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x20, 0x6f, 0x66, 0x20, 0x61, 0x20, 0x64, - 0x69, 0x73, 0x63, 0x75, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2f, 0x12, - 0x2d, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x64, 0x69, 0x73, 0x63, 0x75, 0x73, - 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x64, 0x69, 0x73, 0x63, 0x75, 0x73, 0x73, 0x69, 0x6f, - 0x6e, 0x5f, 0x69, 0x64, 0x7d, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, 0xda, - 0x01, 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x2b, 0x2e, + 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x78, 0x0a, 0x0f, + 0x50, 0x61, 0x74, 0x63, 0x68, 0x44, 0x69, 0x73, 0x63, 0x75, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, + 0x30, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x61, + 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x74, 0x63, 0x68, + 0x44, 0x69, 0x73, 0x63, 0x75, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x31, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6d, + 0x70, 0x61, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x74, + 0x63, 0x68, 0x44, 0x69, 0x73, 0x63, 0x75, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x72, 0x0a, 0x0d, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x43, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x2e, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, + 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2f, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, + 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x75, 0x0a, 0x0e, 0x47, 0x65, + 0x74, 0x41, 0x6c, 0x6c, 0x43, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x2f, 0x2e, 0x72, + 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x73, 0x73, 0x2e, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x6c, 0x6c, 0x43, 0x6f, + 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x30, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x73, 0x73, - 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6d, 0x6d, - 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x72, 0x61, 0x79, - 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x73, 0x73, 0x2e, 0x76, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x71, 0x92, 0x41, 0x34, 0x0a, 0x0a, 0x44, - 0x69, 0x73, 0x63, 0x75, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x0a, 0x07, 0x43, 0x6f, 0x6d, 0x6d, 0x65, - 0x6e, 0x74, 0x12, 0x1d, 0x47, 0x65, 0x74, 0x20, 0x61, 0x20, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, - 0x74, 0x20, 0x6f, 0x66, 0x20, 0x61, 0x20, 0x64, 0x69, 0x73, 0x63, 0x75, 0x73, 0x73, 0x69, 0x6f, - 0x6e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x34, 0x12, 0x32, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0x2f, 0x64, 0x69, 0x73, 0x63, 0x75, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x64, - 0x69, 0x73, 0x63, 0x75, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x7d, 0x2f, 0x63, 0x6f, - 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12, 0xe9, 0x01, 0x0a, 0x0d, + 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x6c, 0x6c, 0x43, + 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x00, 0x12, 0x69, 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x12, + 0x2b, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x61, + 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6f, + 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x72, + 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x73, 0x73, 0x2e, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6d, 0x6d, 0x65, + 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x72, 0x0a, 0x0d, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x2e, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2f, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, - 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x77, - 0x92, 0x41, 0x37, 0x0a, 0x0a, 0x44, 0x69, 0x73, 0x63, 0x75, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x0a, - 0x07, 0x43, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x20, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, - 0x20, 0x61, 0x20, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x20, 0x6f, 0x66, 0x20, 0x61, 0x20, - 0x64, 0x69, 0x73, 0x63, 0x75, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x37, - 0x3a, 0x01, 0x2a, 0x1a, 0x32, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x64, 0x69, - 0x73, 0x63, 0x75, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x64, 0x69, 0x73, 0x63, 0x75, - 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x7d, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, - 0x74, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12, 0xe6, 0x01, 0x0a, 0x0d, 0x44, 0x65, 0x6c, 0x65, - 0x74, 0x65, 0x43, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x2e, 0x2e, 0x72, 0x61, 0x79, 0x73, - 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x43, 0x6f, 0x6d, 0x6d, 0x65, - 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2f, 0x2e, 0x72, 0x61, 0x79, 0x73, - 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x43, 0x6f, 0x6d, 0x6d, 0x65, - 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x74, 0x92, 0x41, 0x37, 0x0a, - 0x0a, 0x44, 0x69, 0x73, 0x63, 0x75, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x0a, 0x07, 0x43, 0x6f, 0x6d, - 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x20, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x20, 0x61, 0x20, 0x63, - 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x20, 0x6f, 0x66, 0x20, 0x61, 0x20, 0x64, 0x69, 0x73, 0x63, - 0x75, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x34, 0x2a, 0x32, 0x2f, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x64, 0x69, 0x73, 0x63, 0x75, 0x73, 0x73, 0x69, 0x6f, - 0x6e, 0x73, 0x2f, 0x7b, 0x64, 0x69, 0x73, 0x63, 0x75, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x69, - 0x64, 0x7d, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, - 0x12, 0xce, 0x06, 0x0a, 0x0c, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x41, 0x73, 0x73, 0x65, 0x74, - 0x73, 0x12, 0x2d, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6d, - 0x70, 0x61, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x53, 0x65, 0x61, - 0x72, 0x63, 0x68, 0x41, 0x73, 0x73, 0x65, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x2e, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6d, 0x70, - 0x61, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x53, 0x65, 0x61, 0x72, - 0x63, 0x68, 0x41, 0x73, 0x73, 0x65, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0xde, 0x05, 0x92, 0x41, 0xc3, 0x05, 0x0a, 0x06, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x0a, - 0x05, 0x41, 0x73, 0x73, 0x65, 0x74, 0x12, 0x13, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x20, 0x66, - 0x6f, 0x72, 0x20, 0x61, 0x6e, 0x20, 0x61, 0x73, 0x73, 0x65, 0x74, 0x1a, 0x9c, 0x05, 0x41, 0x50, - 0x49, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x71, 0x75, 0x65, 0x72, 0x79, 0x69, 0x6e, 0x67, 0x20, 0x64, - 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x20, 0x27, 0x74, 0x65, 0x78, 0x74, 0x27, - 0x20, 0x69, 0x73, 0x20, 0x66, 0x75, 0x7a, 0x7a, 0x79, 0x20, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, - 0x64, 0x20, 0x61, 0x67, 0x61, 0x69, 0x6e, 0x73, 0x74, 0x20, 0x61, 0x6c, 0x6c, 0x20, 0x74, 0x68, - 0x65, 0x20, 0x61, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x20, 0x64, 0x61, 0x74, 0x61, - 0x73, 0x65, 0x74, 0x73, 0x2c, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, - 0x64, 0x20, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x20, 0x61, 0x72, 0x65, 0x20, 0x72, 0x65, - 0x74, 0x75, 0x72, 0x6e, 0x65, 0x64, 0x2e, 0x20, 0x59, 0x6f, 0x75, 0x20, 0x63, 0x61, 0x6e, 0x20, - 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x79, 0x20, 0x61, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, - 0x61, 0x6c, 0x20, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x20, 0x63, 0x72, 0x69, 0x74, 0x65, 0x72, 0x69, - 0x61, 0x20, 0x75, 0x73, 0x69, 0x6e, 0x67, 0x20, 0x27, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x5b, - 0x2e, 0x2a, 0x5d, 0x27, 0x20, 0x71, 0x75, 0x65, 0x72, 0x79, 0x20, 0x70, 0x61, 0x72, 0x61, 0x6d, - 0x65, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x20, 0x59, 0x6f, 0x75, 0x20, 0x63, 0x61, 0x6e, 0x20, 0x73, - 0x70, 0x65, 0x63, 0x69, 0x66, 0x79, 0x20, 0x65, 0x61, 0x63, 0x68, 0x20, 0x66, 0x69, 0x6c, 0x74, - 0x65, 0x72, 0x20, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x65, 0x20, 0x74, 0x69, 0x6d, 0x65, - 0x73, 0x20, 0x74, 0x6f, 0x20, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x79, 0x20, 0x61, 0x20, 0x73, - 0x65, 0x74, 0x20, 0x6f, 0x66, 0x20, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x20, 0x66, 0x6f, 0x72, - 0x20, 0x74, 0x68, 0x6f, 0x73, 0x65, 0x20, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x20, - 0x46, 0x6f, 0x72, 0x20, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x2c, 0x20, 0x74, 0x6f, - 0x20, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x79, 0x20, 0x74, 0x77, 0x6f, 0x20, 0x6c, 0x61, 0x6e, - 0x64, 0x73, 0x63, 0x61, 0x70, 0x65, 0x20, 0x27, 0x76, 0x6e, 0x27, 0x20, 0x61, 0x6e, 0x64, 0x20, - 0x27, 0x74, 0x68, 0x27, 0x2c, 0x20, 0x74, 0x68, 0x65, 0x20, 0x71, 0x75, 0x65, 0x72, 0x79, 0x20, - 0x63, 0x6f, 0x75, 0x6c, 0x64, 0x20, 0x62, 0x65, 0x20, 0x60, 0x2f, 0x73, 0x65, 0x61, 0x72, 0x63, - 0x68, 0x2f, 0x3f, 0x74, 0x65, 0x78, 0x74, 0x3d, 0x3c, 0x74, 0x65, 0x78, 0x74, 0x3e, 0x26, 0x66, - 0x69, 0x6c, 0x74, 0x65, 0x72, 0x5b, 0x65, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, - 0x74, 0x5d, 0x3d, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x26, 0x66, - 0x69, 0x6c, 0x74, 0x65, 0x72, 0x5b, 0x6c, 0x61, 0x6e, 0x64, 0x73, 0x63, 0x61, 0x70, 0x65, 0x5d, - 0x3d, 0x76, 0x6e, 0x26, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x5b, 0x6c, 0x61, 0x6e, 0x64, 0x73, - 0x63, 0x61, 0x70, 0x65, 0x5d, 0x3d, 0x74, 0x68, 0x60, 0x2e, 0x20, 0x41, 0x73, 0x20, 0x61, 0x6e, - 0x20, 0x61, 0x6c, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x74, 0x69, 0x76, 0x65, 0x2c, 0x20, 0x74, 0x68, - 0x69, 0x73, 0x20, 0x41, 0x50, 0x49, 0x20, 0x61, 0x6c, 0x73, 0x6f, 0x20, 0x73, 0x75, 0x70, 0x70, - 0x6f, 0x72, 0x74, 0x73, 0x20, 0x66, 0x75, 0x7a, 0x7a, 0x79, 0x20, 0x66, 0x69, 0x6c, 0x74, 0x65, - 0x72, 0x20, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x27, 0x71, 0x75, - 0x65, 0x72, 0x79, 0x27, 0x20, 0x71, 0x75, 0x65, 0x72, 0x79, 0x20, 0x70, 0x61, 0x72, 0x61, 0x6d, - 0x73, 0x2e, 0x20, 0x46, 0x6f, 0x72, 0x20, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x2c, - 0x20, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x69, 0x6e, 0x67, 0x20, 0x61, 0x73, 0x73, 0x65, 0x74, - 0x73, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x68, 0x61, 0x73, 0x20, 0x27, 0x62, 0x69, 0x67, 0x71, - 0x75, 0x27, 0x20, 0x74, 0x65, 0x72, 0x6d, 0x20, 0x69, 0x6e, 0x20, 0x69, 0x74, 0x73, 0x20, 0x64, - 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x60, 0x2f, 0x73, 0x65, 0x61, - 0x72, 0x63, 0x68, 0x2f, 0x3f, 0x74, 0x65, 0x78, 0x74, 0x3d, 0x3c, 0x74, 0x65, 0x78, 0x74, 0x3e, - 0x26, 0x71, 0x75, 0x65, 0x72, 0x79, 0x5b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, - 0x6f, 0x6e, 0x5d, 0x3d, 0x62, 0x69, 0x67, 0x71, 0x75, 0x60, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x11, - 0x12, 0x0f, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x73, 0x65, 0x61, 0x72, 0x63, - 0x68, 0x12, 0xb6, 0x02, 0x0a, 0x0d, 0x53, 0x75, 0x67, 0x67, 0x65, 0x73, 0x74, 0x41, 0x73, 0x73, - 0x65, 0x74, 0x73, 0x12, 0x2e, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x63, - 0x6f, 0x6d, 0x70, 0x61, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x53, - 0x75, 0x67, 0x67, 0x65, 0x73, 0x74, 0x41, 0x73, 0x73, 0x65, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x2f, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x63, + 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, + 0x12, 0x72, 0x0a, 0x0d, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x43, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, + 0x74, 0x12, 0x2e, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6d, + 0x70, 0x61, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x6c, + 0x65, 0x74, 0x65, 0x43, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x2f, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6d, + 0x70, 0x61, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x6c, + 0x65, 0x74, 0x65, 0x43, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x00, 0x12, 0x6f, 0x0a, 0x0c, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x41, 0x73, + 0x73, 0x65, 0x74, 0x73, 0x12, 0x2d, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, + 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, + 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x41, 0x73, 0x73, 0x65, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x2e, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x53, - 0x75, 0x67, 0x67, 0x65, 0x73, 0x74, 0x41, 0x73, 0x73, 0x65, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xc3, 0x01, 0x92, 0x41, 0xa0, 0x01, 0x0a, 0x06, 0x53, 0x65, 0x61, - 0x72, 0x63, 0x68, 0x0a, 0x05, 0x41, 0x73, 0x73, 0x65, 0x74, 0x12, 0x10, 0x53, 0x75, 0x67, 0x67, - 0x65, 0x73, 0x74, 0x20, 0x61, 0x6e, 0x20, 0x61, 0x73, 0x73, 0x65, 0x74, 0x1a, 0x7d, 0x41, 0x50, - 0x49, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x72, 0x65, 0x74, 0x72, 0x65, 0x69, 0x76, 0x69, 0x6e, 0x67, - 0x20, 0x4e, 0x20, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x20, 0x6f, 0x66, 0x20, 0x61, 0x73, 0x73, - 0x65, 0x74, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x73, 0x69, - 0x6d, 0x69, 0x6c, 0x61, 0x72, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x74, 0x68, 0x65, 0x20, 0x60, - 0x74, 0x65, 0x78, 0x74, 0x60, 0x2e, 0x20, 0x42, 0x79, 0x20, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, - 0x74, 0x2c, 0x20, 0x4e, 0x20, 0x3d, 0x20, 0x35, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x6e, 0x6f, 0x77, - 0x20, 0x61, 0x6e, 0x64, 0x20, 0x68, 0x61, 0x72, 0x64, 0x63, 0x6f, 0x64, 0x65, 0x64, 0x20, 0x69, - 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x63, 0x6f, 0x64, 0x65, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, - 0x19, 0x12, 0x17, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x73, 0x65, 0x61, 0x72, - 0x63, 0x68, 0x2f, 0x73, 0x75, 0x67, 0x67, 0x65, 0x73, 0x74, 0x12, 0xee, 0x01, 0x0a, 0x0b, 0x47, - 0x72, 0x6f, 0x75, 0x70, 0x41, 0x73, 0x73, 0x65, 0x74, 0x73, 0x12, 0x2c, 0x2e, 0x72, 0x61, 0x79, - 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x73, 0x73, 0x2e, 0x76, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x41, 0x73, 0x73, 0x65, 0x74, - 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2d, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, + 0x65, 0x61, 0x72, 0x63, 0x68, 0x41, 0x73, 0x73, 0x65, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x72, 0x0a, 0x0d, 0x53, 0x75, 0x67, 0x67, 0x65, 0x73, 0x74, + 0x41, 0x73, 0x73, 0x65, 0x74, 0x73, 0x12, 0x2e, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, + 0x6b, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x2e, 0x53, 0x75, 0x67, 0x67, 0x65, 0x73, 0x74, 0x41, 0x73, 0x73, 0x65, 0x74, 0x73, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2f, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, + 0x6b, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x2e, 0x53, 0x75, 0x67, 0x67, 0x65, 0x73, 0x74, 0x41, 0x73, 0x73, 0x65, 0x74, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x6c, 0x0a, 0x0b, 0x47, 0x72, 0x6f, + 0x75, 0x70, 0x41, 0x73, 0x73, 0x65, 0x74, 0x73, 0x12, 0x2c, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x41, 0x73, 0x73, 0x65, 0x74, 0x73, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x81, 0x01, 0x92, 0x41, 0x62, 0x0a, 0x06, 0x53, - 0x65, 0x61, 0x72, 0x63, 0x68, 0x0a, 0x05, 0x41, 0x73, 0x73, 0x65, 0x74, 0x12, 0x0c, 0x47, 0x72, - 0x6f, 0x75, 0x70, 0x20, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x1a, 0x43, 0x41, 0x50, 0x49, 0x20, - 0x66, 0x6f, 0x72, 0x20, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x69, 0x6e, 0x67, 0x20, 0x61, 0x73, 0x73, - 0x65, 0x74, 0x73, 0x20, 0x62, 0x79, 0x20, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, - 0x20, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x66, 0x69, 0x6c, - 0x74, 0x65, 0x72, 0x69, 0x6e, 0x67, 0x20, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x82, - 0xd3, 0xe4, 0x93, 0x02, 0x16, 0x12, 0x14, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, - 0x67, 0x72, 0x6f, 0x75, 0x70, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x12, 0xcf, 0x02, 0x0a, 0x08, - 0x47, 0x65, 0x74, 0x47, 0x72, 0x61, 0x70, 0x68, 0x12, 0x29, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, - 0x61, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x47, 0x72, 0x61, 0x70, 0x68, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x63, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2d, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, + 0x6b, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x41, 0x73, 0x73, 0x65, 0x74, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x63, 0x0a, 0x08, 0x47, 0x65, 0x74, 0x47, 0x72, + 0x61, 0x70, 0x68, 0x12, 0x29, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, - 0x65, 0x74, 0x47, 0x72, 0x61, 0x70, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0xeb, 0x01, 0x92, 0x41, 0xc6, 0x01, 0x0a, 0x07, 0x4c, 0x69, 0x6e, 0x65, 0x61, 0x67, 0x65, 0x0a, - 0x05, 0x41, 0x73, 0x73, 0x65, 0x74, 0x12, 0x11, 0x47, 0x65, 0x74, 0x20, 0x4c, 0x69, 0x6e, 0x65, - 0x61, 0x67, 0x65, 0x20, 0x47, 0x72, 0x61, 0x70, 0x68, 0x1a, 0xa0, 0x01, 0x52, 0x65, 0x74, 0x75, - 0x72, 0x6e, 0x73, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6c, 0x69, 0x6e, 0x65, 0x61, 0x67, 0x65, 0x20, - 0x67, 0x72, 0x61, 0x70, 0x68, 0x2e, 0x20, 0x45, 0x61, 0x63, 0x68, 0x20, 0x65, 0x6e, 0x74, 0x72, - 0x79, 0x20, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x67, 0x72, 0x61, 0x70, 0x68, 0x20, 0x64, - 0x65, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x73, 0x20, 0x61, 0x20, 0x28, 0x65, 0x64, 0x67, 0x65, - 0x29, 0x20, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x65, 0x64, 0x20, 0x72, 0x65, 0x6c, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x20, 0x6f, 0x66, 0x20, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x20, 0x77, 0x69, - 0x74, 0x68, 0x20, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x64, 0x65, - 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x75, 0x73, 0x69, 0x6e, 0x67, 0x20, - 0x69, 0x74, 0x27, 0x73, 0x20, 0x75, 0x72, 0x6e, 0x2c, 0x20, 0x74, 0x79, 0x70, 0x65, 0x2c, 0x20, - 0x61, 0x6e, 0x64, 0x20, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x82, 0xd3, 0xe4, 0x93, - 0x02, 0x1b, 0x12, 0x19, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x6c, 0x69, 0x6e, - 0x65, 0x61, 0x67, 0x65, 0x2f, 0x7b, 0x75, 0x72, 0x6e, 0x3d, 0x2a, 0x2a, 0x7d, 0x12, 0xc2, 0x01, - 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x41, 0x6c, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x73, 0x12, 0x2c, 0x2e, - 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x73, 0x73, - 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x6c, 0x6c, 0x54, - 0x79, 0x70, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2d, 0x2e, 0x72, 0x61, + 0x65, 0x74, 0x47, 0x72, 0x61, 0x70, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, + 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x73, + 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x47, 0x72, 0x61, + 0x70, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x6c, 0x0a, 0x0b, + 0x47, 0x65, 0x74, 0x41, 0x6c, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x73, 0x12, 0x2c, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x6c, 0x6c, 0x54, 0x79, 0x70, - 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x56, 0x92, 0x41, 0x3d, 0x0a, - 0x04, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0f, 0x66, 0x65, 0x74, 0x63, 0x68, 0x20, 0x61, 0x6c, 0x6c, - 0x20, 0x74, 0x79, 0x70, 0x65, 0x73, 0x1a, 0x24, 0x46, 0x65, 0x74, 0x63, 0x68, 0x20, 0x61, 0x6c, - 0x6c, 0x20, 0x74, 0x79, 0x70, 0x65, 0x73, 0x20, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x65, - 0x64, 0x20, 0x69, 0x6e, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x61, 0x73, 0x73, 0x82, 0xd3, 0xe4, 0x93, - 0x02, 0x10, 0x12, 0x0e, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x74, 0x79, 0x70, - 0x65, 0x73, 0x12, 0x9a, 0x02, 0x0a, 0x0c, 0x47, 0x65, 0x74, 0x41, 0x6c, 0x6c, 0x41, 0x73, 0x73, - 0x65, 0x74, 0x73, 0x12, 0x2d, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x63, - 0x6f, 0x6d, 0x70, 0x61, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, - 0x65, 0x74, 0x41, 0x6c, 0x6c, 0x41, 0x73, 0x73, 0x65, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x2e, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x63, 0x6f, - 0x6d, 0x70, 0x61, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x65, - 0x74, 0x41, 0x6c, 0x6c, 0x41, 0x73, 0x73, 0x65, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0xaa, 0x01, 0x92, 0x41, 0x8f, 0x01, 0x0a, 0x05, 0x41, 0x73, 0x73, 0x65, 0x74, - 0x12, 0x12, 0x47, 0x65, 0x74, 0x20, 0x6c, 0x69, 0x73, 0x74, 0x20, 0x6f, 0x66, 0x20, 0x61, 0x73, - 0x73, 0x65, 0x74, 0x73, 0x1a, 0x72, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x73, 0x20, 0x6c, 0x69, - 0x73, 0x74, 0x20, 0x6f, 0x66, 0x20, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2c, 0x20, 0x6f, 0x70, - 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x6c, 0x79, 0x20, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x65, - 0x64, 0x20, 0x62, 0x79, 0x20, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2c, 0x20, 0x73, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0x73, 0x2c, 0x20, 0x73, 0x6f, 0x72, 0x74, 0x69, 0x6e, 0x67, 0x2c, 0x20, 0x66, - 0x69, 0x65, 0x6c, 0x64, 0x73, 0x20, 0x69, 0x6e, 0x20, 0x61, 0x73, 0x73, 0x65, 0x74, 0x2e, 0x64, - 0x61, 0x74, 0x61, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x71, 0x75, 0x65, 0x72, 0x79, 0x69, 0x6e, 0x67, - 0x20, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x20, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x11, 0x12, 0x0f, - 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x12, - 0xca, 0x01, 0x0a, 0x0c, 0x47, 0x65, 0x74, 0x41, 0x73, 0x73, 0x65, 0x74, 0x42, 0x79, 0x49, 0x44, - 0x12, 0x2d, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6d, 0x70, - 0x61, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x41, - 0x73, 0x73, 0x65, 0x74, 0x42, 0x79, 0x49, 0x44, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x2e, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x61, - 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x73, - 0x73, 0x65, 0x74, 0x42, 0x79, 0x49, 0x44, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x5b, 0x92, 0x41, 0x3c, 0x0a, 0x05, 0x41, 0x73, 0x73, 0x65, 0x74, 0x12, 0x0d, 0x46, 0x69, 0x6e, - 0x64, 0x20, 0x61, 0x6e, 0x20, 0x61, 0x73, 0x73, 0x65, 0x74, 0x1a, 0x24, 0x52, 0x65, 0x74, 0x75, - 0x72, 0x6e, 0x73, 0x20, 0x61, 0x20, 0x73, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x20, 0x61, 0x73, 0x73, - 0x65, 0x74, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x67, 0x69, 0x76, 0x65, 0x6e, 0x20, 0x49, 0x44, - 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x16, 0x12, 0x14, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x2f, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12, 0xf3, 0x01, 0x0a, - 0x0b, 0x55, 0x70, 0x73, 0x65, 0x72, 0x74, 0x41, 0x73, 0x73, 0x65, 0x74, 0x12, 0x2c, 0x2e, 0x72, - 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x73, 0x73, 0x2e, - 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x55, 0x70, 0x73, 0x65, 0x72, 0x74, 0x41, 0x73, - 0x73, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2d, 0x2e, 0x72, 0x61, 0x79, + 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2d, 0x2e, 0x72, 0x61, 0x79, 0x73, + 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x6c, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x6f, 0x0a, 0x0c, 0x47, 0x65, + 0x74, 0x41, 0x6c, 0x6c, 0x41, 0x73, 0x73, 0x65, 0x74, 0x73, 0x12, 0x2d, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x73, 0x73, 0x2e, 0x76, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x55, 0x70, 0x73, 0x65, 0x72, 0x74, 0x41, 0x73, 0x73, 0x65, - 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x86, 0x01, 0x92, 0x41, 0x69, 0x0a, - 0x05, 0x41, 0x73, 0x73, 0x65, 0x74, 0x12, 0x16, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x43, - 0x72, 0x65, 0x61, 0x74, 0x65, 0x20, 0x61, 0x6e, 0x20, 0x61, 0x73, 0x73, 0x65, 0x74, 0x1a, 0x48, - 0x55, 0x70, 0x73, 0x65, 0x72, 0x74, 0x20, 0x77, 0x69, 0x6c, 0x6c, 0x20, 0x75, 0x70, 0x64, 0x61, - 0x74, 0x65, 0x20, 0x61, 0x6e, 0x20, 0x61, 0x73, 0x73, 0x65, 0x74, 0x20, 0x6f, 0x72, 0x20, 0x63, - 0x72, 0x65, 0x61, 0x74, 0x65, 0x20, 0x61, 0x20, 0x6e, 0x65, 0x77, 0x20, 0x6f, 0x6e, 0x65, 0x20, - 0x69, 0x66, 0x20, 0x69, 0x74, 0x20, 0x64, 0x6f, 0x65, 0x73, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x65, - 0x78, 0x69, 0x73, 0x74, 0x20, 0x79, 0x65, 0x74, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x14, 0x3a, 0x01, - 0x2a, 0x1a, 0x0f, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x61, 0x73, 0x73, 0x65, - 0x74, 0x73, 0x12, 0xfc, 0x01, 0x0a, 0x10, 0x55, 0x70, 0x73, 0x65, 0x72, 0x74, 0x50, 0x61, 0x74, - 0x63, 0x68, 0x41, 0x73, 0x73, 0x65, 0x74, 0x12, 0x31, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, - 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0x2e, 0x55, 0x70, 0x73, 0x65, 0x72, 0x74, 0x50, 0x61, 0x74, 0x63, 0x68, 0x41, 0x73, - 0x73, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x32, 0x2e, 0x72, 0x61, 0x79, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x6c, 0x6c, 0x41, 0x73, 0x73, 0x65, + 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2e, 0x2e, 0x72, 0x61, 0x79, 0x73, + 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x6c, 0x6c, 0x41, 0x73, 0x73, 0x65, 0x74, + 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x6f, 0x0a, 0x0c, 0x47, + 0x65, 0x74, 0x41, 0x73, 0x73, 0x65, 0x74, 0x42, 0x79, 0x49, 0x44, 0x12, 0x2d, 0x2e, 0x72, 0x61, + 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x73, 0x73, 0x2e, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x73, 0x73, 0x65, 0x74, 0x42, + 0x79, 0x49, 0x44, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2e, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x73, 0x73, 0x2e, 0x76, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x55, 0x70, 0x73, 0x65, 0x72, 0x74, 0x50, 0x61, 0x74, 0x63, - 0x68, 0x41, 0x73, 0x73, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x80, - 0x01, 0x92, 0x41, 0x63, 0x0a, 0x05, 0x41, 0x73, 0x73, 0x65, 0x74, 0x12, 0x15, 0x50, 0x61, 0x74, - 0x63, 0x68, 0x2f, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x20, 0x61, 0x6e, 0x20, 0x61, 0x73, 0x73, - 0x65, 0x74, 0x1a, 0x43, 0x53, 0x69, 0x6d, 0x69, 0x6c, 0x61, 0x72, 0x20, 0x74, 0x6f, 0x20, 0x55, - 0x70, 0x73, 0x65, 0x72, 0x74, 0x20, 0x62, 0x75, 0x74, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x70, - 0x61, 0x74, 0x63, 0x68, 0x20, 0x73, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x20, 0x61, 0x6e, - 0x64, 0x20, 0x64, 0x69, 0x66, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x74, 0x20, 0x62, 0x6f, 0x64, 0x79, - 0x20, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x14, 0x3a, 0x01, 0x2a, - 0x32, 0x0f, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x61, 0x73, 0x73, 0x65, 0x74, - 0x73, 0x12, 0xc8, 0x01, 0x0a, 0x0b, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x41, 0x73, 0x73, 0x65, - 0x74, 0x12, 0x2c, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6d, - 0x70, 0x61, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x6c, - 0x65, 0x74, 0x65, 0x41, 0x73, 0x73, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x2d, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x61, - 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, - 0x65, 0x41, 0x73, 0x73, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x5c, - 0x92, 0x41, 0x3d, 0x0a, 0x05, 0x41, 0x73, 0x73, 0x65, 0x74, 0x12, 0x0f, 0x44, 0x65, 0x6c, 0x65, - 0x74, 0x65, 0x20, 0x61, 0x6e, 0x20, 0x61, 0x73, 0x73, 0x65, 0x74, 0x1a, 0x23, 0x44, 0x65, 0x6c, - 0x65, 0x74, 0x65, 0x20, 0x61, 0x20, 0x73, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x20, 0x61, 0x73, 0x73, - 0x65, 0x74, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x67, 0x69, 0x76, 0x65, 0x6e, 0x20, 0x49, 0x44, - 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x16, 0x2a, 0x14, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x2f, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12, 0xff, 0x01, 0x0a, - 0x12, 0x47, 0x65, 0x74, 0x41, 0x73, 0x73, 0x65, 0x74, 0x53, 0x74, 0x61, 0x72, 0x67, 0x61, 0x7a, - 0x65, 0x72, 0x73, 0x12, 0x33, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x63, - 0x6f, 0x6d, 0x70, 0x61, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, - 0x65, 0x74, 0x41, 0x73, 0x73, 0x65, 0x74, 0x53, 0x74, 0x61, 0x72, 0x67, 0x61, 0x7a, 0x65, 0x72, - 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x34, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, - 0x61, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x73, 0x73, 0x65, 0x74, 0x53, 0x74, 0x61, 0x72, - 0x67, 0x61, 0x7a, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x7e, - 0x92, 0x41, 0x54, 0x0a, 0x05, 0x41, 0x73, 0x73, 0x65, 0x74, 0x12, 0x1e, 0x46, 0x69, 0x6e, 0x64, - 0x20, 0x75, 0x73, 0x65, 0x72, 0x73, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x73, 0x74, 0x61, 0x72, - 0x73, 0x20, 0x61, 0x6e, 0x20, 0x61, 0x73, 0x73, 0x65, 0x74, 0x1a, 0x2b, 0x52, 0x65, 0x74, 0x75, - 0x72, 0x6e, 0x73, 0x20, 0x61, 0x20, 0x6c, 0x69, 0x73, 0x74, 0x20, 0x6f, 0x66, 0x20, 0x75, 0x73, - 0x65, 0x72, 0x73, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x73, 0x74, 0x61, 0x72, 0x73, 0x20, 0x61, - 0x6e, 0x20, 0x61, 0x73, 0x73, 0x65, 0x74, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x21, 0x12, 0x1f, 0x2f, - 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2f, 0x7b, - 0x69, 0x64, 0x7d, 0x2f, 0x73, 0x74, 0x61, 0x72, 0x67, 0x61, 0x7a, 0x65, 0x72, 0x73, 0x12, 0x86, - 0x02, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x41, 0x73, 0x73, 0x65, 0x74, 0x56, 0x65, 0x72, 0x73, 0x69, - 0x6f, 0x6e, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x12, 0x37, 0x2e, 0x72, 0x61, 0x79, 0x73, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x73, 0x73, 0x65, 0x74, 0x42, 0x79, + 0x49, 0x44, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x6c, 0x0a, 0x0b, + 0x55, 0x70, 0x73, 0x65, 0x72, 0x74, 0x41, 0x73, 0x73, 0x65, 0x74, 0x12, 0x2c, 0x2e, 0x72, 0x61, + 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x73, 0x73, 0x2e, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x55, 0x70, 0x73, 0x65, 0x72, 0x74, 0x41, 0x73, 0x73, + 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2d, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x73, 0x73, 0x65, 0x74, 0x56, 0x65, 0x72, - 0x73, 0x69, 0x6f, 0x6e, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x38, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x63, 0x6f, - 0x6d, 0x70, 0x61, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x65, + 0x65, 0x74, 0x61, 0x31, 0x2e, 0x55, 0x70, 0x73, 0x65, 0x72, 0x74, 0x41, 0x73, 0x73, 0x65, 0x74, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x7b, 0x0a, 0x10, 0x55, 0x70, + 0x73, 0x65, 0x72, 0x74, 0x50, 0x61, 0x74, 0x63, 0x68, 0x41, 0x73, 0x73, 0x65, 0x74, 0x12, 0x31, + 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x73, + 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x55, 0x70, 0x73, 0x65, 0x72, 0x74, + 0x50, 0x61, 0x74, 0x63, 0x68, 0x41, 0x73, 0x73, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x32, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6d, + 0x70, 0x61, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x55, 0x70, 0x73, + 0x65, 0x72, 0x74, 0x50, 0x61, 0x74, 0x63, 0x68, 0x41, 0x73, 0x73, 0x65, 0x74, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x6c, 0x0a, 0x0b, 0x44, 0x65, 0x6c, 0x65, 0x74, + 0x65, 0x41, 0x73, 0x73, 0x65, 0x74, 0x12, 0x2c, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, + 0x6b, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x41, 0x73, 0x73, 0x65, 0x74, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2d, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, + 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, + 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x41, 0x73, 0x73, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x81, 0x01, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x41, 0x73, 0x73, + 0x65, 0x74, 0x53, 0x74, 0x61, 0x72, 0x67, 0x61, 0x7a, 0x65, 0x72, 0x73, 0x12, 0x33, 0x2e, 0x72, + 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x73, 0x73, 0x2e, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x73, 0x73, 0x65, 0x74, + 0x53, 0x74, 0x61, 0x72, 0x67, 0x61, 0x7a, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x34, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6d, + 0x70, 0x61, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, + 0x41, 0x73, 0x73, 0x65, 0x74, 0x53, 0x74, 0x61, 0x72, 0x67, 0x61, 0x7a, 0x65, 0x72, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x8d, 0x01, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x41, 0x73, 0x73, 0x65, 0x74, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x48, 0x69, 0x73, - 0x74, 0x6f, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x79, 0x92, 0x41, - 0x51, 0x0a, 0x05, 0x41, 0x73, 0x73, 0x65, 0x74, 0x12, 0x1f, 0x47, 0x65, 0x74, 0x20, 0x76, 0x65, - 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x68, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x20, 0x6f, 0x66, - 0x20, 0x61, 0x6e, 0x20, 0x61, 0x73, 0x73, 0x65, 0x74, 0x1a, 0x27, 0x52, 0x65, 0x74, 0x75, 0x72, - 0x6e, 0x73, 0x20, 0x61, 0x20, 0x6c, 0x69, 0x73, 0x74, 0x20, 0x6f, 0x66, 0x20, 0x61, 0x73, 0x73, - 0x65, 0x74, 0x20, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x68, 0x69, 0x73, 0x74, 0x6f, - 0x72, 0x79, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1f, 0x12, 0x1d, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0x2f, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x2f, 0x76, - 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0xfd, 0x01, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x41, - 0x73, 0x73, 0x65, 0x74, 0x42, 0x79, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x32, 0x2e, + 0x74, 0x6f, 0x72, 0x79, 0x12, 0x37, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, + 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, + 0x47, 0x65, 0x74, 0x41, 0x73, 0x73, 0x65, 0x74, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x48, + 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x38, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x73, 0x73, 0x65, - 0x74, 0x42, 0x79, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x33, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6d, - 0x70, 0x61, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, - 0x41, 0x73, 0x73, 0x65, 0x74, 0x42, 0x79, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x7f, 0x92, 0x41, 0x4d, 0x0a, 0x05, 0x41, 0x73, 0x73, - 0x65, 0x74, 0x12, 0x1c, 0x47, 0x65, 0x74, 0x20, 0x61, 0x73, 0x73, 0x65, 0x74, 0x27, 0x73, 0x20, - 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x20, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, - 0x1a, 0x26, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x73, 0x20, 0x61, 0x20, 0x73, 0x70, 0x65, 0x63, - 0x69, 0x66, 0x69, 0x63, 0x20, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x6f, 0x66, 0x20, - 0x61, 0x6e, 0x20, 0x61, 0x73, 0x73, 0x65, 0x74, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x29, 0x12, 0x27, - 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2f, - 0x7b, 0x69, 0x64, 0x7d, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x76, - 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x7d, 0x12, 0xe9, 0x01, 0x0a, 0x10, 0x43, 0x72, 0x65, 0x61, - 0x74, 0x65, 0x41, 0x73, 0x73, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x62, 0x65, 0x12, 0x31, 0x2e, 0x72, - 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x73, 0x73, 0x2e, - 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, 0x73, - 0x73, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x62, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x32, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x61, - 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, - 0x65, 0x41, 0x73, 0x73, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x62, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x6e, 0x92, 0x41, 0x3a, 0x0a, 0x05, 0x41, 0x73, 0x73, 0x65, 0x74, 0x12, - 0x14, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x20, 0x61, 0x73, 0x73, 0x65, 0x74, 0x27, 0x73, 0x20, - 0x70, 0x72, 0x6f, 0x62, 0x65, 0x1a, 0x1b, 0x41, 0x64, 0x64, 0x20, 0x61, 0x20, 0x6e, 0x65, 0x77, - 0x20, 0x70, 0x72, 0x6f, 0x62, 0x65, 0x20, 0x74, 0x6f, 0x20, 0x61, 0x6e, 0x20, 0x61, 0x73, 0x73, - 0x65, 0x74, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2b, 0x3a, 0x05, 0x70, 0x72, 0x6f, 0x62, 0x65, 0x22, - 0x22, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, - 0x2f, 0x7b, 0x61, 0x73, 0x73, 0x65, 0x74, 0x5f, 0x75, 0x72, 0x6e, 0x7d, 0x2f, 0x70, 0x72, 0x6f, - 0x62, 0x65, 0x73, 0x12, 0xfe, 0x01, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x53, - 0x74, 0x61, 0x72, 0x72, 0x65, 0x64, 0x41, 0x73, 0x73, 0x65, 0x74, 0x73, 0x12, 0x35, 0x2e, 0x72, + 0x74, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x7e, 0x0a, 0x11, 0x47, 0x65, 0x74, + 0x41, 0x73, 0x73, 0x65, 0x74, 0x42, 0x79, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x32, + 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x73, + 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x73, 0x73, + 0x65, 0x74, 0x42, 0x79, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x33, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x63, 0x6f, + 0x6d, 0x70, 0x61, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x65, + 0x74, 0x41, 0x73, 0x73, 0x65, 0x74, 0x42, 0x79, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x7b, 0x0a, 0x10, 0x43, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x41, 0x73, 0x73, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x62, 0x65, 0x12, 0x31, 0x2e, + 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x73, 0x73, + 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, + 0x73, 0x73, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x62, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x32, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6d, 0x70, + 0x61, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x41, 0x73, 0x73, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x62, 0x65, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x87, 0x01, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x55, 0x73, + 0x65, 0x72, 0x53, 0x74, 0x61, 0x72, 0x72, 0x65, 0x64, 0x41, 0x73, 0x73, 0x65, 0x74, 0x73, 0x12, + 0x35, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x61, + 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x55, 0x73, + 0x65, 0x72, 0x53, 0x74, 0x61, 0x72, 0x72, 0x65, 0x64, 0x41, 0x73, 0x73, 0x65, 0x74, 0x73, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x36, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, + 0x6b, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x2e, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x53, 0x74, 0x61, 0x72, 0x72, 0x65, 0x64, + 0x41, 0x73, 0x73, 0x65, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, + 0x12, 0x81, 0x01, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x4d, 0x79, 0x53, 0x74, 0x61, 0x72, 0x72, 0x65, + 0x64, 0x41, 0x73, 0x73, 0x65, 0x74, 0x73, 0x12, 0x33, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, + 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4d, 0x79, 0x53, 0x74, 0x61, 0x72, 0x72, 0x65, 0x64, 0x41, + 0x73, 0x73, 0x65, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x34, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x73, 0x73, 0x2e, - 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x53, - 0x74, 0x61, 0x72, 0x72, 0x65, 0x64, 0x41, 0x73, 0x73, 0x65, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x36, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x63, - 0x6f, 0x6d, 0x70, 0x61, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, - 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x53, 0x74, 0x61, 0x72, 0x72, 0x65, 0x64, 0x41, 0x73, 0x73, - 0x65, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x77, 0x92, 0x41, 0x4c, - 0x0a, 0x04, 0x55, 0x73, 0x65, 0x72, 0x0a, 0x04, 0x53, 0x74, 0x61, 0x72, 0x12, 0x1c, 0x47, 0x65, - 0x74, 0x20, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x20, 0x73, 0x74, 0x61, 0x72, 0x72, 0x65, 0x64, - 0x20, 0x62, 0x79, 0x20, 0x61, 0x20, 0x75, 0x73, 0x65, 0x72, 0x1a, 0x20, 0x47, 0x65, 0x74, 0x20, - 0x61, 0x6c, 0x6c, 0x20, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x20, 0x73, 0x74, 0x61, 0x72, 0x72, - 0x65, 0x64, 0x20, 0x62, 0x79, 0x20, 0x61, 0x20, 0x75, 0x73, 0x65, 0x72, 0x82, 0xd3, 0xe4, 0x93, - 0x02, 0x22, 0x12, 0x20, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x75, 0x73, 0x65, - 0x72, 0x73, 0x2f, 0x7b, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x7d, 0x2f, 0x73, 0x74, 0x61, - 0x72, 0x72, 0x65, 0x64, 0x12, 0xe0, 0x01, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x4d, 0x79, 0x53, 0x74, - 0x61, 0x72, 0x72, 0x65, 0x64, 0x41, 0x73, 0x73, 0x65, 0x74, 0x73, 0x12, 0x33, 0x2e, 0x72, 0x61, - 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x73, 0x73, 0x2e, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4d, 0x79, 0x53, 0x74, 0x61, 0x72, - 0x72, 0x65, 0x64, 0x41, 0x73, 0x73, 0x65, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x34, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6d, 0x70, - 0x61, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4d, - 0x79, 0x53, 0x74, 0x61, 0x72, 0x72, 0x65, 0x64, 0x41, 0x73, 0x73, 0x65, 0x74, 0x73, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x5f, 0x92, 0x41, 0x41, 0x0a, 0x04, 0x55, 0x73, 0x65, - 0x72, 0x0a, 0x04, 0x53, 0x74, 0x61, 0x72, 0x12, 0x15, 0x47, 0x65, 0x74, 0x20, 0x6d, 0x79, 0x20, - 0x73, 0x74, 0x61, 0x72, 0x72, 0x65, 0x64, 0x20, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x1a, 0x1c, - 0x47, 0x65, 0x74, 0x20, 0x61, 0x6c, 0x6c, 0x20, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x20, 0x73, - 0x74, 0x61, 0x72, 0x72, 0x65, 0x64, 0x20, 0x62, 0x79, 0x20, 0x6d, 0x65, 0x82, 0xd3, 0xe4, 0x93, - 0x02, 0x15, 0x12, 0x13, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x6d, 0x65, 0x2f, - 0x73, 0x74, 0x61, 0x72, 0x72, 0x65, 0x64, 0x12, 0xe5, 0x01, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x4d, - 0x79, 0x53, 0x74, 0x61, 0x72, 0x72, 0x65, 0x64, 0x41, 0x73, 0x73, 0x65, 0x74, 0x12, 0x32, 0x2e, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4d, 0x79, 0x53, 0x74, 0x61, + 0x72, 0x72, 0x65, 0x64, 0x41, 0x73, 0x73, 0x65, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x00, 0x12, 0x7e, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x4d, 0x79, 0x53, 0x74, 0x61, + 0x72, 0x72, 0x65, 0x64, 0x41, 0x73, 0x73, 0x65, 0x74, 0x12, 0x32, 0x2e, 0x72, 0x61, 0x79, 0x73, + 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4d, 0x79, 0x53, 0x74, 0x61, 0x72, 0x72, 0x65, + 0x64, 0x41, 0x73, 0x73, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x33, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4d, 0x79, 0x53, 0x74, - 0x61, 0x72, 0x72, 0x65, 0x64, 0x41, 0x73, 0x73, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x33, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6d, - 0x70, 0x61, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, - 0x4d, 0x79, 0x53, 0x74, 0x61, 0x72, 0x72, 0x65, 0x64, 0x41, 0x73, 0x73, 0x65, 0x74, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x67, 0x92, 0x41, 0x3e, 0x0a, 0x04, 0x55, 0x73, 0x65, - 0x72, 0x0a, 0x04, 0x53, 0x74, 0x61, 0x72, 0x12, 0x14, 0x47, 0x65, 0x74, 0x20, 0x6d, 0x79, 0x20, - 0x73, 0x74, 0x61, 0x72, 0x72, 0x65, 0x64, 0x20, 0x61, 0x73, 0x73, 0x65, 0x74, 0x1a, 0x1a, 0x47, - 0x65, 0x74, 0x20, 0x61, 0x6e, 0x20, 0x61, 0x73, 0x73, 0x65, 0x74, 0x20, 0x73, 0x74, 0x61, 0x72, - 0x72, 0x65, 0x64, 0x20, 0x62, 0x79, 0x20, 0x6d, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x20, 0x12, - 0x1e, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x6d, 0x65, 0x2f, 0x73, 0x74, 0x61, - 0x72, 0x72, 0x65, 0x64, 0x2f, 0x7b, 0x61, 0x73, 0x73, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x7d, 0x12, - 0xc5, 0x01, 0x0a, 0x09, 0x53, 0x74, 0x61, 0x72, 0x41, 0x73, 0x73, 0x65, 0x74, 0x12, 0x2a, 0x2e, + 0x61, 0x72, 0x72, 0x65, 0x64, 0x41, 0x73, 0x73, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x00, 0x12, 0x66, 0x0a, 0x09, 0x53, 0x74, 0x61, 0x72, 0x41, 0x73, 0x73, 0x65, + 0x74, 0x12, 0x2a, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6d, + 0x70, 0x61, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x53, 0x74, 0x61, + 0x72, 0x41, 0x73, 0x73, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2b, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x72, 0x41, 0x73, 0x73, - 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2b, 0x2e, 0x72, 0x61, 0x79, 0x73, + 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x6c, 0x0a, 0x0b, + 0x55, 0x6e, 0x73, 0x74, 0x61, 0x72, 0x41, 0x73, 0x73, 0x65, 0x74, 0x12, 0x2c, 0x2e, 0x72, 0x61, + 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x73, 0x73, 0x2e, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x55, 0x6e, 0x73, 0x74, 0x61, 0x72, 0x41, 0x73, 0x73, + 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2d, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x72, 0x41, 0x73, 0x73, 0x65, 0x74, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x5f, 0x92, 0x41, 0x36, 0x0a, 0x04, 0x55, 0x73, 0x65, - 0x72, 0x0a, 0x04, 0x53, 0x74, 0x61, 0x72, 0x12, 0x0d, 0x53, 0x74, 0x61, 0x72, 0x20, 0x61, 0x6e, - 0x20, 0x61, 0x73, 0x73, 0x65, 0x74, 0x1a, 0x19, 0x4d, 0x61, 0x72, 0x6b, 0x20, 0x61, 0x6e, 0x20, - 0x61, 0x73, 0x73, 0x65, 0x74, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x61, 0x20, 0x73, 0x74, 0x61, - 0x72, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x20, 0x1a, 0x1e, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0x2f, 0x6d, 0x65, 0x2f, 0x73, 0x74, 0x61, 0x72, 0x72, 0x65, 0x64, 0x2f, 0x7b, 0x61, 0x73, - 0x73, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x7d, 0x12, 0xcb, 0x01, 0x0a, 0x0b, 0x55, 0x6e, 0x73, 0x74, - 0x61, 0x72, 0x41, 0x73, 0x73, 0x65, 0x74, 0x12, 0x2c, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, - 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0x2e, 0x55, 0x6e, 0x73, 0x74, 0x61, 0x72, 0x41, 0x73, 0x73, 0x65, 0x74, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2d, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, - 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x2e, 0x55, 0x6e, 0x73, 0x74, 0x61, 0x72, 0x41, 0x73, 0x73, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x5f, 0x92, 0x41, 0x36, 0x0a, 0x04, 0x55, 0x73, 0x65, 0x72, 0x0a, - 0x04, 0x53, 0x74, 0x61, 0x72, 0x12, 0x0f, 0x55, 0x6e, 0x73, 0x74, 0x61, 0x72, 0x20, 0x61, 0x6e, - 0x20, 0x61, 0x73, 0x73, 0x65, 0x74, 0x1a, 0x17, 0x55, 0x6e, 0x6d, 0x61, 0x72, 0x6b, 0x20, 0x6d, - 0x79, 0x20, 0x73, 0x74, 0x61, 0x72, 0x72, 0x65, 0x64, 0x20, 0x61, 0x73, 0x73, 0x65, 0x74, 0x82, - 0xd3, 0xe4, 0x93, 0x02, 0x20, 0x2a, 0x1e, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, - 0x6d, 0x65, 0x2f, 0x73, 0x74, 0x61, 0x72, 0x72, 0x65, 0x64, 0x2f, 0x7b, 0x61, 0x73, 0x73, 0x65, - 0x74, 0x5f, 0x69, 0x64, 0x7d, 0x12, 0x89, 0x02, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x4d, 0x79, 0x44, - 0x69, 0x73, 0x63, 0x75, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x31, 0x2e, 0x72, 0x61, 0x79, + 0x65, 0x74, 0x61, 0x31, 0x2e, 0x55, 0x6e, 0x73, 0x74, 0x61, 0x72, 0x41, 0x73, 0x73, 0x65, 0x74, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x7b, 0x0a, 0x10, 0x47, 0x65, + 0x74, 0x4d, 0x79, 0x44, 0x69, 0x73, 0x63, 0x75, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x31, + 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x73, + 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4d, 0x79, 0x44, + 0x69, 0x73, 0x63, 0x75, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x32, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6d, + 0x70, 0x61, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, + 0x4d, 0x79, 0x44, 0x69, 0x73, 0x63, 0x75, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x75, 0x0a, 0x0e, 0x43, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x54, 0x61, 0x67, 0x41, 0x73, 0x73, 0x65, 0x74, 0x12, 0x2f, 0x2e, 0x72, 0x61, 0x79, 0x73, + 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x61, 0x67, 0x41, 0x73, + 0x73, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x30, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x73, 0x73, 0x2e, 0x76, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4d, 0x79, 0x44, 0x69, 0x73, 0x63, 0x75, - 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x32, 0x2e, - 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x73, 0x73, - 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4d, 0x79, 0x44, 0x69, - 0x73, 0x63, 0x75, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x8d, 0x01, 0x92, 0x41, 0x6b, 0x0a, 0x04, 0x55, 0x73, 0x65, 0x72, 0x0a, 0x0a, 0x44, - 0x69, 0x73, 0x63, 0x75, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1d, 0x47, 0x65, 0x74, 0x20, 0x61, - 0x6c, 0x6c, 0x20, 0x64, 0x69, 0x73, 0x63, 0x75, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x6f, - 0x66, 0x20, 0x61, 0x20, 0x75, 0x73, 0x65, 0x72, 0x1a, 0x38, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, - 0x73, 0x20, 0x61, 0x6c, 0x6c, 0x20, 0x64, 0x69, 0x73, 0x63, 0x75, 0x73, 0x73, 0x69, 0x6f, 0x6e, - 0x73, 0x20, 0x67, 0x69, 0x76, 0x65, 0x6e, 0x20, 0x70, 0x6f, 0x73, 0x73, 0x69, 0x62, 0x6c, 0x65, - 0x20, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x20, 0x6f, 0x66, 0x20, 0x61, 0x20, 0x75, 0x73, - 0x65, 0x72, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x19, 0x12, 0x17, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0x2f, 0x6d, 0x65, 0x2f, 0x64, 0x69, 0x73, 0x63, 0x75, 0x73, 0x73, 0x69, 0x6f, 0x6e, - 0x73, 0x12, 0xcc, 0x01, 0x0a, 0x0e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x61, 0x67, 0x41, - 0x73, 0x73, 0x65, 0x74, 0x12, 0x2f, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, - 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, - 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x61, 0x67, 0x41, 0x73, 0x73, 0x65, 0x74, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x30, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, - 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x61, 0x67, 0x41, 0x73, 0x73, 0x65, 0x74, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x57, 0x92, 0x41, 0x35, 0x0a, 0x03, 0x54, 0x61, - 0x67, 0x12, 0x0c, 0x54, 0x61, 0x67, 0x20, 0x61, 0x6e, 0x20, 0x61, 0x73, 0x73, 0x65, 0x74, 0x1a, - 0x20, 0x54, 0x61, 0x67, 0x20, 0x61, 0x6e, 0x20, 0x61, 0x73, 0x73, 0x65, 0x74, 0x20, 0x77, 0x69, - 0x74, 0x68, 0x20, 0x61, 0x20, 0x74, 0x61, 0x67, 0x20, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, - 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x19, 0x3a, 0x01, 0x2a, 0x22, 0x14, 0x2f, 0x76, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x2f, 0x74, 0x61, 0x67, 0x73, 0x2f, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, - 0x12, 0xb1, 0x02, 0x0a, 0x18, 0x47, 0x65, 0x74, 0x54, 0x61, 0x67, 0x42, 0x79, 0x41, 0x73, 0x73, - 0x65, 0x74, 0x41, 0x6e, 0x64, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x12, 0x39, 0x2e, - 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x73, 0x73, - 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x61, 0x67, 0x42, - 0x79, 0x41, 0x73, 0x73, 0x65, 0x74, 0x41, 0x6e, 0x64, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, - 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x3a, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, - 0x61, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x61, 0x67, 0x42, 0x79, 0x41, 0x73, 0x73, 0x65, - 0x74, 0x41, 0x6e, 0x64, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x9d, 0x01, 0x92, 0x41, 0x5a, 0x0a, 0x03, 0x54, 0x61, 0x67, 0x12, - 0x20, 0x46, 0x69, 0x6e, 0x64, 0x20, 0x61, 0x20, 0x74, 0x61, 0x67, 0x20, 0x62, 0x79, 0x20, 0x61, - 0x73, 0x73, 0x65, 0x74, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, - 0x65, 0x1a, 0x31, 0x46, 0x69, 0x6e, 0x64, 0x20, 0x61, 0x20, 0x73, 0x69, 0x6e, 0x67, 0x6c, 0x65, - 0x20, 0x74, 0x61, 0x67, 0x20, 0x75, 0x73, 0x69, 0x6e, 0x67, 0x20, 0x61, 0x73, 0x73, 0x65, 0x74, - 0x20, 0x69, 0x64, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, - 0x20, 0x75, 0x72, 0x6e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3a, 0x12, 0x38, 0x2f, 0x76, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x2f, 0x74, 0x61, 0x67, 0x73, 0x2f, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, - 0x2f, 0x7b, 0x61, 0x73, 0x73, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x7d, 0x2f, 0x74, 0x65, 0x6d, 0x70, - 0x6c, 0x61, 0x74, 0x65, 0x73, 0x2f, 0x7b, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x5f, - 0x75, 0x72, 0x6e, 0x7d, 0x12, 0xf4, 0x01, 0x0a, 0x0e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, - 0x61, 0x67, 0x41, 0x73, 0x73, 0x65, 0x74, 0x12, 0x2f, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x61, 0x67, 0x41, + 0x73, 0x73, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x93, + 0x01, 0x0a, 0x18, 0x47, 0x65, 0x74, 0x54, 0x61, 0x67, 0x42, 0x79, 0x41, 0x73, 0x73, 0x65, 0x74, + 0x41, 0x6e, 0x64, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x12, 0x39, 0x2e, 0x72, 0x61, + 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x73, 0x73, 0x2e, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x61, 0x67, 0x42, 0x79, 0x41, + 0x73, 0x73, 0x65, 0x74, 0x41, 0x6e, 0x64, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x3a, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, + 0x6b, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x61, 0x67, 0x42, 0x79, 0x41, 0x73, 0x73, 0x65, 0x74, 0x41, + 0x6e, 0x64, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x00, 0x12, 0x75, 0x0a, 0x0e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x61, + 0x67, 0x41, 0x73, 0x73, 0x65, 0x74, 0x12, 0x2f, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, + 0x6b, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x61, 0x67, 0x41, 0x73, 0x73, 0x65, 0x74, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x30, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x61, 0x67, 0x41, 0x73, 0x73, 0x65, - 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x30, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, - 0x61, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x61, 0x67, 0x41, 0x73, 0x73, - 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x7f, 0x92, 0x41, 0x39, 0x0a, - 0x03, 0x54, 0x61, 0x67, 0x12, 0x18, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x20, 0x61, 0x20, 0x74, - 0x61, 0x67, 0x20, 0x6f, 0x6e, 0x20, 0x61, 0x6e, 0x20, 0x61, 0x73, 0x73, 0x65, 0x74, 0x1a, 0x18, - 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x20, 0x61, 0x20, 0x74, 0x61, 0x67, 0x20, 0x6f, 0x6e, 0x20, - 0x61, 0x6e, 0x20, 0x61, 0x73, 0x73, 0x65, 0x74, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3d, 0x3a, 0x01, - 0x2a, 0x1a, 0x38, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x74, 0x61, 0x67, 0x73, - 0x2f, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2f, 0x7b, 0x61, 0x73, 0x73, 0x65, 0x74, 0x5f, 0x69, - 0x64, 0x7d, 0x2f, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x2f, 0x7b, 0x74, 0x65, - 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x5f, 0x75, 0x72, 0x6e, 0x7d, 0x12, 0xfc, 0x01, 0x0a, 0x0e, - 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x54, 0x61, 0x67, 0x41, 0x73, 0x73, 0x65, 0x74, 0x12, 0x2f, + 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x75, 0x0a, 0x0e, 0x44, + 0x65, 0x6c, 0x65, 0x74, 0x65, 0x54, 0x61, 0x67, 0x41, 0x73, 0x73, 0x65, 0x74, 0x12, 0x2f, 0x2e, + 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x73, 0x73, + 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x54, + 0x61, 0x67, 0x41, 0x73, 0x73, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x30, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, - 0x54, 0x61, 0x67, 0x41, 0x73, 0x73, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x30, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x61, - 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, - 0x65, 0x54, 0x61, 0x67, 0x41, 0x73, 0x73, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x86, 0x01, 0x92, 0x41, 0x43, 0x0a, 0x03, 0x54, 0x61, 0x67, 0x12, 0x18, 0x52, 0x65, - 0x6d, 0x6f, 0x76, 0x65, 0x20, 0x61, 0x20, 0x74, 0x61, 0x67, 0x20, 0x6f, 0x6e, 0x20, 0x61, 0x6e, - 0x20, 0x61, 0x73, 0x73, 0x65, 0x74, 0x1a, 0x22, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x20, 0x61, - 0x20, 0x74, 0x61, 0x67, 0x20, 0x6f, 0x6e, 0x20, 0x61, 0x6e, 0x20, 0x61, 0x73, 0x73, 0x65, 0x74, - 0x20, 0x69, 0x6e, 0x20, 0x61, 0x20, 0x74, 0x79, 0x70, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3a, - 0x2a, 0x38, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x74, 0x61, 0x67, 0x73, 0x2f, - 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2f, 0x7b, 0x61, 0x73, 0x73, 0x65, 0x74, 0x5f, 0x69, 0x64, - 0x7d, 0x2f, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x2f, 0x7b, 0x74, 0x65, 0x6d, - 0x70, 0x6c, 0x61, 0x74, 0x65, 0x5f, 0x75, 0x72, 0x6e, 0x7d, 0x12, 0xde, 0x01, 0x0a, 0x11, 0x47, - 0x65, 0x74, 0x41, 0x6c, 0x6c, 0x54, 0x61, 0x67, 0x73, 0x42, 0x79, 0x41, 0x73, 0x73, 0x65, 0x74, - 0x12, 0x32, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6d, 0x70, - 0x61, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x41, - 0x6c, 0x6c, 0x54, 0x61, 0x67, 0x73, 0x42, 0x79, 0x41, 0x73, 0x73, 0x65, 0x74, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x33, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, - 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, - 0x47, 0x65, 0x74, 0x41, 0x6c, 0x6c, 0x54, 0x61, 0x67, 0x73, 0x42, 0x79, 0x41, 0x73, 0x73, 0x65, - 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x60, 0x92, 0x41, 0x36, 0x0a, 0x03, - 0x54, 0x61, 0x67, 0x12, 0x13, 0x47, 0x65, 0x74, 0x20, 0x61, 0x6e, 0x20, 0x61, 0x73, 0x73, 0x65, - 0x74, 0x27, 0x73, 0x20, 0x74, 0x61, 0x67, 0x73, 0x1a, 0x1a, 0x47, 0x65, 0x74, 0x20, 0x61, 0x6c, - 0x6c, 0x20, 0x74, 0x61, 0x67, 0x73, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x61, 0x6e, 0x20, 0x61, 0x73, - 0x73, 0x65, 0x74, 0x73, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x21, 0x12, 0x1f, 0x2f, 0x76, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x2f, 0x74, 0x61, 0x67, 0x73, 0x2f, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, - 0x2f, 0x7b, 0x61, 0x73, 0x73, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x7d, 0x12, 0xe0, 0x01, 0x0a, 0x12, - 0x47, 0x65, 0x74, 0x41, 0x6c, 0x6c, 0x54, 0x61, 0x67, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, - 0x65, 0x73, 0x12, 0x33, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x63, 0x6f, - 0x6d, 0x70, 0x61, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x65, - 0x74, 0x41, 0x6c, 0x6c, 0x54, 0x61, 0x67, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x73, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x34, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, + 0x54, 0x61, 0x67, 0x41, 0x73, 0x73, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x00, 0x12, 0x7e, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x41, 0x6c, 0x6c, 0x54, 0x61, 0x67, 0x73, + 0x42, 0x79, 0x41, 0x73, 0x73, 0x65, 0x74, 0x12, 0x32, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x6c, 0x6c, 0x54, 0x61, 0x67, 0x54, 0x65, 0x6d, 0x70, - 0x6c, 0x61, 0x74, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x5f, 0x92, - 0x41, 0x3d, 0x0a, 0x03, 0x54, 0x61, 0x67, 0x12, 0x15, 0x47, 0x65, 0x74, 0x20, 0x61, 0x6c, 0x6c, - 0x20, 0x74, 0x61, 0x67, 0x20, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x1a, 0x1f, - 0x47, 0x65, 0x74, 0x20, 0x61, 0x6c, 0x6c, 0x20, 0x61, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, - 0x65, 0x20, 0x74, 0x61, 0x67, 0x20, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x82, - 0xd3, 0xe4, 0x93, 0x02, 0x19, 0x12, 0x17, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, - 0x74, 0x61, 0x67, 0x73, 0x2f, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x12, 0xd6, - 0x01, 0x0a, 0x11, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x61, 0x67, 0x54, 0x65, 0x6d, 0x70, - 0x6c, 0x61, 0x74, 0x65, 0x12, 0x32, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, - 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, - 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x61, 0x67, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, - 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x33, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, - 0x61, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x61, 0x67, 0x54, 0x65, 0x6d, - 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x58, 0x92, - 0x41, 0x33, 0x0a, 0x03, 0x54, 0x61, 0x67, 0x12, 0x11, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x20, - 0x61, 0x20, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x1a, 0x19, 0x43, 0x72, 0x65, 0x61, - 0x74, 0x65, 0x20, 0x61, 0x20, 0x6e, 0x65, 0x77, 0x20, 0x74, 0x61, 0x67, 0x20, 0x74, 0x65, 0x6d, - 0x70, 0x6c, 0x61, 0x74, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1c, 0x3a, 0x01, 0x2a, 0x22, 0x17, - 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x74, 0x61, 0x67, 0x73, 0x2f, 0x74, 0x65, - 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x12, 0xda, 0x01, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x54, - 0x61, 0x67, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x12, 0x2f, 0x2e, 0x72, 0x61, 0x79, - 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x73, 0x73, 0x2e, 0x76, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x61, 0x67, 0x54, 0x65, 0x6d, 0x70, - 0x6c, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x30, 0x2e, 0x72, 0x61, + 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x6c, 0x6c, 0x54, 0x61, 0x67, 0x73, 0x42, 0x79, 0x41, + 0x73, 0x73, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x33, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x73, 0x73, 0x2e, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x61, 0x67, 0x54, 0x65, 0x6d, - 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x65, 0x92, - 0x41, 0x34, 0x0a, 0x03, 0x54, 0x61, 0x67, 0x12, 0x12, 0x47, 0x65, 0x74, 0x20, 0x61, 0x20, 0x74, - 0x61, 0x67, 0x20, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x1a, 0x19, 0x47, 0x65, 0x74, - 0x20, 0x61, 0x20, 0x73, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x20, 0x74, 0x61, 0x67, 0x20, 0x74, 0x65, - 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x28, 0x12, 0x26, 0x2f, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x74, 0x61, 0x67, 0x73, 0x2f, 0x74, 0x65, 0x6d, 0x70, - 0x6c, 0x61, 0x74, 0x65, 0x73, 0x2f, 0x7b, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x5f, - 0x75, 0x72, 0x6e, 0x7d, 0x12, 0xeb, 0x01, 0x0a, 0x11, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, - 0x61, 0x67, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x12, 0x32, 0x2e, 0x72, 0x61, 0x79, - 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x73, 0x73, 0x2e, 0x76, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x61, 0x67, 0x54, - 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x33, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x6c, 0x6c, 0x54, 0x61, 0x67, + 0x73, 0x42, 0x79, 0x41, 0x73, 0x73, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x00, 0x12, 0x81, 0x01, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x41, 0x6c, 0x6c, 0x54, 0x61, 0x67, + 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x12, 0x33, 0x2e, 0x72, 0x61, 0x79, 0x73, + 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x6c, 0x6c, 0x54, 0x61, 0x67, 0x54, 0x65, + 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x34, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x73, - 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, - 0x54, 0x61, 0x67, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x6d, 0x92, 0x41, 0x39, 0x0a, 0x03, 0x54, 0x61, 0x67, 0x12, 0x11, 0x55, - 0x70, 0x64, 0x61, 0x74, 0x65, 0x20, 0x61, 0x20, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, - 0x1a, 0x1f, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x20, 0x61, 0x6e, 0x20, 0x65, 0x78, 0x69, 0x73, - 0x74, 0x69, 0x6e, 0x67, 0x20, 0x74, 0x61, 0x67, 0x20, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, - 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2b, 0x3a, 0x01, 0x2a, 0x1a, 0x26, 0x2f, 0x76, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x2f, 0x74, 0x61, 0x67, 0x73, 0x2f, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, - 0x74, 0x65, 0x73, 0x2f, 0x7b, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x5f, 0x75, 0x72, - 0x6e, 0x7d, 0x12, 0xe9, 0x01, 0x0a, 0x11, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x54, 0x61, 0x67, - 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x12, 0x32, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, + 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x6c, 0x6c, + 0x54, 0x61, 0x67, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x7e, 0x0a, 0x11, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x54, 0x61, 0x67, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x12, 0x32, 0x2e, 0x72, 0x61, + 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x73, 0x73, 0x2e, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x61, 0x67, + 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x33, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x61, + 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x54, 0x61, 0x67, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x75, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x54, 0x61, 0x67, + 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x12, 0x2f, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x54, 0x61, 0x67, 0x54, 0x65, 0x6d, - 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x33, 0x2e, 0x72, - 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x73, 0x73, 0x2e, - 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x54, 0x61, - 0x67, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x6b, 0x92, 0x41, 0x3a, 0x0a, 0x03, 0x54, 0x61, 0x67, 0x12, 0x15, 0x44, 0x65, 0x6c, - 0x65, 0x74, 0x65, 0x20, 0x61, 0x20, 0x74, 0x61, 0x67, 0x20, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, - 0x74, 0x65, 0x1a, 0x1c, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x20, 0x61, 0x20, 0x73, 0x69, 0x6e, - 0x67, 0x6c, 0x65, 0x20, 0x74, 0x61, 0x67, 0x20, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, - 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x28, 0x2a, 0x26, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x2f, 0x74, 0x61, 0x67, 0x73, 0x2f, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x2f, - 0x7b, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x5f, 0x75, 0x72, 0x6e, 0x7d, 0x12, 0xf0, - 0x01, 0x0a, 0x0f, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, - 0x63, 0x65, 0x12, 0x30, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x63, 0x6f, - 0x6d, 0x70, 0x61, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x72, - 0x65, 0x61, 0x74, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x31, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, - 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, - 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x78, 0x92, 0x41, 0x57, 0x0a, 0x09, 0x4e, 0x61, - 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x12, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x20, - 0x61, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x1a, 0x36, 0x43, 0x72, 0x65, - 0x61, 0x74, 0x65, 0x20, 0x61, 0x20, 0x6e, 0x65, 0x77, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, - 0x61, 0x63, 0x65, 0x2c, 0x20, 0x74, 0x68, 0x72, 0x6f, 0x77, 0x73, 0x20, 0x65, 0x72, 0x72, 0x6f, - 0x72, 0x20, 0x69, 0x66, 0x20, 0x61, 0x6c, 0x72, 0x65, 0x61, 0x64, 0x79, 0x20, 0x65, 0x78, 0x69, - 0x73, 0x74, 0x73, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x18, 0x3a, 0x01, 0x2a, 0x22, 0x13, 0x2f, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, - 0x73, 0x12, 0x81, 0x02, 0x0a, 0x0c, 0x47, 0x65, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, - 0x63, 0x65, 0x12, 0x2d, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x63, 0x6f, - 0x6d, 0x70, 0x61, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x65, - 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x2e, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6d, - 0x70, 0x61, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, - 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x91, 0x01, 0x92, 0x41, 0x6d, 0x0a, 0x09, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, - 0x63, 0x65, 0x12, 0x0d, 0x47, 0x65, 0x74, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, - 0x65, 0x1a, 0x51, 0x46, 0x65, 0x74, 0x63, 0x68, 0x20, 0x61, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x73, - 0x70, 0x61, 0x63, 0x65, 0x20, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x2c, 0x20, 0x74, 0x68, - 0x72, 0x6f, 0x77, 0x73, 0x20, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x20, 0x69, 0x66, 0x20, 0x64, 0x6f, - 0x65, 0x73, 0x6e, 0x27, 0x74, 0x20, 0x65, 0x78, 0x69, 0x73, 0x74, 0x73, 0x2e, 0x20, 0x55, 0x73, - 0x65, 0x20, 0x69, 0x64, 0x20, 0x6f, 0x72, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x20, 0x61, 0x73, 0x20, - 0x75, 0x72, 0x6e, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1b, 0x12, 0x19, 0x2f, 0x76, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x2f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x2f, - 0x7b, 0x75, 0x72, 0x6e, 0x7d, 0x12, 0x93, 0x02, 0x0a, 0x0f, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, - 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x30, 0x2e, 0x72, 0x61, 0x79, 0x73, + 0x74, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x61, 0x67, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, + 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x30, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x73, - 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x31, 0x2e, 0x72, 0x61, + 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x61, 0x67, 0x54, 0x65, 0x6d, 0x70, 0x6c, + 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x7e, 0x0a, + 0x11, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x61, 0x67, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, + 0x74, 0x65, 0x12, 0x32, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x63, 0x6f, + 0x6d, 0x70, 0x61, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x55, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x54, 0x61, 0x67, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x33, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, + 0x6b, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x61, 0x67, 0x54, 0x65, 0x6d, 0x70, 0x6c, + 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x7e, 0x0a, + 0x11, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x54, 0x61, 0x67, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, + 0x74, 0x65, 0x12, 0x32, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x63, 0x6f, + 0x6d, 0x70, 0x61, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x44, 0x65, + 0x6c, 0x65, 0x74, 0x65, 0x54, 0x61, 0x67, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x33, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, + 0x6b, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x54, 0x61, 0x67, 0x54, 0x65, 0x6d, 0x70, 0x6c, + 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x78, 0x0a, + 0x0f, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, + 0x12, 0x30, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6d, 0x70, + 0x61, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x31, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x63, 0x6f, + 0x6d, 0x70, 0x61, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x6f, 0x0a, 0x0c, 0x47, 0x65, 0x74, 0x4e, 0x61, + 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x2d, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, + 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2e, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, + 0x6b, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x78, 0x0a, 0x0f, 0x55, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x30, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4e, 0x61, 0x6d, - 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x9a, - 0x01, 0x92, 0x41, 0x73, 0x0a, 0x09, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, - 0x10, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, - 0x65, 0x1a, 0x54, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x20, 0x61, 0x6e, 0x20, 0x65, 0x78, 0x69, - 0x73, 0x74, 0x69, 0x6e, 0x67, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x2c, - 0x20, 0x74, 0x68, 0x72, 0x6f, 0x77, 0x73, 0x20, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x20, 0x69, 0x66, - 0x20, 0x64, 0x6f, 0x65, 0x73, 0x6e, 0x27, 0x74, 0x20, 0x65, 0x78, 0x69, 0x73, 0x74, 0x73, 0x2e, - 0x20, 0x55, 0x73, 0x65, 0x20, 0x69, 0x64, 0x20, 0x6f, 0x72, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x20, - 0x61, 0x73, 0x20, 0x75, 0x72, 0x6e, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1e, 0x3a, 0x01, 0x2a, - 0x1a, 0x19, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x6e, 0x61, 0x6d, 0x65, 0x73, - 0x70, 0x61, 0x63, 0x65, 0x73, 0x2f, 0x7b, 0x75, 0x72, 0x6e, 0x7d, 0x12, 0xcb, 0x01, 0x0a, 0x0e, - 0x4c, 0x69, 0x73, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x12, 0x2f, - 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x73, - 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4e, 0x61, - 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x30, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x61, - 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4e, - 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x56, 0x92, 0x41, 0x38, 0x0a, 0x09, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, - 0x65, 0x12, 0x0e, 0x4c, 0x69, 0x73, 0x74, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, - 0x65, 0x1a, 0x1b, 0x4c, 0x69, 0x73, 0x74, 0x20, 0x61, 0x6c, 0x6c, 0x20, 0x63, 0x72, 0x65, 0x61, - 0x74, 0x65, 0x64, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x82, 0xd3, - 0xe4, 0x93, 0x02, 0x15, 0x12, 0x13, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x6e, - 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x42, 0xbe, 0x05, 0x92, 0x41, 0xcc, 0x04, - 0x12, 0x9b, 0x01, 0x0a, 0x07, 0x43, 0x6f, 0x6d, 0x70, 0x61, 0x73, 0x73, 0x12, 0x3c, 0x44, 0x6f, - 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6f, 0x66, 0x20, 0x6f, - 0x75, 0x72, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x61, 0x73, 0x73, 0x20, 0x41, 0x50, 0x49, 0x20, 0x77, - 0x69, 0x74, 0x68, 0x20, 0x67, 0x52, 0x50, 0x43, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x67, 0x52, 0x50, - 0x43, 0x2d, 0x47, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x2a, 0x4b, 0x0a, 0x12, 0x41, 0x70, - 0x61, 0x63, 0x68, 0x65, 0x20, 0x4c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x20, 0x32, 0x2e, 0x30, - 0x12, 0x35, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, - 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2f, 0x63, 0x6f, - 0x6d, 0x70, 0x61, 0x73, 0x73, 0x2f, 0x62, 0x6c, 0x6f, 0x62, 0x2f, 0x6d, 0x61, 0x69, 0x6e, 0x2f, - 0x4c, 0x49, 0x43, 0x45, 0x4e, 0x53, 0x45, 0x32, 0x05, 0x30, 0x2e, 0x33, 0x2e, 0x30, 0x2a, 0x02, - 0x01, 0x02, 0x32, 0x10, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, - 0x6a, 0x73, 0x6f, 0x6e, 0x3a, 0x10, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x2f, 0x6a, 0x73, 0x6f, 0x6e, 0x52, 0x51, 0x0a, 0x03, 0x34, 0x30, 0x30, 0x12, 0x4a, 0x0a, - 0x30, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x65, 0x64, 0x20, 0x77, 0x68, 0x65, 0x6e, 0x20, 0x74, - 0x68, 0x65, 0x20, 0x64, 0x61, 0x74, 0x61, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x75, 0x73, 0x65, - 0x72, 0x20, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x20, 0x69, 0x73, 0x20, 0x77, 0x72, 0x6f, 0x6e, 0x67, - 0x2e, 0x12, 0x16, 0x0a, 0x14, 0x1a, 0x12, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x72, - 0x70, 0x63, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x4b, 0x0a, 0x03, 0x34, 0x30, 0x34, - 0x12, 0x44, 0x0a, 0x2a, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x65, 0x64, 0x20, 0x77, 0x68, 0x65, - 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x20, 0x64, - 0x6f, 0x65, 0x73, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x65, 0x78, 0x69, 0x73, 0x74, 0x2e, 0x12, 0x16, - 0x0a, 0x14, 0x1a, 0x12, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x72, 0x70, 0x63, 0x2e, - 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x4a, 0x0a, 0x03, 0x34, 0x30, 0x39, 0x12, 0x43, 0x0a, - 0x29, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x65, 0x64, 0x20, 0x77, 0x68, 0x65, 0x6e, 0x20, 0x74, - 0x68, 0x65, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x20, 0x61, 0x6c, 0x72, 0x65, - 0x61, 0x64, 0x79, 0x20, 0x65, 0x78, 0x69, 0x73, 0x74, 0x2e, 0x12, 0x16, 0x0a, 0x14, 0x1a, 0x12, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x74, 0x61, 0x74, - 0x75, 0x73, 0x52, 0x5c, 0x0a, 0x03, 0x35, 0x30, 0x30, 0x12, 0x55, 0x0a, 0x3b, 0x52, 0x65, 0x74, - 0x75, 0x72, 0x6e, 0x65, 0x64, 0x20, 0x77, 0x68, 0x65, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x72, 0x65, - 0x73, 0x20, 0x69, 0x73, 0x20, 0x73, 0x6f, 0x6d, 0x65, 0x74, 0x68, 0x69, 0x6e, 0x67, 0x20, 0x77, - 0x72, 0x6f, 0x6e, 0x67, 0x20, 0x6f, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x73, 0x65, 0x72, 0x76, - 0x65, 0x72, 0x20, 0x73, 0x69, 0x64, 0x65, 0x2e, 0x12, 0x16, 0x0a, 0x14, 0x1a, 0x12, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, - 0x72, 0x3a, 0x0a, 0x12, 0x4d, 0x6f, 0x72, 0x65, 0x20, 0x61, 0x62, 0x6f, 0x75, 0x74, 0x20, 0x43, - 0x6f, 0x6d, 0x70, 0x61, 0x73, 0x73, 0x12, 0x24, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, - 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x67, 0x69, 0x74, 0x62, 0x6f, 0x6f, 0x6b, - 0x2e, 0x69, 0x6f, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x73, 0x73, 0x2f, 0x0a, 0x1a, 0x69, 0x6f, - 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x6e, - 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x73, 0x73, 0x42, 0x13, 0x43, 0x6f, 0x6d, 0x70, 0x61, 0x73, - 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, - 0x39, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x72, 0x61, 0x79, 0x73, - 0x74, 0x61, 0x63, 0x6b, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x6e, 0x2f, 0x63, 0x6f, 0x6d, 0x70, - 0x61, 0x73, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x63, 0x6f, 0x6d, 0x70, - 0x61, 0x73, 0x73, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x33, + 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x31, 0x2e, + 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x73, 0x73, + 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4e, + 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x00, 0x12, 0x75, 0x0a, 0x0e, 0x4c, 0x69, 0x73, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, + 0x61, 0x63, 0x65, 0x73, 0x12, 0x2f, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, + 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, + 0x4c, 0x69, 0x73, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x30, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, + 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0xe0, 0x01, 0x0a, 0x1c, 0x63, 0x6f, + 0x6d, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x61, + 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, 0x0c, 0x53, 0x65, 0x72, 0x76, + 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x30, 0x67, 0x69, 0x74, 0x68, + 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2f, + 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x73, 0x73, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x63, 0x6f, + 0x6d, 0x70, 0x61, 0x73, 0x73, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x52, + 0x43, 0x58, 0xaa, 0x02, 0x18, 0x52, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x43, 0x6f, + 0x6d, 0x70, 0x61, 0x73, 0x73, 0x2e, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x18, + 0x52, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x5c, 0x43, 0x6f, 0x6d, 0x70, 0x61, 0x73, 0x73, + 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xe2, 0x02, 0x24, 0x52, 0x61, 0x79, 0x73, 0x74, + 0x61, 0x63, 0x6b, 0x5c, 0x43, 0x6f, 0x6d, 0x70, 0x61, 0x73, 0x73, 0x5c, 0x56, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, + 0x02, 0x1a, 0x52, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x3a, 0x3a, 0x43, 0x6f, 0x6d, 0x70, + 0x61, 0x73, 0x73, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/proto/raystack/compass/v1beta1/service.pb.validate.go b/proto/compassv1beta1/service.pb.validate.go similarity index 100% rename from proto/raystack/compass/v1beta1/service.pb.validate.go rename to proto/compassv1beta1/service.pb.validate.go diff --git a/proto/raystack/compass/v1beta1/service.pb.gw.go b/proto/raystack/compass/v1beta1/service.pb.gw.go deleted file mode 100644 index f4d91ab1..00000000 --- a/proto/raystack/compass/v1beta1/service.pb.gw.go +++ /dev/null @@ -1,4571 +0,0 @@ -// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. -// source: raystack/compass/v1beta1/service.proto - -/* -Package compassv1beta1 is a reverse proxy. - -It translates gRPC into RESTful JSON APIs. -*/ -package compassv1beta1 - -import ( - "context" - "io" - "net/http" - - "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" - "github.com/grpc-ecosystem/grpc-gateway/v2/utilities" - "google.golang.org/grpc" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/grpclog" - "google.golang.org/grpc/metadata" - "google.golang.org/grpc/status" - "google.golang.org/protobuf/proto" -) - -// Suppress "imported and not used" errors -var _ codes.Code -var _ io.Reader -var _ status.Status -var _ = runtime.String -var _ = utilities.NewDoubleArray -var _ = metadata.Join - -var ( - filter_CompassService_GetAllDiscussions_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) - -func request_CompassService_GetAllDiscussions_0(ctx context.Context, marshaler runtime.Marshaler, client CompassServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetAllDiscussionsRequest - var metadata runtime.ServerMetadata - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_CompassService_GetAllDiscussions_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.GetAllDiscussions(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_CompassService_GetAllDiscussions_0(ctx context.Context, marshaler runtime.Marshaler, server CompassServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetAllDiscussionsRequest - var metadata runtime.ServerMetadata - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_CompassService_GetAllDiscussions_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.GetAllDiscussions(ctx, &protoReq) - return msg, metadata, err - -} - -func request_CompassService_CreateDiscussion_0(ctx context.Context, marshaler runtime.Marshaler, client CompassServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq CreateDiscussionRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.CreateDiscussion(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_CompassService_CreateDiscussion_0(ctx context.Context, marshaler runtime.Marshaler, server CompassServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq CreateDiscussionRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.CreateDiscussion(ctx, &protoReq) - return msg, metadata, err - -} - -func request_CompassService_GetDiscussion_0(ctx context.Context, marshaler runtime.Marshaler, client CompassServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetDiscussionRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["id"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") - } - - protoReq.Id, err = runtime.String(val) - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) - } - - msg, err := client.GetDiscussion(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_CompassService_GetDiscussion_0(ctx context.Context, marshaler runtime.Marshaler, server CompassServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetDiscussionRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["id"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") - } - - protoReq.Id, err = runtime.String(val) - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) - } - - msg, err := server.GetDiscussion(ctx, &protoReq) - return msg, metadata, err - -} - -func request_CompassService_PatchDiscussion_0(ctx context.Context, marshaler runtime.Marshaler, client CompassServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq PatchDiscussionRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["id"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") - } - - protoReq.Id, err = runtime.String(val) - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) - } - - msg, err := client.PatchDiscussion(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_CompassService_PatchDiscussion_0(ctx context.Context, marshaler runtime.Marshaler, server CompassServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq PatchDiscussionRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["id"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") - } - - protoReq.Id, err = runtime.String(val) - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) - } - - msg, err := server.PatchDiscussion(ctx, &protoReq) - return msg, metadata, err - -} - -func request_CompassService_CreateComment_0(ctx context.Context, marshaler runtime.Marshaler, client CompassServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq CreateCommentRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["discussion_id"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "discussion_id") - } - - protoReq.DiscussionId, err = runtime.String(val) - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "discussion_id", err) - } - - msg, err := client.CreateComment(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_CompassService_CreateComment_0(ctx context.Context, marshaler runtime.Marshaler, server CompassServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq CreateCommentRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["discussion_id"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "discussion_id") - } - - protoReq.DiscussionId, err = runtime.String(val) - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "discussion_id", err) - } - - msg, err := server.CreateComment(ctx, &protoReq) - return msg, metadata, err - -} - -var ( - filter_CompassService_GetAllComments_0 = &utilities.DoubleArray{Encoding: map[string]int{"discussion_id": 0, "discussionId": 1}, Base: []int{1, 1, 2, 0, 0}, Check: []int{0, 1, 1, 2, 3}} -) - -func request_CompassService_GetAllComments_0(ctx context.Context, marshaler runtime.Marshaler, client CompassServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetAllCommentsRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["discussion_id"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "discussion_id") - } - - protoReq.DiscussionId, err = runtime.String(val) - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "discussion_id", err) - } - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_CompassService_GetAllComments_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.GetAllComments(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_CompassService_GetAllComments_0(ctx context.Context, marshaler runtime.Marshaler, server CompassServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetAllCommentsRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["discussion_id"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "discussion_id") - } - - protoReq.DiscussionId, err = runtime.String(val) - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "discussion_id", err) - } - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_CompassService_GetAllComments_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.GetAllComments(ctx, &protoReq) - return msg, metadata, err - -} - -func request_CompassService_GetComment_0(ctx context.Context, marshaler runtime.Marshaler, client CompassServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetCommentRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["discussion_id"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "discussion_id") - } - - protoReq.DiscussionId, err = runtime.String(val) - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "discussion_id", err) - } - - val, ok = pathParams["id"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") - } - - protoReq.Id, err = runtime.String(val) - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) - } - - msg, err := client.GetComment(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_CompassService_GetComment_0(ctx context.Context, marshaler runtime.Marshaler, server CompassServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetCommentRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["discussion_id"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "discussion_id") - } - - protoReq.DiscussionId, err = runtime.String(val) - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "discussion_id", err) - } - - val, ok = pathParams["id"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") - } - - protoReq.Id, err = runtime.String(val) - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) - } - - msg, err := server.GetComment(ctx, &protoReq) - return msg, metadata, err - -} - -func request_CompassService_UpdateComment_0(ctx context.Context, marshaler runtime.Marshaler, client CompassServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq UpdateCommentRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["discussion_id"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "discussion_id") - } - - protoReq.DiscussionId, err = runtime.String(val) - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "discussion_id", err) - } - - val, ok = pathParams["id"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") - } - - protoReq.Id, err = runtime.String(val) - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) - } - - msg, err := client.UpdateComment(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_CompassService_UpdateComment_0(ctx context.Context, marshaler runtime.Marshaler, server CompassServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq UpdateCommentRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["discussion_id"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "discussion_id") - } - - protoReq.DiscussionId, err = runtime.String(val) - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "discussion_id", err) - } - - val, ok = pathParams["id"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") - } - - protoReq.Id, err = runtime.String(val) - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) - } - - msg, err := server.UpdateComment(ctx, &protoReq) - return msg, metadata, err - -} - -func request_CompassService_DeleteComment_0(ctx context.Context, marshaler runtime.Marshaler, client CompassServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq DeleteCommentRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["discussion_id"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "discussion_id") - } - - protoReq.DiscussionId, err = runtime.String(val) - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "discussion_id", err) - } - - val, ok = pathParams["id"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") - } - - protoReq.Id, err = runtime.String(val) - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) - } - - msg, err := client.DeleteComment(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_CompassService_DeleteComment_0(ctx context.Context, marshaler runtime.Marshaler, server CompassServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq DeleteCommentRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["discussion_id"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "discussion_id") - } - - protoReq.DiscussionId, err = runtime.String(val) - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "discussion_id", err) - } - - val, ok = pathParams["id"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") - } - - protoReq.Id, err = runtime.String(val) - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) - } - - msg, err := server.DeleteComment(ctx, &protoReq) - return msg, metadata, err - -} - -var ( - filter_CompassService_SearchAssets_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) - -func request_CompassService_SearchAssets_0(ctx context.Context, marshaler runtime.Marshaler, client CompassServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq SearchAssetsRequest - var metadata runtime.ServerMetadata - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_CompassService_SearchAssets_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.SearchAssets(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_CompassService_SearchAssets_0(ctx context.Context, marshaler runtime.Marshaler, server CompassServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq SearchAssetsRequest - var metadata runtime.ServerMetadata - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_CompassService_SearchAssets_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.SearchAssets(ctx, &protoReq) - return msg, metadata, err - -} - -var ( - filter_CompassService_SuggestAssets_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) - -func request_CompassService_SuggestAssets_0(ctx context.Context, marshaler runtime.Marshaler, client CompassServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq SuggestAssetsRequest - var metadata runtime.ServerMetadata - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_CompassService_SuggestAssets_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.SuggestAssets(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_CompassService_SuggestAssets_0(ctx context.Context, marshaler runtime.Marshaler, server CompassServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq SuggestAssetsRequest - var metadata runtime.ServerMetadata - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_CompassService_SuggestAssets_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.SuggestAssets(ctx, &protoReq) - return msg, metadata, err - -} - -var ( - filter_CompassService_GroupAssets_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) - -func request_CompassService_GroupAssets_0(ctx context.Context, marshaler runtime.Marshaler, client CompassServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GroupAssetsRequest - var metadata runtime.ServerMetadata - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_CompassService_GroupAssets_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.GroupAssets(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_CompassService_GroupAssets_0(ctx context.Context, marshaler runtime.Marshaler, server CompassServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GroupAssetsRequest - var metadata runtime.ServerMetadata - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_CompassService_GroupAssets_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.GroupAssets(ctx, &protoReq) - return msg, metadata, err - -} - -var ( - filter_CompassService_GetGraph_0 = &utilities.DoubleArray{Encoding: map[string]int{"urn": 0}, Base: []int{1, 2, 0, 0}, Check: []int{0, 1, 2, 2}} -) - -func request_CompassService_GetGraph_0(ctx context.Context, marshaler runtime.Marshaler, client CompassServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetGraphRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["urn"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "urn") - } - - protoReq.Urn, err = runtime.String(val) - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "urn", err) - } - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_CompassService_GetGraph_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.GetGraph(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_CompassService_GetGraph_0(ctx context.Context, marshaler runtime.Marshaler, server CompassServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetGraphRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["urn"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "urn") - } - - protoReq.Urn, err = runtime.String(val) - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "urn", err) - } - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_CompassService_GetGraph_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.GetGraph(ctx, &protoReq) - return msg, metadata, err - -} - -var ( - filter_CompassService_GetAllTypes_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) - -func request_CompassService_GetAllTypes_0(ctx context.Context, marshaler runtime.Marshaler, client CompassServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetAllTypesRequest - var metadata runtime.ServerMetadata - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_CompassService_GetAllTypes_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.GetAllTypes(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_CompassService_GetAllTypes_0(ctx context.Context, marshaler runtime.Marshaler, server CompassServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetAllTypesRequest - var metadata runtime.ServerMetadata - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_CompassService_GetAllTypes_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.GetAllTypes(ctx, &protoReq) - return msg, metadata, err - -} - -var ( - filter_CompassService_GetAllAssets_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) - -func request_CompassService_GetAllAssets_0(ctx context.Context, marshaler runtime.Marshaler, client CompassServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetAllAssetsRequest - var metadata runtime.ServerMetadata - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_CompassService_GetAllAssets_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.GetAllAssets(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_CompassService_GetAllAssets_0(ctx context.Context, marshaler runtime.Marshaler, server CompassServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetAllAssetsRequest - var metadata runtime.ServerMetadata - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_CompassService_GetAllAssets_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.GetAllAssets(ctx, &protoReq) - return msg, metadata, err - -} - -func request_CompassService_GetAssetByID_0(ctx context.Context, marshaler runtime.Marshaler, client CompassServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetAssetByIDRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["id"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") - } - - protoReq.Id, err = runtime.String(val) - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) - } - - msg, err := client.GetAssetByID(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_CompassService_GetAssetByID_0(ctx context.Context, marshaler runtime.Marshaler, server CompassServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetAssetByIDRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["id"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") - } - - protoReq.Id, err = runtime.String(val) - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) - } - - msg, err := server.GetAssetByID(ctx, &protoReq) - return msg, metadata, err - -} - -func request_CompassService_UpsertAsset_0(ctx context.Context, marshaler runtime.Marshaler, client CompassServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq UpsertAssetRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.UpsertAsset(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_CompassService_UpsertAsset_0(ctx context.Context, marshaler runtime.Marshaler, server CompassServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq UpsertAssetRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.UpsertAsset(ctx, &protoReq) - return msg, metadata, err - -} - -func request_CompassService_UpsertPatchAsset_0(ctx context.Context, marshaler runtime.Marshaler, client CompassServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq UpsertPatchAssetRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.UpsertPatchAsset(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_CompassService_UpsertPatchAsset_0(ctx context.Context, marshaler runtime.Marshaler, server CompassServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq UpsertPatchAssetRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.UpsertPatchAsset(ctx, &protoReq) - return msg, metadata, err - -} - -func request_CompassService_DeleteAsset_0(ctx context.Context, marshaler runtime.Marshaler, client CompassServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq DeleteAssetRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["id"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") - } - - protoReq.Id, err = runtime.String(val) - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) - } - - msg, err := client.DeleteAsset(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_CompassService_DeleteAsset_0(ctx context.Context, marshaler runtime.Marshaler, server CompassServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq DeleteAssetRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["id"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") - } - - protoReq.Id, err = runtime.String(val) - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) - } - - msg, err := server.DeleteAsset(ctx, &protoReq) - return msg, metadata, err - -} - -var ( - filter_CompassService_GetAssetStargazers_0 = &utilities.DoubleArray{Encoding: map[string]int{"id": 0}, Base: []int{1, 2, 0, 0}, Check: []int{0, 1, 2, 2}} -) - -func request_CompassService_GetAssetStargazers_0(ctx context.Context, marshaler runtime.Marshaler, client CompassServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetAssetStargazersRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["id"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") - } - - protoReq.Id, err = runtime.String(val) - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) - } - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_CompassService_GetAssetStargazers_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.GetAssetStargazers(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_CompassService_GetAssetStargazers_0(ctx context.Context, marshaler runtime.Marshaler, server CompassServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetAssetStargazersRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["id"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") - } - - protoReq.Id, err = runtime.String(val) - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) - } - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_CompassService_GetAssetStargazers_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.GetAssetStargazers(ctx, &protoReq) - return msg, metadata, err - -} - -var ( - filter_CompassService_GetAssetVersionHistory_0 = &utilities.DoubleArray{Encoding: map[string]int{"id": 0}, Base: []int{1, 2, 0, 0}, Check: []int{0, 1, 2, 2}} -) - -func request_CompassService_GetAssetVersionHistory_0(ctx context.Context, marshaler runtime.Marshaler, client CompassServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetAssetVersionHistoryRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["id"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") - } - - protoReq.Id, err = runtime.String(val) - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) - } - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_CompassService_GetAssetVersionHistory_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.GetAssetVersionHistory(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_CompassService_GetAssetVersionHistory_0(ctx context.Context, marshaler runtime.Marshaler, server CompassServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetAssetVersionHistoryRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["id"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") - } - - protoReq.Id, err = runtime.String(val) - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) - } - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_CompassService_GetAssetVersionHistory_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.GetAssetVersionHistory(ctx, &protoReq) - return msg, metadata, err - -} - -func request_CompassService_GetAssetByVersion_0(ctx context.Context, marshaler runtime.Marshaler, client CompassServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetAssetByVersionRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["id"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") - } - - protoReq.Id, err = runtime.String(val) - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) - } - - val, ok = pathParams["version"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "version") - } - - protoReq.Version, err = runtime.String(val) - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "version", err) - } - - msg, err := client.GetAssetByVersion(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_CompassService_GetAssetByVersion_0(ctx context.Context, marshaler runtime.Marshaler, server CompassServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetAssetByVersionRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["id"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") - } - - protoReq.Id, err = runtime.String(val) - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) - } - - val, ok = pathParams["version"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "version") - } - - protoReq.Version, err = runtime.String(val) - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "version", err) - } - - msg, err := server.GetAssetByVersion(ctx, &protoReq) - return msg, metadata, err - -} - -func request_CompassService_CreateAssetProbe_0(ctx context.Context, marshaler runtime.Marshaler, client CompassServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq CreateAssetProbeRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.Probe); err != nil && err != io.EOF { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["asset_urn"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "asset_urn") - } - - protoReq.AssetUrn, err = runtime.String(val) - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "asset_urn", err) - } - - msg, err := client.CreateAssetProbe(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_CompassService_CreateAssetProbe_0(ctx context.Context, marshaler runtime.Marshaler, server CompassServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq CreateAssetProbeRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.Probe); err != nil && err != io.EOF { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["asset_urn"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "asset_urn") - } - - protoReq.AssetUrn, err = runtime.String(val) - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "asset_urn", err) - } - - msg, err := server.CreateAssetProbe(ctx, &protoReq) - return msg, metadata, err - -} - -var ( - filter_CompassService_GetUserStarredAssets_0 = &utilities.DoubleArray{Encoding: map[string]int{"user_id": 0, "userId": 1}, Base: []int{1, 1, 2, 0, 0}, Check: []int{0, 1, 1, 2, 3}} -) - -func request_CompassService_GetUserStarredAssets_0(ctx context.Context, marshaler runtime.Marshaler, client CompassServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetUserStarredAssetsRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["user_id"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "user_id") - } - - protoReq.UserId, err = runtime.String(val) - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "user_id", err) - } - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_CompassService_GetUserStarredAssets_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.GetUserStarredAssets(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_CompassService_GetUserStarredAssets_0(ctx context.Context, marshaler runtime.Marshaler, server CompassServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetUserStarredAssetsRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["user_id"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "user_id") - } - - protoReq.UserId, err = runtime.String(val) - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "user_id", err) - } - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_CompassService_GetUserStarredAssets_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.GetUserStarredAssets(ctx, &protoReq) - return msg, metadata, err - -} - -var ( - filter_CompassService_GetMyStarredAssets_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) - -func request_CompassService_GetMyStarredAssets_0(ctx context.Context, marshaler runtime.Marshaler, client CompassServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetMyStarredAssetsRequest - var metadata runtime.ServerMetadata - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_CompassService_GetMyStarredAssets_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.GetMyStarredAssets(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_CompassService_GetMyStarredAssets_0(ctx context.Context, marshaler runtime.Marshaler, server CompassServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetMyStarredAssetsRequest - var metadata runtime.ServerMetadata - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_CompassService_GetMyStarredAssets_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.GetMyStarredAssets(ctx, &protoReq) - return msg, metadata, err - -} - -func request_CompassService_GetMyStarredAsset_0(ctx context.Context, marshaler runtime.Marshaler, client CompassServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetMyStarredAssetRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["asset_id"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "asset_id") - } - - protoReq.AssetId, err = runtime.String(val) - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "asset_id", err) - } - - msg, err := client.GetMyStarredAsset(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_CompassService_GetMyStarredAsset_0(ctx context.Context, marshaler runtime.Marshaler, server CompassServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetMyStarredAssetRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["asset_id"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "asset_id") - } - - protoReq.AssetId, err = runtime.String(val) - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "asset_id", err) - } - - msg, err := server.GetMyStarredAsset(ctx, &protoReq) - return msg, metadata, err - -} - -func request_CompassService_StarAsset_0(ctx context.Context, marshaler runtime.Marshaler, client CompassServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq StarAssetRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["asset_id"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "asset_id") - } - - protoReq.AssetId, err = runtime.String(val) - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "asset_id", err) - } - - msg, err := client.StarAsset(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_CompassService_StarAsset_0(ctx context.Context, marshaler runtime.Marshaler, server CompassServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq StarAssetRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["asset_id"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "asset_id") - } - - protoReq.AssetId, err = runtime.String(val) - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "asset_id", err) - } - - msg, err := server.StarAsset(ctx, &protoReq) - return msg, metadata, err - -} - -func request_CompassService_UnstarAsset_0(ctx context.Context, marshaler runtime.Marshaler, client CompassServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq UnstarAssetRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["asset_id"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "asset_id") - } - - protoReq.AssetId, err = runtime.String(val) - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "asset_id", err) - } - - msg, err := client.UnstarAsset(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_CompassService_UnstarAsset_0(ctx context.Context, marshaler runtime.Marshaler, server CompassServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq UnstarAssetRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["asset_id"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "asset_id") - } - - protoReq.AssetId, err = runtime.String(val) - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "asset_id", err) - } - - msg, err := server.UnstarAsset(ctx, &protoReq) - return msg, metadata, err - -} - -var ( - filter_CompassService_GetMyDiscussions_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) - -func request_CompassService_GetMyDiscussions_0(ctx context.Context, marshaler runtime.Marshaler, client CompassServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetMyDiscussionsRequest - var metadata runtime.ServerMetadata - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_CompassService_GetMyDiscussions_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.GetMyDiscussions(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_CompassService_GetMyDiscussions_0(ctx context.Context, marshaler runtime.Marshaler, server CompassServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetMyDiscussionsRequest - var metadata runtime.ServerMetadata - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_CompassService_GetMyDiscussions_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.GetMyDiscussions(ctx, &protoReq) - return msg, metadata, err - -} - -func request_CompassService_CreateTagAsset_0(ctx context.Context, marshaler runtime.Marshaler, client CompassServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq CreateTagAssetRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.CreateTagAsset(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_CompassService_CreateTagAsset_0(ctx context.Context, marshaler runtime.Marshaler, server CompassServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq CreateTagAssetRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.CreateTagAsset(ctx, &protoReq) - return msg, metadata, err - -} - -func request_CompassService_GetTagByAssetAndTemplate_0(ctx context.Context, marshaler runtime.Marshaler, client CompassServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetTagByAssetAndTemplateRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["asset_id"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "asset_id") - } - - protoReq.AssetId, err = runtime.String(val) - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "asset_id", err) - } - - val, ok = pathParams["template_urn"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "template_urn") - } - - protoReq.TemplateUrn, err = runtime.String(val) - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "template_urn", err) - } - - msg, err := client.GetTagByAssetAndTemplate(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_CompassService_GetTagByAssetAndTemplate_0(ctx context.Context, marshaler runtime.Marshaler, server CompassServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetTagByAssetAndTemplateRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["asset_id"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "asset_id") - } - - protoReq.AssetId, err = runtime.String(val) - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "asset_id", err) - } - - val, ok = pathParams["template_urn"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "template_urn") - } - - protoReq.TemplateUrn, err = runtime.String(val) - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "template_urn", err) - } - - msg, err := server.GetTagByAssetAndTemplate(ctx, &protoReq) - return msg, metadata, err - -} - -func request_CompassService_UpdateTagAsset_0(ctx context.Context, marshaler runtime.Marshaler, client CompassServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq UpdateTagAssetRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["asset_id"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "asset_id") - } - - protoReq.AssetId, err = runtime.String(val) - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "asset_id", err) - } - - val, ok = pathParams["template_urn"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "template_urn") - } - - protoReq.TemplateUrn, err = runtime.String(val) - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "template_urn", err) - } - - msg, err := client.UpdateTagAsset(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_CompassService_UpdateTagAsset_0(ctx context.Context, marshaler runtime.Marshaler, server CompassServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq UpdateTagAssetRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["asset_id"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "asset_id") - } - - protoReq.AssetId, err = runtime.String(val) - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "asset_id", err) - } - - val, ok = pathParams["template_urn"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "template_urn") - } - - protoReq.TemplateUrn, err = runtime.String(val) - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "template_urn", err) - } - - msg, err := server.UpdateTagAsset(ctx, &protoReq) - return msg, metadata, err - -} - -func request_CompassService_DeleteTagAsset_0(ctx context.Context, marshaler runtime.Marshaler, client CompassServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq DeleteTagAssetRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["asset_id"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "asset_id") - } - - protoReq.AssetId, err = runtime.String(val) - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "asset_id", err) - } - - val, ok = pathParams["template_urn"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "template_urn") - } - - protoReq.TemplateUrn, err = runtime.String(val) - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "template_urn", err) - } - - msg, err := client.DeleteTagAsset(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_CompassService_DeleteTagAsset_0(ctx context.Context, marshaler runtime.Marshaler, server CompassServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq DeleteTagAssetRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["asset_id"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "asset_id") - } - - protoReq.AssetId, err = runtime.String(val) - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "asset_id", err) - } - - val, ok = pathParams["template_urn"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "template_urn") - } - - protoReq.TemplateUrn, err = runtime.String(val) - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "template_urn", err) - } - - msg, err := server.DeleteTagAsset(ctx, &protoReq) - return msg, metadata, err - -} - -func request_CompassService_GetAllTagsByAsset_0(ctx context.Context, marshaler runtime.Marshaler, client CompassServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetAllTagsByAssetRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["asset_id"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "asset_id") - } - - protoReq.AssetId, err = runtime.String(val) - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "asset_id", err) - } - - msg, err := client.GetAllTagsByAsset(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_CompassService_GetAllTagsByAsset_0(ctx context.Context, marshaler runtime.Marshaler, server CompassServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetAllTagsByAssetRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["asset_id"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "asset_id") - } - - protoReq.AssetId, err = runtime.String(val) - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "asset_id", err) - } - - msg, err := server.GetAllTagsByAsset(ctx, &protoReq) - return msg, metadata, err - -} - -var ( - filter_CompassService_GetAllTagTemplates_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) - -func request_CompassService_GetAllTagTemplates_0(ctx context.Context, marshaler runtime.Marshaler, client CompassServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetAllTagTemplatesRequest - var metadata runtime.ServerMetadata - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_CompassService_GetAllTagTemplates_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.GetAllTagTemplates(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_CompassService_GetAllTagTemplates_0(ctx context.Context, marshaler runtime.Marshaler, server CompassServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetAllTagTemplatesRequest - var metadata runtime.ServerMetadata - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_CompassService_GetAllTagTemplates_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.GetAllTagTemplates(ctx, &protoReq) - return msg, metadata, err - -} - -func request_CompassService_CreateTagTemplate_0(ctx context.Context, marshaler runtime.Marshaler, client CompassServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq CreateTagTemplateRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.CreateTagTemplate(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_CompassService_CreateTagTemplate_0(ctx context.Context, marshaler runtime.Marshaler, server CompassServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq CreateTagTemplateRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.CreateTagTemplate(ctx, &protoReq) - return msg, metadata, err - -} - -func request_CompassService_GetTagTemplate_0(ctx context.Context, marshaler runtime.Marshaler, client CompassServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetTagTemplateRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["template_urn"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "template_urn") - } - - protoReq.TemplateUrn, err = runtime.String(val) - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "template_urn", err) - } - - msg, err := client.GetTagTemplate(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_CompassService_GetTagTemplate_0(ctx context.Context, marshaler runtime.Marshaler, server CompassServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetTagTemplateRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["template_urn"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "template_urn") - } - - protoReq.TemplateUrn, err = runtime.String(val) - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "template_urn", err) - } - - msg, err := server.GetTagTemplate(ctx, &protoReq) - return msg, metadata, err - -} - -func request_CompassService_UpdateTagTemplate_0(ctx context.Context, marshaler runtime.Marshaler, client CompassServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq UpdateTagTemplateRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["template_urn"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "template_urn") - } - - protoReq.TemplateUrn, err = runtime.String(val) - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "template_urn", err) - } - - msg, err := client.UpdateTagTemplate(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_CompassService_UpdateTagTemplate_0(ctx context.Context, marshaler runtime.Marshaler, server CompassServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq UpdateTagTemplateRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["template_urn"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "template_urn") - } - - protoReq.TemplateUrn, err = runtime.String(val) - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "template_urn", err) - } - - msg, err := server.UpdateTagTemplate(ctx, &protoReq) - return msg, metadata, err - -} - -func request_CompassService_DeleteTagTemplate_0(ctx context.Context, marshaler runtime.Marshaler, client CompassServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq DeleteTagTemplateRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["template_urn"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "template_urn") - } - - protoReq.TemplateUrn, err = runtime.String(val) - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "template_urn", err) - } - - msg, err := client.DeleteTagTemplate(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_CompassService_DeleteTagTemplate_0(ctx context.Context, marshaler runtime.Marshaler, server CompassServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq DeleteTagTemplateRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["template_urn"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "template_urn") - } - - protoReq.TemplateUrn, err = runtime.String(val) - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "template_urn", err) - } - - msg, err := server.DeleteTagTemplate(ctx, &protoReq) - return msg, metadata, err - -} - -func request_CompassService_CreateNamespace_0(ctx context.Context, marshaler runtime.Marshaler, client CompassServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq CreateNamespaceRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.CreateNamespace(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_CompassService_CreateNamespace_0(ctx context.Context, marshaler runtime.Marshaler, server CompassServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq CreateNamespaceRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.CreateNamespace(ctx, &protoReq) - return msg, metadata, err - -} - -func request_CompassService_GetNamespace_0(ctx context.Context, marshaler runtime.Marshaler, client CompassServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetNamespaceRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["urn"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "urn") - } - - protoReq.Urn, err = runtime.String(val) - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "urn", err) - } - - msg, err := client.GetNamespace(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_CompassService_GetNamespace_0(ctx context.Context, marshaler runtime.Marshaler, server CompassServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetNamespaceRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["urn"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "urn") - } - - protoReq.Urn, err = runtime.String(val) - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "urn", err) - } - - msg, err := server.GetNamespace(ctx, &protoReq) - return msg, metadata, err - -} - -func request_CompassService_UpdateNamespace_0(ctx context.Context, marshaler runtime.Marshaler, client CompassServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq UpdateNamespaceRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["urn"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "urn") - } - - protoReq.Urn, err = runtime.String(val) - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "urn", err) - } - - msg, err := client.UpdateNamespace(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_CompassService_UpdateNamespace_0(ctx context.Context, marshaler runtime.Marshaler, server CompassServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq UpdateNamespaceRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["urn"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "urn") - } - - protoReq.Urn, err = runtime.String(val) - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "urn", err) - } - - msg, err := server.UpdateNamespace(ctx, &protoReq) - return msg, metadata, err - -} - -func request_CompassService_ListNamespaces_0(ctx context.Context, marshaler runtime.Marshaler, client CompassServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ListNamespacesRequest - var metadata runtime.ServerMetadata - - msg, err := client.ListNamespaces(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_CompassService_ListNamespaces_0(ctx context.Context, marshaler runtime.Marshaler, server CompassServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ListNamespacesRequest - var metadata runtime.ServerMetadata - - msg, err := server.ListNamespaces(ctx, &protoReq) - return msg, metadata, err - -} - -// RegisterCompassServiceHandlerServer registers the http handlers for service CompassService to "mux". -// UnaryRPC :call CompassServiceServer directly. -// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. -// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterCompassServiceHandlerFromEndpoint instead. -func RegisterCompassServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server CompassServiceServer) error { - - mux.Handle("GET", pattern_CompassService_GetAllDiscussions_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/raystack.compass.v1beta1.CompassService/GetAllDiscussions", runtime.WithHTTPPathPattern("/v1beta1/discussions")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_CompassService_GetAllDiscussions_0(annotatedContext, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_CompassService_GetAllDiscussions_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("POST", pattern_CompassService_CreateDiscussion_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/raystack.compass.v1beta1.CompassService/CreateDiscussion", runtime.WithHTTPPathPattern("/v1beta1/discussions")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_CompassService_CreateDiscussion_0(annotatedContext, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_CompassService_CreateDiscussion_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_CompassService_GetDiscussion_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/raystack.compass.v1beta1.CompassService/GetDiscussion", runtime.WithHTTPPathPattern("/v1beta1/discussions/{id}")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_CompassService_GetDiscussion_0(annotatedContext, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_CompassService_GetDiscussion_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("PATCH", pattern_CompassService_PatchDiscussion_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/raystack.compass.v1beta1.CompassService/PatchDiscussion", runtime.WithHTTPPathPattern("/v1beta1/discussions/{id}")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_CompassService_PatchDiscussion_0(annotatedContext, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_CompassService_PatchDiscussion_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("POST", pattern_CompassService_CreateComment_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/raystack.compass.v1beta1.CompassService/CreateComment", runtime.WithHTTPPathPattern("/v1beta1/discussions/{discussion_id}/comments")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_CompassService_CreateComment_0(annotatedContext, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_CompassService_CreateComment_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_CompassService_GetAllComments_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/raystack.compass.v1beta1.CompassService/GetAllComments", runtime.WithHTTPPathPattern("/v1beta1/discussions/{discussion_id}/comments")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_CompassService_GetAllComments_0(annotatedContext, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_CompassService_GetAllComments_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_CompassService_GetComment_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/raystack.compass.v1beta1.CompassService/GetComment", runtime.WithHTTPPathPattern("/v1beta1/discussions/{discussion_id}/comments/{id}")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_CompassService_GetComment_0(annotatedContext, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_CompassService_GetComment_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("PUT", pattern_CompassService_UpdateComment_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/raystack.compass.v1beta1.CompassService/UpdateComment", runtime.WithHTTPPathPattern("/v1beta1/discussions/{discussion_id}/comments/{id}")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_CompassService_UpdateComment_0(annotatedContext, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_CompassService_UpdateComment_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("DELETE", pattern_CompassService_DeleteComment_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/raystack.compass.v1beta1.CompassService/DeleteComment", runtime.WithHTTPPathPattern("/v1beta1/discussions/{discussion_id}/comments/{id}")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_CompassService_DeleteComment_0(annotatedContext, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_CompassService_DeleteComment_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_CompassService_SearchAssets_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/raystack.compass.v1beta1.CompassService/SearchAssets", runtime.WithHTTPPathPattern("/v1beta1/search")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_CompassService_SearchAssets_0(annotatedContext, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_CompassService_SearchAssets_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_CompassService_SuggestAssets_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/raystack.compass.v1beta1.CompassService/SuggestAssets", runtime.WithHTTPPathPattern("/v1beta1/search/suggest")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_CompassService_SuggestAssets_0(annotatedContext, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_CompassService_SuggestAssets_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_CompassService_GroupAssets_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/raystack.compass.v1beta1.CompassService/GroupAssets", runtime.WithHTTPPathPattern("/v1beta1/groupassets")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_CompassService_GroupAssets_0(annotatedContext, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_CompassService_GroupAssets_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_CompassService_GetGraph_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/raystack.compass.v1beta1.CompassService/GetGraph", runtime.WithHTTPPathPattern("/v1beta1/lineage/{urn=**}")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_CompassService_GetGraph_0(annotatedContext, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_CompassService_GetGraph_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_CompassService_GetAllTypes_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/raystack.compass.v1beta1.CompassService/GetAllTypes", runtime.WithHTTPPathPattern("/v1beta1/types")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_CompassService_GetAllTypes_0(annotatedContext, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_CompassService_GetAllTypes_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_CompassService_GetAllAssets_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/raystack.compass.v1beta1.CompassService/GetAllAssets", runtime.WithHTTPPathPattern("/v1beta1/assets")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_CompassService_GetAllAssets_0(annotatedContext, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_CompassService_GetAllAssets_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_CompassService_GetAssetByID_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/raystack.compass.v1beta1.CompassService/GetAssetByID", runtime.WithHTTPPathPattern("/v1beta1/assets/{id}")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_CompassService_GetAssetByID_0(annotatedContext, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_CompassService_GetAssetByID_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("PUT", pattern_CompassService_UpsertAsset_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/raystack.compass.v1beta1.CompassService/UpsertAsset", runtime.WithHTTPPathPattern("/v1beta1/assets")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_CompassService_UpsertAsset_0(annotatedContext, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_CompassService_UpsertAsset_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("PATCH", pattern_CompassService_UpsertPatchAsset_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/raystack.compass.v1beta1.CompassService/UpsertPatchAsset", runtime.WithHTTPPathPattern("/v1beta1/assets")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_CompassService_UpsertPatchAsset_0(annotatedContext, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_CompassService_UpsertPatchAsset_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("DELETE", pattern_CompassService_DeleteAsset_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/raystack.compass.v1beta1.CompassService/DeleteAsset", runtime.WithHTTPPathPattern("/v1beta1/assets/{id}")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_CompassService_DeleteAsset_0(annotatedContext, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_CompassService_DeleteAsset_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_CompassService_GetAssetStargazers_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/raystack.compass.v1beta1.CompassService/GetAssetStargazers", runtime.WithHTTPPathPattern("/v1beta1/assets/{id}/stargazers")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_CompassService_GetAssetStargazers_0(annotatedContext, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_CompassService_GetAssetStargazers_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_CompassService_GetAssetVersionHistory_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/raystack.compass.v1beta1.CompassService/GetAssetVersionHistory", runtime.WithHTTPPathPattern("/v1beta1/assets/{id}/versions")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_CompassService_GetAssetVersionHistory_0(annotatedContext, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_CompassService_GetAssetVersionHistory_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_CompassService_GetAssetByVersion_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/raystack.compass.v1beta1.CompassService/GetAssetByVersion", runtime.WithHTTPPathPattern("/v1beta1/assets/{id}/versions/{version}")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_CompassService_GetAssetByVersion_0(annotatedContext, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_CompassService_GetAssetByVersion_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("POST", pattern_CompassService_CreateAssetProbe_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/raystack.compass.v1beta1.CompassService/CreateAssetProbe", runtime.WithHTTPPathPattern("/v1beta1/assets/{asset_urn}/probes")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_CompassService_CreateAssetProbe_0(annotatedContext, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_CompassService_CreateAssetProbe_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_CompassService_GetUserStarredAssets_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/raystack.compass.v1beta1.CompassService/GetUserStarredAssets", runtime.WithHTTPPathPattern("/v1beta1/users/{user_id}/starred")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_CompassService_GetUserStarredAssets_0(annotatedContext, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_CompassService_GetUserStarredAssets_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_CompassService_GetMyStarredAssets_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/raystack.compass.v1beta1.CompassService/GetMyStarredAssets", runtime.WithHTTPPathPattern("/v1beta1/me/starred")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_CompassService_GetMyStarredAssets_0(annotatedContext, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_CompassService_GetMyStarredAssets_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_CompassService_GetMyStarredAsset_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/raystack.compass.v1beta1.CompassService/GetMyStarredAsset", runtime.WithHTTPPathPattern("/v1beta1/me/starred/{asset_id}")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_CompassService_GetMyStarredAsset_0(annotatedContext, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_CompassService_GetMyStarredAsset_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("PUT", pattern_CompassService_StarAsset_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/raystack.compass.v1beta1.CompassService/StarAsset", runtime.WithHTTPPathPattern("/v1beta1/me/starred/{asset_id}")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_CompassService_StarAsset_0(annotatedContext, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_CompassService_StarAsset_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("DELETE", pattern_CompassService_UnstarAsset_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/raystack.compass.v1beta1.CompassService/UnstarAsset", runtime.WithHTTPPathPattern("/v1beta1/me/starred/{asset_id}")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_CompassService_UnstarAsset_0(annotatedContext, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_CompassService_UnstarAsset_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_CompassService_GetMyDiscussions_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/raystack.compass.v1beta1.CompassService/GetMyDiscussions", runtime.WithHTTPPathPattern("/v1beta1/me/discussions")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_CompassService_GetMyDiscussions_0(annotatedContext, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_CompassService_GetMyDiscussions_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("POST", pattern_CompassService_CreateTagAsset_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/raystack.compass.v1beta1.CompassService/CreateTagAsset", runtime.WithHTTPPathPattern("/v1beta1/tags/assets")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_CompassService_CreateTagAsset_0(annotatedContext, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_CompassService_CreateTagAsset_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_CompassService_GetTagByAssetAndTemplate_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/raystack.compass.v1beta1.CompassService/GetTagByAssetAndTemplate", runtime.WithHTTPPathPattern("/v1beta1/tags/assets/{asset_id}/templates/{template_urn}")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_CompassService_GetTagByAssetAndTemplate_0(annotatedContext, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_CompassService_GetTagByAssetAndTemplate_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("PUT", pattern_CompassService_UpdateTagAsset_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/raystack.compass.v1beta1.CompassService/UpdateTagAsset", runtime.WithHTTPPathPattern("/v1beta1/tags/assets/{asset_id}/templates/{template_urn}")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_CompassService_UpdateTagAsset_0(annotatedContext, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_CompassService_UpdateTagAsset_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("DELETE", pattern_CompassService_DeleteTagAsset_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/raystack.compass.v1beta1.CompassService/DeleteTagAsset", runtime.WithHTTPPathPattern("/v1beta1/tags/assets/{asset_id}/templates/{template_urn}")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_CompassService_DeleteTagAsset_0(annotatedContext, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_CompassService_DeleteTagAsset_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_CompassService_GetAllTagsByAsset_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/raystack.compass.v1beta1.CompassService/GetAllTagsByAsset", runtime.WithHTTPPathPattern("/v1beta1/tags/assets/{asset_id}")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_CompassService_GetAllTagsByAsset_0(annotatedContext, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_CompassService_GetAllTagsByAsset_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_CompassService_GetAllTagTemplates_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/raystack.compass.v1beta1.CompassService/GetAllTagTemplates", runtime.WithHTTPPathPattern("/v1beta1/tags/templates")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_CompassService_GetAllTagTemplates_0(annotatedContext, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_CompassService_GetAllTagTemplates_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("POST", pattern_CompassService_CreateTagTemplate_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/raystack.compass.v1beta1.CompassService/CreateTagTemplate", runtime.WithHTTPPathPattern("/v1beta1/tags/templates")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_CompassService_CreateTagTemplate_0(annotatedContext, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_CompassService_CreateTagTemplate_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_CompassService_GetTagTemplate_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/raystack.compass.v1beta1.CompassService/GetTagTemplate", runtime.WithHTTPPathPattern("/v1beta1/tags/templates/{template_urn}")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_CompassService_GetTagTemplate_0(annotatedContext, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_CompassService_GetTagTemplate_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("PUT", pattern_CompassService_UpdateTagTemplate_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/raystack.compass.v1beta1.CompassService/UpdateTagTemplate", runtime.WithHTTPPathPattern("/v1beta1/tags/templates/{template_urn}")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_CompassService_UpdateTagTemplate_0(annotatedContext, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_CompassService_UpdateTagTemplate_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("DELETE", pattern_CompassService_DeleteTagTemplate_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/raystack.compass.v1beta1.CompassService/DeleteTagTemplate", runtime.WithHTTPPathPattern("/v1beta1/tags/templates/{template_urn}")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_CompassService_DeleteTagTemplate_0(annotatedContext, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_CompassService_DeleteTagTemplate_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("POST", pattern_CompassService_CreateNamespace_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/raystack.compass.v1beta1.CompassService/CreateNamespace", runtime.WithHTTPPathPattern("/v1beta1/namespaces")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_CompassService_CreateNamespace_0(annotatedContext, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_CompassService_CreateNamespace_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_CompassService_GetNamespace_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/raystack.compass.v1beta1.CompassService/GetNamespace", runtime.WithHTTPPathPattern("/v1beta1/namespaces/{urn}")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_CompassService_GetNamespace_0(annotatedContext, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_CompassService_GetNamespace_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("PUT", pattern_CompassService_UpdateNamespace_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/raystack.compass.v1beta1.CompassService/UpdateNamespace", runtime.WithHTTPPathPattern("/v1beta1/namespaces/{urn}")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_CompassService_UpdateNamespace_0(annotatedContext, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_CompassService_UpdateNamespace_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_CompassService_ListNamespaces_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/raystack.compass.v1beta1.CompassService/ListNamespaces", runtime.WithHTTPPathPattern("/v1beta1/namespaces")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_CompassService_ListNamespaces_0(annotatedContext, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_CompassService_ListNamespaces_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - return nil -} - -// RegisterCompassServiceHandlerFromEndpoint is same as RegisterCompassServiceHandler but -// automatically dials to "endpoint" and closes the connection when "ctx" gets done. -func RegisterCompassServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { - conn, err := grpc.DialContext(ctx, endpoint, opts...) - if err != nil { - return err - } - defer func() { - if err != nil { - if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) - } - return - } - go func() { - <-ctx.Done() - if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) - } - }() - }() - - return RegisterCompassServiceHandler(ctx, mux, conn) -} - -// RegisterCompassServiceHandler registers the http handlers for service CompassService to "mux". -// The handlers forward requests to the grpc endpoint over "conn". -func RegisterCompassServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { - return RegisterCompassServiceHandlerClient(ctx, mux, NewCompassServiceClient(conn)) -} - -// RegisterCompassServiceHandlerClient registers the http handlers for service CompassService -// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "CompassServiceClient". -// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "CompassServiceClient" -// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in -// "CompassServiceClient" to call the correct interceptors. -func RegisterCompassServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client CompassServiceClient) error { - - mux.Handle("GET", pattern_CompassService_GetAllDiscussions_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/raystack.compass.v1beta1.CompassService/GetAllDiscussions", runtime.WithHTTPPathPattern("/v1beta1/discussions")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_CompassService_GetAllDiscussions_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_CompassService_GetAllDiscussions_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("POST", pattern_CompassService_CreateDiscussion_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/raystack.compass.v1beta1.CompassService/CreateDiscussion", runtime.WithHTTPPathPattern("/v1beta1/discussions")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_CompassService_CreateDiscussion_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_CompassService_CreateDiscussion_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_CompassService_GetDiscussion_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/raystack.compass.v1beta1.CompassService/GetDiscussion", runtime.WithHTTPPathPattern("/v1beta1/discussions/{id}")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_CompassService_GetDiscussion_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_CompassService_GetDiscussion_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("PATCH", pattern_CompassService_PatchDiscussion_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/raystack.compass.v1beta1.CompassService/PatchDiscussion", runtime.WithHTTPPathPattern("/v1beta1/discussions/{id}")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_CompassService_PatchDiscussion_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_CompassService_PatchDiscussion_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("POST", pattern_CompassService_CreateComment_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/raystack.compass.v1beta1.CompassService/CreateComment", runtime.WithHTTPPathPattern("/v1beta1/discussions/{discussion_id}/comments")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_CompassService_CreateComment_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_CompassService_CreateComment_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_CompassService_GetAllComments_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/raystack.compass.v1beta1.CompassService/GetAllComments", runtime.WithHTTPPathPattern("/v1beta1/discussions/{discussion_id}/comments")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_CompassService_GetAllComments_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_CompassService_GetAllComments_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_CompassService_GetComment_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/raystack.compass.v1beta1.CompassService/GetComment", runtime.WithHTTPPathPattern("/v1beta1/discussions/{discussion_id}/comments/{id}")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_CompassService_GetComment_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_CompassService_GetComment_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("PUT", pattern_CompassService_UpdateComment_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/raystack.compass.v1beta1.CompassService/UpdateComment", runtime.WithHTTPPathPattern("/v1beta1/discussions/{discussion_id}/comments/{id}")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_CompassService_UpdateComment_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_CompassService_UpdateComment_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("DELETE", pattern_CompassService_DeleteComment_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/raystack.compass.v1beta1.CompassService/DeleteComment", runtime.WithHTTPPathPattern("/v1beta1/discussions/{discussion_id}/comments/{id}")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_CompassService_DeleteComment_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_CompassService_DeleteComment_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_CompassService_SearchAssets_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/raystack.compass.v1beta1.CompassService/SearchAssets", runtime.WithHTTPPathPattern("/v1beta1/search")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_CompassService_SearchAssets_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_CompassService_SearchAssets_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_CompassService_SuggestAssets_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/raystack.compass.v1beta1.CompassService/SuggestAssets", runtime.WithHTTPPathPattern("/v1beta1/search/suggest")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_CompassService_SuggestAssets_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_CompassService_SuggestAssets_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_CompassService_GroupAssets_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/raystack.compass.v1beta1.CompassService/GroupAssets", runtime.WithHTTPPathPattern("/v1beta1/groupassets")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_CompassService_GroupAssets_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_CompassService_GroupAssets_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_CompassService_GetGraph_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/raystack.compass.v1beta1.CompassService/GetGraph", runtime.WithHTTPPathPattern("/v1beta1/lineage/{urn=**}")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_CompassService_GetGraph_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_CompassService_GetGraph_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_CompassService_GetAllTypes_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/raystack.compass.v1beta1.CompassService/GetAllTypes", runtime.WithHTTPPathPattern("/v1beta1/types")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_CompassService_GetAllTypes_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_CompassService_GetAllTypes_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_CompassService_GetAllAssets_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/raystack.compass.v1beta1.CompassService/GetAllAssets", runtime.WithHTTPPathPattern("/v1beta1/assets")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_CompassService_GetAllAssets_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_CompassService_GetAllAssets_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_CompassService_GetAssetByID_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/raystack.compass.v1beta1.CompassService/GetAssetByID", runtime.WithHTTPPathPattern("/v1beta1/assets/{id}")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_CompassService_GetAssetByID_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_CompassService_GetAssetByID_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("PUT", pattern_CompassService_UpsertAsset_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/raystack.compass.v1beta1.CompassService/UpsertAsset", runtime.WithHTTPPathPattern("/v1beta1/assets")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_CompassService_UpsertAsset_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_CompassService_UpsertAsset_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("PATCH", pattern_CompassService_UpsertPatchAsset_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/raystack.compass.v1beta1.CompassService/UpsertPatchAsset", runtime.WithHTTPPathPattern("/v1beta1/assets")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_CompassService_UpsertPatchAsset_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_CompassService_UpsertPatchAsset_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("DELETE", pattern_CompassService_DeleteAsset_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/raystack.compass.v1beta1.CompassService/DeleteAsset", runtime.WithHTTPPathPattern("/v1beta1/assets/{id}")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_CompassService_DeleteAsset_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_CompassService_DeleteAsset_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_CompassService_GetAssetStargazers_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/raystack.compass.v1beta1.CompassService/GetAssetStargazers", runtime.WithHTTPPathPattern("/v1beta1/assets/{id}/stargazers")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_CompassService_GetAssetStargazers_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_CompassService_GetAssetStargazers_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_CompassService_GetAssetVersionHistory_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/raystack.compass.v1beta1.CompassService/GetAssetVersionHistory", runtime.WithHTTPPathPattern("/v1beta1/assets/{id}/versions")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_CompassService_GetAssetVersionHistory_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_CompassService_GetAssetVersionHistory_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_CompassService_GetAssetByVersion_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/raystack.compass.v1beta1.CompassService/GetAssetByVersion", runtime.WithHTTPPathPattern("/v1beta1/assets/{id}/versions/{version}")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_CompassService_GetAssetByVersion_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_CompassService_GetAssetByVersion_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("POST", pattern_CompassService_CreateAssetProbe_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/raystack.compass.v1beta1.CompassService/CreateAssetProbe", runtime.WithHTTPPathPattern("/v1beta1/assets/{asset_urn}/probes")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_CompassService_CreateAssetProbe_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_CompassService_CreateAssetProbe_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_CompassService_GetUserStarredAssets_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/raystack.compass.v1beta1.CompassService/GetUserStarredAssets", runtime.WithHTTPPathPattern("/v1beta1/users/{user_id}/starred")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_CompassService_GetUserStarredAssets_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_CompassService_GetUserStarredAssets_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_CompassService_GetMyStarredAssets_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/raystack.compass.v1beta1.CompassService/GetMyStarredAssets", runtime.WithHTTPPathPattern("/v1beta1/me/starred")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_CompassService_GetMyStarredAssets_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_CompassService_GetMyStarredAssets_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_CompassService_GetMyStarredAsset_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/raystack.compass.v1beta1.CompassService/GetMyStarredAsset", runtime.WithHTTPPathPattern("/v1beta1/me/starred/{asset_id}")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_CompassService_GetMyStarredAsset_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_CompassService_GetMyStarredAsset_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("PUT", pattern_CompassService_StarAsset_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/raystack.compass.v1beta1.CompassService/StarAsset", runtime.WithHTTPPathPattern("/v1beta1/me/starred/{asset_id}")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_CompassService_StarAsset_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_CompassService_StarAsset_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("DELETE", pattern_CompassService_UnstarAsset_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/raystack.compass.v1beta1.CompassService/UnstarAsset", runtime.WithHTTPPathPattern("/v1beta1/me/starred/{asset_id}")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_CompassService_UnstarAsset_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_CompassService_UnstarAsset_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_CompassService_GetMyDiscussions_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/raystack.compass.v1beta1.CompassService/GetMyDiscussions", runtime.WithHTTPPathPattern("/v1beta1/me/discussions")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_CompassService_GetMyDiscussions_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_CompassService_GetMyDiscussions_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("POST", pattern_CompassService_CreateTagAsset_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/raystack.compass.v1beta1.CompassService/CreateTagAsset", runtime.WithHTTPPathPattern("/v1beta1/tags/assets")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_CompassService_CreateTagAsset_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_CompassService_CreateTagAsset_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_CompassService_GetTagByAssetAndTemplate_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/raystack.compass.v1beta1.CompassService/GetTagByAssetAndTemplate", runtime.WithHTTPPathPattern("/v1beta1/tags/assets/{asset_id}/templates/{template_urn}")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_CompassService_GetTagByAssetAndTemplate_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_CompassService_GetTagByAssetAndTemplate_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("PUT", pattern_CompassService_UpdateTagAsset_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/raystack.compass.v1beta1.CompassService/UpdateTagAsset", runtime.WithHTTPPathPattern("/v1beta1/tags/assets/{asset_id}/templates/{template_urn}")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_CompassService_UpdateTagAsset_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_CompassService_UpdateTagAsset_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("DELETE", pattern_CompassService_DeleteTagAsset_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/raystack.compass.v1beta1.CompassService/DeleteTagAsset", runtime.WithHTTPPathPattern("/v1beta1/tags/assets/{asset_id}/templates/{template_urn}")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_CompassService_DeleteTagAsset_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_CompassService_DeleteTagAsset_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_CompassService_GetAllTagsByAsset_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/raystack.compass.v1beta1.CompassService/GetAllTagsByAsset", runtime.WithHTTPPathPattern("/v1beta1/tags/assets/{asset_id}")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_CompassService_GetAllTagsByAsset_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_CompassService_GetAllTagsByAsset_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_CompassService_GetAllTagTemplates_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/raystack.compass.v1beta1.CompassService/GetAllTagTemplates", runtime.WithHTTPPathPattern("/v1beta1/tags/templates")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_CompassService_GetAllTagTemplates_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_CompassService_GetAllTagTemplates_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("POST", pattern_CompassService_CreateTagTemplate_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/raystack.compass.v1beta1.CompassService/CreateTagTemplate", runtime.WithHTTPPathPattern("/v1beta1/tags/templates")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_CompassService_CreateTagTemplate_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_CompassService_CreateTagTemplate_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_CompassService_GetTagTemplate_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/raystack.compass.v1beta1.CompassService/GetTagTemplate", runtime.WithHTTPPathPattern("/v1beta1/tags/templates/{template_urn}")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_CompassService_GetTagTemplate_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_CompassService_GetTagTemplate_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("PUT", pattern_CompassService_UpdateTagTemplate_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/raystack.compass.v1beta1.CompassService/UpdateTagTemplate", runtime.WithHTTPPathPattern("/v1beta1/tags/templates/{template_urn}")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_CompassService_UpdateTagTemplate_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_CompassService_UpdateTagTemplate_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("DELETE", pattern_CompassService_DeleteTagTemplate_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/raystack.compass.v1beta1.CompassService/DeleteTagTemplate", runtime.WithHTTPPathPattern("/v1beta1/tags/templates/{template_urn}")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_CompassService_DeleteTagTemplate_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_CompassService_DeleteTagTemplate_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("POST", pattern_CompassService_CreateNamespace_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/raystack.compass.v1beta1.CompassService/CreateNamespace", runtime.WithHTTPPathPattern("/v1beta1/namespaces")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_CompassService_CreateNamespace_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_CompassService_CreateNamespace_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_CompassService_GetNamespace_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/raystack.compass.v1beta1.CompassService/GetNamespace", runtime.WithHTTPPathPattern("/v1beta1/namespaces/{urn}")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_CompassService_GetNamespace_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_CompassService_GetNamespace_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("PUT", pattern_CompassService_UpdateNamespace_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/raystack.compass.v1beta1.CompassService/UpdateNamespace", runtime.WithHTTPPathPattern("/v1beta1/namespaces/{urn}")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_CompassService_UpdateNamespace_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_CompassService_UpdateNamespace_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_CompassService_ListNamespaces_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/raystack.compass.v1beta1.CompassService/ListNamespaces", runtime.WithHTTPPathPattern("/v1beta1/namespaces")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_CompassService_ListNamespaces_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_CompassService_ListNamespaces_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - return nil -} - -var ( - pattern_CompassService_GetAllDiscussions_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1beta1", "discussions"}, "")) - - pattern_CompassService_CreateDiscussion_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1beta1", "discussions"}, "")) - - pattern_CompassService_GetDiscussion_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2}, []string{"v1beta1", "discussions", "id"}, "")) - - pattern_CompassService_PatchDiscussion_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2}, []string{"v1beta1", "discussions", "id"}, "")) - - pattern_CompassService_CreateComment_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3}, []string{"v1beta1", "discussions", "discussion_id", "comments"}, "")) - - pattern_CompassService_GetAllComments_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3}, []string{"v1beta1", "discussions", "discussion_id", "comments"}, "")) - - pattern_CompassService_GetComment_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"v1beta1", "discussions", "discussion_id", "comments", "id"}, "")) - - pattern_CompassService_UpdateComment_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"v1beta1", "discussions", "discussion_id", "comments", "id"}, "")) - - pattern_CompassService_DeleteComment_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"v1beta1", "discussions", "discussion_id", "comments", "id"}, "")) - - pattern_CompassService_SearchAssets_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1beta1", "search"}, "")) - - pattern_CompassService_SuggestAssets_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1beta1", "search", "suggest"}, "")) - - pattern_CompassService_GroupAssets_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1beta1", "groupassets"}, "")) - - pattern_CompassService_GetGraph_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 3, 0, 4, 1, 5, 2}, []string{"v1beta1", "lineage", "urn"}, "")) - - pattern_CompassService_GetAllTypes_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1beta1", "types"}, "")) - - pattern_CompassService_GetAllAssets_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1beta1", "assets"}, "")) - - pattern_CompassService_GetAssetByID_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2}, []string{"v1beta1", "assets", "id"}, "")) - - pattern_CompassService_UpsertAsset_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1beta1", "assets"}, "")) - - pattern_CompassService_UpsertPatchAsset_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1beta1", "assets"}, "")) - - pattern_CompassService_DeleteAsset_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2}, []string{"v1beta1", "assets", "id"}, "")) - - pattern_CompassService_GetAssetStargazers_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3}, []string{"v1beta1", "assets", "id", "stargazers"}, "")) - - pattern_CompassService_GetAssetVersionHistory_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3}, []string{"v1beta1", "assets", "id", "versions"}, "")) - - pattern_CompassService_GetAssetByVersion_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"v1beta1", "assets", "id", "versions", "version"}, "")) - - pattern_CompassService_CreateAssetProbe_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3}, []string{"v1beta1", "assets", "asset_urn", "probes"}, "")) - - pattern_CompassService_GetUserStarredAssets_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3}, []string{"v1beta1", "users", "user_id", "starred"}, "")) - - pattern_CompassService_GetMyStarredAssets_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1beta1", "me", "starred"}, "")) - - pattern_CompassService_GetMyStarredAsset_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"v1beta1", "me", "starred", "asset_id"}, "")) - - pattern_CompassService_StarAsset_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"v1beta1", "me", "starred", "asset_id"}, "")) - - pattern_CompassService_UnstarAsset_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"v1beta1", "me", "starred", "asset_id"}, "")) - - pattern_CompassService_GetMyDiscussions_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1beta1", "me", "discussions"}, "")) - - pattern_CompassService_CreateTagAsset_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1beta1", "tags", "assets"}, "")) - - pattern_CompassService_GetTagByAssetAndTemplate_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 2, 4, 1, 0, 4, 1, 5, 5}, []string{"v1beta1", "tags", "assets", "asset_id", "templates", "template_urn"}, "")) - - pattern_CompassService_UpdateTagAsset_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 2, 4, 1, 0, 4, 1, 5, 5}, []string{"v1beta1", "tags", "assets", "asset_id", "templates", "template_urn"}, "")) - - pattern_CompassService_DeleteTagAsset_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 2, 4, 1, 0, 4, 1, 5, 5}, []string{"v1beta1", "tags", "assets", "asset_id", "templates", "template_urn"}, "")) - - pattern_CompassService_GetAllTagsByAsset_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"v1beta1", "tags", "assets", "asset_id"}, "")) - - pattern_CompassService_GetAllTagTemplates_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1beta1", "tags", "templates"}, "")) - - pattern_CompassService_CreateTagTemplate_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1beta1", "tags", "templates"}, "")) - - pattern_CompassService_GetTagTemplate_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"v1beta1", "tags", "templates", "template_urn"}, "")) - - pattern_CompassService_UpdateTagTemplate_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"v1beta1", "tags", "templates", "template_urn"}, "")) - - pattern_CompassService_DeleteTagTemplate_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"v1beta1", "tags", "templates", "template_urn"}, "")) - - pattern_CompassService_CreateNamespace_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1beta1", "namespaces"}, "")) - - pattern_CompassService_GetNamespace_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2}, []string{"v1beta1", "namespaces", "urn"}, "")) - - pattern_CompassService_UpdateNamespace_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2}, []string{"v1beta1", "namespaces", "urn"}, "")) - - pattern_CompassService_ListNamespaces_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1beta1", "namespaces"}, "")) -) - -var ( - forward_CompassService_GetAllDiscussions_0 = runtime.ForwardResponseMessage - - forward_CompassService_CreateDiscussion_0 = runtime.ForwardResponseMessage - - forward_CompassService_GetDiscussion_0 = runtime.ForwardResponseMessage - - forward_CompassService_PatchDiscussion_0 = runtime.ForwardResponseMessage - - forward_CompassService_CreateComment_0 = runtime.ForwardResponseMessage - - forward_CompassService_GetAllComments_0 = runtime.ForwardResponseMessage - - forward_CompassService_GetComment_0 = runtime.ForwardResponseMessage - - forward_CompassService_UpdateComment_0 = runtime.ForwardResponseMessage - - forward_CompassService_DeleteComment_0 = runtime.ForwardResponseMessage - - forward_CompassService_SearchAssets_0 = runtime.ForwardResponseMessage - - forward_CompassService_SuggestAssets_0 = runtime.ForwardResponseMessage - - forward_CompassService_GroupAssets_0 = runtime.ForwardResponseMessage - - forward_CompassService_GetGraph_0 = runtime.ForwardResponseMessage - - forward_CompassService_GetAllTypes_0 = runtime.ForwardResponseMessage - - forward_CompassService_GetAllAssets_0 = runtime.ForwardResponseMessage - - forward_CompassService_GetAssetByID_0 = runtime.ForwardResponseMessage - - forward_CompassService_UpsertAsset_0 = runtime.ForwardResponseMessage - - forward_CompassService_UpsertPatchAsset_0 = runtime.ForwardResponseMessage - - forward_CompassService_DeleteAsset_0 = runtime.ForwardResponseMessage - - forward_CompassService_GetAssetStargazers_0 = runtime.ForwardResponseMessage - - forward_CompassService_GetAssetVersionHistory_0 = runtime.ForwardResponseMessage - - forward_CompassService_GetAssetByVersion_0 = runtime.ForwardResponseMessage - - forward_CompassService_CreateAssetProbe_0 = runtime.ForwardResponseMessage - - forward_CompassService_GetUserStarredAssets_0 = runtime.ForwardResponseMessage - - forward_CompassService_GetMyStarredAssets_0 = runtime.ForwardResponseMessage - - forward_CompassService_GetMyStarredAsset_0 = runtime.ForwardResponseMessage - - forward_CompassService_StarAsset_0 = runtime.ForwardResponseMessage - - forward_CompassService_UnstarAsset_0 = runtime.ForwardResponseMessage - - forward_CompassService_GetMyDiscussions_0 = runtime.ForwardResponseMessage - - forward_CompassService_CreateTagAsset_0 = runtime.ForwardResponseMessage - - forward_CompassService_GetTagByAssetAndTemplate_0 = runtime.ForwardResponseMessage - - forward_CompassService_UpdateTagAsset_0 = runtime.ForwardResponseMessage - - forward_CompassService_DeleteTagAsset_0 = runtime.ForwardResponseMessage - - forward_CompassService_GetAllTagsByAsset_0 = runtime.ForwardResponseMessage - - forward_CompassService_GetAllTagTemplates_0 = runtime.ForwardResponseMessage - - forward_CompassService_CreateTagTemplate_0 = runtime.ForwardResponseMessage - - forward_CompassService_GetTagTemplate_0 = runtime.ForwardResponseMessage - - forward_CompassService_UpdateTagTemplate_0 = runtime.ForwardResponseMessage - - forward_CompassService_DeleteTagTemplate_0 = runtime.ForwardResponseMessage - - forward_CompassService_CreateNamespace_0 = runtime.ForwardResponseMessage - - forward_CompassService_GetNamespace_0 = runtime.ForwardResponseMessage - - forward_CompassService_UpdateNamespace_0 = runtime.ForwardResponseMessage - - forward_CompassService_ListNamespaces_0 = runtime.ForwardResponseMessage -) diff --git a/proto/raystack/compass/v1beta1/service_grpc.pb.go b/proto/raystack/compass/v1beta1/service_grpc.pb.go deleted file mode 100644 index dd59c95d..00000000 --- a/proto/raystack/compass/v1beta1/service_grpc.pb.go +++ /dev/null @@ -1,1673 +0,0 @@ -// Code generated by protoc-gen-go-grpc. DO NOT EDIT. -// versions: -// - protoc-gen-go-grpc v1.3.0 -// - protoc (unknown) -// source: raystack/compass/v1beta1/service.proto - -package compassv1beta1 - -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 - -const ( - CompassService_GetAllDiscussions_FullMethodName = "/raystack.compass.v1beta1.CompassService/GetAllDiscussions" - CompassService_CreateDiscussion_FullMethodName = "/raystack.compass.v1beta1.CompassService/CreateDiscussion" - CompassService_GetDiscussion_FullMethodName = "/raystack.compass.v1beta1.CompassService/GetDiscussion" - CompassService_PatchDiscussion_FullMethodName = "/raystack.compass.v1beta1.CompassService/PatchDiscussion" - CompassService_CreateComment_FullMethodName = "/raystack.compass.v1beta1.CompassService/CreateComment" - CompassService_GetAllComments_FullMethodName = "/raystack.compass.v1beta1.CompassService/GetAllComments" - CompassService_GetComment_FullMethodName = "/raystack.compass.v1beta1.CompassService/GetComment" - CompassService_UpdateComment_FullMethodName = "/raystack.compass.v1beta1.CompassService/UpdateComment" - CompassService_DeleteComment_FullMethodName = "/raystack.compass.v1beta1.CompassService/DeleteComment" - CompassService_SearchAssets_FullMethodName = "/raystack.compass.v1beta1.CompassService/SearchAssets" - CompassService_SuggestAssets_FullMethodName = "/raystack.compass.v1beta1.CompassService/SuggestAssets" - CompassService_GroupAssets_FullMethodName = "/raystack.compass.v1beta1.CompassService/GroupAssets" - CompassService_GetGraph_FullMethodName = "/raystack.compass.v1beta1.CompassService/GetGraph" - CompassService_GetAllTypes_FullMethodName = "/raystack.compass.v1beta1.CompassService/GetAllTypes" - CompassService_GetAllAssets_FullMethodName = "/raystack.compass.v1beta1.CompassService/GetAllAssets" - CompassService_GetAssetByID_FullMethodName = "/raystack.compass.v1beta1.CompassService/GetAssetByID" - CompassService_UpsertAsset_FullMethodName = "/raystack.compass.v1beta1.CompassService/UpsertAsset" - CompassService_UpsertPatchAsset_FullMethodName = "/raystack.compass.v1beta1.CompassService/UpsertPatchAsset" - CompassService_DeleteAsset_FullMethodName = "/raystack.compass.v1beta1.CompassService/DeleteAsset" - CompassService_GetAssetStargazers_FullMethodName = "/raystack.compass.v1beta1.CompassService/GetAssetStargazers" - CompassService_GetAssetVersionHistory_FullMethodName = "/raystack.compass.v1beta1.CompassService/GetAssetVersionHistory" - CompassService_GetAssetByVersion_FullMethodName = "/raystack.compass.v1beta1.CompassService/GetAssetByVersion" - CompassService_CreateAssetProbe_FullMethodName = "/raystack.compass.v1beta1.CompassService/CreateAssetProbe" - CompassService_GetUserStarredAssets_FullMethodName = "/raystack.compass.v1beta1.CompassService/GetUserStarredAssets" - CompassService_GetMyStarredAssets_FullMethodName = "/raystack.compass.v1beta1.CompassService/GetMyStarredAssets" - CompassService_GetMyStarredAsset_FullMethodName = "/raystack.compass.v1beta1.CompassService/GetMyStarredAsset" - CompassService_StarAsset_FullMethodName = "/raystack.compass.v1beta1.CompassService/StarAsset" - CompassService_UnstarAsset_FullMethodName = "/raystack.compass.v1beta1.CompassService/UnstarAsset" - CompassService_GetMyDiscussions_FullMethodName = "/raystack.compass.v1beta1.CompassService/GetMyDiscussions" - CompassService_CreateTagAsset_FullMethodName = "/raystack.compass.v1beta1.CompassService/CreateTagAsset" - CompassService_GetTagByAssetAndTemplate_FullMethodName = "/raystack.compass.v1beta1.CompassService/GetTagByAssetAndTemplate" - CompassService_UpdateTagAsset_FullMethodName = "/raystack.compass.v1beta1.CompassService/UpdateTagAsset" - CompassService_DeleteTagAsset_FullMethodName = "/raystack.compass.v1beta1.CompassService/DeleteTagAsset" - CompassService_GetAllTagsByAsset_FullMethodName = "/raystack.compass.v1beta1.CompassService/GetAllTagsByAsset" - CompassService_GetAllTagTemplates_FullMethodName = "/raystack.compass.v1beta1.CompassService/GetAllTagTemplates" - CompassService_CreateTagTemplate_FullMethodName = "/raystack.compass.v1beta1.CompassService/CreateTagTemplate" - CompassService_GetTagTemplate_FullMethodName = "/raystack.compass.v1beta1.CompassService/GetTagTemplate" - CompassService_UpdateTagTemplate_FullMethodName = "/raystack.compass.v1beta1.CompassService/UpdateTagTemplate" - CompassService_DeleteTagTemplate_FullMethodName = "/raystack.compass.v1beta1.CompassService/DeleteTagTemplate" - CompassService_CreateNamespace_FullMethodName = "/raystack.compass.v1beta1.CompassService/CreateNamespace" - CompassService_GetNamespace_FullMethodName = "/raystack.compass.v1beta1.CompassService/GetNamespace" - CompassService_UpdateNamespace_FullMethodName = "/raystack.compass.v1beta1.CompassService/UpdateNamespace" - CompassService_ListNamespaces_FullMethodName = "/raystack.compass.v1beta1.CompassService/ListNamespaces" -) - -// CompassServiceClient is the client API for CompassService 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 CompassServiceClient interface { - // Domain: Discussion - GetAllDiscussions(ctx context.Context, in *GetAllDiscussionsRequest, opts ...grpc.CallOption) (*GetAllDiscussionsResponse, error) - CreateDiscussion(ctx context.Context, in *CreateDiscussionRequest, opts ...grpc.CallOption) (*CreateDiscussionResponse, error) - GetDiscussion(ctx context.Context, in *GetDiscussionRequest, opts ...grpc.CallOption) (*GetDiscussionResponse, error) - PatchDiscussion(ctx context.Context, in *PatchDiscussionRequest, opts ...grpc.CallOption) (*PatchDiscussionResponse, error) - CreateComment(ctx context.Context, in *CreateCommentRequest, opts ...grpc.CallOption) (*CreateCommentResponse, error) - GetAllComments(ctx context.Context, in *GetAllCommentsRequest, opts ...grpc.CallOption) (*GetAllCommentsResponse, error) - GetComment(ctx context.Context, in *GetCommentRequest, opts ...grpc.CallOption) (*GetCommentResponse, error) - UpdateComment(ctx context.Context, in *UpdateCommentRequest, opts ...grpc.CallOption) (*UpdateCommentResponse, error) - DeleteComment(ctx context.Context, in *DeleteCommentRequest, opts ...grpc.CallOption) (*DeleteCommentResponse, error) - // Domain: Asset - SearchAssets(ctx context.Context, in *SearchAssetsRequest, opts ...grpc.CallOption) (*SearchAssetsResponse, error) - SuggestAssets(ctx context.Context, in *SuggestAssetsRequest, opts ...grpc.CallOption) (*SuggestAssetsResponse, error) - GroupAssets(ctx context.Context, in *GroupAssetsRequest, opts ...grpc.CallOption) (*GroupAssetsResponse, error) - GetGraph(ctx context.Context, in *GetGraphRequest, opts ...grpc.CallOption) (*GetGraphResponse, error) - GetAllTypes(ctx context.Context, in *GetAllTypesRequest, opts ...grpc.CallOption) (*GetAllTypesResponse, error) - GetAllAssets(ctx context.Context, in *GetAllAssetsRequest, opts ...grpc.CallOption) (*GetAllAssetsResponse, error) - GetAssetByID(ctx context.Context, in *GetAssetByIDRequest, opts ...grpc.CallOption) (*GetAssetByIDResponse, error) - UpsertAsset(ctx context.Context, in *UpsertAssetRequest, opts ...grpc.CallOption) (*UpsertAssetResponse, error) - UpsertPatchAsset(ctx context.Context, in *UpsertPatchAssetRequest, opts ...grpc.CallOption) (*UpsertPatchAssetResponse, error) - DeleteAsset(ctx context.Context, in *DeleteAssetRequest, opts ...grpc.CallOption) (*DeleteAssetResponse, error) - GetAssetStargazers(ctx context.Context, in *GetAssetStargazersRequest, opts ...grpc.CallOption) (*GetAssetStargazersResponse, error) - GetAssetVersionHistory(ctx context.Context, in *GetAssetVersionHistoryRequest, opts ...grpc.CallOption) (*GetAssetVersionHistoryResponse, error) - GetAssetByVersion(ctx context.Context, in *GetAssetByVersionRequest, opts ...grpc.CallOption) (*GetAssetByVersionResponse, error) - CreateAssetProbe(ctx context.Context, in *CreateAssetProbeRequest, opts ...grpc.CallOption) (*CreateAssetProbeResponse, error) - // Domain: User * Star - GetUserStarredAssets(ctx context.Context, in *GetUserStarredAssetsRequest, opts ...grpc.CallOption) (*GetUserStarredAssetsResponse, error) - GetMyStarredAssets(ctx context.Context, in *GetMyStarredAssetsRequest, opts ...grpc.CallOption) (*GetMyStarredAssetsResponse, error) - GetMyStarredAsset(ctx context.Context, in *GetMyStarredAssetRequest, opts ...grpc.CallOption) (*GetMyStarredAssetResponse, error) - StarAsset(ctx context.Context, in *StarAssetRequest, opts ...grpc.CallOption) (*StarAssetResponse, error) - UnstarAsset(ctx context.Context, in *UnstarAssetRequest, opts ...grpc.CallOption) (*UnstarAssetResponse, error) - GetMyDiscussions(ctx context.Context, in *GetMyDiscussionsRequest, opts ...grpc.CallOption) (*GetMyDiscussionsResponse, error) - // Domain: Tag Templates - CreateTagAsset(ctx context.Context, in *CreateTagAssetRequest, opts ...grpc.CallOption) (*CreateTagAssetResponse, error) - GetTagByAssetAndTemplate(ctx context.Context, in *GetTagByAssetAndTemplateRequest, opts ...grpc.CallOption) (*GetTagByAssetAndTemplateResponse, error) - UpdateTagAsset(ctx context.Context, in *UpdateTagAssetRequest, opts ...grpc.CallOption) (*UpdateTagAssetResponse, error) - DeleteTagAsset(ctx context.Context, in *DeleteTagAssetRequest, opts ...grpc.CallOption) (*DeleteTagAssetResponse, error) - GetAllTagsByAsset(ctx context.Context, in *GetAllTagsByAssetRequest, opts ...grpc.CallOption) (*GetAllTagsByAssetResponse, error) - GetAllTagTemplates(ctx context.Context, in *GetAllTagTemplatesRequest, opts ...grpc.CallOption) (*GetAllTagTemplatesResponse, error) - CreateTagTemplate(ctx context.Context, in *CreateTagTemplateRequest, opts ...grpc.CallOption) (*CreateTagTemplateResponse, error) - GetTagTemplate(ctx context.Context, in *GetTagTemplateRequest, opts ...grpc.CallOption) (*GetTagTemplateResponse, error) - UpdateTagTemplate(ctx context.Context, in *UpdateTagTemplateRequest, opts ...grpc.CallOption) (*UpdateTagTemplateResponse, error) - DeleteTagTemplate(ctx context.Context, in *DeleteTagTemplateRequest, opts ...grpc.CallOption) (*DeleteTagTemplateResponse, error) - // Domain: Namespace - CreateNamespace(ctx context.Context, in *CreateNamespaceRequest, opts ...grpc.CallOption) (*CreateNamespaceResponse, error) - GetNamespace(ctx context.Context, in *GetNamespaceRequest, opts ...grpc.CallOption) (*GetNamespaceResponse, error) - UpdateNamespace(ctx context.Context, in *UpdateNamespaceRequest, opts ...grpc.CallOption) (*UpdateNamespaceResponse, error) - ListNamespaces(ctx context.Context, in *ListNamespacesRequest, opts ...grpc.CallOption) (*ListNamespacesResponse, error) -} - -type compassServiceClient struct { - cc grpc.ClientConnInterface -} - -func NewCompassServiceClient(cc grpc.ClientConnInterface) CompassServiceClient { - return &compassServiceClient{cc} -} - -func (c *compassServiceClient) GetAllDiscussions(ctx context.Context, in *GetAllDiscussionsRequest, opts ...grpc.CallOption) (*GetAllDiscussionsResponse, error) { - out := new(GetAllDiscussionsResponse) - err := c.cc.Invoke(ctx, CompassService_GetAllDiscussions_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *compassServiceClient) CreateDiscussion(ctx context.Context, in *CreateDiscussionRequest, opts ...grpc.CallOption) (*CreateDiscussionResponse, error) { - out := new(CreateDiscussionResponse) - err := c.cc.Invoke(ctx, CompassService_CreateDiscussion_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *compassServiceClient) GetDiscussion(ctx context.Context, in *GetDiscussionRequest, opts ...grpc.CallOption) (*GetDiscussionResponse, error) { - out := new(GetDiscussionResponse) - err := c.cc.Invoke(ctx, CompassService_GetDiscussion_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *compassServiceClient) PatchDiscussion(ctx context.Context, in *PatchDiscussionRequest, opts ...grpc.CallOption) (*PatchDiscussionResponse, error) { - out := new(PatchDiscussionResponse) - err := c.cc.Invoke(ctx, CompassService_PatchDiscussion_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *compassServiceClient) CreateComment(ctx context.Context, in *CreateCommentRequest, opts ...grpc.CallOption) (*CreateCommentResponse, error) { - out := new(CreateCommentResponse) - err := c.cc.Invoke(ctx, CompassService_CreateComment_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *compassServiceClient) GetAllComments(ctx context.Context, in *GetAllCommentsRequest, opts ...grpc.CallOption) (*GetAllCommentsResponse, error) { - out := new(GetAllCommentsResponse) - err := c.cc.Invoke(ctx, CompassService_GetAllComments_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *compassServiceClient) GetComment(ctx context.Context, in *GetCommentRequest, opts ...grpc.CallOption) (*GetCommentResponse, error) { - out := new(GetCommentResponse) - err := c.cc.Invoke(ctx, CompassService_GetComment_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *compassServiceClient) UpdateComment(ctx context.Context, in *UpdateCommentRequest, opts ...grpc.CallOption) (*UpdateCommentResponse, error) { - out := new(UpdateCommentResponse) - err := c.cc.Invoke(ctx, CompassService_UpdateComment_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *compassServiceClient) DeleteComment(ctx context.Context, in *DeleteCommentRequest, opts ...grpc.CallOption) (*DeleteCommentResponse, error) { - out := new(DeleteCommentResponse) - err := c.cc.Invoke(ctx, CompassService_DeleteComment_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *compassServiceClient) SearchAssets(ctx context.Context, in *SearchAssetsRequest, opts ...grpc.CallOption) (*SearchAssetsResponse, error) { - out := new(SearchAssetsResponse) - err := c.cc.Invoke(ctx, CompassService_SearchAssets_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *compassServiceClient) SuggestAssets(ctx context.Context, in *SuggestAssetsRequest, opts ...grpc.CallOption) (*SuggestAssetsResponse, error) { - out := new(SuggestAssetsResponse) - err := c.cc.Invoke(ctx, CompassService_SuggestAssets_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *compassServiceClient) GroupAssets(ctx context.Context, in *GroupAssetsRequest, opts ...grpc.CallOption) (*GroupAssetsResponse, error) { - out := new(GroupAssetsResponse) - err := c.cc.Invoke(ctx, CompassService_GroupAssets_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *compassServiceClient) GetGraph(ctx context.Context, in *GetGraphRequest, opts ...grpc.CallOption) (*GetGraphResponse, error) { - out := new(GetGraphResponse) - err := c.cc.Invoke(ctx, CompassService_GetGraph_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *compassServiceClient) GetAllTypes(ctx context.Context, in *GetAllTypesRequest, opts ...grpc.CallOption) (*GetAllTypesResponse, error) { - out := new(GetAllTypesResponse) - err := c.cc.Invoke(ctx, CompassService_GetAllTypes_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *compassServiceClient) GetAllAssets(ctx context.Context, in *GetAllAssetsRequest, opts ...grpc.CallOption) (*GetAllAssetsResponse, error) { - out := new(GetAllAssetsResponse) - err := c.cc.Invoke(ctx, CompassService_GetAllAssets_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *compassServiceClient) GetAssetByID(ctx context.Context, in *GetAssetByIDRequest, opts ...grpc.CallOption) (*GetAssetByIDResponse, error) { - out := new(GetAssetByIDResponse) - err := c.cc.Invoke(ctx, CompassService_GetAssetByID_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *compassServiceClient) UpsertAsset(ctx context.Context, in *UpsertAssetRequest, opts ...grpc.CallOption) (*UpsertAssetResponse, error) { - out := new(UpsertAssetResponse) - err := c.cc.Invoke(ctx, CompassService_UpsertAsset_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *compassServiceClient) UpsertPatchAsset(ctx context.Context, in *UpsertPatchAssetRequest, opts ...grpc.CallOption) (*UpsertPatchAssetResponse, error) { - out := new(UpsertPatchAssetResponse) - err := c.cc.Invoke(ctx, CompassService_UpsertPatchAsset_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *compassServiceClient) DeleteAsset(ctx context.Context, in *DeleteAssetRequest, opts ...grpc.CallOption) (*DeleteAssetResponse, error) { - out := new(DeleteAssetResponse) - err := c.cc.Invoke(ctx, CompassService_DeleteAsset_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *compassServiceClient) GetAssetStargazers(ctx context.Context, in *GetAssetStargazersRequest, opts ...grpc.CallOption) (*GetAssetStargazersResponse, error) { - out := new(GetAssetStargazersResponse) - err := c.cc.Invoke(ctx, CompassService_GetAssetStargazers_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *compassServiceClient) GetAssetVersionHistory(ctx context.Context, in *GetAssetVersionHistoryRequest, opts ...grpc.CallOption) (*GetAssetVersionHistoryResponse, error) { - out := new(GetAssetVersionHistoryResponse) - err := c.cc.Invoke(ctx, CompassService_GetAssetVersionHistory_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *compassServiceClient) GetAssetByVersion(ctx context.Context, in *GetAssetByVersionRequest, opts ...grpc.CallOption) (*GetAssetByVersionResponse, error) { - out := new(GetAssetByVersionResponse) - err := c.cc.Invoke(ctx, CompassService_GetAssetByVersion_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *compassServiceClient) CreateAssetProbe(ctx context.Context, in *CreateAssetProbeRequest, opts ...grpc.CallOption) (*CreateAssetProbeResponse, error) { - out := new(CreateAssetProbeResponse) - err := c.cc.Invoke(ctx, CompassService_CreateAssetProbe_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *compassServiceClient) GetUserStarredAssets(ctx context.Context, in *GetUserStarredAssetsRequest, opts ...grpc.CallOption) (*GetUserStarredAssetsResponse, error) { - out := new(GetUserStarredAssetsResponse) - err := c.cc.Invoke(ctx, CompassService_GetUserStarredAssets_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *compassServiceClient) GetMyStarredAssets(ctx context.Context, in *GetMyStarredAssetsRequest, opts ...grpc.CallOption) (*GetMyStarredAssetsResponse, error) { - out := new(GetMyStarredAssetsResponse) - err := c.cc.Invoke(ctx, CompassService_GetMyStarredAssets_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *compassServiceClient) GetMyStarredAsset(ctx context.Context, in *GetMyStarredAssetRequest, opts ...grpc.CallOption) (*GetMyStarredAssetResponse, error) { - out := new(GetMyStarredAssetResponse) - err := c.cc.Invoke(ctx, CompassService_GetMyStarredAsset_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *compassServiceClient) StarAsset(ctx context.Context, in *StarAssetRequest, opts ...grpc.CallOption) (*StarAssetResponse, error) { - out := new(StarAssetResponse) - err := c.cc.Invoke(ctx, CompassService_StarAsset_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *compassServiceClient) UnstarAsset(ctx context.Context, in *UnstarAssetRequest, opts ...grpc.CallOption) (*UnstarAssetResponse, error) { - out := new(UnstarAssetResponse) - err := c.cc.Invoke(ctx, CompassService_UnstarAsset_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *compassServiceClient) GetMyDiscussions(ctx context.Context, in *GetMyDiscussionsRequest, opts ...grpc.CallOption) (*GetMyDiscussionsResponse, error) { - out := new(GetMyDiscussionsResponse) - err := c.cc.Invoke(ctx, CompassService_GetMyDiscussions_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *compassServiceClient) CreateTagAsset(ctx context.Context, in *CreateTagAssetRequest, opts ...grpc.CallOption) (*CreateTagAssetResponse, error) { - out := new(CreateTagAssetResponse) - err := c.cc.Invoke(ctx, CompassService_CreateTagAsset_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *compassServiceClient) GetTagByAssetAndTemplate(ctx context.Context, in *GetTagByAssetAndTemplateRequest, opts ...grpc.CallOption) (*GetTagByAssetAndTemplateResponse, error) { - out := new(GetTagByAssetAndTemplateResponse) - err := c.cc.Invoke(ctx, CompassService_GetTagByAssetAndTemplate_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *compassServiceClient) UpdateTagAsset(ctx context.Context, in *UpdateTagAssetRequest, opts ...grpc.CallOption) (*UpdateTagAssetResponse, error) { - out := new(UpdateTagAssetResponse) - err := c.cc.Invoke(ctx, CompassService_UpdateTagAsset_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *compassServiceClient) DeleteTagAsset(ctx context.Context, in *DeleteTagAssetRequest, opts ...grpc.CallOption) (*DeleteTagAssetResponse, error) { - out := new(DeleteTagAssetResponse) - err := c.cc.Invoke(ctx, CompassService_DeleteTagAsset_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *compassServiceClient) GetAllTagsByAsset(ctx context.Context, in *GetAllTagsByAssetRequest, opts ...grpc.CallOption) (*GetAllTagsByAssetResponse, error) { - out := new(GetAllTagsByAssetResponse) - err := c.cc.Invoke(ctx, CompassService_GetAllTagsByAsset_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *compassServiceClient) GetAllTagTemplates(ctx context.Context, in *GetAllTagTemplatesRequest, opts ...grpc.CallOption) (*GetAllTagTemplatesResponse, error) { - out := new(GetAllTagTemplatesResponse) - err := c.cc.Invoke(ctx, CompassService_GetAllTagTemplates_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *compassServiceClient) CreateTagTemplate(ctx context.Context, in *CreateTagTemplateRequest, opts ...grpc.CallOption) (*CreateTagTemplateResponse, error) { - out := new(CreateTagTemplateResponse) - err := c.cc.Invoke(ctx, CompassService_CreateTagTemplate_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *compassServiceClient) GetTagTemplate(ctx context.Context, in *GetTagTemplateRequest, opts ...grpc.CallOption) (*GetTagTemplateResponse, error) { - out := new(GetTagTemplateResponse) - err := c.cc.Invoke(ctx, CompassService_GetTagTemplate_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *compassServiceClient) UpdateTagTemplate(ctx context.Context, in *UpdateTagTemplateRequest, opts ...grpc.CallOption) (*UpdateTagTemplateResponse, error) { - out := new(UpdateTagTemplateResponse) - err := c.cc.Invoke(ctx, CompassService_UpdateTagTemplate_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *compassServiceClient) DeleteTagTemplate(ctx context.Context, in *DeleteTagTemplateRequest, opts ...grpc.CallOption) (*DeleteTagTemplateResponse, error) { - out := new(DeleteTagTemplateResponse) - err := c.cc.Invoke(ctx, CompassService_DeleteTagTemplate_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *compassServiceClient) CreateNamespace(ctx context.Context, in *CreateNamespaceRequest, opts ...grpc.CallOption) (*CreateNamespaceResponse, error) { - out := new(CreateNamespaceResponse) - err := c.cc.Invoke(ctx, CompassService_CreateNamespace_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *compassServiceClient) GetNamespace(ctx context.Context, in *GetNamespaceRequest, opts ...grpc.CallOption) (*GetNamespaceResponse, error) { - out := new(GetNamespaceResponse) - err := c.cc.Invoke(ctx, CompassService_GetNamespace_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *compassServiceClient) UpdateNamespace(ctx context.Context, in *UpdateNamespaceRequest, opts ...grpc.CallOption) (*UpdateNamespaceResponse, error) { - out := new(UpdateNamespaceResponse) - err := c.cc.Invoke(ctx, CompassService_UpdateNamespace_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *compassServiceClient) ListNamespaces(ctx context.Context, in *ListNamespacesRequest, opts ...grpc.CallOption) (*ListNamespacesResponse, error) { - out := new(ListNamespacesResponse) - err := c.cc.Invoke(ctx, CompassService_ListNamespaces_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// CompassServiceServer is the server API for CompassService service. -// All implementations must embed UnimplementedCompassServiceServer -// for forward compatibility -type CompassServiceServer interface { - // Domain: Discussion - GetAllDiscussions(context.Context, *GetAllDiscussionsRequest) (*GetAllDiscussionsResponse, error) - CreateDiscussion(context.Context, *CreateDiscussionRequest) (*CreateDiscussionResponse, error) - GetDiscussion(context.Context, *GetDiscussionRequest) (*GetDiscussionResponse, error) - PatchDiscussion(context.Context, *PatchDiscussionRequest) (*PatchDiscussionResponse, error) - CreateComment(context.Context, *CreateCommentRequest) (*CreateCommentResponse, error) - GetAllComments(context.Context, *GetAllCommentsRequest) (*GetAllCommentsResponse, error) - GetComment(context.Context, *GetCommentRequest) (*GetCommentResponse, error) - UpdateComment(context.Context, *UpdateCommentRequest) (*UpdateCommentResponse, error) - DeleteComment(context.Context, *DeleteCommentRequest) (*DeleteCommentResponse, error) - // Domain: Asset - SearchAssets(context.Context, *SearchAssetsRequest) (*SearchAssetsResponse, error) - SuggestAssets(context.Context, *SuggestAssetsRequest) (*SuggestAssetsResponse, error) - GroupAssets(context.Context, *GroupAssetsRequest) (*GroupAssetsResponse, error) - GetGraph(context.Context, *GetGraphRequest) (*GetGraphResponse, error) - GetAllTypes(context.Context, *GetAllTypesRequest) (*GetAllTypesResponse, error) - GetAllAssets(context.Context, *GetAllAssetsRequest) (*GetAllAssetsResponse, error) - GetAssetByID(context.Context, *GetAssetByIDRequest) (*GetAssetByIDResponse, error) - UpsertAsset(context.Context, *UpsertAssetRequest) (*UpsertAssetResponse, error) - UpsertPatchAsset(context.Context, *UpsertPatchAssetRequest) (*UpsertPatchAssetResponse, error) - DeleteAsset(context.Context, *DeleteAssetRequest) (*DeleteAssetResponse, error) - GetAssetStargazers(context.Context, *GetAssetStargazersRequest) (*GetAssetStargazersResponse, error) - GetAssetVersionHistory(context.Context, *GetAssetVersionHistoryRequest) (*GetAssetVersionHistoryResponse, error) - GetAssetByVersion(context.Context, *GetAssetByVersionRequest) (*GetAssetByVersionResponse, error) - CreateAssetProbe(context.Context, *CreateAssetProbeRequest) (*CreateAssetProbeResponse, error) - // Domain: User * Star - GetUserStarredAssets(context.Context, *GetUserStarredAssetsRequest) (*GetUserStarredAssetsResponse, error) - GetMyStarredAssets(context.Context, *GetMyStarredAssetsRequest) (*GetMyStarredAssetsResponse, error) - GetMyStarredAsset(context.Context, *GetMyStarredAssetRequest) (*GetMyStarredAssetResponse, error) - StarAsset(context.Context, *StarAssetRequest) (*StarAssetResponse, error) - UnstarAsset(context.Context, *UnstarAssetRequest) (*UnstarAssetResponse, error) - GetMyDiscussions(context.Context, *GetMyDiscussionsRequest) (*GetMyDiscussionsResponse, error) - // Domain: Tag Templates - CreateTagAsset(context.Context, *CreateTagAssetRequest) (*CreateTagAssetResponse, error) - GetTagByAssetAndTemplate(context.Context, *GetTagByAssetAndTemplateRequest) (*GetTagByAssetAndTemplateResponse, error) - UpdateTagAsset(context.Context, *UpdateTagAssetRequest) (*UpdateTagAssetResponse, error) - DeleteTagAsset(context.Context, *DeleteTagAssetRequest) (*DeleteTagAssetResponse, error) - GetAllTagsByAsset(context.Context, *GetAllTagsByAssetRequest) (*GetAllTagsByAssetResponse, error) - GetAllTagTemplates(context.Context, *GetAllTagTemplatesRequest) (*GetAllTagTemplatesResponse, error) - CreateTagTemplate(context.Context, *CreateTagTemplateRequest) (*CreateTagTemplateResponse, error) - GetTagTemplate(context.Context, *GetTagTemplateRequest) (*GetTagTemplateResponse, error) - UpdateTagTemplate(context.Context, *UpdateTagTemplateRequest) (*UpdateTagTemplateResponse, error) - DeleteTagTemplate(context.Context, *DeleteTagTemplateRequest) (*DeleteTagTemplateResponse, error) - // Domain: Namespace - CreateNamespace(context.Context, *CreateNamespaceRequest) (*CreateNamespaceResponse, error) - GetNamespace(context.Context, *GetNamespaceRequest) (*GetNamespaceResponse, error) - UpdateNamespace(context.Context, *UpdateNamespaceRequest) (*UpdateNamespaceResponse, error) - ListNamespaces(context.Context, *ListNamespacesRequest) (*ListNamespacesResponse, error) - mustEmbedUnimplementedCompassServiceServer() -} - -// UnimplementedCompassServiceServer must be embedded to have forward compatible implementations. -type UnimplementedCompassServiceServer struct { -} - -func (UnimplementedCompassServiceServer) GetAllDiscussions(context.Context, *GetAllDiscussionsRequest) (*GetAllDiscussionsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetAllDiscussions not implemented") -} -func (UnimplementedCompassServiceServer) CreateDiscussion(context.Context, *CreateDiscussionRequest) (*CreateDiscussionResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method CreateDiscussion not implemented") -} -func (UnimplementedCompassServiceServer) GetDiscussion(context.Context, *GetDiscussionRequest) (*GetDiscussionResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetDiscussion not implemented") -} -func (UnimplementedCompassServiceServer) PatchDiscussion(context.Context, *PatchDiscussionRequest) (*PatchDiscussionResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method PatchDiscussion not implemented") -} -func (UnimplementedCompassServiceServer) CreateComment(context.Context, *CreateCommentRequest) (*CreateCommentResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method CreateComment not implemented") -} -func (UnimplementedCompassServiceServer) GetAllComments(context.Context, *GetAllCommentsRequest) (*GetAllCommentsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetAllComments not implemented") -} -func (UnimplementedCompassServiceServer) GetComment(context.Context, *GetCommentRequest) (*GetCommentResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetComment not implemented") -} -func (UnimplementedCompassServiceServer) UpdateComment(context.Context, *UpdateCommentRequest) (*UpdateCommentResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method UpdateComment not implemented") -} -func (UnimplementedCompassServiceServer) DeleteComment(context.Context, *DeleteCommentRequest) (*DeleteCommentResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method DeleteComment not implemented") -} -func (UnimplementedCompassServiceServer) SearchAssets(context.Context, *SearchAssetsRequest) (*SearchAssetsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method SearchAssets not implemented") -} -func (UnimplementedCompassServiceServer) SuggestAssets(context.Context, *SuggestAssetsRequest) (*SuggestAssetsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method SuggestAssets not implemented") -} -func (UnimplementedCompassServiceServer) GroupAssets(context.Context, *GroupAssetsRequest) (*GroupAssetsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GroupAssets not implemented") -} -func (UnimplementedCompassServiceServer) GetGraph(context.Context, *GetGraphRequest) (*GetGraphResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetGraph not implemented") -} -func (UnimplementedCompassServiceServer) GetAllTypes(context.Context, *GetAllTypesRequest) (*GetAllTypesResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetAllTypes not implemented") -} -func (UnimplementedCompassServiceServer) GetAllAssets(context.Context, *GetAllAssetsRequest) (*GetAllAssetsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetAllAssets not implemented") -} -func (UnimplementedCompassServiceServer) GetAssetByID(context.Context, *GetAssetByIDRequest) (*GetAssetByIDResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetAssetByID not implemented") -} -func (UnimplementedCompassServiceServer) UpsertAsset(context.Context, *UpsertAssetRequest) (*UpsertAssetResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method UpsertAsset not implemented") -} -func (UnimplementedCompassServiceServer) UpsertPatchAsset(context.Context, *UpsertPatchAssetRequest) (*UpsertPatchAssetResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method UpsertPatchAsset not implemented") -} -func (UnimplementedCompassServiceServer) DeleteAsset(context.Context, *DeleteAssetRequest) (*DeleteAssetResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method DeleteAsset not implemented") -} -func (UnimplementedCompassServiceServer) GetAssetStargazers(context.Context, *GetAssetStargazersRequest) (*GetAssetStargazersResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetAssetStargazers not implemented") -} -func (UnimplementedCompassServiceServer) GetAssetVersionHistory(context.Context, *GetAssetVersionHistoryRequest) (*GetAssetVersionHistoryResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetAssetVersionHistory not implemented") -} -func (UnimplementedCompassServiceServer) GetAssetByVersion(context.Context, *GetAssetByVersionRequest) (*GetAssetByVersionResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetAssetByVersion not implemented") -} -func (UnimplementedCompassServiceServer) CreateAssetProbe(context.Context, *CreateAssetProbeRequest) (*CreateAssetProbeResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method CreateAssetProbe not implemented") -} -func (UnimplementedCompassServiceServer) GetUserStarredAssets(context.Context, *GetUserStarredAssetsRequest) (*GetUserStarredAssetsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetUserStarredAssets not implemented") -} -func (UnimplementedCompassServiceServer) GetMyStarredAssets(context.Context, *GetMyStarredAssetsRequest) (*GetMyStarredAssetsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetMyStarredAssets not implemented") -} -func (UnimplementedCompassServiceServer) GetMyStarredAsset(context.Context, *GetMyStarredAssetRequest) (*GetMyStarredAssetResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetMyStarredAsset not implemented") -} -func (UnimplementedCompassServiceServer) StarAsset(context.Context, *StarAssetRequest) (*StarAssetResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method StarAsset not implemented") -} -func (UnimplementedCompassServiceServer) UnstarAsset(context.Context, *UnstarAssetRequest) (*UnstarAssetResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method UnstarAsset not implemented") -} -func (UnimplementedCompassServiceServer) GetMyDiscussions(context.Context, *GetMyDiscussionsRequest) (*GetMyDiscussionsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetMyDiscussions not implemented") -} -func (UnimplementedCompassServiceServer) CreateTagAsset(context.Context, *CreateTagAssetRequest) (*CreateTagAssetResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method CreateTagAsset not implemented") -} -func (UnimplementedCompassServiceServer) GetTagByAssetAndTemplate(context.Context, *GetTagByAssetAndTemplateRequest) (*GetTagByAssetAndTemplateResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetTagByAssetAndTemplate not implemented") -} -func (UnimplementedCompassServiceServer) UpdateTagAsset(context.Context, *UpdateTagAssetRequest) (*UpdateTagAssetResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method UpdateTagAsset not implemented") -} -func (UnimplementedCompassServiceServer) DeleteTagAsset(context.Context, *DeleteTagAssetRequest) (*DeleteTagAssetResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method DeleteTagAsset not implemented") -} -func (UnimplementedCompassServiceServer) GetAllTagsByAsset(context.Context, *GetAllTagsByAssetRequest) (*GetAllTagsByAssetResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetAllTagsByAsset not implemented") -} -func (UnimplementedCompassServiceServer) GetAllTagTemplates(context.Context, *GetAllTagTemplatesRequest) (*GetAllTagTemplatesResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetAllTagTemplates not implemented") -} -func (UnimplementedCompassServiceServer) CreateTagTemplate(context.Context, *CreateTagTemplateRequest) (*CreateTagTemplateResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method CreateTagTemplate not implemented") -} -func (UnimplementedCompassServiceServer) GetTagTemplate(context.Context, *GetTagTemplateRequest) (*GetTagTemplateResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetTagTemplate not implemented") -} -func (UnimplementedCompassServiceServer) UpdateTagTemplate(context.Context, *UpdateTagTemplateRequest) (*UpdateTagTemplateResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method UpdateTagTemplate not implemented") -} -func (UnimplementedCompassServiceServer) DeleteTagTemplate(context.Context, *DeleteTagTemplateRequest) (*DeleteTagTemplateResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method DeleteTagTemplate not implemented") -} -func (UnimplementedCompassServiceServer) CreateNamespace(context.Context, *CreateNamespaceRequest) (*CreateNamespaceResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method CreateNamespace not implemented") -} -func (UnimplementedCompassServiceServer) GetNamespace(context.Context, *GetNamespaceRequest) (*GetNamespaceResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetNamespace not implemented") -} -func (UnimplementedCompassServiceServer) UpdateNamespace(context.Context, *UpdateNamespaceRequest) (*UpdateNamespaceResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method UpdateNamespace not implemented") -} -func (UnimplementedCompassServiceServer) ListNamespaces(context.Context, *ListNamespacesRequest) (*ListNamespacesResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ListNamespaces not implemented") -} -func (UnimplementedCompassServiceServer) mustEmbedUnimplementedCompassServiceServer() {} - -// UnsafeCompassServiceServer may be embedded to opt out of forward compatibility for this service. -// Use of this interface is not recommended, as added methods to CompassServiceServer will -// result in compilation errors. -type UnsafeCompassServiceServer interface { - mustEmbedUnimplementedCompassServiceServer() -} - -func RegisterCompassServiceServer(s grpc.ServiceRegistrar, srv CompassServiceServer) { - s.RegisterService(&CompassService_ServiceDesc, srv) -} - -func _CompassService_GetAllDiscussions_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetAllDiscussionsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(CompassServiceServer).GetAllDiscussions(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: CompassService_GetAllDiscussions_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(CompassServiceServer).GetAllDiscussions(ctx, req.(*GetAllDiscussionsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _CompassService_CreateDiscussion_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(CreateDiscussionRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(CompassServiceServer).CreateDiscussion(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: CompassService_CreateDiscussion_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(CompassServiceServer).CreateDiscussion(ctx, req.(*CreateDiscussionRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _CompassService_GetDiscussion_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetDiscussionRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(CompassServiceServer).GetDiscussion(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: CompassService_GetDiscussion_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(CompassServiceServer).GetDiscussion(ctx, req.(*GetDiscussionRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _CompassService_PatchDiscussion_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(PatchDiscussionRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(CompassServiceServer).PatchDiscussion(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: CompassService_PatchDiscussion_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(CompassServiceServer).PatchDiscussion(ctx, req.(*PatchDiscussionRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _CompassService_CreateComment_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(CreateCommentRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(CompassServiceServer).CreateComment(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: CompassService_CreateComment_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(CompassServiceServer).CreateComment(ctx, req.(*CreateCommentRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _CompassService_GetAllComments_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetAllCommentsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(CompassServiceServer).GetAllComments(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: CompassService_GetAllComments_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(CompassServiceServer).GetAllComments(ctx, req.(*GetAllCommentsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _CompassService_GetComment_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetCommentRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(CompassServiceServer).GetComment(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: CompassService_GetComment_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(CompassServiceServer).GetComment(ctx, req.(*GetCommentRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _CompassService_UpdateComment_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(UpdateCommentRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(CompassServiceServer).UpdateComment(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: CompassService_UpdateComment_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(CompassServiceServer).UpdateComment(ctx, req.(*UpdateCommentRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _CompassService_DeleteComment_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DeleteCommentRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(CompassServiceServer).DeleteComment(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: CompassService_DeleteComment_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(CompassServiceServer).DeleteComment(ctx, req.(*DeleteCommentRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _CompassService_SearchAssets_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(SearchAssetsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(CompassServiceServer).SearchAssets(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: CompassService_SearchAssets_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(CompassServiceServer).SearchAssets(ctx, req.(*SearchAssetsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _CompassService_SuggestAssets_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(SuggestAssetsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(CompassServiceServer).SuggestAssets(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: CompassService_SuggestAssets_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(CompassServiceServer).SuggestAssets(ctx, req.(*SuggestAssetsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _CompassService_GroupAssets_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GroupAssetsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(CompassServiceServer).GroupAssets(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: CompassService_GroupAssets_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(CompassServiceServer).GroupAssets(ctx, req.(*GroupAssetsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _CompassService_GetGraph_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetGraphRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(CompassServiceServer).GetGraph(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: CompassService_GetGraph_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(CompassServiceServer).GetGraph(ctx, req.(*GetGraphRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _CompassService_GetAllTypes_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetAllTypesRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(CompassServiceServer).GetAllTypes(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: CompassService_GetAllTypes_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(CompassServiceServer).GetAllTypes(ctx, req.(*GetAllTypesRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _CompassService_GetAllAssets_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetAllAssetsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(CompassServiceServer).GetAllAssets(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: CompassService_GetAllAssets_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(CompassServiceServer).GetAllAssets(ctx, req.(*GetAllAssetsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _CompassService_GetAssetByID_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetAssetByIDRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(CompassServiceServer).GetAssetByID(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: CompassService_GetAssetByID_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(CompassServiceServer).GetAssetByID(ctx, req.(*GetAssetByIDRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _CompassService_UpsertAsset_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(UpsertAssetRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(CompassServiceServer).UpsertAsset(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: CompassService_UpsertAsset_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(CompassServiceServer).UpsertAsset(ctx, req.(*UpsertAssetRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _CompassService_UpsertPatchAsset_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(UpsertPatchAssetRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(CompassServiceServer).UpsertPatchAsset(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: CompassService_UpsertPatchAsset_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(CompassServiceServer).UpsertPatchAsset(ctx, req.(*UpsertPatchAssetRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _CompassService_DeleteAsset_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DeleteAssetRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(CompassServiceServer).DeleteAsset(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: CompassService_DeleteAsset_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(CompassServiceServer).DeleteAsset(ctx, req.(*DeleteAssetRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _CompassService_GetAssetStargazers_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetAssetStargazersRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(CompassServiceServer).GetAssetStargazers(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: CompassService_GetAssetStargazers_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(CompassServiceServer).GetAssetStargazers(ctx, req.(*GetAssetStargazersRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _CompassService_GetAssetVersionHistory_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetAssetVersionHistoryRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(CompassServiceServer).GetAssetVersionHistory(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: CompassService_GetAssetVersionHistory_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(CompassServiceServer).GetAssetVersionHistory(ctx, req.(*GetAssetVersionHistoryRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _CompassService_GetAssetByVersion_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetAssetByVersionRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(CompassServiceServer).GetAssetByVersion(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: CompassService_GetAssetByVersion_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(CompassServiceServer).GetAssetByVersion(ctx, req.(*GetAssetByVersionRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _CompassService_CreateAssetProbe_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(CreateAssetProbeRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(CompassServiceServer).CreateAssetProbe(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: CompassService_CreateAssetProbe_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(CompassServiceServer).CreateAssetProbe(ctx, req.(*CreateAssetProbeRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _CompassService_GetUserStarredAssets_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetUserStarredAssetsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(CompassServiceServer).GetUserStarredAssets(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: CompassService_GetUserStarredAssets_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(CompassServiceServer).GetUserStarredAssets(ctx, req.(*GetUserStarredAssetsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _CompassService_GetMyStarredAssets_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetMyStarredAssetsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(CompassServiceServer).GetMyStarredAssets(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: CompassService_GetMyStarredAssets_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(CompassServiceServer).GetMyStarredAssets(ctx, req.(*GetMyStarredAssetsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _CompassService_GetMyStarredAsset_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetMyStarredAssetRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(CompassServiceServer).GetMyStarredAsset(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: CompassService_GetMyStarredAsset_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(CompassServiceServer).GetMyStarredAsset(ctx, req.(*GetMyStarredAssetRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _CompassService_StarAsset_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(StarAssetRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(CompassServiceServer).StarAsset(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: CompassService_StarAsset_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(CompassServiceServer).StarAsset(ctx, req.(*StarAssetRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _CompassService_UnstarAsset_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(UnstarAssetRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(CompassServiceServer).UnstarAsset(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: CompassService_UnstarAsset_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(CompassServiceServer).UnstarAsset(ctx, req.(*UnstarAssetRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _CompassService_GetMyDiscussions_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetMyDiscussionsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(CompassServiceServer).GetMyDiscussions(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: CompassService_GetMyDiscussions_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(CompassServiceServer).GetMyDiscussions(ctx, req.(*GetMyDiscussionsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _CompassService_CreateTagAsset_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(CreateTagAssetRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(CompassServiceServer).CreateTagAsset(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: CompassService_CreateTagAsset_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(CompassServiceServer).CreateTagAsset(ctx, req.(*CreateTagAssetRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _CompassService_GetTagByAssetAndTemplate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetTagByAssetAndTemplateRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(CompassServiceServer).GetTagByAssetAndTemplate(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: CompassService_GetTagByAssetAndTemplate_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(CompassServiceServer).GetTagByAssetAndTemplate(ctx, req.(*GetTagByAssetAndTemplateRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _CompassService_UpdateTagAsset_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(UpdateTagAssetRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(CompassServiceServer).UpdateTagAsset(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: CompassService_UpdateTagAsset_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(CompassServiceServer).UpdateTagAsset(ctx, req.(*UpdateTagAssetRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _CompassService_DeleteTagAsset_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DeleteTagAssetRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(CompassServiceServer).DeleteTagAsset(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: CompassService_DeleteTagAsset_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(CompassServiceServer).DeleteTagAsset(ctx, req.(*DeleteTagAssetRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _CompassService_GetAllTagsByAsset_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetAllTagsByAssetRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(CompassServiceServer).GetAllTagsByAsset(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: CompassService_GetAllTagsByAsset_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(CompassServiceServer).GetAllTagsByAsset(ctx, req.(*GetAllTagsByAssetRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _CompassService_GetAllTagTemplates_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetAllTagTemplatesRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(CompassServiceServer).GetAllTagTemplates(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: CompassService_GetAllTagTemplates_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(CompassServiceServer).GetAllTagTemplates(ctx, req.(*GetAllTagTemplatesRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _CompassService_CreateTagTemplate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(CreateTagTemplateRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(CompassServiceServer).CreateTagTemplate(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: CompassService_CreateTagTemplate_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(CompassServiceServer).CreateTagTemplate(ctx, req.(*CreateTagTemplateRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _CompassService_GetTagTemplate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetTagTemplateRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(CompassServiceServer).GetTagTemplate(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: CompassService_GetTagTemplate_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(CompassServiceServer).GetTagTemplate(ctx, req.(*GetTagTemplateRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _CompassService_UpdateTagTemplate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(UpdateTagTemplateRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(CompassServiceServer).UpdateTagTemplate(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: CompassService_UpdateTagTemplate_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(CompassServiceServer).UpdateTagTemplate(ctx, req.(*UpdateTagTemplateRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _CompassService_DeleteTagTemplate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DeleteTagTemplateRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(CompassServiceServer).DeleteTagTemplate(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: CompassService_DeleteTagTemplate_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(CompassServiceServer).DeleteTagTemplate(ctx, req.(*DeleteTagTemplateRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _CompassService_CreateNamespace_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(CreateNamespaceRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(CompassServiceServer).CreateNamespace(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: CompassService_CreateNamespace_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(CompassServiceServer).CreateNamespace(ctx, req.(*CreateNamespaceRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _CompassService_GetNamespace_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetNamespaceRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(CompassServiceServer).GetNamespace(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: CompassService_GetNamespace_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(CompassServiceServer).GetNamespace(ctx, req.(*GetNamespaceRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _CompassService_UpdateNamespace_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(UpdateNamespaceRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(CompassServiceServer).UpdateNamespace(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: CompassService_UpdateNamespace_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(CompassServiceServer).UpdateNamespace(ctx, req.(*UpdateNamespaceRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _CompassService_ListNamespaces_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ListNamespacesRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(CompassServiceServer).ListNamespaces(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: CompassService_ListNamespaces_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(CompassServiceServer).ListNamespaces(ctx, req.(*ListNamespacesRequest)) - } - return interceptor(ctx, in, info, handler) -} - -// CompassService_ServiceDesc is the grpc.ServiceDesc for CompassService service. -// It's only intended for direct use with grpc.RegisterService, -// and not to be introspected or modified (even as a copy) -var CompassService_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "raystack.compass.v1beta1.CompassService", - HandlerType: (*CompassServiceServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "GetAllDiscussions", - Handler: _CompassService_GetAllDiscussions_Handler, - }, - { - MethodName: "CreateDiscussion", - Handler: _CompassService_CreateDiscussion_Handler, - }, - { - MethodName: "GetDiscussion", - Handler: _CompassService_GetDiscussion_Handler, - }, - { - MethodName: "PatchDiscussion", - Handler: _CompassService_PatchDiscussion_Handler, - }, - { - MethodName: "CreateComment", - Handler: _CompassService_CreateComment_Handler, - }, - { - MethodName: "GetAllComments", - Handler: _CompassService_GetAllComments_Handler, - }, - { - MethodName: "GetComment", - Handler: _CompassService_GetComment_Handler, - }, - { - MethodName: "UpdateComment", - Handler: _CompassService_UpdateComment_Handler, - }, - { - MethodName: "DeleteComment", - Handler: _CompassService_DeleteComment_Handler, - }, - { - MethodName: "SearchAssets", - Handler: _CompassService_SearchAssets_Handler, - }, - { - MethodName: "SuggestAssets", - Handler: _CompassService_SuggestAssets_Handler, - }, - { - MethodName: "GroupAssets", - Handler: _CompassService_GroupAssets_Handler, - }, - { - MethodName: "GetGraph", - Handler: _CompassService_GetGraph_Handler, - }, - { - MethodName: "GetAllTypes", - Handler: _CompassService_GetAllTypes_Handler, - }, - { - MethodName: "GetAllAssets", - Handler: _CompassService_GetAllAssets_Handler, - }, - { - MethodName: "GetAssetByID", - Handler: _CompassService_GetAssetByID_Handler, - }, - { - MethodName: "UpsertAsset", - Handler: _CompassService_UpsertAsset_Handler, - }, - { - MethodName: "UpsertPatchAsset", - Handler: _CompassService_UpsertPatchAsset_Handler, - }, - { - MethodName: "DeleteAsset", - Handler: _CompassService_DeleteAsset_Handler, - }, - { - MethodName: "GetAssetStargazers", - Handler: _CompassService_GetAssetStargazers_Handler, - }, - { - MethodName: "GetAssetVersionHistory", - Handler: _CompassService_GetAssetVersionHistory_Handler, - }, - { - MethodName: "GetAssetByVersion", - Handler: _CompassService_GetAssetByVersion_Handler, - }, - { - MethodName: "CreateAssetProbe", - Handler: _CompassService_CreateAssetProbe_Handler, - }, - { - MethodName: "GetUserStarredAssets", - Handler: _CompassService_GetUserStarredAssets_Handler, - }, - { - MethodName: "GetMyStarredAssets", - Handler: _CompassService_GetMyStarredAssets_Handler, - }, - { - MethodName: "GetMyStarredAsset", - Handler: _CompassService_GetMyStarredAsset_Handler, - }, - { - MethodName: "StarAsset", - Handler: _CompassService_StarAsset_Handler, - }, - { - MethodName: "UnstarAsset", - Handler: _CompassService_UnstarAsset_Handler, - }, - { - MethodName: "GetMyDiscussions", - Handler: _CompassService_GetMyDiscussions_Handler, - }, - { - MethodName: "CreateTagAsset", - Handler: _CompassService_CreateTagAsset_Handler, - }, - { - MethodName: "GetTagByAssetAndTemplate", - Handler: _CompassService_GetTagByAssetAndTemplate_Handler, - }, - { - MethodName: "UpdateTagAsset", - Handler: _CompassService_UpdateTagAsset_Handler, - }, - { - MethodName: "DeleteTagAsset", - Handler: _CompassService_DeleteTagAsset_Handler, - }, - { - MethodName: "GetAllTagsByAsset", - Handler: _CompassService_GetAllTagsByAsset_Handler, - }, - { - MethodName: "GetAllTagTemplates", - Handler: _CompassService_GetAllTagTemplates_Handler, - }, - { - MethodName: "CreateTagTemplate", - Handler: _CompassService_CreateTagTemplate_Handler, - }, - { - MethodName: "GetTagTemplate", - Handler: _CompassService_GetTagTemplate_Handler, - }, - { - MethodName: "UpdateTagTemplate", - Handler: _CompassService_UpdateTagTemplate_Handler, - }, - { - MethodName: "DeleteTagTemplate", - Handler: _CompassService_DeleteTagTemplate_Handler, - }, - { - MethodName: "CreateNamespace", - Handler: _CompassService_CreateNamespace_Handler, - }, - { - MethodName: "GetNamespace", - Handler: _CompassService_GetNamespace_Handler, - }, - { - MethodName: "UpdateNamespace", - Handler: _CompassService_UpdateNamespace_Handler, - }, - { - MethodName: "ListNamespaces", - Handler: _CompassService_ListNamespaces_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "raystack/compass/v1beta1/service.proto", -}