Repository: mercari/grpc-federation
Branch: main
Commit: 11eafa3a8396
Files: 814
Total size: 8.1 MB
Directory structure:
gitextract_vzvj21ua/
├── .github/
│ ├── ISSUE_TEMPLATE/
│ │ ├── bug_report.md
│ │ └── feature_request.md
│ ├── pull_request_template.md
│ └── workflows/
│ ├── buf.yml
│ ├── lint.yml
│ ├── release-jetbrains.yml
│ ├── release-vscode.yml
│ └── test.yml
├── .gitignore
├── .golangci.yml
├── .goreleaser.yaml
├── .octocov.yml
├── .vscode/
│ └── settings.json
├── LICENSE
├── Makefile
├── README.md
├── _examples/
│ ├── 01_minimum/
│ │ ├── .gitignore
│ │ ├── .vscode/
│ │ │ └── settings.json
│ │ ├── Makefile
│ │ ├── buf.gen.yaml
│ │ ├── buf.work.yaml
│ │ ├── federation/
│ │ │ ├── federation.pb.go
│ │ │ ├── federation_grpc.pb.go
│ │ │ └── federation_grpc_federation.pb.go
│ │ ├── go.mod
│ │ ├── go.sum
│ │ ├── grpc-federation.yaml
│ │ ├── main_test.go
│ │ └── proto/
│ │ ├── buf.yaml
│ │ └── federation/
│ │ └── federation.proto
│ ├── 02_simple/
│ │ ├── .gitignore
│ │ ├── .vscode/
│ │ │ └── settings.json
│ │ ├── Makefile
│ │ ├── buf.gen.yaml
│ │ ├── buf.work.yaml
│ │ ├── federation/
│ │ │ ├── federation.pb.go
│ │ │ ├── federation_grpc.pb.go
│ │ │ └── federation_grpc_federation.pb.go
│ │ ├── go.mod
│ │ ├── go.sum
│ │ ├── grpc-federation.yaml
│ │ ├── main_test.go
│ │ ├── post/
│ │ │ ├── post.pb.go
│ │ │ └── post_grpc.pb.go
│ │ ├── proto/
│ │ │ ├── buf.yaml
│ │ │ ├── federation/
│ │ │ │ └── federation.proto
│ │ │ ├── post/
│ │ │ │ └── post.proto
│ │ │ └── user/
│ │ │ └── user.proto
│ │ └── user/
│ │ ├── user.pb.go
│ │ └── user_grpc.pb.go
│ ├── 03_custom_resolver/
│ │ ├── .gitignore
│ │ ├── .vscode/
│ │ │ └── settings.json
│ │ ├── Makefile
│ │ ├── buf.gen.yaml
│ │ ├── buf.work.yaml
│ │ ├── federation/
│ │ │ ├── federation.pb.go
│ │ │ ├── federation_grpc.pb.go
│ │ │ ├── federation_grpc_federation.pb.go
│ │ │ ├── other.pb.go
│ │ │ └── other_grpc_federation.pb.go
│ │ ├── go.mod
│ │ ├── go.sum
│ │ ├── main_test.go
│ │ ├── post/
│ │ │ ├── post.pb.go
│ │ │ └── post_grpc.pb.go
│ │ ├── proto/
│ │ │ ├── buf.yaml
│ │ │ ├── federation/
│ │ │ │ ├── federation.proto
│ │ │ │ └── other.proto
│ │ │ ├── post/
│ │ │ │ └── post.proto
│ │ │ └── user/
│ │ │ └── user.proto
│ │ └── user/
│ │ ├── user.pb.go
│ │ └── user_grpc.pb.go
│ ├── 04_timeout/
│ │ ├── .gitignore
│ │ ├── Makefile
│ │ ├── buf.gen.yaml
│ │ ├── buf.work.yaml
│ │ ├── federation/
│ │ │ ├── federation.pb.go
│ │ │ ├── federation_grpc.pb.go
│ │ │ └── federation_grpc_federation.pb.go
│ │ ├── go.mod
│ │ ├── go.sum
│ │ ├── grpc/
│ │ │ └── federation/
│ │ │ └── federation.pb.go
│ │ ├── grpc-federation.yaml
│ │ ├── main_test.go
│ │ ├── post/
│ │ │ ├── post.pb.go
│ │ │ └── post_grpc.pb.go
│ │ └── proto/
│ │ ├── buf.yaml
│ │ ├── federation/
│ │ │ └── federation.proto
│ │ └── post/
│ │ └── post.proto
│ ├── 05_async/
│ │ ├── .gitignore
│ │ ├── Makefile
│ │ ├── buf.gen.yaml
│ │ ├── buf.work.yaml
│ │ ├── federation/
│ │ │ ├── federation.pb.go
│ │ │ ├── federation_grpc.pb.go
│ │ │ └── federation_grpc_federation.pb.go
│ │ ├── go.mod
│ │ ├── go.sum
│ │ ├── grpc/
│ │ │ └── federation/
│ │ │ └── federation.pb.go
│ │ ├── main_test.go
│ │ └── proto/
│ │ ├── buf.yaml
│ │ └── federation/
│ │ └── federation.proto
│ ├── 06_alias/
│ │ ├── .gitignore
│ │ ├── Makefile
│ │ ├── buf.gen.yaml
│ │ ├── buf.work.yaml
│ │ ├── federation/
│ │ │ ├── federation.pb.go
│ │ │ ├── federation_grpc.pb.go
│ │ │ └── federation_grpc_federation.pb.go
│ │ ├── go.mod
│ │ ├── go.sum
│ │ ├── grpc/
│ │ │ └── federation/
│ │ │ └── federation.pb.go
│ │ ├── main_test.go
│ │ ├── post/
│ │ │ ├── post.pb.go
│ │ │ ├── post_grpc.pb.go
│ │ │ └── v2/
│ │ │ ├── extra.pb.go
│ │ │ ├── post.pb.go
│ │ │ └── post_grpc.pb.go
│ │ └── proto/
│ │ ├── buf.yaml
│ │ ├── federation/
│ │ │ └── federation.proto
│ │ └── post/
│ │ ├── post.proto
│ │ └── v2/
│ │ ├── extra.proto
│ │ └── post.proto
│ ├── 07_autobind/
│ │ ├── .gitignore
│ │ ├── .vscode/
│ │ │ └── settings.json
│ │ ├── Makefile
│ │ ├── buf.gen.yaml
│ │ ├── buf.work.yaml
│ │ ├── federation/
│ │ │ ├── federation.pb.go
│ │ │ ├── federation_grpc.pb.go
│ │ │ └── federation_grpc_federation.pb.go
│ │ ├── go.mod
│ │ ├── go.sum
│ │ ├── main_test.go
│ │ ├── post/
│ │ │ ├── post.pb.go
│ │ │ └── post_grpc.pb.go
│ │ └── proto/
│ │ ├── buf.yaml
│ │ ├── federation/
│ │ │ └── federation.proto
│ │ └── post/
│ │ └── post.proto
│ ├── 08_literal/
│ │ ├── .gitignore
│ │ ├── .vscode/
│ │ │ └── settings.json
│ │ ├── Makefile
│ │ ├── buf.gen.yaml
│ │ ├── buf.work.yaml
│ │ ├── content/
│ │ │ ├── content.pb.go
│ │ │ └── content_grpc.pb.go
│ │ ├── federation/
│ │ │ ├── federation.pb.go
│ │ │ ├── federation_grpc.pb.go
│ │ │ └── federation_grpc_federation.pb.go
│ │ ├── go.mod
│ │ ├── go.sum
│ │ ├── main_test.go
│ │ └── proto/
│ │ ├── buf.yaml
│ │ ├── content/
│ │ │ └── content.proto
│ │ └── federation/
│ │ └── federation.proto
│ ├── 09_multi_user/
│ │ ├── .gitignore
│ │ ├── Makefile
│ │ ├── buf.gen.yaml
│ │ ├── buf.work.yaml
│ │ ├── federation/
│ │ │ ├── federation.pb.go
│ │ │ ├── federation_grpc.pb.go
│ │ │ └── federation_grpc_federation.pb.go
│ │ ├── go.mod
│ │ ├── go.sum
│ │ ├── grpc/
│ │ │ └── federation/
│ │ │ └── federation.pb.go
│ │ ├── main_test.go
│ │ ├── proto/
│ │ │ ├── buf.yaml
│ │ │ ├── federation/
│ │ │ │ └── federation.proto
│ │ │ └── user/
│ │ │ └── user.proto
│ │ └── user/
│ │ ├── user.pb.go
│ │ └── user_grpc.pb.go
│ ├── 10_oneof/
│ │ ├── .gitignore
│ │ ├── Makefile
│ │ ├── buf.gen.yaml
│ │ ├── buf.work.yaml
│ │ ├── federation/
│ │ │ ├── federation.pb.go
│ │ │ ├── federation_grpc.pb.go
│ │ │ └── federation_grpc_federation.pb.go
│ │ ├── go.mod
│ │ ├── go.sum
│ │ ├── grpc/
│ │ │ └── federation/
│ │ │ └── federation.pb.go
│ │ ├── main_test.go
│ │ ├── proto/
│ │ │ ├── buf.yaml
│ │ │ ├── federation/
│ │ │ │ └── federation.proto
│ │ │ └── user/
│ │ │ └── user.proto
│ │ └── user/
│ │ ├── user.pb.go
│ │ └── user_grpc.pb.go
│ ├── 11_multi_service/
│ │ ├── .gitignore
│ │ ├── Makefile
│ │ ├── buf.gen.yaml
│ │ ├── buf.work.yaml
│ │ ├── comment/
│ │ │ └── comment.pb.go
│ │ ├── favorite/
│ │ │ └── favorite.pb.go
│ │ ├── federation/
│ │ │ ├── federation.pb.go
│ │ │ ├── federation_grpc.pb.go
│ │ │ ├── federation_grpc_federation.pb.go
│ │ │ ├── other.pb.go
│ │ │ ├── other_grpc.pb.go
│ │ │ ├── other_grpc_federation.pb.go
│ │ │ ├── ping.pb.go
│ │ │ ├── ping_grpc_federation.pb.go
│ │ │ ├── reaction.pb.go
│ │ │ └── reaction_grpc_federation.pb.go
│ │ ├── go.mod
│ │ ├── go.sum
│ │ ├── grpc/
│ │ │ └── federation/
│ │ │ └── federation.pb.go
│ │ ├── grpc-federation.yaml
│ │ ├── like/
│ │ │ └── like.pb.go
│ │ ├── main_test.go
│ │ └── proto/
│ │ ├── buf.yaml
│ │ ├── comment/
│ │ │ └── comment.proto
│ │ ├── favorite/
│ │ │ └── favorite.proto
│ │ └── federation/
│ │ ├── federation.proto
│ │ ├── other.proto
│ │ └── reaction.proto
│ ├── 12_validation/
│ │ ├── .gitignore
│ │ ├── .vscode/
│ │ │ └── settings.json
│ │ ├── Makefile
│ │ ├── buf.gen.yaml
│ │ ├── buf.work.yaml
│ │ ├── federation/
│ │ │ ├── federation.pb.go
│ │ │ ├── federation_grpc.pb.go
│ │ │ └── federation_grpc_federation.pb.go
│ │ ├── go.mod
│ │ ├── go.sum
│ │ ├── main_test.go
│ │ └── proto/
│ │ ├── buf.yaml
│ │ └── federation/
│ │ └── federation.proto
│ ├── 13_map/
│ │ ├── .gitignore
│ │ ├── .vscode/
│ │ │ └── settings.json
│ │ ├── Makefile
│ │ ├── buf.gen.yaml
│ │ ├── buf.work.yaml
│ │ ├── federation/
│ │ │ ├── federation.pb.go
│ │ │ ├── federation_grpc.pb.go
│ │ │ └── federation_grpc_federation.pb.go
│ │ ├── go.mod
│ │ ├── go.sum
│ │ ├── main_test.go
│ │ ├── post/
│ │ │ ├── post.pb.go
│ │ │ └── post_grpc.pb.go
│ │ ├── proto/
│ │ │ ├── buf.yaml
│ │ │ ├── federation/
│ │ │ │ └── federation.proto
│ │ │ ├── post/
│ │ │ │ └── post.proto
│ │ │ └── user/
│ │ │ └── user.proto
│ │ └── user/
│ │ ├── user.pb.go
│ │ └── user_grpc.pb.go
│ ├── 14_condition/
│ │ ├── .gitignore
│ │ ├── Makefile
│ │ ├── buf.gen.yaml
│ │ ├── buf.work.yaml
│ │ ├── federation/
│ │ │ ├── federation.pb.go
│ │ │ ├── federation_grpc.pb.go
│ │ │ └── federation_grpc_federation.pb.go
│ │ ├── go.mod
│ │ ├── go.sum
│ │ ├── grpc/
│ │ │ └── federation/
│ │ │ └── federation.pb.go
│ │ ├── main_test.go
│ │ ├── post/
│ │ │ ├── post.pb.go
│ │ │ └── post_grpc.pb.go
│ │ └── proto/
│ │ ├── buf.yaml
│ │ ├── federation/
│ │ │ └── federation.proto
│ │ └── post/
│ │ └── post.proto
│ ├── 15_cel_plugin/
│ │ ├── .gitignore
│ │ ├── Makefile
│ │ ├── README.md
│ │ ├── buf.gen.yaml
│ │ ├── buf.work.yaml
│ │ ├── cmd/
│ │ │ └── plugin/
│ │ │ └── main.go
│ │ ├── federation/
│ │ │ ├── federation.pb.go
│ │ │ ├── federation_grpc.pb.go
│ │ │ └── federation_grpc_federation.pb.go
│ │ ├── go.mod
│ │ ├── go.sum
│ │ ├── main_test.go
│ │ ├── plugin/
│ │ │ ├── plugin.pb.go
│ │ │ └── plugin_grpc_federation.pb.go
│ │ └── proto/
│ │ ├── buf.yaml
│ │ ├── federation/
│ │ │ └── federation.proto
│ │ └── plugin/
│ │ └── plugin.proto
│ ├── 16_code_gen_plugin/
│ │ ├── .gitignore
│ │ ├── Makefile
│ │ ├── buf.work.yaml
│ │ ├── cmd/
│ │ │ ├── config/
│ │ │ │ └── main.go
│ │ │ └── plugin/
│ │ │ ├── main.go
│ │ │ └── resolver.go.tmpl
│ │ ├── federation/
│ │ │ ├── federation.pb.go
│ │ │ ├── federation_grpc.pb.go
│ │ │ └── federation_grpc_federation.pb.go
│ │ ├── go.mod
│ │ ├── go.sum
│ │ ├── main_test.go
│ │ ├── proto/
│ │ │ ├── buf.yaml
│ │ │ └── federation/
│ │ │ └── federation.proto
│ │ └── resolver_test.go
│ ├── 17_error_handler/
│ │ ├── .gitignore
│ │ ├── Makefile
│ │ ├── buf.gen.yaml
│ │ ├── buf.work.yaml
│ │ ├── federation/
│ │ │ ├── federation.pb.go
│ │ │ ├── federation_grpc.pb.go
│ │ │ └── federation_grpc_federation.pb.go
│ │ ├── go.mod
│ │ ├── go.sum
│ │ ├── grpc/
│ │ │ └── federation/
│ │ │ ├── federation.pb.go
│ │ │ ├── generator.pb.go
│ │ │ └── plugin.pb.go
│ │ ├── main_test.go
│ │ ├── post/
│ │ │ ├── post.pb.go
│ │ │ └── post_grpc.pb.go
│ │ └── proto/
│ │ ├── buf.yaml
│ │ ├── federation/
│ │ │ └── federation.proto
│ │ └── post/
│ │ └── post.proto
│ ├── 18_load/
│ │ ├── .gitignore
│ │ ├── Makefile
│ │ ├── buf.gen.yaml
│ │ ├── buf.work.yaml
│ │ ├── cmd/
│ │ │ └── plugin/
│ │ │ └── main.go
│ │ ├── federation/
│ │ │ ├── federation.pb.go
│ │ │ ├── federation_grpc.pb.go
│ │ │ └── federation_grpc_federation.pb.go
│ │ ├── go.mod
│ │ ├── go.sum
│ │ ├── main_test.go
│ │ ├── plugin/
│ │ │ ├── plugin.pb.go
│ │ │ └── plugin_grpc_federation.pb.go
│ │ └── proto/
│ │ ├── buf.yaml
│ │ ├── federation/
│ │ │ └── federation.proto
│ │ └── plugin/
│ │ └── plugin.proto
│ ├── 19_retry/
│ │ ├── .gitignore
│ │ ├── .vscode/
│ │ │ └── settings.json
│ │ ├── Makefile
│ │ ├── buf.gen.yaml
│ │ ├── buf.work.yaml
│ │ ├── federation/
│ │ │ ├── federation.pb.go
│ │ │ ├── federation_grpc.pb.go
│ │ │ └── federation_grpc_federation.pb.go
│ │ ├── go.mod
│ │ ├── go.sum
│ │ ├── main_test.go
│ │ ├── post/
│ │ │ ├── post.pb.go
│ │ │ └── post_grpc.pb.go
│ │ └── proto/
│ │ ├── buf.yaml
│ │ ├── federation/
│ │ │ └── federation.proto
│ │ └── post/
│ │ └── post.proto
│ ├── 20_callopt/
│ │ ├── .gitignore
│ │ ├── Makefile
│ │ ├── buf.gen.yaml
│ │ ├── buf.work.yaml
│ │ ├── federation/
│ │ │ ├── federation.pb.go
│ │ │ ├── federation_grpc.pb.go
│ │ │ └── federation_grpc_federation.pb.go
│ │ ├── go.mod
│ │ ├── go.sum
│ │ ├── grpc-federation.yaml
│ │ ├── main_test.go
│ │ ├── post/
│ │ │ ├── post.pb.go
│ │ │ └── post_grpc.pb.go
│ │ └── proto/
│ │ ├── buf.yaml
│ │ ├── federation/
│ │ │ └── federation.proto
│ │ └── post/
│ │ └── post.proto
│ ├── 21_wasm_net/
│ │ ├── .gitignore
│ │ ├── Makefile
│ │ ├── buf.gen.yaml
│ │ ├── buf.work.yaml
│ │ ├── cmd/
│ │ │ └── plugin/
│ │ │ └── main.go
│ │ ├── federation/
│ │ │ ├── federation.pb.go
│ │ │ ├── federation_grpc.pb.go
│ │ │ └── federation_grpc_federation.pb.go
│ │ ├── go.mod
│ │ ├── go.sum
│ │ ├── main_test.go
│ │ ├── plugin/
│ │ │ ├── plugin.pb.go
│ │ │ └── plugin_grpc_federation.pb.go
│ │ └── proto/
│ │ ├── buf.yaml
│ │ ├── federation/
│ │ │ └── federation.proto
│ │ └── plugin/
│ │ └── plugin.proto
│ └── 22_switch/
│ ├── .gitignore
│ ├── Makefile
│ ├── buf.gen.yaml
│ ├── buf.work.yaml
│ ├── federation/
│ │ ├── federation.pb.go
│ │ ├── federation_grpc.pb.go
│ │ └── federation_grpc_federation.pb.go
│ ├── go.mod
│ ├── go.sum
│ ├── grpc/
│ │ └── federation/
│ │ └── federation.pb.go
│ ├── grpc-federation.yaml
│ ├── main_test.go
│ └── proto/
│ ├── buf.yaml
│ └── federation/
│ └── federation.proto
├── buf.gen.yaml
├── buf.work.yaml
├── cmd/
│ ├── grpc-federation-generator/
│ │ └── main.go
│ ├── grpc-federation-language-server/
│ │ ├── README.md
│ │ └── main.go
│ ├── grpc-federation-linter/
│ │ └── main.go
│ ├── grpc-federation-mcp-server/
│ │ ├── assets/
│ │ │ └── docs.md
│ │ └── main.go
│ ├── grpcfedctl/
│ │ ├── main.go
│ │ ├── plugin.go
│ │ └── version.go
│ └── protoc-gen-grpc-federation/
│ └── main.go
├── compiler/
│ ├── compiler.go
│ ├── compiler_test.go
│ └── testdata/
│ ├── post.proto
│ ├── service.proto
│ └── user.proto
├── demo/
│ ├── Makefile
│ ├── README.md
│ ├── buf.gen.yaml
│ ├── buf.work.yaml
│ ├── cmd/
│ │ ├── film/
│ │ │ └── main.go
│ │ ├── person/
│ │ │ └── main.go
│ │ ├── planet/
│ │ │ └── main.go
│ │ ├── species/
│ │ │ └── main.go
│ │ ├── starship/
│ │ │ └── main.go
│ │ ├── swapi/
│ │ │ └── main.go
│ │ └── vehicle/
│ │ └── main.go
│ ├── compose.yaml
│ ├── go.mod
│ ├── go.sum
│ ├── proto/
│ │ ├── buf.yaml
│ │ ├── film/
│ │ │ └── film.proto
│ │ ├── person/
│ │ │ └── person.proto
│ │ ├── planet/
│ │ │ └── planet.proto
│ │ ├── species/
│ │ │ └── species.proto
│ │ ├── starship/
│ │ │ └── starship.proto
│ │ ├── swapi.proto
│ │ └── vehicle/
│ │ └── vehicle.proto
│ ├── services/
│ │ ├── film/
│ │ │ ├── film.go
│ │ │ └── film_test.go
│ │ ├── person/
│ │ │ ├── person.go
│ │ │ └── person_test.go
│ │ ├── planet/
│ │ │ ├── planet.go
│ │ │ └── planet_test.go
│ │ ├── species/
│ │ │ ├── species.go
│ │ │ └── species_test.go
│ │ ├── starship/
│ │ │ ├── starship.go
│ │ │ └── starship_test.go
│ │ └── vehicle/
│ │ ├── vehicle.go
│ │ └── vehicle_test.go
│ ├── swapi/
│ │ ├── film/
│ │ │ ├── film.pb.go
│ │ │ └── film_grpc.pb.go
│ │ ├── person/
│ │ │ ├── person.pb.go
│ │ │ └── person_grpc.pb.go
│ │ ├── planet/
│ │ │ ├── planet.pb.go
│ │ │ └── planet_grpc.pb.go
│ │ ├── species/
│ │ │ ├── species.pb.go
│ │ │ └── species_grpc.pb.go
│ │ ├── starship/
│ │ │ ├── starship.pb.go
│ │ │ └── starship_grpc.pb.go
│ │ ├── swapi/
│ │ │ ├── swapi.pb.go
│ │ │ ├── swapi_grpc.pb.go
│ │ │ └── swapi_grpc_federation.pb.go
│ │ └── vehicle/
│ │ ├── vehicle.pb.go
│ │ └── vehicle_grpc.pb.go
│ └── util/
│ └── util.go
├── docs/
│ ├── cel/
│ │ ├── any.md
│ │ ├── enum.md
│ │ ├── list.md
│ │ ├── log.md
│ │ ├── math.md
│ │ ├── metadata.md
│ │ ├── rand.md
│ │ ├── regexp.md
│ │ ├── strings.md
│ │ ├── time.md
│ │ ├── url.md
│ │ └── uuid.md
│ ├── cel.md
│ ├── cel_plugin.md
│ ├── code_generation_plugin.md
│ ├── getting_started.md
│ ├── installation.md
│ └── references.md
├── generator/
│ ├── code_generator.go
│ ├── code_generator_test.go
│ ├── config.go
│ ├── funcs.go
│ ├── funcs_test.go
│ ├── generator.go
│ ├── generator_test.go
│ ├── plugin_option_test.go
│ ├── protoc_gen_go_grpc.go
│ ├── templates/
│ │ ├── cast.go.tmpl
│ │ ├── error_handler.go.tmpl
│ │ ├── eval.go.tmpl
│ │ ├── plugin.go.tmpl
│ │ ├── retry.go.tmpl
│ │ ├── server.go.tmpl
│ │ ├── switch.go.tmpl
│ │ └── validation.go.tmpl
│ ├── testdata/
│ │ ├── expected_alias.go
│ │ ├── expected_alias_multifile.go
│ │ ├── expected_async.go
│ │ ├── expected_autobind.go
│ │ ├── expected_condition.go
│ │ ├── expected_create_post.go
│ │ ├── expected_custom_resolver.go
│ │ ├── expected_env.go
│ │ ├── expected_error_handler.go
│ │ ├── expected_inline_env.go
│ │ ├── expected_map.go
│ │ ├── expected_minimum.go
│ │ ├── expected_multi_user.go
│ │ ├── expected_oneof.go
│ │ ├── expected_ref_env.go
│ │ ├── expected_resolver_overlaps.go
│ │ ├── expected_simple_aggregation.go
│ │ ├── expected_switch.go
│ │ └── expected_validation.go
│ ├── wasm.go
│ └── watcher.go
├── go.mod
├── go.sum
├── grpc/
│ └── federation/
│ ├── alias.go
│ ├── cast.go
│ ├── cel/
│ │ ├── any.go
│ │ ├── any_test.go
│ │ ├── bind.go
│ │ ├── bind_test.go
│ │ ├── cast.go
│ │ ├── cast_test.go
│ │ ├── context.go
│ │ ├── conv.go
│ │ ├── enum.go
│ │ ├── lib.go
│ │ ├── list.go
│ │ ├── list_test.go
│ │ ├── log.go
│ │ ├── log_test.go
│ │ ├── math.go
│ │ ├── math_test.go
│ │ ├── metadata.go
│ │ ├── metadata_test.go
│ │ ├── plugin/
│ │ │ └── plugin.pb.go
│ │ ├── plugin.go
│ │ ├── plugin_test.go
│ │ ├── private.pb.go
│ │ ├── rand.go
│ │ ├── rand_test.go
│ │ ├── regexp.go
│ │ ├── regexp_test.go
│ │ ├── strings.go
│ │ ├── strings_test.go
│ │ ├── testdata/
│ │ │ ├── Makefile
│ │ │ ├── plugin/
│ │ │ │ └── main.go
│ │ │ ├── test.proto
│ │ │ └── testpb/
│ │ │ └── test.pb.go
│ │ ├── time.go
│ │ ├── time.pb.go
│ │ ├── time_test.go
│ │ ├── url.go
│ │ ├── url.pb.go
│ │ ├── url_test.go
│ │ ├── uuid.go
│ │ └── uuid_test.go
│ ├── cel.go
│ ├── cel_plugin.go
│ ├── const.go
│ ├── context.go
│ ├── custom_resolver.go
│ ├── error.go
│ ├── federation.pb.go
│ ├── generator/
│ │ ├── decode.go
│ │ ├── encode.go
│ │ ├── generator_test.go
│ │ ├── plugin/
│ │ │ └── generator.pb.go
│ │ └── types.go
│ ├── lib.go
│ ├── log/
│ │ └── context.go
│ ├── net/
│ │ ├── net.go
│ │ └── other.go
│ ├── otel.go
│ ├── plugin.go
│ ├── plugin_wasip1.go
│ ├── trace/
│ │ ├── alias.go
│ │ └── context.go
│ ├── validation.go
│ ├── version.go
│ └── version_test.go
├── internal/
│ └── testutil/
│ ├── builder.go
│ ├── cmpopt.go
│ └── compiler.go
├── lsp/
│ ├── client/
│ │ ├── jetbrains/
│ │ │ ├── .gitignore
│ │ │ ├── .run/
│ │ │ │ ├── Run IDE for UI Tests.run.xml
│ │ │ │ ├── Run Plugin.run.xml
│ │ │ │ ├── Run Qodana.run.xml
│ │ │ │ ├── Run Tests.run.xml
│ │ │ │ └── Run Verifications.run.xml
│ │ │ ├── CHANGELOG.md
│ │ │ ├── README.md
│ │ │ ├── build.gradle.kts
│ │ │ ├── gradle/
│ │ │ │ ├── libs.versions.toml
│ │ │ │ └── wrapper/
│ │ │ │ ├── gradle-wrapper.jar
│ │ │ │ └── gradle-wrapper.properties
│ │ │ ├── gradle.properties
│ │ │ ├── gradlew
│ │ │ ├── gradlew.bat
│ │ │ ├── qodana.yml
│ │ │ ├── settings.gradle.kts
│ │ │ └── src/
│ │ │ └── main/
│ │ │ ├── kotlin/
│ │ │ │ └── com/
│ │ │ │ └── github/
│ │ │ │ └── mercari/
│ │ │ │ └── grpcfederation/
│ │ │ │ ├── GrpcFederationBundle.kt
│ │ │ │ ├── lsp/
│ │ │ │ │ └── GrpcFederationLspServerSupportProvider.kt
│ │ │ │ └── settings/
│ │ │ │ ├── ImportPathTableModel.kt
│ │ │ │ ├── PathUtils.kt
│ │ │ │ ├── ProjectSettingsConfigurable.kt
│ │ │ │ ├── ProjectSettingsService.kt
│ │ │ │ └── impl/
│ │ │ │ └── ProjectSettingsServiceImpl.kt
│ │ │ └── resources/
│ │ │ ├── META-INF/
│ │ │ │ └── plugin.xml
│ │ │ └── messages/
│ │ │ └── GrpcFederationBundle.properties
│ │ └── vscode/
│ │ ├── .eslintignore
│ │ ├── .eslintrc.js
│ │ ├── .gitignore
│ │ ├── .vscode/
│ │ │ ├── extensions.json
│ │ │ ├── launch.json
│ │ │ ├── settings.json
│ │ │ └── tasks.json
│ │ ├── .vscodeignore
│ │ ├── LICENSE
│ │ ├── README.md
│ │ ├── package.json
│ │ ├── src/
│ │ │ ├── constants.ts
│ │ │ └── extension.ts
│ │ └── tsconfig.json
│ └── server/
│ ├── completion.go
│ ├── completion_test.go
│ ├── definition.go
│ ├── general.go
│ ├── handler.go
│ ├── handler_test.go
│ ├── semantic_tokens.go
│ ├── semantic_tokens_test.go
│ ├── server.go
│ ├── testdata/
│ │ ├── completion.proto
│ │ ├── post.proto
│ │ ├── service.proto
│ │ └── user.proto
│ ├── text_document_sync.go
│ ├── util.go
│ └── validator.go
├── proto/
│ ├── buf.yaml
│ └── grpc/
│ └── federation/
│ ├── embed.go
│ ├── federation.proto
│ ├── generator.proto
│ ├── plugin.proto
│ ├── private.proto
│ ├── time.proto
│ └── url.proto
├── proto_deps/
│ └── google/
│ ├── api/
│ │ └── expr/
│ │ └── v1alpha1/
│ │ ├── checked.proto
│ │ └── syntax.proto
│ └── rpc/
│ ├── code.proto
│ ├── embed.go
│ └── error_details.proto
├── resolver/
│ ├── candidates.go
│ ├── candidates_test.go
│ ├── cel.go
│ ├── cel_test.go
│ ├── context.go
│ ├── def.go
│ ├── enum.go
│ ├── error.go
│ ├── extension.go
│ ├── field.go
│ ├── file.go
│ ├── file_test.go
│ ├── format.go
│ ├── format_test.go
│ ├── fqdn.go
│ ├── graph.go
│ ├── message.go
│ ├── method.go
│ ├── oneof.go
│ ├── resolver.go
│ ├── resolver_test.go
│ ├── service.go
│ ├── std_fd.go
│ ├── type_conversion.go
│ ├── types.go
│ ├── value.go
│ └── wellknown_types.go
├── source/
│ ├── clone.go
│ ├── file.go
│ ├── file_test.go
│ ├── location.go
│ ├── location_builder.go
│ ├── location_test.go
│ ├── testdata/
│ │ ├── coverage.proto
│ │ ├── post.proto
│ │ ├── service.proto
│ │ ├── switch.proto
│ │ └── user.proto
│ ├── type_helper.go
│ └── type_helper_test.go
├── testdata/
│ ├── alias.proto
│ ├── alias_multifile.proto
│ ├── async.proto
│ ├── autobind.proto
│ ├── condition.proto
│ ├── content.proto
│ ├── create_post.proto
│ ├── custom_resolver.proto
│ ├── dependency_base_message.proto
│ ├── dependency_child_message.proto
│ ├── dependency_message_argument.proto
│ ├── dependency_method_response.proto
│ ├── dependency_oneof.proto
│ ├── dependency_service_variable.proto
│ ├── error_handler.proto
│ ├── inline_env.proto
│ ├── map.proto
│ ├── minimum.proto
│ ├── multi_user.proto
│ ├── nested_post.proto
│ ├── oneof.proto
│ ├── post.proto
│ ├── post_v2.proto
│ ├── post_v2_extra.proto
│ ├── ref_env.proto
│ ├── resolver_overlaps.proto
│ ├── simple_aggregation.proto
│ ├── switch.proto
│ ├── user.proto
│ └── validation.proto
├── types/
│ └── types.go
├── util/
│ └── name.go
└── validator/
├── testdata/
│ ├── conflict_service_variable.proto
│ ├── conflict_switch_case_variable.proto
│ ├── conflict_switch_default_variable.proto
│ ├── different_message_argument_type.proto
│ ├── duplicated_variable_name.proto
│ ├── echo.proto
│ ├── empty_response_field.proto
│ ├── invalid_autobind.proto
│ ├── invalid_call_error_handler.proto
│ ├── invalid_call_metadata.proto
│ ├── invalid_call_option.proto
│ ├── invalid_condition_type.proto
│ ├── invalid_enum_alias_target.proto
│ ├── invalid_enum_attribute.proto
│ ├── invalid_enum_conversion.proto
│ ├── invalid_enum_selector.proto
│ ├── invalid_enum_value_noalias.proto
│ ├── invalid_env.proto
│ ├── invalid_error_variable.proto
│ ├── invalid_field_option.proto
│ ├── invalid_field_type.proto
│ ├── invalid_field_type_by_switch.proto
│ ├── invalid_file_import.proto
│ ├── invalid_go_package.proto
│ ├── invalid_list_sort.proto
│ ├── invalid_map_iterator_src.proto
│ ├── invalid_map_iterator_src_type.proto
│ ├── invalid_message_alias.proto
│ ├── invalid_message_alias_target.proto
│ ├── invalid_message_argument.proto
│ ├── invalid_message_field_alias.proto
│ ├── invalid_message_map.proto
│ ├── invalid_message_map_alias.proto
│ ├── invalid_message_name.proto
│ ├── invalid_method.proto
│ ├── invalid_method_name.proto
│ ├── invalid_method_request.proto
│ ├── invalid_method_response.proto
│ ├── invalid_method_response_option.proto
│ ├── invalid_method_service_name.proto
│ ├── invalid_method_timeout_format.proto
│ ├── invalid_multi_alias.proto
│ ├── invalid_multiple_env.proto
│ ├── invalid_nested_message_field.proto
│ ├── invalid_nested_message_name.proto
│ ├── invalid_oneof.proto
│ ├── invalid_oneof_selection.proto
│ ├── invalid_retry.proto
│ ├── invalid_service_variable_switch.proto
│ ├── invalid_switch_case_by_type.proto
│ ├── invalid_switch_case_if_type.proto
│ ├── invalid_switch_default_by_type.proto
│ ├── invalid_validation_bad_request.proto
│ ├── invalid_validation_code.proto
│ ├── invalid_validation_details_return_type.proto
│ ├── invalid_validation_localized_message.proto
│ ├── invalid_validation_message_argument.proto
│ ├── invalid_validation_precondition_failure.proto
│ ├── invalid_validation_return_type.proto
│ ├── invalid_validation_with_ignore.proto
│ ├── invalid_variable_name.proto
│ ├── invalid_wrapper_type_conversion.proto
│ ├── message_cyclic_dependency.proto
│ ├── missing_enum_alias.proto
│ ├── missing_enum_value.proto
│ ├── missing_enum_value_alias.proto
│ ├── missing_field_option.proto
│ ├── missing_file_import.proto
│ ├── missing_map_iterator.proto
│ ├── missing_message_alias.proto
│ ├── missing_message_field_alias.proto
│ ├── missing_message_option.proto
│ ├── missing_method_request_value.proto
│ ├── missing_response_message_option.proto
│ ├── missing_service_variable.proto
│ ├── missing_switch_case.proto
│ ├── missing_switch_default.proto
│ ├── nested_list.proto
│ ├── nested_message_cyclic_dependency.proto
│ ├── nested_post.proto
│ ├── nested_post2.proto
│ ├── post.proto
│ ├── recursive_message_name.proto
│ ├── repeated_switch_default.proto
│ ├── user.proto
│ └── valid_enum_value_reference.proto
├── validator.go
└── validator_test.go
================================================
FILE CONTENTS
================================================
================================================
FILE: .github/ISSUE_TEMPLATE/bug_report.md
================================================
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: ''
assignees: ''
---
**Describe the bug**
A clear and concise description of what the bug is.
** Related Components **
- [ ] protoc-gen-grpc-federation
- [ ] grpc-federation-linter
- [ ] grpc-federation-language-server
- [ ] grpc-federation-generator
- [ ] others
**To Reproduce**
Steps to reproduce the behavior.
**Expected behavior**
A clear and concise description of what you expected to happen.
**Screenshots**
If applicable, add screenshots to help explain your problem.
**Additional context**
Add any other context about the problem here.
================================================
FILE: .github/ISSUE_TEMPLATE/feature_request.md
================================================
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: ''
assignees: ''
---
**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
**Describe the solution you'd like**
A clear and concise description of what you want to happen.
**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.
**Additional context**
Add any other context or screenshots about the feature request here.
================================================
FILE: .github/pull_request_template.md
================================================
================================================
FILE: .github/workflows/buf.yml
================================================
name: buf
on:
push:
branches:
- main
jobs:
buf:
name: push Buf modules to BSR
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: bufbuild/buf-action@v1
with:
format: false
lint: false
breaking: false
pr_comment: false
token: ${{ secrets.BUF_TOKEN }}
input: proto
================================================
FILE: .github/workflows/lint.yml
================================================
name: lint
on:
push:
branches:
- main
pull_request:
jobs:
lint:
name: lint
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v4
- uses: actions/setup-go@v4
with:
go-version-file: ./go.mod
- name: install tools
run: make tools
- name: build tools
run: make build
- name: run lint
run: make lint
================================================
FILE: .github/workflows/release-jetbrains.yml
================================================
name: release-jetbrains
on:
push:
tags:
- "jetbrains/v*"
permissions:
contents: write
jobs:
release-jetbrains:
name: release JetBrains plugin
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
# Set up Java environment for the next steps
- uses: actions/setup-java@v4
with:
distribution: zulu
java-version: 21
# Setup Gradle
- uses: gradle/actions/setup-gradle@v3
with:
gradle-home-cache-cleanup: true
# Publish the plugin to JetBrains Marketplace
- name: Publish Plugin
env:
PUBLISH_TOKEN: ${{ secrets.JET_BRAINS_PUBLISH_TOKEN }}
run: ./gradlew publishPlugin
working-directory: ./lsp/client/jetbrains
# Upload artifact as a release asset
- name: Upload Release Asset
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: gh release upload $GITHUB_REF_NAME ./build/distributions/*
working-directory: ./lsp/client/jetbrains
================================================
FILE: .github/workflows/release-vscode.yml
================================================
name: release-vscode
on:
push:
tags:
- "v*.*.*"
permissions:
contents: write
jobs:
release-vscode:
name: release vscode extension
runs-on: ubuntu-latest
steps:
- name: install npx
run: |
sudo apt-get update
sudo apt-get install --no-install-recommends -y npm nodejs
sudo npm -g install n
sudo n stable
- name: checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-go@v4
with:
go-version-file: ./go.mod
- name: extract version from tags
id: meta
run: |
echo ::set-output name=VERSION::${GITHUB_REF#refs/tags/v}
- name: run GoReleaser
uses: goreleaser/goreleaser-action@v5
with:
distribution: goreleaser
version: latest
args: release --skip-publish --clean
- name: build extension
run: |
make build/vscode-extension
env:
VERSION: ${{ steps.meta.outputs.VERSION }}
- name: release
uses: softprops/action-gh-release@v1
with:
draft: true
generate_release_notes: true
fail_on_unmatched_files: true
files: |
./lsp/client/vscode/grpc-federation-*.vsix
./dist/grpc-federation_*_checksums.txt
./dist/grpc-federation_*_*_*.tar.gz
./dist/grpc-federation_*_*_*.zip
- name: publish to Visual Studio Marketplace
uses: HaaLeo/publish-vscode-extension@v1
with:
pat: ${{ secrets.AZURE_DEVOPS_ACCESS_TOKEN }}
registryUrl: https://marketplace.visualstudio.com
extensionFile: "./lsp/client/vscode/grpc-federation-${{ steps.meta.outputs.VERSION }}.vsix"
================================================
FILE: .github/workflows/test.yml
================================================
name: test
on:
push:
branches:
- main
pull_request:
jobs:
build_and_generate:
name: build and generate
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v4
- uses: actions/setup-go@v4
with:
go-version-file: ./go.mod
- name: install tools
run: make tools
- name: generate files
run: make generate
- name: check diff
run: git diff --exit-code
test:
name: test
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v4
- name: setup go
uses: actions/setup-go@v4
with:
go-version-file: ./go.mod
- name: install tools
run: make tools
- name: run test
run: make test
- name: report coverage
uses: k1LoW/octocov-action@v1.4.0
================================================
FILE: .gitignore
================================================
# Binaries for programs and plugins
*.exe
*.exe~
*.dll
*.so
*.dylib
# Test binary, built with `go test -c`
*.test
# Output of the go coverage tool, specifically when used with LiteIDE
*.out
*.out.tmp
# Dependency directories (remove the comment below to include it)
# vendor/
.DS_Store
bin
dist/
================================================
FILE: .golangci.yml
================================================
# golangci-lint configuration file
# see: https://github.com/golangci/golangci/wiki/Configuration
run:
timeout: 5m
skip-dirs:
- bin
linters-settings:
govet:
check-shadowing: true
golint:
min-confidence: 0
goimports:
local-prefixes: github.com/mercari/grpc-federation
gocyclo:
min-complexity: 10
maligned:
suggest-new: true
depguard:
list-type: blacklist
include-go-root: false
misspell:
locale: US
lll:
line-length: 120
nakedret:
max-func-lines: 0
gocritic:
disabled-checks:
- whyNoLint
- wrapperFunc
- ifElseChain
- unnamedResult
- paramTypeCombine
- hugeParam
- singleCaseSwitch
- octalLiteral
enabled-tags:
- performance
- style
- experimental
gci:
sections:
- "standard"
- "default"
- "prefix(github.com/mercari/grpc-federation)"
- "blank"
- "dot"
linters:
enable:
- bodyclose
- rowserrcheck
- stylecheck
- gosec
- unconvert
- asciicheck
- gofmt
- goimports
- misspell
- unparam
- dogsled
- nakedret
- gocritic
- godox
- whitespace
- goprintffuncname
- gomodguard
- godot
- nolintlint
- asasalint
- bidichk
- durationcheck
- importas
- tagliatelle
- tenv
- gci
disable:
- maligned
- prealloc
- gochecknoglobals
- wsl
- testpackage
- gocognit
- depguard
# Configuration of issue rules
issues:
# Excluding configuration per-path, per-linter, per-text and per-source
exclude-rules:
# Exclude lll issues for long lines with go:generate
- linters:
- lll
source: "^//go:generate "
# Exclude shadow checking on the variable named err and ctx
- text: "shadow: declaration of \"(err|ctx)\""
linters:
- govet
# Exclude godox check for TODOs, FIXMEs, and BUGs
- text: "Line contains TODO/BUG/FIXME:"
linters:
- godox
# Exclude some linters from running on tests files
- path: suite_test\.go
linters:
- typecheck
================================================
FILE: .goreleaser.yaml
================================================
# This is an example .goreleaser.yml file with some sensible defaults.
# Make sure to check the documentation at https://goreleaser.com
# The lines bellow are called `modelines`. See `:help modeline`
# Feel free to remove those if you don't want/need to use them.
# yaml-language-server: $schema=https://goreleaser.com/static/schema.json
# vim: set ts=2 sw=2 tw=0 fo=cnqoj
before:
hooks:
# You may remove this if you don't use go modules.
- go mod tidy
# you may remove this if you don't need go generate
- go generate ./...
builds:
- id: grpc-federation-generator
main: ./cmd/grpc-federation-generator
binary: grpc-federation-generator
env:
- CGO_ENABLED=0
goos:
- linux
- windows
- darwin
- id: grpc-federation-language-server
main: ./cmd/grpc-federation-language-server
binary: grpc-federation-language-server
env:
- CGO_ENABLED=0
goos:
- linux
- windows
- darwin
- id: grpc-federation-linter
main: ./cmd/grpc-federation-linter
binary: grpc-federation-linter
env:
- CGO_ENABLED=0
goos:
- linux
- windows
- darwin
- id: protoc-gen-grpc-federation
main: ./cmd/protoc-gen-grpc-federation
binary: protoc-gen-grpc-federation
env:
- CGO_ENABLED=0
goos:
- linux
- windows
- darwin
archives:
- format: tar.gz
format_overrides:
- goos: windows
format: zip
changelog:
sort: asc
filters:
exclude:
- "^docs:"
- "^test:"
================================================
FILE: .octocov.yml
================================================
coverage:
paths:
- cover.out
acceptable: current >= 55%
codeToTestRatio:
code:
- '**/*.go'
- '!**/*_test.go'
- '!**/*.pb.go'
test:
- '**/*_test.go'
testExecutionTime:
acceptable: current <= 10min && diff < 3min
diff:
datastores:
- artifact://${GITHUB_REPOSITORY}
comment:
if: is_pull_request
hideFooterLink: true
report:
if: is_default_branch
datastores:
- artifact://${GITHUB_REPOSITORY}
================================================
FILE: .vscode/settings.json
================================================
{
"protoc": {
"options": [
"--proto_path=proto",
"--proto_path=proto_deps",
]
},
"grpc-federation": {
"path": "bin/grpc-federation-language-server",
"import-paths": [
"proto",
]
}
}
================================================
FILE: LICENSE
================================================
MIT License
Copyright (c) 2023 Mercari, Inc.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
================================================
FILE: Makefile
================================================
export
GOBIN := $(PWD)/bin
PATH := $(GOBIN):$(PATH)
SHELL := env PATH='$(PATH)' bash
PKG := github.com/mercari/grpc-federation
# retrieve all packages related to the test
PKGS := $(shell go list ./... | grep -v cmd)
# remove $PKG prefix from package name and add a dot character to convert it to a relative path.
COVER_PKGS := $(foreach pkg,$(PKGS),$(subst $(PKG),.,$(pkg)))
COMMA := ,
EMPTY :=
SPACE := $(EMPTY) $(EMPTY)
# join package names for coverage with comma character.
COVERPKG_OPT := $(subst $(SPACE),$(COMMA),$(COVER_PKGS))
EXAMPLES := $(wildcard _examples/*)
GIT_REF := $(shell git rev-parse --short=7 HEAD)
VERSION ?= (devel)
LDFLAGS := -w -s -X=github.com/mercari/grpc-federation/grpc/federation.Version=$(VERSION)
.PHONY: tools
tools:
go install github.com/bufbuild/buf/cmd/buf@v1.32.2
go install github.com/envoyproxy/protoc-gen-validate/cmd/protoc-gen-validate-go@v1.0.4
go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.64.8
go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@v1.3.0
go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.33.0
.PHONY: lint
lint: lint/examples lint/golangci-lint lint/gomod lint/buf
.PHONY: fmt
fmt: fmt/golangci-lint tidy fmt/buf
.PHONY: tidy
tidy: tidy/examples
go mod tidy
tidy/examples: $(foreach var,$(EXAMPLES),tidy/examples/$(var))
tidy/examples/%:
cd $* && go mod tidy
lint/examples: $(foreach var,$(EXAMPLES),lint/examples/$(var))
lint/examples/%:
$(MAKE) -C $* lint
lint/golangci-lint:
$(GOBIN)/golangci-lint run $(args) ./...
lint/gomod: tidy
if git diff --quiet go.mod go.sum; then \
exit 0; \
else \
echo "go mod tidy resulted in a change of files."; \
echo "Run make tidy locally before pushing"; \
exit 1; \
fi
lint/buf: fmt/buf
if git diff --quiet proto; then \
exit 0; \
else \
echo "buf format resulted in a change of files."; \
echo "Run make fmt/buf locally before pushing"; \
exit 1; \
fi
fmt/golangci-lint:
$(GOBIN)/golangci-lint run --fix $(args) ./...
fmt/buf:
buf format --write
.PHONY: generate
generate: build generate/buf generate/examples
generate/buf:
buf generate
generate/examples: $(foreach var,$(EXAMPLES),generate/examples/$(var))
generate/examples/%:
$(MAKE) -C $* generate
.PHONY: build
build: build/grpcfedctl build/protoc-gen-grpc-federation build/grpc-federation-linter build/grpc-federation-language-server build/grpc-federation-generator
build/grpcfedctl:
go build -ldflags "$(LDFLAGS)" -o $(GOBIN)/grpcfedctl ./cmd/grpcfedctl
build/protoc-gen-grpc-federation:
go build -ldflags "$(LDFLAGS)" -o $(GOBIN)/protoc-gen-grpc-federation ./cmd/protoc-gen-grpc-federation
build/grpc-federation-linter:
go build -ldflags "$(LDFLAGS)" -o $(GOBIN)/grpc-federation-linter ./cmd/grpc-federation-linter
build/grpc-federation-language-server:
go build -ldflags "$(LDFLAGS)" -o $(GOBIN)/grpc-federation-language-server ./cmd/grpc-federation-language-server
build/grpc-federation-generator:
go build -ldflags "$(LDFLAGS)" -o $(GOBIN)/grpc-federation-generator ./cmd/grpc-federation-generator
.PHONY: build/vscode-extension
build/vscode-extension: versioning/vscode-extension install/vscode-dependencies
cd lsp/client/vscode && npx vsce package -o grpc-federation-$(VERSION).vsix
.PHONY: install/vscode-dependencies
install/vscode-dependencies:
cd lsp/client/vscode && npm install
.PHONY: versioning/vscode-extension
versioning/vscode-extension:
cd lsp/client/vscode && npm version $(VERSION)
.PHONY: test
test: test/examples
go test -race -coverpkg=$(COVERPKG_OPT) -covermode=atomic -coverprofile=cover.out.tmp `go list ./...`
cat cover.out.tmp |grep -v "pb.go" > cover.out && rm cover.out.tmp
test/examples: $(foreach var,$(EXAMPLES),test/examples/$(var))
test/examples/%:
$(MAKE) -C $* test
.PHONY: cover-html
cover-html: test
go tool cover -html=cover.out
================================================
FILE: README.md
================================================
# gRPC Federation
[](https://github.com/mercari/grpc-federation/actions/workflows/test.yml)
[](https://pkg.go.dev/github.com/mercari/grpc-federation?tab=doc)
[](https://buf.build/mercari/grpc-federation)
gRPC Federation auto-generates a BFF (Backend for Frontend) server, aggregating and returning results from microservices using the gRPC protocol, configured through Protocol Buffer options.
[Public Roadmap is here](https://github.com/orgs/mercari/projects/1).
# Motivation
Imagine a system with a backend of multiple microservices. Instead of the client directly communicating with each microservice, it's more efficient to use a dedicated service (BFF - Backend for Frontend) to aggregate information and send it back to the client. However, as the system grows, determining which team should handle the BFF service becomes unclear. This is where Federated Architecture, like [GraphQL (Apollo) Federation](https://www.apollographql.com/docs/federation/), comes in.
With GraphQL Federation, each microservice has its own GraphQL server, and the BFF focuses on aggregating resources. However, integrating a new GraphQL server into a large system is challenging, especially in systems developed with the gRPC protocol.
To streamline, we're exploring the idea of automatically generating a BFF using the gRPC protocol with simple custom options. By leveraging existing Protocol Buffers schema for the BFF, we aim to keep using gRPC while drastically reducing maintenance costs.
# Why Choose gRPC Federation?
## 1. Reduce the Boilerplate Implementation Required to Create a BFF
### 1.1. Automate Type Conversions for the Same Message Across Different Packages
Consider defining a BFF using a proto, assuming the BFF acts as a proxy calling multiple microservices and aggregating results. In this scenario, it's necessary to redefine the same messages to handle microservices responses on the BFF. Without defining these messages on the BFF, the BFF client must be aware of different packages, which is not ideal.
Redefining messages on the BFF results in a considerable number of type conversions for the same messages across different packages.
Using gRPC Federation removes the need for tedious type conversions. Just define custom options in the proto, and gRPC Federation will automatically handle these conversions.
### 1.2. Optimize gRPC Method Calls
When making multiple gRPC method calls, it is crucial to enhance performance by analyzing dependencies between method calls and processing requests in parallel whenever possible. However, identifying dependencies becomes more challenging as the number of method calls increases.
gRPC Federation simplifies this process by automatically analyzing dependencies and generating code to optimize request flows. It removes the need for manual consideration.
### 1.3. Simplify Retries and Timeouts on gRPC Method Calls
Setting timeouts or retry counts for gRPC method calls in dependent services can be complicated. However, gRPC Federation allows for a declarative approach to implementing retries and timeouts.
These are just a few examples of how gRPC Federation simplifies work. By creating a BFF with minimal proto definitions, you can significantly reduce the development cost of BFFs.
## 2. Explicitly Declare Dependencies on Services
Using gRPC Federation enables a clear understanding of the services the BFF depends on by reading the proto file. It uncovers a relationship between each microservice and BFF.
Furthermore, gRPC Federation offers functionality to extract dependencies as a Go library, enabling the extraction of service dependencies through static analysis of the proto file. This capability proves valuable for various types of analysis and automation.
# Features
## 1. Code Generation Assistance Tools
gRPC Federation automatically generates a gRPC server by adding custom options to Protocol Buffers. It supports the `protoc-gen-grpc-federation` CLI, accessible through `protoc`. Various other tools are available to assist in code generation:
- `protoc-gen-grpc-federation`: protoc's plugin for gRPC Federation
- `grpc-federation-linter`: Linter for gRPC Federation
- `grpc-federation-language-server`: Language server for gRPC Federation
- `grpc-federation-generator`: Standalone code generation tool, which monitors proto changes and interactively generates codes
## 2. CEL Support for Complex Operations
gRPC Federation integrates [CEL](https://github.com/google/cel-spec) to enable support for more advanced operations on BFFs.
[gRPC Federation CEL API References](./docs/cel.md)
## 3. Extensible System with WebAssembly
gRPC Federation features three extension points:
1. Code generation pipeline
2. Complex processes not expressible by Protocol Buffers
3. CEL API
We plan to make all three extension points available through WebAssembly in the future. Currently, the code generation pipeline and the CEL API are extensible.
### 3.1 Code Generation Pipeline
This feature allows you to run a custom auto-generated process using the results from gRPC Federation.
[How to Run Your Own Code Generation Process](./docs/code_generation_plugin.md)
### 3.2 Complex Processes Not Expressible by Protocol Buffers
gRPC Federation uses a hybrid system, with logic in Go managing operations that can't be expressed in Protocol Buffers. We plan to add support for WebAssembly in the future.
[How to Extend the API with the Go](./docs/references.md#grpcfederationmessagecustom_resolver)
### 3.3 CEL API
While gRPC Federation inherently supports various CEL APIs, users can use this functionality to use internal domain logic as a CEL API.
[How to Extend the CEL API](./docs/cel_plugin.md)
# Installation
Currently, there are three ways to use gRPC Federation:
1. Use `buf generate`
2. Use `protoc-gen-grpc-federation`
3. Use `grpc-federation-generator`
For detailed information on each method, please refer to [Installation Documentation](./docs/installation.md).
# Usage
- [`Getting Started`](./docs/getting_started.md)
- [`DEMO Application`](./demo/README.md)
- [`Examples`](./_examples/)
# Documents
- [Feature References](./docs/references.md)
- [CEL API References](./docs/cel.md)
# Contribution
Please read the CLA carefully before submitting your contribution to Mercari. Under any circumstances, by submitting your contribution, you are deemed to accept and agree to be bound by the terms and conditions of the CLA.
https://www.mercari.com/cla/
# License
Copyright 2023 Mercari, Inc.
Licensed under the MIT License.
================================================
FILE: _examples/01_minimum/.gitignore
================================================
grpc/federation
================================================
FILE: _examples/01_minimum/.vscode/settings.json
================================================
{
"protoc": {
"options": [
"--proto_path=proto",
"--proto_path=proto_deps"
]
},
"grpc-federation": {
"path": "../../bin/grpc-federation-language-server",
"import-paths": [
"proto",
"proto_deps"
]
}
}
================================================
FILE: _examples/01_minimum/Makefile
================================================
MAKEFILE_DIR := $(dir $(lastword $(MAKEFILE_LIST)))
GOBIN := $(MAKEFILE_DIR)/../../bin
PATH := $(GOBIN):$(PATH)
JAEGER_IMAGE := jaegertracing/all-in-one:latest
.PHONY: generate
generate:
$(GOBIN)/buf generate
.PHONY: lint
lint:
@$(GOBIN)/grpc-federation-linter -Iproto -Iproto_deps ./proto/federation/federation.proto
.PHONY: test
test:
go test -race ./ -count=1
.PHONY: grpc-federation/generate
grpc-federation/generate:
@$(GOBIN)/grpc-federation-generator ./proto/federation/federation.proto
.PHONY: grpc-federation/watch
grpc-federation/watch:
@$(GOBIN)/grpc-federation-generator -w
.PHONY: jaeger/start
jaeger/start:
@docker run \
-e COLLECTOR_OTLP_ENABLED=true \
-p 16686:16686 \
-p 4317:4317 \
-p 4318:4318 \
-d \
$(JAEGER_IMAGE)
.PHONY: jaeger/stop
jaeger/stop:
@docker stop $(shell docker ps -q --filter ancestor=$(JAEGER_IMAGE))
================================================
FILE: _examples/01_minimum/buf.gen.yaml
================================================
version: v1
managed:
enabled: true
plugins:
- plugin: go
out: .
opt: paths=source_relative
- plugin: go-grpc
out: .
opt: paths=source_relative
- plugin: grpc-federation
out: .
opt:
- paths=source_relative
================================================
FILE: _examples/01_minimum/buf.work.yaml
================================================
version: v1
directories:
- proto
- proto_deps
================================================
FILE: _examples/01_minimum/federation/federation.pb.go
================================================
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.33.0
// protoc (unknown)
// source: federation/federation.proto
package federation
import (
_ "github.com/mercari/grpc-federation/grpc/federation"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
type GetPostRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
}
func (x *GetPostRequest) Reset() {
*x = GetPostRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_federation_federation_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GetPostRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetPostRequest) ProtoMessage() {}
func (x *GetPostRequest) ProtoReflect() protoreflect.Message {
mi := &file_federation_federation_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GetPostRequest.ProtoReflect.Descriptor instead.
func (*GetPostRequest) Descriptor() ([]byte, []int) {
return file_federation_federation_proto_rawDescGZIP(), []int{0}
}
func (x *GetPostRequest) GetId() string {
if x != nil {
return x.Id
}
return ""
}
type GetPostResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Post *Post `protobuf:"bytes,1,opt,name=post,proto3" json:"post,omitempty"`
}
func (x *GetPostResponse) Reset() {
*x = GetPostResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_federation_federation_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GetPostResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetPostResponse) ProtoMessage() {}
func (x *GetPostResponse) ProtoReflect() protoreflect.Message {
mi := &file_federation_federation_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GetPostResponse.ProtoReflect.Descriptor instead.
func (*GetPostResponse) Descriptor() ([]byte, []int) {
return file_federation_federation_proto_rawDescGZIP(), []int{1}
}
func (x *GetPostResponse) GetPost() *Post {
if x != nil {
return x.Post
}
return nil
}
type Post struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
Title string `protobuf:"bytes,2,opt,name=title,proto3" json:"title,omitempty"`
Content string `protobuf:"bytes,3,opt,name=content,proto3" json:"content,omitempty"`
User *User `protobuf:"bytes,4,opt,name=user,proto3" json:"user,omitempty"`
}
func (x *Post) Reset() {
*x = Post{}
if protoimpl.UnsafeEnabled {
mi := &file_federation_federation_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Post) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Post) ProtoMessage() {}
func (x *Post) ProtoReflect() protoreflect.Message {
mi := &file_federation_federation_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Post.ProtoReflect.Descriptor instead.
func (*Post) Descriptor() ([]byte, []int) {
return file_federation_federation_proto_rawDescGZIP(), []int{2}
}
func (x *Post) GetId() string {
if x != nil {
return x.Id
}
return ""
}
func (x *Post) GetTitle() string {
if x != nil {
return x.Title
}
return ""
}
func (x *Post) GetContent() string {
if x != nil {
return x.Content
}
return ""
}
func (x *Post) GetUser() *User {
if x != nil {
return x.User
}
return nil
}
type User struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
}
func (x *User) Reset() {
*x = User{}
if protoimpl.UnsafeEnabled {
mi := &file_federation_federation_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *User) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*User) ProtoMessage() {}
func (x *User) ProtoReflect() protoreflect.Message {
mi := &file_federation_federation_proto_msgTypes[3]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use User.ProtoReflect.Descriptor instead.
func (*User) Descriptor() ([]byte, []int) {
return file_federation_federation_proto_rawDescGZIP(), []int{3}
}
func (x *User) GetId() string {
if x != nil {
return x.Id
}
return ""
}
func (x *User) GetName() string {
if x != nil {
return x.Name
}
return ""
}
var File_federation_federation_proto protoreflect.FileDescriptor
var file_federation_federation_proto_rawDesc = []byte{
0x0a, 0x1b, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x66, 0x65, 0x64,
0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0a, 0x66,
0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x20, 0x67, 0x72, 0x70, 0x63, 0x2f,
0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x66, 0x65, 0x64, 0x65, 0x72,
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x20, 0x0a, 0x0e, 0x47,
0x65, 0x74, 0x50, 0x6f, 0x73, 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, 0x3e, 0x0a,
0x0f, 0x47, 0x65, 0x74, 0x50, 0x6f, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
0x12, 0x24, 0x0a, 0x04, 0x70, 0x6f, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10,
0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x50, 0x6f, 0x73, 0x74,
0x52, 0x04, 0x70, 0x6f, 0x73, 0x74, 0x3a, 0x05, 0x9a, 0x4a, 0x02, 0x10, 0x01, 0x22, 0x6c, 0x0a,
0x04, 0x50, 0x6f, 0x73, 0x74, 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, 0x18, 0x0a, 0x07, 0x63,
0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f,
0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, 0x24, 0x0a, 0x04, 0x75, 0x73, 0x65, 0x72, 0x18, 0x04, 0x20,
0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e,
0x2e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x04, 0x75, 0x73, 0x65, 0x72, 0x22, 0x2a, 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, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28,
0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x32, 0x5e, 0x0a, 0x11, 0x46, 0x65, 0x64, 0x65, 0x72,
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x44, 0x0a, 0x07,
0x47, 0x65, 0x74, 0x50, 0x6f, 0x73, 0x74, 0x12, 0x1a, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61,
0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x6f, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75,
0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e,
0x2e, 0x47, 0x65, 0x74, 0x50, 0x6f, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
0x22, 0x00, 0x1a, 0x03, 0x9a, 0x4a, 0x00, 0x42, 0x88, 0x01, 0x0a, 0x0e, 0x63, 0x6f, 0x6d, 0x2e,
0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x0f, 0x46, 0x65, 0x64, 0x65,
0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x1d, 0x65,
0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2f, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f,
0x6e, 0x3b, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0xa2, 0x02, 0x03, 0x46,
0x58, 0x58, 0xaa, 0x02, 0x0a, 0x46, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0xca,
0x02, 0x0a, 0x46, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0xe2, 0x02, 0x16, 0x46,
0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74,
0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0a, 0x46, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69,
0x6f, 0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_federation_federation_proto_rawDescOnce sync.Once
file_federation_federation_proto_rawDescData = file_federation_federation_proto_rawDesc
)
func file_federation_federation_proto_rawDescGZIP() []byte {
file_federation_federation_proto_rawDescOnce.Do(func() {
file_federation_federation_proto_rawDescData = protoimpl.X.CompressGZIP(file_federation_federation_proto_rawDescData)
})
return file_federation_federation_proto_rawDescData
}
var file_federation_federation_proto_msgTypes = make([]protoimpl.MessageInfo, 4)
var file_federation_federation_proto_goTypes = []interface{}{
(*GetPostRequest)(nil), // 0: federation.GetPostRequest
(*GetPostResponse)(nil), // 1: federation.GetPostResponse
(*Post)(nil), // 2: federation.Post
(*User)(nil), // 3: federation.User
}
var file_federation_federation_proto_depIdxs = []int32{
2, // 0: federation.GetPostResponse.post:type_name -> federation.Post
3, // 1: federation.Post.user:type_name -> federation.User
0, // 2: federation.FederationService.GetPost:input_type -> federation.GetPostRequest
1, // 3: federation.FederationService.GetPost:output_type -> federation.GetPostResponse
3, // [3:4] is the sub-list for method output_type
2, // [2:3] is the sub-list for method input_type
2, // [2:2] is the sub-list for extension type_name
2, // [2:2] is the sub-list for extension extendee
0, // [0:2] is the sub-list for field type_name
}
func init() { file_federation_federation_proto_init() }
func file_federation_federation_proto_init() {
if File_federation_federation_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_federation_federation_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetPostRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_federation_federation_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetPostResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_federation_federation_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Post); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_federation_federation_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*User); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_federation_federation_proto_rawDesc,
NumEnums: 0,
NumMessages: 4,
NumExtensions: 0,
NumServices: 1,
},
GoTypes: file_federation_federation_proto_goTypes,
DependencyIndexes: file_federation_federation_proto_depIdxs,
MessageInfos: file_federation_federation_proto_msgTypes,
}.Build()
File_federation_federation_proto = out.File
file_federation_federation_proto_rawDesc = nil
file_federation_federation_proto_goTypes = nil
file_federation_federation_proto_depIdxs = nil
}
================================================
FILE: _examples/01_minimum/federation/federation_grpc.pb.go
================================================
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.3.0
// - protoc (unknown)
// source: federation/federation.proto
package federation
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 (
FederationService_GetPost_FullMethodName = "/federation.FederationService/GetPost"
)
// FederationServiceClient is the client API for FederationService 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 FederationServiceClient interface {
GetPost(ctx context.Context, in *GetPostRequest, opts ...grpc.CallOption) (*GetPostResponse, error)
}
type federationServiceClient struct {
cc grpc.ClientConnInterface
}
func NewFederationServiceClient(cc grpc.ClientConnInterface) FederationServiceClient {
return &federationServiceClient{cc}
}
func (c *federationServiceClient) GetPost(ctx context.Context, in *GetPostRequest, opts ...grpc.CallOption) (*GetPostResponse, error) {
out := new(GetPostResponse)
err := c.cc.Invoke(ctx, FederationService_GetPost_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// FederationServiceServer is the server API for FederationService service.
// All implementations must embed UnimplementedFederationServiceServer
// for forward compatibility
type FederationServiceServer interface {
GetPost(context.Context, *GetPostRequest) (*GetPostResponse, error)
mustEmbedUnimplementedFederationServiceServer()
}
// UnimplementedFederationServiceServer must be embedded to have forward compatible implementations.
type UnimplementedFederationServiceServer struct {
}
func (UnimplementedFederationServiceServer) GetPost(context.Context, *GetPostRequest) (*GetPostResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetPost not implemented")
}
func (UnimplementedFederationServiceServer) mustEmbedUnimplementedFederationServiceServer() {}
// UnsafeFederationServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to FederationServiceServer will
// result in compilation errors.
type UnsafeFederationServiceServer interface {
mustEmbedUnimplementedFederationServiceServer()
}
func RegisterFederationServiceServer(s grpc.ServiceRegistrar, srv FederationServiceServer) {
s.RegisterService(&FederationService_ServiceDesc, srv)
}
func _FederationService_GetPost_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetPostRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(FederationServiceServer).GetPost(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: FederationService_GetPost_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(FederationServiceServer).GetPost(ctx, req.(*GetPostRequest))
}
return interceptor(ctx, in, info, handler)
}
// FederationService_ServiceDesc is the grpc.ServiceDesc for FederationService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var FederationService_ServiceDesc = grpc.ServiceDesc{
ServiceName: "federation.FederationService",
HandlerType: (*FederationServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "GetPost",
Handler: _FederationService_GetPost_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "federation/federation.proto",
}
================================================
FILE: _examples/01_minimum/federation/federation_grpc_federation.pb.go
================================================
// Code generated by protoc-gen-grpc-federation. DO NOT EDIT!
// versions:
//
// protoc-gen-grpc-federation: (devel)
//
// source: federation/federation.proto
package federation
import (
"context"
"io"
"log/slog"
"reflect"
grpcfed "github.com/mercari/grpc-federation/grpc/federation"
grpcfedcel "github.com/mercari/grpc-federation/grpc/federation/cel"
"go.opentelemetry.io/otel"
"go.opentelemetry.io/otel/trace"
)
var (
_ = reflect.Invalid // to avoid "imported and not used error"
)
// Federation_GetPostResponseVariable represents variable definitions in "federation.GetPostResponse".
type FederationService_Federation_GetPostResponseVariable struct {
}
// Federation_GetPostResponseArgument is argument for "federation.GetPostResponse" message.
type FederationService_Federation_GetPostResponseArgument struct {
Id string
FederationService_Federation_GetPostResponseVariable
}
// FederationServiceConfig configuration required to initialize the service that use GRPC Federation.
type FederationServiceConfig struct {
// Resolver provides an interface to directly implement message resolver and field resolver not defined in Protocol Buffers.
// If this interface is not provided, an error is returned during initialization.
Resolver FederationServiceResolver // required
// ErrorHandler Federation Service often needs to convert errors received from downstream services.
// If an error occurs during method execution in the Federation Service, this error handler is called and the returned error is treated as a final error.
ErrorHandler grpcfed.ErrorHandler
// Logger sets the logger used to output Debug/Info/Error information.
Logger *slog.Logger
}
// FederationServiceClientFactory provides a factory that creates the gRPC Client needed to invoke methods of the gRPC Service on which the Federation Service depends.
type FederationServiceClientFactory interface {
}
// FederationServiceClientConfig helper to create gRPC client.
// Hints for creating a gRPC Client.
type FederationServiceClientConfig struct {
// Service FQDN ( `.` ) of the service on Protocol Buffers.
Service string
}
// FederationServiceDependentClientSet has a gRPC client for all services on which the federation service depends.
// This is provided as an argument when implementing the custom resolver.
type FederationServiceDependentClientSet struct {
}
// FederationServiceResolver provides an interface to directly implement message resolver and field resolver not defined in Protocol Buffers.
type FederationServiceResolver interface {
// Resolve_Federation_GetPostResponse implements resolver for "federation.GetPostResponse".
Resolve_Federation_GetPostResponse(context.Context, *FederationService_Federation_GetPostResponseArgument) (*GetPostResponse, error)
}
// FederationServiceCELPluginWasmConfig type alias for grpcfedcel.WasmConfig.
type FederationServiceCELPluginWasmConfig = grpcfedcel.WasmConfig
// FederationServiceCELPluginConfig hints for loading a WebAssembly based plugin.
type FederationServiceCELPluginConfig struct {
CacheDir string
}
// FederationServiceUnimplementedResolver a structure implemented to satisfy the Resolver interface.
// An Unimplemented error is always returned.
// This is intended for use when there are many Resolver interfaces that do not need to be implemented,
// by embedding them in a resolver structure that you have created.
type FederationServiceUnimplementedResolver struct{}
// Resolve_Federation_GetPostResponse resolve "federation.GetPostResponse".
// This method always returns Unimplemented error.
func (FederationServiceUnimplementedResolver) Resolve_Federation_GetPostResponse(context.Context, *FederationService_Federation_GetPostResponseArgument) (ret *GetPostResponse, e error) {
e = grpcfed.GRPCErrorf(grpcfed.UnimplementedCode, "method Resolve_Federation_GetPostResponse not implemented")
return
}
// FederationService represents Federation Service.
type FederationService struct {
UnimplementedFederationServiceServer
cfg FederationServiceConfig
logger *slog.Logger
isLogLevelDebug bool
errorHandler grpcfed.ErrorHandler
celCacheMap *grpcfed.CELCacheMap
tracer trace.Tracer
resolver FederationServiceResolver
celTypeHelper *grpcfed.CELTypeHelper
celEnvOpts []grpcfed.CELEnvOption
celPlugins []*grpcfedcel.CELPlugin
client *FederationServiceDependentClientSet
}
// NewFederationService creates FederationService instance by FederationServiceConfig.
func NewFederationService(cfg FederationServiceConfig) (*FederationService, error) {
if cfg.Resolver == nil {
return nil, grpcfed.ErrResolverConfig
}
logger := cfg.Logger
if logger == nil {
logger = slog.New(slog.NewJSONHandler(io.Discard, nil))
}
tracer := otel.Tracer("federation.FederationService")
ctx := grpcfed.WithLogger(context.Background(), logger)
ctx = grpcfed.WithTracer(ctx, tracer)
errorHandler := cfg.ErrorHandler
if errorHandler == nil {
errorHandler = func(ctx context.Context, methodName string, err error) error { return err }
}
celTypeHelperFieldMap := grpcfed.CELTypeHelperFieldMap{
"grpc.federation.private.federation.GetPostResponseArgument": {
"id": grpcfed.NewCELFieldType(grpcfed.CELStringType, "Id"),
},
}
celTypeHelper := grpcfed.NewCELTypeHelper("federation", celTypeHelperFieldMap)
var celEnvOpts []grpcfed.CELEnvOption
celEnvOpts = append(celEnvOpts, grpcfed.NewDefaultEnvOptions(celTypeHelper)...)
svc := &FederationService{
cfg: cfg,
logger: logger,
isLogLevelDebug: logger.Enabled(context.Background(), slog.LevelDebug),
errorHandler: errorHandler,
celEnvOpts: celEnvOpts,
celTypeHelper: celTypeHelper,
celCacheMap: grpcfed.NewCELCacheMap(),
tracer: tracer,
resolver: cfg.Resolver,
client: &FederationServiceDependentClientSet{},
}
if resolver, ok := cfg.Resolver.(grpcfed.CustomResolverInitializer); ok {
ctx := context.Background()
if err := resolver.Init(ctx); err != nil {
return nil, err
}
}
return svc, nil
}
// CleanupFederationService cleanup all resources to prevent goroutine leaks.
func CleanupFederationService(ctx context.Context, svc *FederationService) {
svc.cleanup(ctx)
}
func (s *FederationService) cleanup(ctx context.Context) {
for _, plugin := range s.celPlugins {
plugin.Close()
}
}
// GetPost implements "federation.FederationService/GetPost" method.
func (s *FederationService) GetPost(ctx context.Context, req *GetPostRequest) (res *GetPostResponse, e error) {
ctx, span := s.tracer.Start(ctx, "federation.FederationService/GetPost")
defer span.End()
ctx = grpcfed.WithLogger(ctx, s.logger)
ctx = grpcfed.WithCELCacheMap(ctx, s.celCacheMap)
defer func() {
if r := recover(); r != nil {
e = grpcfed.RecoverError(r, grpcfed.StackTrace())
grpcfed.OutputErrorLog(ctx, e)
}
}()
defer func() {
for _, celPlugin := range s.celPlugins {
celPlugin.Cleanup()
}
}()
res, err := s.resolve_Federation_GetPostResponse(ctx, &FederationService_Federation_GetPostResponseArgument{
Id: req.GetId(),
})
if err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
grpcfed.OutputErrorLog(ctx, err)
return nil, err
}
return res, nil
}
// resolve_Federation_GetPostResponse resolve "federation.GetPostResponse" message.
func (s *FederationService) resolve_Federation_GetPostResponse(ctx context.Context, req *FederationService_Federation_GetPostResponseArgument) (*GetPostResponse, error) {
ctx, span := s.tracer.Start(ctx, "federation.GetPostResponse")
defer span.End()
ctx = grpcfed.WithLogger(ctx, grpcfed.Logger(ctx), grpcfed.LogAttrs(ctx)...)
grpcfed.Logger(ctx).DebugContext(ctx, "resolve federation.GetPostResponse", slog.Any("message_args", s.logvalue_Federation_GetPostResponseArgument(req)))
// create a message value to be returned.
// `custom_resolver = true` in "grpc.federation.message" option.
ctx = grpcfed.WithLogger(ctx, grpcfed.Logger(ctx)) // create a new reference to logger.
ret, err := s.resolver.Resolve_Federation_GetPostResponse(ctx, req)
if err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
grpcfed.Logger(ctx).DebugContext(ctx, "resolved federation.GetPostResponse", slog.Any("federation.GetPostResponse", s.logvalue_Federation_GetPostResponse(ret)))
return ret, nil
}
func (s *FederationService) logvalue_Federation_GetPostResponse(v *GetPostResponse) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.Any("post", s.logvalue_Federation_Post(v.GetPost())),
)
}
func (s *FederationService) logvalue_Federation_GetPostResponseArgument(v *FederationService_Federation_GetPostResponseArgument) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.String("id", v.Id),
)
}
func (s *FederationService) logvalue_Federation_Post(v *Post) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.String("id", v.GetId()),
slog.String("title", v.GetTitle()),
slog.String("content", v.GetContent()),
slog.Any("user", s.logvalue_Federation_User(v.GetUser())),
)
}
func (s *FederationService) logvalue_Federation_User(v *User) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.String("id", v.GetId()),
slog.String("name", v.GetName()),
)
}
================================================
FILE: _examples/01_minimum/go.mod
================================================
module example
go 1.24.0
replace github.com/mercari/grpc-federation => ../../
require (
github.com/google/go-cmp v0.7.0
github.com/mercari/grpc-federation v0.0.0-00010101000000-000000000000
go.opentelemetry.io/otel v1.24.0
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.21.0
go.opentelemetry.io/otel/sdk v1.24.0
go.opentelemetry.io/otel/trace v1.24.0
go.uber.org/goleak v1.3.0
google.golang.org/genproto/googleapis/rpc v0.0.0-20240826202546-f6391c0de4c7
google.golang.org/grpc v1.65.0
google.golang.org/protobuf v1.34.2
)
require (
cel.dev/expr v0.19.1 // indirect
github.com/antlr4-go/antlr/v4 v4.13.0 // indirect
github.com/cenkalti/backoff/v4 v4.2.1 // indirect
github.com/go-logr/logr v1.4.1 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
github.com/goccy/wasi-go v0.3.2 // indirect
github.com/google/cel-go v0.23.1 // indirect
github.com/google/uuid v1.6.0 // indirect
github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0 // indirect
github.com/kelseyhightower/envconfig v1.4.0 // indirect
github.com/stealthrocket/wazergo v0.19.1 // indirect
github.com/stoewer/go-strcase v1.3.0 // indirect
github.com/tetratelabs/wazero v1.10.1 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.21.0 // indirect
go.opentelemetry.io/otel/metric v1.24.0 // indirect
go.opentelemetry.io/proto/otlp v1.0.0 // indirect
golang.org/x/exp v0.0.0-20250506013437-ce4c2cf36ca6 // indirect
golang.org/x/net v0.38.0 // indirect
golang.org/x/sync v0.14.0 // indirect
golang.org/x/sys v0.37.0 // indirect
golang.org/x/text v0.23.0 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20240826202546-f6391c0de4c7 // indirect
)
================================================
FILE: _examples/01_minimum/go.sum
================================================
cel.dev/expr v0.19.1 h1:NciYrtDRIR0lNCnH1LFJegdjspNx9fI59O7TWcua/W4=
cel.dev/expr v0.19.1/go.mod h1:MrpN08Q+lEBs+bGYdLxxHkZoUSsCp0nSKTs0nTymJgw=
github.com/antlr4-go/antlr/v4 v4.13.0 h1:lxCg3LAv+EUK6t1i0y1V6/SLeUi0eKEKdhQAlS8TVTI=
github.com/antlr4-go/antlr/v4 v4.13.0/go.mod h1:pfChB/xh/Unjila75QW7+VU4TSnWnnk9UTnmpPaOR2g=
github.com/cenkalti/backoff/v4 v4.2.1 h1:y4OZtCnogmCPw98Zjyt5a6+QwPLGkiQsYW5oUqylYbM=
github.com/cenkalti/backoff/v4 v4.2.1/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A=
github.com/go-logr/logr v1.4.1 h1:pKouT5E8xu9zeFC39JXRDukb6JFQPXM5p5I91188VAQ=
github.com/go-logr/logr v1.4.1/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY=
github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag=
github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE=
github.com/goccy/wasi-go v0.3.2 h1:wAvGXmqCkfcp0B0AwIp5Ya53hzDwkKm9W8iuT3nCCz0=
github.com/goccy/wasi-go v0.3.2/go.mod h1:nIKD204n9xa4Z20UV+XA483kIr9TAl2vXr+X5qVAO5M=
github.com/golang/glog v1.2.1 h1:OptwRhECazUx5ix5TTWC3EZhsZEHWcYWY4FQHTIubm4=
github.com/golang/glog v1.2.1/go.mod h1:6AhwSGph0fcJtXVM/PEHPqZlFeoLxhs7/t5UDAwmO+w=
github.com/google/cel-go v0.23.1 h1:91ThhEZlBcE5rB2adBVXqvDoqdL8BG2oyhd0bK1I/r4=
github.com/google/cel-go v0.23.1/go.mod h1:52Pb6QsDbC5kvgxvZhiL9QX1oZEkcUF/ZqaPx1J5Wwo=
github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8=
github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU=
github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0 h1:YBftPWNWd4WwGqtY2yeZL2ef8rHAxPBD8KFhJpmcqms=
github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0/go.mod h1:YN5jB8ie0yfIUg6VvR9Kz84aCaG7AsGZnLjhHbUqwPg=
github.com/kelseyhightower/envconfig v1.4.0 h1:Im6hONhd3pLkfDFsbRgu68RDNkGF1r3dvMUtDTo2cv8=
github.com/kelseyhightower/envconfig v1.4.0/go.mod h1:cccZRl6mQpaq41TPp5QxidR+Sa3axMbJDNb//FQX6Gg=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/stealthrocket/wazergo v0.19.1 h1:BPrITETPgSFwiytwmToO0MbUC/+RGC39JScz1JmmG6c=
github.com/stealthrocket/wazergo v0.19.1/go.mod h1:riI0hxw4ndZA5e6z7PesHg2BtTftcZaMxRcoiGGipTs=
github.com/stoewer/go-strcase v1.3.0 h1:g0eASXYtp+yvN9fK8sH94oCIk0fau9uV1/ZdJ0AVEzs=
github.com/stoewer/go-strcase v1.3.0/go.mod h1:fAH5hQ5pehh+j3nZfvwdk2RgEgQjAoM8wodgtPmh1xo=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=
github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo=
github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk=
github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
github.com/tetratelabs/wazero v1.10.1 h1:2DugeJf6VVk58KTPszlNfeeN8AhhpwcZqkJj2wwFuH8=
github.com/tetratelabs/wazero v1.10.1/go.mod h1:DRm5twOQ5Gr1AoEdSi0CLjDQF1J9ZAuyqFIjl1KKfQU=
go.opentelemetry.io/otel v1.24.0 h1:0LAOdjNmQeSTzGBzduGe/rU4tZhMwL5rWgtp9Ku5Jfo=
go.opentelemetry.io/otel v1.24.0/go.mod h1:W7b9Ozg4nkF5tWI5zsXkaKKDjdVjpD4oAt9Qi/MArHo=
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.21.0 h1:cl5P5/GIfFh4t6xyruOgJP5QiA1pw4fYYdv6nc6CBWw=
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.21.0/go.mod h1:zgBdWWAu7oEEMC06MMKc5NLbA/1YDXV1sMpSqEeLQLg=
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.21.0 h1:tIqheXEFWAZ7O8A7m+J0aPTmpJN3YQ7qetUAdkkkKpk=
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.21.0/go.mod h1:nUeKExfxAQVbiVFn32YXpXZZHZ61Cc3s3Rn1pDBGAb0=
go.opentelemetry.io/otel/metric v1.24.0 h1:6EhoGWWK28x1fbpA4tYTOWBkPefTDQnb8WSGXlc88kI=
go.opentelemetry.io/otel/metric v1.24.0/go.mod h1:VYhLe1rFfxuTXLgj4CBiyz+9WYBA8pNGJgDcSFRKBco=
go.opentelemetry.io/otel/sdk v1.24.0 h1:YMPPDNymmQN3ZgczicBY3B6sf9n62Dlj9pWD3ucgoDw=
go.opentelemetry.io/otel/sdk v1.24.0/go.mod h1:KVrIYw6tEubO9E96HQpcmpTKDVn9gdv35HoYiQWGDFg=
go.opentelemetry.io/otel/trace v1.24.0 h1:CsKnnL4dUAr/0llH9FKuc698G04IrpWV0MQA/Y1YELI=
go.opentelemetry.io/otel/trace v1.24.0/go.mod h1:HPc3Xr/cOApsBI154IU0OI0HJexz+aw5uPdbs3UCjNU=
go.opentelemetry.io/proto/otlp v1.0.0 h1:T0TX0tmXU8a3CbNXzEKGeU5mIVOdf0oykP+u2lIVU/I=
go.opentelemetry.io/proto/otlp v1.0.0/go.mod h1:Sy6pihPLfYHkr3NkUbEhGHFhINUSI/v80hjKIs5JXpM=
go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto=
go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE=
golang.org/x/exp v0.0.0-20250506013437-ce4c2cf36ca6 h1:y5zboxd6LQAqYIhHnB48p0ByQ/GnQx2BE33L8BOHQkI=
golang.org/x/exp v0.0.0-20250506013437-ce4c2cf36ca6/go.mod h1:U6Lno4MTRCDY+Ba7aCcauB9T60gsv5s4ralQzP72ZoQ=
golang.org/x/net v0.38.0 h1:vRMAPTMaeGqVhG5QyLJHqNDwecKTomGeqbnfZyKlBI8=
golang.org/x/net v0.38.0/go.mod h1:ivrbrMbzFq5J41QOQh0siUuly180yBYtLp+CKbEaFx8=
golang.org/x/sync v0.14.0 h1:woo0S4Yywslg6hp4eUFjTVOyKt0RookbpAHG4c1HmhQ=
golang.org/x/sync v0.14.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA=
golang.org/x/sys v0.37.0 h1:fdNQudmxPjkdUTPnLn5mdQv7Zwvbvpaxqs831goi9kQ=
golang.org/x/sys v0.37.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks=
golang.org/x/text v0.23.0 h1:D71I7dUrlY+VX0gQShAThNGHFxZ13dGLBHQLVl1mJlY=
golang.org/x/text v0.23.0/go.mod h1:/BLNzu4aZCJ1+kcD0DNRotWKage4q2rGVAg4o22unh4=
google.golang.org/genproto/googleapis/api v0.0.0-20240826202546-f6391c0de4c7 h1:YcyjlL1PRr2Q17/I0dPk2JmYS5CDXfcdb2Z3YRioEbw=
google.golang.org/genproto/googleapis/api v0.0.0-20240826202546-f6391c0de4c7/go.mod h1:OCdP9MfskevB/rbYvHTsXTtKC+3bHWajPdoKgjcYkfo=
google.golang.org/genproto/googleapis/rpc v0.0.0-20240826202546-f6391c0de4c7 h1:2035KHhUv+EpyB+hWgJnaWKJOdX1E95w2S8Rr4uWKTs=
google.golang.org/genproto/googleapis/rpc v0.0.0-20240826202546-f6391c0de4c7/go.mod h1:UqMtugtsSgubUsoxbuAoiCXvqvErP7Gf0so0mK9tHxU=
google.golang.org/grpc v1.65.0 h1:bs/cUb4lp1G5iImFFd3u5ixQzweKizoZJAwBNLR42lc=
google.golang.org/grpc v1.65.0/go.mod h1:WgYC2ypjlB0EiQi6wdKixMqukr6lBc0Vo+oOgjrM5ZQ=
google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg=
google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
================================================
FILE: _examples/01_minimum/grpc-federation.yaml
================================================
imports:
- proto
src:
- proto
out: .
plugins:
- plugin: go
opt: paths=source_relative
- plugin: go-grpc
opt: paths=source_relative
- plugin: grpc-federation
opt: paths=source_relative
================================================
FILE: _examples/01_minimum/main_test.go
================================================
package main_test
import (
"context"
"log/slog"
"os"
"testing"
"github.com/google/go-cmp/cmp"
"github.com/google/go-cmp/cmp/cmpopts"
"go.opentelemetry.io/otel"
"go.opentelemetry.io/otel/attribute"
"go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc"
"go.opentelemetry.io/otel/propagation"
"go.opentelemetry.io/otel/sdk/resource"
sdktrace "go.opentelemetry.io/otel/sdk/trace"
semconv "go.opentelemetry.io/otel/semconv/v1.4.0"
"go.uber.org/goleak"
"example/federation"
)
type Resolver struct {
*federation.FederationServiceUnimplementedResolver
}
var (
requestID = "foo"
testResponse = &federation.GetPostResponse{
Post: &federation.Post{
Id: requestID,
Title: "xxx",
Content: "yyy",
User: &federation.User{
Id: requestID,
Name: "zzz",
},
},
}
)
func (r *Resolver) Resolve_Federation_GetPostResponse(ctx context.Context, arg *federation.FederationService_Federation_GetPostResponseArgument) (*federation.GetPostResponse, error) {
return testResponse, nil
}
func TestFederation(t *testing.T) {
defer goleak.VerifyNone(t)
ctx := context.Background()
if os.Getenv("ENABLE_JAEGER") != "" {
exporter, err := otlptracegrpc.New(ctx, otlptracegrpc.WithInsecure())
if err != nil {
t.Fatal(err)
}
tp := sdktrace.NewTracerProvider(
sdktrace.WithBatcher(exporter),
sdktrace.WithResource(
resource.NewWithAttributes(
semconv.SchemaURL,
semconv.ServiceNameKey.String("example01/minimum"),
semconv.ServiceVersionKey.String("1.0.0"),
attribute.String("environment", "dev"),
),
),
sdktrace.WithSampler(sdktrace.AlwaysSample()),
)
defer tp.Shutdown(ctx)
otel.SetTextMapPropagator(propagation.TraceContext{})
otel.SetTracerProvider(tp)
}
logger := slog.New(slog.NewJSONHandler(os.Stdout, &slog.HandlerOptions{
Level: slog.LevelDebug,
}))
svc, err := federation.NewFederationService(federation.FederationServiceConfig{
Resolver: new(Resolver),
Logger: logger,
})
if err != nil {
t.Fatal(err)
}
res, err := svc.GetPost(ctx, &federation.GetPostRequest{Id: requestID})
if err != nil {
t.Fatal(err)
}
if diff := cmp.Diff(
testResponse, res,
cmpopts.IgnoreUnexported(federation.GetPostResponse{}, federation.Post{}, federation.User{}),
); diff != "" {
t.Errorf("(-got, +want)\n%s", diff)
}
}
================================================
FILE: _examples/01_minimum/proto/buf.yaml
================================================
version: v1
breaking:
use:
- FILE
lint:
use:
- DEFAULT
================================================
FILE: _examples/01_minimum/proto/federation/federation.proto
================================================
syntax = "proto3";
package federation;
import "grpc/federation/federation.proto";
option go_package = "example/federation;federation";
service FederationService {
option (grpc.federation.service) = {};
rpc GetPost(GetPostRequest) returns (GetPostResponse) {};
}
message GetPostRequest {
string id = 1;
}
message GetPostResponse {
option (grpc.federation.message).custom_resolver = true;
Post post = 1;
}
message Post {
string id = 1;
string title = 2;
string content = 3;
User user = 4;
}
message User {
string id = 1;
string name = 2;
}
================================================
FILE: _examples/02_simple/.gitignore
================================================
grpc/federation
================================================
FILE: _examples/02_simple/.vscode/settings.json
================================================
{
"protoc": {
"options": [
"--proto_path=proto",
"--proto_path=proto_deps"
]
},
"grpc-federation": {
"path": "../../bin/grpc-federation-language-server",
"import-paths": [
"proto",
"proto_deps"
]
}
}
================================================
FILE: _examples/02_simple/Makefile
================================================
MAKEFILE_DIR := $(dir $(lastword $(MAKEFILE_LIST)))
GOBIN := $(MAKEFILE_DIR)/../../bin
PATH := $(GOBIN):$(PATH)
JAEGER_IMAGE := jaegertracing/all-in-one:latest
.PHONY: generate
generate:
$(GOBIN)/buf generate
.PHONY: lint
lint:
@$(GOBIN)/grpc-federation-linter -Iproto -Iproto_deps ./proto/federation/federation.proto
.PHONY: test
test:
go test -race ./ -count=1
.PHONY: grpc-federation/generate
grpc-federation/generate:
@$(GOBIN)/grpc-federation-generator ./proto/federation/federation.proto
.PHONY: grpc-federation/watch
grpc-federation/watch:
@$(GOBIN)/grpc-federation-generator -w
.PHONY: jaeger/start
jaeger/start:
@docker run \
-e COLLECTOR_OTLP_ENABLED=true \
-p 16686:16686 \
-p 4317:4317 \
-p 4318:4318 \
-d \
$(JAEGER_IMAGE)
.PHONY: jaeger/stop
jaeger/stop:
@docker stop $(shell docker ps -q --filter ancestor=$(JAEGER_IMAGE))
================================================
FILE: _examples/02_simple/buf.gen.yaml
================================================
version: v1
managed:
enabled: true
plugins:
- plugin: go
out: .
opt: paths=source_relative
- plugin: go-grpc
out: .
opt: paths=source_relative
- plugin: grpc-federation
out: .
opt:
- paths=source_relative
- import_paths=proto
================================================
FILE: _examples/02_simple/buf.work.yaml
================================================
version: v1
directories:
- proto
- proto_deps
================================================
FILE: _examples/02_simple/federation/federation.pb.go
================================================
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.33.0
// protoc (unknown)
// source: federation/federation.proto
package federation
import (
_ "github.com/mercari/grpc-federation/grpc/federation"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
anypb "google.golang.org/protobuf/types/known/anypb"
timestamppb "google.golang.org/protobuf/types/known/timestamppb"
wrapperspb "google.golang.org/protobuf/types/known/wrapperspb"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
type Item_ItemType int32
const (
Item_ITEM_TYPE_UNSPECIFIED Item_ItemType = 0
Item_ITEM_TYPE_1 Item_ItemType = 1
Item_ITEM_TYPE_2 Item_ItemType = 2
Item_ITEM_TYPE_3 Item_ItemType = 3
)
// Enum value maps for Item_ItemType.
var (
Item_ItemType_name = map[int32]string{
0: "ITEM_TYPE_UNSPECIFIED",
1: "ITEM_TYPE_1",
2: "ITEM_TYPE_2",
3: "ITEM_TYPE_3",
}
Item_ItemType_value = map[string]int32{
"ITEM_TYPE_UNSPECIFIED": 0,
"ITEM_TYPE_1": 1,
"ITEM_TYPE_2": 2,
"ITEM_TYPE_3": 3,
}
)
func (x Item_ItemType) Enum() *Item_ItemType {
p := new(Item_ItemType)
*p = x
return p
}
func (x Item_ItemType) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (Item_ItemType) Descriptor() protoreflect.EnumDescriptor {
return file_federation_federation_proto_enumTypes[0].Descriptor()
}
func (Item_ItemType) Type() protoreflect.EnumType {
return &file_federation_federation_proto_enumTypes[0]
}
func (x Item_ItemType) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use Item_ItemType.Descriptor instead.
func (Item_ItemType) EnumDescriptor() ([]byte, []int) {
return file_federation_federation_proto_rawDescGZIP(), []int{5, 0}
}
type Item_Location_LocationType int32
const (
Item_Location_LOCATION_TYPE_0 Item_Location_LocationType = 0
Item_Location_LOCATION_TYPE_1 Item_Location_LocationType = 1
)
// Enum value maps for Item_Location_LocationType.
var (
Item_Location_LocationType_name = map[int32]string{
0: "LOCATION_TYPE_0",
1: "LOCATION_TYPE_1",
}
Item_Location_LocationType_value = map[string]int32{
"LOCATION_TYPE_0": 0,
"LOCATION_TYPE_1": 1,
}
)
func (x Item_Location_LocationType) Enum() *Item_Location_LocationType {
p := new(Item_Location_LocationType)
*p = x
return p
}
func (x Item_Location_LocationType) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (Item_Location_LocationType) Descriptor() protoreflect.EnumDescriptor {
return file_federation_federation_proto_enumTypes[1].Descriptor()
}
func (Item_Location_LocationType) Type() protoreflect.EnumType {
return &file_federation_federation_proto_enumTypes[1]
}
func (x Item_Location_LocationType) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use Item_Location_LocationType.Descriptor instead.
func (Item_Location_LocationType) EnumDescriptor() ([]byte, []int) {
return file_federation_federation_proto_rawDescGZIP(), []int{5, 0, 0}
}
type GetPostRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
}
func (x *GetPostRequest) Reset() {
*x = GetPostRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_federation_federation_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GetPostRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetPostRequest) ProtoMessage() {}
func (x *GetPostRequest) ProtoReflect() protoreflect.Message {
mi := &file_federation_federation_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GetPostRequest.ProtoReflect.Descriptor instead.
func (*GetPostRequest) Descriptor() ([]byte, []int) {
return file_federation_federation_proto_rawDescGZIP(), []int{0}
}
func (x *GetPostRequest) GetId() string {
if x != nil {
return x.Id
}
return ""
}
type GetPostResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Post *Post `protobuf:"bytes,1,opt,name=post,proto3" json:"post,omitempty"`
Str string `protobuf:"bytes,2,opt,name=str,proto3" json:"str,omitempty"`
Uuid string `protobuf:"bytes,3,opt,name=uuid,proto3" json:"uuid,omitempty"`
Loc string `protobuf:"bytes,4,opt,name=loc,proto3" json:"loc,omitempty"`
Value1 string `protobuf:"bytes,5,opt,name=value1,proto3" json:"value1,omitempty"`
ItemTypeName string `protobuf:"bytes,6,opt,name=item_type_name,json=itemTypeName,proto3" json:"item_type_name,omitempty"`
LocationTypeName string `protobuf:"bytes,7,opt,name=location_type_name,json=locationTypeName,proto3" json:"location_type_name,omitempty"`
UserItemTypeName string `protobuf:"bytes,8,opt,name=user_item_type_name,json=userItemTypeName,proto3" json:"user_item_type_name,omitempty"`
ItemTypeValueEnum Item_ItemType `protobuf:"varint,9,opt,name=item_type_value_enum,json=itemTypeValueEnum,proto3,enum=federation.Item_ItemType" json:"item_type_value_enum,omitempty"`
ItemTypeValueInt int32 `protobuf:"varint,10,opt,name=item_type_value_int,json=itemTypeValueInt,proto3" json:"item_type_value_int,omitempty"`
ItemTypeValueCast Item_ItemType `protobuf:"varint,11,opt,name=item_type_value_cast,json=itemTypeValueCast,proto3,enum=federation.Item_ItemType" json:"item_type_value_cast,omitempty"`
LocationTypeValue int32 `protobuf:"varint,12,opt,name=location_type_value,json=locationTypeValue,proto3" json:"location_type_value,omitempty"`
UserItemTypeValue int32 `protobuf:"varint,13,opt,name=user_item_type_value,json=userItemTypeValue,proto3" json:"user_item_type_value,omitempty"`
A *A `protobuf:"bytes,14,opt,name=a,proto3" json:"a,omitempty"`
SortedValues []int32 `protobuf:"varint,15,rep,packed,name=sorted_values,json=sortedValues,proto3" json:"sorted_values,omitempty"`
SortedItems []*Item `protobuf:"bytes,16,rep,name=sorted_items,json=sortedItems,proto3" json:"sorted_items,omitempty"`
MapValue map[int32]string `protobuf:"bytes,17,rep,name=map_value,json=mapValue,proto3" json:"map_value,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
DoubleWrapperValue *wrapperspb.DoubleValue `protobuf:"bytes,18,opt,name=double_wrapper_value,json=doubleWrapperValue,proto3" json:"double_wrapper_value,omitempty"`
FloatWrapperValue *wrapperspb.FloatValue `protobuf:"bytes,19,opt,name=float_wrapper_value,json=floatWrapperValue,proto3" json:"float_wrapper_value,omitempty"`
I64WrapperValue *wrapperspb.Int64Value `protobuf:"bytes,20,opt,name=i64_wrapper_value,json=i64WrapperValue,proto3" json:"i64_wrapper_value,omitempty"`
U64WrapperValue *wrapperspb.UInt64Value `protobuf:"bytes,21,opt,name=u64_wrapper_value,json=u64WrapperValue,proto3" json:"u64_wrapper_value,omitempty"`
I32WrapperValue *wrapperspb.Int32Value `protobuf:"bytes,22,opt,name=i32_wrapper_value,json=i32WrapperValue,proto3" json:"i32_wrapper_value,omitempty"`
U32WrapperValue *wrapperspb.UInt32Value `protobuf:"bytes,23,opt,name=u32_wrapper_value,json=u32WrapperValue,proto3" json:"u32_wrapper_value,omitempty"`
BoolWrapperValue *wrapperspb.BoolValue `protobuf:"bytes,24,opt,name=bool_wrapper_value,json=boolWrapperValue,proto3" json:"bool_wrapper_value,omitempty"`
StringWrapperValue *wrapperspb.StringValue `protobuf:"bytes,25,opt,name=string_wrapper_value,json=stringWrapperValue,proto3" json:"string_wrapper_value,omitempty"`
BytesWrapperValue *wrapperspb.BytesValue `protobuf:"bytes,26,opt,name=bytes_wrapper_value,json=bytesWrapperValue,proto3" json:"bytes_wrapper_value,omitempty"`
Hello string `protobuf:"bytes,27,opt,name=hello,proto3" json:"hello,omitempty"`
NullTimestamp *timestamppb.Timestamp `protobuf:"bytes,28,opt,name=null_timestamp,json=nullTimestamp,proto3" json:"null_timestamp,omitempty"`
NullTimestamp2 *timestamppb.Timestamp `protobuf:"bytes,29,opt,name=null_timestamp2,json=nullTimestamp2,proto3" json:"null_timestamp2,omitempty"`
NullTimestamp3 *timestamppb.Timestamp `protobuf:"bytes,30,opt,name=null_timestamp3,json=nullTimestamp3,proto3" json:"null_timestamp3,omitempty"`
JpLoc string `protobuf:"bytes,31,opt,name=jp_loc,json=jpLoc,proto3" json:"jp_loc,omitempty"`
StringsJoin string `protobuf:"bytes,32,opt,name=strings_join,json=stringsJoin,proto3" json:"strings_join,omitempty"`
ParseFloat float64 `protobuf:"fixed64,33,opt,name=parse_float,json=parseFloat,proto3" json:"parse_float,omitempty"`
UrlUserName string `protobuf:"bytes,34,opt,name=url_user_name,json=urlUserName,proto3" json:"url_user_name,omitempty"`
EnumValue Item_ItemType `protobuf:"varint,35,opt,name=enum_value,json=enumValue,proto3,enum=federation.Item_ItemType" json:"enum_value,omitempty"`
EnumValueStr string `protobuf:"bytes,36,opt,name=enum_value_str,json=enumValueStr,proto3" json:"enum_value_str,omitempty"`
SqrtDouble float64 `protobuf:"fixed64,37,opt,name=sqrt_double,json=sqrtDouble,proto3" json:"sqrt_double,omitempty"`
SqrtInt float64 `protobuf:"fixed64,38,opt,name=sqrt_int,json=sqrtInt,proto3" json:"sqrt_int,omitempty"`
Pow float64 `protobuf:"fixed64,39,opt,name=pow,proto3" json:"pow,omitempty"`
Floor float64 `protobuf:"fixed64,40,opt,name=floor,proto3" json:"floor,omitempty"`
Flatten []int64 `protobuf:"varint,41,rep,packed,name=flatten,proto3" json:"flatten,omitempty"`
Round float64 `protobuf:"fixed64,42,opt,name=round,proto3" json:"round,omitempty"`
Any *anypb.Any `protobuf:"bytes,43,opt,name=any,proto3" json:"any,omitempty"`
Replaced string `protobuf:"bytes,44,opt,name=replaced,proto3" json:"replaced,omitempty"`
ListToMap map[int32]int32 `protobuf:"bytes,45,rep,name=list_to_map,json=listToMap,proto3" json:"list_to_map,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"`
UuidParse string `protobuf:"bytes,46,opt,name=uuid_parse,json=uuidParse,proto3" json:"uuid_parse,omitempty"`
UuidValidate bool `protobuf:"varint,47,opt,name=uuid_validate,json=uuidValidate,proto3" json:"uuid_validate,omitempty"`
Compile string `protobuf:"bytes,48,opt,name=compile,proto3" json:"compile,omitempty"`
MustCompile string `protobuf:"bytes,49,opt,name=must_compile,json=mustCompile,proto3" json:"must_compile,omitempty"`
QuoteMeta string `protobuf:"bytes,50,opt,name=quote_meta,json=quoteMeta,proto3" json:"quote_meta,omitempty"`
FindStringSubmatch []string `protobuf:"bytes,51,rep,name=find_string_submatch,json=findStringSubmatch,proto3" json:"find_string_submatch,omitempty"`
MatchString bool `protobuf:"varint,52,opt,name=match_string,json=matchString,proto3" json:"match_string,omitempty"`
ReplaceAllString string `protobuf:"bytes,53,opt,name=replace_all_string,json=replaceAllString,proto3" json:"replace_all_string,omitempty"`
}
func (x *GetPostResponse) Reset() {
*x = GetPostResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_federation_federation_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GetPostResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetPostResponse) ProtoMessage() {}
func (x *GetPostResponse) ProtoReflect() protoreflect.Message {
mi := &file_federation_federation_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GetPostResponse.ProtoReflect.Descriptor instead.
func (*GetPostResponse) Descriptor() ([]byte, []int) {
return file_federation_federation_proto_rawDescGZIP(), []int{1}
}
func (x *GetPostResponse) GetPost() *Post {
if x != nil {
return x.Post
}
return nil
}
func (x *GetPostResponse) GetStr() string {
if x != nil {
return x.Str
}
return ""
}
func (x *GetPostResponse) GetUuid() string {
if x != nil {
return x.Uuid
}
return ""
}
func (x *GetPostResponse) GetLoc() string {
if x != nil {
return x.Loc
}
return ""
}
func (x *GetPostResponse) GetValue1() string {
if x != nil {
return x.Value1
}
return ""
}
func (x *GetPostResponse) GetItemTypeName() string {
if x != nil {
return x.ItemTypeName
}
return ""
}
func (x *GetPostResponse) GetLocationTypeName() string {
if x != nil {
return x.LocationTypeName
}
return ""
}
func (x *GetPostResponse) GetUserItemTypeName() string {
if x != nil {
return x.UserItemTypeName
}
return ""
}
func (x *GetPostResponse) GetItemTypeValueEnum() Item_ItemType {
if x != nil {
return x.ItemTypeValueEnum
}
return Item_ITEM_TYPE_UNSPECIFIED
}
func (x *GetPostResponse) GetItemTypeValueInt() int32 {
if x != nil {
return x.ItemTypeValueInt
}
return 0
}
func (x *GetPostResponse) GetItemTypeValueCast() Item_ItemType {
if x != nil {
return x.ItemTypeValueCast
}
return Item_ITEM_TYPE_UNSPECIFIED
}
func (x *GetPostResponse) GetLocationTypeValue() int32 {
if x != nil {
return x.LocationTypeValue
}
return 0
}
func (x *GetPostResponse) GetUserItemTypeValue() int32 {
if x != nil {
return x.UserItemTypeValue
}
return 0
}
func (x *GetPostResponse) GetA() *A {
if x != nil {
return x.A
}
return nil
}
func (x *GetPostResponse) GetSortedValues() []int32 {
if x != nil {
return x.SortedValues
}
return nil
}
func (x *GetPostResponse) GetSortedItems() []*Item {
if x != nil {
return x.SortedItems
}
return nil
}
func (x *GetPostResponse) GetMapValue() map[int32]string {
if x != nil {
return x.MapValue
}
return nil
}
func (x *GetPostResponse) GetDoubleWrapperValue() *wrapperspb.DoubleValue {
if x != nil {
return x.DoubleWrapperValue
}
return nil
}
func (x *GetPostResponse) GetFloatWrapperValue() *wrapperspb.FloatValue {
if x != nil {
return x.FloatWrapperValue
}
return nil
}
func (x *GetPostResponse) GetI64WrapperValue() *wrapperspb.Int64Value {
if x != nil {
return x.I64WrapperValue
}
return nil
}
func (x *GetPostResponse) GetU64WrapperValue() *wrapperspb.UInt64Value {
if x != nil {
return x.U64WrapperValue
}
return nil
}
func (x *GetPostResponse) GetI32WrapperValue() *wrapperspb.Int32Value {
if x != nil {
return x.I32WrapperValue
}
return nil
}
func (x *GetPostResponse) GetU32WrapperValue() *wrapperspb.UInt32Value {
if x != nil {
return x.U32WrapperValue
}
return nil
}
func (x *GetPostResponse) GetBoolWrapperValue() *wrapperspb.BoolValue {
if x != nil {
return x.BoolWrapperValue
}
return nil
}
func (x *GetPostResponse) GetStringWrapperValue() *wrapperspb.StringValue {
if x != nil {
return x.StringWrapperValue
}
return nil
}
func (x *GetPostResponse) GetBytesWrapperValue() *wrapperspb.BytesValue {
if x != nil {
return x.BytesWrapperValue
}
return nil
}
func (x *GetPostResponse) GetHello() string {
if x != nil {
return x.Hello
}
return ""
}
func (x *GetPostResponse) GetNullTimestamp() *timestamppb.Timestamp {
if x != nil {
return x.NullTimestamp
}
return nil
}
func (x *GetPostResponse) GetNullTimestamp2() *timestamppb.Timestamp {
if x != nil {
return x.NullTimestamp2
}
return nil
}
func (x *GetPostResponse) GetNullTimestamp3() *timestamppb.Timestamp {
if x != nil {
return x.NullTimestamp3
}
return nil
}
func (x *GetPostResponse) GetJpLoc() string {
if x != nil {
return x.JpLoc
}
return ""
}
func (x *GetPostResponse) GetStringsJoin() string {
if x != nil {
return x.StringsJoin
}
return ""
}
func (x *GetPostResponse) GetParseFloat() float64 {
if x != nil {
return x.ParseFloat
}
return 0
}
func (x *GetPostResponse) GetUrlUserName() string {
if x != nil {
return x.UrlUserName
}
return ""
}
func (x *GetPostResponse) GetEnumValue() Item_ItemType {
if x != nil {
return x.EnumValue
}
return Item_ITEM_TYPE_UNSPECIFIED
}
func (x *GetPostResponse) GetEnumValueStr() string {
if x != nil {
return x.EnumValueStr
}
return ""
}
func (x *GetPostResponse) GetSqrtDouble() float64 {
if x != nil {
return x.SqrtDouble
}
return 0
}
func (x *GetPostResponse) GetSqrtInt() float64 {
if x != nil {
return x.SqrtInt
}
return 0
}
func (x *GetPostResponse) GetPow() float64 {
if x != nil {
return x.Pow
}
return 0
}
func (x *GetPostResponse) GetFloor() float64 {
if x != nil {
return x.Floor
}
return 0
}
func (x *GetPostResponse) GetFlatten() []int64 {
if x != nil {
return x.Flatten
}
return nil
}
func (x *GetPostResponse) GetRound() float64 {
if x != nil {
return x.Round
}
return 0
}
func (x *GetPostResponse) GetAny() *anypb.Any {
if x != nil {
return x.Any
}
return nil
}
func (x *GetPostResponse) GetReplaced() string {
if x != nil {
return x.Replaced
}
return ""
}
func (x *GetPostResponse) GetListToMap() map[int32]int32 {
if x != nil {
return x.ListToMap
}
return nil
}
func (x *GetPostResponse) GetUuidParse() string {
if x != nil {
return x.UuidParse
}
return ""
}
func (x *GetPostResponse) GetUuidValidate() bool {
if x != nil {
return x.UuidValidate
}
return false
}
func (x *GetPostResponse) GetCompile() string {
if x != nil {
return x.Compile
}
return ""
}
func (x *GetPostResponse) GetMustCompile() string {
if x != nil {
return x.MustCompile
}
return ""
}
func (x *GetPostResponse) GetQuoteMeta() string {
if x != nil {
return x.QuoteMeta
}
return ""
}
func (x *GetPostResponse) GetFindStringSubmatch() []string {
if x != nil {
return x.FindStringSubmatch
}
return nil
}
func (x *GetPostResponse) GetMatchString() bool {
if x != nil {
return x.MatchString
}
return false
}
func (x *GetPostResponse) GetReplaceAllString() string {
if x != nil {
return x.ReplaceAllString
}
return ""
}
type A struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
B *A_B `protobuf:"bytes,1,opt,name=b,proto3" json:"b,omitempty"`
// Types that are assignable to Opt:
//
// *A_OptC
Opt isA_Opt `protobuf_oneof:"opt"`
}
func (x *A) Reset() {
*x = A{}
if protoimpl.UnsafeEnabled {
mi := &file_federation_federation_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *A) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*A) ProtoMessage() {}
func (x *A) ProtoReflect() protoreflect.Message {
mi := &file_federation_federation_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use A.ProtoReflect.Descriptor instead.
func (*A) Descriptor() ([]byte, []int) {
return file_federation_federation_proto_rawDescGZIP(), []int{2}
}
func (x *A) GetB() *A_B {
if x != nil {
return x.B
}
return nil
}
func (m *A) GetOpt() isA_Opt {
if m != nil {
return m.Opt
}
return nil
}
func (x *A) GetOptC() *A_B_C {
if x, ok := x.GetOpt().(*A_OptC); ok {
return x.OptC
}
return nil
}
type isA_Opt interface {
isA_Opt()
}
type A_OptC struct {
OptC *A_B_C `protobuf:"bytes,2,opt,name=opt_c,json=optC,proto3,oneof"`
}
func (*A_OptC) isA_Opt() {}
type Post struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
Title string `protobuf:"bytes,2,opt,name=title,proto3" json:"title,omitempty"`
Content string `protobuf:"bytes,3,opt,name=content,proto3" json:"content,omitempty"`
User *User `protobuf:"bytes,4,opt,name=user,proto3" json:"user,omitempty"`
}
func (x *Post) Reset() {
*x = Post{}
if protoimpl.UnsafeEnabled {
mi := &file_federation_federation_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Post) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Post) ProtoMessage() {}
func (x *Post) ProtoReflect() protoreflect.Message {
mi := &file_federation_federation_proto_msgTypes[3]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Post.ProtoReflect.Descriptor instead.
func (*Post) Descriptor() ([]byte, []int) {
return file_federation_federation_proto_rawDescGZIP(), []int{3}
}
func (x *Post) GetId() string {
if x != nil {
return x.Id
}
return ""
}
func (x *Post) GetTitle() string {
if x != nil {
return x.Title
}
return ""
}
func (x *Post) GetContent() string {
if x != nil {
return x.Content
}
return ""
}
func (x *Post) GetUser() *User {
if x != nil {
return x.User
}
return nil
}
type User struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
Items []*Item `protobuf:"bytes,3,rep,name=items,proto3" json:"items,omitempty"`
Profile map[string]*anypb.Any `protobuf:"bytes,4,rep,name=profile,proto3" json:"profile,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
// Types that are assignable to Attr:
//
// *User_AttrA_
// *User_B
Attr isUser_Attr `protobuf_oneof:"attr"`
}
func (x *User) Reset() {
*x = User{}
if protoimpl.UnsafeEnabled {
mi := &file_federation_federation_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *User) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*User) ProtoMessage() {}
func (x *User) ProtoReflect() protoreflect.Message {
mi := &file_federation_federation_proto_msgTypes[4]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use User.ProtoReflect.Descriptor instead.
func (*User) Descriptor() ([]byte, []int) {
return file_federation_federation_proto_rawDescGZIP(), []int{4}
}
func (x *User) GetId() string {
if x != nil {
return x.Id
}
return ""
}
func (x *User) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *User) GetItems() []*Item {
if x != nil {
return x.Items
}
return nil
}
func (x *User) GetProfile() map[string]*anypb.Any {
if x != nil {
return x.Profile
}
return nil
}
func (m *User) GetAttr() isUser_Attr {
if m != nil {
return m.Attr
}
return nil
}
func (x *User) GetAttrA() *User_AttrA {
if x, ok := x.GetAttr().(*User_AttrA_); ok {
return x.AttrA
}
return nil
}
func (x *User) GetB() *User_AttrB {
if x, ok := x.GetAttr().(*User_B); ok {
return x.B
}
return nil
}
type isUser_Attr interface {
isUser_Attr()
}
type User_AttrA_ struct {
AttrA *User_AttrA `protobuf:"bytes,5,opt,name=attr_a,json=attrA,proto3,oneof"`
}
type User_B struct {
B *User_AttrB `protobuf:"bytes,6,opt,name=b,proto3,oneof"`
}
func (*User_AttrA_) isUser_Attr() {}
func (*User_B) isUser_Attr() {}
type Item struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
Type Item_ItemType `protobuf:"varint,2,opt,name=type,proto3,enum=federation.Item_ItemType" json:"type,omitempty"`
Value int64 `protobuf:"varint,3,opt,name=value,proto3" json:"value,omitempty"`
Location *Item_Location `protobuf:"bytes,4,opt,name=location,proto3" json:"location,omitempty"`
}
func (x *Item) Reset() {
*x = Item{}
if protoimpl.UnsafeEnabled {
mi := &file_federation_federation_proto_msgTypes[5]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Item) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Item) ProtoMessage() {}
func (x *Item) ProtoReflect() protoreflect.Message {
mi := &file_federation_federation_proto_msgTypes[5]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Item.ProtoReflect.Descriptor instead.
func (*Item) Descriptor() ([]byte, []int) {
return file_federation_federation_proto_rawDescGZIP(), []int{5}
}
func (x *Item) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *Item) GetType() Item_ItemType {
if x != nil {
return x.Type
}
return Item_ITEM_TYPE_UNSPECIFIED
}
func (x *Item) GetValue() int64 {
if x != nil {
return x.Value
}
return 0
}
func (x *Item) GetLocation() *Item_Location {
if x != nil {
return x.Location
}
return nil
}
type A_B struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Foo *A_B_C `protobuf:"bytes,1,opt,name=foo,proto3" json:"foo,omitempty"`
Bar *A_B_C `protobuf:"bytes,2,opt,name=bar,proto3" json:"bar,omitempty"`
}
func (x *A_B) Reset() {
*x = A_B{}
if protoimpl.UnsafeEnabled {
mi := &file_federation_federation_proto_msgTypes[8]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *A_B) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*A_B) ProtoMessage() {}
func (x *A_B) ProtoReflect() protoreflect.Message {
mi := &file_federation_federation_proto_msgTypes[8]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use A_B.ProtoReflect.Descriptor instead.
func (*A_B) Descriptor() ([]byte, []int) {
return file_federation_federation_proto_rawDescGZIP(), []int{2, 0}
}
func (x *A_B) GetFoo() *A_B_C {
if x != nil {
return x.Foo
}
return nil
}
func (x *A_B) GetBar() *A_B_C {
if x != nil {
return x.Bar
}
return nil
}
type A_B_C struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"`
}
func (x *A_B_C) Reset() {
*x = A_B_C{}
if protoimpl.UnsafeEnabled {
mi := &file_federation_federation_proto_msgTypes[9]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *A_B_C) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*A_B_C) ProtoMessage() {}
func (x *A_B_C) ProtoReflect() protoreflect.Message {
mi := &file_federation_federation_proto_msgTypes[9]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use A_B_C.ProtoReflect.Descriptor instead.
func (*A_B_C) Descriptor() ([]byte, []int) {
return file_federation_federation_proto_rawDescGZIP(), []int{2, 0, 0}
}
func (x *A_B_C) GetType() string {
if x != nil {
return x.Type
}
return ""
}
type User_AttrA struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Foo string `protobuf:"bytes,1,opt,name=foo,proto3" json:"foo,omitempty"`
}
func (x *User_AttrA) Reset() {
*x = User_AttrA{}
if protoimpl.UnsafeEnabled {
mi := &file_federation_federation_proto_msgTypes[11]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *User_AttrA) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*User_AttrA) ProtoMessage() {}
func (x *User_AttrA) ProtoReflect() protoreflect.Message {
mi := &file_federation_federation_proto_msgTypes[11]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use User_AttrA.ProtoReflect.Descriptor instead.
func (*User_AttrA) Descriptor() ([]byte, []int) {
return file_federation_federation_proto_rawDescGZIP(), []int{4, 1}
}
func (x *User_AttrA) GetFoo() string {
if x != nil {
return x.Foo
}
return ""
}
type User_AttrB struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Bar bool `protobuf:"varint,2,opt,name=bar,proto3" json:"bar,omitempty"`
}
func (x *User_AttrB) Reset() {
*x = User_AttrB{}
if protoimpl.UnsafeEnabled {
mi := &file_federation_federation_proto_msgTypes[12]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *User_AttrB) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*User_AttrB) ProtoMessage() {}
func (x *User_AttrB) ProtoReflect() protoreflect.Message {
mi := &file_federation_federation_proto_msgTypes[12]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use User_AttrB.ProtoReflect.Descriptor instead.
func (*User_AttrB) Descriptor() ([]byte, []int) {
return file_federation_federation_proto_rawDescGZIP(), []int{4, 2}
}
func (x *User_AttrB) GetBar() bool {
if x != nil {
return x.Bar
}
return false
}
type Item_Location struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Addr1 string `protobuf:"bytes,1,opt,name=addr1,proto3" json:"addr1,omitempty"`
Addr2 string `protobuf:"bytes,2,opt,name=addr2,proto3" json:"addr2,omitempty"`
// Types that are assignable to Addr3:
//
// *Item_Location_AddrA_
// *Item_Location_B
// *Item_Location_C
Addr3 isItem_Location_Addr3 `protobuf_oneof:"addr3"`
}
func (x *Item_Location) Reset() {
*x = Item_Location{}
if protoimpl.UnsafeEnabled {
mi := &file_federation_federation_proto_msgTypes[13]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Item_Location) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Item_Location) ProtoMessage() {}
func (x *Item_Location) ProtoReflect() protoreflect.Message {
mi := &file_federation_federation_proto_msgTypes[13]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Item_Location.ProtoReflect.Descriptor instead.
func (*Item_Location) Descriptor() ([]byte, []int) {
return file_federation_federation_proto_rawDescGZIP(), []int{5, 0}
}
func (x *Item_Location) GetAddr1() string {
if x != nil {
return x.Addr1
}
return ""
}
func (x *Item_Location) GetAddr2() string {
if x != nil {
return x.Addr2
}
return ""
}
func (m *Item_Location) GetAddr3() isItem_Location_Addr3 {
if m != nil {
return m.Addr3
}
return nil
}
func (x *Item_Location) GetAddrA() *Item_Location_AddrA {
if x, ok := x.GetAddr3().(*Item_Location_AddrA_); ok {
return x.AddrA
}
return nil
}
func (x *Item_Location) GetB() *Item_Location_AddrB {
if x, ok := x.GetAddr3().(*Item_Location_B); ok {
return x.B
}
return nil
}
func (x *Item_Location) GetC() string {
if x, ok := x.GetAddr3().(*Item_Location_C); ok {
return x.C
}
return ""
}
type isItem_Location_Addr3 interface {
isItem_Location_Addr3()
}
type Item_Location_AddrA_ struct {
AddrA *Item_Location_AddrA `protobuf:"bytes,3,opt,name=addr_a,json=addrA,proto3,oneof"`
}
type Item_Location_B struct {
B *Item_Location_AddrB `protobuf:"bytes,4,opt,name=b,proto3,oneof"`
}
type Item_Location_C struct {
C string `protobuf:"bytes,5,opt,name=c,proto3,oneof"`
}
func (*Item_Location_AddrA_) isItem_Location_Addr3() {}
func (*Item_Location_B) isItem_Location_Addr3() {}
func (*Item_Location_C) isItem_Location_Addr3() {}
type Item_Location_AddrA struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Foo string `protobuf:"bytes,1,opt,name=foo,proto3" json:"foo,omitempty"`
}
func (x *Item_Location_AddrA) Reset() {
*x = Item_Location_AddrA{}
if protoimpl.UnsafeEnabled {
mi := &file_federation_federation_proto_msgTypes[14]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Item_Location_AddrA) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Item_Location_AddrA) ProtoMessage() {}
func (x *Item_Location_AddrA) ProtoReflect() protoreflect.Message {
mi := &file_federation_federation_proto_msgTypes[14]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Item_Location_AddrA.ProtoReflect.Descriptor instead.
func (*Item_Location_AddrA) Descriptor() ([]byte, []int) {
return file_federation_federation_proto_rawDescGZIP(), []int{5, 0, 0}
}
func (x *Item_Location_AddrA) GetFoo() string {
if x != nil {
return x.Foo
}
return ""
}
type Item_Location_AddrB struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Bar int64 `protobuf:"varint,1,opt,name=bar,proto3" json:"bar,omitempty"`
}
func (x *Item_Location_AddrB) Reset() {
*x = Item_Location_AddrB{}
if protoimpl.UnsafeEnabled {
mi := &file_federation_federation_proto_msgTypes[15]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Item_Location_AddrB) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Item_Location_AddrB) ProtoMessage() {}
func (x *Item_Location_AddrB) ProtoReflect() protoreflect.Message {
mi := &file_federation_federation_proto_msgTypes[15]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Item_Location_AddrB.ProtoReflect.Descriptor instead.
func (*Item_Location_AddrB) Descriptor() ([]byte, []int) {
return file_federation_federation_proto_rawDescGZIP(), []int{5, 0, 1}
}
func (x *Item_Location_AddrB) GetBar() int64 {
if x != nil {
return x.Bar
}
return 0
}
var File_federation_federation_proto protoreflect.FileDescriptor
var file_federation_federation_proto_rawDesc = []byte{
0x0a, 0x1b, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x66, 0x65, 0x64,
0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0a, 0x66,
0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c,
0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6e, 0x79, 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, 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, 0x20, 0x67, 0x72, 0x70, 0x63, 0x2f, 0x66, 0x65, 0x64, 0x65,
0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f,
0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x20, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x50, 0x6f,
0x73, 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, 0xd8, 0x31, 0x0a, 0x0f, 0x47, 0x65,
0x74, 0x50, 0x6f, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2f, 0x0a,
0x04, 0x70, 0x6f, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x66, 0x65,
0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x50, 0x6f, 0x73, 0x74, 0x42, 0x09, 0x9a,
0x4a, 0x06, 0x12, 0x04, 0x70, 0x6f, 0x73, 0x74, 0x52, 0x04, 0x70, 0x6f, 0x73, 0x74, 0x12, 0x1e,
0x0a, 0x03, 0x73, 0x74, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0c, 0x9a, 0x4a, 0x09,
0x12, 0x07, 0x27, 0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x27, 0x52, 0x03, 0x73, 0x74, 0x72, 0x12, 0x26,
0x0a, 0x04, 0x75, 0x75, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x12, 0x9a, 0x4a,
0x0f, 0x12, 0x0d, 0x75, 0x75, 0x69, 0x64, 0x2e, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x28, 0x29,
0x52, 0x04, 0x75, 0x75, 0x69, 0x64, 0x12, 0x23, 0x0a, 0x03, 0x6c, 0x6f, 0x63, 0x18, 0x04, 0x20,
0x01, 0x28, 0x09, 0x42, 0x11, 0x9a, 0x4a, 0x0e, 0x12, 0x0c, 0x6c, 0x6f, 0x63, 0x2e, 0x73, 0x74,
0x72, 0x69, 0x6e, 0x67, 0x28, 0x29, 0x52, 0x03, 0x6c, 0x6f, 0x63, 0x12, 0x23, 0x0a, 0x06, 0x76,
0x61, 0x6c, 0x75, 0x65, 0x31, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0b, 0x9a, 0x4a, 0x08,
0x12, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x31, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x31,
0x12, 0x58, 0x0a, 0x0e, 0x69, 0x74, 0x65, 0x6d, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x6e, 0x61,
0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x42, 0x32, 0x9a, 0x4a, 0x2f, 0x12, 0x2d, 0x49,
0x74, 0x65, 0x6d, 0x2e, 0x49, 0x74, 0x65, 0x6d, 0x54, 0x79, 0x70, 0x65, 0x2e, 0x6e, 0x61, 0x6d,
0x65, 0x28, 0x49, 0x74, 0x65, 0x6d, 0x2e, 0x49, 0x74, 0x65, 0x6d, 0x54, 0x79, 0x70, 0x65, 0x2e,
0x49, 0x54, 0x45, 0x4d, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x31, 0x29, 0x52, 0x0c, 0x69, 0x74,
0x65, 0x6d, 0x54, 0x79, 0x70, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x7e, 0x0a, 0x12, 0x6c, 0x6f,
0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65,
0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x42, 0x50, 0x9a, 0x4a, 0x4d, 0x12, 0x4b, 0x49, 0x74, 0x65,
0x6d, 0x2e, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x4c, 0x6f, 0x63, 0x61, 0x74,
0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x28, 0x49, 0x74, 0x65,
0x6d, 0x2e, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x4c, 0x6f, 0x63, 0x61, 0x74,
0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x2e, 0x4c, 0x4f, 0x43, 0x41, 0x54, 0x49, 0x4f, 0x4e,
0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x31, 0x29, 0x52, 0x10, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69,
0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x6b, 0x0a, 0x13, 0x75, 0x73,
0x65, 0x72, 0x5f, 0x69, 0x74, 0x65, 0x6d, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x6e, 0x61, 0x6d,
0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x42, 0x3c, 0x9a, 0x4a, 0x39, 0x12, 0x37, 0x75, 0x73,
0x65, 0x72, 0x2e, 0x49, 0x74, 0x65, 0x6d, 0x2e, 0x49, 0x74, 0x65, 0x6d, 0x54, 0x79, 0x70, 0x65,
0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x28, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x49, 0x74, 0x65, 0x6d, 0x2e,
0x49, 0x74, 0x65, 0x6d, 0x54, 0x79, 0x70, 0x65, 0x2e, 0x49, 0x54, 0x45, 0x4d, 0x5f, 0x54, 0x59,
0x50, 0x45, 0x5f, 0x32, 0x29, 0x52, 0x10, 0x75, 0x73, 0x65, 0x72, 0x49, 0x74, 0x65, 0x6d, 0x54,
0x79, 0x70, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x78, 0x0a, 0x14, 0x69, 0x74, 0x65, 0x6d, 0x5f,
0x74, 0x79, 0x70, 0x65, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x5f, 0x65, 0x6e, 0x75, 0x6d, 0x18,
0x09, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x19, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69,
0x6f, 0x6e, 0x2e, 0x49, 0x74, 0x65, 0x6d, 0x2e, 0x49, 0x74, 0x65, 0x6d, 0x54, 0x79, 0x70, 0x65,
0x42, 0x2c, 0x9a, 0x4a, 0x29, 0x12, 0x27, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x49, 0x74, 0x65, 0x6d,
0x2e, 0x49, 0x74, 0x65, 0x6d, 0x54, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x28,
0x27, 0x49, 0x54, 0x45, 0x4d, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x31, 0x27, 0x29, 0x52, 0x11,
0x69, 0x74, 0x65, 0x6d, 0x54, 0x79, 0x70, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x45, 0x6e, 0x75,
0x6d, 0x12, 0x5b, 0x0a, 0x13, 0x69, 0x74, 0x65, 0x6d, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x76,
0x61, 0x6c, 0x75, 0x65, 0x5f, 0x69, 0x6e, 0x74, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x05, 0x42, 0x2c,
0x9a, 0x4a, 0x29, 0x12, 0x27, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x49, 0x74, 0x65, 0x6d, 0x2e, 0x49,
0x74, 0x65, 0x6d, 0x54, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x28, 0x27, 0x49,
0x54, 0x45, 0x4d, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x31, 0x27, 0x29, 0x52, 0x10, 0x69, 0x74,
0x65, 0x6d, 0x54, 0x79, 0x70, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x49, 0x6e, 0x74, 0x12, 0x6b,
0x0a, 0x14, 0x69, 0x74, 0x65, 0x6d, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x76, 0x61, 0x6c, 0x75,
0x65, 0x5f, 0x63, 0x61, 0x73, 0x74, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x19, 0x2e, 0x66,
0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x49, 0x74, 0x65, 0x6d, 0x2e, 0x49,
0x74, 0x65, 0x6d, 0x54, 0x79, 0x70, 0x65, 0x42, 0x1f, 0x9a, 0x4a, 0x1c, 0x12, 0x1a, 0x75, 0x73,
0x65, 0x72, 0x2e, 0x49, 0x74, 0x65, 0x6d, 0x2e, 0x49, 0x74, 0x65, 0x6d, 0x54, 0x79, 0x70, 0x65,
0x2e, 0x66, 0x72, 0x6f, 0x6d, 0x28, 0x31, 0x29, 0x52, 0x11, 0x69, 0x74, 0x65, 0x6d, 0x54, 0x79,
0x70, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x43, 0x61, 0x73, 0x74, 0x12, 0x68, 0x0a, 0x13, 0x6c,
0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x76, 0x61, 0x6c,
0x75, 0x65, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x05, 0x42, 0x38, 0x9a, 0x4a, 0x35, 0x12, 0x33, 0x49,
0x74, 0x65, 0x6d, 0x2e, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x4c, 0x6f, 0x63,
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x28,
0x27, 0x4c, 0x4f, 0x43, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x31,
0x27, 0x29, 0x52, 0x11, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65,
0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x5d, 0x0a, 0x14, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x74,
0x65, 0x6d, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x0d, 0x20,
0x01, 0x28, 0x05, 0x42, 0x2c, 0x9a, 0x4a, 0x29, 0x12, 0x27, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x49,
0x74, 0x65, 0x6d, 0x2e, 0x49, 0x74, 0x65, 0x6d, 0x54, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x61, 0x6c,
0x75, 0x65, 0x28, 0x27, 0x49, 0x54, 0x45, 0x4d, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x32, 0x27,
0x29, 0x52, 0x11, 0x75, 0x73, 0x65, 0x72, 0x49, 0x74, 0x65, 0x6d, 0x54, 0x79, 0x70, 0x65, 0x56,
0x61, 0x6c, 0x75, 0x65, 0x12, 0x23, 0x0a, 0x01, 0x61, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0b, 0x32,
0x0d, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x41, 0x42, 0x06,
0x9a, 0x4a, 0x03, 0x12, 0x01, 0x61, 0x52, 0x01, 0x61, 0x12, 0x37, 0x0a, 0x0d, 0x73, 0x6f, 0x72,
0x74, 0x65, 0x64, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x0f, 0x20, 0x03, 0x28, 0x05,
0x42, 0x12, 0x9a, 0x4a, 0x0f, 0x12, 0x0d, 0x73, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x5f, 0x76, 0x61,
0x6c, 0x75, 0x65, 0x73, 0x52, 0x0c, 0x73, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x56, 0x61, 0x6c, 0x75,
0x65, 0x73, 0x12, 0x46, 0x0a, 0x0c, 0x73, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x5f, 0x69, 0x74, 0x65,
0x6d, 0x73, 0x18, 0x10, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72,
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x49, 0x74, 0x65, 0x6d, 0x42, 0x11, 0x9a, 0x4a, 0x0e, 0x12,
0x0c, 0x73, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x5f, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x52, 0x0b, 0x73,
0x6f, 0x72, 0x74, 0x65, 0x64, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x12, 0x56, 0x0a, 0x09, 0x6d, 0x61,
0x70, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x11, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x29, 0x2e,
0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x6f,
0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x4d, 0x61, 0x70, 0x56, 0x61,
0x6c, 0x75, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x42, 0x0e, 0x9a, 0x4a, 0x0b, 0x12, 0x09, 0x6d,
0x61, 0x70, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x08, 0x6d, 0x61, 0x70, 0x56, 0x61, 0x6c,
0x75, 0x65, 0x12, 0x7d, 0x0a, 0x14, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x5f, 0x77, 0x72, 0x61,
0x70, 0x70, 0x65, 0x72, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x12, 0x20, 0x01, 0x28, 0x0b,
0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62,
0x75, 0x66, 0x2e, 0x44, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x2d,
0x9a, 0x4a, 0x2a, 0x12, 0x28, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65,
0x7b, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x20, 0x31, 0x2e, 0x32, 0x33, 0x7d, 0x52, 0x12, 0x64,
0x6f, 0x75, 0x62, 0x6c, 0x65, 0x57, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x56, 0x61, 0x6c, 0x75,
0x65, 0x12, 0x79, 0x0a, 0x13, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x5f, 0x77, 0x72, 0x61, 0x70, 0x70,
0x65, 0x72, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x13, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b,
0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66,
0x2e, 0x46, 0x6c, 0x6f, 0x61, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x2c, 0x9a, 0x4a, 0x29,
0x12, 0x27, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75,
0x66, 0x2e, 0x46, 0x6c, 0x6f, 0x61, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x7b, 0x76, 0x61, 0x6c,
0x75, 0x65, 0x3a, 0x20, 0x33, 0x2e, 0x34, 0x35, 0x7d, 0x52, 0x11, 0x66, 0x6c, 0x6f, 0x61, 0x74,
0x57, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x72, 0x0a, 0x11,
0x69, 0x36, 0x34, 0x5f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x5f, 0x76, 0x61, 0x6c, 0x75,
0x65, 0x18, 0x14, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x49, 0x6e, 0x74, 0x36, 0x34, 0x56,
0x61, 0x6c, 0x75, 0x65, 0x42, 0x29, 0x9a, 0x4a, 0x26, 0x12, 0x24, 0x67, 0x6f, 0x6f, 0x67, 0x6c,
0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x49, 0x6e, 0x74, 0x36, 0x34,
0x56, 0x61, 0x6c, 0x75, 0x65, 0x7b, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x20, 0x31, 0x7d, 0x52,
0x0f, 0x69, 0x36, 0x34, 0x57, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65,
0x12, 0x7a, 0x0a, 0x11, 0x75, 0x36, 0x34, 0x5f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x5f,
0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x15, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f,
0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49,
0x6e, 0x74, 0x36, 0x34, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x30, 0x9a, 0x4a, 0x2d, 0x12, 0x2b,
0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e,
0x55, 0x49, 0x6e, 0x74, 0x36, 0x34, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x7b, 0x76, 0x61, 0x6c, 0x75,
0x65, 0x3a, 0x20, 0x75, 0x69, 0x6e, 0x74, 0x28, 0x32, 0x29, 0x7d, 0x52, 0x0f, 0x75, 0x36, 0x34,
0x57, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x72, 0x0a, 0x11,
0x69, 0x33, 0x32, 0x5f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x5f, 0x76, 0x61, 0x6c, 0x75,
0x65, 0x18, 0x16, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56,
0x61, 0x6c, 0x75, 0x65, 0x42, 0x29, 0x9a, 0x4a, 0x26, 0x12, 0x24, 0x67, 0x6f, 0x6f, 0x67, 0x6c,
0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x49, 0x6e, 0x74, 0x33, 0x32,
0x56, 0x61, 0x6c, 0x75, 0x65, 0x7b, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x20, 0x33, 0x7d, 0x52,
0x0f, 0x69, 0x33, 0x32, 0x57, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65,
0x12, 0x7a, 0x0a, 0x11, 0x75, 0x33, 0x32, 0x5f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x5f,
0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x17, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f,
0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49,
0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x30, 0x9a, 0x4a, 0x2d, 0x12, 0x2b,
0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e,
0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x7b, 0x76, 0x61, 0x6c, 0x75,
0x65, 0x3a, 0x20, 0x75, 0x69, 0x6e, 0x74, 0x28, 0x34, 0x29, 0x7d, 0x52, 0x0f, 0x75, 0x33, 0x32,
0x57, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x75, 0x0a, 0x12,
0x62, 0x6f, 0x6f, 0x6c, 0x5f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x5f, 0x76, 0x61, 0x6c,
0x75, 0x65, 0x18, 0x18, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c,
0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56,
0x61, 0x6c, 0x75, 0x65, 0x42, 0x2b, 0x9a, 0x4a, 0x28, 0x12, 0x26, 0x67, 0x6f, 0x6f, 0x67, 0x6c,
0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56,
0x61, 0x6c, 0x75, 0x65, 0x7b, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x20, 0x74, 0x72, 0x75, 0x65,
0x7d, 0x52, 0x10, 0x62, 0x6f, 0x6f, 0x6c, 0x57, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x56, 0x61,
0x6c, 0x75, 0x65, 0x12, 0x80, 0x01, 0x0a, 0x14, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x77,
0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x19, 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, 0x30, 0x9a, 0x4a, 0x2d, 0x12, 0x2b, 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, 0x7b, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x20, 0x27, 0x68, 0x65, 0x6c, 0x6c, 0x6f,
0x27, 0x7d, 0x52, 0x12, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x57, 0x72, 0x61, 0x70, 0x70, 0x65,
0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x83, 0x01, 0x0a, 0x13, 0x62, 0x79, 0x74, 0x65, 0x73,
0x5f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x1a,
0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, 0x79, 0x74, 0x65, 0x73, 0x56, 0x61, 0x6c, 0x75,
0x65, 0x42, 0x36, 0x9a, 0x4a, 0x33, 0x12, 0x31, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70,
0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, 0x79, 0x74, 0x65, 0x73, 0x56, 0x61, 0x6c,
0x75, 0x65, 0x7b, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x20, 0x62, 0x79, 0x74, 0x65, 0x73, 0x28,
0x27, 0x77, 0x6f, 0x72, 0x6c, 0x64, 0x27, 0x29, 0x7d, 0x52, 0x11, 0x62, 0x79, 0x74, 0x65, 0x73,
0x57, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x29, 0x0a, 0x05,
0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x18, 0x1b, 0x20, 0x01, 0x28, 0x09, 0x42, 0x13, 0x9a, 0x4a, 0x10,
0x12, 0x0e, 0x27, 0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x5c, 0x6e, 0x77, 0x6f, 0x72, 0x6c, 0x64, 0x27,
0x52, 0x05, 0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x12, 0x4c, 0x0a, 0x0e, 0x6e, 0x75, 0x6c, 0x6c, 0x5f,
0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x1c, 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, 0x42, 0x09, 0x9a, 0x4a, 0x06,
0x12, 0x04, 0x6e, 0x75, 0x6c, 0x6c, 0x52, 0x0d, 0x6e, 0x75, 0x6c, 0x6c, 0x54, 0x69, 0x6d, 0x65,
0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x54, 0x0a, 0x0f, 0x6e, 0x75, 0x6c, 0x6c, 0x5f, 0x74, 0x69,
0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x32, 0x18, 0x1d, 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, 0x42, 0x0f, 0x9a, 0x4a, 0x0c, 0x12,
0x0a, 0x6e, 0x75, 0x6c, 0x6c, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0e, 0x6e, 0x75, 0x6c,
0x6c, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x32, 0x12, 0x73, 0x0a, 0x0f, 0x6e,
0x75, 0x6c, 0x6c, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x33, 0x18, 0x1e,
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,
0x42, 0x2e, 0x9a, 0x4a, 0x2b, 0x12, 0x29, 0x74, 0x72, 0x75, 0x65, 0x20, 0x3f, 0x20, 0x6e, 0x75,
0x6c, 0x6c, 0x20, 0x3a, 0x20, 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, 0x7b, 0x7d,
0x52, 0x0e, 0x6e, 0x75, 0x6c, 0x6c, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x33,
0x12, 0x37, 0x0a, 0x06, 0x6a, 0x70, 0x5f, 0x6c, 0x6f, 0x63, 0x18, 0x1f, 0x20, 0x01, 0x28, 0x09,
0x42, 0x20, 0x9a, 0x4a, 0x1d, 0x12, 0x1b, 0x6a, 0x70, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x6c,
0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x29, 0x2e, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67,
0x28, 0x29, 0x52, 0x05, 0x6a, 0x70, 0x4c, 0x6f, 0x63, 0x12, 0x34, 0x0a, 0x0c, 0x73, 0x74, 0x72,
0x69, 0x6e, 0x67, 0x73, 0x5f, 0x6a, 0x6f, 0x69, 0x6e, 0x18, 0x20, 0x20, 0x01, 0x28, 0x09, 0x42,
0x11, 0x9a, 0x4a, 0x0e, 0x12, 0x0c, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x73, 0x5f, 0x6a, 0x6f,
0x69, 0x6e, 0x52, 0x0b, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x73, 0x4a, 0x6f, 0x69, 0x6e, 0x12,
0x31, 0x0a, 0x0b, 0x70, 0x61, 0x72, 0x73, 0x65, 0x5f, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x18, 0x21,
0x20, 0x01, 0x28, 0x01, 0x42, 0x10, 0x9a, 0x4a, 0x0d, 0x12, 0x0b, 0x70, 0x61, 0x72, 0x73, 0x65,
0x5f, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x52, 0x0a, 0x70, 0x61, 0x72, 0x73, 0x65, 0x46, 0x6c, 0x6f,
0x61, 0x74, 0x12, 0x42, 0x0a, 0x0d, 0x75, 0x72, 0x6c, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x6e,
0x61, 0x6d, 0x65, 0x18, 0x22, 0x20, 0x01, 0x28, 0x09, 0x42, 0x1e, 0x9a, 0x4a, 0x1b, 0x12, 0x19,
0x75, 0x72, 0x6c, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x69, 0x6e, 0x66, 0x6f, 0x28, 0x29, 0x2e, 0x75,
0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x28, 0x29, 0x52, 0x0b, 0x75, 0x72, 0x6c, 0x55, 0x73,
0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x40, 0x0a, 0x0a, 0x65, 0x6e, 0x75, 0x6d, 0x5f, 0x76,
0x61, 0x6c, 0x75, 0x65, 0x18, 0x23, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x19, 0x2e, 0x66, 0x65, 0x64,
0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x49, 0x74, 0x65, 0x6d, 0x2e, 0x49, 0x74, 0x65,
0x6d, 0x54, 0x79, 0x70, 0x65, 0x42, 0x06, 0x9a, 0x4a, 0x03, 0x12, 0x01, 0x65, 0x52, 0x09, 0x65,
0x6e, 0x75, 0x6d, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x46, 0x0a, 0x0e, 0x65, 0x6e, 0x75, 0x6d,
0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x5f, 0x73, 0x74, 0x72, 0x18, 0x24, 0x20, 0x01, 0x28, 0x09,
0x42, 0x20, 0x9a, 0x4a, 0x1d, 0x12, 0x1b, 0x49, 0x74, 0x65, 0x6d, 0x2e, 0x49, 0x74, 0x65, 0x6d,
0x54, 0x79, 0x70, 0x65, 0x2e, 0x61, 0x74, 0x74, 0x72, 0x28, 0x65, 0x2c, 0x20, 0x27, 0x65, 0x6e,
0x27, 0x29, 0x52, 0x0c, 0x65, 0x6e, 0x75, 0x6d, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x53, 0x74, 0x72,
0x12, 0x31, 0x0a, 0x0b, 0x73, 0x71, 0x72, 0x74, 0x5f, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x18,
0x25, 0x20, 0x01, 0x28, 0x01, 0x42, 0x10, 0x9a, 0x4a, 0x0d, 0x12, 0x0b, 0x73, 0x71, 0x72, 0x74,
0x5f, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x52, 0x0a, 0x73, 0x71, 0x72, 0x74, 0x44, 0x6f, 0x75,
0x62, 0x6c, 0x65, 0x12, 0x28, 0x0a, 0x08, 0x73, 0x71, 0x72, 0x74, 0x5f, 0x69, 0x6e, 0x74, 0x18,
0x26, 0x20, 0x01, 0x28, 0x01, 0x42, 0x0d, 0x9a, 0x4a, 0x0a, 0x12, 0x08, 0x73, 0x71, 0x72, 0x74,
0x5f, 0x69, 0x6e, 0x74, 0x52, 0x07, 0x73, 0x71, 0x72, 0x74, 0x49, 0x6e, 0x74, 0x12, 0x1a, 0x0a,
0x03, 0x70, 0x6f, 0x77, 0x18, 0x27, 0x20, 0x01, 0x28, 0x01, 0x42, 0x08, 0x9a, 0x4a, 0x05, 0x12,
0x03, 0x70, 0x6f, 0x77, 0x52, 0x03, 0x70, 0x6f, 0x77, 0x12, 0x20, 0x0a, 0x05, 0x66, 0x6c, 0x6f,
0x6f, 0x72, 0x18, 0x28, 0x20, 0x01, 0x28, 0x01, 0x42, 0x0a, 0x9a, 0x4a, 0x07, 0x12, 0x05, 0x66,
0x6c, 0x6f, 0x6f, 0x72, 0x52, 0x05, 0x66, 0x6c, 0x6f, 0x6f, 0x72, 0x12, 0x26, 0x0a, 0x07, 0x66,
0x6c, 0x61, 0x74, 0x74, 0x65, 0x6e, 0x18, 0x29, 0x20, 0x03, 0x28, 0x03, 0x42, 0x0c, 0x9a, 0x4a,
0x09, 0x12, 0x07, 0x66, 0x6c, 0x61, 0x74, 0x74, 0x65, 0x6e, 0x52, 0x07, 0x66, 0x6c, 0x61, 0x74,
0x74, 0x65, 0x6e, 0x12, 0x20, 0x0a, 0x05, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x18, 0x2a, 0x20, 0x01,
0x28, 0x01, 0x42, 0x0a, 0x9a, 0x4a, 0x07, 0x12, 0x05, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x52, 0x05,
0x72, 0x6f, 0x75, 0x6e, 0x64, 0x12, 0x30, 0x0a, 0x03, 0x61, 0x6e, 0x79, 0x18, 0x2b, 0x20, 0x01,
0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x42, 0x08, 0x9a, 0x4a, 0x05, 0x12, 0x03, 0x61,
0x6e, 0x79, 0x52, 0x03, 0x61, 0x6e, 0x79, 0x12, 0x29, 0x0a, 0x08, 0x72, 0x65, 0x70, 0x6c, 0x61,
0x63, 0x65, 0x64, 0x18, 0x2c, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0d, 0x9a, 0x4a, 0x0a, 0x12, 0x08,
0x72, 0x65, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x64, 0x52, 0x08, 0x72, 0x65, 0x70, 0x6c, 0x61, 0x63,
0x65, 0x64, 0x12, 0x5c, 0x0a, 0x0b, 0x6c, 0x69, 0x73, 0x74, 0x5f, 0x74, 0x6f, 0x5f, 0x6d, 0x61,
0x70, 0x18, 0x2d, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61,
0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x6f, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70,
0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x6f, 0x4d, 0x61, 0x70, 0x45, 0x6e,
0x74, 0x72, 0x79, 0x42, 0x10, 0x9a, 0x4a, 0x0d, 0x12, 0x0b, 0x6c, 0x69, 0x73, 0x74, 0x5f, 0x74,
0x6f, 0x5f, 0x6d, 0x61, 0x70, 0x52, 0x09, 0x6c, 0x69, 0x73, 0x74, 0x54, 0x6f, 0x4d, 0x61, 0x70,
0x12, 0x37, 0x0a, 0x0a, 0x75, 0x75, 0x69, 0x64, 0x5f, 0x70, 0x61, 0x72, 0x73, 0x65, 0x18, 0x2e,
0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0x9a, 0x4a, 0x15, 0x12, 0x13, 0x75, 0x75, 0x69, 0x64, 0x5f,
0x70, 0x61, 0x72, 0x73, 0x65, 0x2e, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x28, 0x29, 0x52, 0x09,
0x75, 0x75, 0x69, 0x64, 0x50, 0x61, 0x72, 0x73, 0x65, 0x12, 0x37, 0x0a, 0x0d, 0x75, 0x75, 0x69,
0x64, 0x5f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x18, 0x2f, 0x20, 0x01, 0x28, 0x08,
0x42, 0x12, 0x9a, 0x4a, 0x0f, 0x12, 0x0d, 0x75, 0x75, 0x69, 0x64, 0x5f, 0x76, 0x61, 0x6c, 0x69,
0x64, 0x61, 0x74, 0x65, 0x52, 0x0c, 0x75, 0x75, 0x69, 0x64, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61,
0x74, 0x65, 0x12, 0x2f, 0x0a, 0x07, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x18, 0x30, 0x20,
0x01, 0x28, 0x09, 0x42, 0x15, 0x9a, 0x4a, 0x12, 0x12, 0x10, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c,
0x65, 0x2e, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x28, 0x29, 0x52, 0x07, 0x63, 0x6f, 0x6d, 0x70,
0x69, 0x6c, 0x65, 0x12, 0x3d, 0x0a, 0x0c, 0x6d, 0x75, 0x73, 0x74, 0x5f, 0x63, 0x6f, 0x6d, 0x70,
0x69, 0x6c, 0x65, 0x18, 0x31, 0x20, 0x01, 0x28, 0x09, 0x42, 0x1a, 0x9a, 0x4a, 0x17, 0x12, 0x15,
0x6d, 0x75, 0x73, 0x74, 0x5f, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x72,
0x69, 0x6e, 0x67, 0x28, 0x29, 0x52, 0x0b, 0x6d, 0x75, 0x73, 0x74, 0x43, 0x6f, 0x6d, 0x70, 0x69,
0x6c, 0x65, 0x12, 0x2e, 0x0a, 0x0a, 0x71, 0x75, 0x6f, 0x74, 0x65, 0x5f, 0x6d, 0x65, 0x74, 0x61,
0x18, 0x32, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0f, 0x9a, 0x4a, 0x0c, 0x12, 0x0a, 0x71, 0x75, 0x6f,
0x74, 0x65, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x52, 0x09, 0x71, 0x75, 0x6f, 0x74, 0x65, 0x4d, 0x65,
0x74, 0x61, 0x12, 0x4b, 0x0a, 0x14, 0x66, 0x69, 0x6e, 0x64, 0x5f, 0x73, 0x74, 0x72, 0x69, 0x6e,
0x67, 0x5f, 0x73, 0x75, 0x62, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x33, 0x20, 0x03, 0x28, 0x09,
0x42, 0x19, 0x9a, 0x4a, 0x16, 0x12, 0x14, 0x66, 0x69, 0x6e, 0x64, 0x5f, 0x73, 0x74, 0x72, 0x69,
0x6e, 0x67, 0x5f, 0x73, 0x75, 0x62, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x52, 0x12, 0x66, 0x69, 0x6e,
0x64, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x53, 0x75, 0x62, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x12,
0x34, 0x0a, 0x0c, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x5f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x18,
0x34, 0x20, 0x01, 0x28, 0x08, 0x42, 0x11, 0x9a, 0x4a, 0x0e, 0x12, 0x0c, 0x6d, 0x61, 0x74, 0x63,
0x68, 0x5f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x0b, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x53,
0x74, 0x72, 0x69, 0x6e, 0x67, 0x12, 0x45, 0x0a, 0x12, 0x72, 0x65, 0x70, 0x6c, 0x61, 0x63, 0x65,
0x5f, 0x61, 0x6c, 0x6c, 0x5f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x18, 0x35, 0x20, 0x01, 0x28,
0x09, 0x42, 0x17, 0x9a, 0x4a, 0x14, 0x12, 0x12, 0x72, 0x65, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x5f,
0x61, 0x6c, 0x6c, 0x5f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x10, 0x72, 0x65, 0x70, 0x6c,
0x61, 0x63, 0x65, 0x41, 0x6c, 0x6c, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x1a, 0x3b, 0x0a, 0x0d,
0x4d, 0x61, 0x70, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a,
0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 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, 0x3c, 0x0a, 0x0e, 0x4c, 0x69, 0x73,
0x74, 0x54, 0x6f, 0x4d, 0x61, 0x70, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b,
0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a,
0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x76, 0x61,
0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x3a, 0xaa, 0x11, 0x9a, 0x4a, 0xa6, 0x11, 0x0a, 0x1a,
0x0a, 0x04, 0x70, 0x6f, 0x73, 0x74, 0x6a, 0x12, 0x0a, 0x04, 0x50, 0x6f, 0x73, 0x74, 0x12, 0x0a,
0x0a, 0x02, 0x69, 0x64, 0x12, 0x04, 0x24, 0x2e, 0x69, 0x64, 0x0a, 0x53, 0x0a, 0x0c, 0x73, 0x74,
0x72, 0x69, 0x6e, 0x67, 0x73, 0x5f, 0x6a, 0x6f, 0x69, 0x6e, 0x5a, 0x43, 0x67, 0x72, 0x70, 0x63,
0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x73, 0x74, 0x72, 0x69,
0x6e, 0x67, 0x73, 0x2e, 0x6a, 0x6f, 0x69, 0x6e, 0x28, 0x5b, 0x27, 0x31, 0x32, 0x33, 0x34, 0x35,
0x36, 0x37, 0x27, 0x2e, 0x73, 0x75, 0x62, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x28, 0x31, 0x2c,
0x20, 0x33, 0x29, 0x2c, 0x20, 0x27, 0x32, 0x27, 0x5d, 0x2c, 0x20, 0x27, 0x2e, 0x27, 0x29, 0x0a,
0x43, 0x0a, 0x0b, 0x70, 0x61, 0x72, 0x73, 0x65, 0x5f, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x5a, 0x34,
0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e,
0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x70, 0x61, 0x72, 0x73, 0x65, 0x46, 0x6c, 0x6f,
0x61, 0x74, 0x28, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x73, 0x5f, 0x6a, 0x6f, 0x69, 0x6e, 0x2c,
0x20, 0x36, 0x34, 0x29, 0x0a, 0x4f, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x5a, 0x48, 0x67, 0x72, 0x70,
0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x75, 0x72, 0x6c,
0x2e, 0x70, 0x61, 0x72, 0x73, 0x65, 0x28, 0x27, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f,
0x74, 0x65, 0x73, 0x74, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x3a, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f,
0x72, 0x64, 0x40, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70,
0x61, 0x74, 0x68, 0x27, 0x29, 0x0a, 0x59, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x65, 0x5a, 0x51, 0x67,
0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x74,
0x69, 0x6d, 0x65, 0x2e, 0x64, 0x61, 0x74, 0x65, 0x28, 0x32, 0x30, 0x32, 0x33, 0x2c, 0x20, 0x31,
0x32, 0x2c, 0x20, 0x32, 0x35, 0x2c, 0x20, 0x31, 0x32, 0x2c, 0x20, 0x31, 0x30, 0x2c, 0x20, 0x35,
0x2c, 0x20, 0x30, 0x2c, 0x20, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61,
0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x55, 0x54, 0x43, 0x28, 0x29, 0x29,
0x0a, 0x3a, 0x0a, 0x0b, 0x72, 0x61, 0x6e, 0x64, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5a,
0x2b, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e,
0x2e, 0x72, 0x61, 0x6e, 0x64, 0x2e, 0x6e, 0x65, 0x77, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x28,
0x64, 0x61, 0x74, 0x65, 0x2e, 0x75, 0x6e, 0x69, 0x78, 0x28, 0x29, 0x29, 0x0a, 0x33, 0x0a, 0x0a,
0x66, 0x69, 0x78, 0x65, 0x64, 0x5f, 0x72, 0x61, 0x6e, 0x64, 0x5a, 0x25, 0x67, 0x72, 0x70, 0x63,
0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x72, 0x61, 0x6e, 0x64,
0x2e, 0x6e, 0x65, 0x77, 0x28, 0x72, 0x61, 0x6e, 0x64, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65,
0x29, 0x0a, 0x3b, 0x0a, 0x04, 0x75, 0x75, 0x69, 0x64, 0x5a, 0x33, 0x2e, 0x67, 0x72, 0x70, 0x63,
0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x75, 0x75, 0x69, 0x64,
0x2e, 0x6e, 0x65, 0x77, 0x52, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x46, 0x72, 0x6f, 0x6d, 0x52, 0x61,
0x6e, 0x64, 0x28, 0x66, 0x69, 0x78, 0x65, 0x64, 0x5f, 0x72, 0x61, 0x6e, 0x64, 0x29, 0x0a, 0x36,
0x0a, 0x03, 0x6c, 0x6f, 0x63, 0x5a, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65,
0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x6c, 0x6f, 0x61, 0x64,
0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x27, 0x41, 0x73, 0x69, 0x61, 0x2f, 0x54,
0x6f, 0x6b, 0x79, 0x6f, 0x27, 0x29, 0x0a, 0x45, 0x0a, 0x07, 0x6a, 0x70, 0x5f, 0x74, 0x69, 0x6d,
0x65, 0x5a, 0x3a, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69,
0x6f, 0x6e, 0x2e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x64, 0x61, 0x74, 0x65, 0x28, 0x32, 0x30, 0x32,
0x33, 0x2c, 0x20, 0x31, 0x32, 0x2c, 0x20, 0x32, 0x35, 0x2c, 0x20, 0x31, 0x32, 0x2c, 0x20, 0x31,
0x30, 0x2c, 0x20, 0x35, 0x2c, 0x20, 0x30, 0x2c, 0x20, 0x6c, 0x6f, 0x63, 0x29, 0x0a, 0x38, 0x0a,
0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x31, 0x5a, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65,
0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74,
0x61, 0x2e, 0x69, 0x6e, 0x63, 0x6f, 0x6d, 0x69, 0x6e, 0x67, 0x28, 0x29, 0x5b, 0x27, 0x6b, 0x65,
0x79, 0x31, 0x27, 0x5d, 0x5b, 0x30, 0x5d, 0x0a, 0x08, 0x0a, 0x01, 0x61, 0x6a, 0x03, 0x0a, 0x01,
0x41, 0x0a, 0x2b, 0x0a, 0x0d, 0x73, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x5f, 0x76, 0x61, 0x6c, 0x75,
0x65, 0x73, 0x5a, 0x1a, 0x5b, 0x34, 0x2c, 0x20, 0x31, 0x2c, 0x20, 0x33, 0x2c, 0x20, 0x32, 0x5d,
0x2e, 0x73, 0x6f, 0x72, 0x74, 0x41, 0x73, 0x63, 0x28, 0x76, 0x2c, 0x20, 0x76, 0x29, 0x0a, 0x95,
0x01, 0x0a, 0x0c, 0x73, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x5f, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x5a,
0x84, 0x01, 0x5b, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x49, 0x74, 0x65, 0x6d, 0x7b, 0x6c, 0x6f, 0x63,
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x49, 0x74, 0x65, 0x6d, 0x2e,
0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x7b, 0x61, 0x64, 0x64, 0x72, 0x31, 0x3a, 0x27,
0x61, 0x27, 0x7d, 0x7d, 0x2c, 0x20, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x49, 0x74, 0x65, 0x6d, 0x7b,
0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x49, 0x74,
0x65, 0x6d, 0x2e, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x7b, 0x61, 0x64, 0x64, 0x72,
0x31, 0x3a, 0x27, 0x62, 0x27, 0x7d, 0x7d, 0x5d, 0x2e, 0x73, 0x6f, 0x72, 0x74, 0x44, 0x65, 0x73,
0x63, 0x28, 0x76, 0x2c, 0x20, 0x76, 0x2e, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e,
0x61, 0x64, 0x64, 0x72, 0x31, 0x29, 0x0a, 0x25, 0x0a, 0x09, 0x6d, 0x61, 0x70, 0x5f, 0x76, 0x61,
0x6c, 0x75, 0x65, 0x5a, 0x18, 0x7b, 0x31, 0x3a, 0x20, 0x27, 0x61, 0x27, 0x2c, 0x20, 0x32, 0x3a,
0x20, 0x27, 0x62, 0x27, 0x2c, 0x20, 0x33, 0x3a, 0x20, 0x27, 0x63, 0x27, 0x7d, 0x0a, 0x12, 0x0a,
0x0a, 0x6e, 0x75, 0x6c, 0x6c, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x5a, 0x04, 0x6e, 0x75, 0x6c,
0x6c, 0x0a, 0x4b, 0x5a, 0x49, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61,
0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x6c, 0x6f, 0x67, 0x2e, 0x69, 0x6e, 0x66, 0x6f, 0x28, 0x27, 0x6f,
0x75, 0x74, 0x70, 0x75, 0x74, 0x20, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e,
0x20, 0x6c, 0x6f, 0x67, 0x27, 0x2c, 0x20, 0x7b, 0x27, 0x70, 0x6f, 0x73, 0x74, 0x5f, 0x6d, 0x65,
0x73, 0x73, 0x61, 0x67, 0x65, 0x27, 0x3a, 0x20, 0x70, 0x6f, 0x73, 0x74, 0x7d, 0x29, 0x0a, 0x62,
0x0a, 0x01, 0x65, 0x82, 0x01, 0x5c, 0x0a, 0x0d, 0x49, 0x74, 0x65, 0x6d, 0x2e, 0x49, 0x74, 0x65,
0x6d, 0x54, 0x79, 0x70, 0x65, 0x12, 0x4b, 0x74, 0x72, 0x75, 0x65, 0x20, 0x3f, 0x20, 0x75, 0x73,
0x65, 0x72, 0x2e, 0x49, 0x74, 0x65, 0x6d, 0x2e, 0x49, 0x74, 0x65, 0x6d, 0x54, 0x79, 0x70, 0x65,
0x2e, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x28, 0x27, 0x49, 0x54, 0x45, 0x4d, 0x5f, 0x54, 0x59, 0x50,
0x45, 0x5f, 0x32, 0x27, 0x29, 0x20, 0x3a, 0x20, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x49, 0x74, 0x65,
0x6d, 0x2e, 0x49, 0x74, 0x65, 0x6d, 0x54, 0x79, 0x70, 0x65, 0x2e, 0x66, 0x72, 0x6f, 0x6d, 0x28,
0x31, 0x29, 0x0a, 0x39, 0x0a, 0x0b, 0x73, 0x71, 0x72, 0x74, 0x5f, 0x64, 0x6f, 0x75, 0x62, 0x6c,
0x65, 0x5a, 0x2a, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69,
0x6f, 0x6e, 0x2e, 0x6d, 0x61, 0x74, 0x68, 0x2e, 0x73, 0x71, 0x72, 0x74, 0x28, 0x33, 0x2e, 0x30,
0x2a, 0x33, 0x2e, 0x30, 0x2b, 0x34, 0x2e, 0x30, 0x2a, 0x34, 0x2e, 0x30, 0x29, 0x0a, 0x2e, 0x0a,
0x08, 0x73, 0x71, 0x72, 0x74, 0x5f, 0x69, 0x6e, 0x74, 0x5a, 0x22, 0x67, 0x72, 0x70, 0x63, 0x2e,
0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x6d, 0x61, 0x74, 0x68, 0x2e,
0x73, 0x71, 0x72, 0x74, 0x28, 0x33, 0x2a, 0x33, 0x2b, 0x34, 0x2a, 0x34, 0x29, 0x0a, 0x29, 0x0a,
0x03, 0x70, 0x6f, 0x77, 0x5a, 0x22, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72,
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x6d, 0x61, 0x74, 0x68, 0x2e, 0x70, 0x6f, 0x77, 0x28, 0x32,
0x2e, 0x30, 0x2c, 0x20, 0x33, 0x2e, 0x30, 0x29, 0x0a, 0x29, 0x0a, 0x05, 0x66, 0x6c, 0x6f, 0x6f,
0x72, 0x5a, 0x20, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69,
0x6f, 0x6e, 0x2e, 0x6d, 0x61, 0x74, 0x68, 0x2e, 0x66, 0x6c, 0x6f, 0x6f, 0x72, 0x28, 0x31, 0x2e,
0x35, 0x31, 0x29, 0x0a, 0x24, 0x0a, 0x07, 0x66, 0x6c, 0x61, 0x74, 0x74, 0x65, 0x6e, 0x5a, 0x19,
0x5b, 0x5b, 0x31, 0x5d, 0x2c, 0x20, 0x5b, 0x32, 0x5d, 0x2c, 0x20, 0x5b, 0x33, 0x5d, 0x5d, 0x2e,
0x66, 0x6c, 0x61, 0x74, 0x74, 0x65, 0x6e, 0x28, 0x29, 0x0a, 0x28, 0x0a, 0x05, 0x72, 0x6f, 0x75,
0x6e, 0x64, 0x5a, 0x1f, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74,
0x69, 0x6f, 0x6e, 0x2e, 0x6d, 0x61, 0x74, 0x68, 0x2e, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x28, 0x31,
0x2e, 0x35, 0x29, 0x0a, 0x2d, 0x0a, 0x03, 0x64, 0x75, 0x70, 0x5a, 0x26, 0x5b, 0x31, 0x2c, 0x20,
0x32, 0x2c, 0x20, 0x33, 0x2c, 0x20, 0x34, 0x5d, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x28,
0x64, 0x75, 0x70, 0x2c, 0x20, 0x64, 0x75, 0x70, 0x20, 0x25, 0x20, 0x32, 0x20, 0x3d, 0x3d, 0x20,
0x30, 0x29, 0x0a, 0x24, 0x0a, 0x03, 0x61, 0x6e, 0x79, 0x5a, 0x1d, 0x67, 0x72, 0x70, 0x63, 0x2e,
0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x61, 0x6e, 0x79, 0x2e, 0x6e,
0x65, 0x77, 0x28, 0x70, 0x6f, 0x73, 0x74, 0x29, 0x0a, 0x29, 0x0a, 0x03, 0x66, 0x6d, 0x74, 0x5a,
0x22, 0x27, 0x25, 0x64, 0x2d, 0x25, 0x64, 0x2d, 0x25, 0x64, 0x2d, 0x77, 0x6f, 0x72, 0x6c, 0x64,
0x27, 0x2e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x28, 0x5b, 0x31, 0x2c, 0x20, 0x32, 0x2c, 0x20,
0x33, 0x5d, 0x29, 0x0a, 0x28, 0x0a, 0x08, 0x72, 0x65, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x64, 0x5a,
0x1c, 0x66, 0x6d, 0x74, 0x2e, 0x72, 0x65, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x28, 0x27, 0x77, 0x6f,
0x72, 0x6c, 0x64, 0x27, 0x2c, 0x20, 0x27, 0x67, 0x72, 0x70, 0x63, 0x27, 0x29, 0x0a, 0x4a, 0x0a,
0x0b, 0x6c, 0x69, 0x73, 0x74, 0x5f, 0x74, 0x6f, 0x5f, 0x6d, 0x61, 0x70, 0x5a, 0x3b, 0x5b, 0x31,
0x2c, 0x20, 0x32, 0x2c, 0x20, 0x33, 0x5d, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72,
0x6d, 0x4d, 0x61, 0x70, 0x28, 0x69, 0x64, 0x78, 0x2c, 0x20, 0x76, 0x2c, 0x20, 0x69, 0x64, 0x78,
0x20, 0x25, 0x20, 0x32, 0x20, 0x3d, 0x3d, 0x20, 0x30, 0x2c, 0x20, 0x28, 0x69, 0x64, 0x78, 0x20,
0x2a, 0x20, 0x76, 0x29, 0x20, 0x2b, 0x20, 0x76, 0x29, 0x0a, 0x37, 0x0a, 0x0a, 0x75, 0x75, 0x69,
0x64, 0x5f, 0x70, 0x61, 0x72, 0x73, 0x65, 0x5a, 0x29, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65,
0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x75, 0x75, 0x69, 0x64, 0x2e, 0x70, 0x61,
0x72, 0x73, 0x65, 0x28, 0x75, 0x75, 0x69, 0x64, 0x2e, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x28,
0x29, 0x29, 0x0a, 0x3d, 0x0a, 0x0d, 0x75, 0x75, 0x69, 0x64, 0x5f, 0x76, 0x61, 0x6c, 0x69, 0x64,
0x61, 0x74, 0x65, 0x5a, 0x2c, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61,
0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x75, 0x75, 0x69, 0x64, 0x2e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61,
0x74, 0x65, 0x28, 0x75, 0x75, 0x69, 0x64, 0x2e, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x28, 0x29,
0x29, 0x0a, 0x39, 0x0a, 0x07, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x5a, 0x2e, 0x67, 0x72,
0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x72, 0x65,
0x67, 0x65, 0x78, 0x70, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x28, 0x27, 0x5b, 0x61,
0x2d, 0x7a, 0x5d, 0x2b, 0x5c, 0x5c, 0x64, 0x5c, 0x5c, 0x64, 0x27, 0x29, 0x0a, 0x46, 0x0a, 0x0c,
0x6d, 0x75, 0x73, 0x74, 0x5f, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x5a, 0x36, 0x67, 0x72,
0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x72, 0x65,
0x67, 0x65, 0x78, 0x70, 0x2e, 0x6d, 0x75, 0x73, 0x74, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65,
0x28, 0x27, 0x28, 0x5b, 0x61, 0x2d, 0x7a, 0x5d, 0x2b, 0x29, 0x5c, 0x5c, 0x64, 0x28, 0x5c, 0x5c,
0x64, 0x29, 0x27, 0x29, 0x0a, 0x3b, 0x0a, 0x0a, 0x71, 0x75, 0x6f, 0x74, 0x65, 0x5f, 0x6d, 0x65,
0x74, 0x61, 0x5a, 0x2d, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74,
0x69, 0x6f, 0x6e, 0x2e, 0x72, 0x65, 0x67, 0x65, 0x78, 0x70, 0x2e, 0x71, 0x75, 0x6f, 0x74, 0x65,
0x4d, 0x65, 0x74, 0x61, 0x28, 0x27, 0x5b, 0x61, 0x2d, 0x7a, 0x5d, 0x2b, 0x5c, 0x5c, 0x64, 0x27,
0x29, 0x0a, 0x41, 0x0a, 0x14, 0x66, 0x69, 0x6e, 0x64, 0x5f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67,
0x5f, 0x73, 0x75, 0x62, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x5a, 0x29, 0x6d, 0x75, 0x73, 0x74, 0x5f,
0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x2e, 0x66, 0x69, 0x6e, 0x64, 0x53, 0x74, 0x72, 0x69,
0x6e, 0x67, 0x53, 0x75, 0x62, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x28, 0x27, 0x61, 0x62, 0x63, 0x31,
0x32, 0x33, 0x27, 0x29, 0x0a, 0x2c, 0x0a, 0x0c, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x5f, 0x73, 0x74,
0x72, 0x69, 0x6e, 0x67, 0x5a, 0x1c, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x2e, 0x6d, 0x61,
0x74, 0x63, 0x68, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x28, 0x27, 0x61, 0x62, 0x63, 0x31, 0x32,
0x27, 0x29, 0x0a, 0x70, 0x0a, 0x12, 0x72, 0x65, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x5f, 0x61, 0x6c,
0x6c, 0x5f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x5a, 0x5a, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66,
0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x72, 0x65, 0x67, 0x65, 0x78, 0x70,
0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x28, 0x27, 0x6d, 0x61, 0x63, 0x6b, 0x65, 0x72,
0x65, 0x6c, 0x27, 0x29, 0x2e, 0x72, 0x65, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x41, 0x6c, 0x6c, 0x53,
0x74, 0x72, 0x69, 0x6e, 0x67, 0x28, 0x27, 0x6d, 0x61, 0x63, 0x6b, 0x65, 0x72, 0x65, 0x6c, 0x20,
0x69, 0x73, 0x20, 0x74, 0x61, 0x73, 0x74, 0x79, 0x27, 0x2c, 0x20, 0x27, 0x73, 0x61, 0x6c, 0x6d,
0x6f, 0x6e, 0x27, 0x29, 0x22, 0xa6, 0x04, 0x0a, 0x01, 0x41, 0x12, 0x25, 0x0a, 0x01, 0x62, 0x18,
0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69,
0x6f, 0x6e, 0x2e, 0x41, 0x2e, 0x42, 0x42, 0x06, 0x9a, 0x4a, 0x03, 0x12, 0x01, 0x62, 0x52, 0x01,
0x62, 0x12, 0x3e, 0x0a, 0x05, 0x6f, 0x70, 0x74, 0x5f, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b,
0x32, 0x11, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x41, 0x2e,
0x42, 0x2e, 0x43, 0x42, 0x14, 0x9a, 0x4a, 0x11, 0x22, 0x0f, 0x22, 0x07, 0x41, 0x2e, 0x42, 0x2e,
0x43, 0x7b, 0x7d, 0x0a, 0x04, 0x74, 0x72, 0x75, 0x65, 0x48, 0x00, 0x52, 0x04, 0x6f, 0x70, 0x74,
0x43, 0x1a, 0xa1, 0x03, 0x0a, 0x01, 0x42, 0x12, 0x2d, 0x0a, 0x03, 0x66, 0x6f, 0x6f, 0x18, 0x01,
0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f,
0x6e, 0x2e, 0x41, 0x2e, 0x42, 0x2e, 0x43, 0x42, 0x08, 0x9a, 0x4a, 0x05, 0x12, 0x03, 0x66, 0x6f,
0x6f, 0x52, 0x03, 0x66, 0x6f, 0x6f, 0x12, 0x2d, 0x0a, 0x03, 0x62, 0x61, 0x72, 0x18, 0x02, 0x20,
0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e,
0x2e, 0x41, 0x2e, 0x42, 0x2e, 0x43, 0x42, 0x08, 0x9a, 0x4a, 0x05, 0x12, 0x03, 0x62, 0x61, 0x72,
0x52, 0x03, 0x62, 0x61, 0x72, 0x1a, 0x24, 0x0a, 0x01, 0x43, 0x12, 0x1f, 0x0a, 0x04, 0x74, 0x79,
0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0b, 0x9a, 0x4a, 0x08, 0x12, 0x06, 0x24,
0x2e, 0x74, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x3a, 0x97, 0x02, 0x9a, 0x4a,
0x93, 0x02, 0x0a, 0x1d, 0x0a, 0x03, 0x66, 0x6f, 0x6f, 0x6a, 0x16, 0x0a, 0x05, 0x41, 0x2e, 0x42,
0x2e, 0x43, 0x12, 0x0d, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x05, 0x27, 0x66, 0x6f, 0x6f,
0x27, 0x0a, 0x1d, 0x0a, 0x03, 0x62, 0x61, 0x72, 0x6a, 0x16, 0x0a, 0x05, 0x41, 0x2e, 0x42, 0x2e,
0x43, 0x12, 0x0d, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x05, 0x27, 0x62, 0x61, 0x72, 0x27,
0x0a, 0x89, 0x01, 0x12, 0x11, 0x66, 0x6f, 0x6f, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x20, 0x3d, 0x3d,
0x20, 0x27, 0x66, 0x6f, 0x6f, 0x27, 0x5a, 0x74, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64,
0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x6c, 0x6f, 0x67, 0x2e, 0x69, 0x6e, 0x66, 0x6f,
0x28, 0x27, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x20, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74,
0x69, 0x6f, 0x6e, 0x20, 0x6c, 0x6f, 0x67, 0x27, 0x2c, 0x20, 0x7b, 0x27, 0x6d, 0x65, 0x73, 0x73,
0x61, 0x67, 0x65, 0x73, 0x27, 0x3a, 0x20, 0x5b, 0x66, 0x6f, 0x6f, 0x2c, 0x20, 0x62, 0x61, 0x72,
0x5d, 0x2c, 0x20, 0x27, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x6d, 0x61, 0x70, 0x27,
0x3a, 0x20, 0x7b, 0x27, 0x66, 0x6f, 0x6f, 0x27, 0x3a, 0x20, 0x66, 0x6f, 0x6f, 0x2c, 0x20, 0x27,
0x62, 0x61, 0x72, 0x27, 0x3a, 0x20, 0x62, 0x61, 0x72, 0x7d, 0x7d, 0x29, 0x0a, 0x47, 0x5a, 0x45,
0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e,
0x6c, 0x6f, 0x67, 0x2e, 0x61, 0x64, 0x64, 0x28, 0x7b, 0x27, 0x66, 0x6f, 0x6f, 0x5f, 0x74, 0x79,
0x70, 0x65, 0x27, 0x3a, 0x20, 0x66, 0x6f, 0x6f, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2c, 0x20, 0x27,
0x62, 0x61, 0x72, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x27, 0x3a, 0x20, 0x62, 0x61, 0x72, 0x2e, 0x74,
0x79, 0x70, 0x65, 0x7d, 0x29, 0x3a, 0x0f, 0x9a, 0x4a, 0x0c, 0x0a, 0x0a, 0x0a, 0x01, 0x62, 0x6a,
0x05, 0x0a, 0x03, 0x41, 0x2e, 0x42, 0x42, 0x05, 0x0a, 0x03, 0x6f, 0x70, 0x74, 0x22, 0xe6, 0x01,
0x0a, 0x04, 0x50, 0x6f, 0x73, 0x74, 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, 0x18, 0x0a, 0x07,
0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63,
0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, 0x2f, 0x0a, 0x04, 0x75, 0x73, 0x65, 0x72, 0x18, 0x04,
0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f,
0x6e, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x42, 0x09, 0x9a, 0x4a, 0x06, 0x12, 0x04, 0x75, 0x73, 0x65,
0x72, 0x52, 0x04, 0x75, 0x73, 0x65, 0x72, 0x3a, 0x6d, 0x9a, 0x4a, 0x6a, 0x0a, 0x3c, 0x0a, 0x03,
0x72, 0x65, 0x73, 0x72, 0x35, 0x0a, 0x18, 0x70, 0x6f, 0x73, 0x74, 0x2e, 0x50, 0x6f, 0x73, 0x74,
0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x47, 0x65, 0x74, 0x50, 0x6f, 0x73, 0x74, 0x12,
0x0a, 0x0a, 0x02, 0x69, 0x64, 0x12, 0x04, 0x24, 0x2e, 0x69, 0x64, 0x1a, 0x03, 0x31, 0x30, 0x73,
0x22, 0x08, 0x0a, 0x06, 0x0a, 0x02, 0x32, 0x73, 0x10, 0x03, 0x0a, 0x12, 0x0a, 0x04, 0x70, 0x6f,
0x73, 0x74, 0x18, 0x01, 0x5a, 0x08, 0x72, 0x65, 0x73, 0x2e, 0x70, 0x6f, 0x73, 0x74, 0x0a, 0x16,
0x0a, 0x04, 0x75, 0x73, 0x65, 0x72, 0x6a, 0x0e, 0x0a, 0x04, 0x55, 0x73, 0x65, 0x72, 0x12, 0x06,
0x1a, 0x04, 0x70, 0x6f, 0x73, 0x74, 0x22, 0xc8, 0x04, 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, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e,
0x61, 0x6d, 0x65, 0x12, 0x26, 0x0a, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x03, 0x20, 0x03,
0x28, 0x0b, 0x32, 0x10, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e,
0x49, 0x74, 0x65, 0x6d, 0x52, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x12, 0x37, 0x0a, 0x07, 0x70,
0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x66,
0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x2e, 0x50,
0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x07, 0x70, 0x72, 0x6f,
0x66, 0x69, 0x6c, 0x65, 0x12, 0x2f, 0x0a, 0x06, 0x61, 0x74, 0x74, 0x72, 0x5f, 0x61, 0x18, 0x05,
0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f,
0x6e, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x2e, 0x41, 0x74, 0x74, 0x72, 0x41, 0x48, 0x00, 0x52, 0x05,
0x61, 0x74, 0x74, 0x72, 0x41, 0x12, 0x26, 0x0a, 0x01, 0x62, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b,
0x32, 0x16, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x55, 0x73,
0x65, 0x72, 0x2e, 0x41, 0x74, 0x74, 0x72, 0x42, 0x48, 0x00, 0x52, 0x01, 0x62, 0x1a, 0x50, 0x0a,
0x0c, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a,
0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12,
0x2a, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14,
0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66,
0x2e, 0x41, 0x6e, 0x79, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a,
0x2f, 0x0a, 0x05, 0x41, 0x74, 0x74, 0x72, 0x41, 0x12, 0x10, 0x0a, 0x03, 0x66, 0x6f, 0x6f, 0x18,
0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x66, 0x6f, 0x6f, 0x3a, 0x14, 0x9a, 0x4a, 0x11, 0x1a,
0x0f, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x2e, 0x41, 0x74, 0x74, 0x72, 0x41,
0x1a, 0x2f, 0x0a, 0x05, 0x41, 0x74, 0x74, 0x72, 0x42, 0x12, 0x10, 0x0a, 0x03, 0x62, 0x61, 0x72,
0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x03, 0x62, 0x61, 0x72, 0x3a, 0x14, 0x9a, 0x4a, 0x11,
0x1a, 0x0f, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x2e, 0x41, 0x74, 0x74, 0x72,
0x42, 0x3a, 0xa5, 0x01, 0x9a, 0x4a, 0xa1, 0x01, 0x0a, 0x8a, 0x01, 0x0a, 0x03, 0x72, 0x65, 0x73,
0x72, 0x82, 0x01, 0x0a, 0x18, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x53, 0x65,
0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x12, 0x0f, 0x0a,
0x02, 0x69, 0x64, 0x12, 0x09, 0x24, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x12, 0x2f,
0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x27, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x49, 0x74, 0x65,
0x6d, 0x2e, 0x49, 0x74, 0x65, 0x6d, 0x54, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x61, 0x6c, 0x75, 0x65,
0x28, 0x27, 0x49, 0x54, 0x45, 0x4d, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x31, 0x27, 0x29, 0x1a,
0x03, 0x32, 0x30, 0x73, 0x22, 0x1f, 0x12, 0x1d, 0x0a, 0x02, 0x31, 0x73, 0x11, 0x66, 0x66, 0x66,
0x66, 0x66, 0x66, 0xe6, 0x3f, 0x19, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0xfb, 0x3f, 0x22, 0x03,
0x33, 0x30, 0x73, 0x28, 0x03, 0x0a, 0x12, 0x0a, 0x04, 0x75, 0x73, 0x65, 0x72, 0x18, 0x01, 0x5a,
0x08, 0x72, 0x65, 0x73, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x42, 0x06, 0x0a, 0x04, 0x61, 0x74, 0x74,
0x72, 0x22, 0xb7, 0x06, 0x0a, 0x04, 0x49, 0x74, 0x65, 0x6d, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61,
0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x2d,
0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x19, 0x2e, 0x66,
0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x49, 0x74, 0x65, 0x6d, 0x2e, 0x49,
0x74, 0x65, 0x6d, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a,
0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x76, 0x61,
0x6c, 0x75, 0x65, 0x12, 0x35, 0x0a, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18,
0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69,
0x6f, 0x6e, 0x2e, 0x49, 0x74, 0x65, 0x6d, 0x2e, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e,
0x52, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x81, 0x03, 0x0a, 0x08, 0x4c,
0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x61, 0x64, 0x64, 0x72, 0x31,
0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x61, 0x64, 0x64, 0x72, 0x31, 0x12, 0x14, 0x0a,
0x05, 0x61, 0x64, 0x64, 0x72, 0x32, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x61, 0x64,
0x64, 0x72, 0x32, 0x12, 0x38, 0x0a, 0x06, 0x61, 0x64, 0x64, 0x72, 0x5f, 0x61, 0x18, 0x03, 0x20,
0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e,
0x2e, 0x49, 0x74, 0x65, 0x6d, 0x2e, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x41,
0x64, 0x64, 0x72, 0x41, 0x48, 0x00, 0x52, 0x05, 0x61, 0x64, 0x64, 0x72, 0x41, 0x12, 0x2f, 0x0a,
0x01, 0x62, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72,
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x49, 0x74, 0x65, 0x6d, 0x2e, 0x4c, 0x6f, 0x63, 0x61, 0x74,
0x69, 0x6f, 0x6e, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x42, 0x48, 0x00, 0x52, 0x01, 0x62, 0x12, 0x0e,
0x0a, 0x01, 0x63, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x01, 0x63, 0x1a, 0x38,
0x0a, 0x05, 0x41, 0x64, 0x64, 0x72, 0x41, 0x12, 0x10, 0x0a, 0x03, 0x66, 0x6f, 0x6f, 0x18, 0x01,
0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x66, 0x6f, 0x6f, 0x3a, 0x1d, 0x9a, 0x4a, 0x1a, 0x1a, 0x18,
0x75, 0x73, 0x65, 0x72, 0x2e, 0x49, 0x74, 0x65, 0x6d, 0x2e, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69,
0x6f, 0x6e, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x41, 0x1a, 0x38, 0x0a, 0x05, 0x41, 0x64, 0x64, 0x72,
0x42, 0x12, 0x10, 0x0a, 0x03, 0x62, 0x61, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03,
0x62, 0x61, 0x72, 0x3a, 0x1d, 0x9a, 0x4a, 0x1a, 0x1a, 0x18, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x49,
0x74, 0x65, 0x6d, 0x2e, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x41, 0x64, 0x64,
0x72, 0x42, 0x22, 0x38, 0x0a, 0x0c, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79,
0x70, 0x65, 0x12, 0x13, 0x0a, 0x0f, 0x4c, 0x4f, 0x43, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x54,
0x59, 0x50, 0x45, 0x5f, 0x30, 0x10, 0x00, 0x12, 0x13, 0x0a, 0x0f, 0x4c, 0x4f, 0x43, 0x41, 0x54,
0x49, 0x4f, 0x4e, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x31, 0x10, 0x01, 0x3a, 0x17, 0x9a, 0x4a,
0x14, 0x1a, 0x12, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x49, 0x74, 0x65, 0x6d, 0x2e, 0x4c, 0x6f, 0x63,
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x07, 0x0a, 0x05, 0x61, 0x64, 0x64, 0x72, 0x33, 0x22, 0x8a,
0x02, 0x0a, 0x08, 0x49, 0x74, 0x65, 0x6d, 0x54, 0x79, 0x70, 0x65, 0x12, 0x39, 0x0a, 0x15, 0x49,
0x54, 0x45, 0x4d, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49,
0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x1a, 0x1e, 0x9a, 0x4a, 0x1b, 0x1a, 0x12, 0x0a, 0x02, 0x65,
0x6e, 0x12, 0x0c, 0x75, 0x6e, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x20, 0x69, 0x74, 0x65, 0x6d, 0x1a,
0x05, 0x0a, 0x03, 0x73, 0x75, 0x62, 0x12, 0x37, 0x0a, 0x0b, 0x49, 0x54, 0x45, 0x4d, 0x5f, 0x54,
0x59, 0x50, 0x45, 0x5f, 0x31, 0x10, 0x01, 0x1a, 0x26, 0x9a, 0x4a, 0x23, 0x1a, 0x15, 0x0a, 0x02,
0x65, 0x6e, 0x12, 0x0f, 0x66, 0x69, 0x72, 0x73, 0x74, 0x20, 0x69, 0x74, 0x65, 0x6d, 0x20, 0x74,
0x79, 0x70, 0x65, 0x1a, 0x0a, 0x0a, 0x03, 0x73, 0x75, 0x62, 0x12, 0x03, 0x78, 0x78, 0x78, 0x12,
0x38, 0x0a, 0x0b, 0x49, 0x54, 0x45, 0x4d, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x32, 0x10, 0x02,
0x1a, 0x27, 0x9a, 0x4a, 0x24, 0x1a, 0x16, 0x0a, 0x02, 0x65, 0x6e, 0x12, 0x10, 0x73, 0x65, 0x63,
0x6f, 0x6e, 0x64, 0x20, 0x69, 0x74, 0x65, 0x6d, 0x20, 0x74, 0x79, 0x70, 0x65, 0x1a, 0x0a, 0x0a,
0x03, 0x73, 0x75, 0x62, 0x12, 0x03, 0x79, 0x79, 0x79, 0x12, 0x37, 0x0a, 0x0b, 0x49, 0x54, 0x45,
0x4d, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x33, 0x10, 0x03, 0x1a, 0x26, 0x9a, 0x4a, 0x23, 0x1a,
0x15, 0x0a, 0x02, 0x65, 0x6e, 0x12, 0x0f, 0x74, 0x68, 0x69, 0x72, 0x64, 0x20, 0x69, 0x74, 0x65,
0x6d, 0x20, 0x74, 0x79, 0x70, 0x65, 0x1a, 0x0a, 0x0a, 0x03, 0x73, 0x75, 0x62, 0x12, 0x03, 0x7a,
0x7a, 0x7a, 0x1a, 0x17, 0x9a, 0x4a, 0x14, 0x0a, 0x12, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x49, 0x74,
0x65, 0x6d, 0x2e, 0x49, 0x74, 0x65, 0x6d, 0x54, 0x79, 0x70, 0x65, 0x3a, 0x0e, 0x9a, 0x4a, 0x0b,
0x1a, 0x09, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x49, 0x74, 0x65, 0x6d, 0x32, 0x5e, 0x0a, 0x11, 0x46,
0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65,
0x12, 0x44, 0x0a, 0x07, 0x47, 0x65, 0x74, 0x50, 0x6f, 0x73, 0x74, 0x12, 0x1a, 0x2e, 0x66, 0x65,
0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x6f, 0x73, 0x74,
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61,
0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x6f, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70,
0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x1a, 0x03, 0x9a, 0x4a, 0x00, 0x42, 0xad, 0x01, 0x9a, 0x4a,
0x22, 0x12, 0x0f, 0x70, 0x6f, 0x73, 0x74, 0x2f, 0x70, 0x6f, 0x73, 0x74, 0x2e, 0x70, 0x72, 0x6f,
0x74, 0x6f, 0x12, 0x0f, 0x75, 0x73, 0x65, 0x72, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x0a, 0x0e, 0x63, 0x6f, 0x6d, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74,
0x69, 0x6f, 0x6e, 0x42, 0x0f, 0x46, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50,
0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x1d, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2f,
0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x3b, 0x66, 0x65, 0x64, 0x65, 0x72,
0x61, 0x74, 0x69, 0x6f, 0x6e, 0xa2, 0x02, 0x03, 0x46, 0x58, 0x58, 0xaa, 0x02, 0x0a, 0x46, 0x65,
0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0xca, 0x02, 0x0a, 0x46, 0x65, 0x64, 0x65, 0x72,
0x61, 0x74, 0x69, 0x6f, 0x6e, 0xe2, 0x02, 0x16, 0x46, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69,
0x6f, 0x6e, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02,
0x0a, 0x46, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f,
0x74, 0x6f, 0x33,
}
var (
file_federation_federation_proto_rawDescOnce sync.Once
file_federation_federation_proto_rawDescData = file_federation_federation_proto_rawDesc
)
func file_federation_federation_proto_rawDescGZIP() []byte {
file_federation_federation_proto_rawDescOnce.Do(func() {
file_federation_federation_proto_rawDescData = protoimpl.X.CompressGZIP(file_federation_federation_proto_rawDescData)
})
return file_federation_federation_proto_rawDescData
}
var file_federation_federation_proto_enumTypes = make([]protoimpl.EnumInfo, 2)
var file_federation_federation_proto_msgTypes = make([]protoimpl.MessageInfo, 16)
var file_federation_federation_proto_goTypes = []interface{}{
(Item_ItemType)(0), // 0: federation.Item.ItemType
(Item_Location_LocationType)(0), // 1: federation.Item.Location.LocationType
(*GetPostRequest)(nil), // 2: federation.GetPostRequest
(*GetPostResponse)(nil), // 3: federation.GetPostResponse
(*A)(nil), // 4: federation.A
(*Post)(nil), // 5: federation.Post
(*User)(nil), // 6: federation.User
(*Item)(nil), // 7: federation.Item
nil, // 8: federation.GetPostResponse.MapValueEntry
nil, // 9: federation.GetPostResponse.ListToMapEntry
(*A_B)(nil), // 10: federation.A.B
(*A_B_C)(nil), // 11: federation.A.B.C
nil, // 12: federation.User.ProfileEntry
(*User_AttrA)(nil), // 13: federation.User.AttrA
(*User_AttrB)(nil), // 14: federation.User.AttrB
(*Item_Location)(nil), // 15: federation.Item.Location
(*Item_Location_AddrA)(nil), // 16: federation.Item.Location.AddrA
(*Item_Location_AddrB)(nil), // 17: federation.Item.Location.AddrB
(*wrapperspb.DoubleValue)(nil), // 18: google.protobuf.DoubleValue
(*wrapperspb.FloatValue)(nil), // 19: google.protobuf.FloatValue
(*wrapperspb.Int64Value)(nil), // 20: google.protobuf.Int64Value
(*wrapperspb.UInt64Value)(nil), // 21: google.protobuf.UInt64Value
(*wrapperspb.Int32Value)(nil), // 22: google.protobuf.Int32Value
(*wrapperspb.UInt32Value)(nil), // 23: google.protobuf.UInt32Value
(*wrapperspb.BoolValue)(nil), // 24: google.protobuf.BoolValue
(*wrapperspb.StringValue)(nil), // 25: google.protobuf.StringValue
(*wrapperspb.BytesValue)(nil), // 26: google.protobuf.BytesValue
(*timestamppb.Timestamp)(nil), // 27: google.protobuf.Timestamp
(*anypb.Any)(nil), // 28: google.protobuf.Any
}
var file_federation_federation_proto_depIdxs = []int32{
5, // 0: federation.GetPostResponse.post:type_name -> federation.Post
0, // 1: federation.GetPostResponse.item_type_value_enum:type_name -> federation.Item.ItemType
0, // 2: federation.GetPostResponse.item_type_value_cast:type_name -> federation.Item.ItemType
4, // 3: federation.GetPostResponse.a:type_name -> federation.A
7, // 4: federation.GetPostResponse.sorted_items:type_name -> federation.Item
8, // 5: federation.GetPostResponse.map_value:type_name -> federation.GetPostResponse.MapValueEntry
18, // 6: federation.GetPostResponse.double_wrapper_value:type_name -> google.protobuf.DoubleValue
19, // 7: federation.GetPostResponse.float_wrapper_value:type_name -> google.protobuf.FloatValue
20, // 8: federation.GetPostResponse.i64_wrapper_value:type_name -> google.protobuf.Int64Value
21, // 9: federation.GetPostResponse.u64_wrapper_value:type_name -> google.protobuf.UInt64Value
22, // 10: federation.GetPostResponse.i32_wrapper_value:type_name -> google.protobuf.Int32Value
23, // 11: federation.GetPostResponse.u32_wrapper_value:type_name -> google.protobuf.UInt32Value
24, // 12: federation.GetPostResponse.bool_wrapper_value:type_name -> google.protobuf.BoolValue
25, // 13: federation.GetPostResponse.string_wrapper_value:type_name -> google.protobuf.StringValue
26, // 14: federation.GetPostResponse.bytes_wrapper_value:type_name -> google.protobuf.BytesValue
27, // 15: federation.GetPostResponse.null_timestamp:type_name -> google.protobuf.Timestamp
27, // 16: federation.GetPostResponse.null_timestamp2:type_name -> google.protobuf.Timestamp
27, // 17: federation.GetPostResponse.null_timestamp3:type_name -> google.protobuf.Timestamp
0, // 18: federation.GetPostResponse.enum_value:type_name -> federation.Item.ItemType
28, // 19: federation.GetPostResponse.any:type_name -> google.protobuf.Any
9, // 20: federation.GetPostResponse.list_to_map:type_name -> federation.GetPostResponse.ListToMapEntry
10, // 21: federation.A.b:type_name -> federation.A.B
11, // 22: federation.A.opt_c:type_name -> federation.A.B.C
6, // 23: federation.Post.user:type_name -> federation.User
7, // 24: federation.User.items:type_name -> federation.Item
12, // 25: federation.User.profile:type_name -> federation.User.ProfileEntry
13, // 26: federation.User.attr_a:type_name -> federation.User.AttrA
14, // 27: federation.User.b:type_name -> federation.User.AttrB
0, // 28: federation.Item.type:type_name -> federation.Item.ItemType
15, // 29: federation.Item.location:type_name -> federation.Item.Location
11, // 30: federation.A.B.foo:type_name -> federation.A.B.C
11, // 31: federation.A.B.bar:type_name -> federation.A.B.C
28, // 32: federation.User.ProfileEntry.value:type_name -> google.protobuf.Any
16, // 33: federation.Item.Location.addr_a:type_name -> federation.Item.Location.AddrA
17, // 34: federation.Item.Location.b:type_name -> federation.Item.Location.AddrB
2, // 35: federation.FederationService.GetPost:input_type -> federation.GetPostRequest
3, // 36: federation.FederationService.GetPost:output_type -> federation.GetPostResponse
36, // [36:37] is the sub-list for method output_type
35, // [35:36] is the sub-list for method input_type
35, // [35:35] is the sub-list for extension type_name
35, // [35:35] is the sub-list for extension extendee
0, // [0:35] is the sub-list for field type_name
}
func init() { file_federation_federation_proto_init() }
func file_federation_federation_proto_init() {
if File_federation_federation_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_federation_federation_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetPostRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_federation_federation_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetPostResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_federation_federation_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*A); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_federation_federation_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Post); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_federation_federation_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*User); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_federation_federation_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Item); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_federation_federation_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*A_B); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_federation_federation_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*A_B_C); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_federation_federation_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*User_AttrA); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_federation_federation_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*User_AttrB); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_federation_federation_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Item_Location); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_federation_federation_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Item_Location_AddrA); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_federation_federation_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Item_Location_AddrB); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
file_federation_federation_proto_msgTypes[2].OneofWrappers = []interface{}{
(*A_OptC)(nil),
}
file_federation_federation_proto_msgTypes[4].OneofWrappers = []interface{}{
(*User_AttrA_)(nil),
(*User_B)(nil),
}
file_federation_federation_proto_msgTypes[13].OneofWrappers = []interface{}{
(*Item_Location_AddrA_)(nil),
(*Item_Location_B)(nil),
(*Item_Location_C)(nil),
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_federation_federation_proto_rawDesc,
NumEnums: 2,
NumMessages: 16,
NumExtensions: 0,
NumServices: 1,
},
GoTypes: file_federation_federation_proto_goTypes,
DependencyIndexes: file_federation_federation_proto_depIdxs,
EnumInfos: file_federation_federation_proto_enumTypes,
MessageInfos: file_federation_federation_proto_msgTypes,
}.Build()
File_federation_federation_proto = out.File
file_federation_federation_proto_rawDesc = nil
file_federation_federation_proto_goTypes = nil
file_federation_federation_proto_depIdxs = nil
}
================================================
FILE: _examples/02_simple/federation/federation_grpc.pb.go
================================================
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.3.0
// - protoc (unknown)
// source: federation/federation.proto
package federation
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 (
FederationService_GetPost_FullMethodName = "/federation.FederationService/GetPost"
)
// FederationServiceClient is the client API for FederationService 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 FederationServiceClient interface {
GetPost(ctx context.Context, in *GetPostRequest, opts ...grpc.CallOption) (*GetPostResponse, error)
}
type federationServiceClient struct {
cc grpc.ClientConnInterface
}
func NewFederationServiceClient(cc grpc.ClientConnInterface) FederationServiceClient {
return &federationServiceClient{cc}
}
func (c *federationServiceClient) GetPost(ctx context.Context, in *GetPostRequest, opts ...grpc.CallOption) (*GetPostResponse, error) {
out := new(GetPostResponse)
err := c.cc.Invoke(ctx, FederationService_GetPost_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// FederationServiceServer is the server API for FederationService service.
// All implementations must embed UnimplementedFederationServiceServer
// for forward compatibility
type FederationServiceServer interface {
GetPost(context.Context, *GetPostRequest) (*GetPostResponse, error)
mustEmbedUnimplementedFederationServiceServer()
}
// UnimplementedFederationServiceServer must be embedded to have forward compatible implementations.
type UnimplementedFederationServiceServer struct {
}
func (UnimplementedFederationServiceServer) GetPost(context.Context, *GetPostRequest) (*GetPostResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetPost not implemented")
}
func (UnimplementedFederationServiceServer) mustEmbedUnimplementedFederationServiceServer() {}
// UnsafeFederationServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to FederationServiceServer will
// result in compilation errors.
type UnsafeFederationServiceServer interface {
mustEmbedUnimplementedFederationServiceServer()
}
func RegisterFederationServiceServer(s grpc.ServiceRegistrar, srv FederationServiceServer) {
s.RegisterService(&FederationService_ServiceDesc, srv)
}
func _FederationService_GetPost_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetPostRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(FederationServiceServer).GetPost(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: FederationService_GetPost_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(FederationServiceServer).GetPost(ctx, req.(*GetPostRequest))
}
return interceptor(ctx, in, info, handler)
}
// FederationService_ServiceDesc is the grpc.ServiceDesc for FederationService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var FederationService_ServiceDesc = grpc.ServiceDesc{
ServiceName: "federation.FederationService",
HandlerType: (*FederationServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "GetPost",
Handler: _FederationService_GetPost_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "federation/federation.proto",
}
================================================
FILE: _examples/02_simple/federation/federation_grpc_federation.pb.go
================================================
// Code generated by protoc-gen-grpc-federation. DO NOT EDIT!
// versions:
//
// protoc-gen-grpc-federation: (devel)
//
// source: federation/federation.proto
package federation
import (
"context"
"io"
"log/slog"
"reflect"
grpcfed "github.com/mercari/grpc-federation/grpc/federation"
grpcfedcel "github.com/mercari/grpc-federation/grpc/federation/cel"
"go.opentelemetry.io/otel"
"go.opentelemetry.io/otel/trace"
"google.golang.org/protobuf/types/known/anypb"
"google.golang.org/protobuf/types/known/timestamppb"
post "example/post"
user "example/user"
wrapperspb "google.golang.org/protobuf/types/known/wrapperspb"
)
var (
_ = reflect.Invalid // to avoid "imported and not used error"
)
var Item_ItemType_attrMap = grpcfed.EnumAttributeMap[Item_ItemType]{
Item_ITEM_TYPE_UNSPECIFIED: grpcfed.EnumValueAttributeMap{
`en`: `unknown item`,
`sub`: ``,
},
Item_ITEM_TYPE_1: grpcfed.EnumValueAttributeMap{
`en`: `first item type`,
`sub`: `xxx`,
},
Item_ITEM_TYPE_2: grpcfed.EnumValueAttributeMap{
`en`: `second item type`,
`sub`: `yyy`,
},
Item_ITEM_TYPE_3: grpcfed.EnumValueAttributeMap{
`en`: `third item type`,
`sub`: `zzz`,
},
}
// Federation_AVariable represents variable definitions in "federation.A".
type FederationService_Federation_AVariable struct {
B *A_B
}
// Federation_AArgument is argument for "federation.A" message.
type FederationService_Federation_AArgument struct {
FederationService_Federation_AVariable
}
// Federation_A_BVariable represents variable definitions in "federation.B".
type FederationService_Federation_A_BVariable struct {
Bar *A_B_C
Foo *A_B_C
}
// Federation_A_BArgument is argument for "federation.B" message.
type FederationService_Federation_A_BArgument struct {
FederationService_Federation_A_BVariable
}
// Federation_A_B_CVariable represents variable definitions in "federation.C".
type FederationService_Federation_A_B_CVariable struct {
}
// Federation_A_B_CArgument is argument for "federation.C" message.
type FederationService_Federation_A_B_CArgument struct {
Type string
FederationService_Federation_A_B_CVariable
}
// Federation_GetPostResponseVariable represents variable definitions in "federation.GetPostResponse".
type FederationService_Federation_GetPostResponseVariable struct {
A *A
Any *anypb.Any
Compile *grpcfedcel.Regexp
Date *grpcfedcel.Time
E Item_ItemType
FindStringSubmatch []string
FixedRand *grpcfedcel.Rand
Flatten []int64
Floor float64
Fmt string
JpTime *grpcfedcel.Time
ListToMap map[int64]int64
Loc *grpcfedcel.Location
MapValue map[int64]string
MatchString bool
MustCompile *grpcfedcel.Regexp
NullValue any
ParseFloat float64
Post *Post
Pow float64
QuoteMeta string
RandSource *grpcfedcel.Source
ReplaceAllString string
Replaced string
Round float64
SortedItems []*user.Item
SortedValues []int64
SqrtDouble float64
SqrtInt float64
StringsJoin string
Url *grpcfedcel.URL
Uuid *grpcfedcel.UUID
UuidParse *grpcfedcel.UUID
UuidValidate bool
Value1 string
}
// Federation_GetPostResponseArgument is argument for "federation.GetPostResponse" message.
type FederationService_Federation_GetPostResponseArgument struct {
Id string
FederationService_Federation_GetPostResponseVariable
}
// Federation_PostVariable represents variable definitions in "federation.Post".
type FederationService_Federation_PostVariable struct {
Post *post.Post
Res *post.GetPostResponse
User *User
}
// Federation_PostArgument is argument for "federation.Post" message.
type FederationService_Federation_PostArgument struct {
Id string
FederationService_Federation_PostVariable
}
// Federation_UserVariable represents variable definitions in "federation.User".
type FederationService_Federation_UserVariable struct {
Res *user.GetUserResponse
User *user.User
}
// Federation_UserArgument is argument for "federation.User" message.
type FederationService_Federation_UserArgument struct {
Content string
Id string
Title string
UserId string
FederationService_Federation_UserVariable
}
// FederationServiceConfig configuration required to initialize the service that use GRPC Federation.
type FederationServiceConfig struct {
// Client provides a factory that creates the gRPC Client needed to invoke methods of the gRPC Service on which the Federation Service depends.
// If this interface is not provided, an error is returned during initialization.
Client FederationServiceClientFactory // required
// ErrorHandler Federation Service often needs to convert errors received from downstream services.
// If an error occurs during method execution in the Federation Service, this error handler is called and the returned error is treated as a final error.
ErrorHandler grpcfed.ErrorHandler
// Logger sets the logger used to output Debug/Info/Error information.
Logger *slog.Logger
}
// FederationServiceClientFactory provides a factory that creates the gRPC Client needed to invoke methods of the gRPC Service on which the Federation Service depends.
type FederationServiceClientFactory interface {
// Post_PostServiceClient create a gRPC Client to be used to call methods in post.PostService.
Post_PostServiceClient(FederationServiceClientConfig) (post.PostServiceClient, error)
// User_UserServiceClient create a gRPC Client to be used to call methods in user.UserService.
User_UserServiceClient(FederationServiceClientConfig) (user.UserServiceClient, error)
}
// FederationServiceClientConfig helper to create gRPC client.
// Hints for creating a gRPC Client.
type FederationServiceClientConfig struct {
// Service FQDN ( `.` ) of the service on Protocol Buffers.
Service string
}
// FederationServiceDependentClientSet has a gRPC client for all services on which the federation service depends.
// This is provided as an argument when implementing the custom resolver.
type FederationServiceDependentClientSet struct {
Post_PostServiceClient post.PostServiceClient
User_UserServiceClient user.UserServiceClient
}
// FederationServiceResolver provides an interface to directly implement message resolver and field resolver not defined in Protocol Buffers.
type FederationServiceResolver interface {
}
// FederationServiceCELPluginWasmConfig type alias for grpcfedcel.WasmConfig.
type FederationServiceCELPluginWasmConfig = grpcfedcel.WasmConfig
// FederationServiceCELPluginConfig hints for loading a WebAssembly based plugin.
type FederationServiceCELPluginConfig struct {
CacheDir string
}
// FederationServiceUnimplementedResolver a structure implemented to satisfy the Resolver interface.
// An Unimplemented error is always returned.
// This is intended for use when there are many Resolver interfaces that do not need to be implemented,
// by embedding them in a resolver structure that you have created.
type FederationServiceUnimplementedResolver struct{}
const (
FederationService_DependentMethod_Post_PostService_GetPost = "/post.PostService/GetPost"
FederationService_DependentMethod_User_UserService_GetUser = "/user.UserService/GetUser"
)
// FederationService represents Federation Service.
type FederationService struct {
UnimplementedFederationServiceServer
cfg FederationServiceConfig
logger *slog.Logger
isLogLevelDebug bool
errorHandler grpcfed.ErrorHandler
celCacheMap *grpcfed.CELCacheMap
tracer trace.Tracer
celTypeHelper *grpcfed.CELTypeHelper
celEnvOpts []grpcfed.CELEnvOption
celPlugins []*grpcfedcel.CELPlugin
client *FederationServiceDependentClientSet
}
// NewFederationService creates FederationService instance by FederationServiceConfig.
func NewFederationService(cfg FederationServiceConfig) (*FederationService, error) {
if cfg.Client == nil {
return nil, grpcfed.ErrClientConfig
}
Post_PostServiceClient, err := cfg.Client.Post_PostServiceClient(FederationServiceClientConfig{
Service: "post.PostService",
})
if err != nil {
return nil, err
}
User_UserServiceClient, err := cfg.Client.User_UserServiceClient(FederationServiceClientConfig{
Service: "user.UserService",
})
if err != nil {
return nil, err
}
logger := cfg.Logger
if logger == nil {
logger = slog.New(slog.NewJSONHandler(io.Discard, nil))
}
tracer := otel.Tracer("federation.FederationService")
ctx := grpcfed.WithLogger(context.Background(), logger)
ctx = grpcfed.WithTracer(ctx, tracer)
errorHandler := cfg.ErrorHandler
if errorHandler == nil {
errorHandler = func(ctx context.Context, methodName string, err error) error { return err }
}
celTypeHelperFieldMap := grpcfed.CELTypeHelperFieldMap{
"grpc.federation.private.federation.AArgument": {},
"grpc.federation.private.federation.A_BArgument": {},
"grpc.federation.private.federation.A_B_CArgument": {
"type": grpcfed.NewCELFieldType(grpcfed.CELStringType, "Type"),
},
"grpc.federation.private.federation.GetPostResponseArgument": {
"id": grpcfed.NewCELFieldType(grpcfed.CELStringType, "Id"),
},
"grpc.federation.private.federation.PostArgument": {
"id": grpcfed.NewCELFieldType(grpcfed.CELStringType, "Id"),
},
"grpc.federation.private.federation.UserArgument": {
"id": grpcfed.NewCELFieldType(grpcfed.CELStringType, "Id"),
"title": grpcfed.NewCELFieldType(grpcfed.CELStringType, "Title"),
"content": grpcfed.NewCELFieldType(grpcfed.CELStringType, "Content"),
"user_id": grpcfed.NewCELFieldType(grpcfed.CELStringType, "UserId"),
},
"federation.A": {
"opt": grpcfed.NewOneofSelectorFieldType(
grpcfed.NewCELObjectType("federation.A.B.C"), "Opt",
[]reflect.Type{reflect.TypeOf((*A_OptC)(nil))},
[]string{"GetOptC"},
reflect.Zero(reflect.TypeOf((*A_B_C)(nil))),
),
},
}
celTypeHelper := grpcfed.NewCELTypeHelper("federation", celTypeHelperFieldMap)
var celEnvOpts []grpcfed.CELEnvOption
celEnvOpts = append(celEnvOpts, grpcfed.NewDefaultEnvOptions(celTypeHelper)...)
celEnvOpts = append(celEnvOpts, grpcfed.GRPCErrorAccessorOptions(celTypeHelper, "post.GetPostResponse")...)
celEnvOpts = append(celEnvOpts, grpcfed.GRPCErrorAccessorOptions(celTypeHelper, "user.GetUserResponse")...)
celEnvOpts = append(celEnvOpts, grpcfed.EnumAccessorOptions("federation.Item.ItemType", Item_ItemType_value, Item_ItemType_name)...)
celEnvOpts = append(celEnvOpts, grpcfed.EnumAttrOption[Item_ItemType]("federation.Item.ItemType", Item_ItemType_attrMap))
celEnvOpts = append(celEnvOpts, grpcfed.EnumAccessorOptions("federation.Item.Location.LocationType", Item_Location_LocationType_value, Item_Location_LocationType_name)...)
celEnvOpts = append(celEnvOpts, grpcfed.EnumAccessorOptions("user.Item.ItemType", user.Item_ItemType_value, user.Item_ItemType_name)...)
svc := &FederationService{
cfg: cfg,
logger: logger,
isLogLevelDebug: logger.Enabled(context.Background(), slog.LevelDebug),
errorHandler: errorHandler,
celEnvOpts: celEnvOpts,
celTypeHelper: celTypeHelper,
celCacheMap: grpcfed.NewCELCacheMap(),
tracer: tracer,
client: &FederationServiceDependentClientSet{
Post_PostServiceClient: Post_PostServiceClient,
User_UserServiceClient: User_UserServiceClient,
},
}
return svc, nil
}
// CleanupFederationService cleanup all resources to prevent goroutine leaks.
func CleanupFederationService(ctx context.Context, svc *FederationService) {
svc.cleanup(ctx)
}
func (s *FederationService) cleanup(ctx context.Context) {
for _, plugin := range s.celPlugins {
plugin.Close()
}
}
// GetPost implements "federation.FederationService/GetPost" method.
func (s *FederationService) GetPost(ctx context.Context, req *GetPostRequest) (res *GetPostResponse, e error) {
ctx, span := s.tracer.Start(ctx, "federation.FederationService/GetPost")
defer span.End()
ctx = grpcfed.WithLogger(ctx, s.logger)
ctx = grpcfed.WithCELCacheMap(ctx, s.celCacheMap)
defer func() {
if r := recover(); r != nil {
e = grpcfed.RecoverError(r, grpcfed.StackTrace())
grpcfed.OutputErrorLog(ctx, e)
}
}()
defer func() {
for _, celPlugin := range s.celPlugins {
celPlugin.Cleanup()
}
}()
res, err := s.resolve_Federation_GetPostResponse(ctx, &FederationService_Federation_GetPostResponseArgument{
Id: req.GetId(),
})
if err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
grpcfed.OutputErrorLog(ctx, err)
return nil, err
}
return res, nil
}
// resolve_Federation_A resolve "federation.A" message.
func (s *FederationService) resolve_Federation_A(ctx context.Context, req *FederationService_Federation_AArgument) (*A, error) {
ctx, span := s.tracer.Start(ctx, "federation.A")
defer span.End()
ctx = grpcfed.WithLogger(ctx, grpcfed.Logger(ctx), grpcfed.LogAttrs(ctx)...)
grpcfed.Logger(ctx).DebugContext(ctx, "resolve federation.A", slog.Any("message_args", s.logvalue_Federation_AArgument(req)))
type localValueType struct {
*grpcfed.LocalValue
vars struct {
B *A_B
}
}
value := &localValueType{LocalValue: grpcfed.NewLocalValue(ctx, s.celEnvOpts, "grpc.federation.private.federation.AArgument", req)}
ctx = grpcfed.WithLocalValue(ctx, value.LocalValue)
/*
def {
name: "b"
message {
name: "B"
}
}
*/
def_b := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[*A_B, *localValueType]{
Name: `b`,
Type: grpcfed.CELObjectType("federation.A.B"),
Setter: func(value *localValueType, v *A_B) error {
value.vars.B = v
return nil
},
Message: func(ctx context.Context, value *localValueType) (any, error) {
args := &FederationService_Federation_A_BArgument{}
ret, err := s.resolve_Federation_A_B(ctx, args)
if err != nil {
return nil, err
}
return ret, nil
},
})
}
if err := def_b(ctx); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
// assign named parameters to message arguments to pass to the custom resolver.
req.FederationService_Federation_AVariable.B = value.vars.B
// create a message value to be returned.
ret := &A{}
// field binding section.
// (grpc.federation.field).by = "b"
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[*A_B]{
Value: value,
Expr: `b`,
CacheIndex: 1,
Setter: func(v *A_B) error {
ret.B = v
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
oneof_OptC, err := grpcfed.EvalCEL(ctx, &grpcfed.EvalCELRequest{
Value: value,
Expr: `true`,
OutType: reflect.TypeOf(true),
CacheIndex: 2,
})
if err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
if false {
// For code generation reasons, we're using a loop to generate the oneof conditional branches,
// so to avoid treating the first element specially, we always generate if branch with false condition.
} else if oneof_OptC.(bool) {
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[*A_B_C]{
Value: value,
Expr: `A.B.C{}`,
CacheIndex: 3,
Setter: func(v *A_B_C) error {
optValue, err := s.cast_Federation_A_B_C__to__Federation_A_OptC(v)
if err != nil {
return err
}
ret.Opt = optValue
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
}
grpcfed.Logger(ctx).DebugContext(ctx, "resolved federation.A", slog.Any("federation.A", s.logvalue_Federation_A(ret)))
return ret, nil
}
// resolve_Federation_A_B resolve "federation.A.B" message.
func (s *FederationService) resolve_Federation_A_B(ctx context.Context, req *FederationService_Federation_A_BArgument) (*A_B, error) {
ctx, span := s.tracer.Start(ctx, "federation.A.B")
defer span.End()
ctx = grpcfed.WithLogger(ctx, grpcfed.Logger(ctx), grpcfed.LogAttrs(ctx)...)
grpcfed.Logger(ctx).DebugContext(ctx, "resolve federation.A.B", slog.Any("message_args", s.logvalue_Federation_A_BArgument(req)))
type localValueType struct {
*grpcfed.LocalValue
vars struct {
Bar *A_B_C
Foo *A_B_C
XDef2 bool
XDef3 bool
}
}
value := &localValueType{LocalValue: grpcfed.NewLocalValue(ctx, s.celEnvOpts, "grpc.federation.private.federation.A_BArgument", req)}
ctx = grpcfed.WithLocalValue(ctx, value.LocalValue)
/*
def {
name: "foo"
message {
name: "C"
args { name: "type", by: "'foo'" }
}
}
*/
def_foo := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[*A_B_C, *localValueType]{
Name: `foo`,
Type: grpcfed.CELObjectType("federation.A.B.C"),
Setter: func(value *localValueType, v *A_B_C) error {
value.vars.Foo = v
return nil
},
Message: func(ctx context.Context, value *localValueType) (any, error) {
args := &FederationService_Federation_A_B_CArgument{}
// { name: "type", by: "'foo'" }
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[string]{
Value: value,
Expr: `'foo'`,
CacheIndex: 4,
Setter: func(v string) error {
args.Type = v
return nil
},
}); err != nil {
return nil, err
}
ret, err := s.resolve_Federation_A_B_C(ctx, args)
if err != nil {
return nil, err
}
return ret, nil
},
})
}
/*
def {
name: "bar"
message {
name: "C"
args { name: "type", by: "'bar'" }
}
}
*/
def_bar := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[*A_B_C, *localValueType]{
Name: `bar`,
Type: grpcfed.CELObjectType("federation.A.B.C"),
Setter: func(value *localValueType, v *A_B_C) error {
value.vars.Bar = v
return nil
},
Message: func(ctx context.Context, value *localValueType) (any, error) {
args := &FederationService_Federation_A_B_CArgument{}
// { name: "type", by: "'bar'" }
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[string]{
Value: value,
Expr: `'bar'`,
CacheIndex: 5,
Setter: func(v string) error {
args.Type = v
return nil
},
}); err != nil {
return nil, err
}
ret, err := s.resolve_Federation_A_B_C(ctx, args)
if err != nil {
return nil, err
}
return ret, nil
},
})
}
/*
def {
name: "_def2"
if: "foo.type == 'foo'"
by: "grpc.federation.log.info('output federation log', {'messages': [foo, bar], 'message_map': {'foo': foo, 'bar': bar}})"
}
*/
def__def2 := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[bool, *localValueType]{
If: `foo.type == 'foo'`,
IfCacheIndex: 6,
Name: `_def2`,
Type: grpcfed.CELBoolType,
Setter: func(value *localValueType, v bool) error {
value.vars.XDef2 = v
return nil
},
By: `grpc.federation.log.info('output federation log', {'messages': [foo, bar], 'message_map': {'foo': foo, 'bar': bar}})`,
ByCacheIndex: 7,
})
}
/*
def {
name: "_def3"
by: "grpc.federation.log.add({'foo_type': foo.type, 'bar_type': bar.type})"
}
*/
def__def3 := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[bool, *localValueType]{
Name: `_def3`,
Type: grpcfed.CELBoolType,
Setter: func(value *localValueType, v bool) error {
value.vars.XDef3 = v
return nil
},
By: `grpc.federation.log.add({'foo_type': foo.type, 'bar_type': bar.type})`,
ByCacheIndex: 8,
})
}
// A tree view of message dependencies is shown below.
/*
bar ─┐
foo ─┤
_def2 ─┐
bar ─┐ │
foo ─┤ │
_def3 ─┤
*/
eg, ctx1 := grpcfed.ErrorGroupWithContext(ctx)
grpcfed.GoWithRecover(eg, func() (any, error) {
eg, ctx2 := grpcfed.ErrorGroupWithContext(ctx1)
grpcfed.GoWithRecover(eg, func() (any, error) {
if err := def_bar(ctx2); err != nil {
grpcfed.RecordErrorToSpan(ctx2, err)
return nil, err
}
return nil, nil
})
grpcfed.GoWithRecover(eg, func() (any, error) {
if err := def_foo(ctx2); err != nil {
grpcfed.RecordErrorToSpan(ctx2, err)
return nil, err
}
return nil, nil
})
if err := eg.Wait(); err != nil {
return nil, err
}
if err := def__def2(ctx1); err != nil {
grpcfed.RecordErrorToSpan(ctx1, err)
return nil, err
}
return nil, nil
})
grpcfed.GoWithRecover(eg, func() (any, error) {
eg, ctx2 := grpcfed.ErrorGroupWithContext(ctx1)
grpcfed.GoWithRecover(eg, func() (any, error) {
if err := def_bar(ctx2); err != nil {
grpcfed.RecordErrorToSpan(ctx2, err)
return nil, err
}
return nil, nil
})
grpcfed.GoWithRecover(eg, func() (any, error) {
if err := def_foo(ctx2); err != nil {
grpcfed.RecordErrorToSpan(ctx2, err)
return nil, err
}
return nil, nil
})
if err := eg.Wait(); err != nil {
return nil, err
}
if err := def__def3(ctx1); err != nil {
grpcfed.RecordErrorToSpan(ctx1, err)
return nil, err
}
return nil, nil
})
if err := eg.Wait(); err != nil {
return nil, err
}
// assign named parameters to message arguments to pass to the custom resolver.
req.FederationService_Federation_A_BVariable.Bar = value.vars.Bar
req.FederationService_Federation_A_BVariable.Foo = value.vars.Foo
// create a message value to be returned.
ret := &A_B{}
// field binding section.
// (grpc.federation.field).by = "foo"
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[*A_B_C]{
Value: value,
Expr: `foo`,
CacheIndex: 9,
Setter: func(v *A_B_C) error {
ret.Foo = v
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
// (grpc.federation.field).by = "bar"
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[*A_B_C]{
Value: value,
Expr: `bar`,
CacheIndex: 10,
Setter: func(v *A_B_C) error {
ret.Bar = v
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
grpcfed.Logger(ctx).DebugContext(ctx, "resolved federation.A.B", slog.Any("federation.A.B", s.logvalue_Federation_A_B(ret)))
return ret, nil
}
// resolve_Federation_A_B_C resolve "federation.A.B.C" message.
func (s *FederationService) resolve_Federation_A_B_C(ctx context.Context, req *FederationService_Federation_A_B_CArgument) (*A_B_C, error) {
ctx, span := s.tracer.Start(ctx, "federation.A.B.C")
defer span.End()
ctx = grpcfed.WithLogger(ctx, grpcfed.Logger(ctx), grpcfed.LogAttrs(ctx)...)
grpcfed.Logger(ctx).DebugContext(ctx, "resolve federation.A.B.C", slog.Any("message_args", s.logvalue_Federation_A_B_CArgument(req)))
type localValueType struct {
*grpcfed.LocalValue
vars struct {
}
}
value := &localValueType{LocalValue: grpcfed.NewLocalValue(ctx, s.celEnvOpts, "grpc.federation.private.federation.A_B_CArgument", req)}
ctx = grpcfed.WithLocalValue(ctx, value.LocalValue)
// create a message value to be returned.
ret := &A_B_C{}
// field binding section.
// (grpc.federation.field).by = "$.type"
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[string]{
Value: value,
Expr: `$.type`,
CacheIndex: 11,
Setter: func(v string) error {
ret.Type = v
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
grpcfed.Logger(ctx).DebugContext(ctx, "resolved federation.A.B.C", slog.Any("federation.A.B.C", s.logvalue_Federation_A_B_C(ret)))
return ret, nil
}
// resolve_Federation_GetPostResponse resolve "federation.GetPostResponse" message.
func (s *FederationService) resolve_Federation_GetPostResponse(ctx context.Context, req *FederationService_Federation_GetPostResponseArgument) (*GetPostResponse, error) {
ctx, span := s.tracer.Start(ctx, "federation.GetPostResponse")
defer span.End()
ctx = grpcfed.WithLogger(ctx, grpcfed.Logger(ctx), grpcfed.LogAttrs(ctx)...)
grpcfed.Logger(ctx).DebugContext(ctx, "resolve federation.GetPostResponse", slog.Any("message_args", s.logvalue_Federation_GetPostResponseArgument(req)))
type localValueType struct {
*grpcfed.LocalValue
vars struct {
A *A
Any *anypb.Any
Compile *grpcfedcel.Regexp
Date *grpcfedcel.Time
Dup []int64
E Item_ItemType
FindStringSubmatch []string
FixedRand *grpcfedcel.Rand
Flatten []int64
Floor float64
Fmt string
JpTime *grpcfedcel.Time
ListToMap map[int64]int64
Loc *grpcfedcel.Location
MapValue map[int64]string
MatchString bool
MustCompile *grpcfedcel.Regexp
NullValue any
ParseFloat float64
Post *Post
Pow float64
QuoteMeta string
RandSource *grpcfedcel.Source
ReplaceAllString string
Replaced string
Round float64
SortedItems []*user.Item
SortedValues []int64
SqrtDouble float64
SqrtInt float64
StringsJoin string
Url *grpcfedcel.URL
Uuid *grpcfedcel.UUID
UuidParse *grpcfedcel.UUID
UuidValidate bool
Value1 string
XDef16 bool
}
}
value := &localValueType{LocalValue: grpcfed.NewLocalValue(ctx, s.celEnvOpts, "grpc.federation.private.federation.GetPostResponseArgument", req)}
ctx = grpcfed.WithLocalValue(ctx, value.LocalValue)
/*
def {
name: "post"
message {
name: "Post"
args { name: "id", by: "$.id" }
}
}
*/
def_post := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[*Post, *localValueType]{
Name: `post`,
Type: grpcfed.CELObjectType("federation.Post"),
Setter: func(value *localValueType, v *Post) error {
value.vars.Post = v
return nil
},
Message: func(ctx context.Context, value *localValueType) (any, error) {
args := &FederationService_Federation_PostArgument{}
// { name: "id", by: "$.id" }
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[string]{
Value: value,
Expr: `$.id`,
CacheIndex: 12,
Setter: func(v string) error {
args.Id = v
return nil
},
}); err != nil {
return nil, err
}
ret, err := s.resolve_Federation_Post(ctx, args)
if err != nil {
return nil, err
}
return ret, nil
},
})
}
/*
def {
name: "strings_join"
by: "grpc.federation.strings.join(['1234567'.substring(1, 3), '2'], '.')"
}
*/
def_strings_join := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[string, *localValueType]{
Name: `strings_join`,
Type: grpcfed.CELStringType,
Setter: func(value *localValueType, v string) error {
value.vars.StringsJoin = v
return nil
},
By: `grpc.federation.strings.join(['1234567'.substring(1, 3), '2'], '.')`,
ByCacheIndex: 13,
})
}
/*
def {
name: "parse_float"
by: "grpc.federation.strings.parseFloat(strings_join, 64)"
}
*/
def_parse_float := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[float64, *localValueType]{
Name: `parse_float`,
Type: grpcfed.CELDoubleType,
Setter: func(value *localValueType, v float64) error {
value.vars.ParseFloat = v
return nil
},
By: `grpc.federation.strings.parseFloat(strings_join, 64)`,
ByCacheIndex: 14,
})
}
/*
def {
name: "url"
by: "grpc.federation.url.parse('https://test_user:password@example.com/path')"
}
*/
def_url := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[*grpcfedcel.URL, *localValueType]{
Name: `url`,
Type: grpcfed.CELObjectType("grpc.federation.url.URL"),
Setter: func(value *localValueType, v *grpcfedcel.URL) error {
value.vars.Url = v
return nil
},
By: `grpc.federation.url.parse('https://test_user:password@example.com/path')`,
ByCacheIndex: 15,
})
}
/*
def {
name: "date"
by: "grpc.federation.time.date(2023, 12, 25, 12, 10, 5, 0, grpc.federation.time.UTC())"
}
*/
def_date := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[*grpcfedcel.Time, *localValueType]{
Name: `date`,
Type: grpcfed.CELObjectType("grpc.federation.time.Time"),
Setter: func(value *localValueType, v *grpcfedcel.Time) error {
value.vars.Date = v
return nil
},
By: `grpc.federation.time.date(2023, 12, 25, 12, 10, 5, 0, grpc.federation.time.UTC())`,
ByCacheIndex: 16,
})
}
/*
def {
name: "rand_source"
by: "grpc.federation.rand.newSource(date.unix())"
}
*/
def_rand_source := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[*grpcfedcel.Source, *localValueType]{
Name: `rand_source`,
Type: grpcfed.CELObjectType("grpc.federation.rand.Source"),
Setter: func(value *localValueType, v *grpcfedcel.Source) error {
value.vars.RandSource = v
return nil
},
By: `grpc.federation.rand.newSource(date.unix())`,
ByCacheIndex: 17,
})
}
/*
def {
name: "fixed_rand"
by: "grpc.federation.rand.new(rand_source)"
}
*/
def_fixed_rand := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[*grpcfedcel.Rand, *localValueType]{
Name: `fixed_rand`,
Type: grpcfed.CELObjectType("grpc.federation.rand.Rand"),
Setter: func(value *localValueType, v *grpcfedcel.Rand) error {
value.vars.FixedRand = v
return nil
},
By: `grpc.federation.rand.new(rand_source)`,
ByCacheIndex: 18,
})
}
/*
def {
name: "uuid"
by: ".grpc.federation.uuid.newRandomFromRand(fixed_rand)"
}
*/
def_uuid := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[*grpcfedcel.UUID, *localValueType]{
Name: `uuid`,
Type: grpcfed.CELObjectType("grpc.federation.uuid.UUID"),
Setter: func(value *localValueType, v *grpcfedcel.UUID) error {
value.vars.Uuid = v
return nil
},
By: `.grpc.federation.uuid.newRandomFromRand(fixed_rand)`,
ByCacheIndex: 19,
})
}
/*
def {
name: "loc"
by: "grpc.federation.time.loadLocation('Asia/Tokyo')"
}
*/
def_loc := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[*grpcfedcel.Location, *localValueType]{
Name: `loc`,
Type: grpcfed.CELObjectType("grpc.federation.time.Location"),
Setter: func(value *localValueType, v *grpcfedcel.Location) error {
value.vars.Loc = v
return nil
},
By: `grpc.federation.time.loadLocation('Asia/Tokyo')`,
ByCacheIndex: 20,
})
}
/*
def {
name: "jp_time"
by: "grpc.federation.time.date(2023, 12, 25, 12, 10, 5, 0, loc)"
}
*/
def_jp_time := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[*grpcfedcel.Time, *localValueType]{
Name: `jp_time`,
Type: grpcfed.CELObjectType("grpc.federation.time.Time"),
Setter: func(value *localValueType, v *grpcfedcel.Time) error {
value.vars.JpTime = v
return nil
},
By: `grpc.federation.time.date(2023, 12, 25, 12, 10, 5, 0, loc)`,
ByCacheIndex: 21,
})
}
/*
def {
name: "value1"
by: "grpc.federation.metadata.incoming()['key1'][0]"
}
*/
def_value1 := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[string, *localValueType]{
Name: `value1`,
Type: grpcfed.CELStringType,
Setter: func(value *localValueType, v string) error {
value.vars.Value1 = v
return nil
},
By: `grpc.federation.metadata.incoming()['key1'][0]`,
ByCacheIndex: 22,
})
}
/*
def {
name: "a"
message {
name: "A"
}
}
*/
def_a := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[*A, *localValueType]{
Name: `a`,
Type: grpcfed.CELObjectType("federation.A"),
Setter: func(value *localValueType, v *A) error {
value.vars.A = v
return nil
},
Message: func(ctx context.Context, value *localValueType) (any, error) {
args := &FederationService_Federation_AArgument{}
ret, err := s.resolve_Federation_A(ctx, args)
if err != nil {
return nil, err
}
return ret, nil
},
})
}
/*
def {
name: "sorted_values"
by: "[4, 1, 3, 2].sortAsc(v, v)"
}
*/
def_sorted_values := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[[]int64, *localValueType]{
Name: `sorted_values`,
Type: grpcfed.CELListType(grpcfed.CELIntType),
Setter: func(value *localValueType, v []int64) error {
value.vars.SortedValues = v
return nil
},
By: `[4, 1, 3, 2].sortAsc(v, v)`,
ByCacheIndex: 23,
})
}
/*
def {
name: "sorted_items"
by: "[user.Item{location:user.Item.Location{addr1:'a'}}, user.Item{location:user.Item.Location{addr1:'b'}}].sortDesc(v, v.location.addr1)"
}
*/
def_sorted_items := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[[]*user.Item, *localValueType]{
Name: `sorted_items`,
Type: grpcfed.CELListType(grpcfed.CELObjectType("user.Item")),
Setter: func(value *localValueType, v []*user.Item) error {
value.vars.SortedItems = v
return nil
},
By: `[user.Item{location:user.Item.Location{addr1:'a'}}, user.Item{location:user.Item.Location{addr1:'b'}}].sortDesc(v, v.location.addr1)`,
ByCacheIndex: 24,
})
}
/*
def {
name: "map_value"
by: "{1: 'a', 2: 'b', 3: 'c'}"
}
*/
def_map_value := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[map[int64]string, *localValueType]{
Name: `map_value`,
Type: grpcfed.NewCELMapType(grpcfed.CELIntType, grpcfed.CELStringType),
Setter: func(value *localValueType, v map[int64]string) error {
value.vars.MapValue = v
return nil
},
By: `{1: 'a', 2: 'b', 3: 'c'}`,
ByCacheIndex: 25,
})
}
/*
def {
name: "null_value"
by: "null"
}
*/
def_null_value := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[any, *localValueType]{
Name: `null_value`,
Type: grpcfed.CELNullType,
Setter: func(value *localValueType, v any) error {
value.vars.NullValue = v
return nil
},
By: `null`,
ByCacheIndex: 26,
})
}
/*
def {
name: "_def16"
by: "grpc.federation.log.info('output federation log', {'post_message': post})"
}
*/
def__def16 := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[bool, *localValueType]{
Name: `_def16`,
Type: grpcfed.CELBoolType,
Setter: func(value *localValueType, v bool) error {
value.vars.XDef16 = v
return nil
},
By: `grpc.federation.log.info('output federation log', {'post_message': post})`,
ByCacheIndex: 27,
})
}
/*
def {
name: "e"
enum {
name: "federation.Item.ItemType"
by: "true ? user.Item.ItemType.value('ITEM_TYPE_2') : user.Item.ItemType.from(1)"
}
}
*/
def_e := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[Item_ItemType, *localValueType]{
Name: `e`,
Type: grpcfed.CELIntType,
Setter: func(value *localValueType, v Item_ItemType) error {
value.vars.E = v
return nil
},
Enum: func(ctx context.Context, value *localValueType) (Item_ItemType, error) {
src, err := grpcfed.EvalCEL(ctx, &grpcfed.EvalCELRequest{
Value: value,
Expr: `true ? user.Item.ItemType.value('ITEM_TYPE_2') : user.Item.ItemType.from(1)`,
OutType: reflect.TypeOf(user.Item_ItemType(0)),
CacheIndex: 28,
})
if err != nil {
return 0, err
}
v := src.(user.Item_ItemType)
return s.cast_User_Item_ItemType__to__Federation_Item_ItemType(v)
},
})
}
/*
def {
name: "sqrt_double"
by: "grpc.federation.math.sqrt(3.0*3.0+4.0*4.0)"
}
*/
def_sqrt_double := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[float64, *localValueType]{
Name: `sqrt_double`,
Type: grpcfed.CELDoubleType,
Setter: func(value *localValueType, v float64) error {
value.vars.SqrtDouble = v
return nil
},
By: `grpc.federation.math.sqrt(3.0*3.0+4.0*4.0)`,
ByCacheIndex: 29,
})
}
/*
def {
name: "sqrt_int"
by: "grpc.federation.math.sqrt(3*3+4*4)"
}
*/
def_sqrt_int := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[float64, *localValueType]{
Name: `sqrt_int`,
Type: grpcfed.CELDoubleType,
Setter: func(value *localValueType, v float64) error {
value.vars.SqrtInt = v
return nil
},
By: `grpc.federation.math.sqrt(3*3+4*4)`,
ByCacheIndex: 30,
})
}
/*
def {
name: "pow"
by: "grpc.federation.math.pow(2.0, 3.0)"
}
*/
def_pow := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[float64, *localValueType]{
Name: `pow`,
Type: grpcfed.CELDoubleType,
Setter: func(value *localValueType, v float64) error {
value.vars.Pow = v
return nil
},
By: `grpc.federation.math.pow(2.0, 3.0)`,
ByCacheIndex: 31,
})
}
/*
def {
name: "floor"
by: "grpc.federation.math.floor(1.51)"
}
*/
def_floor := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[float64, *localValueType]{
Name: `floor`,
Type: grpcfed.CELDoubleType,
Setter: func(value *localValueType, v float64) error {
value.vars.Floor = v
return nil
},
By: `grpc.federation.math.floor(1.51)`,
ByCacheIndex: 32,
})
}
/*
def {
name: "flatten"
by: "[[1], [2], [3]].flatten()"
}
*/
def_flatten := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[[]int64, *localValueType]{
Name: `flatten`,
Type: grpcfed.CELListType(grpcfed.CELIntType),
Setter: func(value *localValueType, v []int64) error {
value.vars.Flatten = v
return nil
},
By: `[[1], [2], [3]].flatten()`,
ByCacheIndex: 33,
})
}
/*
def {
name: "round"
by: "grpc.federation.math.round(1.5)"
}
*/
def_round := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[float64, *localValueType]{
Name: `round`,
Type: grpcfed.CELDoubleType,
Setter: func(value *localValueType, v float64) error {
value.vars.Round = v
return nil
},
By: `grpc.federation.math.round(1.5)`,
ByCacheIndex: 34,
})
}
/*
def {
name: "dup"
by: "[1, 2, 3, 4].filter(dup, dup % 2 == 0)"
}
*/
def_dup := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[[]int64, *localValueType]{
Name: `dup`,
Type: grpcfed.CELListType(grpcfed.CELIntType),
Setter: func(value *localValueType, v []int64) error {
value.vars.Dup = v
return nil
},
By: `[1, 2, 3, 4].filter(dup, dup % 2 == 0)`,
ByCacheIndex: 35,
})
}
/*
def {
name: "any"
by: "grpc.federation.any.new(post)"
}
*/
def_any := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[*anypb.Any, *localValueType]{
Name: `any`,
Type: grpcfed.CELObjectType("google.protobuf.Any"),
Setter: func(value *localValueType, v *anypb.Any) error {
value.vars.Any = v
return nil
},
By: `grpc.federation.any.new(post)`,
ByCacheIndex: 36,
})
}
/*
def {
name: "fmt"
by: "'%d-%d-%d-world'.format([1, 2, 3])"
}
*/
def_fmt := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[string, *localValueType]{
Name: `fmt`,
Type: grpcfed.CELStringType,
Setter: func(value *localValueType, v string) error {
value.vars.Fmt = v
return nil
},
By: `'%d-%d-%d-world'.format([1, 2, 3])`,
ByCacheIndex: 37,
})
}
/*
def {
name: "replaced"
by: "fmt.replace('world', 'grpc')"
}
*/
def_replaced := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[string, *localValueType]{
Name: `replaced`,
Type: grpcfed.CELStringType,
Setter: func(value *localValueType, v string) error {
value.vars.Replaced = v
return nil
},
By: `fmt.replace('world', 'grpc')`,
ByCacheIndex: 38,
})
}
/*
def {
name: "list_to_map"
by: "[1, 2, 3].transformMap(idx, v, idx % 2 == 0, (idx * v) + v)"
}
*/
def_list_to_map := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[map[int64]int64, *localValueType]{
Name: `list_to_map`,
Type: grpcfed.NewCELMapType(grpcfed.CELIntType, grpcfed.CELIntType),
Setter: func(value *localValueType, v map[int64]int64) error {
value.vars.ListToMap = v
return nil
},
By: `[1, 2, 3].transformMap(idx, v, idx % 2 == 0, (idx * v) + v)`,
ByCacheIndex: 39,
})
}
/*
def {
name: "uuid_parse"
by: "grpc.federation.uuid.parse(uuid.string())"
}
*/
def_uuid_parse := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[*grpcfedcel.UUID, *localValueType]{
Name: `uuid_parse`,
Type: grpcfed.CELObjectType("grpc.federation.uuid.UUID"),
Setter: func(value *localValueType, v *grpcfedcel.UUID) error {
value.vars.UuidParse = v
return nil
},
By: `grpc.federation.uuid.parse(uuid.string())`,
ByCacheIndex: 40,
})
}
/*
def {
name: "uuid_validate"
by: "grpc.federation.uuid.validate(uuid.string())"
}
*/
def_uuid_validate := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[bool, *localValueType]{
Name: `uuid_validate`,
Type: grpcfed.CELBoolType,
Setter: func(value *localValueType, v bool) error {
value.vars.UuidValidate = v
return nil
},
By: `grpc.federation.uuid.validate(uuid.string())`,
ByCacheIndex: 41,
})
}
/*
def {
name: "compile"
by: "grpc.federation.regexp.compile('[a-z]+\\\\d\\\\d')"
}
*/
def_compile := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[*grpcfedcel.Regexp, *localValueType]{
Name: `compile`,
Type: grpcfed.CELObjectType("grpc.federation.regexp.Regexp"),
Setter: func(value *localValueType, v *grpcfedcel.Regexp) error {
value.vars.Compile = v
return nil
},
By: `grpc.federation.regexp.compile('[a-z]+\\d\\d')`,
ByCacheIndex: 42,
})
}
/*
def {
name: "must_compile"
by: "grpc.federation.regexp.mustCompile('([a-z]+)\\\\d(\\\\d)')"
}
*/
def_must_compile := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[*grpcfedcel.Regexp, *localValueType]{
Name: `must_compile`,
Type: grpcfed.CELObjectType("grpc.federation.regexp.Regexp"),
Setter: func(value *localValueType, v *grpcfedcel.Regexp) error {
value.vars.MustCompile = v
return nil
},
By: `grpc.federation.regexp.mustCompile('([a-z]+)\\d(\\d)')`,
ByCacheIndex: 43,
})
}
/*
def {
name: "quote_meta"
by: "grpc.federation.regexp.quoteMeta('[a-z]+\\\\d')"
}
*/
def_quote_meta := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[string, *localValueType]{
Name: `quote_meta`,
Type: grpcfed.CELStringType,
Setter: func(value *localValueType, v string) error {
value.vars.QuoteMeta = v
return nil
},
By: `grpc.federation.regexp.quoteMeta('[a-z]+\\d')`,
ByCacheIndex: 44,
})
}
/*
def {
name: "find_string_submatch"
by: "must_compile.findStringSubmatch('abc123')"
}
*/
def_find_string_submatch := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[[]string, *localValueType]{
Name: `find_string_submatch`,
Type: grpcfed.CELListType(grpcfed.CELStringType),
Setter: func(value *localValueType, v []string) error {
value.vars.FindStringSubmatch = v
return nil
},
By: `must_compile.findStringSubmatch('abc123')`,
ByCacheIndex: 45,
})
}
/*
def {
name: "match_string"
by: "compile.matchString('abc12')"
}
*/
def_match_string := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[bool, *localValueType]{
Name: `match_string`,
Type: grpcfed.CELBoolType,
Setter: func(value *localValueType, v bool) error {
value.vars.MatchString = v
return nil
},
By: `compile.matchString('abc12')`,
ByCacheIndex: 46,
})
}
/*
def {
name: "replace_all_string"
by: "grpc.federation.regexp.compile('mackerel').replaceAllString('mackerel is tasty', 'salmon')"
}
*/
def_replace_all_string := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[string, *localValueType]{
Name: `replace_all_string`,
Type: grpcfed.CELStringType,
Setter: func(value *localValueType, v string) error {
value.vars.ReplaceAllString = v
return nil
},
By: `grpc.federation.regexp.compile('mackerel').replaceAllString('mackerel is tasty', 'salmon')`,
ByCacheIndex: 47,
})
}
// A tree view of message dependencies is shown below.
/*
post ─┐
_def16 ─┐
a ─┤
post ─┐ │
any ─┤
dup ─┤
e ─┤
must_compile ─┐ │
find_string_submatch ─┤
flatten ─┤
floor ─┤
loc ─┐ │
jp_time ─┤
list_to_map ─┤
map_value ─┤
compile ─┐ │
match_string ─┤
null_value ─┤
strings_join ─┐ │
parse_float ─┤
pow ─┤
quote_meta ─┤
replace_all_string ─┤
fmt ─┐ │
replaced ─┤
round ─┤
sorted_items ─┤
sorted_values ─┤
sqrt_double ─┤
sqrt_int ─┤
url ─┤
date ─┐ │
rand_source ─┐ │
fixed_rand ─┐ │
uuid ─┐ │
uuid_parse ─┤
date ─┐ │
rand_source ─┐ │
fixed_rand ─┐ │
uuid ─┐ │
uuid_validate ─┤
value1 ─┤
*/
eg, ctx1 := grpcfed.ErrorGroupWithContext(ctx)
grpcfed.GoWithRecover(eg, func() (any, error) {
if err := def_post(ctx1); err != nil {
grpcfed.RecordErrorToSpan(ctx1, err)
return nil, err
}
if err := def__def16(ctx1); err != nil {
grpcfed.RecordErrorToSpan(ctx1, err)
return nil, err
}
return nil, nil
})
grpcfed.GoWithRecover(eg, func() (any, error) {
if err := def_a(ctx1); err != nil {
grpcfed.RecordErrorToSpan(ctx1, err)
return nil, err
}
return nil, nil
})
grpcfed.GoWithRecover(eg, func() (any, error) {
if err := def_post(ctx1); err != nil {
grpcfed.RecordErrorToSpan(ctx1, err)
return nil, err
}
if err := def_any(ctx1); err != nil {
grpcfed.RecordErrorToSpan(ctx1, err)
return nil, err
}
return nil, nil
})
grpcfed.GoWithRecover(eg, func() (any, error) {
if err := def_dup(ctx1); err != nil {
grpcfed.RecordErrorToSpan(ctx1, err)
return nil, err
}
return nil, nil
})
grpcfed.GoWithRecover(eg, func() (any, error) {
if err := def_e(ctx1); err != nil {
grpcfed.RecordErrorToSpan(ctx1, err)
return nil, err
}
return nil, nil
})
grpcfed.GoWithRecover(eg, func() (any, error) {
if err := def_must_compile(ctx1); err != nil {
grpcfed.RecordErrorToSpan(ctx1, err)
return nil, err
}
if err := def_find_string_submatch(ctx1); err != nil {
grpcfed.RecordErrorToSpan(ctx1, err)
return nil, err
}
return nil, nil
})
grpcfed.GoWithRecover(eg, func() (any, error) {
if err := def_flatten(ctx1); err != nil {
grpcfed.RecordErrorToSpan(ctx1, err)
return nil, err
}
return nil, nil
})
grpcfed.GoWithRecover(eg, func() (any, error) {
if err := def_floor(ctx1); err != nil {
grpcfed.RecordErrorToSpan(ctx1, err)
return nil, err
}
return nil, nil
})
grpcfed.GoWithRecover(eg, func() (any, error) {
if err := def_loc(ctx1); err != nil {
grpcfed.RecordErrorToSpan(ctx1, err)
return nil, err
}
if err := def_jp_time(ctx1); err != nil {
grpcfed.RecordErrorToSpan(ctx1, err)
return nil, err
}
return nil, nil
})
grpcfed.GoWithRecover(eg, func() (any, error) {
if err := def_list_to_map(ctx1); err != nil {
grpcfed.RecordErrorToSpan(ctx1, err)
return nil, err
}
return nil, nil
})
grpcfed.GoWithRecover(eg, func() (any, error) {
if err := def_map_value(ctx1); err != nil {
grpcfed.RecordErrorToSpan(ctx1, err)
return nil, err
}
return nil, nil
})
grpcfed.GoWithRecover(eg, func() (any, error) {
if err := def_compile(ctx1); err != nil {
grpcfed.RecordErrorToSpan(ctx1, err)
return nil, err
}
if err := def_match_string(ctx1); err != nil {
grpcfed.RecordErrorToSpan(ctx1, err)
return nil, err
}
return nil, nil
})
grpcfed.GoWithRecover(eg, func() (any, error) {
if err := def_null_value(ctx1); err != nil {
grpcfed.RecordErrorToSpan(ctx1, err)
return nil, err
}
return nil, nil
})
grpcfed.GoWithRecover(eg, func() (any, error) {
if err := def_strings_join(ctx1); err != nil {
grpcfed.RecordErrorToSpan(ctx1, err)
return nil, err
}
if err := def_parse_float(ctx1); err != nil {
grpcfed.RecordErrorToSpan(ctx1, err)
return nil, err
}
return nil, nil
})
grpcfed.GoWithRecover(eg, func() (any, error) {
if err := def_pow(ctx1); err != nil {
grpcfed.RecordErrorToSpan(ctx1, err)
return nil, err
}
return nil, nil
})
grpcfed.GoWithRecover(eg, func() (any, error) {
if err := def_quote_meta(ctx1); err != nil {
grpcfed.RecordErrorToSpan(ctx1, err)
return nil, err
}
return nil, nil
})
grpcfed.GoWithRecover(eg, func() (any, error) {
if err := def_replace_all_string(ctx1); err != nil {
grpcfed.RecordErrorToSpan(ctx1, err)
return nil, err
}
return nil, nil
})
grpcfed.GoWithRecover(eg, func() (any, error) {
if err := def_fmt(ctx1); err != nil {
grpcfed.RecordErrorToSpan(ctx1, err)
return nil, err
}
if err := def_replaced(ctx1); err != nil {
grpcfed.RecordErrorToSpan(ctx1, err)
return nil, err
}
return nil, nil
})
grpcfed.GoWithRecover(eg, func() (any, error) {
if err := def_round(ctx1); err != nil {
grpcfed.RecordErrorToSpan(ctx1, err)
return nil, err
}
return nil, nil
})
grpcfed.GoWithRecover(eg, func() (any, error) {
if err := def_sorted_items(ctx1); err != nil {
grpcfed.RecordErrorToSpan(ctx1, err)
return nil, err
}
return nil, nil
})
grpcfed.GoWithRecover(eg, func() (any, error) {
if err := def_sorted_values(ctx1); err != nil {
grpcfed.RecordErrorToSpan(ctx1, err)
return nil, err
}
return nil, nil
})
grpcfed.GoWithRecover(eg, func() (any, error) {
if err := def_sqrt_double(ctx1); err != nil {
grpcfed.RecordErrorToSpan(ctx1, err)
return nil, err
}
return nil, nil
})
grpcfed.GoWithRecover(eg, func() (any, error) {
if err := def_sqrt_int(ctx1); err != nil {
grpcfed.RecordErrorToSpan(ctx1, err)
return nil, err
}
return nil, nil
})
grpcfed.GoWithRecover(eg, func() (any, error) {
if err := def_url(ctx1); err != nil {
grpcfed.RecordErrorToSpan(ctx1, err)
return nil, err
}
return nil, nil
})
grpcfed.GoWithRecover(eg, func() (any, error) {
if err := def_date(ctx1); err != nil {
grpcfed.RecordErrorToSpan(ctx1, err)
return nil, err
}
if err := def_rand_source(ctx1); err != nil {
grpcfed.RecordErrorToSpan(ctx1, err)
return nil, err
}
if err := def_fixed_rand(ctx1); err != nil {
grpcfed.RecordErrorToSpan(ctx1, err)
return nil, err
}
if err := def_uuid(ctx1); err != nil {
grpcfed.RecordErrorToSpan(ctx1, err)
return nil, err
}
if err := def_uuid_parse(ctx1); err != nil {
grpcfed.RecordErrorToSpan(ctx1, err)
return nil, err
}
return nil, nil
})
grpcfed.GoWithRecover(eg, func() (any, error) {
if err := def_date(ctx1); err != nil {
grpcfed.RecordErrorToSpan(ctx1, err)
return nil, err
}
if err := def_rand_source(ctx1); err != nil {
grpcfed.RecordErrorToSpan(ctx1, err)
return nil, err
}
if err := def_fixed_rand(ctx1); err != nil {
grpcfed.RecordErrorToSpan(ctx1, err)
return nil, err
}
if err := def_uuid(ctx1); err != nil {
grpcfed.RecordErrorToSpan(ctx1, err)
return nil, err
}
if err := def_uuid_validate(ctx1); err != nil {
grpcfed.RecordErrorToSpan(ctx1, err)
return nil, err
}
return nil, nil
})
grpcfed.GoWithRecover(eg, func() (any, error) {
if err := def_value1(ctx1); err != nil {
grpcfed.RecordErrorToSpan(ctx1, err)
return nil, err
}
return nil, nil
})
if err := eg.Wait(); err != nil {
return nil, err
}
// assign named parameters to message arguments to pass to the custom resolver.
req.FederationService_Federation_GetPostResponseVariable.A = value.vars.A
req.FederationService_Federation_GetPostResponseVariable.Any = value.vars.Any
req.FederationService_Federation_GetPostResponseVariable.Compile = value.vars.Compile
req.FederationService_Federation_GetPostResponseVariable.Date = value.vars.Date
req.FederationService_Federation_GetPostResponseVariable.E = value.vars.E
req.FederationService_Federation_GetPostResponseVariable.FindStringSubmatch = value.vars.FindStringSubmatch
req.FederationService_Federation_GetPostResponseVariable.FixedRand = value.vars.FixedRand
req.FederationService_Federation_GetPostResponseVariable.Flatten = value.vars.Flatten
req.FederationService_Federation_GetPostResponseVariable.Floor = value.vars.Floor
req.FederationService_Federation_GetPostResponseVariable.Fmt = value.vars.Fmt
req.FederationService_Federation_GetPostResponseVariable.JpTime = value.vars.JpTime
req.FederationService_Federation_GetPostResponseVariable.ListToMap = value.vars.ListToMap
req.FederationService_Federation_GetPostResponseVariable.Loc = value.vars.Loc
req.FederationService_Federation_GetPostResponseVariable.MapValue = value.vars.MapValue
req.FederationService_Federation_GetPostResponseVariable.MatchString = value.vars.MatchString
req.FederationService_Federation_GetPostResponseVariable.MustCompile = value.vars.MustCompile
req.FederationService_Federation_GetPostResponseVariable.NullValue = value.vars.NullValue
req.FederationService_Federation_GetPostResponseVariable.ParseFloat = value.vars.ParseFloat
req.FederationService_Federation_GetPostResponseVariable.Post = value.vars.Post
req.FederationService_Federation_GetPostResponseVariable.Pow = value.vars.Pow
req.FederationService_Federation_GetPostResponseVariable.QuoteMeta = value.vars.QuoteMeta
req.FederationService_Federation_GetPostResponseVariable.RandSource = value.vars.RandSource
req.FederationService_Federation_GetPostResponseVariable.ReplaceAllString = value.vars.ReplaceAllString
req.FederationService_Federation_GetPostResponseVariable.Replaced = value.vars.Replaced
req.FederationService_Federation_GetPostResponseVariable.Round = value.vars.Round
req.FederationService_Federation_GetPostResponseVariable.SortedItems = value.vars.SortedItems
req.FederationService_Federation_GetPostResponseVariable.SortedValues = value.vars.SortedValues
req.FederationService_Federation_GetPostResponseVariable.SqrtDouble = value.vars.SqrtDouble
req.FederationService_Federation_GetPostResponseVariable.SqrtInt = value.vars.SqrtInt
req.FederationService_Federation_GetPostResponseVariable.StringsJoin = value.vars.StringsJoin
req.FederationService_Federation_GetPostResponseVariable.Url = value.vars.Url
req.FederationService_Federation_GetPostResponseVariable.Uuid = value.vars.Uuid
req.FederationService_Federation_GetPostResponseVariable.UuidParse = value.vars.UuidParse
req.FederationService_Federation_GetPostResponseVariable.UuidValidate = value.vars.UuidValidate
req.FederationService_Federation_GetPostResponseVariable.Value1 = value.vars.Value1
// create a message value to be returned.
ret := &GetPostResponse{}
// field binding section.
// (grpc.federation.field).by = "post"
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[*Post]{
Value: value,
Expr: `post`,
CacheIndex: 48,
Setter: func(v *Post) error {
ret.Post = v
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
// (grpc.federation.field).by = "'hello'"
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[string]{
Value: value,
Expr: `'hello'`,
CacheIndex: 49,
Setter: func(v string) error {
ret.Str = v
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
// (grpc.federation.field).by = "uuid.string()"
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[string]{
Value: value,
Expr: `uuid.string()`,
CacheIndex: 50,
Setter: func(v string) error {
ret.Uuid = v
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
// (grpc.federation.field).by = "loc.string()"
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[string]{
Value: value,
Expr: `loc.string()`,
CacheIndex: 51,
Setter: func(v string) error {
ret.Loc = v
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
// (grpc.federation.field).by = "value1"
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[string]{
Value: value,
Expr: `value1`,
CacheIndex: 52,
Setter: func(v string) error {
ret.Value1 = v
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
// (grpc.federation.field).by = "Item.ItemType.name(Item.ItemType.ITEM_TYPE_1)"
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[string]{
Value: value,
Expr: `Item.ItemType.name(Item.ItemType.ITEM_TYPE_1)`,
CacheIndex: 53,
Setter: func(v string) error {
ret.ItemTypeName = v
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
// (grpc.federation.field).by = "Item.Location.LocationType.name(Item.Location.LocationType.LOCATION_TYPE_1)"
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[string]{
Value: value,
Expr: `Item.Location.LocationType.name(Item.Location.LocationType.LOCATION_TYPE_1)`,
CacheIndex: 54,
Setter: func(v string) error {
ret.LocationTypeName = v
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
// (grpc.federation.field).by = "user.Item.ItemType.name(user.Item.ItemType.ITEM_TYPE_2)"
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[string]{
Value: value,
Expr: `user.Item.ItemType.name(user.Item.ItemType.ITEM_TYPE_2)`,
CacheIndex: 55,
Setter: func(v string) error {
ret.UserItemTypeName = v
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
// (grpc.federation.field).by = "user.Item.ItemType.value('ITEM_TYPE_1')"
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[user.Item_ItemType]{
Value: value,
Expr: `user.Item.ItemType.value('ITEM_TYPE_1')`,
CacheIndex: 56,
Setter: func(v user.Item_ItemType) error {
itemTypeValueEnumValue, err := s.cast_User_Item_ItemType__to__Federation_Item_ItemType(v)
if err != nil {
return err
}
ret.ItemTypeValueEnum = itemTypeValueEnumValue
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
// (grpc.federation.field).by = "user.Item.ItemType.value('ITEM_TYPE_1')"
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[user.Item_ItemType]{
Value: value,
Expr: `user.Item.ItemType.value('ITEM_TYPE_1')`,
CacheIndex: 57,
Setter: func(v user.Item_ItemType) error {
itemTypeValueIntValue, err := s.cast_User_Item_ItemType__to__int32(v)
if err != nil {
return err
}
ret.ItemTypeValueInt = itemTypeValueIntValue
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
// (grpc.federation.field).by = "user.Item.ItemType.from(1)"
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[user.Item_ItemType]{
Value: value,
Expr: `user.Item.ItemType.from(1)`,
CacheIndex: 58,
Setter: func(v user.Item_ItemType) error {
itemTypeValueCastValue, err := s.cast_User_Item_ItemType__to__Federation_Item_ItemType(v)
if err != nil {
return err
}
ret.ItemTypeValueCast = itemTypeValueCastValue
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
// (grpc.federation.field).by = "Item.Location.LocationType.value('LOCATION_TYPE_1')"
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[Item_Location_LocationType]{
Value: value,
Expr: `Item.Location.LocationType.value('LOCATION_TYPE_1')`,
CacheIndex: 59,
Setter: func(v Item_Location_LocationType) error {
locationTypeValueValue, err := s.cast_Federation_Item_Location_LocationType__to__int32(v)
if err != nil {
return err
}
ret.LocationTypeValue = locationTypeValueValue
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
// (grpc.federation.field).by = "user.Item.ItemType.value('ITEM_TYPE_2')"
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[user.Item_ItemType]{
Value: value,
Expr: `user.Item.ItemType.value('ITEM_TYPE_2')`,
CacheIndex: 60,
Setter: func(v user.Item_ItemType) error {
userItemTypeValueValue, err := s.cast_User_Item_ItemType__to__int32(v)
if err != nil {
return err
}
ret.UserItemTypeValue = userItemTypeValueValue
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
// (grpc.federation.field).by = "a"
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[*A]{
Value: value,
Expr: `a`,
CacheIndex: 61,
Setter: func(v *A) error {
ret.A = v
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
// (grpc.federation.field).by = "sorted_values"
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[[]int32]{
Value: value,
Expr: `sorted_values`,
CacheIndex: 62,
Setter: func(v []int32) error {
ret.SortedValues = v
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
// (grpc.federation.field).by = "sorted_items"
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[[]*user.Item]{
Value: value,
Expr: `sorted_items`,
CacheIndex: 63,
Setter: func(v []*user.Item) error {
sortedItemsValue, err := s.cast_repeated_User_Item__to__repeated_Federation_Item(v)
if err != nil {
return err
}
ret.SortedItems = sortedItemsValue
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
// (grpc.federation.field).by = "map_value"
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[map[int64]string]{
Value: value,
Expr: `map_value`,
CacheIndex: 64,
Setter: func(v map[int64]string) error {
mapValueValue, err := s.cast_map_int64_string__to__map_int32_string(v)
if err != nil {
return err
}
ret.MapValue = mapValueValue
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
// (grpc.federation.field).by = "google.protobuf.DoubleValue{value: 1.23}"
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[*wrapperspb.DoubleValue]{
Value: value,
Expr: `google.protobuf.DoubleValue{value: 1.23}`,
CacheIndex: 65,
Setter: func(v *wrapperspb.DoubleValue) error {
doubleWrapperValueValue, err := s.cast_Google_Protobuf_DoubleValue__to__Google_Protobuf_DoubleValue(v)
if err != nil {
return err
}
ret.DoubleWrapperValue = doubleWrapperValueValue
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
// (grpc.federation.field).by = "google.protobuf.FloatValue{value: 3.45}"
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[*wrapperspb.DoubleValue]{
Value: value,
Expr: `google.protobuf.FloatValue{value: 3.45}`,
CacheIndex: 66,
Setter: func(v *wrapperspb.DoubleValue) error {
floatWrapperValueValue, err := s.cast_Google_Protobuf_DoubleValue__to__Google_Protobuf_FloatValue(v)
if err != nil {
return err
}
ret.FloatWrapperValue = floatWrapperValueValue
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
// (grpc.federation.field).by = "google.protobuf.Int64Value{value: 1}"
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[*wrapperspb.Int64Value]{
Value: value,
Expr: `google.protobuf.Int64Value{value: 1}`,
CacheIndex: 67,
Setter: func(v *wrapperspb.Int64Value) error {
i64WrapperValueValue, err := s.cast_Google_Protobuf_Int64Value__to__Google_Protobuf_Int64Value(v)
if err != nil {
return err
}
ret.I64WrapperValue = i64WrapperValueValue
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
// (grpc.federation.field).by = "google.protobuf.UInt64Value{value: uint(2)}"
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[*wrapperspb.UInt64Value]{
Value: value,
Expr: `google.protobuf.UInt64Value{value: uint(2)}`,
CacheIndex: 68,
Setter: func(v *wrapperspb.UInt64Value) error {
u64WrapperValueValue, err := s.cast_Google_Protobuf_UInt64Value__to__Google_Protobuf_UInt64Value(v)
if err != nil {
return err
}
ret.U64WrapperValue = u64WrapperValueValue
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
// (grpc.federation.field).by = "google.protobuf.Int32Value{value: 3}"
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[*wrapperspb.Int64Value]{
Value: value,
Expr: `google.protobuf.Int32Value{value: 3}`,
CacheIndex: 69,
Setter: func(v *wrapperspb.Int64Value) error {
i32WrapperValueValue, err := s.cast_Google_Protobuf_Int64Value__to__Google_Protobuf_Int32Value(v)
if err != nil {
return err
}
ret.I32WrapperValue = i32WrapperValueValue
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
// (grpc.federation.field).by = "google.protobuf.UInt32Value{value: uint(4)}"
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[*wrapperspb.UInt64Value]{
Value: value,
Expr: `google.protobuf.UInt32Value{value: uint(4)}`,
CacheIndex: 70,
Setter: func(v *wrapperspb.UInt64Value) error {
u32WrapperValueValue, err := s.cast_Google_Protobuf_UInt64Value__to__Google_Protobuf_UInt32Value(v)
if err != nil {
return err
}
ret.U32WrapperValue = u32WrapperValueValue
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
// (grpc.federation.field).by = "google.protobuf.BoolValue{value: true}"
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[*wrapperspb.BoolValue]{
Value: value,
Expr: `google.protobuf.BoolValue{value: true}`,
CacheIndex: 71,
Setter: func(v *wrapperspb.BoolValue) error {
boolWrapperValueValue, err := s.cast_Google_Protobuf_BoolValue__to__Google_Protobuf_BoolValue(v)
if err != nil {
return err
}
ret.BoolWrapperValue = boolWrapperValueValue
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
// (grpc.federation.field).by = "google.protobuf.StringValue{value: 'hello'}"
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[*wrapperspb.StringValue]{
Value: value,
Expr: `google.protobuf.StringValue{value: 'hello'}`,
CacheIndex: 72,
Setter: func(v *wrapperspb.StringValue) error {
stringWrapperValueValue, err := s.cast_Google_Protobuf_StringValue__to__Google_Protobuf_StringValue(v)
if err != nil {
return err
}
ret.StringWrapperValue = stringWrapperValueValue
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
// (grpc.federation.field).by = "google.protobuf.BytesValue{value: bytes('world')}"
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[*wrapperspb.BytesValue]{
Value: value,
Expr: `google.protobuf.BytesValue{value: bytes('world')}`,
CacheIndex: 73,
Setter: func(v *wrapperspb.BytesValue) error {
bytesWrapperValueValue, err := s.cast_Google_Protobuf_BytesValue__to__Google_Protobuf_BytesValue(v)
if err != nil {
return err
}
ret.BytesWrapperValue = bytesWrapperValueValue
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
// (grpc.federation.field).by = "'hello\\nworld'"
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[string]{
Value: value,
Expr: `'hello\nworld'`,
CacheIndex: 74,
Setter: func(v string) error {
ret.Hello = v
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
// (grpc.federation.field).by = "null"
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[*timestamppb.Timestamp]{
Value: value,
Expr: `null`,
CacheIndex: 75,
Setter: func(v *timestamppb.Timestamp) error {
ret.NullTimestamp = v
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
// (grpc.federation.field).by = "null_value"
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[*timestamppb.Timestamp]{
Value: value,
Expr: `null_value`,
CacheIndex: 76,
Setter: func(v *timestamppb.Timestamp) error {
ret.NullTimestamp2 = v
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
// (grpc.federation.field).by = "true ? null : google.protobuf.Timestamp{}"
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[*timestamppb.Timestamp]{
Value: value,
Expr: `true ? null : google.protobuf.Timestamp{}`,
CacheIndex: 77,
Setter: func(v *timestamppb.Timestamp) error {
ret.NullTimestamp3 = v
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
// (grpc.federation.field).by = "jp_time.location().string()"
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[string]{
Value: value,
Expr: `jp_time.location().string()`,
CacheIndex: 78,
Setter: func(v string) error {
ret.JpLoc = v
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
// (grpc.federation.field).by = "strings_join"
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[string]{
Value: value,
Expr: `strings_join`,
CacheIndex: 79,
Setter: func(v string) error {
ret.StringsJoin = v
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
// (grpc.federation.field).by = "parse_float"
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[float64]{
Value: value,
Expr: `parse_float`,
CacheIndex: 80,
Setter: func(v float64) error {
ret.ParseFloat = v
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
// (grpc.federation.field).by = "url.userinfo().username()"
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[string]{
Value: value,
Expr: `url.userinfo().username()`,
CacheIndex: 81,
Setter: func(v string) error {
ret.UrlUserName = v
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
// (grpc.federation.field).by = "e"
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[Item_ItemType]{
Value: value,
Expr: `e`,
CacheIndex: 82,
Setter: func(v Item_ItemType) error {
ret.EnumValue = v
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
// (grpc.federation.field).by = "Item.ItemType.attr(e, 'en')"
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[string]{
Value: value,
Expr: `Item.ItemType.attr(e, 'en')`,
CacheIndex: 83,
Setter: func(v string) error {
ret.EnumValueStr = v
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
// (grpc.federation.field).by = "sqrt_double"
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[float64]{
Value: value,
Expr: `sqrt_double`,
CacheIndex: 84,
Setter: func(v float64) error {
ret.SqrtDouble = v
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
// (grpc.federation.field).by = "sqrt_int"
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[float64]{
Value: value,
Expr: `sqrt_int`,
CacheIndex: 85,
Setter: func(v float64) error {
ret.SqrtInt = v
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
// (grpc.federation.field).by = "pow"
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[float64]{
Value: value,
Expr: `pow`,
CacheIndex: 86,
Setter: func(v float64) error {
ret.Pow = v
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
// (grpc.federation.field).by = "floor"
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[float64]{
Value: value,
Expr: `floor`,
CacheIndex: 87,
Setter: func(v float64) error {
ret.Floor = v
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
// (grpc.federation.field).by = "flatten"
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[[]int64]{
Value: value,
Expr: `flatten`,
CacheIndex: 88,
Setter: func(v []int64) error {
ret.Flatten = v
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
// (grpc.federation.field).by = "round"
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[float64]{
Value: value,
Expr: `round`,
CacheIndex: 89,
Setter: func(v float64) error {
ret.Round = v
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
// (grpc.federation.field).by = "any"
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[*anypb.Any]{
Value: value,
Expr: `any`,
CacheIndex: 90,
Setter: func(v *anypb.Any) error {
anyValue, err := s.cast_Google_Protobuf_Any__to__Google_Protobuf_Any(v)
if err != nil {
return err
}
ret.Any = anyValue
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
// (grpc.federation.field).by = "replaced"
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[string]{
Value: value,
Expr: `replaced`,
CacheIndex: 91,
Setter: func(v string) error {
ret.Replaced = v
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
// (grpc.federation.field).by = "list_to_map"
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[map[int64]int64]{
Value: value,
Expr: `list_to_map`,
CacheIndex: 92,
Setter: func(v map[int64]int64) error {
listToMapValue, err := s.cast_map_int64_int64__to__map_int32_int32(v)
if err != nil {
return err
}
ret.ListToMap = listToMapValue
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
// (grpc.federation.field).by = "uuid_parse.string()"
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[string]{
Value: value,
Expr: `uuid_parse.string()`,
CacheIndex: 93,
Setter: func(v string) error {
ret.UuidParse = v
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
// (grpc.federation.field).by = "uuid_validate"
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[bool]{
Value: value,
Expr: `uuid_validate`,
CacheIndex: 94,
Setter: func(v bool) error {
ret.UuidValidate = v
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
// (grpc.federation.field).by = "compile.string()"
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[string]{
Value: value,
Expr: `compile.string()`,
CacheIndex: 95,
Setter: func(v string) error {
ret.Compile = v
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
// (grpc.federation.field).by = "must_compile.string()"
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[string]{
Value: value,
Expr: `must_compile.string()`,
CacheIndex: 96,
Setter: func(v string) error {
ret.MustCompile = v
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
// (grpc.federation.field).by = "quote_meta"
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[string]{
Value: value,
Expr: `quote_meta`,
CacheIndex: 97,
Setter: func(v string) error {
ret.QuoteMeta = v
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
// (grpc.federation.field).by = "find_string_submatch"
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[[]string]{
Value: value,
Expr: `find_string_submatch`,
CacheIndex: 98,
Setter: func(v []string) error {
ret.FindStringSubmatch = v
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
// (grpc.federation.field).by = "match_string"
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[bool]{
Value: value,
Expr: `match_string`,
CacheIndex: 99,
Setter: func(v bool) error {
ret.MatchString = v
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
// (grpc.federation.field).by = "replace_all_string"
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[string]{
Value: value,
Expr: `replace_all_string`,
CacheIndex: 100,
Setter: func(v string) error {
ret.ReplaceAllString = v
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
grpcfed.Logger(ctx).DebugContext(ctx, "resolved federation.GetPostResponse", slog.Any("federation.GetPostResponse", s.logvalue_Federation_GetPostResponse(ret)))
return ret, nil
}
// resolve_Federation_Post resolve "federation.Post" message.
func (s *FederationService) resolve_Federation_Post(ctx context.Context, req *FederationService_Federation_PostArgument) (*Post, error) {
ctx, span := s.tracer.Start(ctx, "federation.Post")
defer span.End()
ctx = grpcfed.WithLogger(ctx, grpcfed.Logger(ctx), grpcfed.LogAttrs(ctx)...)
grpcfed.Logger(ctx).DebugContext(ctx, "resolve federation.Post", slog.Any("message_args", s.logvalue_Federation_PostArgument(req)))
type localValueType struct {
*grpcfed.LocalValue
vars struct {
Post *post.Post
Res *post.GetPostResponse
User *User
}
}
value := &localValueType{LocalValue: grpcfed.NewLocalValue(ctx, s.celEnvOpts, "grpc.federation.private.federation.PostArgument", req)}
ctx = grpcfed.WithLocalValue(ctx, value.LocalValue)
/*
def {
name: "res"
call {
method: "post.PostService/GetPost"
request { field: "id", by: "$.id" }
}
}
*/
def_res := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[*post.GetPostResponse, *localValueType]{
Name: `res`,
Type: grpcfed.CELObjectType("post.GetPostResponse"),
Setter: func(value *localValueType, v *post.GetPostResponse) error {
value.vars.Res = v
return nil
},
Message: func(ctx context.Context, value *localValueType) (any, error) {
args := &post.GetPostRequest{}
// { field: "id", by: "$.id" }
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[string]{
Value: value,
Expr: `$.id`,
CacheIndex: 101,
Setter: func(v string) error {
args.Id = v
return nil
},
}); err != nil {
return nil, err
}
grpcfed.Logger(ctx).DebugContext(ctx, "call post.PostService/GetPost", slog.Any("post.GetPostRequest", s.logvalue_Post_GetPostRequest(args)))
ret, err := grpcfed.WithTimeout[post.GetPostResponse](ctx, "post.PostService/GetPost", 10000000000 /* 10s */, func(ctx context.Context) (*post.GetPostResponse, error) {
b := grpcfed.NewConstantBackOff(2000000000) /* 2s */
b = grpcfed.BackOffWithMaxRetries(b, 3)
b = grpcfed.BackOffWithContext(b, ctx)
return grpcfed.WithRetry(ctx, &grpcfed.RetryParam[post.GetPostResponse]{
Value: value,
If: `true`,
CacheIndex: 102,
BackOff: b,
Body: func() (*post.GetPostResponse, error) {
return s.client.Post_PostServiceClient.GetPost(ctx, args)
},
})
})
if err != nil {
if err := s.errorHandler(ctx, FederationService_DependentMethod_Post_PostService_GetPost, err); err != nil {
return nil, grpcfed.NewErrorWithLogAttrs(err, slog.LevelError, grpcfed.LogAttrs(ctx))
}
}
return ret, nil
},
})
}
/*
def {
name: "post"
autobind: true
by: "res.post"
}
*/
def_post := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[*post.Post, *localValueType]{
Name: `post`,
Type: grpcfed.CELObjectType("post.Post"),
Setter: func(value *localValueType, v *post.Post) error {
value.vars.Post = v
return nil
},
By: `res.post`,
ByCacheIndex: 103,
})
}
/*
def {
name: "user"
message {
name: "User"
args { inline: "post" }
}
}
*/
def_user := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[*User, *localValueType]{
Name: `user`,
Type: grpcfed.CELObjectType("federation.User"),
Setter: func(value *localValueType, v *User) error {
value.vars.User = v
return nil
},
Message: func(ctx context.Context, value *localValueType) (any, error) {
args := &FederationService_Federation_UserArgument{}
// { inline: "post" }
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[*post.Post]{
Value: value,
Expr: `post`,
CacheIndex: 104,
Setter: func(v *post.Post) error {
args.Id = v.GetId()
args.Title = v.GetTitle()
args.Content = v.GetContent()
args.UserId = v.GetUserId()
return nil
},
}); err != nil {
return nil, err
}
ret, err := s.resolve_Federation_User(ctx, args)
if err != nil {
return nil, err
}
return ret, nil
},
})
}
if err := def_res(ctx); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
if err := def_post(ctx); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
if err := def_user(ctx); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
// assign named parameters to message arguments to pass to the custom resolver.
req.FederationService_Federation_PostVariable.Post = value.vars.Post
req.FederationService_Federation_PostVariable.Res = value.vars.Res
req.FederationService_Federation_PostVariable.User = value.vars.User
// create a message value to be returned.
ret := &Post{}
// field binding section.
ret.Id = value.vars.Post.GetId() // { name: "post", autobind: true }
ret.Title = value.vars.Post.GetTitle() // { name: "post", autobind: true }
ret.Content = value.vars.Post.GetContent() // { name: "post", autobind: true }
// (grpc.federation.field).by = "user"
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[*User]{
Value: value,
Expr: `user`,
CacheIndex: 105,
Setter: func(v *User) error {
ret.User = v
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
grpcfed.Logger(ctx).DebugContext(ctx, "resolved federation.Post", slog.Any("federation.Post", s.logvalue_Federation_Post(ret)))
return ret, nil
}
// resolve_Federation_User resolve "federation.User" message.
func (s *FederationService) resolve_Federation_User(ctx context.Context, req *FederationService_Federation_UserArgument) (*User, error) {
ctx, span := s.tracer.Start(ctx, "federation.User")
defer span.End()
ctx = grpcfed.WithLogger(ctx, grpcfed.Logger(ctx), grpcfed.LogAttrs(ctx)...)
grpcfed.Logger(ctx).DebugContext(ctx, "resolve federation.User", slog.Any("message_args", s.logvalue_Federation_UserArgument(req)))
type localValueType struct {
*grpcfed.LocalValue
vars struct {
Res *user.GetUserResponse
User *user.User
}
}
value := &localValueType{LocalValue: grpcfed.NewLocalValue(ctx, s.celEnvOpts, "grpc.federation.private.federation.UserArgument", req)}
ctx = grpcfed.WithLocalValue(ctx, value.LocalValue)
/*
def {
name: "res"
call {
method: "user.UserService/GetUser"
request: [
{ field: "id", by: "$.user_id" },
{ field: "type", by: "user.Item.ItemType.value('ITEM_TYPE_1')" }
]
}
}
*/
def_res := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[*user.GetUserResponse, *localValueType]{
Name: `res`,
Type: grpcfed.CELObjectType("user.GetUserResponse"),
Setter: func(value *localValueType, v *user.GetUserResponse) error {
value.vars.Res = v
return nil
},
Message: func(ctx context.Context, value *localValueType) (any, error) {
args := &user.GetUserRequest{}
// { field: "id", by: "$.user_id" }
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[string]{
Value: value,
Expr: `$.user_id`,
CacheIndex: 106,
Setter: func(v string) error {
args.Id = v
return nil
},
}); err != nil {
return nil, err
}
// { field: "type", by: "user.Item.ItemType.value('ITEM_TYPE_1')" }
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[user.Item_ItemType]{
Value: value,
Expr: `user.Item.ItemType.value('ITEM_TYPE_1')`,
CacheIndex: 107,
Setter: func(v user.Item_ItemType) error {
typeValue, err := s.cast_User_Item_ItemType__to__int32(v)
if err != nil {
return err
}
args.Type = typeValue
return nil
},
}); err != nil {
return nil, err
}
grpcfed.Logger(ctx).DebugContext(ctx, "call user.UserService/GetUser", slog.Any("user.GetUserRequest", s.logvalue_User_GetUserRequest(args)))
ret, err := grpcfed.WithTimeout[user.GetUserResponse](ctx, "user.UserService/GetUser", 20000000000 /* 20s */, func(ctx context.Context) (*user.GetUserResponse, error) {
b := grpcfed.NewExponentialBackOff(&grpcfed.ExponentialBackOffConfig{
InitialInterval: 1000000000, /* 1s */
RandomizationFactor: 0.7,
Multiplier: 1.7,
MaxInterval: 30000000000, /* 30s */
MaxElapsedTime: 20000000000, /* 20s */
})
b = grpcfed.BackOffWithMaxRetries(b, 3)
b = grpcfed.BackOffWithContext(b, ctx)
return grpcfed.WithRetry(ctx, &grpcfed.RetryParam[user.GetUserResponse]{
Value: value,
If: `true`,
CacheIndex: 108,
BackOff: b,
Body: func() (*user.GetUserResponse, error) {
return s.client.User_UserServiceClient.GetUser(ctx, args)
},
})
})
if err != nil {
if err := s.errorHandler(ctx, FederationService_DependentMethod_User_UserService_GetUser, err); err != nil {
return nil, grpcfed.NewErrorWithLogAttrs(err, slog.LevelError, grpcfed.LogAttrs(ctx))
}
}
return ret, nil
},
})
}
/*
def {
name: "user"
autobind: true
by: "res.user"
}
*/
def_user := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[*user.User, *localValueType]{
Name: `user`,
Type: grpcfed.CELObjectType("user.User"),
Setter: func(value *localValueType, v *user.User) error {
value.vars.User = v
return nil
},
By: `res.user`,
ByCacheIndex: 109,
})
}
if err := def_res(ctx); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
if err := def_user(ctx); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
// assign named parameters to message arguments to pass to the custom resolver.
req.FederationService_Federation_UserVariable.Res = value.vars.Res
req.FederationService_Federation_UserVariable.User = value.vars.User
// create a message value to be returned.
ret := &User{}
// field binding section.
ret.Id = value.vars.User.GetId() // { name: "user", autobind: true }
ret.Name = value.vars.User.GetName() // { name: "user", autobind: true }
{
itemsValue, err := s.cast_repeated_User_Item__to__repeated_Federation_Item(value.vars.User.GetItems()) // { name: "user", autobind: true }
if err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
ret.Items = itemsValue
}
ret.Profile = value.vars.User.GetProfile() // { name: "user", autobind: true }
if false {
// For code generation reasons, we're using a loop to generate the oneof conditional branches,
// so to avoid treating the first element specially, we always generate if branch with false condition.
} else if _, ok := value.vars.User.Attr.(*user.User_AttrA_); ok {
attrValue, err := s.cast_User_User_AttrA___to__Federation_User_AttrA_(value.vars.User.Attr.(*user.User_AttrA_))
if err != nil {
return nil, err
}
ret.Attr = attrValue
} else if _, ok := value.vars.User.Attr.(*user.User_B); ok {
attrValue, err := s.cast_User_User_B__to__Federation_User_B(value.vars.User.Attr.(*user.User_B))
if err != nil {
return nil, err
}
ret.Attr = attrValue
}
grpcfed.Logger(ctx).DebugContext(ctx, "resolved federation.User", slog.Any("federation.User", s.logvalue_Federation_User(ret)))
return ret, nil
}
// cast_Federation_A_B_C__to__Federation_A_OptC cast from "federation.A.B.C" to "federation.A.opt_c".
func (s *FederationService) cast_Federation_A_B_C__to__Federation_A_OptC(from *A_B_C) (*A_OptC, error) {
if from == nil {
return nil, nil
}
typeValue := from.GetType()
ret := &A_B_C{
Type: typeValue,
}
return &A_OptC{
OptC: ret,
}, nil
}
// cast_Federation_Item_Location_LocationType__to__int32 cast from "federation.Item.Location.LocationType" to "int32".
func (s *FederationService) cast_Federation_Item_Location_LocationType__to__int32(from Item_Location_LocationType) (int32, error) {
return int32(from), nil
}
// cast_Google_Protobuf_Any__to__Google_Protobuf_Any cast from "google.protobuf.Any" to "google.protobuf.Any".
func (s *FederationService) cast_Google_Protobuf_Any__to__Google_Protobuf_Any(from *anypb.Any) (*anypb.Any, error) {
if from == nil {
return nil, nil
}
typeUrlValue := from.GetTypeUrl()
valueValue := from.GetValue()
ret := &anypb.Any{
TypeUrl: typeUrlValue,
Value: valueValue,
}
return ret, nil
}
// cast_Google_Protobuf_BoolValue__to__Google_Protobuf_BoolValue cast from "google.protobuf.BoolValue" to "google.protobuf.BoolValue".
func (s *FederationService) cast_Google_Protobuf_BoolValue__to__Google_Protobuf_BoolValue(from *wrapperspb.BoolValue) (*wrapperspb.BoolValue, error) {
if from == nil {
return nil, nil
}
valueValue := from.GetValue()
ret := &wrapperspb.BoolValue{
Value: valueValue,
}
return ret, nil
}
// cast_Google_Protobuf_BytesValue__to__Google_Protobuf_BytesValue cast from "google.protobuf.BytesValue" to "google.protobuf.BytesValue".
func (s *FederationService) cast_Google_Protobuf_BytesValue__to__Google_Protobuf_BytesValue(from *wrapperspb.BytesValue) (*wrapperspb.BytesValue, error) {
if from == nil {
return nil, nil
}
valueValue := from.GetValue()
ret := &wrapperspb.BytesValue{
Value: valueValue,
}
return ret, nil
}
// cast_Google_Protobuf_DoubleValue__to__Google_Protobuf_DoubleValue cast from "google.protobuf.DoubleValue" to "google.protobuf.DoubleValue".
func (s *FederationService) cast_Google_Protobuf_DoubleValue__to__Google_Protobuf_DoubleValue(from *wrapperspb.DoubleValue) (*wrapperspb.DoubleValue, error) {
if from == nil {
return nil, nil
}
valueValue := from.GetValue()
ret := &wrapperspb.DoubleValue{
Value: valueValue,
}
return ret, nil
}
// cast_Google_Protobuf_DoubleValue__to__Google_Protobuf_FloatValue cast from "google.protobuf.DoubleValue" to "google.protobuf.FloatValue".
func (s *FederationService) cast_Google_Protobuf_DoubleValue__to__Google_Protobuf_FloatValue(from *wrapperspb.DoubleValue) (*wrapperspb.FloatValue, error) {
if from == nil {
return nil, nil
}
valueValue, err := s.cast_float64__to__float32(from.GetValue())
if err != nil {
return nil, err
}
ret := &wrapperspb.FloatValue{
Value: valueValue,
}
return ret, nil
}
// cast_Google_Protobuf_Int64Value__to__Google_Protobuf_Int32Value cast from "google.protobuf.Int64Value" to "google.protobuf.Int32Value".
func (s *FederationService) cast_Google_Protobuf_Int64Value__to__Google_Protobuf_Int32Value(from *wrapperspb.Int64Value) (*wrapperspb.Int32Value, error) {
if from == nil {
return nil, nil
}
valueValue, err := s.cast_int64__to__int32(from.GetValue())
if err != nil {
return nil, err
}
ret := &wrapperspb.Int32Value{
Value: valueValue,
}
return ret, nil
}
// cast_Google_Protobuf_Int64Value__to__Google_Protobuf_Int64Value cast from "google.protobuf.Int64Value" to "google.protobuf.Int64Value".
func (s *FederationService) cast_Google_Protobuf_Int64Value__to__Google_Protobuf_Int64Value(from *wrapperspb.Int64Value) (*wrapperspb.Int64Value, error) {
if from == nil {
return nil, nil
}
valueValue := from.GetValue()
ret := &wrapperspb.Int64Value{
Value: valueValue,
}
return ret, nil
}
// cast_Google_Protobuf_StringValue__to__Google_Protobuf_StringValue cast from "google.protobuf.StringValue" to "google.protobuf.StringValue".
func (s *FederationService) cast_Google_Protobuf_StringValue__to__Google_Protobuf_StringValue(from *wrapperspb.StringValue) (*wrapperspb.StringValue, error) {
if from == nil {
return nil, nil
}
valueValue := from.GetValue()
ret := &wrapperspb.StringValue{
Value: valueValue,
}
return ret, nil
}
// cast_Google_Protobuf_UInt64Value__to__Google_Protobuf_UInt32Value cast from "google.protobuf.UInt64Value" to "google.protobuf.UInt32Value".
func (s *FederationService) cast_Google_Protobuf_UInt64Value__to__Google_Protobuf_UInt32Value(from *wrapperspb.UInt64Value) (*wrapperspb.UInt32Value, error) {
if from == nil {
return nil, nil
}
valueValue, err := s.cast_uint64__to__uint32(from.GetValue())
if err != nil {
return nil, err
}
ret := &wrapperspb.UInt32Value{
Value: valueValue,
}
return ret, nil
}
// cast_Google_Protobuf_UInt64Value__to__Google_Protobuf_UInt64Value cast from "google.protobuf.UInt64Value" to "google.protobuf.UInt64Value".
func (s *FederationService) cast_Google_Protobuf_UInt64Value__to__Google_Protobuf_UInt64Value(from *wrapperspb.UInt64Value) (*wrapperspb.UInt64Value, error) {
if from == nil {
return nil, nil
}
valueValue := from.GetValue()
ret := &wrapperspb.UInt64Value{
Value: valueValue,
}
return ret, nil
}
// cast_User_Item_ItemType__to__Federation_Item_ItemType cast from "user.Item.ItemType" to "federation.Item.ItemType".
func (s *FederationService) cast_User_Item_ItemType__to__Federation_Item_ItemType(from user.Item_ItemType) (Item_ItemType, error) {
var ret Item_ItemType
switch from {
case user.Item_ITEM_TYPE_UNSPECIFIED:
ret = Item_ITEM_TYPE_UNSPECIFIED
case user.Item_ITEM_TYPE_1:
ret = Item_ITEM_TYPE_1
case user.Item_ITEM_TYPE_2:
ret = Item_ITEM_TYPE_2
case user.Item_ITEM_TYPE_3:
ret = Item_ITEM_TYPE_3
default:
ret = 0
}
return ret, nil
}
// cast_User_Item_ItemType__to__int32 cast from "user.Item.ItemType" to "int32".
func (s *FederationService) cast_User_Item_ItemType__to__int32(from user.Item_ItemType) (int32, error) {
return int32(from), nil
}
// cast_User_Item_Location_AddrA___to__Federation_Item_Location_AddrA_ cast from "user.Item.Location.addr_a" to "federation.Item.Location.addr_a".
func (s *FederationService) cast_User_Item_Location_AddrA___to__Federation_Item_Location_AddrA_(from *user.Item_Location_AddrA_) (*Item_Location_AddrA_, error) {
if from == nil {
return nil, nil
}
addrAValue, err := s.cast_User_Item_Location_AddrA__to__Federation_Item_Location_AddrA(from.AddrA)
if err != nil {
return nil, err
}
return &Item_Location_AddrA_{AddrA: addrAValue}, nil
}
// cast_User_Item_Location_AddrA__to__Federation_Item_Location_AddrA cast from "user.Item.Location.AddrA" to "federation.Item.Location.AddrA".
func (s *FederationService) cast_User_Item_Location_AddrA__to__Federation_Item_Location_AddrA(from *user.Item_Location_AddrA) (*Item_Location_AddrA, error) {
if from == nil {
return nil, nil
}
fooValue := from.GetFoo()
ret := &Item_Location_AddrA{
Foo: fooValue,
}
return ret, nil
}
// cast_User_Item_Location_AddrB__to__Federation_Item_Location_AddrB cast from "user.Item.Location.AddrB" to "federation.Item.Location.AddrB".
func (s *FederationService) cast_User_Item_Location_AddrB__to__Federation_Item_Location_AddrB(from *user.Item_Location_AddrB) (*Item_Location_AddrB, error) {
if from == nil {
return nil, nil
}
barValue := from.GetBar()
ret := &Item_Location_AddrB{
Bar: barValue,
}
return ret, nil
}
// cast_User_Item_Location_B__to__Federation_Item_Location_B cast from "user.Item.Location.b" to "federation.Item.Location.b".
func (s *FederationService) cast_User_Item_Location_B__to__Federation_Item_Location_B(from *user.Item_Location_B) (*Item_Location_B, error) {
if from == nil {
return nil, nil
}
bValue, err := s.cast_User_Item_Location_AddrB__to__Federation_Item_Location_AddrB(from.B)
if err != nil {
return nil, err
}
return &Item_Location_B{B: bValue}, nil
}
// cast_User_Item_Location_C__to__Federation_Item_Location_C cast from "user.Item.Location.c" to "federation.Item.Location.c".
func (s *FederationService) cast_User_Item_Location_C__to__Federation_Item_Location_C(from *user.Item_Location_C) (*Item_Location_C, error) {
if from == nil {
return nil, nil
}
cValue := from.C
return &Item_Location_C{C: cValue}, nil
}
// cast_User_Item_Location__to__Federation_Item_Location cast from "user.Item.Location" to "federation.Item.Location".
func (s *FederationService) cast_User_Item_Location__to__Federation_Item_Location(from *user.Item_Location) (*Item_Location, error) {
if from == nil {
return nil, nil
}
addr1Value := from.GetAddr1()
addr2Value := from.GetAddr2()
ret := &Item_Location{
Addr1: addr1Value,
Addr2: addr2Value,
}
switch x := from.Addr3.(type) {
case *user.Item_Location_AddrA_:
addr3Value, err := s.cast_User_Item_Location_AddrA___to__Federation_Item_Location_AddrA_(x)
if err != nil {
return nil, err
}
ret.Addr3 = addr3Value
case *user.Item_Location_B:
addr3Value, err := s.cast_User_Item_Location_B__to__Federation_Item_Location_B(x)
if err != nil {
return nil, err
}
ret.Addr3 = addr3Value
case *user.Item_Location_C:
addr3Value, err := s.cast_User_Item_Location_C__to__Federation_Item_Location_C(x)
if err != nil {
return nil, err
}
ret.Addr3 = addr3Value
}
return ret, nil
}
// cast_User_Item__to__Federation_Item cast from "user.Item" to "federation.Item".
func (s *FederationService) cast_User_Item__to__Federation_Item(from *user.Item) (*Item, error) {
if from == nil {
return nil, nil
}
nameValue := from.GetName()
typeValue, err := s.cast_User_Item_ItemType__to__Federation_Item_ItemType(from.GetType())
if err != nil {
return nil, err
}
valueValue := from.GetValue()
locationValue, err := s.cast_User_Item_Location__to__Federation_Item_Location(from.GetLocation())
if err != nil {
return nil, err
}
ret := &Item{
Name: nameValue,
Type: typeValue,
Value: valueValue,
Location: locationValue,
}
return ret, nil
}
// cast_User_User_AttrA___to__Federation_User_AttrA_ cast from "user.User.attr_a" to "federation.User.attr_a".
func (s *FederationService) cast_User_User_AttrA___to__Federation_User_AttrA_(from *user.User_AttrA_) (*User_AttrA_, error) {
if from == nil {
return nil, nil
}
attrAValue, err := s.cast_User_User_AttrA__to__Federation_User_AttrA(from.AttrA)
if err != nil {
return nil, err
}
return &User_AttrA_{AttrA: attrAValue}, nil
}
// cast_User_User_AttrA__to__Federation_User_AttrA cast from "user.User.AttrA" to "federation.User.AttrA".
func (s *FederationService) cast_User_User_AttrA__to__Federation_User_AttrA(from *user.User_AttrA) (*User_AttrA, error) {
if from == nil {
return nil, nil
}
fooValue := from.GetFoo()
ret := &User_AttrA{
Foo: fooValue,
}
return ret, nil
}
// cast_User_User_AttrB__to__Federation_User_AttrB cast from "user.User.AttrB" to "federation.User.AttrB".
func (s *FederationService) cast_User_User_AttrB__to__Federation_User_AttrB(from *user.User_AttrB) (*User_AttrB, error) {
if from == nil {
return nil, nil
}
barValue := from.GetBar()
ret := &User_AttrB{
Bar: barValue,
}
return ret, nil
}
// cast_User_User_B__to__Federation_User_B cast from "user.User.b" to "federation.User.b".
func (s *FederationService) cast_User_User_B__to__Federation_User_B(from *user.User_B) (*User_B, error) {
if from == nil {
return nil, nil
}
bValue, err := s.cast_User_User_AttrB__to__Federation_User_AttrB(from.B)
if err != nil {
return nil, err
}
return &User_B{B: bValue}, nil
}
// cast_float64__to__float32 cast from "double" to "float".
func (s *FederationService) cast_float64__to__float32(from float64) (float32, error) {
return float32(from), nil
}
// cast_int64__to__int32 cast from "int64" to "int32".
func (s *FederationService) cast_int64__to__int32(from int64) (int32, error) {
ret, err := grpcfed.Int64ToInt32(from)
if err != nil {
return ret, err
}
return ret, nil
}
// cast_map_int64_int64__to__map_int32_int32 cast from "map" to "map".
func (s *FederationService) cast_map_int64_int64__to__map_int32_int32(from map[int64]int64) (map[int32]int32, error) {
ret := map[int32]int32{}
for k, v := range from {
key, err := s.cast_int64__to__int32(k)
if err != nil {
return nil, err
}
val, err := s.cast_int64__to__int32(v)
if err != nil {
return nil, err
}
ret[key] = val
}
return ret, nil
}
// cast_map_int64_string__to__map_int32_string cast from "map" to "map".
func (s *FederationService) cast_map_int64_string__to__map_int32_string(from map[int64]string) (map[int32]string, error) {
ret := map[int32]string{}
for k, v := range from {
key, err := s.cast_int64__to__int32(k)
if err != nil {
return nil, err
}
val := v
ret[key] = val
}
return ret, nil
}
// cast_repeated_User_Item__to__repeated_Federation_Item cast from "repeated user.Item" to "repeated federation.Item".
func (s *FederationService) cast_repeated_User_Item__to__repeated_Federation_Item(from []*user.Item) ([]*Item, error) {
ret := make([]*Item, 0, len(from))
for _, v := range from {
casted, err := s.cast_User_Item__to__Federation_Item(v)
if err != nil {
return nil, err
}
ret = append(ret, casted)
}
return ret, nil
}
// cast_repeated_int64__to__repeated_int32 cast from "repeated int64" to "repeated int32".
func (s *FederationService) cast_repeated_int64__to__repeated_int32(from []int64) ([]int32, error) {
ret := make([]int32, 0, len(from))
for _, v := range from {
casted, err := s.cast_int64__to__int32(v)
if err != nil {
return nil, err
}
ret = append(ret, casted)
}
return ret, nil
}
// cast_uint64__to__uint32 cast from "uint64" to "uint32".
func (s *FederationService) cast_uint64__to__uint32(from uint64) (uint32, error) {
ret, err := grpcfed.Uint64ToUint32(from)
if err != nil {
return ret, err
}
return ret, nil
}
func (s *FederationService) logvalue_Federation_A(v *A) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.Any("b", s.logvalue_Federation_A_B(v.GetB())),
slog.Any("opt_c", s.logvalue_Federation_A_B_C(v.GetOptC())),
)
}
func (s *FederationService) logvalue_Federation_AArgument(v *FederationService_Federation_AArgument) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue()
}
func (s *FederationService) logvalue_Federation_A_B(v *A_B) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.Any("foo", s.logvalue_Federation_A_B_C(v.GetFoo())),
slog.Any("bar", s.logvalue_Federation_A_B_C(v.GetBar())),
)
}
func (s *FederationService) logvalue_Federation_A_BArgument(v *FederationService_Federation_A_BArgument) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue()
}
func (s *FederationService) logvalue_Federation_A_B_C(v *A_B_C) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.String("type", v.GetType()),
)
}
func (s *FederationService) logvalue_Federation_A_B_CArgument(v *FederationService_Federation_A_B_CArgument) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.String("type", v.Type),
)
}
func (s *FederationService) logvalue_Federation_GetPostResponse(v *GetPostResponse) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.Any("post", s.logvalue_Federation_Post(v.GetPost())),
slog.String("str", v.GetStr()),
slog.String("uuid", v.GetUuid()),
slog.String("loc", v.GetLoc()),
slog.String("value1", v.GetValue1()),
slog.String("item_type_name", v.GetItemTypeName()),
slog.String("location_type_name", v.GetLocationTypeName()),
slog.String("user_item_type_name", v.GetUserItemTypeName()),
slog.String("item_type_value_enum", s.logvalue_Federation_Item_ItemType(v.GetItemTypeValueEnum()).String()),
slog.Int64("item_type_value_int", int64(v.GetItemTypeValueInt())),
slog.String("item_type_value_cast", s.logvalue_Federation_Item_ItemType(v.GetItemTypeValueCast()).String()),
slog.Int64("location_type_value", int64(v.GetLocationTypeValue())),
slog.Int64("user_item_type_value", int64(v.GetUserItemTypeValue())),
slog.Any("a", s.logvalue_Federation_A(v.GetA())),
slog.Any("sorted_values", v.GetSortedValues()),
slog.Any("sorted_items", s.logvalue_repeated_Federation_Item(v.GetSortedItems())),
slog.Any("map_value", s.logvalue_Federation_GetPostResponse_MapValueEntry(v.GetMapValue())),
slog.Any("double_wrapper_value", s.logvalue_Google_Protobuf_DoubleValue(v.GetDoubleWrapperValue())),
slog.Any("float_wrapper_value", s.logvalue_Google_Protobuf_FloatValue(v.GetFloatWrapperValue())),
slog.Any("i64_wrapper_value", s.logvalue_Google_Protobuf_Int64Value(v.GetI64WrapperValue())),
slog.Any("u64_wrapper_value", s.logvalue_Google_Protobuf_UInt64Value(v.GetU64WrapperValue())),
slog.Any("i32_wrapper_value", s.logvalue_Google_Protobuf_Int32Value(v.GetI32WrapperValue())),
slog.Any("u32_wrapper_value", s.logvalue_Google_Protobuf_UInt32Value(v.GetU32WrapperValue())),
slog.Any("bool_wrapper_value", s.logvalue_Google_Protobuf_BoolValue(v.GetBoolWrapperValue())),
slog.Any("string_wrapper_value", s.logvalue_Google_Protobuf_StringValue(v.GetStringWrapperValue())),
slog.Any("bytes_wrapper_value", s.logvalue_Google_Protobuf_BytesValue(v.GetBytesWrapperValue())),
slog.String("hello", v.GetHello()),
slog.Any("null_timestamp", s.logvalue_Google_Protobuf_Timestamp(v.GetNullTimestamp())),
slog.Any("null_timestamp2", s.logvalue_Google_Protobuf_Timestamp(v.GetNullTimestamp2())),
slog.Any("null_timestamp3", s.logvalue_Google_Protobuf_Timestamp(v.GetNullTimestamp3())),
slog.String("jp_loc", v.GetJpLoc()),
slog.String("strings_join", v.GetStringsJoin()),
slog.Float64("parse_float", v.GetParseFloat()),
slog.String("url_user_name", v.GetUrlUserName()),
slog.String("enum_value", s.logvalue_Federation_Item_ItemType(v.GetEnumValue()).String()),
slog.String("enum_value_str", v.GetEnumValueStr()),
slog.Float64("sqrt_double", v.GetSqrtDouble()),
slog.Float64("sqrt_int", v.GetSqrtInt()),
slog.Float64("pow", v.GetPow()),
slog.Float64("floor", v.GetFloor()),
slog.Any("flatten", v.GetFlatten()),
slog.Float64("round", v.GetRound()),
slog.Any("any", s.logvalue_Google_Protobuf_Any(v.GetAny())),
slog.String("replaced", v.GetReplaced()),
slog.Any("list_to_map", s.logvalue_Federation_GetPostResponse_ListToMapEntry(v.GetListToMap())),
slog.String("uuid_parse", v.GetUuidParse()),
slog.Bool("uuid_validate", v.GetUuidValidate()),
slog.String("compile", v.GetCompile()),
slog.String("must_compile", v.GetMustCompile()),
slog.String("quote_meta", v.GetQuoteMeta()),
slog.Any("find_string_submatch", v.GetFindStringSubmatch()),
slog.Bool("match_string", v.GetMatchString()),
slog.String("replace_all_string", v.GetReplaceAllString()),
)
}
func (s *FederationService) logvalue_Federation_GetPostResponseArgument(v *FederationService_Federation_GetPostResponseArgument) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.String("id", v.Id),
)
}
func (s *FederationService) logvalue_Federation_GetPostResponse_ListToMapEntry(v map[int32]int32) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
attrs := make([]slog.Attr, 0, len(v))
for key, value := range v {
attrs = append(attrs, slog.Attr{
Key: grpcfed.ToLogAttrKey(key),
Value: slog.AnyValue(value),
})
}
return slog.GroupValue(attrs...)
}
func (s *FederationService) logvalue_Federation_GetPostResponse_MapValueEntry(v map[int32]string) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
attrs := make([]slog.Attr, 0, len(v))
for key, value := range v {
attrs = append(attrs, slog.Attr{
Key: grpcfed.ToLogAttrKey(key),
Value: slog.AnyValue(value),
})
}
return slog.GroupValue(attrs...)
}
func (s *FederationService) logvalue_Federation_Item(v *Item) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.String("name", v.GetName()),
slog.String("type", s.logvalue_Federation_Item_ItemType(v.GetType()).String()),
slog.Int64("value", v.GetValue()),
slog.Any("location", s.logvalue_Federation_Item_Location(v.GetLocation())),
)
}
func (s *FederationService) logvalue_Federation_Item_ItemType(v Item_ItemType) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
switch v {
case Item_ITEM_TYPE_UNSPECIFIED:
return slog.StringValue("ITEM_TYPE_UNSPECIFIED")
case Item_ITEM_TYPE_1:
return slog.StringValue("ITEM_TYPE_1")
case Item_ITEM_TYPE_2:
return slog.StringValue("ITEM_TYPE_2")
case Item_ITEM_TYPE_3:
return slog.StringValue("ITEM_TYPE_3")
}
return slog.StringValue("")
}
func (s *FederationService) logvalue_Federation_Item_Location(v *Item_Location) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.String("addr1", v.GetAddr1()),
slog.String("addr2", v.GetAddr2()),
slog.Any("addr_a", s.logvalue_Federation_Item_Location_AddrA(v.GetAddrA())),
slog.Any("b", s.logvalue_Federation_Item_Location_AddrB(v.GetB())),
slog.String("c", v.GetC()),
)
}
func (s *FederationService) logvalue_Federation_Item_Location_AddrA(v *Item_Location_AddrA) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.String("foo", v.GetFoo()),
)
}
func (s *FederationService) logvalue_Federation_Item_Location_AddrB(v *Item_Location_AddrB) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.Int64("bar", v.GetBar()),
)
}
func (s *FederationService) logvalue_Federation_Item_Location_LocationType(v Item_Location_LocationType) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
switch v {
case Item_Location_LOCATION_TYPE_0:
return slog.StringValue("LOCATION_TYPE_0")
case Item_Location_LOCATION_TYPE_1:
return slog.StringValue("LOCATION_TYPE_1")
}
return slog.StringValue("")
}
func (s *FederationService) logvalue_Federation_Post(v *Post) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.String("id", v.GetId()),
slog.String("title", v.GetTitle()),
slog.String("content", v.GetContent()),
slog.Any("user", s.logvalue_Federation_User(v.GetUser())),
)
}
func (s *FederationService) logvalue_Federation_PostArgument(v *FederationService_Federation_PostArgument) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.String("id", v.Id),
)
}
func (s *FederationService) logvalue_Federation_User(v *User) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.String("id", v.GetId()),
slog.String("name", v.GetName()),
slog.Any("items", s.logvalue_repeated_Federation_Item(v.GetItems())),
slog.Any("profile", s.logvalue_Federation_User_ProfileEntry(v.GetProfile())),
slog.Any("attr_a", s.logvalue_Federation_User_AttrA(v.GetAttrA())),
slog.Any("b", s.logvalue_Federation_User_AttrB(v.GetB())),
)
}
func (s *FederationService) logvalue_Federation_UserArgument(v *FederationService_Federation_UserArgument) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.String("id", v.Id),
slog.String("title", v.Title),
slog.String("content", v.Content),
slog.String("user_id", v.UserId),
)
}
func (s *FederationService) logvalue_Federation_User_AttrA(v *User_AttrA) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.String("foo", v.GetFoo()),
)
}
func (s *FederationService) logvalue_Federation_User_AttrB(v *User_AttrB) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.Bool("bar", v.GetBar()),
)
}
func (s *FederationService) logvalue_Federation_User_ProfileEntry(v map[string]*anypb.Any) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
attrs := make([]slog.Attr, 0, len(v))
for key, value := range v {
attrs = append(attrs, slog.Attr{
Key: grpcfed.ToLogAttrKey(key),
Value: s.logvalue_Google_Protobuf_Any(value),
})
}
return slog.GroupValue(attrs...)
}
func (s *FederationService) logvalue_Google_Protobuf_Any(v *anypb.Any) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.String("type_url", v.GetTypeUrl()),
slog.String("value", string(v.GetValue())),
)
}
func (s *FederationService) logvalue_Google_Protobuf_BoolValue(v *wrapperspb.BoolValue) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.Bool("value", v.GetValue()),
)
}
func (s *FederationService) logvalue_Google_Protobuf_BytesValue(v *wrapperspb.BytesValue) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.String("value", string(v.GetValue())),
)
}
func (s *FederationService) logvalue_Google_Protobuf_DoubleValue(v *wrapperspb.DoubleValue) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.Float64("value", v.GetValue()),
)
}
func (s *FederationService) logvalue_Google_Protobuf_FloatValue(v *wrapperspb.FloatValue) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.Float64("value", float64(v.GetValue())),
)
}
func (s *FederationService) logvalue_Google_Protobuf_Int32Value(v *wrapperspb.Int32Value) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.Int64("value", int64(v.GetValue())),
)
}
func (s *FederationService) logvalue_Google_Protobuf_Int64Value(v *wrapperspb.Int64Value) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.Int64("value", v.GetValue()),
)
}
func (s *FederationService) logvalue_Google_Protobuf_StringValue(v *wrapperspb.StringValue) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.String("value", v.GetValue()),
)
}
func (s *FederationService) logvalue_Google_Protobuf_Timestamp(v *timestamppb.Timestamp) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.Int64("seconds", v.GetSeconds()),
slog.Int64("nanos", int64(v.GetNanos())),
)
}
func (s *FederationService) logvalue_Google_Protobuf_UInt32Value(v *wrapperspb.UInt32Value) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.Uint64("value", uint64(v.GetValue())),
)
}
func (s *FederationService) logvalue_Google_Protobuf_UInt64Value(v *wrapperspb.UInt64Value) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.Uint64("value", v.GetValue()),
)
}
func (s *FederationService) logvalue_Post_GetPostRequest(v *post.GetPostRequest) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.String("id", v.GetId()),
)
}
func (s *FederationService) logvalue_Post_GetPostsRequest(v *post.GetPostsRequest) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.Any("ids", v.GetIds()),
)
}
func (s *FederationService) logvalue_User_GetUserRequest(v *user.GetUserRequest) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.String("id", v.GetId()),
slog.Int64("type", int64(v.GetType())),
)
}
func (s *FederationService) logvalue_User_GetUsersRequest(v *user.GetUsersRequest) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.Any("ids", v.GetIds()),
)
}
func (s *FederationService) logvalue_repeated_Federation_Item(v []*Item) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
attrs := make([]slog.Attr, 0, len(v))
for idx, vv := range v {
attrs = append(attrs, slog.Attr{
Key: grpcfed.ToLogAttrKey(idx),
Value: s.logvalue_Federation_Item(vv),
})
}
return slog.GroupValue(attrs...)
}
================================================
FILE: _examples/02_simple/go.mod
================================================
module example
go 1.24.0
replace github.com/mercari/grpc-federation => ../../
require (
github.com/google/go-cmp v0.7.0
github.com/mercari/grpc-federation v0.0.0-00010101000000-000000000000
go.opentelemetry.io/otel v1.24.0
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.21.0
go.opentelemetry.io/otel/sdk v1.24.0
go.opentelemetry.io/otel/trace v1.24.0
go.uber.org/goleak v1.3.0
google.golang.org/genproto/googleapis/rpc v0.0.0-20240826202546-f6391c0de4c7
google.golang.org/grpc v1.65.0
google.golang.org/protobuf v1.34.2
)
require (
cel.dev/expr v0.19.1 // indirect
github.com/antlr4-go/antlr/v4 v4.13.0 // indirect
github.com/cenkalti/backoff/v4 v4.2.1 // indirect
github.com/go-logr/logr v1.4.1 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
github.com/goccy/wasi-go v0.3.2 // indirect
github.com/google/cel-go v0.23.1 // indirect
github.com/google/uuid v1.6.0 // indirect
github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0 // indirect
github.com/kelseyhightower/envconfig v1.4.0 // indirect
github.com/stealthrocket/wazergo v0.19.1 // indirect
github.com/stoewer/go-strcase v1.3.0 // indirect
github.com/tetratelabs/wazero v1.10.1 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.21.0 // indirect
go.opentelemetry.io/otel/metric v1.24.0 // indirect
go.opentelemetry.io/proto/otlp v1.0.0 // indirect
golang.org/x/exp v0.0.0-20250506013437-ce4c2cf36ca6 // indirect
golang.org/x/net v0.38.0 // indirect
golang.org/x/sync v0.15.0 // indirect
golang.org/x/sys v0.37.0 // indirect
golang.org/x/text v0.26.0 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20240826202546-f6391c0de4c7 // indirect
)
================================================
FILE: _examples/02_simple/go.sum
================================================
cel.dev/expr v0.19.1 h1:NciYrtDRIR0lNCnH1LFJegdjspNx9fI59O7TWcua/W4=
cel.dev/expr v0.19.1/go.mod h1:MrpN08Q+lEBs+bGYdLxxHkZoUSsCp0nSKTs0nTymJgw=
github.com/antlr4-go/antlr/v4 v4.13.0 h1:lxCg3LAv+EUK6t1i0y1V6/SLeUi0eKEKdhQAlS8TVTI=
github.com/antlr4-go/antlr/v4 v4.13.0/go.mod h1:pfChB/xh/Unjila75QW7+VU4TSnWnnk9UTnmpPaOR2g=
github.com/cenkalti/backoff/v4 v4.2.1 h1:y4OZtCnogmCPw98Zjyt5a6+QwPLGkiQsYW5oUqylYbM=
github.com/cenkalti/backoff/v4 v4.2.1/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A=
github.com/go-logr/logr v1.4.1 h1:pKouT5E8xu9zeFC39JXRDukb6JFQPXM5p5I91188VAQ=
github.com/go-logr/logr v1.4.1/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY=
github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag=
github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE=
github.com/goccy/wasi-go v0.3.2 h1:wAvGXmqCkfcp0B0AwIp5Ya53hzDwkKm9W8iuT3nCCz0=
github.com/goccy/wasi-go v0.3.2/go.mod h1:nIKD204n9xa4Z20UV+XA483kIr9TAl2vXr+X5qVAO5M=
github.com/golang/glog v1.2.1 h1:OptwRhECazUx5ix5TTWC3EZhsZEHWcYWY4FQHTIubm4=
github.com/golang/glog v1.2.1/go.mod h1:6AhwSGph0fcJtXVM/PEHPqZlFeoLxhs7/t5UDAwmO+w=
github.com/google/cel-go v0.23.1 h1:91ThhEZlBcE5rB2adBVXqvDoqdL8BG2oyhd0bK1I/r4=
github.com/google/cel-go v0.23.1/go.mod h1:52Pb6QsDbC5kvgxvZhiL9QX1oZEkcUF/ZqaPx1J5Wwo=
github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8=
github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU=
github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0 h1:YBftPWNWd4WwGqtY2yeZL2ef8rHAxPBD8KFhJpmcqms=
github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0/go.mod h1:YN5jB8ie0yfIUg6VvR9Kz84aCaG7AsGZnLjhHbUqwPg=
github.com/kelseyhightower/envconfig v1.4.0 h1:Im6hONhd3pLkfDFsbRgu68RDNkGF1r3dvMUtDTo2cv8=
github.com/kelseyhightower/envconfig v1.4.0/go.mod h1:cccZRl6mQpaq41TPp5QxidR+Sa3axMbJDNb//FQX6Gg=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/stealthrocket/wazergo v0.19.1 h1:BPrITETPgSFwiytwmToO0MbUC/+RGC39JScz1JmmG6c=
github.com/stealthrocket/wazergo v0.19.1/go.mod h1:riI0hxw4ndZA5e6z7PesHg2BtTftcZaMxRcoiGGipTs=
github.com/stoewer/go-strcase v1.3.0 h1:g0eASXYtp+yvN9fK8sH94oCIk0fau9uV1/ZdJ0AVEzs=
github.com/stoewer/go-strcase v1.3.0/go.mod h1:fAH5hQ5pehh+j3nZfvwdk2RgEgQjAoM8wodgtPmh1xo=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=
github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo=
github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk=
github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
github.com/tetratelabs/wazero v1.10.1 h1:2DugeJf6VVk58KTPszlNfeeN8AhhpwcZqkJj2wwFuH8=
github.com/tetratelabs/wazero v1.10.1/go.mod h1:DRm5twOQ5Gr1AoEdSi0CLjDQF1J9ZAuyqFIjl1KKfQU=
go.opentelemetry.io/otel v1.24.0 h1:0LAOdjNmQeSTzGBzduGe/rU4tZhMwL5rWgtp9Ku5Jfo=
go.opentelemetry.io/otel v1.24.0/go.mod h1:W7b9Ozg4nkF5tWI5zsXkaKKDjdVjpD4oAt9Qi/MArHo=
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.21.0 h1:cl5P5/GIfFh4t6xyruOgJP5QiA1pw4fYYdv6nc6CBWw=
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.21.0/go.mod h1:zgBdWWAu7oEEMC06MMKc5NLbA/1YDXV1sMpSqEeLQLg=
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.21.0 h1:tIqheXEFWAZ7O8A7m+J0aPTmpJN3YQ7qetUAdkkkKpk=
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.21.0/go.mod h1:nUeKExfxAQVbiVFn32YXpXZZHZ61Cc3s3Rn1pDBGAb0=
go.opentelemetry.io/otel/metric v1.24.0 h1:6EhoGWWK28x1fbpA4tYTOWBkPefTDQnb8WSGXlc88kI=
go.opentelemetry.io/otel/metric v1.24.0/go.mod h1:VYhLe1rFfxuTXLgj4CBiyz+9WYBA8pNGJgDcSFRKBco=
go.opentelemetry.io/otel/sdk v1.24.0 h1:YMPPDNymmQN3ZgczicBY3B6sf9n62Dlj9pWD3ucgoDw=
go.opentelemetry.io/otel/sdk v1.24.0/go.mod h1:KVrIYw6tEubO9E96HQpcmpTKDVn9gdv35HoYiQWGDFg=
go.opentelemetry.io/otel/trace v1.24.0 h1:CsKnnL4dUAr/0llH9FKuc698G04IrpWV0MQA/Y1YELI=
go.opentelemetry.io/otel/trace v1.24.0/go.mod h1:HPc3Xr/cOApsBI154IU0OI0HJexz+aw5uPdbs3UCjNU=
go.opentelemetry.io/proto/otlp v1.0.0 h1:T0TX0tmXU8a3CbNXzEKGeU5mIVOdf0oykP+u2lIVU/I=
go.opentelemetry.io/proto/otlp v1.0.0/go.mod h1:Sy6pihPLfYHkr3NkUbEhGHFhINUSI/v80hjKIs5JXpM=
go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto=
go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE=
golang.org/x/exp v0.0.0-20250506013437-ce4c2cf36ca6 h1:y5zboxd6LQAqYIhHnB48p0ByQ/GnQx2BE33L8BOHQkI=
golang.org/x/exp v0.0.0-20250506013437-ce4c2cf36ca6/go.mod h1:U6Lno4MTRCDY+Ba7aCcauB9T60gsv5s4ralQzP72ZoQ=
golang.org/x/net v0.38.0 h1:vRMAPTMaeGqVhG5QyLJHqNDwecKTomGeqbnfZyKlBI8=
golang.org/x/net v0.38.0/go.mod h1:ivrbrMbzFq5J41QOQh0siUuly180yBYtLp+CKbEaFx8=
golang.org/x/sync v0.15.0 h1:KWH3jNZsfyT6xfAfKiz6MRNmd46ByHDYaZ7KSkCtdW8=
golang.org/x/sync v0.15.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA=
golang.org/x/sys v0.37.0 h1:fdNQudmxPjkdUTPnLn5mdQv7Zwvbvpaxqs831goi9kQ=
golang.org/x/sys v0.37.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks=
golang.org/x/text v0.26.0 h1:P42AVeLghgTYr4+xUnTRKDMqpar+PtX7KWuNQL21L8M=
golang.org/x/text v0.26.0/go.mod h1:QK15LZJUUQVJxhz7wXgxSy/CJaTFjd0G+YLonydOVQA=
google.golang.org/genproto/googleapis/api v0.0.0-20240826202546-f6391c0de4c7 h1:YcyjlL1PRr2Q17/I0dPk2JmYS5CDXfcdb2Z3YRioEbw=
google.golang.org/genproto/googleapis/api v0.0.0-20240826202546-f6391c0de4c7/go.mod h1:OCdP9MfskevB/rbYvHTsXTtKC+3bHWajPdoKgjcYkfo=
google.golang.org/genproto/googleapis/rpc v0.0.0-20240826202546-f6391c0de4c7 h1:2035KHhUv+EpyB+hWgJnaWKJOdX1E95w2S8Rr4uWKTs=
google.golang.org/genproto/googleapis/rpc v0.0.0-20240826202546-f6391c0de4c7/go.mod h1:UqMtugtsSgubUsoxbuAoiCXvqvErP7Gf0so0mK9tHxU=
google.golang.org/grpc v1.65.0 h1:bs/cUb4lp1G5iImFFd3u5ixQzweKizoZJAwBNLR42lc=
google.golang.org/grpc v1.65.0/go.mod h1:WgYC2ypjlB0EiQi6wdKixMqukr6lBc0Vo+oOgjrM5ZQ=
google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg=
google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
================================================
FILE: _examples/02_simple/grpc-federation.yaml
================================================
imports:
- proto
src:
- proto
out: .
plugins:
- plugin: go
opt: paths=source_relative
- plugin: go-grpc
opt: paths=source_relative
- plugin: grpc-federation
opt:
- paths=source_relative
- import_paths=proto
================================================
FILE: _examples/02_simple/main_test.go
================================================
package main_test
import (
"context"
"fmt"
"log/slog"
"net"
"os"
"testing"
"github.com/google/go-cmp/cmp"
"github.com/google/go-cmp/cmp/cmpopts"
"go.opentelemetry.io/otel"
"go.opentelemetry.io/otel/attribute"
"go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc"
"go.opentelemetry.io/otel/propagation"
"go.opentelemetry.io/otel/sdk/resource"
sdktrace "go.opentelemetry.io/otel/sdk/trace"
semconv "go.opentelemetry.io/otel/semconv/v1.4.0"
"go.uber.org/goleak"
"google.golang.org/grpc"
"google.golang.org/grpc/credentials/insecure"
"google.golang.org/grpc/metadata"
"google.golang.org/grpc/test/bufconn"
"google.golang.org/protobuf/types/known/anypb"
"google.golang.org/protobuf/types/known/wrapperspb"
"example/federation"
"example/post"
"example/user"
)
const bufSize = 1024
var (
listener *bufconn.Listener
postClient post.PostServiceClient
userClient user.UserServiceClient
)
type clientConfig struct{}
func (c *clientConfig) Post_PostServiceClient(cfg federation.FederationServiceClientConfig) (post.PostServiceClient, error) {
return postClient, nil
}
func (c *clientConfig) User_UserServiceClient(cfg federation.FederationServiceClientConfig) (user.UserServiceClient, error) {
return userClient, nil
}
type PostServer struct {
*post.UnimplementedPostServiceServer
}
func (s *PostServer) GetPost(ctx context.Context, req *post.GetPostRequest) (*post.GetPostResponse, error) {
return &post.GetPostResponse{
Post: &post.Post{
Id: req.Id,
Title: "foo",
Content: "bar",
UserId: fmt.Sprintf("user:%s", req.Id),
},
}, nil
}
func (s *PostServer) GetPosts(ctx context.Context, req *post.GetPostsRequest) (*post.GetPostsResponse, error) {
var posts []*post.Post
for _, id := range req.Ids {
posts = append(posts, &post.Post{
Id: id,
Title: "foo",
Content: "bar",
UserId: fmt.Sprintf("user:%s", id),
})
}
return &post.GetPostsResponse{Posts: posts}, nil
}
type UserServer struct {
*user.UnimplementedUserServiceServer
}
func (s *UserServer) GetUser(ctx context.Context, req *user.GetUserRequest) (*user.GetUserResponse, error) {
profile, err := anypb.New(&user.User{
Name: "foo",
})
if err != nil {
return nil, err
}
return &user.GetUserResponse{
User: &user.User{
Id: req.Id,
Name: fmt.Sprintf("name_%s", req.Id),
Items: []*user.Item{
{
Name: "item1",
Type: user.Item_ITEM_TYPE_1,
Value: 1,
Location: &user.Item_Location{
Addr1: "foo",
Addr2: "bar",
Addr3: &user.Item_Location_B{
B: &user.Item_Location_AddrB{Bar: 1},
},
},
},
{Name: "item2", Type: user.Item_ITEM_TYPE_2, Value: 2},
},
Profile: map[string]*anypb.Any{"user": profile},
Attr: &user.User_B{
B: &user.User_AttrB{
Bar: true,
},
},
},
}, nil
}
func (s *UserServer) GetUsers(ctx context.Context, req *user.GetUsersRequest) (*user.GetUsersResponse, error) {
var users []*user.User
for _, id := range req.Ids {
users = append(users, &user.User{
Id: id,
Name: fmt.Sprintf("name_%s", id),
})
}
return &user.GetUsersResponse{Users: users}, nil
}
func dialer(ctx context.Context, address string) (net.Conn, error) {
return listener.Dial()
}
func TestFederation(t *testing.T) {
defer goleak.VerifyNone(t)
ctx := context.Background()
listener = bufconn.Listen(bufSize)
if os.Getenv("ENABLE_JAEGER") != "" {
exporter, err := otlptracegrpc.New(ctx, otlptracegrpc.WithInsecure())
if err != nil {
t.Fatal(err)
}
tp := sdktrace.NewTracerProvider(
sdktrace.WithBatcher(exporter),
sdktrace.WithResource(
resource.NewWithAttributes(
semconv.SchemaURL,
semconv.ServiceNameKey.String("example02/simple"),
semconv.ServiceVersionKey.String("1.0.0"),
attribute.String("environment", "dev"),
),
),
sdktrace.WithSampler(sdktrace.AlwaysSample()),
)
defer tp.Shutdown(ctx)
otel.SetTextMapPropagator(propagation.TraceContext{})
otel.SetTracerProvider(tp)
}
conn, err := grpc.DialContext(
ctx, "",
grpc.WithContextDialer(dialer),
grpc.WithTransportCredentials(insecure.NewCredentials()),
)
if err != nil {
t.Fatal(err)
}
defer conn.Close()
postClient = post.NewPostServiceClient(conn)
userClient = user.NewUserServiceClient(conn)
grpcServer := grpc.NewServer()
defer grpcServer.Stop()
logger := slog.New(slog.NewJSONHandler(os.Stdout, &slog.HandlerOptions{
Level: slog.LevelDebug,
}))
federationServer, err := federation.NewFederationService(federation.FederationServiceConfig{
Client: new(clientConfig),
Logger: logger,
})
if err != nil {
t.Fatal(err)
}
defer federation.CleanupFederationService(ctx, federationServer)
post.RegisterPostServiceServer(grpcServer, &PostServer{})
user.RegisterUserServiceServer(grpcServer, &UserServer{})
federation.RegisterFederationServiceServer(grpcServer, federationServer)
go func() {
if err := grpcServer.Serve(listener); err != nil {
t.Fatal(err)
}
}()
client := federation.NewFederationServiceClient(conn)
ctx = metadata.AppendToOutgoingContext(ctx, "key1", "value1")
res, err := client.GetPost(ctx, &federation.GetPostRequest{
Id: "foo",
})
if err != nil {
t.Fatal(err)
}
profile, err := anypb.New(&user.User{
Name: "foo",
})
if err != nil {
t.Fatal(err)
}
postMsg := &federation.Post{
Id: "foo",
Title: "foo",
Content: "bar",
User: &federation.User{
Id: "user:foo",
Name: "name_user:foo",
Items: []*federation.Item{
{
Name: "item1",
Type: federation.Item_ITEM_TYPE_1,
Value: 1,
Location: &federation.Item_Location{
Addr1: "foo",
Addr2: "bar",
Addr3: &federation.Item_Location_B{
B: &federation.Item_Location_AddrB{
Bar: 1,
},
},
},
},
{
Name: "item2",
Type: federation.Item_ITEM_TYPE_2,
Value: 2,
},
},
Profile: map[string]*anypb.Any{
"user": profile,
},
Attr: &federation.User_B{
B: &federation.User_AttrB{
Bar: true,
},
},
},
}
anyMsg, err := anypb.New(postMsg)
if err != nil {
t.Fatal(err)
}
if diff := cmp.Diff(res, &federation.GetPostResponse{
Post: postMsg,
Str: "hello",
Uuid: "daa4728d-159f-4fc2-82cf-cae915d54e08",
Loc: "Asia/Tokyo",
Value1: "value1",
ItemTypeName: "ITEM_TYPE_1",
LocationTypeName: "LOCATION_TYPE_1",
UserItemTypeName: "ITEM_TYPE_2",
ItemTypeValueEnum: federation.Item_ITEM_TYPE_1,
ItemTypeValueInt: 1,
ItemTypeValueCast: federation.Item_ITEM_TYPE_1,
LocationTypeValue: 1,
UserItemTypeValue: 2,
A: &federation.A{
B: &federation.A_B{
Foo: &federation.A_B_C{
Type: "foo",
},
Bar: &federation.A_B_C{
Type: "bar",
},
},
Opt: &federation.A_OptC{OptC: &federation.A_B_C{}},
},
SortedValues: []int32{1, 2, 3, 4},
SortedItems: []*federation.Item{
{
Location: &federation.Item_Location{
Addr1: "b",
},
},
{
Location: &federation.Item_Location{
Addr1: "a",
},
},
},
MapValue: map[int32]string{
1: "a",
2: "b",
3: "c",
},
DoubleWrapperValue: &wrapperspb.DoubleValue{
Value: 1.23,
},
FloatWrapperValue: &wrapperspb.FloatValue{
Value: 3.45,
},
I64WrapperValue: &wrapperspb.Int64Value{
Value: 1,
},
U64WrapperValue: &wrapperspb.UInt64Value{
Value: 2,
},
I32WrapperValue: &wrapperspb.Int32Value{
Value: 3,
},
U32WrapperValue: &wrapperspb.UInt32Value{
Value: 4,
},
StringWrapperValue: &wrapperspb.StringValue{
Value: "hello",
},
BytesWrapperValue: &wrapperspb.BytesValue{
Value: []byte("world"),
},
BoolWrapperValue: &wrapperspb.BoolValue{
Value: true,
},
Hello: "hello\nworld",
NullTimestamp: nil,
NullTimestamp2: nil,
NullTimestamp3: nil,
JpLoc: "JST",
StringsJoin: "23.2",
ParseFloat: 23.2,
UrlUserName: "test_user",
EnumValue: federation.Item_ITEM_TYPE_2,
EnumValueStr: "second item type",
SqrtDouble: 5,
SqrtInt: 5,
Pow: 8,
Floor: 1,
Flatten: []int64{1, 2, 3},
Round: 2,
Any: anyMsg,
Replaced: "1-2-3-grpc",
ListToMap: map[int32]int32{0: 1, 2: 9},
UuidParse: "daa4728d-159f-4fc2-82cf-cae915d54e08",
UuidValidate: true,
Compile: "[a-z]+\\d\\d",
MustCompile: "([a-z]+)\\d(\\d)",
QuoteMeta: "\\[a-z\\]\\+\\\\d",
FindStringSubmatch: []string{"abc12", "abc", "2"},
MatchString: true,
ReplaceAllString: "salmon is tasty",
}, cmpopts.IgnoreUnexported(
federation.GetPostResponse{},
federation.Post{},
federation.User{},
federation.Item{},
federation.Item_Location{},
federation.User_B{},
federation.User_AttrB{},
federation.Item_Location_B{},
federation.Item_Location_AddrB{},
federation.A{},
federation.A_B{},
federation.A_B_C{},
anypb.Any{},
wrapperspb.DoubleValue{},
wrapperspb.FloatValue{},
wrapperspb.Int64Value{},
wrapperspb.UInt64Value{},
wrapperspb.Int32Value{},
wrapperspb.UInt32Value{},
wrapperspb.StringValue{},
wrapperspb.BytesValue{},
wrapperspb.BoolValue{},
)); diff != "" {
t.Errorf("(-got, +want)\n%s", diff)
}
}
================================================
FILE: _examples/02_simple/post/post.pb.go
================================================
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.33.0
// protoc (unknown)
// source: post/post.proto
package post
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
type GetPostRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
}
func (x *GetPostRequest) Reset() {
*x = GetPostRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_post_post_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GetPostRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetPostRequest) ProtoMessage() {}
func (x *GetPostRequest) ProtoReflect() protoreflect.Message {
mi := &file_post_post_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GetPostRequest.ProtoReflect.Descriptor instead.
func (*GetPostRequest) Descriptor() ([]byte, []int) {
return file_post_post_proto_rawDescGZIP(), []int{0}
}
func (x *GetPostRequest) GetId() string {
if x != nil {
return x.Id
}
return ""
}
type GetPostResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Post *Post `protobuf:"bytes,1,opt,name=post,proto3" json:"post,omitempty"`
}
func (x *GetPostResponse) Reset() {
*x = GetPostResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_post_post_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GetPostResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetPostResponse) ProtoMessage() {}
func (x *GetPostResponse) ProtoReflect() protoreflect.Message {
mi := &file_post_post_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GetPostResponse.ProtoReflect.Descriptor instead.
func (*GetPostResponse) Descriptor() ([]byte, []int) {
return file_post_post_proto_rawDescGZIP(), []int{1}
}
func (x *GetPostResponse) GetPost() *Post {
if x != nil {
return x.Post
}
return nil
}
type GetPostsRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Ids []string `protobuf:"bytes,1,rep,name=ids,proto3" json:"ids,omitempty"`
}
func (x *GetPostsRequest) Reset() {
*x = GetPostsRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_post_post_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GetPostsRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetPostsRequest) ProtoMessage() {}
func (x *GetPostsRequest) ProtoReflect() protoreflect.Message {
mi := &file_post_post_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GetPostsRequest.ProtoReflect.Descriptor instead.
func (*GetPostsRequest) Descriptor() ([]byte, []int) {
return file_post_post_proto_rawDescGZIP(), []int{2}
}
func (x *GetPostsRequest) GetIds() []string {
if x != nil {
return x.Ids
}
return nil
}
type GetPostsResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Posts []*Post `protobuf:"bytes,1,rep,name=posts,proto3" json:"posts,omitempty"`
}
func (x *GetPostsResponse) Reset() {
*x = GetPostsResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_post_post_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GetPostsResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetPostsResponse) ProtoMessage() {}
func (x *GetPostsResponse) ProtoReflect() protoreflect.Message {
mi := &file_post_post_proto_msgTypes[3]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GetPostsResponse.ProtoReflect.Descriptor instead.
func (*GetPostsResponse) Descriptor() ([]byte, []int) {
return file_post_post_proto_rawDescGZIP(), []int{3}
}
func (x *GetPostsResponse) GetPosts() []*Post {
if x != nil {
return x.Posts
}
return nil
}
type Post struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
Title string `protobuf:"bytes,2,opt,name=title,proto3" json:"title,omitempty"`
Content string `protobuf:"bytes,3,opt,name=content,proto3" json:"content,omitempty"`
UserId string `protobuf:"bytes,4,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
}
func (x *Post) Reset() {
*x = Post{}
if protoimpl.UnsafeEnabled {
mi := &file_post_post_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Post) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Post) ProtoMessage() {}
func (x *Post) ProtoReflect() protoreflect.Message {
mi := &file_post_post_proto_msgTypes[4]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Post.ProtoReflect.Descriptor instead.
func (*Post) Descriptor() ([]byte, []int) {
return file_post_post_proto_rawDescGZIP(), []int{4}
}
func (x *Post) GetId() string {
if x != nil {
return x.Id
}
return ""
}
func (x *Post) GetTitle() string {
if x != nil {
return x.Title
}
return ""
}
func (x *Post) GetContent() string {
if x != nil {
return x.Content
}
return ""
}
func (x *Post) GetUserId() string {
if x != nil {
return x.UserId
}
return ""
}
var File_post_post_proto protoreflect.FileDescriptor
var file_post_post_proto_rawDesc = []byte{
0x0a, 0x0f, 0x70, 0x6f, 0x73, 0x74, 0x2f, 0x70, 0x6f, 0x73, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x12, 0x04, 0x70, 0x6f, 0x73, 0x74, 0x22, 0x20, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x50, 0x6f,
0x73, 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, 0x31, 0x0a, 0x0f, 0x47, 0x65, 0x74,
0x50, 0x6f, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1e, 0x0a, 0x04,
0x70, 0x6f, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x70, 0x6f, 0x73,
0x74, 0x2e, 0x50, 0x6f, 0x73, 0x74, 0x52, 0x04, 0x70, 0x6f, 0x73, 0x74, 0x22, 0x23, 0x0a, 0x0f,
0x47, 0x65, 0x74, 0x50, 0x6f, 0x73, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12,
0x10, 0x0a, 0x03, 0x69, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x03, 0x69, 0x64,
0x73, 0x22, 0x34, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x50, 0x6f, 0x73, 0x74, 0x73, 0x52, 0x65, 0x73,
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x20, 0x0a, 0x05, 0x70, 0x6f, 0x73, 0x74, 0x73, 0x18, 0x01,
0x20, 0x03, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x70, 0x6f, 0x73, 0x74, 0x2e, 0x50, 0x6f, 0x73, 0x74,
0x52, 0x05, 0x70, 0x6f, 0x73, 0x74, 0x73, 0x22, 0x5f, 0x0a, 0x04, 0x50, 0x6f, 0x73, 0x74, 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, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74,
0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12,
0x17, 0x0a, 0x07, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09,
0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x32, 0x84, 0x01, 0x0a, 0x0b, 0x50, 0x6f, 0x73,
0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x38, 0x0a, 0x07, 0x47, 0x65, 0x74, 0x50,
0x6f, 0x73, 0x74, 0x12, 0x14, 0x2e, 0x70, 0x6f, 0x73, 0x74, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x6f,
0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x70, 0x6f, 0x73, 0x74,
0x2e, 0x47, 0x65, 0x74, 0x50, 0x6f, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
0x22, 0x00, 0x12, 0x3b, 0x0a, 0x08, 0x47, 0x65, 0x74, 0x50, 0x6f, 0x73, 0x74, 0x73, 0x12, 0x15,
0x2e, 0x70, 0x6f, 0x73, 0x74, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x6f, 0x73, 0x74, 0x73, 0x52, 0x65,
0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x70, 0x6f, 0x73, 0x74, 0x2e, 0x47, 0x65, 0x74,
0x50, 0x6f, 0x73, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42,
0x58, 0x0a, 0x08, 0x63, 0x6f, 0x6d, 0x2e, 0x70, 0x6f, 0x73, 0x74, 0x42, 0x09, 0x50, 0x6f, 0x73,
0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x11, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c,
0x65, 0x2f, 0x70, 0x6f, 0x73, 0x74, 0x3b, 0x70, 0x6f, 0x73, 0x74, 0xa2, 0x02, 0x03, 0x50, 0x58,
0x58, 0xaa, 0x02, 0x04, 0x50, 0x6f, 0x73, 0x74, 0xca, 0x02, 0x04, 0x50, 0x6f, 0x73, 0x74, 0xe2,
0x02, 0x10, 0x50, 0x6f, 0x73, 0x74, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61,
0x74, 0x61, 0xea, 0x02, 0x04, 0x50, 0x6f, 0x73, 0x74, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f,
0x33,
}
var (
file_post_post_proto_rawDescOnce sync.Once
file_post_post_proto_rawDescData = file_post_post_proto_rawDesc
)
func file_post_post_proto_rawDescGZIP() []byte {
file_post_post_proto_rawDescOnce.Do(func() {
file_post_post_proto_rawDescData = protoimpl.X.CompressGZIP(file_post_post_proto_rawDescData)
})
return file_post_post_proto_rawDescData
}
var file_post_post_proto_msgTypes = make([]protoimpl.MessageInfo, 5)
var file_post_post_proto_goTypes = []interface{}{
(*GetPostRequest)(nil), // 0: post.GetPostRequest
(*GetPostResponse)(nil), // 1: post.GetPostResponse
(*GetPostsRequest)(nil), // 2: post.GetPostsRequest
(*GetPostsResponse)(nil), // 3: post.GetPostsResponse
(*Post)(nil), // 4: post.Post
}
var file_post_post_proto_depIdxs = []int32{
4, // 0: post.GetPostResponse.post:type_name -> post.Post
4, // 1: post.GetPostsResponse.posts:type_name -> post.Post
0, // 2: post.PostService.GetPost:input_type -> post.GetPostRequest
2, // 3: post.PostService.GetPosts:input_type -> post.GetPostsRequest
1, // 4: post.PostService.GetPost:output_type -> post.GetPostResponse
3, // 5: post.PostService.GetPosts:output_type -> post.GetPostsResponse
4, // [4:6] is the sub-list for method output_type
2, // [2:4] is the sub-list for method input_type
2, // [2:2] is the sub-list for extension type_name
2, // [2:2] is the sub-list for extension extendee
0, // [0:2] is the sub-list for field type_name
}
func init() { file_post_post_proto_init() }
func file_post_post_proto_init() {
if File_post_post_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_post_post_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetPostRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_post_post_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetPostResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_post_post_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetPostsRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_post_post_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetPostsResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_post_post_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Post); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_post_post_proto_rawDesc,
NumEnums: 0,
NumMessages: 5,
NumExtensions: 0,
NumServices: 1,
},
GoTypes: file_post_post_proto_goTypes,
DependencyIndexes: file_post_post_proto_depIdxs,
MessageInfos: file_post_post_proto_msgTypes,
}.Build()
File_post_post_proto = out.File
file_post_post_proto_rawDesc = nil
file_post_post_proto_goTypes = nil
file_post_post_proto_depIdxs = nil
}
================================================
FILE: _examples/02_simple/post/post_grpc.pb.go
================================================
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.3.0
// - protoc (unknown)
// source: post/post.proto
package post
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 (
PostService_GetPost_FullMethodName = "/post.PostService/GetPost"
PostService_GetPosts_FullMethodName = "/post.PostService/GetPosts"
)
// PostServiceClient is the client API for PostService 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 PostServiceClient interface {
GetPost(ctx context.Context, in *GetPostRequest, opts ...grpc.CallOption) (*GetPostResponse, error)
GetPosts(ctx context.Context, in *GetPostsRequest, opts ...grpc.CallOption) (*GetPostsResponse, error)
}
type postServiceClient struct {
cc grpc.ClientConnInterface
}
func NewPostServiceClient(cc grpc.ClientConnInterface) PostServiceClient {
return &postServiceClient{cc}
}
func (c *postServiceClient) GetPost(ctx context.Context, in *GetPostRequest, opts ...grpc.CallOption) (*GetPostResponse, error) {
out := new(GetPostResponse)
err := c.cc.Invoke(ctx, PostService_GetPost_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *postServiceClient) GetPosts(ctx context.Context, in *GetPostsRequest, opts ...grpc.CallOption) (*GetPostsResponse, error) {
out := new(GetPostsResponse)
err := c.cc.Invoke(ctx, PostService_GetPosts_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// PostServiceServer is the server API for PostService service.
// All implementations must embed UnimplementedPostServiceServer
// for forward compatibility
type PostServiceServer interface {
GetPost(context.Context, *GetPostRequest) (*GetPostResponse, error)
GetPosts(context.Context, *GetPostsRequest) (*GetPostsResponse, error)
mustEmbedUnimplementedPostServiceServer()
}
// UnimplementedPostServiceServer must be embedded to have forward compatible implementations.
type UnimplementedPostServiceServer struct {
}
func (UnimplementedPostServiceServer) GetPost(context.Context, *GetPostRequest) (*GetPostResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetPost not implemented")
}
func (UnimplementedPostServiceServer) GetPosts(context.Context, *GetPostsRequest) (*GetPostsResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetPosts not implemented")
}
func (UnimplementedPostServiceServer) mustEmbedUnimplementedPostServiceServer() {}
// UnsafePostServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to PostServiceServer will
// result in compilation errors.
type UnsafePostServiceServer interface {
mustEmbedUnimplementedPostServiceServer()
}
func RegisterPostServiceServer(s grpc.ServiceRegistrar, srv PostServiceServer) {
s.RegisterService(&PostService_ServiceDesc, srv)
}
func _PostService_GetPost_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetPostRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(PostServiceServer).GetPost(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: PostService_GetPost_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(PostServiceServer).GetPost(ctx, req.(*GetPostRequest))
}
return interceptor(ctx, in, info, handler)
}
func _PostService_GetPosts_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetPostsRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(PostServiceServer).GetPosts(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: PostService_GetPosts_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(PostServiceServer).GetPosts(ctx, req.(*GetPostsRequest))
}
return interceptor(ctx, in, info, handler)
}
// PostService_ServiceDesc is the grpc.ServiceDesc for PostService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var PostService_ServiceDesc = grpc.ServiceDesc{
ServiceName: "post.PostService",
HandlerType: (*PostServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "GetPost",
Handler: _PostService_GetPost_Handler,
},
{
MethodName: "GetPosts",
Handler: _PostService_GetPosts_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "post/post.proto",
}
================================================
FILE: _examples/02_simple/proto/buf.yaml
================================================
version: v1
breaking:
use:
- FILE
lint:
use:
- DEFAULT
================================================
FILE: _examples/02_simple/proto/federation/federation.proto
================================================
syntax = "proto3";
package federation;
import "google/protobuf/any.proto";
import "google/protobuf/wrappers.proto";
import "google/protobuf/timestamp.proto";
import "grpc/federation/federation.proto";
option go_package = "example/federation;federation";
option (grpc.federation.file)= {
import: ["post/post.proto", "user/user.proto"]
};
service FederationService {
option (grpc.federation.service) = {};
rpc GetPost(GetPostRequest) returns (GetPostResponse) {};
}
message GetPostRequest {
string id = 1;
}
message GetPostResponse {
option (.grpc.federation.message) = {
def {
name: "post"
message {
name: "Post"
args { name: "id", by: "$.id" }
}
}
def { name: "strings_join" by: "grpc.federation.strings.join(['1234567'.substring(1, 3), '2'], '.')" }
def { name: "parse_float" by: "grpc.federation.strings.parseFloat(strings_join, 64)" }
def { name: "url" by: "grpc.federation.url.parse('https://test_user:password@example.com/path')" }
def { name: "date" by: "grpc.federation.time.date(2023, 12, 25, 12, 10, 5, 0, grpc.federation.time.UTC())" }
def { name: "rand_source" by: "grpc.federation.rand.newSource(date.unix())" }
def { name: "fixed_rand" by: "grpc.federation.rand.new(rand_source)" }
def { name: "uuid" by: ".grpc.federation.uuid.newRandomFromRand(fixed_rand)" }
def { name: "loc" by: "grpc.federation.time.loadLocation('Asia/Tokyo')"}
def { name: "jp_time" by: "grpc.federation.time.date(2023, 12, 25, 12, 10, 5, 0, loc)" }
def { name: "value1" by: "grpc.federation.metadata.incoming()['key1'][0]"}
def { name: "a" message { name: "A" } }
def { name: "sorted_values" by: "[4, 1, 3, 2].sortAsc(v, v)" }
def { name: "sorted_items" by: "[user.Item{location:user.Item.Location{addr1:'a'}}, user.Item{location:user.Item.Location{addr1:'b'}}].sortDesc(v, v.location.addr1)" }
def { name: "map_value" by : "{1: 'a', 2: 'b', 3: 'c'}" }
def { name: "null_value" by: "null" }
def { by: "grpc.federation.log.info('output federation log', {'post_message': post})" }
def { name: "e" enum {name: "Item.ItemType" by: "true ? user.Item.ItemType.value('ITEM_TYPE_2') : user.Item.ItemType.from(1)"}}
def { name: "sqrt_double" by: "grpc.federation.math.sqrt(3.0*3.0+4.0*4.0)" }
def { name: "sqrt_int" by: "grpc.federation.math.sqrt(3*3+4*4)" }
def { name: "pow" by: "grpc.federation.math.pow(2.0, 3.0)" }
def { name: "floor" by: "grpc.federation.math.floor(1.51)" }
def { name: "flatten" by: "[[1], [2], [3]].flatten()" }
def { name: "round" by: "grpc.federation.math.round(1.5)" }
def { name: "dup" by: "[1, 2, 3, 4].filter(dup, dup % 2 == 0)"}
def { name: "any" by: "grpc.federation.any.new(post)" }
def { name: "fmt" by: "'%d-%d-%d-world'.format([1, 2, 3])" }
def { name: "replaced" by: "fmt.replace('world', 'grpc')" }
def { name: "list_to_map" by: "[1, 2, 3].transformMap(idx, v, idx % 2 == 0, (idx * v) + v)" }
def { name: "uuid_parse" by: "grpc.federation.uuid.parse(uuid.string())" }
def { name: "uuid_validate" by: "grpc.federation.uuid.validate(uuid.string())" }
def { name: "compile" by: "grpc.federation.regexp.compile('[a-z]+\\\\d\\\\d')" }
def { name: "must_compile" by: "grpc.federation.regexp.mustCompile('([a-z]+)\\\\d(\\\\d)')" }
def { name: "quote_meta" by: "grpc.federation.regexp.quoteMeta('[a-z]+\\\\d')" }
def { name: "find_string_submatch" by: "must_compile.findStringSubmatch('abc123')" }
def { name: "match_string" by: "compile.matchString('abc12')" }
def { name: "replace_all_string" by: "grpc.federation.regexp.compile('mackerel').replaceAllString('mackerel is tasty', 'salmon')" }
};
Post post = 1 [(grpc.federation.field).by = "post"];
string str = 2 [(grpc.federation.field).by = "'hello'"];
string uuid = 3 [(grpc.federation.field).by = "uuid.string()"];
string loc = 4 [(grpc.federation.field).by = "loc.string()"];
string value1 = 5 [(grpc.federation.field).by = "value1"];
string item_type_name = 6 [(grpc.federation.field).by = "Item.ItemType.name(Item.ItemType.ITEM_TYPE_1)"];
string location_type_name = 7 [(grpc.federation.field).by = "Item.Location.LocationType.name(Item.Location.LocationType.LOCATION_TYPE_1)"];
string user_item_type_name = 8 [(grpc.federation.field).by = "user.Item.ItemType.name(user.Item.ItemType.ITEM_TYPE_2)"];
Item.ItemType item_type_value_enum = 9 [(grpc.federation.field).by = "user.Item.ItemType.value('ITEM_TYPE_1')"];
int32 item_type_value_int = 10 [(grpc.federation.field).by = "user.Item.ItemType.value('ITEM_TYPE_1')"];
Item.ItemType item_type_value_cast = 11 [(grpc.federation.field).by = "user.Item.ItemType.from(1)"];
int32 location_type_value = 12 [(grpc.federation.field).by = "Item.Location.LocationType.value('LOCATION_TYPE_1')"];
int32 user_item_type_value = 13 [(grpc.federation.field).by = "user.Item.ItemType.value('ITEM_TYPE_2')"];
A a = 14 [(grpc.federation.field).by = "a"];
repeated int32 sorted_values = 15 [(grpc.federation.field).by = "sorted_values"];
repeated Item sorted_items = 16 [(grpc.federation.field).by = "sorted_items"];
map map_value = 17 [(grpc.federation.field).by = "map_value"];
google.protobuf.DoubleValue double_wrapper_value = 18 [(grpc.federation.field).by = "google.protobuf.DoubleValue{value: 1.23}"];
google.protobuf.FloatValue float_wrapper_value = 19 [(grpc.federation.field).by = "google.protobuf.FloatValue{value: 3.45}"];
google.protobuf.Int64Value i64_wrapper_value = 20 [(grpc.federation.field).by = "google.protobuf.Int64Value{value: 1}"];
google.protobuf.UInt64Value u64_wrapper_value = 21 [(grpc.federation.field).by = "google.protobuf.UInt64Value{value: uint(2)}"];
google.protobuf.Int32Value i32_wrapper_value = 22 [(grpc.federation.field).by = "google.protobuf.Int32Value{value: 3}"];
google.protobuf.UInt32Value u32_wrapper_value = 23 [(grpc.federation.field).by = "google.protobuf.UInt32Value{value: uint(4)}"];
google.protobuf.BoolValue bool_wrapper_value = 24 [(grpc.federation.field).by = "google.protobuf.BoolValue{value: true}"];
google.protobuf.StringValue string_wrapper_value = 25 [(grpc.federation.field).by = "google.protobuf.StringValue{value: 'hello'}"];
google.protobuf.BytesValue bytes_wrapper_value = 26 [(grpc.federation.field).by = "google.protobuf.BytesValue{value: bytes('world')}"];
string hello = 27 [(grpc.federation.field).by = "'hello\\nworld'"];
google.protobuf.Timestamp null_timestamp = 28 [(grpc.federation.field).by = "null"];
google.protobuf.Timestamp null_timestamp2 = 29 [(grpc.federation.field).by = "null_value"];
google.protobuf.Timestamp null_timestamp3 = 30 [(grpc.federation.field).by = "true ? null : google.protobuf.Timestamp{}"];
string jp_loc = 31 [(grpc.federation.field).by = "jp_time.location().string()"];
string strings_join = 32 [(grpc.federation.field).by = "strings_join"];
double parse_float = 33 [(grpc.federation.field).by = "parse_float"];
string url_user_name = 34 [(grpc.federation.field).by = "url.userinfo().username()"];
Item.ItemType enum_value = 35 [(grpc.federation.field).by = "e"];
string enum_value_str = 36 [(grpc.federation.field).by = "Item.ItemType.attr(e, 'en')"];
double sqrt_double = 37 [(grpc.federation.field).by = "sqrt_double"];
double sqrt_int = 38 [(grpc.federation.field).by = "sqrt_int"];
double pow = 39 [(grpc.federation.field).by = "pow"];
double floor = 40 [(grpc.federation.field).by = "floor"];
repeated int64 flatten = 41 [(grpc.federation.field).by = "flatten"];
double round = 42 [(grpc.federation.field).by = "round"];
google.protobuf.Any any = 43 [(grpc.federation.field).by = "any"];
string replaced = 44 [(grpc.federation.field).by = "replaced"];
map list_to_map = 45 [(grpc.federation.field).by = "list_to_map"];
string uuid_parse = 46 [(grpc.federation.field).by = "uuid_parse.string()"];
bool uuid_validate = 47 [(grpc.federation.field).by = "uuid_validate"];
string compile = 48 [(grpc.federation.field).by = "compile.string()"];
string must_compile = 49 [(grpc.federation.field).by = "must_compile.string()"];
string quote_meta = 50 [(grpc.federation.field).by = "quote_meta"];
repeated string find_string_submatch = 51 [(grpc.federation.field).by = "find_string_submatch"];
bool match_string = 52 [(grpc.federation.field).by = "match_string"];
string replace_all_string = 53 [(grpc.federation.field).by = "replace_all_string"];
}
message A {
message B {
option (grpc.federation.message) = {
def [
{ name: "foo" message: { name: "A.B.C" args { name: "type" by: "'foo'" } } },
{ name: "bar" message: { name: "A.B.C" args { name: "type" by: "'bar'" } } },
{ if: "foo.type == 'foo'" by: "grpc.federation.log.info('output federation log', {'messages': [foo, bar], 'message_map': {'foo': foo, 'bar': bar}})" },
{ by: "grpc.federation.log.add({'foo_type': foo.type, 'bar_type': bar.type})" }
]
};
message C {
string type = 1 [(grpc.federation.field).by = "$.type"];
}
C foo = 1 [(grpc.federation.field).by = "foo"];
C bar = 2 [(grpc.federation.field).by = "bar"];
}
option (grpc.federation.message) = {
def { name: "b" message { name: "A.B" } }
};
B b = 1 [(grpc.federation.field).by = "b"];
oneof opt {
B.C opt_c = 2 [(grpc.federation.field).oneof = {
if: "true"
by: "A.B.C{}"
}];
}
}
message Post {
option (grpc.federation.message) = {
def [
{
name: "res"
call {
method: "post.PostService/GetPost"
request { field: "id", by: "$.id" }
timeout: "10s"
retry {
constant {
interval: "2s"
max_retries: 3
}
}
}
},
{ name: "post", by: "res.post", autobind: true },
{
name: "user"
message {
name: "User"
args { inline: "post" }
}
}
]
};
string id = 1;
string title = 2;
string content = 3;
User user = 4 [(grpc.federation.field).by = "user"];
}
message User {
option (grpc.federation.message) = {
def [
{
name: "res"
call {
method: "user.UserService/GetUser"
request [
{ field: "id", by: "$.user_id" },
{ field: "type" by: "user.Item.ItemType.value('ITEM_TYPE_1')" }
]
timeout: "20s"
retry {
exponential {
initial_interval: "1s"
randomization_factor: 0.7
multiplier: 1.7
max_interval: "30s"
max_retries: 3
}
}
}
},
{ name: "user", by: "res.user", autobind: true }
]
};
string id = 1;
string name = 2;
repeated Item items = 3;
map profile = 4;
oneof attr {
AttrA attr_a = 5;
AttrB b = 6;
}
message AttrA {
option (grpc.federation.message).alias = "user.User.AttrA";
string foo = 1;
}
message AttrB {
option (grpc.federation.message).alias = "user.User.AttrB";
bool bar = 2;
}
}
message Item {
option (grpc.federation.message).alias = "user.Item";
enum ItemType {
option (grpc.federation.enum).alias = "user.Item.ItemType";
ITEM_TYPE_UNSPECIFIED = 0 [(grpc.federation.enum_value) = {
attr {
name: "en"
value: "unknown item"
}
attr {
name: "sub"
value: ""
}
}];
ITEM_TYPE_1 = 1 [(grpc.federation.enum_value) = {
attr {
name: "en"
value: "first item type"
}
attr {
name: "sub"
value: "xxx"
}
}];
ITEM_TYPE_2 = 2 [(grpc.federation.enum_value) = {
attr {
name: "en"
value: "second item type"
}
attr {
name: "sub"
value: "yyy"
}
}];
ITEM_TYPE_3 = 3 [(grpc.federation.enum_value) = {
attr {
name: "en"
value: "third item type"
}
attr {
name: "sub"
value: "zzz"
}
}];
}
message Location {
option (grpc.federation.message).alias = "user.Item.Location";
string addr1 = 1;
string addr2 = 2;
oneof addr3 {
AddrA addr_a = 3;
AddrB b = 4;
string c = 5;
};
message AddrA {
option (grpc.federation.message).alias = "user.Item.Location.AddrA";
string foo = 1;
}
message AddrB {
option (grpc.federation.message).alias = "user.Item.Location.AddrB";
int64 bar = 1;
}
enum LocationType {
LOCATION_TYPE_0 = 0;
LOCATION_TYPE_1 = 1;
}
}
string name = 1;
ItemType type = 2;
int64 value = 3;
Location location = 4;
}
================================================
FILE: _examples/02_simple/proto/post/post.proto
================================================
syntax = "proto3";
package post;
option go_package = "example/post;post";
service PostService {
rpc GetPost(GetPostRequest) returns (GetPostResponse) {};
rpc GetPosts(GetPostsRequest) returns (GetPostsResponse) {};
}
message GetPostRequest {
string id = 1;
}
message GetPostResponse {
Post post = 1;
}
message GetPostsRequest {
repeated string ids = 1;
}
message GetPostsResponse {
repeated Post posts = 1;
}
message Post {
string id = 1;
string title = 2;
string content = 3;
string user_id = 4;
}
================================================
FILE: _examples/02_simple/proto/user/user.proto
================================================
syntax = "proto3";
package user;
import "google/protobuf/any.proto";
option go_package = "example/user;user";
service UserService {
rpc GetUser(GetUserRequest) returns (GetUserResponse) {};
rpc GetUsers(GetUsersRequest) returns (GetUsersResponse) {};
}
message GetUserRequest {
string id = 1;
int32 type = 2;
}
message GetUserResponse {
User user = 1;
}
message GetUsersRequest {
repeated string ids = 1;
}
message GetUsersResponse {
repeated User users = 1;
}
message User {
string id = 1;
string name = 2;
repeated Item items = 3;
map profile = 4;
oneof attr {
AttrA attr_a = 5;
AttrB b = 6;
}
message AttrA {
string foo = 1;
}
message AttrB {
bool bar = 2;
}
}
message Item {
enum ItemType {
ITEM_TYPE_UNSPECIFIED = 0;
ITEM_TYPE_1 = 1;
ITEM_TYPE_2 = 2;
ITEM_TYPE_3 = 3;
}
message Location {
string addr1 = 1;
string addr2 = 2;
oneof addr3 {
AddrA addr_a = 3;
AddrB b = 4;
string c = 5;
};
message AddrA {
string foo = 1;
}
message AddrB {
int64 bar = 1;
}
}
string name = 1;
ItemType type = 2;
int64 value = 3;
Location location = 4;
}
================================================
FILE: _examples/02_simple/user/user.pb.go
================================================
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.33.0
// protoc (unknown)
// source: user/user.proto
package user
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
anypb "google.golang.org/protobuf/types/known/anypb"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
type Item_ItemType int32
const (
Item_ITEM_TYPE_UNSPECIFIED Item_ItemType = 0
Item_ITEM_TYPE_1 Item_ItemType = 1
Item_ITEM_TYPE_2 Item_ItemType = 2
Item_ITEM_TYPE_3 Item_ItemType = 3
)
// Enum value maps for Item_ItemType.
var (
Item_ItemType_name = map[int32]string{
0: "ITEM_TYPE_UNSPECIFIED",
1: "ITEM_TYPE_1",
2: "ITEM_TYPE_2",
3: "ITEM_TYPE_3",
}
Item_ItemType_value = map[string]int32{
"ITEM_TYPE_UNSPECIFIED": 0,
"ITEM_TYPE_1": 1,
"ITEM_TYPE_2": 2,
"ITEM_TYPE_3": 3,
}
)
func (x Item_ItemType) Enum() *Item_ItemType {
p := new(Item_ItemType)
*p = x
return p
}
func (x Item_ItemType) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (Item_ItemType) Descriptor() protoreflect.EnumDescriptor {
return file_user_user_proto_enumTypes[0].Descriptor()
}
func (Item_ItemType) Type() protoreflect.EnumType {
return &file_user_user_proto_enumTypes[0]
}
func (x Item_ItemType) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use Item_ItemType.Descriptor instead.
func (Item_ItemType) EnumDescriptor() ([]byte, []int) {
return file_user_user_proto_rawDescGZIP(), []int{5, 0}
}
type GetUserRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
Type int32 `protobuf:"varint,2,opt,name=type,proto3" json:"type,omitempty"`
}
func (x *GetUserRequest) Reset() {
*x = GetUserRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_user_user_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GetUserRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetUserRequest) ProtoMessage() {}
func (x *GetUserRequest) ProtoReflect() protoreflect.Message {
mi := &file_user_user_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GetUserRequest.ProtoReflect.Descriptor instead.
func (*GetUserRequest) Descriptor() ([]byte, []int) {
return file_user_user_proto_rawDescGZIP(), []int{0}
}
func (x *GetUserRequest) GetId() string {
if x != nil {
return x.Id
}
return ""
}
func (x *GetUserRequest) GetType() int32 {
if x != nil {
return x.Type
}
return 0
}
type GetUserResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
User *User `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"`
}
func (x *GetUserResponse) Reset() {
*x = GetUserResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_user_user_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GetUserResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetUserResponse) ProtoMessage() {}
func (x *GetUserResponse) ProtoReflect() protoreflect.Message {
mi := &file_user_user_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GetUserResponse.ProtoReflect.Descriptor instead.
func (*GetUserResponse) Descriptor() ([]byte, []int) {
return file_user_user_proto_rawDescGZIP(), []int{1}
}
func (x *GetUserResponse) GetUser() *User {
if x != nil {
return x.User
}
return nil
}
type GetUsersRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Ids []string `protobuf:"bytes,1,rep,name=ids,proto3" json:"ids,omitempty"`
}
func (x *GetUsersRequest) Reset() {
*x = GetUsersRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_user_user_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GetUsersRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetUsersRequest) ProtoMessage() {}
func (x *GetUsersRequest) ProtoReflect() protoreflect.Message {
mi := &file_user_user_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GetUsersRequest.ProtoReflect.Descriptor instead.
func (*GetUsersRequest) Descriptor() ([]byte, []int) {
return file_user_user_proto_rawDescGZIP(), []int{2}
}
func (x *GetUsersRequest) GetIds() []string {
if x != nil {
return x.Ids
}
return nil
}
type GetUsersResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Users []*User `protobuf:"bytes,1,rep,name=users,proto3" json:"users,omitempty"`
}
func (x *GetUsersResponse) Reset() {
*x = GetUsersResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_user_user_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GetUsersResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetUsersResponse) ProtoMessage() {}
func (x *GetUsersResponse) ProtoReflect() protoreflect.Message {
mi := &file_user_user_proto_msgTypes[3]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GetUsersResponse.ProtoReflect.Descriptor instead.
func (*GetUsersResponse) Descriptor() ([]byte, []int) {
return file_user_user_proto_rawDescGZIP(), []int{3}
}
func (x *GetUsersResponse) GetUsers() []*User {
if x != nil {
return x.Users
}
return nil
}
type User struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
Items []*Item `protobuf:"bytes,3,rep,name=items,proto3" json:"items,omitempty"`
Profile map[string]*anypb.Any `protobuf:"bytes,4,rep,name=profile,proto3" json:"profile,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
// Types that are assignable to Attr:
//
// *User_AttrA_
// *User_B
Attr isUser_Attr `protobuf_oneof:"attr"`
}
func (x *User) Reset() {
*x = User{}
if protoimpl.UnsafeEnabled {
mi := &file_user_user_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *User) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*User) ProtoMessage() {}
func (x *User) ProtoReflect() protoreflect.Message {
mi := &file_user_user_proto_msgTypes[4]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use User.ProtoReflect.Descriptor instead.
func (*User) Descriptor() ([]byte, []int) {
return file_user_user_proto_rawDescGZIP(), []int{4}
}
func (x *User) GetId() string {
if x != nil {
return x.Id
}
return ""
}
func (x *User) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *User) GetItems() []*Item {
if x != nil {
return x.Items
}
return nil
}
func (x *User) GetProfile() map[string]*anypb.Any {
if x != nil {
return x.Profile
}
return nil
}
func (m *User) GetAttr() isUser_Attr {
if m != nil {
return m.Attr
}
return nil
}
func (x *User) GetAttrA() *User_AttrA {
if x, ok := x.GetAttr().(*User_AttrA_); ok {
return x.AttrA
}
return nil
}
func (x *User) GetB() *User_AttrB {
if x, ok := x.GetAttr().(*User_B); ok {
return x.B
}
return nil
}
type isUser_Attr interface {
isUser_Attr()
}
type User_AttrA_ struct {
AttrA *User_AttrA `protobuf:"bytes,5,opt,name=attr_a,json=attrA,proto3,oneof"`
}
type User_B struct {
B *User_AttrB `protobuf:"bytes,6,opt,name=b,proto3,oneof"`
}
func (*User_AttrA_) isUser_Attr() {}
func (*User_B) isUser_Attr() {}
type Item struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
Type Item_ItemType `protobuf:"varint,2,opt,name=type,proto3,enum=user.Item_ItemType" json:"type,omitempty"`
Value int64 `protobuf:"varint,3,opt,name=value,proto3" json:"value,omitempty"`
Location *Item_Location `protobuf:"bytes,4,opt,name=location,proto3" json:"location,omitempty"`
}
func (x *Item) Reset() {
*x = Item{}
if protoimpl.UnsafeEnabled {
mi := &file_user_user_proto_msgTypes[5]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Item) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Item) ProtoMessage() {}
func (x *Item) ProtoReflect() protoreflect.Message {
mi := &file_user_user_proto_msgTypes[5]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Item.ProtoReflect.Descriptor instead.
func (*Item) Descriptor() ([]byte, []int) {
return file_user_user_proto_rawDescGZIP(), []int{5}
}
func (x *Item) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *Item) GetType() Item_ItemType {
if x != nil {
return x.Type
}
return Item_ITEM_TYPE_UNSPECIFIED
}
func (x *Item) GetValue() int64 {
if x != nil {
return x.Value
}
return 0
}
func (x *Item) GetLocation() *Item_Location {
if x != nil {
return x.Location
}
return nil
}
type User_AttrA struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Foo string `protobuf:"bytes,1,opt,name=foo,proto3" json:"foo,omitempty"`
}
func (x *User_AttrA) Reset() {
*x = User_AttrA{}
if protoimpl.UnsafeEnabled {
mi := &file_user_user_proto_msgTypes[7]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *User_AttrA) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*User_AttrA) ProtoMessage() {}
func (x *User_AttrA) ProtoReflect() protoreflect.Message {
mi := &file_user_user_proto_msgTypes[7]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use User_AttrA.ProtoReflect.Descriptor instead.
func (*User_AttrA) Descriptor() ([]byte, []int) {
return file_user_user_proto_rawDescGZIP(), []int{4, 1}
}
func (x *User_AttrA) GetFoo() string {
if x != nil {
return x.Foo
}
return ""
}
type User_AttrB struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Bar bool `protobuf:"varint,2,opt,name=bar,proto3" json:"bar,omitempty"`
}
func (x *User_AttrB) Reset() {
*x = User_AttrB{}
if protoimpl.UnsafeEnabled {
mi := &file_user_user_proto_msgTypes[8]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *User_AttrB) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*User_AttrB) ProtoMessage() {}
func (x *User_AttrB) ProtoReflect() protoreflect.Message {
mi := &file_user_user_proto_msgTypes[8]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use User_AttrB.ProtoReflect.Descriptor instead.
func (*User_AttrB) Descriptor() ([]byte, []int) {
return file_user_user_proto_rawDescGZIP(), []int{4, 2}
}
func (x *User_AttrB) GetBar() bool {
if x != nil {
return x.Bar
}
return false
}
type Item_Location struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Addr1 string `protobuf:"bytes,1,opt,name=addr1,proto3" json:"addr1,omitempty"`
Addr2 string `protobuf:"bytes,2,opt,name=addr2,proto3" json:"addr2,omitempty"`
// Types that are assignable to Addr3:
//
// *Item_Location_AddrA_
// *Item_Location_B
// *Item_Location_C
Addr3 isItem_Location_Addr3 `protobuf_oneof:"addr3"`
}
func (x *Item_Location) Reset() {
*x = Item_Location{}
if protoimpl.UnsafeEnabled {
mi := &file_user_user_proto_msgTypes[9]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Item_Location) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Item_Location) ProtoMessage() {}
func (x *Item_Location) ProtoReflect() protoreflect.Message {
mi := &file_user_user_proto_msgTypes[9]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Item_Location.ProtoReflect.Descriptor instead.
func (*Item_Location) Descriptor() ([]byte, []int) {
return file_user_user_proto_rawDescGZIP(), []int{5, 0}
}
func (x *Item_Location) GetAddr1() string {
if x != nil {
return x.Addr1
}
return ""
}
func (x *Item_Location) GetAddr2() string {
if x != nil {
return x.Addr2
}
return ""
}
func (m *Item_Location) GetAddr3() isItem_Location_Addr3 {
if m != nil {
return m.Addr3
}
return nil
}
func (x *Item_Location) GetAddrA() *Item_Location_AddrA {
if x, ok := x.GetAddr3().(*Item_Location_AddrA_); ok {
return x.AddrA
}
return nil
}
func (x *Item_Location) GetB() *Item_Location_AddrB {
if x, ok := x.GetAddr3().(*Item_Location_B); ok {
return x.B
}
return nil
}
func (x *Item_Location) GetC() string {
if x, ok := x.GetAddr3().(*Item_Location_C); ok {
return x.C
}
return ""
}
type isItem_Location_Addr3 interface {
isItem_Location_Addr3()
}
type Item_Location_AddrA_ struct {
AddrA *Item_Location_AddrA `protobuf:"bytes,3,opt,name=addr_a,json=addrA,proto3,oneof"`
}
type Item_Location_B struct {
B *Item_Location_AddrB `protobuf:"bytes,4,opt,name=b,proto3,oneof"`
}
type Item_Location_C struct {
C string `protobuf:"bytes,5,opt,name=c,proto3,oneof"`
}
func (*Item_Location_AddrA_) isItem_Location_Addr3() {}
func (*Item_Location_B) isItem_Location_Addr3() {}
func (*Item_Location_C) isItem_Location_Addr3() {}
type Item_Location_AddrA struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Foo string `protobuf:"bytes,1,opt,name=foo,proto3" json:"foo,omitempty"`
}
func (x *Item_Location_AddrA) Reset() {
*x = Item_Location_AddrA{}
if protoimpl.UnsafeEnabled {
mi := &file_user_user_proto_msgTypes[10]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Item_Location_AddrA) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Item_Location_AddrA) ProtoMessage() {}
func (x *Item_Location_AddrA) ProtoReflect() protoreflect.Message {
mi := &file_user_user_proto_msgTypes[10]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Item_Location_AddrA.ProtoReflect.Descriptor instead.
func (*Item_Location_AddrA) Descriptor() ([]byte, []int) {
return file_user_user_proto_rawDescGZIP(), []int{5, 0, 0}
}
func (x *Item_Location_AddrA) GetFoo() string {
if x != nil {
return x.Foo
}
return ""
}
type Item_Location_AddrB struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Bar int64 `protobuf:"varint,1,opt,name=bar,proto3" json:"bar,omitempty"`
}
func (x *Item_Location_AddrB) Reset() {
*x = Item_Location_AddrB{}
if protoimpl.UnsafeEnabled {
mi := &file_user_user_proto_msgTypes[11]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Item_Location_AddrB) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Item_Location_AddrB) ProtoMessage() {}
func (x *Item_Location_AddrB) ProtoReflect() protoreflect.Message {
mi := &file_user_user_proto_msgTypes[11]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Item_Location_AddrB.ProtoReflect.Descriptor instead.
func (*Item_Location_AddrB) Descriptor() ([]byte, []int) {
return file_user_user_proto_rawDescGZIP(), []int{5, 0, 1}
}
func (x *Item_Location_AddrB) GetBar() int64 {
if x != nil {
return x.Bar
}
return 0
}
var File_user_user_proto protoreflect.FileDescriptor
var file_user_user_proto_rawDesc = []byte{
0x0a, 0x0f, 0x75, 0x73, 0x65, 0x72, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x12, 0x04, 0x75, 0x73, 0x65, 0x72, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6e, 0x79, 0x2e, 0x70, 0x72, 0x6f,
0x74, 0x6f, 0x22, 0x34, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71,
0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01,
0x28, 0x05, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x22, 0x31, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x55,
0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1e, 0x0a, 0x04, 0x75,
0x73, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x75, 0x73, 0x65, 0x72,
0x2e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x04, 0x75, 0x73, 0x65, 0x72, 0x22, 0x23, 0x0a, 0x0f, 0x47,
0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x10,
0x0a, 0x03, 0x69, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x03, 0x69, 0x64, 0x73,
0x22, 0x34, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70,
0x6f, 0x6e, 0x73, 0x65, 0x12, 0x20, 0x0a, 0x05, 0x75, 0x73, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20,
0x03, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x52,
0x05, 0x75, 0x73, 0x65, 0x72, 0x73, 0x22, 0xdc, 0x02, 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, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e,
0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x03, 0x20, 0x03,
0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x49, 0x74, 0x65, 0x6d, 0x52, 0x05,
0x69, 0x74, 0x65, 0x6d, 0x73, 0x12, 0x31, 0x0a, 0x07, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65,
0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x55, 0x73,
0x65, 0x72, 0x2e, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52,
0x07, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x12, 0x29, 0x0a, 0x06, 0x61, 0x74, 0x74, 0x72,
0x5f, 0x61, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e,
0x55, 0x73, 0x65, 0x72, 0x2e, 0x41, 0x74, 0x74, 0x72, 0x41, 0x48, 0x00, 0x52, 0x05, 0x61, 0x74,
0x74, 0x72, 0x41, 0x12, 0x20, 0x0a, 0x01, 0x62, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10,
0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x2e, 0x41, 0x74, 0x74, 0x72, 0x42,
0x48, 0x00, 0x52, 0x01, 0x62, 0x1a, 0x50, 0x0a, 0x0c, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65,
0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01,
0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x2a, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65,
0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x05, 0x76, 0x61,
0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x19, 0x0a, 0x05, 0x41, 0x74, 0x74, 0x72, 0x41,
0x12, 0x10, 0x0a, 0x03, 0x66, 0x6f, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x66,
0x6f, 0x6f, 0x1a, 0x19, 0x0a, 0x05, 0x41, 0x74, 0x74, 0x72, 0x42, 0x12, 0x10, 0x0a, 0x03, 0x62,
0x61, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x03, 0x62, 0x61, 0x72, 0x42, 0x06, 0x0a,
0x04, 0x61, 0x74, 0x74, 0x72, 0x22, 0xcb, 0x03, 0x0a, 0x04, 0x49, 0x74, 0x65, 0x6d, 0x12, 0x12,
0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61,
0x6d, 0x65, 0x12, 0x27, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e,
0x32, 0x13, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x49, 0x74, 0x65, 0x6d, 0x2e, 0x49, 0x74, 0x65,
0x6d, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x76,
0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75,
0x65, 0x12, 0x2f, 0x0a, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20,
0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x49, 0x74, 0x65, 0x6d, 0x2e,
0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69,
0x6f, 0x6e, 0x1a, 0xe4, 0x01, 0x0a, 0x08, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12,
0x14, 0x0a, 0x05, 0x61, 0x64, 0x64, 0x72, 0x31, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05,
0x61, 0x64, 0x64, 0x72, 0x31, 0x12, 0x14, 0x0a, 0x05, 0x61, 0x64, 0x64, 0x72, 0x32, 0x18, 0x02,
0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x61, 0x64, 0x64, 0x72, 0x32, 0x12, 0x32, 0x0a, 0x06, 0x61,
0x64, 0x64, 0x72, 0x5f, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x75, 0x73,
0x65, 0x72, 0x2e, 0x49, 0x74, 0x65, 0x6d, 0x2e, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e,
0x2e, 0x41, 0x64, 0x64, 0x72, 0x41, 0x48, 0x00, 0x52, 0x05, 0x61, 0x64, 0x64, 0x72, 0x41, 0x12,
0x29, 0x0a, 0x01, 0x62, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x75, 0x73, 0x65,
0x72, 0x2e, 0x49, 0x74, 0x65, 0x6d, 0x2e, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e,
0x41, 0x64, 0x64, 0x72, 0x42, 0x48, 0x00, 0x52, 0x01, 0x62, 0x12, 0x0e, 0x0a, 0x01, 0x63, 0x18,
0x05, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x01, 0x63, 0x1a, 0x19, 0x0a, 0x05, 0x41, 0x64,
0x64, 0x72, 0x41, 0x12, 0x10, 0x0a, 0x03, 0x66, 0x6f, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
0x52, 0x03, 0x66, 0x6f, 0x6f, 0x1a, 0x19, 0x0a, 0x05, 0x41, 0x64, 0x64, 0x72, 0x42, 0x12, 0x10,
0x0a, 0x03, 0x62, 0x61, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x62, 0x61, 0x72,
0x42, 0x07, 0x0a, 0x05, 0x61, 0x64, 0x64, 0x72, 0x33, 0x22, 0x58, 0x0a, 0x08, 0x49, 0x74, 0x65,
0x6d, 0x54, 0x79, 0x70, 0x65, 0x12, 0x19, 0x0a, 0x15, 0x49, 0x54, 0x45, 0x4d, 0x5f, 0x54, 0x59,
0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00,
0x12, 0x0f, 0x0a, 0x0b, 0x49, 0x54, 0x45, 0x4d, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x31, 0x10,
0x01, 0x12, 0x0f, 0x0a, 0x0b, 0x49, 0x54, 0x45, 0x4d, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x32,
0x10, 0x02, 0x12, 0x0f, 0x0a, 0x0b, 0x49, 0x54, 0x45, 0x4d, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f,
0x33, 0x10, 0x03, 0x32, 0x84, 0x01, 0x0a, 0x0b, 0x55, 0x73, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76,
0x69, 0x63, 0x65, 0x12, 0x38, 0x0a, 0x07, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x12, 0x14,
0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71,
0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x47, 0x65, 0x74, 0x55,
0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x3b, 0x0a,
0x08, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x73, 0x12, 0x15, 0x2e, 0x75, 0x73, 0x65, 0x72,
0x2e, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
0x1a, 0x16, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x73,
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x58, 0x0a, 0x08, 0x63, 0x6f,
0x6d, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x42, 0x09, 0x55, 0x73, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x74,
0x6f, 0x50, 0x01, 0x5a, 0x11, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2f, 0x75, 0x73, 0x65,
0x72, 0x3b, 0x75, 0x73, 0x65, 0x72, 0xa2, 0x02, 0x03, 0x55, 0x58, 0x58, 0xaa, 0x02, 0x04, 0x55,
0x73, 0x65, 0x72, 0xca, 0x02, 0x04, 0x55, 0x73, 0x65, 0x72, 0xe2, 0x02, 0x10, 0x55, 0x73, 0x65,
0x72, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x04,
0x55, 0x73, 0x65, 0x72, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_user_user_proto_rawDescOnce sync.Once
file_user_user_proto_rawDescData = file_user_user_proto_rawDesc
)
func file_user_user_proto_rawDescGZIP() []byte {
file_user_user_proto_rawDescOnce.Do(func() {
file_user_user_proto_rawDescData = protoimpl.X.CompressGZIP(file_user_user_proto_rawDescData)
})
return file_user_user_proto_rawDescData
}
var file_user_user_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
var file_user_user_proto_msgTypes = make([]protoimpl.MessageInfo, 12)
var file_user_user_proto_goTypes = []interface{}{
(Item_ItemType)(0), // 0: user.Item.ItemType
(*GetUserRequest)(nil), // 1: user.GetUserRequest
(*GetUserResponse)(nil), // 2: user.GetUserResponse
(*GetUsersRequest)(nil), // 3: user.GetUsersRequest
(*GetUsersResponse)(nil), // 4: user.GetUsersResponse
(*User)(nil), // 5: user.User
(*Item)(nil), // 6: user.Item
nil, // 7: user.User.ProfileEntry
(*User_AttrA)(nil), // 8: user.User.AttrA
(*User_AttrB)(nil), // 9: user.User.AttrB
(*Item_Location)(nil), // 10: user.Item.Location
(*Item_Location_AddrA)(nil), // 11: user.Item.Location.AddrA
(*Item_Location_AddrB)(nil), // 12: user.Item.Location.AddrB
(*anypb.Any)(nil), // 13: google.protobuf.Any
}
var file_user_user_proto_depIdxs = []int32{
5, // 0: user.GetUserResponse.user:type_name -> user.User
5, // 1: user.GetUsersResponse.users:type_name -> user.User
6, // 2: user.User.items:type_name -> user.Item
7, // 3: user.User.profile:type_name -> user.User.ProfileEntry
8, // 4: user.User.attr_a:type_name -> user.User.AttrA
9, // 5: user.User.b:type_name -> user.User.AttrB
0, // 6: user.Item.type:type_name -> user.Item.ItemType
10, // 7: user.Item.location:type_name -> user.Item.Location
13, // 8: user.User.ProfileEntry.value:type_name -> google.protobuf.Any
11, // 9: user.Item.Location.addr_a:type_name -> user.Item.Location.AddrA
12, // 10: user.Item.Location.b:type_name -> user.Item.Location.AddrB
1, // 11: user.UserService.GetUser:input_type -> user.GetUserRequest
3, // 12: user.UserService.GetUsers:input_type -> user.GetUsersRequest
2, // 13: user.UserService.GetUser:output_type -> user.GetUserResponse
4, // 14: user.UserService.GetUsers:output_type -> user.GetUsersResponse
13, // [13:15] is the sub-list for method output_type
11, // [11:13] is the sub-list for method input_type
11, // [11:11] is the sub-list for extension type_name
11, // [11:11] is the sub-list for extension extendee
0, // [0:11] is the sub-list for field type_name
}
func init() { file_user_user_proto_init() }
func file_user_user_proto_init() {
if File_user_user_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_user_user_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetUserRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_user_user_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetUserResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_user_user_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetUsersRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_user_user_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetUsersResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_user_user_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*User); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_user_user_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Item); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_user_user_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*User_AttrA); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_user_user_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*User_AttrB); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_user_user_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Item_Location); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_user_user_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Item_Location_AddrA); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_user_user_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Item_Location_AddrB); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
file_user_user_proto_msgTypes[4].OneofWrappers = []interface{}{
(*User_AttrA_)(nil),
(*User_B)(nil),
}
file_user_user_proto_msgTypes[9].OneofWrappers = []interface{}{
(*Item_Location_AddrA_)(nil),
(*Item_Location_B)(nil),
(*Item_Location_C)(nil),
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_user_user_proto_rawDesc,
NumEnums: 1,
NumMessages: 12,
NumExtensions: 0,
NumServices: 1,
},
GoTypes: file_user_user_proto_goTypes,
DependencyIndexes: file_user_user_proto_depIdxs,
EnumInfos: file_user_user_proto_enumTypes,
MessageInfos: file_user_user_proto_msgTypes,
}.Build()
File_user_user_proto = out.File
file_user_user_proto_rawDesc = nil
file_user_user_proto_goTypes = nil
file_user_user_proto_depIdxs = nil
}
================================================
FILE: _examples/02_simple/user/user_grpc.pb.go
================================================
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.3.0
// - protoc (unknown)
// source: user/user.proto
package user
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 (
UserService_GetUser_FullMethodName = "/user.UserService/GetUser"
UserService_GetUsers_FullMethodName = "/user.UserService/GetUsers"
)
// UserServiceClient is the client API for UserService 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 UserServiceClient interface {
GetUser(ctx context.Context, in *GetUserRequest, opts ...grpc.CallOption) (*GetUserResponse, error)
GetUsers(ctx context.Context, in *GetUsersRequest, opts ...grpc.CallOption) (*GetUsersResponse, error)
}
type userServiceClient struct {
cc grpc.ClientConnInterface
}
func NewUserServiceClient(cc grpc.ClientConnInterface) UserServiceClient {
return &userServiceClient{cc}
}
func (c *userServiceClient) GetUser(ctx context.Context, in *GetUserRequest, opts ...grpc.CallOption) (*GetUserResponse, error) {
out := new(GetUserResponse)
err := c.cc.Invoke(ctx, UserService_GetUser_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *userServiceClient) GetUsers(ctx context.Context, in *GetUsersRequest, opts ...grpc.CallOption) (*GetUsersResponse, error) {
out := new(GetUsersResponse)
err := c.cc.Invoke(ctx, UserService_GetUsers_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// UserServiceServer is the server API for UserService service.
// All implementations must embed UnimplementedUserServiceServer
// for forward compatibility
type UserServiceServer interface {
GetUser(context.Context, *GetUserRequest) (*GetUserResponse, error)
GetUsers(context.Context, *GetUsersRequest) (*GetUsersResponse, error)
mustEmbedUnimplementedUserServiceServer()
}
// UnimplementedUserServiceServer must be embedded to have forward compatible implementations.
type UnimplementedUserServiceServer struct {
}
func (UnimplementedUserServiceServer) GetUser(context.Context, *GetUserRequest) (*GetUserResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetUser not implemented")
}
func (UnimplementedUserServiceServer) GetUsers(context.Context, *GetUsersRequest) (*GetUsersResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetUsers not implemented")
}
func (UnimplementedUserServiceServer) mustEmbedUnimplementedUserServiceServer() {}
// UnsafeUserServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to UserServiceServer will
// result in compilation errors.
type UnsafeUserServiceServer interface {
mustEmbedUnimplementedUserServiceServer()
}
func RegisterUserServiceServer(s grpc.ServiceRegistrar, srv UserServiceServer) {
s.RegisterService(&UserService_ServiceDesc, srv)
}
func _UserService_GetUser_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetUserRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(UserServiceServer).GetUser(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: UserService_GetUser_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(UserServiceServer).GetUser(ctx, req.(*GetUserRequest))
}
return interceptor(ctx, in, info, handler)
}
func _UserService_GetUsers_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetUsersRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(UserServiceServer).GetUsers(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: UserService_GetUsers_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(UserServiceServer).GetUsers(ctx, req.(*GetUsersRequest))
}
return interceptor(ctx, in, info, handler)
}
// UserService_ServiceDesc is the grpc.ServiceDesc for UserService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var UserService_ServiceDesc = grpc.ServiceDesc{
ServiceName: "user.UserService",
HandlerType: (*UserServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "GetUser",
Handler: _UserService_GetUser_Handler,
},
{
MethodName: "GetUsers",
Handler: _UserService_GetUsers_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "user/user.proto",
}
================================================
FILE: _examples/03_custom_resolver/.gitignore
================================================
grpc/federation
================================================
FILE: _examples/03_custom_resolver/.vscode/settings.json
================================================
{
"protoc": {
"options": [
"--proto_path=proto",
"--proto_path=proto_deps"
]
},
"grpc-federation": {
"path": "../../bin/grpc-federation-language-server",
"import-paths": [
"proto",
"proto_deps"
]
}
}
================================================
FILE: _examples/03_custom_resolver/Makefile
================================================
MAKEFILE_DIR := $(dir $(lastword $(MAKEFILE_LIST)))
GOBIN := $(MAKEFILE_DIR)/../../bin
PATH := $(GOBIN):$(PATH)
JAEGER_IMAGE := jaegertracing/all-in-one:latest
.PHONY: generate
generate:
$(GOBIN)/buf generate
.PHONY: lint
lint:
@$(GOBIN)/grpc-federation-linter -Iproto -Iproto_deps ./proto/federation/federation.proto
.PHONY: test
test:
go test -race ./ -count=1
.PHONY: grpc-federation/generate
grpc-federation/generate:
@$(GOBIN)/grpc-federation-generator ./proto/federation/federation.proto
.PHONY: grpc-federation/watch
grpc-federation/watch:
@$(GOBIN)/grpc-federation-generator -w
.PHONY: jaeger/start
jaeger/start:
@docker run \
-e COLLECTOR_OTLP_ENABLED=true \
-p 16686:16686 \
-p 4317:4317 \
-p 4318:4318 \
-d \
$(JAEGER_IMAGE)
.PHONY: jaeger/stop
jaeger/stop:
@docker stop $(shell docker ps -q --filter ancestor=$(JAEGER_IMAGE))
================================================
FILE: _examples/03_custom_resolver/buf.gen.yaml
================================================
version: v1
managed:
enabled: true
plugins:
- plugin: go
out: .
opt: paths=source_relative
- plugin: go-grpc
out: .
opt: paths=source_relative
- plugin: grpc-federation
out: .
opt:
- paths=source_relative
- import_paths=proto
================================================
FILE: _examples/03_custom_resolver/buf.work.yaml
================================================
version: v1
directories:
- proto
- proto_deps
================================================
FILE: _examples/03_custom_resolver/federation/federation.pb.go
================================================
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.33.0
// protoc (unknown)
// source: federation/federation.proto
package federation
import (
_ "github.com/mercari/grpc-federation/grpc/federation"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
durationpb "google.golang.org/protobuf/types/known/durationpb"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
type PostV2DevType int32
const (
PostV2DevType_POST_V2_DEV_TYPE PostV2DevType = 0
)
// Enum value maps for PostV2DevType.
var (
PostV2DevType_name = map[int32]string{
0: "POST_V2_DEV_TYPE",
}
PostV2DevType_value = map[string]int32{
"POST_V2_DEV_TYPE": 0,
}
)
func (x PostV2DevType) Enum() *PostV2DevType {
p := new(PostV2DevType)
*p = x
return p
}
func (x PostV2DevType) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (PostV2DevType) Descriptor() protoreflect.EnumDescriptor {
return file_federation_federation_proto_enumTypes[0].Descriptor()
}
func (PostV2DevType) Type() protoreflect.EnumType {
return &file_federation_federation_proto_enumTypes[0]
}
func (x PostV2DevType) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use PostV2DevType.Descriptor instead.
func (PostV2DevType) EnumDescriptor() ([]byte, []int) {
return file_federation_federation_proto_rawDescGZIP(), []int{0}
}
type GetPostV2DevRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
}
func (x *GetPostV2DevRequest) Reset() {
*x = GetPostV2DevRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_federation_federation_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GetPostV2DevRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetPostV2DevRequest) ProtoMessage() {}
func (x *GetPostV2DevRequest) ProtoReflect() protoreflect.Message {
mi := &file_federation_federation_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GetPostV2DevRequest.ProtoReflect.Descriptor instead.
func (*GetPostV2DevRequest) Descriptor() ([]byte, []int) {
return file_federation_federation_proto_rawDescGZIP(), []int{0}
}
func (x *GetPostV2DevRequest) GetId() string {
if x != nil {
return x.Id
}
return ""
}
type GetPostV2DevResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Post *PostV2Dev `protobuf:"bytes,1,opt,name=post,proto3" json:"post,omitempty"`
Type PostV2DevType `protobuf:"varint,2,opt,name=type,proto3,enum=federation.v2dev.PostV2DevType" json:"type,omitempty"`
EnvA string `protobuf:"bytes,3,opt,name=env_a,json=envA,proto3" json:"env_a,omitempty"`
EnvB int64 `protobuf:"varint,4,opt,name=env_b,json=envB,proto3" json:"env_b,omitempty"`
EnvCValue *durationpb.Duration `protobuf:"bytes,5,opt,name=env_c_value,json=envCValue,proto3" json:"env_c_value,omitempty"`
Ref *Ref `protobuf:"bytes,6,opt,name=ref,proto3" json:"ref,omitempty"`
}
func (x *GetPostV2DevResponse) Reset() {
*x = GetPostV2DevResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_federation_federation_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GetPostV2DevResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetPostV2DevResponse) ProtoMessage() {}
func (x *GetPostV2DevResponse) ProtoReflect() protoreflect.Message {
mi := &file_federation_federation_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GetPostV2DevResponse.ProtoReflect.Descriptor instead.
func (*GetPostV2DevResponse) Descriptor() ([]byte, []int) {
return file_federation_federation_proto_rawDescGZIP(), []int{1}
}
func (x *GetPostV2DevResponse) GetPost() *PostV2Dev {
if x != nil {
return x.Post
}
return nil
}
func (x *GetPostV2DevResponse) GetType() PostV2DevType {
if x != nil {
return x.Type
}
return PostV2DevType_POST_V2_DEV_TYPE
}
func (x *GetPostV2DevResponse) GetEnvA() string {
if x != nil {
return x.EnvA
}
return ""
}
func (x *GetPostV2DevResponse) GetEnvB() int64 {
if x != nil {
return x.EnvB
}
return 0
}
func (x *GetPostV2DevResponse) GetEnvCValue() *durationpb.Duration {
if x != nil {
return x.EnvCValue
}
return nil
}
func (x *GetPostV2DevResponse) GetRef() *Ref {
if x != nil {
return x.Ref
}
return nil
}
type PostV2Dev struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
Title string `protobuf:"bytes,2,opt,name=title,proto3" json:"title,omitempty"`
Content string `protobuf:"bytes,3,opt,name=content,proto3" json:"content,omitempty"`
User *User `protobuf:"bytes,4,opt,name=user,proto3" json:"user,omitempty"`
NullCheck bool `protobuf:"varint,5,opt,name=null_check,json=nullCheck,proto3" json:"null_check,omitempty"`
}
func (x *PostV2Dev) Reset() {
*x = PostV2Dev{}
if protoimpl.UnsafeEnabled {
mi := &file_federation_federation_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *PostV2Dev) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*PostV2Dev) ProtoMessage() {}
func (x *PostV2Dev) ProtoReflect() protoreflect.Message {
mi := &file_federation_federation_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use PostV2Dev.ProtoReflect.Descriptor instead.
func (*PostV2Dev) Descriptor() ([]byte, []int) {
return file_federation_federation_proto_rawDescGZIP(), []int{2}
}
func (x *PostV2Dev) GetId() string {
if x != nil {
return x.Id
}
return ""
}
func (x *PostV2Dev) GetTitle() string {
if x != nil {
return x.Title
}
return ""
}
func (x *PostV2Dev) GetContent() string {
if x != nil {
return x.Content
}
return ""
}
func (x *PostV2Dev) GetUser() *User {
if x != nil {
return x.User
}
return nil
}
func (x *PostV2Dev) GetNullCheck() bool {
if x != nil {
return x.NullCheck
}
return false
}
type User struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
}
func (x *User) Reset() {
*x = User{}
if protoimpl.UnsafeEnabled {
mi := &file_federation_federation_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *User) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*User) ProtoMessage() {}
func (x *User) ProtoReflect() protoreflect.Message {
mi := &file_federation_federation_proto_msgTypes[3]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use User.ProtoReflect.Descriptor instead.
func (*User) Descriptor() ([]byte, []int) {
return file_federation_federation_proto_rawDescGZIP(), []int{3}
}
func (x *User) GetId() string {
if x != nil {
return x.Id
}
return ""
}
func (x *User) GetName() string {
if x != nil {
return x.Name
}
return ""
}
type Unused struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Foo string `protobuf:"bytes,1,opt,name=foo,proto3" json:"foo,omitempty"`
}
func (x *Unused) Reset() {
*x = Unused{}
if protoimpl.UnsafeEnabled {
mi := &file_federation_federation_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Unused) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Unused) ProtoMessage() {}
func (x *Unused) ProtoReflect() protoreflect.Message {
mi := &file_federation_federation_proto_msgTypes[4]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Unused.ProtoReflect.Descriptor instead.
func (*Unused) Descriptor() ([]byte, []int) {
return file_federation_federation_proto_rawDescGZIP(), []int{4}
}
func (x *Unused) GetFoo() string {
if x != nil {
return x.Foo
}
return ""
}
type ForNameless struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Bar string `protobuf:"bytes,1,opt,name=bar,proto3" json:"bar,omitempty"`
}
func (x *ForNameless) Reset() {
*x = ForNameless{}
if protoimpl.UnsafeEnabled {
mi := &file_federation_federation_proto_msgTypes[5]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ForNameless) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ForNameless) ProtoMessage() {}
func (x *ForNameless) ProtoReflect() protoreflect.Message {
mi := &file_federation_federation_proto_msgTypes[5]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ForNameless.ProtoReflect.Descriptor instead.
func (*ForNameless) Descriptor() ([]byte, []int) {
return file_federation_federation_proto_rawDescGZIP(), []int{5}
}
func (x *ForNameless) GetBar() string {
if x != nil {
return x.Bar
}
return ""
}
type TypedNil struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
}
func (x *TypedNil) Reset() {
*x = TypedNil{}
if protoimpl.UnsafeEnabled {
mi := &file_federation_federation_proto_msgTypes[6]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *TypedNil) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*TypedNil) ProtoMessage() {}
func (x *TypedNil) ProtoReflect() protoreflect.Message {
mi := &file_federation_federation_proto_msgTypes[6]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use TypedNil.ProtoReflect.Descriptor instead.
func (*TypedNil) Descriptor() ([]byte, []int) {
return file_federation_federation_proto_rawDescGZIP(), []int{6}
}
var File_federation_federation_proto protoreflect.FileDescriptor
var file_federation_federation_proto_rawDesc = []byte{
0x0a, 0x1b, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x66, 0x65, 0x64,
0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x10, 0x66,
0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x32, 0x64, 0x65, 0x76, 0x1a,
0x20, 0x67, 0x72, 0x70, 0x63, 0x2f, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e,
0x2f, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62,
0x75, 0x66, 0x2f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x1a, 0x16, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x6f, 0x74,
0x68, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x25, 0x0a, 0x13, 0x47, 0x65, 0x74,
0x50, 0x6f, 0x73, 0x74, 0x56, 0x32, 0x64, 0x65, 0x76, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64,
0x22, 0xd9, 0x03, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x50, 0x6f, 0x73, 0x74, 0x56, 0x32, 0x64, 0x65,
0x76, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3a, 0x0a, 0x04, 0x70, 0x6f, 0x73,
0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61,
0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x32, 0x64, 0x65, 0x76, 0x2e, 0x50, 0x6f, 0x73, 0x74, 0x56,
0x32, 0x64, 0x65, 0x76, 0x42, 0x09, 0x9a, 0x4a, 0x06, 0x12, 0x04, 0x70, 0x6f, 0x73, 0x74, 0x52,
0x04, 0x70, 0x6f, 0x73, 0x74, 0x12, 0x61, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20,
0x01, 0x28, 0x0e, 0x32, 0x1f, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e,
0x2e, 0x76, 0x32, 0x64, 0x65, 0x76, 0x2e, 0x50, 0x6f, 0x73, 0x74, 0x56, 0x32, 0x64, 0x65, 0x76,
0x54, 0x79, 0x70, 0x65, 0x42, 0x2c, 0x9a, 0x4a, 0x29, 0x12, 0x27, 0x50, 0x6f, 0x73, 0x74, 0x56,
0x32, 0x64, 0x65, 0x76, 0x54, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x28, 0x27,
0x50, 0x4f, 0x53, 0x54, 0x5f, 0x56, 0x32, 0x5f, 0x44, 0x45, 0x56, 0x5f, 0x54, 0x59, 0x50, 0x45,
0x27, 0x29, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x2f, 0x0a, 0x05, 0x65, 0x6e, 0x76, 0x5f,
0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x1a, 0x9a, 0x4a, 0x17, 0x12, 0x15, 0x67, 0x72,
0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x65, 0x6e,
0x76, 0x2e, 0x61, 0x52, 0x04, 0x65, 0x6e, 0x76, 0x41, 0x12, 0x32, 0x0a, 0x05, 0x65, 0x6e, 0x76,
0x5f, 0x62, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x42, 0x1d, 0x9a, 0x4a, 0x1a, 0x12, 0x18, 0x67,
0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x65,
0x6e, 0x76, 0x2e, 0x62, 0x5b, 0x31, 0x5d, 0x52, 0x04, 0x65, 0x6e, 0x76, 0x42, 0x12, 0x5a, 0x0a,
0x0b, 0x65, 0x6e, 0x76, 0x5f, 0x63, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x05, 0x20, 0x01,
0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x1f, 0x9a,
0x4a, 0x1c, 0x12, 0x1a, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74,
0x69, 0x6f, 0x6e, 0x2e, 0x65, 0x6e, 0x76, 0x2e, 0x63, 0x5b, 0x27, 0x7a, 0x27, 0x5d, 0x52, 0x09,
0x65, 0x6e, 0x76, 0x43, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x2f, 0x0a, 0x03, 0x72, 0x65, 0x66,
0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74,
0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x32, 0x64, 0x65, 0x76, 0x2e, 0x52, 0x65, 0x66, 0x42, 0x06, 0x9a,
0x4a, 0x03, 0x12, 0x01, 0x72, 0x52, 0x03, 0x72, 0x65, 0x66, 0x3a, 0x30, 0x9a, 0x4a, 0x2d, 0x0a,
0x1f, 0x0a, 0x04, 0x70, 0x6f, 0x73, 0x74, 0x6a, 0x17, 0x0a, 0x09, 0x50, 0x6f, 0x73, 0x74, 0x56,
0x32, 0x64, 0x65, 0x76, 0x12, 0x0a, 0x0a, 0x02, 0x69, 0x64, 0x12, 0x04, 0x24, 0x2e, 0x69, 0x64,
0x0a, 0x0a, 0x0a, 0x01, 0x72, 0x6a, 0x05, 0x0a, 0x03, 0x52, 0x65, 0x66, 0x22, 0xf3, 0x03, 0x0a,
0x09, 0x50, 0x6f, 0x73, 0x74, 0x56, 0x32, 0x64, 0x65, 0x76, 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, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28,
0x09, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, 0x31, 0x0a, 0x04, 0x75, 0x73,
0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72,
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x32, 0x64, 0x65, 0x76, 0x2e, 0x55, 0x73, 0x65, 0x72,
0x42, 0x05, 0x9a, 0x4a, 0x02, 0x08, 0x01, 0x52, 0x04, 0x75, 0x73, 0x65, 0x72, 0x12, 0x2e, 0x0a,
0x0a, 0x6e, 0x75, 0x6c, 0x6c, 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x18, 0x05, 0x20, 0x01, 0x28,
0x08, 0x42, 0x0f, 0x9a, 0x4a, 0x0c, 0x12, 0x0a, 0x6e, 0x75, 0x6c, 0x6c, 0x5f, 0x63, 0x68, 0x65,
0x63, 0x6b, 0x52, 0x09, 0x6e, 0x75, 0x6c, 0x6c, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x3a, 0xc2, 0x02,
0x9a, 0x4a, 0xbe, 0x02, 0x0a, 0x2d, 0x0a, 0x03, 0x72, 0x65, 0x73, 0x72, 0x26, 0x0a, 0x18, 0x70,
0x6f, 0x73, 0x74, 0x2e, 0x50, 0x6f, 0x73, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f,
0x47, 0x65, 0x74, 0x50, 0x6f, 0x73, 0x74, 0x12, 0x0a, 0x0a, 0x02, 0x69, 0x64, 0x12, 0x04, 0x24,
0x2e, 0x69, 0x64, 0x0a, 0x12, 0x0a, 0x04, 0x70, 0x6f, 0x73, 0x74, 0x18, 0x01, 0x5a, 0x08, 0x72,
0x65, 0x73, 0x2e, 0x70, 0x6f, 0x73, 0x74, 0x0a, 0x16, 0x0a, 0x04, 0x75, 0x73, 0x65, 0x72, 0x6a,
0x0e, 0x0a, 0x04, 0x55, 0x73, 0x65, 0x72, 0x12, 0x06, 0x1a, 0x04, 0x70, 0x6f, 0x73, 0x74, 0x0a,
0x20, 0x0a, 0x06, 0x75, 0x6e, 0x75, 0x73, 0x65, 0x64, 0x6a, 0x16, 0x0a, 0x06, 0x55, 0x6e, 0x75,
0x73, 0x65, 0x64, 0x12, 0x0c, 0x0a, 0x03, 0x66, 0x6f, 0x6f, 0x12, 0x05, 0x27, 0x66, 0x6f, 0x6f,
0x27, 0x0a, 0x1d, 0x6a, 0x1b, 0x0a, 0x0b, 0x46, 0x6f, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x6c, 0x65,
0x73, 0x73, 0x12, 0x0c, 0x0a, 0x03, 0x62, 0x61, 0x72, 0x12, 0x05, 0x27, 0x62, 0x61, 0x72, 0x27,
0x0a, 0x17, 0x0a, 0x09, 0x74, 0x79, 0x70, 0x65, 0x64, 0x5f, 0x6e, 0x69, 0x6c, 0x6a, 0x0a, 0x0a,
0x08, 0x54, 0x79, 0x70, 0x65, 0x64, 0x4e, 0x69, 0x6c, 0x0a, 0x25, 0x0a, 0x0a, 0x6e, 0x75, 0x6c,
0x6c, 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x12, 0x11, 0x74, 0x79, 0x70, 0x65, 0x64, 0x5f, 0x6e,
0x69, 0x6c, 0x20, 0x3d, 0x3d, 0x20, 0x6e, 0x75, 0x6c, 0x6c, 0x5a, 0x04, 0x74, 0x72, 0x75, 0x65,
0x0a, 0x60, 0x12, 0x11, 0x74, 0x79, 0x70, 0x65, 0x64, 0x5f, 0x6e, 0x69, 0x6c, 0x20, 0x3d, 0x3d,
0x20, 0x6e, 0x75, 0x6c, 0x6c, 0x5a, 0x4b, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65,
0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x6c, 0x6f, 0x67, 0x2e, 0x69, 0x6e, 0x66, 0x6f, 0x28,
0x27, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x20, 0x74, 0x79, 0x70, 0x65, 0x64, 0x5f, 0x6e, 0x69,
0x6c, 0x27, 0x2c, 0x20, 0x7b, 0x27, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x27, 0x3a, 0x20, 0x74,
0x79, 0x70, 0x65, 0x64, 0x5f, 0x6e, 0x69, 0x6c, 0x20, 0x3d, 0x3d, 0x20, 0x6e, 0x75, 0x6c, 0x6c,
0x7d, 0x29, 0x22, 0x7b, 0x0a, 0x04, 0x55, 0x73, 0x65, 0x72, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64,
0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x19, 0x0a, 0x04, 0x6e, 0x61,
0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x05, 0x9a, 0x4a, 0x02, 0x08, 0x01, 0x52,
0x04, 0x6e, 0x61, 0x6d, 0x65, 0x3a, 0x48, 0x9a, 0x4a, 0x45, 0x0a, 0x32, 0x0a, 0x03, 0x72, 0x65,
0x73, 0x72, 0x2b, 0x0a, 0x18, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x53, 0x65,
0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x12, 0x0f, 0x0a,
0x02, 0x69, 0x64, 0x12, 0x09, 0x24, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x0a, 0x0d,
0x0a, 0x01, 0x75, 0x5a, 0x08, 0x72, 0x65, 0x73, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x10, 0x01, 0x22,
0x21, 0x0a, 0x06, 0x55, 0x6e, 0x75, 0x73, 0x65, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x66, 0x6f, 0x6f,
0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x66, 0x6f, 0x6f, 0x3a, 0x05, 0x9a, 0x4a, 0x02,
0x10, 0x01, 0x22, 0x26, 0x0a, 0x0b, 0x46, 0x6f, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x6c, 0x65, 0x73,
0x73, 0x12, 0x10, 0x0a, 0x03, 0x62, 0x61, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03,
0x62, 0x61, 0x72, 0x3a, 0x05, 0x9a, 0x4a, 0x02, 0x10, 0x01, 0x22, 0x11, 0x0a, 0x08, 0x54, 0x79,
0x70, 0x65, 0x64, 0x4e, 0x69, 0x6c, 0x3a, 0x05, 0x9a, 0x4a, 0x02, 0x10, 0x01, 0x2a, 0x25, 0x0a,
0x0d, 0x50, 0x6f, 0x73, 0x74, 0x56, 0x32, 0x64, 0x65, 0x76, 0x54, 0x79, 0x70, 0x65, 0x12, 0x14,
0x0a, 0x10, 0x50, 0x4f, 0x53, 0x54, 0x5f, 0x56, 0x32, 0x5f, 0x44, 0x45, 0x56, 0x5f, 0x54, 0x59,
0x50, 0x45, 0x10, 0x00, 0x32, 0xeb, 0x01, 0x0a, 0x16, 0x46, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74,
0x69, 0x6f, 0x6e, 0x56, 0x32, 0x64, 0x65, 0x76, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12,
0x5f, 0x0a, 0x0c, 0x47, 0x65, 0x74, 0x50, 0x6f, 0x73, 0x74, 0x56, 0x32, 0x64, 0x65, 0x76, 0x12,
0x25, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x32, 0x64,
0x65, 0x76, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x6f, 0x73, 0x74, 0x56, 0x32, 0x64, 0x65, 0x76, 0x52,
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74,
0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x32, 0x64, 0x65, 0x76, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x6f, 0x73,
0x74, 0x56, 0x32, 0x64, 0x65, 0x76, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00,
0x1a, 0x70, 0x9a, 0x4a, 0x6d, 0x0a, 0x49, 0x0a, 0x0e, 0x0a, 0x01, 0x61, 0x12, 0x02, 0x08, 0x01,
0x1a, 0x05, 0x12, 0x03, 0x78, 0x78, 0x78, 0x0a, 0x10, 0x0a, 0x01, 0x62, 0x12, 0x04, 0x12, 0x02,
0x08, 0x03, 0x1a, 0x05, 0x0a, 0x03, 0x79, 0x79, 0x79, 0x0a, 0x18, 0x0a, 0x01, 0x63, 0x12, 0x0a,
0x1a, 0x08, 0x0a, 0x02, 0x08, 0x01, 0x12, 0x02, 0x08, 0x06, 0x1a, 0x07, 0x0a, 0x03, 0x7a, 0x7a,
0x7a, 0x18, 0x01, 0x0a, 0x0b, 0x0a, 0x01, 0x64, 0x12, 0x02, 0x08, 0x05, 0x1a, 0x02, 0x20, 0x01,
0x12, 0x20, 0x0a, 0x1b, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73,
0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x76, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x5a,
0x01, 0x31, 0x42, 0xcc, 0x01, 0x9a, 0x4a, 0x22, 0x12, 0x0f, 0x70, 0x6f, 0x73, 0x74, 0x2f, 0x70,
0x6f, 0x73, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0f, 0x75, 0x73, 0x65, 0x72, 0x2f,
0x75, 0x73, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x0a, 0x14, 0x63, 0x6f, 0x6d, 0x2e,
0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x32, 0x64, 0x65, 0x76,
0x42, 0x0f, 0x46, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74,
0x6f, 0x50, 0x01, 0x5a, 0x1d, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2f, 0x66, 0x65, 0x64,
0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x3b, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69,
0x6f, 0x6e, 0xa2, 0x02, 0x03, 0x46, 0x56, 0x58, 0xaa, 0x02, 0x10, 0x46, 0x65, 0x64, 0x65, 0x72,
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x56, 0x32, 0x64, 0x65, 0x76, 0xca, 0x02, 0x10, 0x46, 0x65,
0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5c, 0x56, 0x32, 0x64, 0x65, 0x76, 0xe2, 0x02,
0x1c, 0x46, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5c, 0x56, 0x32, 0x64, 0x65,
0x76, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x11,
0x46, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x3a, 0x56, 0x32, 0x64, 0x65,
0x76, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_federation_federation_proto_rawDescOnce sync.Once
file_federation_federation_proto_rawDescData = file_federation_federation_proto_rawDesc
)
func file_federation_federation_proto_rawDescGZIP() []byte {
file_federation_federation_proto_rawDescOnce.Do(func() {
file_federation_federation_proto_rawDescData = protoimpl.X.CompressGZIP(file_federation_federation_proto_rawDescData)
})
return file_federation_federation_proto_rawDescData
}
var file_federation_federation_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
var file_federation_federation_proto_msgTypes = make([]protoimpl.MessageInfo, 7)
var file_federation_federation_proto_goTypes = []interface{}{
(PostV2DevType)(0), // 0: federation.v2dev.PostV2devType
(*GetPostV2DevRequest)(nil), // 1: federation.v2dev.GetPostV2devRequest
(*GetPostV2DevResponse)(nil), // 2: federation.v2dev.GetPostV2devResponse
(*PostV2Dev)(nil), // 3: federation.v2dev.PostV2dev
(*User)(nil), // 4: federation.v2dev.User
(*Unused)(nil), // 5: federation.v2dev.Unused
(*ForNameless)(nil), // 6: federation.v2dev.ForNameless
(*TypedNil)(nil), // 7: federation.v2dev.TypedNil
(*durationpb.Duration)(nil), // 8: google.protobuf.Duration
(*Ref)(nil), // 9: federation.v2dev.Ref
}
var file_federation_federation_proto_depIdxs = []int32{
3, // 0: federation.v2dev.GetPostV2devResponse.post:type_name -> federation.v2dev.PostV2dev
0, // 1: federation.v2dev.GetPostV2devResponse.type:type_name -> federation.v2dev.PostV2devType
8, // 2: federation.v2dev.GetPostV2devResponse.env_c_value:type_name -> google.protobuf.Duration
9, // 3: federation.v2dev.GetPostV2devResponse.ref:type_name -> federation.v2dev.Ref
4, // 4: federation.v2dev.PostV2dev.user:type_name -> federation.v2dev.User
1, // 5: federation.v2dev.FederationV2devService.GetPostV2dev:input_type -> federation.v2dev.GetPostV2devRequest
2, // 6: federation.v2dev.FederationV2devService.GetPostV2dev:output_type -> federation.v2dev.GetPostV2devResponse
6, // [6:7] is the sub-list for method output_type
5, // [5:6] is the sub-list for method input_type
5, // [5:5] is the sub-list for extension type_name
5, // [5:5] is the sub-list for extension extendee
0, // [0:5] is the sub-list for field type_name
}
func init() { file_federation_federation_proto_init() }
func file_federation_federation_proto_init() {
if File_federation_federation_proto != nil {
return
}
file_federation_other_proto_init()
if !protoimpl.UnsafeEnabled {
file_federation_federation_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetPostV2DevRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_federation_federation_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetPostV2DevResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_federation_federation_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*PostV2Dev); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_federation_federation_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*User); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_federation_federation_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Unused); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_federation_federation_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ForNameless); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_federation_federation_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*TypedNil); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_federation_federation_proto_rawDesc,
NumEnums: 1,
NumMessages: 7,
NumExtensions: 0,
NumServices: 1,
},
GoTypes: file_federation_federation_proto_goTypes,
DependencyIndexes: file_federation_federation_proto_depIdxs,
EnumInfos: file_federation_federation_proto_enumTypes,
MessageInfos: file_federation_federation_proto_msgTypes,
}.Build()
File_federation_federation_proto = out.File
file_federation_federation_proto_rawDesc = nil
file_federation_federation_proto_goTypes = nil
file_federation_federation_proto_depIdxs = nil
}
================================================
FILE: _examples/03_custom_resolver/federation/federation_grpc.pb.go
================================================
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.3.0
// - protoc (unknown)
// source: federation/federation.proto
package federation
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 (
FederationV2DevService_GetPostV2Dev_FullMethodName = "/federation.v2dev.FederationV2devService/GetPostV2dev"
)
// FederationV2DevServiceClient is the client API for FederationV2DevService 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 FederationV2DevServiceClient interface {
GetPostV2Dev(ctx context.Context, in *GetPostV2DevRequest, opts ...grpc.CallOption) (*GetPostV2DevResponse, error)
}
type federationV2DevServiceClient struct {
cc grpc.ClientConnInterface
}
func NewFederationV2DevServiceClient(cc grpc.ClientConnInterface) FederationV2DevServiceClient {
return &federationV2DevServiceClient{cc}
}
func (c *federationV2DevServiceClient) GetPostV2Dev(ctx context.Context, in *GetPostV2DevRequest, opts ...grpc.CallOption) (*GetPostV2DevResponse, error) {
out := new(GetPostV2DevResponse)
err := c.cc.Invoke(ctx, FederationV2DevService_GetPostV2Dev_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// FederationV2DevServiceServer is the server API for FederationV2DevService service.
// All implementations must embed UnimplementedFederationV2DevServiceServer
// for forward compatibility
type FederationV2DevServiceServer interface {
GetPostV2Dev(context.Context, *GetPostV2DevRequest) (*GetPostV2DevResponse, error)
mustEmbedUnimplementedFederationV2DevServiceServer()
}
// UnimplementedFederationV2DevServiceServer must be embedded to have forward compatible implementations.
type UnimplementedFederationV2DevServiceServer struct {
}
func (UnimplementedFederationV2DevServiceServer) GetPostV2Dev(context.Context, *GetPostV2DevRequest) (*GetPostV2DevResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetPostV2Dev not implemented")
}
func (UnimplementedFederationV2DevServiceServer) mustEmbedUnimplementedFederationV2DevServiceServer() {
}
// UnsafeFederationV2DevServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to FederationV2DevServiceServer will
// result in compilation errors.
type UnsafeFederationV2DevServiceServer interface {
mustEmbedUnimplementedFederationV2DevServiceServer()
}
func RegisterFederationV2DevServiceServer(s grpc.ServiceRegistrar, srv FederationV2DevServiceServer) {
s.RegisterService(&FederationV2DevService_ServiceDesc, srv)
}
func _FederationV2DevService_GetPostV2Dev_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetPostV2DevRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(FederationV2DevServiceServer).GetPostV2Dev(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: FederationV2DevService_GetPostV2Dev_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(FederationV2DevServiceServer).GetPostV2Dev(ctx, req.(*GetPostV2DevRequest))
}
return interceptor(ctx, in, info, handler)
}
// FederationV2DevService_ServiceDesc is the grpc.ServiceDesc for FederationV2DevService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var FederationV2DevService_ServiceDesc = grpc.ServiceDesc{
ServiceName: "federation.v2dev.FederationV2devService",
HandlerType: (*FederationV2DevServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "GetPostV2dev",
Handler: _FederationV2DevService_GetPostV2Dev_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "federation/federation.proto",
}
================================================
FILE: _examples/03_custom_resolver/federation/federation_grpc_federation.pb.go
================================================
// Code generated by protoc-gen-grpc-federation. DO NOT EDIT!
// versions:
//
// protoc-gen-grpc-federation: (devel)
//
// source: federation/federation.proto
package federation
import (
"context"
"io"
"log/slog"
"reflect"
grpcfed "github.com/mercari/grpc-federation/grpc/federation"
grpcfedcel "github.com/mercari/grpc-federation/grpc/federation/cel"
"go.opentelemetry.io/otel"
"go.opentelemetry.io/otel/trace"
"google.golang.org/protobuf/types/known/durationpb"
post "example/post"
user "example/user"
)
var (
_ = reflect.Invalid // to avoid "imported and not used error"
)
// Federation_V2Dev_ForNamelessVariable represents variable definitions in "federation.v2dev.ForNameless".
type FederationV2DevService_Federation_V2Dev_ForNamelessVariable struct {
}
// Federation_V2Dev_ForNamelessArgument is argument for "federation.v2dev.ForNameless" message.
type FederationV2DevService_Federation_V2Dev_ForNamelessArgument struct {
Bar string
FederationV2DevService_Federation_V2Dev_ForNamelessVariable
}
// Federation_V2Dev_GetPostV2DevResponseVariable represents variable definitions in "federation.v2dev.GetPostV2devResponse".
type FederationV2DevService_Federation_V2Dev_GetPostV2DevResponseVariable struct {
Post *PostV2Dev
R *Ref
}
// Federation_V2Dev_GetPostV2DevResponseArgument is argument for "federation.v2dev.GetPostV2devResponse" message.
type FederationV2DevService_Federation_V2Dev_GetPostV2DevResponseArgument struct {
Id string
FederationV2DevService_Federation_V2Dev_GetPostV2DevResponseVariable
}
// Federation_V2Dev_PostV2DevVariable represents variable definitions in "federation.v2dev.PostV2dev".
type FederationV2DevService_Federation_V2Dev_PostV2DevVariable struct {
NullCheck bool
Post *post.Post
Res *post.GetPostResponse
TypedNil *TypedNil
Unused *Unused
User *User
XDef4 *ForNameless
XDef7 bool
}
// Federation_V2Dev_PostV2DevArgument is argument for "federation.v2dev.PostV2dev" message.
type FederationV2DevService_Federation_V2Dev_PostV2DevArgument struct {
Id string
FederationV2DevService_Federation_V2Dev_PostV2DevVariable
}
// Federation_V2Dev_PostV2Dev_UserArgument is custom resolver's argument for "user" field of "federation.v2dev.PostV2dev" message.
type FederationV2DevService_Federation_V2Dev_PostV2Dev_UserArgument struct {
*FederationV2DevService_Federation_V2Dev_PostV2DevArgument
}
// Federation_V2Dev_RefVariable represents variable definitions in "federation.v2dev.Ref".
type FederationV2DevService_Federation_V2Dev_RefVariable struct {
}
// Federation_V2Dev_RefArgument is argument for "federation.v2dev.Ref" message.
type FederationV2DevService_Federation_V2Dev_RefArgument struct {
FederationV2DevService_Federation_V2Dev_RefVariable
}
// Federation_V2Dev_TypedNilVariable represents variable definitions in "federation.v2dev.TypedNil".
type FederationV2DevService_Federation_V2Dev_TypedNilVariable struct {
}
// Federation_V2Dev_TypedNilArgument is argument for "federation.v2dev.TypedNil" message.
type FederationV2DevService_Federation_V2Dev_TypedNilArgument struct {
FederationV2DevService_Federation_V2Dev_TypedNilVariable
}
// Federation_V2Dev_UnusedVariable represents variable definitions in "federation.v2dev.Unused".
type FederationV2DevService_Federation_V2Dev_UnusedVariable struct {
}
// Federation_V2Dev_UnusedArgument is argument for "federation.v2dev.Unused" message.
type FederationV2DevService_Federation_V2Dev_UnusedArgument struct {
Foo string
FederationV2DevService_Federation_V2Dev_UnusedVariable
}
// Federation_V2Dev_UserVariable represents variable definitions in "federation.v2dev.User".
type FederationV2DevService_Federation_V2Dev_UserVariable struct {
Res *user.GetUserResponse
U *user.User
}
// Federation_V2Dev_UserArgument is argument for "federation.v2dev.User" message.
type FederationV2DevService_Federation_V2Dev_UserArgument struct {
Content string
Id string
Title string
UserId string
FederationV2DevService_Federation_V2Dev_UserVariable
}
// Federation_V2Dev_User_NameArgument is custom resolver's argument for "name" field of "federation.v2dev.User" message.
type FederationV2DevService_Federation_V2Dev_User_NameArgument struct {
*FederationV2DevService_Federation_V2Dev_UserArgument
Federation_V2Dev_User *User
}
// FederationV2DevServiceConfig configuration required to initialize the service that use GRPC Federation.
type FederationV2DevServiceConfig struct {
// Client provides a factory that creates the gRPC Client needed to invoke methods of the gRPC Service on which the Federation Service depends.
// If this interface is not provided, an error is returned during initialization.
Client FederationV2DevServiceClientFactory // required
// Resolver provides an interface to directly implement message resolver and field resolver not defined in Protocol Buffers.
// If this interface is not provided, an error is returned during initialization.
Resolver FederationV2DevServiceResolver // required
// ErrorHandler Federation Service often needs to convert errors received from downstream services.
// If an error occurs during method execution in the Federation Service, this error handler is called and the returned error is treated as a final error.
ErrorHandler grpcfed.ErrorHandler
// Logger sets the logger used to output Debug/Info/Error information.
Logger *slog.Logger
}
// FederationV2DevServiceClientFactory provides a factory that creates the gRPC Client needed to invoke methods of the gRPC Service on which the Federation Service depends.
type FederationV2DevServiceClientFactory interface {
// Post_PostServiceClient create a gRPC Client to be used to call methods in post.PostService.
Post_PostServiceClient(FederationV2DevServiceClientConfig) (post.PostServiceClient, error)
// User_UserServiceClient create a gRPC Client to be used to call methods in user.UserService.
User_UserServiceClient(FederationV2DevServiceClientConfig) (user.UserServiceClient, error)
}
// FederationV2DevServiceClientConfig helper to create gRPC client.
// Hints for creating a gRPC Client.
type FederationV2DevServiceClientConfig struct {
// Service FQDN ( `.` ) of the service on Protocol Buffers.
Service string
}
// FederationV2DevServiceDependentClientSet has a gRPC client for all services on which the federation service depends.
// This is provided as an argument when implementing the custom resolver.
type FederationV2DevServiceDependentClientSet struct {
Post_PostServiceClient post.PostServiceClient
User_UserServiceClient user.UserServiceClient
}
// FederationV2DevServiceResolver provides an interface to directly implement message resolver and field resolver not defined in Protocol Buffers.
type FederationV2DevServiceResolver interface {
// Resolve_Federation_V2Dev_ForNameless implements resolver for "federation.v2dev.ForNameless".
Resolve_Federation_V2Dev_ForNameless(context.Context, *FederationV2DevService_Federation_V2Dev_ForNamelessArgument) (*ForNameless, error)
// Resolve_Federation_V2Dev_PostV2Dev_User implements resolver for "federation.v2dev.PostV2dev.user".
Resolve_Federation_V2Dev_PostV2Dev_User(context.Context, *FederationV2DevService_Federation_V2Dev_PostV2Dev_UserArgument) (*User, error)
// Resolve_Federation_V2Dev_TypedNil implements resolver for "federation.v2dev.TypedNil".
Resolve_Federation_V2Dev_TypedNil(context.Context, *FederationV2DevService_Federation_V2Dev_TypedNilArgument) (*TypedNil, error)
// Resolve_Federation_V2Dev_Unused implements resolver for "federation.v2dev.Unused".
Resolve_Federation_V2Dev_Unused(context.Context, *FederationV2DevService_Federation_V2Dev_UnusedArgument) (*Unused, error)
// Resolve_Federation_V2Dev_User implements resolver for "federation.v2dev.User".
Resolve_Federation_V2Dev_User(context.Context, *FederationV2DevService_Federation_V2Dev_UserArgument) (*User, error)
// Resolve_Federation_V2Dev_User_Name implements resolver for "federation.v2dev.User.name".
Resolve_Federation_V2Dev_User_Name(context.Context, *FederationV2DevService_Federation_V2Dev_User_NameArgument) (string, error)
}
// FederationV2DevServiceCELPluginWasmConfig type alias for grpcfedcel.WasmConfig.
type FederationV2DevServiceCELPluginWasmConfig = grpcfedcel.WasmConfig
// FederationV2DevServiceCELPluginConfig hints for loading a WebAssembly based plugin.
type FederationV2DevServiceCELPluginConfig struct {
CacheDir string
}
// FederationV2DevServiceEnv keeps the values read from environment variables.
type FederationV2DevServiceEnv struct {
A string `envconfig:"A" default:"xxx"`
B []int64 `envconfig:"yyy"`
C map[string]grpcfed.Duration `envconfig:"zzz" required:"true"`
D float64 `envconfig:"D" ignored:"true"`
}
type keyFederationV2DevServiceEnv struct{}
// GetFederationV2DevServiceEnv gets environment variables.
func GetFederationV2DevServiceEnv(ctx context.Context) *FederationV2DevServiceEnv {
value := ctx.Value(keyFederationV2DevServiceEnv{})
if value == nil {
return nil
}
return value.(*FederationV2DevServiceEnv)
}
func withFederationV2DevServiceEnv(ctx context.Context, env *FederationV2DevServiceEnv) context.Context {
return context.WithValue(ctx, keyFederationV2DevServiceEnv{}, env)
}
// FederationV2DevServiceVariable keeps the initial values.
type FederationV2DevServiceVariable struct {
FederationServiceVariable int64
}
type keyFederationV2DevServiceVariable struct{}
// GetFederationV2DevServiceVariable gets initial variables.
func GetFederationV2DevServiceVariable(ctx context.Context) *FederationV2DevServiceVariable {
value := ctx.Value(keyFederationV2DevServiceVariable{})
if value == nil {
return nil
}
return value.(*FederationV2DevServiceVariable)
}
func withFederationV2DevServiceVariable(ctx context.Context, svcVar *FederationV2DevServiceVariable) context.Context {
return context.WithValue(ctx, keyFederationV2DevServiceVariable{}, svcVar)
}
// FederationV2DevServiceUnimplementedResolver a structure implemented to satisfy the Resolver interface.
// An Unimplemented error is always returned.
// This is intended for use when there are many Resolver interfaces that do not need to be implemented,
// by embedding them in a resolver structure that you have created.
type FederationV2DevServiceUnimplementedResolver struct{}
// Resolve_Federation_V2Dev_ForNameless resolve "federation.v2dev.ForNameless".
// This method always returns Unimplemented error.
func (FederationV2DevServiceUnimplementedResolver) Resolve_Federation_V2Dev_ForNameless(context.Context, *FederationV2DevService_Federation_V2Dev_ForNamelessArgument) (ret *ForNameless, e error) {
e = grpcfed.GRPCErrorf(grpcfed.UnimplementedCode, "method Resolve_Federation_V2Dev_ForNameless not implemented")
return
}
// Resolve_Federation_V2Dev_PostV2Dev_User resolve "federation.v2dev.PostV2dev.user".
// This method always returns Unimplemented error.
func (FederationV2DevServiceUnimplementedResolver) Resolve_Federation_V2Dev_PostV2Dev_User(context.Context, *FederationV2DevService_Federation_V2Dev_PostV2Dev_UserArgument) (ret *User, e error) {
e = grpcfed.GRPCErrorf(grpcfed.UnimplementedCode, "method Resolve_Federation_V2Dev_PostV2Dev_User not implemented")
return
}
// Resolve_Federation_V2Dev_TypedNil resolve "federation.v2dev.TypedNil".
// This method always returns Unimplemented error.
func (FederationV2DevServiceUnimplementedResolver) Resolve_Federation_V2Dev_TypedNil(context.Context, *FederationV2DevService_Federation_V2Dev_TypedNilArgument) (ret *TypedNil, e error) {
e = grpcfed.GRPCErrorf(grpcfed.UnimplementedCode, "method Resolve_Federation_V2Dev_TypedNil not implemented")
return
}
// Resolve_Federation_V2Dev_Unused resolve "federation.v2dev.Unused".
// This method always returns Unimplemented error.
func (FederationV2DevServiceUnimplementedResolver) Resolve_Federation_V2Dev_Unused(context.Context, *FederationV2DevService_Federation_V2Dev_UnusedArgument) (ret *Unused, e error) {
e = grpcfed.GRPCErrorf(grpcfed.UnimplementedCode, "method Resolve_Federation_V2Dev_Unused not implemented")
return
}
// Resolve_Federation_V2Dev_User resolve "federation.v2dev.User".
// This method always returns Unimplemented error.
func (FederationV2DevServiceUnimplementedResolver) Resolve_Federation_V2Dev_User(context.Context, *FederationV2DevService_Federation_V2Dev_UserArgument) (ret *User, e error) {
e = grpcfed.GRPCErrorf(grpcfed.UnimplementedCode, "method Resolve_Federation_V2Dev_User not implemented")
return
}
// Resolve_Federation_V2Dev_User_Name resolve "federation.v2dev.User.name".
// This method always returns Unimplemented error.
func (FederationV2DevServiceUnimplementedResolver) Resolve_Federation_V2Dev_User_Name(context.Context, *FederationV2DevService_Federation_V2Dev_User_NameArgument) (ret string, e error) {
e = grpcfed.GRPCErrorf(grpcfed.UnimplementedCode, "method Resolve_Federation_V2Dev_User_Name not implemented")
return
}
const (
FederationV2DevService_DependentMethod_Post_PostService_GetPost = "/post.PostService/GetPost"
FederationV2DevService_DependentMethod_User_UserService_GetUser = "/user.UserService/GetUser"
)
// FederationV2DevService represents Federation Service.
type FederationV2DevService struct {
UnimplementedFederationV2DevServiceServer
cfg FederationV2DevServiceConfig
logger *slog.Logger
isLogLevelDebug bool
errorHandler grpcfed.ErrorHandler
celCacheMap *grpcfed.CELCacheMap
tracer trace.Tracer
env *FederationV2DevServiceEnv
svcVar *FederationV2DevServiceVariable
resolver FederationV2DevServiceResolver
celTypeHelper *grpcfed.CELTypeHelper
celEnvOpts []grpcfed.CELEnvOption
celPlugins []*grpcfedcel.CELPlugin
client *FederationV2DevServiceDependentClientSet
}
// NewFederationV2DevService creates FederationV2DevService instance by FederationV2DevServiceConfig.
func NewFederationV2DevService(cfg FederationV2DevServiceConfig) (*FederationV2DevService, error) {
if cfg.Client == nil {
return nil, grpcfed.ErrClientConfig
}
if cfg.Resolver == nil {
return nil, grpcfed.ErrResolverConfig
}
Post_PostServiceClient, err := cfg.Client.Post_PostServiceClient(FederationV2DevServiceClientConfig{
Service: "post.PostService",
})
if err != nil {
return nil, err
}
User_UserServiceClient, err := cfg.Client.User_UserServiceClient(FederationV2DevServiceClientConfig{
Service: "user.UserService",
})
if err != nil {
return nil, err
}
logger := cfg.Logger
if logger == nil {
logger = slog.New(slog.NewJSONHandler(io.Discard, nil))
}
tracer := otel.Tracer("federation.v2dev.FederationV2devService")
ctx := grpcfed.WithLogger(context.Background(), logger)
ctx = grpcfed.WithTracer(ctx, tracer)
errorHandler := cfg.ErrorHandler
if errorHandler == nil {
errorHandler = func(ctx context.Context, methodName string, err error) error { return err }
}
celTypeHelperFieldMap := grpcfed.CELTypeHelperFieldMap{
"grpc.federation.private.federation.v2dev.ForNamelessArgument": {
"bar": grpcfed.NewCELFieldType(grpcfed.CELStringType, "Bar"),
},
"grpc.federation.private.federation.v2dev.GetPostV2devResponseArgument": {
"id": grpcfed.NewCELFieldType(grpcfed.CELStringType, "Id"),
},
"grpc.federation.private.federation.v2dev.PostV2devArgument": {
"id": grpcfed.NewCELFieldType(grpcfed.CELStringType, "Id"),
},
"grpc.federation.private.federation.v2dev.RefArgument": {},
"grpc.federation.private.federation.v2dev.TypedNilArgument": {},
"grpc.federation.private.federation.v2dev.UnusedArgument": {
"foo": grpcfed.NewCELFieldType(grpcfed.CELStringType, "Foo"),
},
"grpc.federation.private.federation.v2dev.UserArgument": {
"id": grpcfed.NewCELFieldType(grpcfed.CELStringType, "Id"),
"title": grpcfed.NewCELFieldType(grpcfed.CELStringType, "Title"),
"content": grpcfed.NewCELFieldType(grpcfed.CELStringType, "Content"),
"user_id": grpcfed.NewCELFieldType(grpcfed.CELStringType, "UserId"),
},
"grpc.federation.private.Env": {
"a": grpcfed.NewCELFieldType(grpcfed.CELStringType, "A"),
"b": grpcfed.NewCELFieldType(grpcfed.NewCELListType(grpcfed.CELIntType), "B"),
"c": grpcfed.NewCELFieldType(grpcfed.NewCELMapType(grpcfed.CELStringType, grpcfed.CELDurationType), "C"),
"d": grpcfed.NewCELFieldType(grpcfed.CELDoubleType, "D"),
},
"grpc.federation.private.ServiceVariable": {
"federation_service_variable": grpcfed.NewCELFieldType(grpcfed.CELIntType, "FederationServiceVariable"),
},
}
celTypeHelper := grpcfed.NewCELTypeHelper("federation.v2dev", celTypeHelperFieldMap)
var celEnvOpts []grpcfed.CELEnvOption
celEnvOpts = append(celEnvOpts, grpcfed.NewDefaultEnvOptions(celTypeHelper)...)
celEnvOpts = append(celEnvOpts, grpcfed.GRPCErrorAccessorOptions(celTypeHelper, "post.GetPostResponse")...)
celEnvOpts = append(celEnvOpts, grpcfed.GRPCErrorAccessorOptions(celTypeHelper, "user.GetUserResponse")...)
celEnvOpts = append(celEnvOpts, grpcfed.EnumAccessorOptions("federation.v2dev.PostV2devType", PostV2DevType_value, PostV2DevType_name)...)
celEnvOpts = append(celEnvOpts, grpcfed.NewCELVariable("grpc.federation.env", grpcfed.CELObjectType("grpc.federation.private.Env")))
celEnvOpts = append(celEnvOpts, grpcfed.NewCELVariable("grpc.federation.var", grpcfed.CELObjectType("grpc.federation.private.ServiceVariable")))
var env FederationV2DevServiceEnv
if err := grpcfed.LoadEnv("", &env); err != nil {
return nil, err
}
svc := &FederationV2DevService{
cfg: cfg,
logger: logger,
isLogLevelDebug: logger.Enabled(context.Background(), slog.LevelDebug),
errorHandler: errorHandler,
celEnvOpts: celEnvOpts,
celTypeHelper: celTypeHelper,
celCacheMap: grpcfed.NewCELCacheMap(),
tracer: tracer,
env: &env,
svcVar: new(FederationV2DevServiceVariable),
resolver: cfg.Resolver,
client: &FederationV2DevServiceDependentClientSet{
Post_PostServiceClient: Post_PostServiceClient,
User_UserServiceClient: User_UserServiceClient,
},
}
if err := svc.initServiceVariables(ctx); err != nil {
return nil, err
}
if resolver, ok := cfg.Resolver.(grpcfed.CustomResolverInitializer); ok {
ctx := context.Background()
ctx = withFederationV2DevServiceEnv(ctx, svc.env)
ctx = withFederationV2DevServiceVariable(ctx, svc.svcVar)
if err := resolver.Init(ctx); err != nil {
return nil, err
}
}
return svc, nil
}
// CleanupFederationV2DevService cleanup all resources to prevent goroutine leaks.
func CleanupFederationV2DevService(ctx context.Context, svc *FederationV2DevService) {
svc.cleanup(ctx)
}
func (s *FederationV2DevService) cleanup(ctx context.Context) {
for _, plugin := range s.celPlugins {
plugin.Close()
}
}
func (s *FederationV2DevService) initServiceVariables(ctx context.Context) error {
ctx = grpcfed.WithCELCacheMap(ctx, s.celCacheMap)
type localValueType struct {
*grpcfed.LocalValue
vars *FederationV2DevServiceVariable
}
value := &localValueType{
LocalValue: grpcfed.NewServiceVariableLocalValue(s.celEnvOpts),
vars: s.svcVar,
}
value.AddEnv(s.env)
value.AddServiceVariable(s.svcVar)
ctx = grpcfed.WithLocalValue(ctx, value.LocalValue)
/*
def {
name: "federation_service_variable"
by: "1"
}
*/
def_federation_service_variable := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[int64, *localValueType]{
Name: `federation_service_variable`,
Type: grpcfed.CELIntType,
Setter: func(value *localValueType, v int64) error {
value.vars.FederationServiceVariable = v
return nil
},
By: `1`,
ByCacheIndex: 1,
})
}
if err := def_federation_service_variable(ctx); err != nil {
return err
}
return nil
}
// GetPostV2Dev implements "federation.v2dev.FederationV2devService/GetPostV2dev" method.
func (s *FederationV2DevService) GetPostV2Dev(ctx context.Context, req *GetPostV2DevRequest) (res *GetPostV2DevResponse, e error) {
ctx, span := s.tracer.Start(ctx, "federation.v2dev.FederationV2devService/GetPostV2dev")
defer span.End()
ctx = withFederationV2DevServiceEnv(ctx, s.env)
ctx = withFederationV2DevServiceVariable(ctx, s.svcVar)
ctx = grpcfed.WithLogger(ctx, s.logger)
ctx = grpcfed.WithCELCacheMap(ctx, s.celCacheMap)
defer func() {
if r := recover(); r != nil {
e = grpcfed.RecoverError(r, grpcfed.StackTrace())
grpcfed.OutputErrorLog(ctx, e)
}
}()
defer func() {
for _, celPlugin := range s.celPlugins {
celPlugin.Cleanup()
}
}()
res, err := s.resolve_Federation_V2Dev_GetPostV2DevResponse(ctx, &FederationV2DevService_Federation_V2Dev_GetPostV2DevResponseArgument{
Id: req.GetId(),
})
if err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
grpcfed.OutputErrorLog(ctx, err)
return nil, err
}
return res, nil
}
// resolve_Federation_V2Dev_ForNameless resolve "federation.v2dev.ForNameless" message.
func (s *FederationV2DevService) resolve_Federation_V2Dev_ForNameless(ctx context.Context, req *FederationV2DevService_Federation_V2Dev_ForNamelessArgument) (*ForNameless, error) {
ctx, span := s.tracer.Start(ctx, "federation.v2dev.ForNameless")
defer span.End()
ctx = grpcfed.WithLogger(ctx, grpcfed.Logger(ctx), grpcfed.LogAttrs(ctx)...)
grpcfed.Logger(ctx).DebugContext(ctx, "resolve federation.v2dev.ForNameless", slog.Any("message_args", s.logvalue_Federation_V2Dev_ForNamelessArgument(req)))
// create a message value to be returned.
// `custom_resolver = true` in "grpc.federation.message" option.
ctx = grpcfed.WithLogger(ctx, grpcfed.Logger(ctx)) // create a new reference to logger.
ret, err := s.resolver.Resolve_Federation_V2Dev_ForNameless(ctx, req)
if err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
grpcfed.Logger(ctx).DebugContext(ctx, "resolved federation.v2dev.ForNameless", slog.Any("federation.v2dev.ForNameless", s.logvalue_Federation_V2Dev_ForNameless(ret)))
return ret, nil
}
// resolve_Federation_V2Dev_GetPostV2DevResponse resolve "federation.v2dev.GetPostV2devResponse" message.
func (s *FederationV2DevService) resolve_Federation_V2Dev_GetPostV2DevResponse(ctx context.Context, req *FederationV2DevService_Federation_V2Dev_GetPostV2DevResponseArgument) (*GetPostV2DevResponse, error) {
ctx, span := s.tracer.Start(ctx, "federation.v2dev.GetPostV2devResponse")
defer span.End()
ctx = grpcfed.WithLogger(ctx, grpcfed.Logger(ctx), grpcfed.LogAttrs(ctx)...)
grpcfed.Logger(ctx).DebugContext(ctx, "resolve federation.v2dev.GetPostV2devResponse", slog.Any("message_args", s.logvalue_Federation_V2Dev_GetPostV2DevResponseArgument(req)))
type localValueType struct {
*grpcfed.LocalValue
vars struct {
Post *PostV2Dev
R *Ref
}
}
value := &localValueType{LocalValue: grpcfed.NewLocalValue(ctx, s.celEnvOpts, "grpc.federation.private.federation.v2dev.GetPostV2devResponseArgument", req)}
value.AddEnv(s.env)
value.AddServiceVariable(s.svcVar)
ctx = grpcfed.WithLocalValue(ctx, value.LocalValue)
/*
def {
name: "post"
message {
name: "PostV2dev"
args { name: "id", by: "$.id" }
}
}
*/
def_post := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[*PostV2Dev, *localValueType]{
Name: `post`,
Type: grpcfed.CELObjectType("federation.v2dev.PostV2dev"),
Setter: func(value *localValueType, v *PostV2Dev) error {
value.vars.Post = v
return nil
},
Message: func(ctx context.Context, value *localValueType) (any, error) {
args := &FederationV2DevService_Federation_V2Dev_PostV2DevArgument{}
// { name: "id", by: "$.id" }
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[string]{
Value: value,
Expr: `$.id`,
CacheIndex: 2,
Setter: func(v string) error {
args.Id = v
return nil
},
}); err != nil {
return nil, err
}
ret, err := s.resolve_Federation_V2Dev_PostV2Dev(ctx, args)
if err != nil {
return nil, err
}
return ret, nil
},
})
}
/*
def {
name: "r"
message {
name: "Ref"
}
}
*/
def_r := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[*Ref, *localValueType]{
Name: `r`,
Type: grpcfed.CELObjectType("federation.v2dev.Ref"),
Setter: func(value *localValueType, v *Ref) error {
value.vars.R = v
return nil
},
Message: func(ctx context.Context, value *localValueType) (any, error) {
args := &FederationV2DevService_Federation_V2Dev_RefArgument{}
ret, err := s.resolve_Federation_V2Dev_Ref(ctx, args)
if err != nil {
return nil, err
}
return ret, nil
},
})
}
// A tree view of message dependencies is shown below.
/*
post ─┐
r ─┤
*/
eg, ctx1 := grpcfed.ErrorGroupWithContext(ctx)
grpcfed.GoWithRecover(eg, func() (any, error) {
if err := def_post(ctx1); err != nil {
grpcfed.RecordErrorToSpan(ctx1, err)
return nil, err
}
return nil, nil
})
grpcfed.GoWithRecover(eg, func() (any, error) {
if err := def_r(ctx1); err != nil {
grpcfed.RecordErrorToSpan(ctx1, err)
return nil, err
}
return nil, nil
})
if err := eg.Wait(); err != nil {
return nil, err
}
// assign named parameters to message arguments to pass to the custom resolver.
req.FederationV2DevService_Federation_V2Dev_GetPostV2DevResponseVariable.Post = value.vars.Post
req.FederationV2DevService_Federation_V2Dev_GetPostV2DevResponseVariable.R = value.vars.R
// create a message value to be returned.
ret := &GetPostV2DevResponse{}
// field binding section.
// (grpc.federation.field).by = "post"
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[*PostV2Dev]{
Value: value,
Expr: `post`,
CacheIndex: 3,
Setter: func(v *PostV2Dev) error {
ret.Post = v
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
// (grpc.federation.field).by = "PostV2devType.value('POST_V2_DEV_TYPE')"
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[PostV2DevType]{
Value: value,
Expr: `PostV2devType.value('POST_V2_DEV_TYPE')`,
CacheIndex: 4,
Setter: func(v PostV2DevType) error {
ret.Type = v
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
// (grpc.federation.field).by = "grpc.federation.env.a"
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[string]{
Value: value,
Expr: `grpc.federation.env.a`,
CacheIndex: 5,
Setter: func(v string) error {
ret.EnvA = v
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
// (grpc.federation.field).by = "grpc.federation.env.b[1]"
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[int64]{
Value: value,
Expr: `grpc.federation.env.b[1]`,
CacheIndex: 6,
Setter: func(v int64) error {
ret.EnvB = v
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
// (grpc.federation.field).by = "grpc.federation.env.c['z']"
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[*durationpb.Duration]{
Value: value,
Expr: `grpc.federation.env.c['z']`,
CacheIndex: 7,
Setter: func(v *durationpb.Duration) error {
envCValueValue, err := s.cast_Google_Protobuf_Duration__to__Google_Protobuf_Duration(v)
if err != nil {
return err
}
ret.EnvCValue = envCValueValue
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
// (grpc.federation.field).by = "r"
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[*Ref]{
Value: value,
Expr: `r`,
CacheIndex: 8,
Setter: func(v *Ref) error {
ret.Ref = v
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
grpcfed.Logger(ctx).DebugContext(ctx, "resolved federation.v2dev.GetPostV2devResponse", slog.Any("federation.v2dev.GetPostV2devResponse", s.logvalue_Federation_V2Dev_GetPostV2DevResponse(ret)))
return ret, nil
}
// resolve_Federation_V2Dev_PostV2Dev resolve "federation.v2dev.PostV2dev" message.
func (s *FederationV2DevService) resolve_Federation_V2Dev_PostV2Dev(ctx context.Context, req *FederationV2DevService_Federation_V2Dev_PostV2DevArgument) (*PostV2Dev, error) {
ctx, span := s.tracer.Start(ctx, "federation.v2dev.PostV2dev")
defer span.End()
ctx = grpcfed.WithLogger(ctx, grpcfed.Logger(ctx), grpcfed.LogAttrs(ctx)...)
grpcfed.Logger(ctx).DebugContext(ctx, "resolve federation.v2dev.PostV2dev", slog.Any("message_args", s.logvalue_Federation_V2Dev_PostV2DevArgument(req)))
type localValueType struct {
*grpcfed.LocalValue
vars struct {
NullCheck bool
Post *post.Post
Res *post.GetPostResponse
TypedNil *TypedNil
Unused *Unused
User *User
XDef4 *ForNameless
XDef7 bool
}
}
value := &localValueType{LocalValue: grpcfed.NewLocalValue(ctx, s.celEnvOpts, "grpc.federation.private.federation.v2dev.PostV2devArgument", req)}
value.AddEnv(s.env)
value.AddServiceVariable(s.svcVar)
ctx = grpcfed.WithLocalValue(ctx, value.LocalValue)
/*
def {
name: "res"
call {
method: "post.PostService/GetPost"
request { field: "id", by: "$.id" }
}
}
*/
def_res := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[*post.GetPostResponse, *localValueType]{
Name: `res`,
Type: grpcfed.CELObjectType("post.GetPostResponse"),
Setter: func(value *localValueType, v *post.GetPostResponse) error {
value.vars.Res = v
return nil
},
Message: func(ctx context.Context, value *localValueType) (any, error) {
args := &post.GetPostRequest{}
// { field: "id", by: "$.id" }
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[string]{
Value: value,
Expr: `$.id`,
CacheIndex: 9,
Setter: func(v string) error {
args.Id = v
return nil
},
}); err != nil {
return nil, err
}
grpcfed.Logger(ctx).DebugContext(ctx, "call post.PostService/GetPost", slog.Any("post.GetPostRequest", s.logvalue_Post_GetPostRequest(args)))
ret, err := s.client.Post_PostServiceClient.GetPost(ctx, args)
if err != nil {
if err := s.errorHandler(ctx, FederationV2DevService_DependentMethod_Post_PostService_GetPost, err); err != nil {
return nil, grpcfed.NewErrorWithLogAttrs(err, slog.LevelError, grpcfed.LogAttrs(ctx))
}
}
return ret, nil
},
})
}
/*
def {
name: "post"
autobind: true
by: "res.post"
}
*/
def_post := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[*post.Post, *localValueType]{
Name: `post`,
Type: grpcfed.CELObjectType("post.Post"),
Setter: func(value *localValueType, v *post.Post) error {
value.vars.Post = v
return nil
},
By: `res.post`,
ByCacheIndex: 10,
})
}
/*
def {
name: "user"
message {
name: "User"
args { inline: "post" }
}
}
*/
def_user := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[*User, *localValueType]{
Name: `user`,
Type: grpcfed.CELObjectType("federation.v2dev.User"),
Setter: func(value *localValueType, v *User) error {
value.vars.User = v
return nil
},
Message: func(ctx context.Context, value *localValueType) (any, error) {
args := &FederationV2DevService_Federation_V2Dev_UserArgument{}
// { inline: "post" }
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[*post.Post]{
Value: value,
Expr: `post`,
CacheIndex: 11,
Setter: func(v *post.Post) error {
args.Id = v.GetId()
args.Title = v.GetTitle()
args.Content = v.GetContent()
args.UserId = v.GetUserId()
return nil
},
}); err != nil {
return nil, err
}
ret, err := s.resolve_Federation_V2Dev_User(ctx, args)
if err != nil {
return nil, err
}
return ret, nil
},
})
}
/*
def {
name: "unused"
message {
name: "Unused"
args { name: "foo", by: "'foo'" }
}
}
*/
def_unused := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[*Unused, *localValueType]{
Name: `unused`,
Type: grpcfed.CELObjectType("federation.v2dev.Unused"),
Setter: func(value *localValueType, v *Unused) error {
value.vars.Unused = v
return nil
},
Message: func(ctx context.Context, value *localValueType) (any, error) {
args := &FederationV2DevService_Federation_V2Dev_UnusedArgument{}
// { name: "foo", by: "'foo'" }
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[string]{
Value: value,
Expr: `'foo'`,
CacheIndex: 12,
Setter: func(v string) error {
args.Foo = v
return nil
},
}); err != nil {
return nil, err
}
ret, err := s.resolve_Federation_V2Dev_Unused(ctx, args)
if err != nil {
return nil, err
}
return ret, nil
},
})
}
/*
def {
name: "_def4"
message {
name: "ForNameless"
args { name: "bar", by: "'bar'" }
}
}
*/
def__def4 := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[*ForNameless, *localValueType]{
Name: `_def4`,
Type: grpcfed.CELObjectType("federation.v2dev.ForNameless"),
Setter: func(value *localValueType, v *ForNameless) error {
value.vars.XDef4 = v
return nil
},
Message: func(ctx context.Context, value *localValueType) (any, error) {
args := &FederationV2DevService_Federation_V2Dev_ForNamelessArgument{}
// { name: "bar", by: "'bar'" }
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[string]{
Value: value,
Expr: `'bar'`,
CacheIndex: 13,
Setter: func(v string) error {
args.Bar = v
return nil
},
}); err != nil {
return nil, err
}
ret, err := s.resolve_Federation_V2Dev_ForNameless(ctx, args)
if err != nil {
return nil, err
}
return ret, nil
},
})
}
/*
def {
name: "typed_nil"
message {
name: "TypedNil"
}
}
*/
def_typed_nil := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[*TypedNil, *localValueType]{
Name: `typed_nil`,
Type: grpcfed.CELObjectType("federation.v2dev.TypedNil"),
Setter: func(value *localValueType, v *TypedNil) error {
value.vars.TypedNil = v
return nil
},
Message: func(ctx context.Context, value *localValueType) (any, error) {
args := &FederationV2DevService_Federation_V2Dev_TypedNilArgument{}
ret, err := s.resolve_Federation_V2Dev_TypedNil(ctx, args)
if err != nil {
return nil, err
}
return ret, nil
},
})
}
/*
def {
name: "null_check"
if: "typed_nil == null"
by: "true"
}
*/
def_null_check := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[bool, *localValueType]{
If: `typed_nil == null`,
IfCacheIndex: 14,
Name: `null_check`,
Type: grpcfed.CELBoolType,
Setter: func(value *localValueType, v bool) error {
value.vars.NullCheck = v
return nil
},
By: `true`,
ByCacheIndex: 15,
})
}
/*
def {
name: "_def7"
if: "typed_nil == null"
by: "grpc.federation.log.info('output typed_nil', {'result': typed_nil == null})"
}
*/
def__def7 := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[bool, *localValueType]{
If: `typed_nil == null`,
IfCacheIndex: 16,
Name: `_def7`,
Type: grpcfed.CELBoolType,
Setter: func(value *localValueType, v bool) error {
value.vars.XDef7 = v
return nil
},
By: `grpc.federation.log.info('output typed_nil', {'result': typed_nil == null})`,
ByCacheIndex: 17,
})
}
// A tree view of message dependencies is shown below.
/*
_def4 ─┐
typed_nil ─┐ │
_def7 ─┤
typed_nil ─┐ │
null_check ─┤
unused ─┤
res ─┐ │
post ─┐ │
user ─┤
*/
eg, ctx1 := grpcfed.ErrorGroupWithContext(ctx)
grpcfed.GoWithRecover(eg, func() (any, error) {
if err := def__def4(ctx1); err != nil {
grpcfed.RecordErrorToSpan(ctx1, err)
return nil, err
}
return nil, nil
})
grpcfed.GoWithRecover(eg, func() (any, error) {
if err := def_typed_nil(ctx1); err != nil {
grpcfed.RecordErrorToSpan(ctx1, err)
return nil, err
}
if err := def__def7(ctx1); err != nil {
grpcfed.RecordErrorToSpan(ctx1, err)
return nil, err
}
return nil, nil
})
grpcfed.GoWithRecover(eg, func() (any, error) {
if err := def_typed_nil(ctx1); err != nil {
grpcfed.RecordErrorToSpan(ctx1, err)
return nil, err
}
if err := def_null_check(ctx1); err != nil {
grpcfed.RecordErrorToSpan(ctx1, err)
return nil, err
}
return nil, nil
})
grpcfed.GoWithRecover(eg, func() (any, error) {
if err := def_unused(ctx1); err != nil {
grpcfed.RecordErrorToSpan(ctx1, err)
return nil, err
}
return nil, nil
})
grpcfed.GoWithRecover(eg, func() (any, error) {
if err := def_res(ctx1); err != nil {
grpcfed.RecordErrorToSpan(ctx1, err)
return nil, err
}
if err := def_post(ctx1); err != nil {
grpcfed.RecordErrorToSpan(ctx1, err)
return nil, err
}
if err := def_user(ctx1); err != nil {
grpcfed.RecordErrorToSpan(ctx1, err)
return nil, err
}
return nil, nil
})
if err := eg.Wait(); err != nil {
return nil, err
}
// assign named parameters to message arguments to pass to the custom resolver.
req.FederationV2DevService_Federation_V2Dev_PostV2DevVariable.NullCheck = value.vars.NullCheck
req.FederationV2DevService_Federation_V2Dev_PostV2DevVariable.Post = value.vars.Post
req.FederationV2DevService_Federation_V2Dev_PostV2DevVariable.Res = value.vars.Res
req.FederationV2DevService_Federation_V2Dev_PostV2DevVariable.TypedNil = value.vars.TypedNil
req.FederationV2DevService_Federation_V2Dev_PostV2DevVariable.Unused = value.vars.Unused
req.FederationV2DevService_Federation_V2Dev_PostV2DevVariable.User = value.vars.User
req.FederationV2DevService_Federation_V2Dev_PostV2DevVariable.XDef4 = value.vars.XDef4
req.FederationV2DevService_Federation_V2Dev_PostV2DevVariable.XDef7 = value.vars.XDef7
// create a message value to be returned.
ret := &PostV2Dev{}
// field binding section.
ret.Id = value.vars.Post.GetId() // { name: "post", autobind: true }
ret.Title = value.vars.Post.GetTitle() // { name: "post", autobind: true }
ret.Content = value.vars.Post.GetContent() // { name: "post", autobind: true }
{
// (grpc.federation.field).custom_resolver = true
ctx = grpcfed.WithLogger(ctx, grpcfed.Logger(ctx)) // create a new reference to logger.
var err error
ret.User, err = s.resolver.Resolve_Federation_V2Dev_PostV2Dev_User(ctx, &FederationV2DevService_Federation_V2Dev_PostV2Dev_UserArgument{
FederationV2DevService_Federation_V2Dev_PostV2DevArgument: req,
})
if err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
}
// (grpc.federation.field).by = "null_check"
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[bool]{
Value: value,
Expr: `null_check`,
CacheIndex: 18,
Setter: func(v bool) error {
ret.NullCheck = v
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
grpcfed.Logger(ctx).DebugContext(ctx, "resolved federation.v2dev.PostV2dev", slog.Any("federation.v2dev.PostV2dev", s.logvalue_Federation_V2Dev_PostV2Dev(ret)))
return ret, nil
}
// resolve_Federation_V2Dev_Ref resolve "federation.v2dev.Ref" message.
func (s *FederationV2DevService) resolve_Federation_V2Dev_Ref(ctx context.Context, req *FederationV2DevService_Federation_V2Dev_RefArgument) (*Ref, error) {
ctx, span := s.tracer.Start(ctx, "federation.v2dev.Ref")
defer span.End()
ctx = grpcfed.WithLogger(ctx, grpcfed.Logger(ctx), grpcfed.LogAttrs(ctx)...)
grpcfed.Logger(ctx).DebugContext(ctx, "resolve federation.v2dev.Ref", slog.Any("message_args", s.logvalue_Federation_V2Dev_RefArgument(req)))
type localValueType struct {
*grpcfed.LocalValue
vars struct {
}
}
value := &localValueType{LocalValue: grpcfed.NewLocalValue(ctx, s.celEnvOpts, "grpc.federation.private.federation.v2dev.RefArgument", req)}
value.AddEnv(s.env)
value.AddServiceVariable(s.svcVar)
ctx = grpcfed.WithLocalValue(ctx, value.LocalValue)
// create a message value to be returned.
ret := &Ref{}
// field binding section.
// (grpc.federation.field).by = "grpc.federation.env.a"
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[string]{
Value: value,
Expr: `grpc.federation.env.a`,
CacheIndex: 19,
Setter: func(v string) error {
ret.A = v
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
grpcfed.Logger(ctx).DebugContext(ctx, "resolved federation.v2dev.Ref", slog.Any("federation.v2dev.Ref", s.logvalue_Federation_V2Dev_Ref(ret)))
return ret, nil
}
// resolve_Federation_V2Dev_TypedNil resolve "federation.v2dev.TypedNil" message.
func (s *FederationV2DevService) resolve_Federation_V2Dev_TypedNil(ctx context.Context, req *FederationV2DevService_Federation_V2Dev_TypedNilArgument) (*TypedNil, error) {
ctx, span := s.tracer.Start(ctx, "federation.v2dev.TypedNil")
defer span.End()
ctx = grpcfed.WithLogger(ctx, grpcfed.Logger(ctx), grpcfed.LogAttrs(ctx)...)
grpcfed.Logger(ctx).DebugContext(ctx, "resolve federation.v2dev.TypedNil", slog.Any("message_args", s.logvalue_Federation_V2Dev_TypedNilArgument(req)))
// create a message value to be returned.
// `custom_resolver = true` in "grpc.federation.message" option.
ctx = grpcfed.WithLogger(ctx, grpcfed.Logger(ctx)) // create a new reference to logger.
ret, err := s.resolver.Resolve_Federation_V2Dev_TypedNil(ctx, req)
if err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
grpcfed.Logger(ctx).DebugContext(ctx, "resolved federation.v2dev.TypedNil", slog.Any("federation.v2dev.TypedNil", s.logvalue_Federation_V2Dev_TypedNil(ret)))
return ret, nil
}
// resolve_Federation_V2Dev_Unused resolve "federation.v2dev.Unused" message.
func (s *FederationV2DevService) resolve_Federation_V2Dev_Unused(ctx context.Context, req *FederationV2DevService_Federation_V2Dev_UnusedArgument) (*Unused, error) {
ctx, span := s.tracer.Start(ctx, "federation.v2dev.Unused")
defer span.End()
ctx = grpcfed.WithLogger(ctx, grpcfed.Logger(ctx), grpcfed.LogAttrs(ctx)...)
grpcfed.Logger(ctx).DebugContext(ctx, "resolve federation.v2dev.Unused", slog.Any("message_args", s.logvalue_Federation_V2Dev_UnusedArgument(req)))
// create a message value to be returned.
// `custom_resolver = true` in "grpc.federation.message" option.
ctx = grpcfed.WithLogger(ctx, grpcfed.Logger(ctx)) // create a new reference to logger.
ret, err := s.resolver.Resolve_Federation_V2Dev_Unused(ctx, req)
if err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
grpcfed.Logger(ctx).DebugContext(ctx, "resolved federation.v2dev.Unused", slog.Any("federation.v2dev.Unused", s.logvalue_Federation_V2Dev_Unused(ret)))
return ret, nil
}
// resolve_Federation_V2Dev_User resolve "federation.v2dev.User" message.
func (s *FederationV2DevService) resolve_Federation_V2Dev_User(ctx context.Context, req *FederationV2DevService_Federation_V2Dev_UserArgument) (*User, error) {
ctx, span := s.tracer.Start(ctx, "federation.v2dev.User")
defer span.End()
ctx = grpcfed.WithLogger(ctx, grpcfed.Logger(ctx), grpcfed.LogAttrs(ctx)...)
grpcfed.Logger(ctx).DebugContext(ctx, "resolve federation.v2dev.User", slog.Any("message_args", s.logvalue_Federation_V2Dev_UserArgument(req)))
type localValueType struct {
*grpcfed.LocalValue
vars struct {
Res *user.GetUserResponse
U *user.User
}
}
value := &localValueType{LocalValue: grpcfed.NewLocalValue(ctx, s.celEnvOpts, "grpc.federation.private.federation.v2dev.UserArgument", req)}
value.AddEnv(s.env)
value.AddServiceVariable(s.svcVar)
ctx = grpcfed.WithLocalValue(ctx, value.LocalValue)
/*
def {
name: "res"
call {
method: "user.UserService/GetUser"
request { field: "id", by: "$.user_id" }
}
}
*/
def_res := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[*user.GetUserResponse, *localValueType]{
Name: `res`,
Type: grpcfed.CELObjectType("user.GetUserResponse"),
Setter: func(value *localValueType, v *user.GetUserResponse) error {
value.vars.Res = v
return nil
},
Message: func(ctx context.Context, value *localValueType) (any, error) {
args := &user.GetUserRequest{}
// { field: "id", by: "$.user_id" }
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[string]{
Value: value,
Expr: `$.user_id`,
CacheIndex: 20,
Setter: func(v string) error {
args.Id = v
return nil
},
}); err != nil {
return nil, err
}
grpcfed.Logger(ctx).DebugContext(ctx, "call user.UserService/GetUser", slog.Any("user.GetUserRequest", s.logvalue_User_GetUserRequest(args)))
ret, err := s.client.User_UserServiceClient.GetUser(ctx, args)
if err != nil {
if err := s.errorHandler(ctx, FederationV2DevService_DependentMethod_User_UserService_GetUser, err); err != nil {
return nil, grpcfed.NewErrorWithLogAttrs(err, slog.LevelError, grpcfed.LogAttrs(ctx))
}
}
return ret, nil
},
})
}
/*
def {
name: "u"
by: "res.user"
}
*/
def_u := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[*user.User, *localValueType]{
Name: `u`,
Type: grpcfed.CELObjectType("user.User"),
Setter: func(value *localValueType, v *user.User) error {
value.vars.U = v
return nil
},
By: `res.user`,
ByCacheIndex: 21,
})
}
if err := def_res(ctx); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
if err := def_u(ctx); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
// assign named parameters to message arguments to pass to the custom resolver.
req.FederationV2DevService_Federation_V2Dev_UserVariable.Res = value.vars.Res
req.FederationV2DevService_Federation_V2Dev_UserVariable.U = value.vars.U
// create a message value to be returned.
// `custom_resolver = true` in "grpc.federation.message" option.
ctx = grpcfed.WithLogger(ctx, grpcfed.Logger(ctx)) // create a new reference to logger.
ret, err := s.resolver.Resolve_Federation_V2Dev_User(ctx, req)
if err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
// field binding section.
{
// (grpc.federation.field).custom_resolver = true
ctx = grpcfed.WithLogger(ctx, grpcfed.Logger(ctx)) // create a new reference to logger.
var err error
ret.Name, err = s.resolver.Resolve_Federation_V2Dev_User_Name(ctx, &FederationV2DevService_Federation_V2Dev_User_NameArgument{
FederationV2DevService_Federation_V2Dev_UserArgument: req,
Federation_V2Dev_User: ret,
})
if err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
}
grpcfed.Logger(ctx).DebugContext(ctx, "resolved federation.v2dev.User", slog.Any("federation.v2dev.User", s.logvalue_Federation_V2Dev_User(ret)))
return ret, nil
}
// cast_Google_Protobuf_Duration__to__Google_Protobuf_Duration cast from "google.protobuf.Duration" to "google.protobuf.Duration".
func (s *FederationV2DevService) cast_Google_Protobuf_Duration__to__Google_Protobuf_Duration(from *durationpb.Duration) (*durationpb.Duration, error) {
if from == nil {
return nil, nil
}
secondsValue := from.GetSeconds()
nanosValue := from.GetNanos()
ret := &durationpb.Duration{
Seconds: secondsValue,
Nanos: nanosValue,
}
return ret, nil
}
func (s *FederationV2DevService) logvalue_Federation_V2Dev_ForNameless(v *ForNameless) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.String("bar", v.GetBar()),
)
}
func (s *FederationV2DevService) logvalue_Federation_V2Dev_ForNamelessArgument(v *FederationV2DevService_Federation_V2Dev_ForNamelessArgument) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.String("bar", v.Bar),
)
}
func (s *FederationV2DevService) logvalue_Federation_V2Dev_GetPostV2DevResponse(v *GetPostV2DevResponse) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.Any("post", s.logvalue_Federation_V2Dev_PostV2Dev(v.GetPost())),
slog.String("type", s.logvalue_Federation_V2Dev_PostV2DevType(v.GetType()).String()),
slog.String("env_a", v.GetEnvA()),
slog.Int64("env_b", v.GetEnvB()),
slog.Any("env_c_value", s.logvalue_Google_Protobuf_Duration(v.GetEnvCValue())),
slog.Any("ref", s.logvalue_Federation_V2Dev_Ref(v.GetRef())),
)
}
func (s *FederationV2DevService) logvalue_Federation_V2Dev_GetPostV2DevResponseArgument(v *FederationV2DevService_Federation_V2Dev_GetPostV2DevResponseArgument) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.String("id", v.Id),
)
}
func (s *FederationV2DevService) logvalue_Federation_V2Dev_PostV2Dev(v *PostV2Dev) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.String("id", v.GetId()),
slog.String("title", v.GetTitle()),
slog.String("content", v.GetContent()),
slog.Any("user", s.logvalue_Federation_V2Dev_User(v.GetUser())),
slog.Bool("null_check", v.GetNullCheck()),
)
}
func (s *FederationV2DevService) logvalue_Federation_V2Dev_PostV2DevArgument(v *FederationV2DevService_Federation_V2Dev_PostV2DevArgument) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.String("id", v.Id),
)
}
func (s *FederationV2DevService) logvalue_Federation_V2Dev_PostV2DevType(v PostV2DevType) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
switch v {
case PostV2DevType_POST_V2_DEV_TYPE:
return slog.StringValue("POST_V2_DEV_TYPE")
}
return slog.StringValue("")
}
func (s *FederationV2DevService) logvalue_Federation_V2Dev_Ref(v *Ref) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.String("a", v.GetA()),
)
}
func (s *FederationV2DevService) logvalue_Federation_V2Dev_RefArgument(v *FederationV2DevService_Federation_V2Dev_RefArgument) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue()
}
func (s *FederationV2DevService) logvalue_Federation_V2Dev_TypedNil(v *TypedNil) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue()
}
func (s *FederationV2DevService) logvalue_Federation_V2Dev_TypedNilArgument(v *FederationV2DevService_Federation_V2Dev_TypedNilArgument) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue()
}
func (s *FederationV2DevService) logvalue_Federation_V2Dev_Unused(v *Unused) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.String("foo", v.GetFoo()),
)
}
func (s *FederationV2DevService) logvalue_Federation_V2Dev_UnusedArgument(v *FederationV2DevService_Federation_V2Dev_UnusedArgument) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.String("foo", v.Foo),
)
}
func (s *FederationV2DevService) logvalue_Federation_V2Dev_User(v *User) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.String("id", v.GetId()),
slog.String("name", v.GetName()),
)
}
func (s *FederationV2DevService) logvalue_Federation_V2Dev_UserArgument(v *FederationV2DevService_Federation_V2Dev_UserArgument) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.String("id", v.Id),
slog.String("title", v.Title),
slog.String("content", v.Content),
slog.String("user_id", v.UserId),
)
}
func (s *FederationV2DevService) logvalue_Google_Protobuf_Duration(v *durationpb.Duration) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.Int64("seconds", v.GetSeconds()),
slog.Int64("nanos", int64(v.GetNanos())),
)
}
func (s *FederationV2DevService) logvalue_Post_GetPostRequest(v *post.GetPostRequest) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.String("id", v.GetId()),
)
}
func (s *FederationV2DevService) logvalue_Post_GetPostsRequest(v *post.GetPostsRequest) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.Any("ids", v.GetIds()),
)
}
func (s *FederationV2DevService) logvalue_User_GetUserRequest(v *user.GetUserRequest) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.String("id", v.GetId()),
)
}
func (s *FederationV2DevService) logvalue_User_GetUsersRequest(v *user.GetUsersRequest) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.Any("ids", v.GetIds()),
)
}
================================================
FILE: _examples/03_custom_resolver/federation/other.pb.go
================================================
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.33.0
// protoc (unknown)
// source: federation/other.proto
package federation
import (
_ "github.com/mercari/grpc-federation/grpc/federation"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
type Ref struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
A string `protobuf:"bytes,1,opt,name=a,proto3" json:"a,omitempty"`
}
func (x *Ref) Reset() {
*x = Ref{}
if protoimpl.UnsafeEnabled {
mi := &file_federation_other_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Ref) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Ref) ProtoMessage() {}
func (x *Ref) ProtoReflect() protoreflect.Message {
mi := &file_federation_other_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Ref.ProtoReflect.Descriptor instead.
func (*Ref) Descriptor() ([]byte, []int) {
return file_federation_other_proto_rawDescGZIP(), []int{0}
}
func (x *Ref) GetA() string {
if x != nil {
return x.A
}
return ""
}
var File_federation_other_proto protoreflect.FileDescriptor
var file_federation_other_proto_rawDesc = []byte{
0x0a, 0x16, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x6f, 0x74, 0x68,
0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x10, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61,
0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x32, 0x64, 0x65, 0x76, 0x1a, 0x20, 0x67, 0x72, 0x70, 0x63,
0x2f, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x66, 0x65, 0x64, 0x65,
0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x2f, 0x0a, 0x03,
0x52, 0x65, 0x66, 0x12, 0x28, 0x0a, 0x01, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x1a,
0x9a, 0x4a, 0x17, 0x12, 0x15, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61,
0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x65, 0x6e, 0x76, 0x2e, 0x61, 0x52, 0x01, 0x61, 0x42, 0xa2, 0x01,
0x0a, 0x14, 0x63, 0x6f, 0x6d, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e,
0x2e, 0x76, 0x32, 0x64, 0x65, 0x76, 0x42, 0x0a, 0x4f, 0x74, 0x68, 0x65, 0x72, 0x50, 0x72, 0x6f,
0x74, 0x6f, 0x50, 0x01, 0x5a, 0x1d, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2f, 0x66, 0x65,
0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x3b, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74,
0x69, 0x6f, 0x6e, 0xa2, 0x02, 0x03, 0x46, 0x56, 0x58, 0xaa, 0x02, 0x10, 0x46, 0x65, 0x64, 0x65,
0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x56, 0x32, 0x64, 0x65, 0x76, 0xca, 0x02, 0x10, 0x46,
0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5c, 0x56, 0x32, 0x64, 0x65, 0x76, 0xe2,
0x02, 0x1c, 0x46, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5c, 0x56, 0x32, 0x64,
0x65, 0x76, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02,
0x11, 0x46, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x3a, 0x56, 0x32, 0x64,
0x65, 0x76, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_federation_other_proto_rawDescOnce sync.Once
file_federation_other_proto_rawDescData = file_federation_other_proto_rawDesc
)
func file_federation_other_proto_rawDescGZIP() []byte {
file_federation_other_proto_rawDescOnce.Do(func() {
file_federation_other_proto_rawDescData = protoimpl.X.CompressGZIP(file_federation_other_proto_rawDescData)
})
return file_federation_other_proto_rawDescData
}
var file_federation_other_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
var file_federation_other_proto_goTypes = []interface{}{
(*Ref)(nil), // 0: federation.v2dev.Ref
}
var file_federation_other_proto_depIdxs = []int32{
0, // [0:0] is the sub-list for method output_type
0, // [0:0] is the sub-list for method input_type
0, // [0:0] is the sub-list for extension type_name
0, // [0:0] is the sub-list for extension extendee
0, // [0:0] is the sub-list for field type_name
}
func init() { file_federation_other_proto_init() }
func file_federation_other_proto_init() {
if File_federation_other_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_federation_other_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Ref); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_federation_other_proto_rawDesc,
NumEnums: 0,
NumMessages: 1,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_federation_other_proto_goTypes,
DependencyIndexes: file_federation_other_proto_depIdxs,
MessageInfos: file_federation_other_proto_msgTypes,
}.Build()
File_federation_other_proto = out.File
file_federation_other_proto_rawDesc = nil
file_federation_other_proto_goTypes = nil
file_federation_other_proto_depIdxs = nil
}
================================================
FILE: _examples/03_custom_resolver/federation/other_grpc_federation.pb.go
================================================
// Code generated by protoc-gen-grpc-federation. DO NOT EDIT!
// versions:
//
// protoc-gen-grpc-federation: (devel)
//
// source: federation/other.proto
package federation
import (
"reflect"
)
var (
_ = reflect.Invalid // to avoid "imported and not used error"
)
================================================
FILE: _examples/03_custom_resolver/go.mod
================================================
module example
go 1.24.0
replace github.com/mercari/grpc-federation => ../../
require (
github.com/google/go-cmp v0.7.0
github.com/mercari/grpc-federation v0.0.0-00010101000000-000000000000
go.opentelemetry.io/otel v1.24.0
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.21.0
go.opentelemetry.io/otel/sdk v1.24.0
go.opentelemetry.io/otel/trace v1.24.0
go.uber.org/goleak v1.3.0
google.golang.org/genproto/googleapis/rpc v0.0.0-20240826202546-f6391c0de4c7
google.golang.org/grpc v1.65.0
google.golang.org/protobuf v1.34.2
)
require (
cel.dev/expr v0.19.1 // indirect
github.com/antlr4-go/antlr/v4 v4.13.0 // indirect
github.com/cenkalti/backoff/v4 v4.2.1 // indirect
github.com/go-logr/logr v1.4.1 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
github.com/goccy/wasi-go v0.3.2 // indirect
github.com/google/cel-go v0.23.1 // indirect
github.com/google/uuid v1.6.0 // indirect
github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0 // indirect
github.com/kelseyhightower/envconfig v1.4.0 // indirect
github.com/stealthrocket/wazergo v0.19.1 // indirect
github.com/stoewer/go-strcase v1.3.0 // indirect
github.com/tetratelabs/wazero v1.10.1 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.21.0 // indirect
go.opentelemetry.io/otel/metric v1.24.0 // indirect
go.opentelemetry.io/proto/otlp v1.0.0 // indirect
golang.org/x/exp v0.0.0-20250506013437-ce4c2cf36ca6 // indirect
golang.org/x/net v0.38.0 // indirect
golang.org/x/sync v0.14.0 // indirect
golang.org/x/sys v0.37.0 // indirect
golang.org/x/text v0.23.0 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20240826202546-f6391c0de4c7 // indirect
)
================================================
FILE: _examples/03_custom_resolver/go.sum
================================================
cel.dev/expr v0.19.1 h1:NciYrtDRIR0lNCnH1LFJegdjspNx9fI59O7TWcua/W4=
cel.dev/expr v0.19.1/go.mod h1:MrpN08Q+lEBs+bGYdLxxHkZoUSsCp0nSKTs0nTymJgw=
github.com/antlr4-go/antlr/v4 v4.13.0 h1:lxCg3LAv+EUK6t1i0y1V6/SLeUi0eKEKdhQAlS8TVTI=
github.com/antlr4-go/antlr/v4 v4.13.0/go.mod h1:pfChB/xh/Unjila75QW7+VU4TSnWnnk9UTnmpPaOR2g=
github.com/cenkalti/backoff/v4 v4.2.1 h1:y4OZtCnogmCPw98Zjyt5a6+QwPLGkiQsYW5oUqylYbM=
github.com/cenkalti/backoff/v4 v4.2.1/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A=
github.com/go-logr/logr v1.4.1 h1:pKouT5E8xu9zeFC39JXRDukb6JFQPXM5p5I91188VAQ=
github.com/go-logr/logr v1.4.1/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY=
github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag=
github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE=
github.com/goccy/wasi-go v0.3.2 h1:wAvGXmqCkfcp0B0AwIp5Ya53hzDwkKm9W8iuT3nCCz0=
github.com/goccy/wasi-go v0.3.2/go.mod h1:nIKD204n9xa4Z20UV+XA483kIr9TAl2vXr+X5qVAO5M=
github.com/golang/glog v1.2.1 h1:OptwRhECazUx5ix5TTWC3EZhsZEHWcYWY4FQHTIubm4=
github.com/golang/glog v1.2.1/go.mod h1:6AhwSGph0fcJtXVM/PEHPqZlFeoLxhs7/t5UDAwmO+w=
github.com/google/cel-go v0.23.1 h1:91ThhEZlBcE5rB2adBVXqvDoqdL8BG2oyhd0bK1I/r4=
github.com/google/cel-go v0.23.1/go.mod h1:52Pb6QsDbC5kvgxvZhiL9QX1oZEkcUF/ZqaPx1J5Wwo=
github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8=
github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU=
github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0 h1:YBftPWNWd4WwGqtY2yeZL2ef8rHAxPBD8KFhJpmcqms=
github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0/go.mod h1:YN5jB8ie0yfIUg6VvR9Kz84aCaG7AsGZnLjhHbUqwPg=
github.com/kelseyhightower/envconfig v1.4.0 h1:Im6hONhd3pLkfDFsbRgu68RDNkGF1r3dvMUtDTo2cv8=
github.com/kelseyhightower/envconfig v1.4.0/go.mod h1:cccZRl6mQpaq41TPp5QxidR+Sa3axMbJDNb//FQX6Gg=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/stealthrocket/wazergo v0.19.1 h1:BPrITETPgSFwiytwmToO0MbUC/+RGC39JScz1JmmG6c=
github.com/stealthrocket/wazergo v0.19.1/go.mod h1:riI0hxw4ndZA5e6z7PesHg2BtTftcZaMxRcoiGGipTs=
github.com/stoewer/go-strcase v1.3.0 h1:g0eASXYtp+yvN9fK8sH94oCIk0fau9uV1/ZdJ0AVEzs=
github.com/stoewer/go-strcase v1.3.0/go.mod h1:fAH5hQ5pehh+j3nZfvwdk2RgEgQjAoM8wodgtPmh1xo=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=
github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo=
github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk=
github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
github.com/tetratelabs/wazero v1.10.1 h1:2DugeJf6VVk58KTPszlNfeeN8AhhpwcZqkJj2wwFuH8=
github.com/tetratelabs/wazero v1.10.1/go.mod h1:DRm5twOQ5Gr1AoEdSi0CLjDQF1J9ZAuyqFIjl1KKfQU=
go.opentelemetry.io/otel v1.24.0 h1:0LAOdjNmQeSTzGBzduGe/rU4tZhMwL5rWgtp9Ku5Jfo=
go.opentelemetry.io/otel v1.24.0/go.mod h1:W7b9Ozg4nkF5tWI5zsXkaKKDjdVjpD4oAt9Qi/MArHo=
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.21.0 h1:cl5P5/GIfFh4t6xyruOgJP5QiA1pw4fYYdv6nc6CBWw=
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.21.0/go.mod h1:zgBdWWAu7oEEMC06MMKc5NLbA/1YDXV1sMpSqEeLQLg=
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.21.0 h1:tIqheXEFWAZ7O8A7m+J0aPTmpJN3YQ7qetUAdkkkKpk=
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.21.0/go.mod h1:nUeKExfxAQVbiVFn32YXpXZZHZ61Cc3s3Rn1pDBGAb0=
go.opentelemetry.io/otel/metric v1.24.0 h1:6EhoGWWK28x1fbpA4tYTOWBkPefTDQnb8WSGXlc88kI=
go.opentelemetry.io/otel/metric v1.24.0/go.mod h1:VYhLe1rFfxuTXLgj4CBiyz+9WYBA8pNGJgDcSFRKBco=
go.opentelemetry.io/otel/sdk v1.24.0 h1:YMPPDNymmQN3ZgczicBY3B6sf9n62Dlj9pWD3ucgoDw=
go.opentelemetry.io/otel/sdk v1.24.0/go.mod h1:KVrIYw6tEubO9E96HQpcmpTKDVn9gdv35HoYiQWGDFg=
go.opentelemetry.io/otel/trace v1.24.0 h1:CsKnnL4dUAr/0llH9FKuc698G04IrpWV0MQA/Y1YELI=
go.opentelemetry.io/otel/trace v1.24.0/go.mod h1:HPc3Xr/cOApsBI154IU0OI0HJexz+aw5uPdbs3UCjNU=
go.opentelemetry.io/proto/otlp v1.0.0 h1:T0TX0tmXU8a3CbNXzEKGeU5mIVOdf0oykP+u2lIVU/I=
go.opentelemetry.io/proto/otlp v1.0.0/go.mod h1:Sy6pihPLfYHkr3NkUbEhGHFhINUSI/v80hjKIs5JXpM=
go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto=
go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE=
golang.org/x/exp v0.0.0-20250506013437-ce4c2cf36ca6 h1:y5zboxd6LQAqYIhHnB48p0ByQ/GnQx2BE33L8BOHQkI=
golang.org/x/exp v0.0.0-20250506013437-ce4c2cf36ca6/go.mod h1:U6Lno4MTRCDY+Ba7aCcauB9T60gsv5s4ralQzP72ZoQ=
golang.org/x/net v0.38.0 h1:vRMAPTMaeGqVhG5QyLJHqNDwecKTomGeqbnfZyKlBI8=
golang.org/x/net v0.38.0/go.mod h1:ivrbrMbzFq5J41QOQh0siUuly180yBYtLp+CKbEaFx8=
golang.org/x/sync v0.14.0 h1:woo0S4Yywslg6hp4eUFjTVOyKt0RookbpAHG4c1HmhQ=
golang.org/x/sync v0.14.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA=
golang.org/x/sys v0.37.0 h1:fdNQudmxPjkdUTPnLn5mdQv7Zwvbvpaxqs831goi9kQ=
golang.org/x/sys v0.37.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks=
golang.org/x/text v0.23.0 h1:D71I7dUrlY+VX0gQShAThNGHFxZ13dGLBHQLVl1mJlY=
golang.org/x/text v0.23.0/go.mod h1:/BLNzu4aZCJ1+kcD0DNRotWKage4q2rGVAg4o22unh4=
google.golang.org/genproto/googleapis/api v0.0.0-20240826202546-f6391c0de4c7 h1:YcyjlL1PRr2Q17/I0dPk2JmYS5CDXfcdb2Z3YRioEbw=
google.golang.org/genproto/googleapis/api v0.0.0-20240826202546-f6391c0de4c7/go.mod h1:OCdP9MfskevB/rbYvHTsXTtKC+3bHWajPdoKgjcYkfo=
google.golang.org/genproto/googleapis/rpc v0.0.0-20240826202546-f6391c0de4c7 h1:2035KHhUv+EpyB+hWgJnaWKJOdX1E95w2S8Rr4uWKTs=
google.golang.org/genproto/googleapis/rpc v0.0.0-20240826202546-f6391c0de4c7/go.mod h1:UqMtugtsSgubUsoxbuAoiCXvqvErP7Gf0so0mK9tHxU=
google.golang.org/grpc v1.65.0 h1:bs/cUb4lp1G5iImFFd3u5ixQzweKizoZJAwBNLR42lc=
google.golang.org/grpc v1.65.0/go.mod h1:WgYC2ypjlB0EiQi6wdKixMqukr6lBc0Vo+oOgjrM5ZQ=
google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg=
google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
================================================
FILE: _examples/03_custom_resolver/main_test.go
================================================
package main_test
import (
"context"
"errors"
"fmt"
"log/slog"
"net"
"os"
"reflect"
"testing"
"time"
"github.com/google/go-cmp/cmp"
"github.com/google/go-cmp/cmp/cmpopts"
"go.opentelemetry.io/otel"
"go.opentelemetry.io/otel/attribute"
"go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc"
"go.opentelemetry.io/otel/propagation"
"go.opentelemetry.io/otel/sdk/resource"
sdktrace "go.opentelemetry.io/otel/sdk/trace"
semconv "go.opentelemetry.io/otel/semconv/v1.4.0"
"go.uber.org/goleak"
"google.golang.org/grpc"
"google.golang.org/grpc/test/bufconn"
"google.golang.org/protobuf/types/known/durationpb"
grpcfed "github.com/mercari/grpc-federation/grpc/federation"
"example/federation"
"example/post"
"example/user"
)
const bufSize = 1024
var (
listener *bufconn.Listener
postClient post.PostServiceClient
userClient user.UserServiceClient
)
type clientConfig struct{}
func (c *clientConfig) Post_PostServiceClient(cfg federation.FederationV2DevServiceClientConfig) (post.PostServiceClient, error) {
return postClient, nil
}
func (c *clientConfig) User_UserServiceClient(cfg federation.FederationV2DevServiceClientConfig) (user.UserServiceClient, error) {
return userClient, nil
}
type Resolver struct {
}
func (r *Resolver) Init(ctx context.Context) error {
if err := r.validateEnv(ctx); err != nil {
return err
}
if err := r.validateServiceVar(ctx); err != nil {
return err
}
return nil
}
func (r *Resolver) Resolve_Federation_V2Dev_User(ctx context.Context, arg *federation.FederationV2DevService_Federation_V2Dev_UserArgument) (*federation.User, error) {
if err := r.validateEnv(ctx); err != nil {
return nil, err
}
if err := r.validateServiceVar(ctx); err != nil {
return nil, err
}
return &federation.User{
Id: arg.U.Id,
Name: arg.U.Name,
}, nil
}
func (r *Resolver) validateEnv(ctx context.Context) error {
ctx = grpcfed.WithLogger(ctx, grpcfed.Logger(ctx))
env := federation.GetFederationV2DevServiceEnv(ctx)
if env.A != "xxx" {
return fmt.Errorf("failed to get environment variable for A: %v", env.A)
}
if !reflect.DeepEqual(env.B, []int64{1, 2, 3, 4}) {
return fmt.Errorf("failed to get environment variable for B: %v", env.B)
}
if len(env.C) != len(envCMap) {
return fmt.Errorf("failed to get environment variable for C: %v", env.C)
}
if env.D != 0 {
return fmt.Errorf("failed to get environment variable for D: %v", env.D)
}
grpcfed.Logger(ctx).Debug("print env variables", slog.Any("env", env))
return nil
}
func (r *Resolver) validateServiceVar(ctx context.Context) error {
ctx = grpcfed.WithLogger(ctx, grpcfed.Logger(ctx))
svcVar := federation.GetFederationV2DevServiceVariable(ctx)
if svcVar.FederationServiceVariable != 1 {
return fmt.Errorf("failed to get service variable for FederationServiceVariable: %v", svcVar.FederationServiceVariable)
}
grpcfed.Logger(ctx).Debug("print service variables", slog.Any("svc_var", svcVar))
return nil
}
func (r *Resolver) Resolve_Federation_V2Dev_PostV2Dev_User(ctx context.Context, arg *federation.FederationV2DevService_Federation_V2Dev_PostV2Dev_UserArgument) (*federation.User, error) {
return arg.User, nil
}
func (r *Resolver) Resolve_Federation_V2Dev_Unused(_ context.Context, _ *federation.FederationV2DevService_Federation_V2Dev_UnusedArgument) (*federation.Unused, error) {
return &federation.Unused{}, nil
}
func (r *Resolver) Resolve_Federation_V2Dev_ForNameless(_ context.Context, _ *federation.FederationV2DevService_Federation_V2Dev_ForNamelessArgument) (*federation.ForNameless, error) {
return &federation.ForNameless{}, nil
}
func (r *Resolver) Resolve_Federation_V2Dev_User_Name(_ context.Context, arg *federation.FederationV2DevService_Federation_V2Dev_User_NameArgument) (string, error) {
return arg.Federation_V2Dev_User.Name, nil
}
func (r *Resolver) Resolve_Federation_V2Dev_TypedNil(_ context.Context, _ *federation.FederationV2DevService_Federation_V2Dev_TypedNilArgument) (*federation.TypedNil, error) {
return nil, nil
}
type PostServer struct {
*post.UnimplementedPostServiceServer
}
func (s *PostServer) GetPost(ctx context.Context, req *post.GetPostRequest) (*post.GetPostResponse, error) {
return nil, errors.New("error!!")
}
func (s *PostServer) GetPosts(ctx context.Context, req *post.GetPostsRequest) (*post.GetPostsResponse, error) {
return nil, errors.New("error!!")
}
type UserServer struct {
*user.UnimplementedUserServiceServer
}
func (s *UserServer) GetUser(ctx context.Context, req *user.GetUserRequest) (*user.GetUserResponse, error) {
if req.Id == "" {
return &user.GetUserResponse{User: &user.User{Id: "anonymous_id", Name: "anonymous"}}, nil
}
return &user.GetUserResponse{
User: &user.User{
Id: req.Id,
Name: fmt.Sprintf("name_%s", req.Id),
},
}, nil
}
func (s *UserServer) GetUsers(ctx context.Context, req *user.GetUsersRequest) (*user.GetUsersResponse, error) {
var users []*user.User
for _, id := range req.Ids {
users = append(users, &user.User{
Id: id,
Name: fmt.Sprintf("name_%s", id),
})
}
return &user.GetUsersResponse{Users: users}, nil
}
func dialer(ctx context.Context, address string) (net.Conn, error) {
return listener.Dial()
}
var envCMap map[string]grpcfed.Duration
func init() {
x, err := time.ParseDuration("10h")
if err != nil {
panic(err)
}
y, err := time.ParseDuration("20m")
if err != nil {
panic(err)
}
z, err := time.ParseDuration("30s")
if err != nil {
panic(err)
}
envCMap = map[string]grpcfed.Duration{
"x": grpcfed.Duration(x),
"y": grpcfed.Duration(y),
"z": grpcfed.Duration(z),
}
}
func TestFederation(t *testing.T) {
defer goleak.VerifyNone(t)
ctx := context.Background()
listener = bufconn.Listen(bufSize)
t.Setenv("YYY", "1,2,3,4")
t.Setenv("ZZZ", "x:10h,y:20m,z:30s")
t.Setenv("d", "2.0")
if os.Getenv("ENABLE_JAEGER") != "" {
exporter, err := otlptracegrpc.New(ctx, otlptracegrpc.WithInsecure())
if err != nil {
t.Fatal(err)
}
tp := sdktrace.NewTracerProvider(
sdktrace.WithBatcher(exporter),
sdktrace.WithResource(
resource.NewWithAttributes(
semconv.SchemaURL,
semconv.ServiceNameKey.String("example03/custom_resolver"),
semconv.ServiceVersionKey.String("1.0.0"),
attribute.String("environment", "dev"),
),
),
sdktrace.WithSampler(sdktrace.AlwaysSample()),
)
defer tp.Shutdown(ctx)
otel.SetTextMapPropagator(propagation.TraceContext{})
otel.SetTracerProvider(tp)
}
conn, err := grpc.DialContext(ctx, "", grpc.WithContextDialer(dialer), grpc.WithInsecure())
if err != nil {
t.Fatal(err)
}
defer conn.Close()
postClient = post.NewPostServiceClient(conn)
userClient = user.NewUserServiceClient(conn)
grpcServer := grpc.NewServer()
defer grpcServer.Stop()
logger := slog.New(slog.NewJSONHandler(os.Stdout, &slog.HandlerOptions{
Level: slog.LevelDebug,
}))
federationServer, err := federation.NewFederationV2DevService(federation.FederationV2DevServiceConfig{
Client: new(clientConfig),
Resolver: new(Resolver),
Logger: logger,
ErrorHandler: func(ctx context.Context, methodName string, err error) error {
federationServiceMethodName, _ := grpc.Method(ctx)
grpcfed.Logger(ctx).InfoContext(
ctx,
"error handler",
slog.String("federation-service-method", federationServiceMethodName),
slog.String("dependent-method", methodName),
)
switch methodName {
case federation.FederationV2DevService_DependentMethod_Post_PostService_GetPost:
return nil
case federation.FederationV2DevService_DependentMethod_User_UserService_GetUser:
return err
}
return err
},
})
if err != nil {
t.Fatal(err)
}
defer federation.CleanupFederationV2DevService(ctx, federationServer)
post.RegisterPostServiceServer(grpcServer, &PostServer{})
user.RegisterUserServiceServer(grpcServer, &UserServer{})
federation.RegisterFederationV2DevServiceServer(grpcServer, federationServer)
go func() {
if err := grpcServer.Serve(listener); err != nil {
t.Fatal(err)
}
}()
client := federation.NewFederationV2DevServiceClient(conn)
res, err := client.GetPostV2Dev(ctx, &federation.GetPostV2DevRequest{
Id: "foo",
})
if err != nil {
t.Fatal(err)
}
if diff := cmp.Diff(res, &federation.GetPostV2DevResponse{
Post: &federation.PostV2Dev{
User: &federation.User{
Id: "anonymous_id",
Name: "anonymous",
},
NullCheck: true,
},
EnvA: "xxx",
EnvB: 2,
EnvCValue: durationpb.New(envCMap["z"]),
Ref: &federation.Ref{A: "xxx"},
}, cmpopts.IgnoreUnexported(
federation.GetPostV2DevResponse{},
federation.PostV2Dev{},
federation.User{},
federation.Ref{},
durationpb.Duration{},
)); diff != "" {
t.Errorf("(-got, +want)\n%s", diff)
}
}
================================================
FILE: _examples/03_custom_resolver/post/post.pb.go
================================================
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.33.0
// protoc (unknown)
// source: post/post.proto
package post
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
type GetPostRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
}
func (x *GetPostRequest) Reset() {
*x = GetPostRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_post_post_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GetPostRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetPostRequest) ProtoMessage() {}
func (x *GetPostRequest) ProtoReflect() protoreflect.Message {
mi := &file_post_post_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GetPostRequest.ProtoReflect.Descriptor instead.
func (*GetPostRequest) Descriptor() ([]byte, []int) {
return file_post_post_proto_rawDescGZIP(), []int{0}
}
func (x *GetPostRequest) GetId() string {
if x != nil {
return x.Id
}
return ""
}
type GetPostResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Post *Post `protobuf:"bytes,1,opt,name=post,proto3" json:"post,omitempty"`
}
func (x *GetPostResponse) Reset() {
*x = GetPostResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_post_post_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GetPostResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetPostResponse) ProtoMessage() {}
func (x *GetPostResponse) ProtoReflect() protoreflect.Message {
mi := &file_post_post_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GetPostResponse.ProtoReflect.Descriptor instead.
func (*GetPostResponse) Descriptor() ([]byte, []int) {
return file_post_post_proto_rawDescGZIP(), []int{1}
}
func (x *GetPostResponse) GetPost() *Post {
if x != nil {
return x.Post
}
return nil
}
type GetPostsRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Ids []string `protobuf:"bytes,1,rep,name=ids,proto3" json:"ids,omitempty"`
}
func (x *GetPostsRequest) Reset() {
*x = GetPostsRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_post_post_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GetPostsRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetPostsRequest) ProtoMessage() {}
func (x *GetPostsRequest) ProtoReflect() protoreflect.Message {
mi := &file_post_post_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GetPostsRequest.ProtoReflect.Descriptor instead.
func (*GetPostsRequest) Descriptor() ([]byte, []int) {
return file_post_post_proto_rawDescGZIP(), []int{2}
}
func (x *GetPostsRequest) GetIds() []string {
if x != nil {
return x.Ids
}
return nil
}
type GetPostsResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Posts []*Post `protobuf:"bytes,1,rep,name=posts,proto3" json:"posts,omitempty"`
}
func (x *GetPostsResponse) Reset() {
*x = GetPostsResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_post_post_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GetPostsResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetPostsResponse) ProtoMessage() {}
func (x *GetPostsResponse) ProtoReflect() protoreflect.Message {
mi := &file_post_post_proto_msgTypes[3]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GetPostsResponse.ProtoReflect.Descriptor instead.
func (*GetPostsResponse) Descriptor() ([]byte, []int) {
return file_post_post_proto_rawDescGZIP(), []int{3}
}
func (x *GetPostsResponse) GetPosts() []*Post {
if x != nil {
return x.Posts
}
return nil
}
type Post struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
Title string `protobuf:"bytes,2,opt,name=title,proto3" json:"title,omitempty"`
Content string `protobuf:"bytes,3,opt,name=content,proto3" json:"content,omitempty"`
UserId string `protobuf:"bytes,4,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
}
func (x *Post) Reset() {
*x = Post{}
if protoimpl.UnsafeEnabled {
mi := &file_post_post_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Post) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Post) ProtoMessage() {}
func (x *Post) ProtoReflect() protoreflect.Message {
mi := &file_post_post_proto_msgTypes[4]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Post.ProtoReflect.Descriptor instead.
func (*Post) Descriptor() ([]byte, []int) {
return file_post_post_proto_rawDescGZIP(), []int{4}
}
func (x *Post) GetId() string {
if x != nil {
return x.Id
}
return ""
}
func (x *Post) GetTitle() string {
if x != nil {
return x.Title
}
return ""
}
func (x *Post) GetContent() string {
if x != nil {
return x.Content
}
return ""
}
func (x *Post) GetUserId() string {
if x != nil {
return x.UserId
}
return ""
}
var File_post_post_proto protoreflect.FileDescriptor
var file_post_post_proto_rawDesc = []byte{
0x0a, 0x0f, 0x70, 0x6f, 0x73, 0x74, 0x2f, 0x70, 0x6f, 0x73, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x12, 0x04, 0x70, 0x6f, 0x73, 0x74, 0x22, 0x20, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x50, 0x6f,
0x73, 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, 0x31, 0x0a, 0x0f, 0x47, 0x65, 0x74,
0x50, 0x6f, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1e, 0x0a, 0x04,
0x70, 0x6f, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x70, 0x6f, 0x73,
0x74, 0x2e, 0x50, 0x6f, 0x73, 0x74, 0x52, 0x04, 0x70, 0x6f, 0x73, 0x74, 0x22, 0x23, 0x0a, 0x0f,
0x47, 0x65, 0x74, 0x50, 0x6f, 0x73, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12,
0x10, 0x0a, 0x03, 0x69, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x03, 0x69, 0x64,
0x73, 0x22, 0x34, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x50, 0x6f, 0x73, 0x74, 0x73, 0x52, 0x65, 0x73,
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x20, 0x0a, 0x05, 0x70, 0x6f, 0x73, 0x74, 0x73, 0x18, 0x01,
0x20, 0x03, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x70, 0x6f, 0x73, 0x74, 0x2e, 0x50, 0x6f, 0x73, 0x74,
0x52, 0x05, 0x70, 0x6f, 0x73, 0x74, 0x73, 0x22, 0x5f, 0x0a, 0x04, 0x50, 0x6f, 0x73, 0x74, 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, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74,
0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12,
0x17, 0x0a, 0x07, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09,
0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x32, 0x84, 0x01, 0x0a, 0x0b, 0x50, 0x6f, 0x73,
0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x38, 0x0a, 0x07, 0x47, 0x65, 0x74, 0x50,
0x6f, 0x73, 0x74, 0x12, 0x14, 0x2e, 0x70, 0x6f, 0x73, 0x74, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x6f,
0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x70, 0x6f, 0x73, 0x74,
0x2e, 0x47, 0x65, 0x74, 0x50, 0x6f, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
0x22, 0x00, 0x12, 0x3b, 0x0a, 0x08, 0x47, 0x65, 0x74, 0x50, 0x6f, 0x73, 0x74, 0x73, 0x12, 0x15,
0x2e, 0x70, 0x6f, 0x73, 0x74, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x6f, 0x73, 0x74, 0x73, 0x52, 0x65,
0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x70, 0x6f, 0x73, 0x74, 0x2e, 0x47, 0x65, 0x74,
0x50, 0x6f, 0x73, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42,
0x58, 0x0a, 0x08, 0x63, 0x6f, 0x6d, 0x2e, 0x70, 0x6f, 0x73, 0x74, 0x42, 0x09, 0x50, 0x6f, 0x73,
0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x11, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c,
0x65, 0x2f, 0x70, 0x6f, 0x73, 0x74, 0x3b, 0x70, 0x6f, 0x73, 0x74, 0xa2, 0x02, 0x03, 0x50, 0x58,
0x58, 0xaa, 0x02, 0x04, 0x50, 0x6f, 0x73, 0x74, 0xca, 0x02, 0x04, 0x50, 0x6f, 0x73, 0x74, 0xe2,
0x02, 0x10, 0x50, 0x6f, 0x73, 0x74, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61,
0x74, 0x61, 0xea, 0x02, 0x04, 0x50, 0x6f, 0x73, 0x74, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f,
0x33,
}
var (
file_post_post_proto_rawDescOnce sync.Once
file_post_post_proto_rawDescData = file_post_post_proto_rawDesc
)
func file_post_post_proto_rawDescGZIP() []byte {
file_post_post_proto_rawDescOnce.Do(func() {
file_post_post_proto_rawDescData = protoimpl.X.CompressGZIP(file_post_post_proto_rawDescData)
})
return file_post_post_proto_rawDescData
}
var file_post_post_proto_msgTypes = make([]protoimpl.MessageInfo, 5)
var file_post_post_proto_goTypes = []interface{}{
(*GetPostRequest)(nil), // 0: post.GetPostRequest
(*GetPostResponse)(nil), // 1: post.GetPostResponse
(*GetPostsRequest)(nil), // 2: post.GetPostsRequest
(*GetPostsResponse)(nil), // 3: post.GetPostsResponse
(*Post)(nil), // 4: post.Post
}
var file_post_post_proto_depIdxs = []int32{
4, // 0: post.GetPostResponse.post:type_name -> post.Post
4, // 1: post.GetPostsResponse.posts:type_name -> post.Post
0, // 2: post.PostService.GetPost:input_type -> post.GetPostRequest
2, // 3: post.PostService.GetPosts:input_type -> post.GetPostsRequest
1, // 4: post.PostService.GetPost:output_type -> post.GetPostResponse
3, // 5: post.PostService.GetPosts:output_type -> post.GetPostsResponse
4, // [4:6] is the sub-list for method output_type
2, // [2:4] is the sub-list for method input_type
2, // [2:2] is the sub-list for extension type_name
2, // [2:2] is the sub-list for extension extendee
0, // [0:2] is the sub-list for field type_name
}
func init() { file_post_post_proto_init() }
func file_post_post_proto_init() {
if File_post_post_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_post_post_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetPostRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_post_post_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetPostResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_post_post_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetPostsRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_post_post_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetPostsResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_post_post_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Post); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_post_post_proto_rawDesc,
NumEnums: 0,
NumMessages: 5,
NumExtensions: 0,
NumServices: 1,
},
GoTypes: file_post_post_proto_goTypes,
DependencyIndexes: file_post_post_proto_depIdxs,
MessageInfos: file_post_post_proto_msgTypes,
}.Build()
File_post_post_proto = out.File
file_post_post_proto_rawDesc = nil
file_post_post_proto_goTypes = nil
file_post_post_proto_depIdxs = nil
}
================================================
FILE: _examples/03_custom_resolver/post/post_grpc.pb.go
================================================
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.3.0
// - protoc (unknown)
// source: post/post.proto
package post
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 (
PostService_GetPost_FullMethodName = "/post.PostService/GetPost"
PostService_GetPosts_FullMethodName = "/post.PostService/GetPosts"
)
// PostServiceClient is the client API for PostService 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 PostServiceClient interface {
GetPost(ctx context.Context, in *GetPostRequest, opts ...grpc.CallOption) (*GetPostResponse, error)
GetPosts(ctx context.Context, in *GetPostsRequest, opts ...grpc.CallOption) (*GetPostsResponse, error)
}
type postServiceClient struct {
cc grpc.ClientConnInterface
}
func NewPostServiceClient(cc grpc.ClientConnInterface) PostServiceClient {
return &postServiceClient{cc}
}
func (c *postServiceClient) GetPost(ctx context.Context, in *GetPostRequest, opts ...grpc.CallOption) (*GetPostResponse, error) {
out := new(GetPostResponse)
err := c.cc.Invoke(ctx, PostService_GetPost_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *postServiceClient) GetPosts(ctx context.Context, in *GetPostsRequest, opts ...grpc.CallOption) (*GetPostsResponse, error) {
out := new(GetPostsResponse)
err := c.cc.Invoke(ctx, PostService_GetPosts_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// PostServiceServer is the server API for PostService service.
// All implementations must embed UnimplementedPostServiceServer
// for forward compatibility
type PostServiceServer interface {
GetPost(context.Context, *GetPostRequest) (*GetPostResponse, error)
GetPosts(context.Context, *GetPostsRequest) (*GetPostsResponse, error)
mustEmbedUnimplementedPostServiceServer()
}
// UnimplementedPostServiceServer must be embedded to have forward compatible implementations.
type UnimplementedPostServiceServer struct {
}
func (UnimplementedPostServiceServer) GetPost(context.Context, *GetPostRequest) (*GetPostResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetPost not implemented")
}
func (UnimplementedPostServiceServer) GetPosts(context.Context, *GetPostsRequest) (*GetPostsResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetPosts not implemented")
}
func (UnimplementedPostServiceServer) mustEmbedUnimplementedPostServiceServer() {}
// UnsafePostServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to PostServiceServer will
// result in compilation errors.
type UnsafePostServiceServer interface {
mustEmbedUnimplementedPostServiceServer()
}
func RegisterPostServiceServer(s grpc.ServiceRegistrar, srv PostServiceServer) {
s.RegisterService(&PostService_ServiceDesc, srv)
}
func _PostService_GetPost_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetPostRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(PostServiceServer).GetPost(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: PostService_GetPost_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(PostServiceServer).GetPost(ctx, req.(*GetPostRequest))
}
return interceptor(ctx, in, info, handler)
}
func _PostService_GetPosts_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetPostsRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(PostServiceServer).GetPosts(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: PostService_GetPosts_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(PostServiceServer).GetPosts(ctx, req.(*GetPostsRequest))
}
return interceptor(ctx, in, info, handler)
}
// PostService_ServiceDesc is the grpc.ServiceDesc for PostService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var PostService_ServiceDesc = grpc.ServiceDesc{
ServiceName: "post.PostService",
HandlerType: (*PostServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "GetPost",
Handler: _PostService_GetPost_Handler,
},
{
MethodName: "GetPosts",
Handler: _PostService_GetPosts_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "post/post.proto",
}
================================================
FILE: _examples/03_custom_resolver/proto/buf.yaml
================================================
version: v1
breaking:
use:
- FILE
lint:
use:
- DEFAULT
================================================
FILE: _examples/03_custom_resolver/proto/federation/federation.proto
================================================
syntax = "proto3";
package federation.v2dev;
import "grpc/federation/federation.proto";
import "google/protobuf/duration.proto";
import "federation/other.proto";
option go_package = "example/federation;federation";
option (grpc.federation.file)= {
import: ["post/post.proto", "user/user.proto"]
};
service FederationV2devService {
option (grpc.federation.service) = {
env {
var {
name: "a"
type { kind: STRING }
option {
default: "xxx"
}
}
var {
name: "b"
type { repeated { kind: INT64 } }
option {
alternate: "yyy"
}
}
var {
name: "c"
type { map { key { kind: STRING } value { kind: DURATION } } }
option {
required: true
alternate: "zzz"
}
}
var {
name: "d"
type { kind: DOUBLE }
option {
ignored: true
}
}
}
var {
name: "federation_service_variable"
by: "1"
}
};
rpc GetPostV2dev(GetPostV2devRequest) returns (GetPostV2devResponse) {};
}
message GetPostV2devRequest {
string id = 1;
}
enum PostV2devType {
POST_V2_DEV_TYPE = 0;
}
message GetPostV2devResponse {
option (grpc.federation.message) = {
def {
name: "post"
message {
name: "PostV2dev"
args { name: "id", by: "$.id" }
}
}
def { name: "r" message { name: "Ref" } }
};
PostV2dev post = 1 [(grpc.federation.field).by = "post"];
PostV2devType type = 2 [(grpc.federation.field).by = "PostV2devType.value('POST_V2_DEV_TYPE')"];
string env_a = 3 [(grpc.federation.field).by = "grpc.federation.env.a"];
int64 env_b = 4 [(grpc.federation.field).by = "grpc.federation.env.b[1]"];
google.protobuf.Duration env_c_value = 5 [(grpc.federation.field).by = "grpc.federation.env.c['z']"];
Ref ref = 6 [(grpc.federation.field).by = "r"];
}
message PostV2dev {
option (grpc.federation.message) = {
def [
{
name: "res"
call {
method: "post.PostService/GetPost"
request { field: "id", by: "$.id" }
}
},
{ name: "post", by: "res.post", autobind: true },
{
name: "user"
message {
name: "User"
args { inline: "post" }
}
},
{
name: "unused"
message {
name: "Unused"
args { name: "foo", by: "'foo'" }
}
},
{
// without name
message {
name: "ForNameless"
args { name: "bar", by: "'bar'" }
}
},
{
// assign typed-nil by custom resolver
name: "typed_nil"
message {
name: "TypedNil"
}
},
{
name: "null_check"
if: "typed_nil == null" // replace `grpc.federation.cast.null_value(typed_nil) == null` by EvalCEL function
by: "true"
},
{
if: "typed_nil == null"
by: "grpc.federation.log.info('output typed_nil', {'result': typed_nil == null})"
}
]
};
string id = 1;
string title = 2;
string content = 3;
User user = 4 [(grpc.federation.field).custom_resolver = true];
bool null_check = 5 [(grpc.federation.field).by = "null_check"];
}
message User {
option (grpc.federation.message) = {
def {
name: "res"
call {
method: "user.UserService/GetUser"
request { field: "id", by: "$.user_id" }
}
}
def { name: "u", by: "res.user" }
custom_resolver: true
};
string id = 1;
string name = 2 [(grpc.federation.field).custom_resolver = true];
}
message Unused {
option (grpc.federation.message).custom_resolver = true;
string foo = 1;
}
message ForNameless {
option (grpc.federation.message).custom_resolver = true;
string bar = 1;
}
message TypedNil {
option (grpc.federation.message).custom_resolver = true;
}
================================================
FILE: _examples/03_custom_resolver/proto/federation/other.proto
================================================
syntax = "proto3";
package federation.v2dev;
import "grpc/federation/federation.proto";
option go_package = "example/federation;federation";
message Ref {
string a = 1 [(grpc.federation.field).by = "grpc.federation.env.a"];
}
================================================
FILE: _examples/03_custom_resolver/proto/post/post.proto
================================================
syntax = "proto3";
package post;
option go_package = "example/post;post";
service PostService {
rpc GetPost(GetPostRequest) returns (GetPostResponse) {};
rpc GetPosts(GetPostsRequest) returns (GetPostsResponse) {};
}
message GetPostRequest {
string id = 1;
}
message GetPostResponse {
Post post = 1;
}
message GetPostsRequest {
repeated string ids = 1;
}
message GetPostsResponse {
repeated Post posts = 1;
}
message Post {
string id = 1;
string title = 2;
string content = 3;
string user_id = 4;
}
================================================
FILE: _examples/03_custom_resolver/proto/user/user.proto
================================================
syntax = "proto3";
package user;
option go_package = "example/user;user";
service UserService {
rpc GetUser(GetUserRequest) returns (GetUserResponse) {};
rpc GetUsers(GetUsersRequest) returns (GetUsersResponse) {};
}
message GetUserRequest {
string id = 1;
}
message GetUserResponse {
User user = 1;
}
message GetUsersRequest {
repeated string ids = 1;
}
message GetUsersResponse {
repeated User users = 1;
}
message User {
string id = 1;
string name = 2;
}
================================================
FILE: _examples/03_custom_resolver/user/user.pb.go
================================================
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.33.0
// protoc (unknown)
// source: user/user.proto
package user
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
type GetUserRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
}
func (x *GetUserRequest) Reset() {
*x = GetUserRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_user_user_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GetUserRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetUserRequest) ProtoMessage() {}
func (x *GetUserRequest) ProtoReflect() protoreflect.Message {
mi := &file_user_user_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GetUserRequest.ProtoReflect.Descriptor instead.
func (*GetUserRequest) Descriptor() ([]byte, []int) {
return file_user_user_proto_rawDescGZIP(), []int{0}
}
func (x *GetUserRequest) GetId() string {
if x != nil {
return x.Id
}
return ""
}
type GetUserResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
User *User `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"`
}
func (x *GetUserResponse) Reset() {
*x = GetUserResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_user_user_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GetUserResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetUserResponse) ProtoMessage() {}
func (x *GetUserResponse) ProtoReflect() protoreflect.Message {
mi := &file_user_user_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GetUserResponse.ProtoReflect.Descriptor instead.
func (*GetUserResponse) Descriptor() ([]byte, []int) {
return file_user_user_proto_rawDescGZIP(), []int{1}
}
func (x *GetUserResponse) GetUser() *User {
if x != nil {
return x.User
}
return nil
}
type GetUsersRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Ids []string `protobuf:"bytes,1,rep,name=ids,proto3" json:"ids,omitempty"`
}
func (x *GetUsersRequest) Reset() {
*x = GetUsersRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_user_user_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GetUsersRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetUsersRequest) ProtoMessage() {}
func (x *GetUsersRequest) ProtoReflect() protoreflect.Message {
mi := &file_user_user_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GetUsersRequest.ProtoReflect.Descriptor instead.
func (*GetUsersRequest) Descriptor() ([]byte, []int) {
return file_user_user_proto_rawDescGZIP(), []int{2}
}
func (x *GetUsersRequest) GetIds() []string {
if x != nil {
return x.Ids
}
return nil
}
type GetUsersResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Users []*User `protobuf:"bytes,1,rep,name=users,proto3" json:"users,omitempty"`
}
func (x *GetUsersResponse) Reset() {
*x = GetUsersResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_user_user_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GetUsersResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetUsersResponse) ProtoMessage() {}
func (x *GetUsersResponse) ProtoReflect() protoreflect.Message {
mi := &file_user_user_proto_msgTypes[3]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GetUsersResponse.ProtoReflect.Descriptor instead.
func (*GetUsersResponse) Descriptor() ([]byte, []int) {
return file_user_user_proto_rawDescGZIP(), []int{3}
}
func (x *GetUsersResponse) GetUsers() []*User {
if x != nil {
return x.Users
}
return nil
}
type User struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
}
func (x *User) Reset() {
*x = User{}
if protoimpl.UnsafeEnabled {
mi := &file_user_user_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *User) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*User) ProtoMessage() {}
func (x *User) ProtoReflect() protoreflect.Message {
mi := &file_user_user_proto_msgTypes[4]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use User.ProtoReflect.Descriptor instead.
func (*User) Descriptor() ([]byte, []int) {
return file_user_user_proto_rawDescGZIP(), []int{4}
}
func (x *User) GetId() string {
if x != nil {
return x.Id
}
return ""
}
func (x *User) GetName() string {
if x != nil {
return x.Name
}
return ""
}
var File_user_user_proto protoreflect.FileDescriptor
var file_user_user_proto_rawDesc = []byte{
0x0a, 0x0f, 0x75, 0x73, 0x65, 0x72, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x12, 0x04, 0x75, 0x73, 0x65, 0x72, 0x22, 0x20, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x55, 0x73,
0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18,
0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x31, 0x0a, 0x0f, 0x47, 0x65, 0x74,
0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1e, 0x0a, 0x04,
0x75, 0x73, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x75, 0x73, 0x65,
0x72, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x04, 0x75, 0x73, 0x65, 0x72, 0x22, 0x23, 0x0a, 0x0f,
0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12,
0x10, 0x0a, 0x03, 0x69, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x03, 0x69, 0x64,
0x73, 0x22, 0x34, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73,
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x20, 0x0a, 0x05, 0x75, 0x73, 0x65, 0x72, 0x73, 0x18, 0x01,
0x20, 0x03, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x55, 0x73, 0x65, 0x72,
0x52, 0x05, 0x75, 0x73, 0x65, 0x72, 0x73, 0x22, 0x2a, 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, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e,
0x61, 0x6d, 0x65, 0x32, 0x84, 0x01, 0x0a, 0x0b, 0x55, 0x73, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76,
0x69, 0x63, 0x65, 0x12, 0x38, 0x0a, 0x07, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x12, 0x14,
0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71,
0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x47, 0x65, 0x74, 0x55,
0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x3b, 0x0a,
0x08, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x73, 0x12, 0x15, 0x2e, 0x75, 0x73, 0x65, 0x72,
0x2e, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
0x1a, 0x16, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x73,
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x58, 0x0a, 0x08, 0x63, 0x6f,
0x6d, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x42, 0x09, 0x55, 0x73, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x74,
0x6f, 0x50, 0x01, 0x5a, 0x11, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2f, 0x75, 0x73, 0x65,
0x72, 0x3b, 0x75, 0x73, 0x65, 0x72, 0xa2, 0x02, 0x03, 0x55, 0x58, 0x58, 0xaa, 0x02, 0x04, 0x55,
0x73, 0x65, 0x72, 0xca, 0x02, 0x04, 0x55, 0x73, 0x65, 0x72, 0xe2, 0x02, 0x10, 0x55, 0x73, 0x65,
0x72, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x04,
0x55, 0x73, 0x65, 0x72, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_user_user_proto_rawDescOnce sync.Once
file_user_user_proto_rawDescData = file_user_user_proto_rawDesc
)
func file_user_user_proto_rawDescGZIP() []byte {
file_user_user_proto_rawDescOnce.Do(func() {
file_user_user_proto_rawDescData = protoimpl.X.CompressGZIP(file_user_user_proto_rawDescData)
})
return file_user_user_proto_rawDescData
}
var file_user_user_proto_msgTypes = make([]protoimpl.MessageInfo, 5)
var file_user_user_proto_goTypes = []interface{}{
(*GetUserRequest)(nil), // 0: user.GetUserRequest
(*GetUserResponse)(nil), // 1: user.GetUserResponse
(*GetUsersRequest)(nil), // 2: user.GetUsersRequest
(*GetUsersResponse)(nil), // 3: user.GetUsersResponse
(*User)(nil), // 4: user.User
}
var file_user_user_proto_depIdxs = []int32{
4, // 0: user.GetUserResponse.user:type_name -> user.User
4, // 1: user.GetUsersResponse.users:type_name -> user.User
0, // 2: user.UserService.GetUser:input_type -> user.GetUserRequest
2, // 3: user.UserService.GetUsers:input_type -> user.GetUsersRequest
1, // 4: user.UserService.GetUser:output_type -> user.GetUserResponse
3, // 5: user.UserService.GetUsers:output_type -> user.GetUsersResponse
4, // [4:6] is the sub-list for method output_type
2, // [2:4] is the sub-list for method input_type
2, // [2:2] is the sub-list for extension type_name
2, // [2:2] is the sub-list for extension extendee
0, // [0:2] is the sub-list for field type_name
}
func init() { file_user_user_proto_init() }
func file_user_user_proto_init() {
if File_user_user_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_user_user_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetUserRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_user_user_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetUserResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_user_user_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetUsersRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_user_user_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetUsersResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_user_user_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*User); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_user_user_proto_rawDesc,
NumEnums: 0,
NumMessages: 5,
NumExtensions: 0,
NumServices: 1,
},
GoTypes: file_user_user_proto_goTypes,
DependencyIndexes: file_user_user_proto_depIdxs,
MessageInfos: file_user_user_proto_msgTypes,
}.Build()
File_user_user_proto = out.File
file_user_user_proto_rawDesc = nil
file_user_user_proto_goTypes = nil
file_user_user_proto_depIdxs = nil
}
================================================
FILE: _examples/03_custom_resolver/user/user_grpc.pb.go
================================================
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.3.0
// - protoc (unknown)
// source: user/user.proto
package user
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 (
UserService_GetUser_FullMethodName = "/user.UserService/GetUser"
UserService_GetUsers_FullMethodName = "/user.UserService/GetUsers"
)
// UserServiceClient is the client API for UserService 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 UserServiceClient interface {
GetUser(ctx context.Context, in *GetUserRequest, opts ...grpc.CallOption) (*GetUserResponse, error)
GetUsers(ctx context.Context, in *GetUsersRequest, opts ...grpc.CallOption) (*GetUsersResponse, error)
}
type userServiceClient struct {
cc grpc.ClientConnInterface
}
func NewUserServiceClient(cc grpc.ClientConnInterface) UserServiceClient {
return &userServiceClient{cc}
}
func (c *userServiceClient) GetUser(ctx context.Context, in *GetUserRequest, opts ...grpc.CallOption) (*GetUserResponse, error) {
out := new(GetUserResponse)
err := c.cc.Invoke(ctx, UserService_GetUser_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *userServiceClient) GetUsers(ctx context.Context, in *GetUsersRequest, opts ...grpc.CallOption) (*GetUsersResponse, error) {
out := new(GetUsersResponse)
err := c.cc.Invoke(ctx, UserService_GetUsers_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// UserServiceServer is the server API for UserService service.
// All implementations must embed UnimplementedUserServiceServer
// for forward compatibility
type UserServiceServer interface {
GetUser(context.Context, *GetUserRequest) (*GetUserResponse, error)
GetUsers(context.Context, *GetUsersRequest) (*GetUsersResponse, error)
mustEmbedUnimplementedUserServiceServer()
}
// UnimplementedUserServiceServer must be embedded to have forward compatible implementations.
type UnimplementedUserServiceServer struct {
}
func (UnimplementedUserServiceServer) GetUser(context.Context, *GetUserRequest) (*GetUserResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetUser not implemented")
}
func (UnimplementedUserServiceServer) GetUsers(context.Context, *GetUsersRequest) (*GetUsersResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetUsers not implemented")
}
func (UnimplementedUserServiceServer) mustEmbedUnimplementedUserServiceServer() {}
// UnsafeUserServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to UserServiceServer will
// result in compilation errors.
type UnsafeUserServiceServer interface {
mustEmbedUnimplementedUserServiceServer()
}
func RegisterUserServiceServer(s grpc.ServiceRegistrar, srv UserServiceServer) {
s.RegisterService(&UserService_ServiceDesc, srv)
}
func _UserService_GetUser_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetUserRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(UserServiceServer).GetUser(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: UserService_GetUser_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(UserServiceServer).GetUser(ctx, req.(*GetUserRequest))
}
return interceptor(ctx, in, info, handler)
}
func _UserService_GetUsers_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetUsersRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(UserServiceServer).GetUsers(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: UserService_GetUsers_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(UserServiceServer).GetUsers(ctx, req.(*GetUsersRequest))
}
return interceptor(ctx, in, info, handler)
}
// UserService_ServiceDesc is the grpc.ServiceDesc for UserService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var UserService_ServiceDesc = grpc.ServiceDesc{
ServiceName: "user.UserService",
HandlerType: (*UserServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "GetUser",
Handler: _UserService_GetUser_Handler,
},
{
MethodName: "GetUsers",
Handler: _UserService_GetUsers_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "user/user.proto",
}
================================================
FILE: _examples/04_timeout/.gitignore
================================================
grpc/federation
================================================
FILE: _examples/04_timeout/Makefile
================================================
MAKEFILE_DIR := $(dir $(lastword $(MAKEFILE_LIST)))
GOBIN := $(MAKEFILE_DIR)/../../bin
PATH := $(GOBIN):$(PATH)
JAEGER_IMAGE := jaegertracing/all-in-one:latest
.PHONY: generate
generate:
$(GOBIN)/buf generate
.PHONY: lint
lint:
@$(GOBIN)/grpc-federation-linter -Iproto -Iproto_deps ./proto/federation/federation.proto
.PHONY: test
test:
go test -race ./ -count=1
.PHONY: grpc-federation/generate
grpc-federation/generate:
@$(GOBIN)/grpc-federation-generator ./proto/federation/federation.proto
.PHONY: grpc-federation/watch
grpc-federation/watch:
@$(GOBIN)/grpc-federation-generator -w
.PHONY: jaeger/start
jaeger/start:
@docker run \
-e COLLECTOR_OTLP_ENABLED=true \
-p 16686:16686 \
-p 4317:4317 \
-p 4318:4318 \
-d \
$(JAEGER_IMAGE)
.PHONY: jaeger/stop
jaeger/stop:
@docker stop $(shell docker ps -q --filter ancestor=$(JAEGER_IMAGE))
================================================
FILE: _examples/04_timeout/buf.gen.yaml
================================================
version: v1
managed:
enabled: true
plugins:
- plugin: go
out: .
opt: paths=source_relative
- plugin: go-grpc
out: .
opt: paths=source_relative
- plugin: grpc-federation
out: .
opt:
- paths=source_relative
- import_paths=proto
================================================
FILE: _examples/04_timeout/buf.work.yaml
================================================
version: v1
directories:
- proto
- proto_deps
================================================
FILE: _examples/04_timeout/federation/federation.pb.go
================================================
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.33.0
// protoc (unknown)
// source: federation/federation.proto
package federation
import (
_ "github.com/mercari/grpc-federation/grpc/federation"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
descriptorpb "google.golang.org/protobuf/types/descriptorpb"
emptypb "google.golang.org/protobuf/types/known/emptypb"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
type Ext struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Foo string `protobuf:"bytes,1,opt,name=foo,proto3" json:"foo,omitempty"`
}
func (x *Ext) Reset() {
*x = Ext{}
if protoimpl.UnsafeEnabled {
mi := &file_federation_federation_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Ext) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Ext) ProtoMessage() {}
func (x *Ext) ProtoReflect() protoreflect.Message {
mi := &file_federation_federation_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Ext.ProtoReflect.Descriptor instead.
func (*Ext) Descriptor() ([]byte, []int) {
return file_federation_federation_proto_rawDescGZIP(), []int{0}
}
func (x *Ext) GetFoo() string {
if x != nil {
return x.Foo
}
return ""
}
type GetPostRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
}
func (x *GetPostRequest) Reset() {
*x = GetPostRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_federation_federation_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GetPostRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetPostRequest) ProtoMessage() {}
func (x *GetPostRequest) ProtoReflect() protoreflect.Message {
mi := &file_federation_federation_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GetPostRequest.ProtoReflect.Descriptor instead.
func (*GetPostRequest) Descriptor() ([]byte, []int) {
return file_federation_federation_proto_rawDescGZIP(), []int{1}
}
func (x *GetPostRequest) GetId() string {
if x != nil {
return x.Id
}
return ""
}
type GetPostResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Post *Post `protobuf:"bytes,1,opt,name=post,proto3" json:"post,omitempty"`
}
func (x *GetPostResponse) Reset() {
*x = GetPostResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_federation_federation_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GetPostResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetPostResponse) ProtoMessage() {}
func (x *GetPostResponse) ProtoReflect() protoreflect.Message {
mi := &file_federation_federation_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GetPostResponse.ProtoReflect.Descriptor instead.
func (*GetPostResponse) Descriptor() ([]byte, []int) {
return file_federation_federation_proto_rawDescGZIP(), []int{2}
}
func (x *GetPostResponse) GetPost() *Post {
if x != nil {
return x.Post
}
return nil
}
type Post struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
Title string `protobuf:"bytes,2,opt,name=title,proto3" json:"title,omitempty"`
Content string `protobuf:"bytes,3,opt,name=content,proto3" json:"content,omitempty"`
}
func (x *Post) Reset() {
*x = Post{}
if protoimpl.UnsafeEnabled {
mi := &file_federation_federation_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Post) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Post) ProtoMessage() {}
func (x *Post) ProtoReflect() protoreflect.Message {
mi := &file_federation_federation_proto_msgTypes[3]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Post.ProtoReflect.Descriptor instead.
func (*Post) Descriptor() ([]byte, []int) {
return file_federation_federation_proto_rawDescGZIP(), []int{3}
}
func (x *Post) GetId() string {
if x != nil {
return x.Id
}
return ""
}
func (x *Post) GetTitle() string {
if x != nil {
return x.Title
}
return ""
}
func (x *Post) GetContent() string {
if x != nil {
return x.Content
}
return ""
}
type UpdatePostRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
}
func (x *UpdatePostRequest) Reset() {
*x = UpdatePostRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_federation_federation_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *UpdatePostRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*UpdatePostRequest) ProtoMessage() {}
func (x *UpdatePostRequest) ProtoReflect() protoreflect.Message {
mi := &file_federation_federation_proto_msgTypes[4]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use UpdatePostRequest.ProtoReflect.Descriptor instead.
func (*UpdatePostRequest) Descriptor() ([]byte, []int) {
return file_federation_federation_proto_rawDescGZIP(), []int{4}
}
func (x *UpdatePostRequest) GetId() string {
if x != nil {
return x.Id
}
return ""
}
type UpdatePostResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
}
func (x *UpdatePostResponse) Reset() {
*x = UpdatePostResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_federation_federation_proto_msgTypes[5]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *UpdatePostResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*UpdatePostResponse) ProtoMessage() {}
func (x *UpdatePostResponse) ProtoReflect() protoreflect.Message {
mi := &file_federation_federation_proto_msgTypes[5]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use UpdatePostResponse.ProtoReflect.Descriptor instead.
func (*UpdatePostResponse) Descriptor() ([]byte, []int) {
return file_federation_federation_proto_rawDescGZIP(), []int{5}
}
var file_federation_federation_proto_extTypes = []protoimpl.ExtensionInfo{
{
ExtendedType: (*descriptorpb.MethodOptions)(nil),
ExtensionType: (*Ext)(nil),
Field: 70001,
Name: "federation.ext",
Tag: "bytes,70001,opt,name=ext",
Filename: "federation/federation.proto",
},
}
// Extension fields to descriptorpb.MethodOptions.
var (
// optional federation.Ext ext = 70001;
E_Ext = &file_federation_federation_proto_extTypes[0]
)
var File_federation_federation_proto protoreflect.FileDescriptor
var file_federation_federation_proto_rawDesc = []byte{
0x0a, 0x1b, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x66, 0x65, 0x64,
0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0a, 0x66,
0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x20, 0x67, 0x72, 0x70, 0x63, 0x2f,
0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x66, 0x65, 0x64, 0x65, 0x72,
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x20, 0x67, 0x6f, 0x6f,
0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x65, 0x73,
0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x67,
0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x65,
0x6d, 0x70, 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x17, 0x0a, 0x03, 0x45, 0x78,
0x74, 0x12, 0x10, 0x0a, 0x03, 0x66, 0x6f, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03,
0x66, 0x6f, 0x6f, 0x22, 0x20, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x50, 0x6f, 0x73, 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, 0x63, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x50, 0x6f, 0x73, 0x74,
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2f, 0x0a, 0x04, 0x70, 0x6f, 0x73, 0x74,
0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74,
0x69, 0x6f, 0x6e, 0x2e, 0x50, 0x6f, 0x73, 0x74, 0x42, 0x09, 0x9a, 0x4a, 0x06, 0x12, 0x04, 0x70,
0x6f, 0x73, 0x74, 0x52, 0x04, 0x70, 0x6f, 0x73, 0x74, 0x3a, 0x1f, 0x9a, 0x4a, 0x1c, 0x0a, 0x1a,
0x0a, 0x04, 0x70, 0x6f, 0x73, 0x74, 0x6a, 0x12, 0x0a, 0x04, 0x50, 0x6f, 0x73, 0x74, 0x12, 0x0a,
0x0a, 0x02, 0x69, 0x64, 0x12, 0x04, 0x24, 0x2e, 0x69, 0x64, 0x22, 0x8e, 0x01, 0x0a, 0x04, 0x50,
0x6f, 0x73, 0x74, 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, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e,
0x74, 0x65, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74,
0x65, 0x6e, 0x74, 0x3a, 0x46, 0x9a, 0x4a, 0x43, 0x0a, 0x2d, 0x0a, 0x03, 0x72, 0x65, 0x73, 0x72,
0x26, 0x0a, 0x18, 0x70, 0x6f, 0x73, 0x74, 0x2e, 0x50, 0x6f, 0x73, 0x74, 0x53, 0x65, 0x72, 0x76,
0x69, 0x63, 0x65, 0x2f, 0x47, 0x65, 0x74, 0x50, 0x6f, 0x73, 0x74, 0x12, 0x0a, 0x0a, 0x02, 0x69,
0x64, 0x12, 0x04, 0x24, 0x2e, 0x69, 0x64, 0x0a, 0x12, 0x0a, 0x04, 0x70, 0x6f, 0x73, 0x74, 0x18,
0x01, 0x5a, 0x08, 0x72, 0x65, 0x73, 0x2e, 0x70, 0x6f, 0x73, 0x74, 0x22, 0x23, 0x0a, 0x11, 0x55,
0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x6f, 0x73, 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, 0x77, 0x0a, 0x12, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x6f, 0x73, 0x74, 0x52, 0x65,
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x3a, 0x61, 0x9a, 0x4a, 0x5e, 0x0a, 0x2f, 0x72, 0x2d, 0x0a,
0x1b, 0x70, 0x6f, 0x73, 0x74, 0x2e, 0x50, 0x6f, 0x73, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63,
0x65, 0x2f, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x6f, 0x73, 0x74, 0x12, 0x0a, 0x0a, 0x02,
0x69, 0x64, 0x12, 0x04, 0x24, 0x2e, 0x69, 0x64, 0x1a, 0x02, 0x33, 0x73, 0x0a, 0x2b, 0x72, 0x29,
0x0a, 0x1b, 0x70, 0x6f, 0x73, 0x74, 0x2e, 0x50, 0x6f, 0x73, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69,
0x63, 0x65, 0x2f, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x50, 0x6f, 0x73, 0x74, 0x12, 0x0a, 0x0a,
0x02, 0x69, 0x64, 0x12, 0x04, 0x24, 0x2e, 0x69, 0x64, 0x32, 0xcc, 0x01, 0x0a, 0x11, 0x46, 0x65,
0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12,
0x54, 0x0a, 0x07, 0x47, 0x65, 0x74, 0x50, 0x6f, 0x73, 0x74, 0x12, 0x1a, 0x2e, 0x66, 0x65, 0x64,
0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x6f, 0x73, 0x74, 0x52,
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74,
0x69, 0x6f, 0x6e, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x6f, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f,
0x6e, 0x73, 0x65, 0x22, 0x10, 0x9a, 0x4a, 0x04, 0x0a, 0x02, 0x31, 0x73, 0x8a, 0x97, 0x22, 0x05,
0x0a, 0x03, 0x78, 0x78, 0x78, 0x12, 0x5c, 0x0a, 0x0a, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50,
0x6f, 0x73, 0x74, 0x12, 0x1d, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e,
0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x6f, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65,
0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x17, 0x9a, 0x4a, 0x14, 0x12,
0x12, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x6f, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f,
0x6e, 0x73, 0x65, 0x1a, 0x03, 0x9a, 0x4a, 0x00, 0x3a, 0x43, 0x0a, 0x03, 0x65, 0x78, 0x74, 0x12,
0x1e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75,
0x66, 0x2e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18,
0xf1, 0xa2, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61,
0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x45, 0x78, 0x74, 0x52, 0x03, 0x65, 0x78, 0x74, 0x42, 0x9c, 0x01,
0x9a, 0x4a, 0x11, 0x12, 0x0f, 0x70, 0x6f, 0x73, 0x74, 0x2f, 0x70, 0x6f, 0x73, 0x74, 0x2e, 0x70,
0x72, 0x6f, 0x74, 0x6f, 0x0a, 0x0e, 0x63, 0x6f, 0x6d, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61,
0x74, 0x69, 0x6f, 0x6e, 0x42, 0x0f, 0x46, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e,
0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x1d, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65,
0x2f, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x3b, 0x66, 0x65, 0x64, 0x65,
0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0xa2, 0x02, 0x03, 0x46, 0x58, 0x58, 0xaa, 0x02, 0x0a, 0x46,
0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0xca, 0x02, 0x0a, 0x46, 0x65, 0x64, 0x65,
0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0xe2, 0x02, 0x16, 0x46, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74,
0x69, 0x6f, 0x6e, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea,
0x02, 0x0a, 0x46, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x62, 0x06, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x33,
}
var (
file_federation_federation_proto_rawDescOnce sync.Once
file_federation_federation_proto_rawDescData = file_federation_federation_proto_rawDesc
)
func file_federation_federation_proto_rawDescGZIP() []byte {
file_federation_federation_proto_rawDescOnce.Do(func() {
file_federation_federation_proto_rawDescData = protoimpl.X.CompressGZIP(file_federation_federation_proto_rawDescData)
})
return file_federation_federation_proto_rawDescData
}
var file_federation_federation_proto_msgTypes = make([]protoimpl.MessageInfo, 6)
var file_federation_federation_proto_goTypes = []interface{}{
(*Ext)(nil), // 0: federation.Ext
(*GetPostRequest)(nil), // 1: federation.GetPostRequest
(*GetPostResponse)(nil), // 2: federation.GetPostResponse
(*Post)(nil), // 3: federation.Post
(*UpdatePostRequest)(nil), // 4: federation.UpdatePostRequest
(*UpdatePostResponse)(nil), // 5: federation.UpdatePostResponse
(*descriptorpb.MethodOptions)(nil), // 6: google.protobuf.MethodOptions
(*emptypb.Empty)(nil), // 7: google.protobuf.Empty
}
var file_federation_federation_proto_depIdxs = []int32{
3, // 0: federation.GetPostResponse.post:type_name -> federation.Post
6, // 1: federation.ext:extendee -> google.protobuf.MethodOptions
0, // 2: federation.ext:type_name -> federation.Ext
1, // 3: federation.FederationService.GetPost:input_type -> federation.GetPostRequest
4, // 4: federation.FederationService.UpdatePost:input_type -> federation.UpdatePostRequest
2, // 5: federation.FederationService.GetPost:output_type -> federation.GetPostResponse
7, // 6: federation.FederationService.UpdatePost:output_type -> google.protobuf.Empty
5, // [5:7] is the sub-list for method output_type
3, // [3:5] is the sub-list for method input_type
2, // [2:3] is the sub-list for extension type_name
1, // [1:2] is the sub-list for extension extendee
0, // [0:1] is the sub-list for field type_name
}
func init() { file_federation_federation_proto_init() }
func file_federation_federation_proto_init() {
if File_federation_federation_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_federation_federation_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Ext); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_federation_federation_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetPostRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_federation_federation_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetPostResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_federation_federation_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Post); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_federation_federation_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*UpdatePostRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_federation_federation_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*UpdatePostResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_federation_federation_proto_rawDesc,
NumEnums: 0,
NumMessages: 6,
NumExtensions: 1,
NumServices: 1,
},
GoTypes: file_federation_federation_proto_goTypes,
DependencyIndexes: file_federation_federation_proto_depIdxs,
MessageInfos: file_federation_federation_proto_msgTypes,
ExtensionInfos: file_federation_federation_proto_extTypes,
}.Build()
File_federation_federation_proto = out.File
file_federation_federation_proto_rawDesc = nil
file_federation_federation_proto_goTypes = nil
file_federation_federation_proto_depIdxs = nil
}
================================================
FILE: _examples/04_timeout/federation/federation_grpc.pb.go
================================================
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.3.0
// - protoc (unknown)
// source: federation/federation.proto
package federation
import (
context "context"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
emptypb "google.golang.org/protobuf/types/known/emptypb"
)
// 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 (
FederationService_GetPost_FullMethodName = "/federation.FederationService/GetPost"
FederationService_UpdatePost_FullMethodName = "/federation.FederationService/UpdatePost"
)
// FederationServiceClient is the client API for FederationService 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 FederationServiceClient interface {
GetPost(ctx context.Context, in *GetPostRequest, opts ...grpc.CallOption) (*GetPostResponse, error)
UpdatePost(ctx context.Context, in *UpdatePostRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
}
type federationServiceClient struct {
cc grpc.ClientConnInterface
}
func NewFederationServiceClient(cc grpc.ClientConnInterface) FederationServiceClient {
return &federationServiceClient{cc}
}
func (c *federationServiceClient) GetPost(ctx context.Context, in *GetPostRequest, opts ...grpc.CallOption) (*GetPostResponse, error) {
out := new(GetPostResponse)
err := c.cc.Invoke(ctx, FederationService_GetPost_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *federationServiceClient) UpdatePost(ctx context.Context, in *UpdatePostRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
out := new(emptypb.Empty)
err := c.cc.Invoke(ctx, FederationService_UpdatePost_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// FederationServiceServer is the server API for FederationService service.
// All implementations must embed UnimplementedFederationServiceServer
// for forward compatibility
type FederationServiceServer interface {
GetPost(context.Context, *GetPostRequest) (*GetPostResponse, error)
UpdatePost(context.Context, *UpdatePostRequest) (*emptypb.Empty, error)
mustEmbedUnimplementedFederationServiceServer()
}
// UnimplementedFederationServiceServer must be embedded to have forward compatible implementations.
type UnimplementedFederationServiceServer struct {
}
func (UnimplementedFederationServiceServer) GetPost(context.Context, *GetPostRequest) (*GetPostResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetPost not implemented")
}
func (UnimplementedFederationServiceServer) UpdatePost(context.Context, *UpdatePostRequest) (*emptypb.Empty, error) {
return nil, status.Errorf(codes.Unimplemented, "method UpdatePost not implemented")
}
func (UnimplementedFederationServiceServer) mustEmbedUnimplementedFederationServiceServer() {}
// UnsafeFederationServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to FederationServiceServer will
// result in compilation errors.
type UnsafeFederationServiceServer interface {
mustEmbedUnimplementedFederationServiceServer()
}
func RegisterFederationServiceServer(s grpc.ServiceRegistrar, srv FederationServiceServer) {
s.RegisterService(&FederationService_ServiceDesc, srv)
}
func _FederationService_GetPost_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetPostRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(FederationServiceServer).GetPost(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: FederationService_GetPost_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(FederationServiceServer).GetPost(ctx, req.(*GetPostRequest))
}
return interceptor(ctx, in, info, handler)
}
func _FederationService_UpdatePost_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(UpdatePostRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(FederationServiceServer).UpdatePost(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: FederationService_UpdatePost_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(FederationServiceServer).UpdatePost(ctx, req.(*UpdatePostRequest))
}
return interceptor(ctx, in, info, handler)
}
// FederationService_ServiceDesc is the grpc.ServiceDesc for FederationService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var FederationService_ServiceDesc = grpc.ServiceDesc{
ServiceName: "federation.FederationService",
HandlerType: (*FederationServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "GetPost",
Handler: _FederationService_GetPost_Handler,
},
{
MethodName: "UpdatePost",
Handler: _FederationService_UpdatePost_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "federation/federation.proto",
}
================================================
FILE: _examples/04_timeout/federation/federation_grpc_federation.pb.go
================================================
// Code generated by protoc-gen-grpc-federation. DO NOT EDIT!
// versions:
//
// protoc-gen-grpc-federation: (devel)
//
// source: federation/federation.proto
package federation
import (
"context"
"io"
"log/slog"
"reflect"
grpcfed "github.com/mercari/grpc-federation/grpc/federation"
grpcfedcel "github.com/mercari/grpc-federation/grpc/federation/cel"
"go.opentelemetry.io/otel"
"go.opentelemetry.io/otel/trace"
"google.golang.org/protobuf/types/known/emptypb"
post "example/post"
)
var (
_ = reflect.Invalid // to avoid "imported and not used error"
)
// Federation_GetPostResponseVariable represents variable definitions in "federation.GetPostResponse".
type FederationService_Federation_GetPostResponseVariable struct {
Post *Post
}
// Federation_GetPostResponseArgument is argument for "federation.GetPostResponse" message.
type FederationService_Federation_GetPostResponseArgument struct {
Id string
FederationService_Federation_GetPostResponseVariable
}
// Federation_PostVariable represents variable definitions in "federation.Post".
type FederationService_Federation_PostVariable struct {
Post *post.Post
Res *post.GetPostResponse
}
// Federation_PostArgument is argument for "federation.Post" message.
type FederationService_Federation_PostArgument struct {
Id string
FederationService_Federation_PostVariable
}
// Federation_UpdatePostResponseVariable represents variable definitions in "federation.UpdatePostResponse".
type FederationService_Federation_UpdatePostResponseVariable struct {
}
// Federation_UpdatePostResponseArgument is argument for "federation.UpdatePostResponse" message.
type FederationService_Federation_UpdatePostResponseArgument struct {
Id string
FederationService_Federation_UpdatePostResponseVariable
}
// FederationServiceConfig configuration required to initialize the service that use GRPC Federation.
type FederationServiceConfig struct {
// Client provides a factory that creates the gRPC Client needed to invoke methods of the gRPC Service on which the Federation Service depends.
// If this interface is not provided, an error is returned during initialization.
Client FederationServiceClientFactory // required
// ErrorHandler Federation Service often needs to convert errors received from downstream services.
// If an error occurs during method execution in the Federation Service, this error handler is called and the returned error is treated as a final error.
ErrorHandler grpcfed.ErrorHandler
// Logger sets the logger used to output Debug/Info/Error information.
Logger *slog.Logger
}
// FederationServiceClientFactory provides a factory that creates the gRPC Client needed to invoke methods of the gRPC Service on which the Federation Service depends.
type FederationServiceClientFactory interface {
// Post_PostServiceClient create a gRPC Client to be used to call methods in post.PostService.
Post_PostServiceClient(FederationServiceClientConfig) (post.PostServiceClient, error)
}
// FederationServiceClientConfig helper to create gRPC client.
// Hints for creating a gRPC Client.
type FederationServiceClientConfig struct {
// Service FQDN ( `.` ) of the service on Protocol Buffers.
Service string
}
// FederationServiceDependentClientSet has a gRPC client for all services on which the federation service depends.
// This is provided as an argument when implementing the custom resolver.
type FederationServiceDependentClientSet struct {
Post_PostServiceClient post.PostServiceClient
}
// FederationServiceResolver provides an interface to directly implement message resolver and field resolver not defined in Protocol Buffers.
type FederationServiceResolver interface {
}
// FederationServiceCELPluginWasmConfig type alias for grpcfedcel.WasmConfig.
type FederationServiceCELPluginWasmConfig = grpcfedcel.WasmConfig
// FederationServiceCELPluginConfig hints for loading a WebAssembly based plugin.
type FederationServiceCELPluginConfig struct {
CacheDir string
}
// FederationServiceUnimplementedResolver a structure implemented to satisfy the Resolver interface.
// An Unimplemented error is always returned.
// This is intended for use when there are many Resolver interfaces that do not need to be implemented,
// by embedding them in a resolver structure that you have created.
type FederationServiceUnimplementedResolver struct{}
const (
FederationService_DependentMethod_Post_PostService_DeletePost = "/post.PostService/DeletePost"
FederationService_DependentMethod_Post_PostService_GetPost = "/post.PostService/GetPost"
FederationService_DependentMethod_Post_PostService_UpdatePost = "/post.PostService/UpdatePost"
)
// FederationService represents Federation Service.
type FederationService struct {
UnimplementedFederationServiceServer
cfg FederationServiceConfig
logger *slog.Logger
isLogLevelDebug bool
errorHandler grpcfed.ErrorHandler
celCacheMap *grpcfed.CELCacheMap
tracer trace.Tracer
celTypeHelper *grpcfed.CELTypeHelper
celEnvOpts []grpcfed.CELEnvOption
celPlugins []*grpcfedcel.CELPlugin
client *FederationServiceDependentClientSet
}
// NewFederationService creates FederationService instance by FederationServiceConfig.
func NewFederationService(cfg FederationServiceConfig) (*FederationService, error) {
if cfg.Client == nil {
return nil, grpcfed.ErrClientConfig
}
Post_PostServiceClient, err := cfg.Client.Post_PostServiceClient(FederationServiceClientConfig{
Service: "post.PostService",
})
if err != nil {
return nil, err
}
logger := cfg.Logger
if logger == nil {
logger = slog.New(slog.NewJSONHandler(io.Discard, nil))
}
tracer := otel.Tracer("federation.FederationService")
ctx := grpcfed.WithLogger(context.Background(), logger)
ctx = grpcfed.WithTracer(ctx, tracer)
errorHandler := cfg.ErrorHandler
if errorHandler == nil {
errorHandler = func(ctx context.Context, methodName string, err error) error { return err }
}
celTypeHelperFieldMap := grpcfed.CELTypeHelperFieldMap{
"grpc.federation.private.federation.GetPostResponseArgument": {
"id": grpcfed.NewCELFieldType(grpcfed.CELStringType, "Id"),
},
"grpc.federation.private.federation.PostArgument": {
"id": grpcfed.NewCELFieldType(grpcfed.CELStringType, "Id"),
},
"grpc.federation.private.federation.UpdatePostResponseArgument": {
"id": grpcfed.NewCELFieldType(grpcfed.CELStringType, "Id"),
},
}
celTypeHelper := grpcfed.NewCELTypeHelper("federation", celTypeHelperFieldMap)
var celEnvOpts []grpcfed.CELEnvOption
celEnvOpts = append(celEnvOpts, grpcfed.NewDefaultEnvOptions(celTypeHelper)...)
celEnvOpts = append(celEnvOpts, grpcfed.GRPCErrorAccessorOptions(celTypeHelper, "post.DeletePostResponse")...)
celEnvOpts = append(celEnvOpts, grpcfed.GRPCErrorAccessorOptions(celTypeHelper, "post.GetPostResponse")...)
celEnvOpts = append(celEnvOpts, grpcfed.GRPCErrorAccessorOptions(celTypeHelper, "post.UpdatePostResponse")...)
svc := &FederationService{
cfg: cfg,
logger: logger,
isLogLevelDebug: logger.Enabled(context.Background(), slog.LevelDebug),
errorHandler: errorHandler,
celEnvOpts: celEnvOpts,
celTypeHelper: celTypeHelper,
celCacheMap: grpcfed.NewCELCacheMap(),
tracer: tracer,
client: &FederationServiceDependentClientSet{
Post_PostServiceClient: Post_PostServiceClient,
},
}
return svc, nil
}
// CleanupFederationService cleanup all resources to prevent goroutine leaks.
func CleanupFederationService(ctx context.Context, svc *FederationService) {
svc.cleanup(ctx)
}
func (s *FederationService) cleanup(ctx context.Context) {
for _, plugin := range s.celPlugins {
plugin.Close()
}
}
// GetPost implements "federation.FederationService/GetPost" method.
func (s *FederationService) GetPost(ctx context.Context, req *GetPostRequest) (res *GetPostResponse, e error) {
ctx, span := s.tracer.Start(ctx, "federation.FederationService/GetPost")
defer span.End()
ctx = grpcfed.WithLogger(ctx, s.logger)
ctx = grpcfed.WithCELCacheMap(ctx, s.celCacheMap)
defer func() {
if r := recover(); r != nil {
e = grpcfed.RecoverError(r, grpcfed.StackTrace())
grpcfed.OutputErrorLog(ctx, e)
}
}()
defer func() {
for _, celPlugin := range s.celPlugins {
celPlugin.Cleanup()
}
}()
res, err := grpcfed.WithTimeout[GetPostResponse](ctx, "federation.FederationService/GetPost", 1000000000 /* 1s */, func(ctx context.Context) (*GetPostResponse, error) {
return s.resolve_Federation_GetPostResponse(ctx, &FederationService_Federation_GetPostResponseArgument{
Id: req.GetId(),
})
})
if err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
grpcfed.OutputErrorLog(ctx, err)
return nil, err
}
return res, nil
}
// UpdatePost implements "federation.FederationService/UpdatePost" method.
func (s *FederationService) UpdatePost(ctx context.Context, req *UpdatePostRequest) (res *emptypb.Empty, e error) {
ctx, span := s.tracer.Start(ctx, "federation.FederationService/UpdatePost")
defer span.End()
ctx = grpcfed.WithLogger(ctx, s.logger)
ctx = grpcfed.WithCELCacheMap(ctx, s.celCacheMap)
defer func() {
if r := recover(); r != nil {
e = grpcfed.RecoverError(r, grpcfed.StackTrace())
grpcfed.OutputErrorLog(ctx, e)
}
}()
defer func() {
for _, celPlugin := range s.celPlugins {
celPlugin.Cleanup()
}
}()
customRes, err := s.resolve_Federation_UpdatePostResponse(ctx, &FederationService_Federation_UpdatePostResponseArgument{
Id: req.GetId(),
})
if err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
grpcfed.OutputErrorLog(ctx, err)
return nil, err
}
ret, err := s.cast_Federation_UpdatePostResponse__to__Google_Protobuf_Empty(customRes)
if err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
grpcfed.OutputErrorLog(ctx, err)
return nil, err
}
return ret, nil
}
// resolve_Federation_GetPostResponse resolve "federation.GetPostResponse" message.
func (s *FederationService) resolve_Federation_GetPostResponse(ctx context.Context, req *FederationService_Federation_GetPostResponseArgument) (*GetPostResponse, error) {
ctx, span := s.tracer.Start(ctx, "federation.GetPostResponse")
defer span.End()
ctx = grpcfed.WithLogger(ctx, grpcfed.Logger(ctx), grpcfed.LogAttrs(ctx)...)
grpcfed.Logger(ctx).DebugContext(ctx, "resolve federation.GetPostResponse", slog.Any("message_args", s.logvalue_Federation_GetPostResponseArgument(req)))
type localValueType struct {
*grpcfed.LocalValue
vars struct {
Post *Post
}
}
value := &localValueType{LocalValue: grpcfed.NewLocalValue(ctx, s.celEnvOpts, "grpc.federation.private.federation.GetPostResponseArgument", req)}
ctx = grpcfed.WithLocalValue(ctx, value.LocalValue)
/*
def {
name: "post"
message {
name: "Post"
args { name: "id", by: "$.id" }
}
}
*/
def_post := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[*Post, *localValueType]{
Name: `post`,
Type: grpcfed.CELObjectType("federation.Post"),
Setter: func(value *localValueType, v *Post) error {
value.vars.Post = v
return nil
},
Message: func(ctx context.Context, value *localValueType) (any, error) {
args := &FederationService_Federation_PostArgument{}
// { name: "id", by: "$.id" }
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[string]{
Value: value,
Expr: `$.id`,
CacheIndex: 1,
Setter: func(v string) error {
args.Id = v
return nil
},
}); err != nil {
return nil, err
}
ret, err := s.resolve_Federation_Post(ctx, args)
if err != nil {
return nil, err
}
return ret, nil
},
})
}
if err := def_post(ctx); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
// assign named parameters to message arguments to pass to the custom resolver.
req.FederationService_Federation_GetPostResponseVariable.Post = value.vars.Post
// create a message value to be returned.
ret := &GetPostResponse{}
// field binding section.
// (grpc.federation.field).by = "post"
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[*Post]{
Value: value,
Expr: `post`,
CacheIndex: 2,
Setter: func(v *Post) error {
ret.Post = v
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
grpcfed.Logger(ctx).DebugContext(ctx, "resolved federation.GetPostResponse", slog.Any("federation.GetPostResponse", s.logvalue_Federation_GetPostResponse(ret)))
return ret, nil
}
// resolve_Federation_Post resolve "federation.Post" message.
func (s *FederationService) resolve_Federation_Post(ctx context.Context, req *FederationService_Federation_PostArgument) (*Post, error) {
ctx, span := s.tracer.Start(ctx, "federation.Post")
defer span.End()
ctx = grpcfed.WithLogger(ctx, grpcfed.Logger(ctx), grpcfed.LogAttrs(ctx)...)
grpcfed.Logger(ctx).DebugContext(ctx, "resolve federation.Post", slog.Any("message_args", s.logvalue_Federation_PostArgument(req)))
type localValueType struct {
*grpcfed.LocalValue
vars struct {
Post *post.Post
Res *post.GetPostResponse
}
}
value := &localValueType{LocalValue: grpcfed.NewLocalValue(ctx, s.celEnvOpts, "grpc.federation.private.federation.PostArgument", req)}
ctx = grpcfed.WithLocalValue(ctx, value.LocalValue)
/*
def {
name: "res"
call {
method: "post.PostService/GetPost"
request { field: "id", by: "$.id" }
}
}
*/
def_res := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[*post.GetPostResponse, *localValueType]{
Name: `res`,
Type: grpcfed.CELObjectType("post.GetPostResponse"),
Setter: func(value *localValueType, v *post.GetPostResponse) error {
value.vars.Res = v
return nil
},
Message: func(ctx context.Context, value *localValueType) (any, error) {
args := &post.GetPostRequest{}
// { field: "id", by: "$.id" }
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[string]{
Value: value,
Expr: `$.id`,
CacheIndex: 3,
Setter: func(v string) error {
args.Id = v
return nil
},
}); err != nil {
return nil, err
}
grpcfed.Logger(ctx).DebugContext(ctx, "call post.PostService/GetPost", slog.Any("post.GetPostRequest", s.logvalue_Post_GetPostRequest(args)))
ret, err := s.client.Post_PostServiceClient.GetPost(ctx, args)
if err != nil {
if err := s.errorHandler(ctx, FederationService_DependentMethod_Post_PostService_GetPost, err); err != nil {
return nil, grpcfed.NewErrorWithLogAttrs(err, slog.LevelError, grpcfed.LogAttrs(ctx))
}
}
return ret, nil
},
})
}
/*
def {
name: "post"
autobind: true
by: "res.post"
}
*/
def_post := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[*post.Post, *localValueType]{
Name: `post`,
Type: grpcfed.CELObjectType("post.Post"),
Setter: func(value *localValueType, v *post.Post) error {
value.vars.Post = v
return nil
},
By: `res.post`,
ByCacheIndex: 4,
})
}
if err := def_res(ctx); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
if err := def_post(ctx); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
// assign named parameters to message arguments to pass to the custom resolver.
req.FederationService_Federation_PostVariable.Post = value.vars.Post
req.FederationService_Federation_PostVariable.Res = value.vars.Res
// create a message value to be returned.
ret := &Post{}
// field binding section.
ret.Id = value.vars.Post.GetId() // { name: "post", autobind: true }
ret.Title = value.vars.Post.GetTitle() // { name: "post", autobind: true }
ret.Content = value.vars.Post.GetContent() // { name: "post", autobind: true }
grpcfed.Logger(ctx).DebugContext(ctx, "resolved federation.Post", slog.Any("federation.Post", s.logvalue_Federation_Post(ret)))
return ret, nil
}
// resolve_Federation_UpdatePostResponse resolve "federation.UpdatePostResponse" message.
func (s *FederationService) resolve_Federation_UpdatePostResponse(ctx context.Context, req *FederationService_Federation_UpdatePostResponseArgument) (*UpdatePostResponse, error) {
ctx, span := s.tracer.Start(ctx, "federation.UpdatePostResponse")
defer span.End()
ctx = grpcfed.WithLogger(ctx, grpcfed.Logger(ctx), grpcfed.LogAttrs(ctx)...)
grpcfed.Logger(ctx).DebugContext(ctx, "resolve federation.UpdatePostResponse", slog.Any("message_args", s.logvalue_Federation_UpdatePostResponseArgument(req)))
type localValueType struct {
*grpcfed.LocalValue
vars struct {
XDef0 *post.UpdatePostResponse
XDef1 *post.DeletePostResponse
}
}
value := &localValueType{LocalValue: grpcfed.NewLocalValue(ctx, s.celEnvOpts, "grpc.federation.private.federation.UpdatePostResponseArgument", req)}
ctx = grpcfed.WithLocalValue(ctx, value.LocalValue)
/*
def {
name: "_def0"
call {
method: "post.PostService/UpdatePost"
request { field: "id", by: "$.id" }
}
}
*/
def__def0 := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[*post.UpdatePostResponse, *localValueType]{
Name: `_def0`,
Type: grpcfed.CELObjectType("post.UpdatePostResponse"),
Setter: func(value *localValueType, v *post.UpdatePostResponse) error {
value.vars.XDef0 = v
return nil
},
Message: func(ctx context.Context, value *localValueType) (any, error) {
args := &post.UpdatePostRequest{}
// { field: "id", by: "$.id" }
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[string]{
Value: value,
Expr: `$.id`,
CacheIndex: 5,
Setter: func(v string) error {
args.Id = v
return nil
},
}); err != nil {
return nil, err
}
grpcfed.Logger(ctx).DebugContext(ctx, "call post.PostService/UpdatePost", slog.Any("post.UpdatePostRequest", s.logvalue_Post_UpdatePostRequest(args)))
ret, err := grpcfed.WithTimeout[post.UpdatePostResponse](ctx, "post.PostService/UpdatePost", 3000000000 /* 3s */, func(ctx context.Context) (*post.UpdatePostResponse, error) {
return s.client.Post_PostServiceClient.UpdatePost(ctx, args)
})
if err != nil {
if err := s.errorHandler(ctx, FederationService_DependentMethod_Post_PostService_UpdatePost, err); err != nil {
return nil, grpcfed.NewErrorWithLogAttrs(err, slog.LevelError, grpcfed.LogAttrs(ctx))
}
}
return ret, nil
},
})
}
/*
def {
name: "_def1"
call {
method: "post.PostService/DeletePost"
request { field: "id", by: "$.id" }
}
}
*/
def__def1 := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[*post.DeletePostResponse, *localValueType]{
Name: `_def1`,
Type: grpcfed.CELObjectType("post.DeletePostResponse"),
Setter: func(value *localValueType, v *post.DeletePostResponse) error {
value.vars.XDef1 = v
return nil
},
Message: func(ctx context.Context, value *localValueType) (any, error) {
args := &post.DeletePostRequest{}
// { field: "id", by: "$.id" }
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[string]{
Value: value,
Expr: `$.id`,
CacheIndex: 6,
Setter: func(v string) error {
args.Id = v
return nil
},
}); err != nil {
return nil, err
}
grpcfed.Logger(ctx).DebugContext(ctx, "call post.PostService/DeletePost", slog.Any("post.DeletePostRequest", s.logvalue_Post_DeletePostRequest(args)))
ret, err := s.client.Post_PostServiceClient.DeletePost(ctx, args)
if err != nil {
if err := s.errorHandler(ctx, FederationService_DependentMethod_Post_PostService_DeletePost, err); err != nil {
return nil, grpcfed.NewErrorWithLogAttrs(err, slog.LevelError, grpcfed.LogAttrs(ctx))
}
}
return ret, nil
},
})
}
// A tree view of message dependencies is shown below.
/*
_def0 ─┐
_def1 ─┤
*/
eg, ctx1 := grpcfed.ErrorGroupWithContext(ctx)
grpcfed.GoWithRecover(eg, func() (any, error) {
if err := def__def0(ctx1); err != nil {
grpcfed.RecordErrorToSpan(ctx1, err)
return nil, err
}
return nil, nil
})
grpcfed.GoWithRecover(eg, func() (any, error) {
if err := def__def1(ctx1); err != nil {
grpcfed.RecordErrorToSpan(ctx1, err)
return nil, err
}
return nil, nil
})
if err := eg.Wait(); err != nil {
return nil, err
}
// create a message value to be returned.
ret := &UpdatePostResponse{}
grpcfed.Logger(ctx).DebugContext(ctx, "resolved federation.UpdatePostResponse", slog.Any("federation.UpdatePostResponse", s.logvalue_Federation_UpdatePostResponse(ret)))
return ret, nil
}
// cast_Federation_UpdatePostResponse__to__Google_Protobuf_Empty cast from "federation.UpdatePostResponse" to "google.protobuf.Empty".
func (s *FederationService) cast_Federation_UpdatePostResponse__to__Google_Protobuf_Empty(from *UpdatePostResponse) (*emptypb.Empty, error) {
if from == nil {
return nil, nil
}
ret := &emptypb.Empty{}
return ret, nil
}
func (s *FederationService) logvalue_Federation_GetPostResponse(v *GetPostResponse) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.Any("post", s.logvalue_Federation_Post(v.GetPost())),
)
}
func (s *FederationService) logvalue_Federation_GetPostResponseArgument(v *FederationService_Federation_GetPostResponseArgument) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.String("id", v.Id),
)
}
func (s *FederationService) logvalue_Federation_Post(v *Post) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.String("id", v.GetId()),
slog.String("title", v.GetTitle()),
slog.String("content", v.GetContent()),
)
}
func (s *FederationService) logvalue_Federation_PostArgument(v *FederationService_Federation_PostArgument) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.String("id", v.Id),
)
}
func (s *FederationService) logvalue_Federation_UpdatePostResponse(v *UpdatePostResponse) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue()
}
func (s *FederationService) logvalue_Federation_UpdatePostResponseArgument(v *FederationService_Federation_UpdatePostResponseArgument) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.String("id", v.Id),
)
}
func (s *FederationService) logvalue_Post_DeletePostRequest(v *post.DeletePostRequest) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.String("id", v.GetId()),
)
}
func (s *FederationService) logvalue_Post_GetPostRequest(v *post.GetPostRequest) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.String("id", v.GetId()),
)
}
func (s *FederationService) logvalue_Post_UpdatePostRequest(v *post.UpdatePostRequest) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.String("id", v.GetId()),
)
}
================================================
FILE: _examples/04_timeout/go.mod
================================================
module example
go 1.24.0
replace github.com/mercari/grpc-federation => ../../
require (
github.com/mercari/grpc-federation v0.0.0-00010101000000-000000000000
go.opentelemetry.io/otel v1.24.0
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.21.0
go.opentelemetry.io/otel/sdk v1.24.0
go.opentelemetry.io/otel/trace v1.24.0
go.uber.org/goleak v1.3.0
google.golang.org/genproto/googleapis/rpc v0.0.0-20240826202546-f6391c0de4c7
google.golang.org/grpc v1.65.0
google.golang.org/protobuf v1.34.2
)
require (
cel.dev/expr v0.19.1 // indirect
github.com/antlr4-go/antlr/v4 v4.13.0 // indirect
github.com/cenkalti/backoff/v4 v4.2.1 // indirect
github.com/go-logr/logr v1.4.1 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
github.com/goccy/wasi-go v0.3.2 // indirect
github.com/google/cel-go v0.23.1 // indirect
github.com/google/uuid v1.6.0 // indirect
github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0 // indirect
github.com/kelseyhightower/envconfig v1.4.0 // indirect
github.com/stealthrocket/wazergo v0.19.1 // indirect
github.com/stoewer/go-strcase v1.3.0 // indirect
github.com/tetratelabs/wazero v1.10.1 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.21.0 // indirect
go.opentelemetry.io/otel/metric v1.24.0 // indirect
go.opentelemetry.io/proto/otlp v1.0.0 // indirect
golang.org/x/exp v0.0.0-20250506013437-ce4c2cf36ca6 // indirect
golang.org/x/net v0.38.0 // indirect
golang.org/x/sync v0.14.0 // indirect
golang.org/x/sys v0.37.0 // indirect
golang.org/x/text v0.23.0 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20240826202546-f6391c0de4c7 // indirect
)
================================================
FILE: _examples/04_timeout/go.sum
================================================
cel.dev/expr v0.19.1 h1:NciYrtDRIR0lNCnH1LFJegdjspNx9fI59O7TWcua/W4=
cel.dev/expr v0.19.1/go.mod h1:MrpN08Q+lEBs+bGYdLxxHkZoUSsCp0nSKTs0nTymJgw=
github.com/antlr4-go/antlr/v4 v4.13.0 h1:lxCg3LAv+EUK6t1i0y1V6/SLeUi0eKEKdhQAlS8TVTI=
github.com/antlr4-go/antlr/v4 v4.13.0/go.mod h1:pfChB/xh/Unjila75QW7+VU4TSnWnnk9UTnmpPaOR2g=
github.com/cenkalti/backoff/v4 v4.2.1 h1:y4OZtCnogmCPw98Zjyt5a6+QwPLGkiQsYW5oUqylYbM=
github.com/cenkalti/backoff/v4 v4.2.1/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A=
github.com/go-logr/logr v1.4.1 h1:pKouT5E8xu9zeFC39JXRDukb6JFQPXM5p5I91188VAQ=
github.com/go-logr/logr v1.4.1/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY=
github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag=
github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE=
github.com/goccy/wasi-go v0.3.2 h1:wAvGXmqCkfcp0B0AwIp5Ya53hzDwkKm9W8iuT3nCCz0=
github.com/goccy/wasi-go v0.3.2/go.mod h1:nIKD204n9xa4Z20UV+XA483kIr9TAl2vXr+X5qVAO5M=
github.com/golang/glog v1.2.1 h1:OptwRhECazUx5ix5TTWC3EZhsZEHWcYWY4FQHTIubm4=
github.com/golang/glog v1.2.1/go.mod h1:6AhwSGph0fcJtXVM/PEHPqZlFeoLxhs7/t5UDAwmO+w=
github.com/google/cel-go v0.23.1 h1:91ThhEZlBcE5rB2adBVXqvDoqdL8BG2oyhd0bK1I/r4=
github.com/google/cel-go v0.23.1/go.mod h1:52Pb6QsDbC5kvgxvZhiL9QX1oZEkcUF/ZqaPx1J5Wwo=
github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8=
github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU=
github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0 h1:YBftPWNWd4WwGqtY2yeZL2ef8rHAxPBD8KFhJpmcqms=
github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0/go.mod h1:YN5jB8ie0yfIUg6VvR9Kz84aCaG7AsGZnLjhHbUqwPg=
github.com/kelseyhightower/envconfig v1.4.0 h1:Im6hONhd3pLkfDFsbRgu68RDNkGF1r3dvMUtDTo2cv8=
github.com/kelseyhightower/envconfig v1.4.0/go.mod h1:cccZRl6mQpaq41TPp5QxidR+Sa3axMbJDNb//FQX6Gg=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/stealthrocket/wazergo v0.19.1 h1:BPrITETPgSFwiytwmToO0MbUC/+RGC39JScz1JmmG6c=
github.com/stealthrocket/wazergo v0.19.1/go.mod h1:riI0hxw4ndZA5e6z7PesHg2BtTftcZaMxRcoiGGipTs=
github.com/stoewer/go-strcase v1.3.0 h1:g0eASXYtp+yvN9fK8sH94oCIk0fau9uV1/ZdJ0AVEzs=
github.com/stoewer/go-strcase v1.3.0/go.mod h1:fAH5hQ5pehh+j3nZfvwdk2RgEgQjAoM8wodgtPmh1xo=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=
github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo=
github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk=
github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
github.com/tetratelabs/wazero v1.10.1 h1:2DugeJf6VVk58KTPszlNfeeN8AhhpwcZqkJj2wwFuH8=
github.com/tetratelabs/wazero v1.10.1/go.mod h1:DRm5twOQ5Gr1AoEdSi0CLjDQF1J9ZAuyqFIjl1KKfQU=
go.opentelemetry.io/otel v1.24.0 h1:0LAOdjNmQeSTzGBzduGe/rU4tZhMwL5rWgtp9Ku5Jfo=
go.opentelemetry.io/otel v1.24.0/go.mod h1:W7b9Ozg4nkF5tWI5zsXkaKKDjdVjpD4oAt9Qi/MArHo=
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.21.0 h1:cl5P5/GIfFh4t6xyruOgJP5QiA1pw4fYYdv6nc6CBWw=
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.21.0/go.mod h1:zgBdWWAu7oEEMC06MMKc5NLbA/1YDXV1sMpSqEeLQLg=
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.21.0 h1:tIqheXEFWAZ7O8A7m+J0aPTmpJN3YQ7qetUAdkkkKpk=
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.21.0/go.mod h1:nUeKExfxAQVbiVFn32YXpXZZHZ61Cc3s3Rn1pDBGAb0=
go.opentelemetry.io/otel/metric v1.24.0 h1:6EhoGWWK28x1fbpA4tYTOWBkPefTDQnb8WSGXlc88kI=
go.opentelemetry.io/otel/metric v1.24.0/go.mod h1:VYhLe1rFfxuTXLgj4CBiyz+9WYBA8pNGJgDcSFRKBco=
go.opentelemetry.io/otel/sdk v1.24.0 h1:YMPPDNymmQN3ZgczicBY3B6sf9n62Dlj9pWD3ucgoDw=
go.opentelemetry.io/otel/sdk v1.24.0/go.mod h1:KVrIYw6tEubO9E96HQpcmpTKDVn9gdv35HoYiQWGDFg=
go.opentelemetry.io/otel/trace v1.24.0 h1:CsKnnL4dUAr/0llH9FKuc698G04IrpWV0MQA/Y1YELI=
go.opentelemetry.io/otel/trace v1.24.0/go.mod h1:HPc3Xr/cOApsBI154IU0OI0HJexz+aw5uPdbs3UCjNU=
go.opentelemetry.io/proto/otlp v1.0.0 h1:T0TX0tmXU8a3CbNXzEKGeU5mIVOdf0oykP+u2lIVU/I=
go.opentelemetry.io/proto/otlp v1.0.0/go.mod h1:Sy6pihPLfYHkr3NkUbEhGHFhINUSI/v80hjKIs5JXpM=
go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto=
go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE=
golang.org/x/exp v0.0.0-20250506013437-ce4c2cf36ca6 h1:y5zboxd6LQAqYIhHnB48p0ByQ/GnQx2BE33L8BOHQkI=
golang.org/x/exp v0.0.0-20250506013437-ce4c2cf36ca6/go.mod h1:U6Lno4MTRCDY+Ba7aCcauB9T60gsv5s4ralQzP72ZoQ=
golang.org/x/net v0.38.0 h1:vRMAPTMaeGqVhG5QyLJHqNDwecKTomGeqbnfZyKlBI8=
golang.org/x/net v0.38.0/go.mod h1:ivrbrMbzFq5J41QOQh0siUuly180yBYtLp+CKbEaFx8=
golang.org/x/sync v0.14.0 h1:woo0S4Yywslg6hp4eUFjTVOyKt0RookbpAHG4c1HmhQ=
golang.org/x/sync v0.14.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA=
golang.org/x/sys v0.37.0 h1:fdNQudmxPjkdUTPnLn5mdQv7Zwvbvpaxqs831goi9kQ=
golang.org/x/sys v0.37.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks=
golang.org/x/text v0.23.0 h1:D71I7dUrlY+VX0gQShAThNGHFxZ13dGLBHQLVl1mJlY=
golang.org/x/text v0.23.0/go.mod h1:/BLNzu4aZCJ1+kcD0DNRotWKage4q2rGVAg4o22unh4=
google.golang.org/genproto/googleapis/api v0.0.0-20240826202546-f6391c0de4c7 h1:YcyjlL1PRr2Q17/I0dPk2JmYS5CDXfcdb2Z3YRioEbw=
google.golang.org/genproto/googleapis/api v0.0.0-20240826202546-f6391c0de4c7/go.mod h1:OCdP9MfskevB/rbYvHTsXTtKC+3bHWajPdoKgjcYkfo=
google.golang.org/genproto/googleapis/rpc v0.0.0-20240826202546-f6391c0de4c7 h1:2035KHhUv+EpyB+hWgJnaWKJOdX1E95w2S8Rr4uWKTs=
google.golang.org/genproto/googleapis/rpc v0.0.0-20240826202546-f6391c0de4c7/go.mod h1:UqMtugtsSgubUsoxbuAoiCXvqvErP7Gf0so0mK9tHxU=
google.golang.org/grpc v1.65.0 h1:bs/cUb4lp1G5iImFFd3u5ixQzweKizoZJAwBNLR42lc=
google.golang.org/grpc v1.65.0/go.mod h1:WgYC2ypjlB0EiQi6wdKixMqukr6lBc0Vo+oOgjrM5ZQ=
google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg=
google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
================================================
FILE: _examples/04_timeout/grpc/federation/federation.pb.go
================================================
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.33.0
// protoc (unknown)
// source: grpc/federation/federation.proto
package federation
import (
_ "github.com/mercari/grpc-federation/grpc/federation/cel"
code "google.golang.org/genproto/googleapis/rpc/code"
errdetails "google.golang.org/genproto/googleapis/rpc/errdetails"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
descriptorpb "google.golang.org/protobuf/types/descriptorpb"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
// TypeKind is primitive kind list.
type TypeKind int32
const (
// UNKNOWN represents unexpected value.
TypeKind_UNKNOWN TypeKind = 0
// STRING is used to convert the input value to `string` type.
TypeKind_STRING TypeKind = 1
// BOOL is used to convert the input value to `bool` type.
TypeKind_BOOL TypeKind = 2
// INT64 is used to convert the input value to `int64` type.
TypeKind_INT64 TypeKind = 3
// UINT64 is used to convert the input value to `uint64` type.
TypeKind_UINT64 TypeKind = 4
// DOUBLE is used to convert the input value to `double` type.
TypeKind_DOUBLE TypeKind = 5
// DURATION is used to convert the input value to the `google.protobuf.Duration` type.
TypeKind_DURATION TypeKind = 6
)
// Enum value maps for TypeKind.
var (
TypeKind_name = map[int32]string{
0: "UNKNOWN",
1: "STRING",
2: "BOOL",
3: "INT64",
4: "UINT64",
5: "DOUBLE",
6: "DURATION",
}
TypeKind_value = map[string]int32{
"UNKNOWN": 0,
"STRING": 1,
"BOOL": 2,
"INT64": 3,
"UINT64": 4,
"DOUBLE": 5,
"DURATION": 6,
}
)
func (x TypeKind) Enum() *TypeKind {
p := new(TypeKind)
*p = x
return p
}
func (x TypeKind) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (TypeKind) Descriptor() protoreflect.EnumDescriptor {
return file_grpc_federation_federation_proto_enumTypes[0].Descriptor()
}
func (TypeKind) Type() protoreflect.EnumType {
return &file_grpc_federation_federation_proto_enumTypes[0]
}
func (x TypeKind) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use TypeKind.Descriptor instead.
func (TypeKind) EnumDescriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{0}
}
// LogLevel is the importance or severity of a log event.
type GRPCError_LogLevel int32
const (
// UNKNOWN represents unexpected value.
GRPCError_UNKNOWN GRPCError_LogLevel = 0
// DEBUG is used for detailed information that is useful during development and debugging.
GRPCError_DEBUG GRPCError_LogLevel = 1
// INFO logs are used to provide information about the normal functioning of the application.
GRPCError_INFO GRPCError_LogLevel = 2
// WARN signifies a potential problem or warning that does not necessarily stop the program from working but may lead to issues in the future.
GRPCError_WARN GRPCError_LogLevel = 3
// ERROR indicates a serious issue that has caused a failure in the application.
GRPCError_ERROR GRPCError_LogLevel = 4
)
// Enum value maps for GRPCError_LogLevel.
var (
GRPCError_LogLevel_name = map[int32]string{
0: "UNKNOWN",
1: "DEBUG",
2: "INFO",
3: "WARN",
4: "ERROR",
}
GRPCError_LogLevel_value = map[string]int32{
"UNKNOWN": 0,
"DEBUG": 1,
"INFO": 2,
"WARN": 3,
"ERROR": 4,
}
)
func (x GRPCError_LogLevel) Enum() *GRPCError_LogLevel {
p := new(GRPCError_LogLevel)
*p = x
return p
}
func (x GRPCError_LogLevel) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (GRPCError_LogLevel) Descriptor() protoreflect.EnumDescriptor {
return file_grpc_federation_federation_proto_enumTypes[1].Descriptor()
}
func (GRPCError_LogLevel) Type() protoreflect.EnumType {
return &file_grpc_federation_federation_proto_enumTypes[1]
}
func (x GRPCError_LogLevel) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use GRPCError_LogLevel.Descriptor instead.
func (GRPCError_LogLevel) EnumDescriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{24, 0}
}
type FileRule struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Plugin *CELPlugin `protobuf:"bytes,1,opt,name=plugin,proto3" json:"plugin,omitempty"`
// import can be used to resolve methods, messages, etc. that are referenced in gRPC Federation rules.
Import []string `protobuf:"bytes,2,rep,name=import,proto3" json:"import,omitempty"`
}
func (x *FileRule) Reset() {
*x = FileRule{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *FileRule) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*FileRule) ProtoMessage() {}
func (x *FileRule) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use FileRule.ProtoReflect.Descriptor instead.
func (*FileRule) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{0}
}
func (x *FileRule) GetPlugin() *CELPlugin {
if x != nil {
return x.Plugin
}
return nil
}
func (x *FileRule) GetImport() []string {
if x != nil {
return x.Import
}
return nil
}
type EnumRule struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// alias mapping between enums defined in other packages and enums defined on the federation service side.
// The alias is the FQDN ( . ) to the enum.
// If this definition exists, type conversion is automatically performed before the enum value assignment operation.
// If a enum with this option has a value that is not present in the enum specified by alias, and the alias option is not specified for that value, an error is occurred.
// You can specify multiple aliases. In that case, only values common to all aliases will be considered.
// Specifying a value that is not included in either alias will result in an error.
Alias []string `protobuf:"bytes,1,rep,name=alias,proto3" json:"alias,omitempty"`
}
func (x *EnumRule) Reset() {
*x = EnumRule{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *EnumRule) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*EnumRule) ProtoMessage() {}
func (x *EnumRule) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use EnumRule.ProtoReflect.Descriptor instead.
func (*EnumRule) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{1}
}
func (x *EnumRule) GetAlias() []string {
if x != nil {
return x.Alias
}
return nil
}
type EnumValueRule struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// specifies the default value of the enum.
// All values other than those specified in alias will be default values.
Default *bool `protobuf:"varint,1,opt,name=default,proto3,oneof" json:"default,omitempty"`
// alias can be used when alias is specified in grpc.federation.enum option,
// and specifies the value name to be referenced among the enums specified in alias of enum option.
// multiple value names can be specified for alias.
Alias []string `protobuf:"bytes,2,rep,name=alias,proto3" json:"alias,omitempty"`
// attr is used to hold multiple name-value pairs corresponding to an enum value.
// The values specified by the name must be consistently specified for all enum values.
// The values stored using this feature can be retrieved using the `attr()` method of the enum API.
Attr []*EnumValueAttribute `protobuf:"bytes,3,rep,name=attr,proto3" json:"attr,omitempty"`
// noalias exclude from the target of alias.
// This option cannot be specified simultaneously with `default` or `alias`.
Noalias *bool `protobuf:"varint,4,opt,name=noalias,proto3,oneof" json:"noalias,omitempty"`
}
func (x *EnumValueRule) Reset() {
*x = EnumValueRule{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *EnumValueRule) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*EnumValueRule) ProtoMessage() {}
func (x *EnumValueRule) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use EnumValueRule.ProtoReflect.Descriptor instead.
func (*EnumValueRule) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{2}
}
func (x *EnumValueRule) GetDefault() bool {
if x != nil && x.Default != nil {
return *x.Default
}
return false
}
func (x *EnumValueRule) GetAlias() []string {
if x != nil {
return x.Alias
}
return nil
}
func (x *EnumValueRule) GetAttr() []*EnumValueAttribute {
if x != nil {
return x.Attr
}
return nil
}
func (x *EnumValueRule) GetNoalias() bool {
if x != nil && x.Noalias != nil {
return *x.Noalias
}
return false
}
type EnumValueAttribute struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// name is the attribute key.
// This value is used to search for values using the `attr()` method.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// value represents the value corresponding to `name`.
Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
}
func (x *EnumValueAttribute) Reset() {
*x = EnumValueAttribute{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *EnumValueAttribute) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*EnumValueAttribute) ProtoMessage() {}
func (x *EnumValueAttribute) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[3]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use EnumValueAttribute.ProtoReflect.Descriptor instead.
func (*EnumValueAttribute) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{3}
}
func (x *EnumValueAttribute) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *EnumValueAttribute) GetValue() string {
if x != nil {
return x.Value
}
return ""
}
type OneofRule struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
}
func (x *OneofRule) Reset() {
*x = OneofRule{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *OneofRule) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*OneofRule) ProtoMessage() {}
func (x *OneofRule) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[4]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use OneofRule.ProtoReflect.Descriptor instead.
func (*OneofRule) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{4}
}
// ServiceRule define gRPC Federation rules for the service.
type ServiceRule struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// env defines the environment variable.
Env *Env `protobuf:"bytes,1,opt,name=env,proto3" json:"env,omitempty"`
// var defines the service-level variables.
Var []*ServiceVariable `protobuf:"bytes,2,rep,name=var,proto3" json:"var,omitempty"`
}
func (x *ServiceRule) Reset() {
*x = ServiceRule{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[5]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ServiceRule) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ServiceRule) ProtoMessage() {}
func (x *ServiceRule) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[5]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ServiceRule.ProtoReflect.Descriptor instead.
func (*ServiceRule) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{5}
}
func (x *ServiceRule) GetEnv() *Env {
if x != nil {
return x.Env
}
return nil
}
func (x *ServiceRule) GetVar() []*ServiceVariable {
if x != nil {
return x.Var
}
return nil
}
// Env is used when setting environment variables.
// There are two ways to configure it.
type Env struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// var is used to directly list environment variables.
Var []*EnvVar `protobuf:"bytes,1,rep,name=var,proto3" json:"var,omitempty"`
// message is used to reference an already defined Protocol Buffers' message for defining environment variables.
// If you want to set detailed options for the fields of the message, use the `env` option in FieldRule.
Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
}
func (x *Env) Reset() {
*x = Env{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[6]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Env) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Env) ProtoMessage() {}
func (x *Env) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[6]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Env.ProtoReflect.Descriptor instead.
func (*Env) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{6}
}
func (x *Env) GetVar() []*EnvVar {
if x != nil {
return x.Var
}
return nil
}
func (x *Env) GetMessage() string {
if x != nil {
return x.Message
}
return ""
}
// ServiceVariable define variables at the service level.
// This definition is executed at server startup, after the initialization of Env.
// The defined variables can be used across all messages that the service depends on.
type ServiceVariable struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// name is a variable name.
// This name can be referenced in all CELs related to the service by using `grpc.federation.var.` prefix.
Name *string `protobuf:"bytes,1,opt,name=name,proto3,oneof" json:"name,omitempty"`
// if specify the condition for evaluating expr.
// this value evaluated by CEL and it must return a boolean value.
// If the result of evaluation is `false`, the value assigned to name is the default value of the result of evaluation of `expr`.
If *string `protobuf:"bytes,2,opt,name=if,proto3,oneof" json:"if,omitempty"`
// expr specify the value to be assigned to name.
//
// Types that are assignable to Expr:
//
// *ServiceVariable_By
// *ServiceVariable_Map
// *ServiceVariable_Message
// *ServiceVariable_Validation
// *ServiceVariable_Enum
// *ServiceVariable_Switch
Expr isServiceVariable_Expr `protobuf_oneof:"expr"`
}
func (x *ServiceVariable) Reset() {
*x = ServiceVariable{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[7]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ServiceVariable) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ServiceVariable) ProtoMessage() {}
func (x *ServiceVariable) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[7]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ServiceVariable.ProtoReflect.Descriptor instead.
func (*ServiceVariable) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{7}
}
func (x *ServiceVariable) GetName() string {
if x != nil && x.Name != nil {
return *x.Name
}
return ""
}
func (x *ServiceVariable) GetIf() string {
if x != nil && x.If != nil {
return *x.If
}
return ""
}
func (m *ServiceVariable) GetExpr() isServiceVariable_Expr {
if m != nil {
return m.Expr
}
return nil
}
func (x *ServiceVariable) GetBy() string {
if x, ok := x.GetExpr().(*ServiceVariable_By); ok {
return x.By
}
return ""
}
func (x *ServiceVariable) GetMap() *MapExpr {
if x, ok := x.GetExpr().(*ServiceVariable_Map); ok {
return x.Map
}
return nil
}
func (x *ServiceVariable) GetMessage() *MessageExpr {
if x, ok := x.GetExpr().(*ServiceVariable_Message); ok {
return x.Message
}
return nil
}
func (x *ServiceVariable) GetValidation() *ServiceVariableValidationExpr {
if x, ok := x.GetExpr().(*ServiceVariable_Validation); ok {
return x.Validation
}
return nil
}
func (x *ServiceVariable) GetEnum() *EnumExpr {
if x, ok := x.GetExpr().(*ServiceVariable_Enum); ok {
return x.Enum
}
return nil
}
func (x *ServiceVariable) GetSwitch() *SwitchExpr {
if x, ok := x.GetExpr().(*ServiceVariable_Switch); ok {
return x.Switch
}
return nil
}
type isServiceVariable_Expr interface {
isServiceVariable_Expr()
}
type ServiceVariable_By struct {
// `by` evaluates with CEL.
By string `protobuf:"bytes,11,opt,name=by,proto3,oneof"`
}
type ServiceVariable_Map struct {
// map apply map operation for the specified repeated type.
Map *MapExpr `protobuf:"bytes,12,opt,name=map,proto3,oneof"`
}
type ServiceVariable_Message struct {
// message gets with message arguments.
Message *MessageExpr `protobuf:"bytes,13,opt,name=message,proto3,oneof"`
}
type ServiceVariable_Validation struct {
// validation defines the validation rule and message.
Validation *ServiceVariableValidationExpr `protobuf:"bytes,14,opt,name=validation,proto3,oneof"`
}
type ServiceVariable_Enum struct {
// enum gets with cel value.
Enum *EnumExpr `protobuf:"bytes,15,opt,name=enum,proto3,oneof"`
}
type ServiceVariable_Switch struct {
// switch provides conditional evaluation with multiple branches.
Switch *SwitchExpr `protobuf:"bytes,16,opt,name=switch,proto3,oneof"`
}
func (*ServiceVariable_By) isServiceVariable_Expr() {}
func (*ServiceVariable_Map) isServiceVariable_Expr() {}
func (*ServiceVariable_Message) isServiceVariable_Expr() {}
func (*ServiceVariable_Validation) isServiceVariable_Expr() {}
func (*ServiceVariable_Enum) isServiceVariable_Expr() {}
func (*ServiceVariable_Switch) isServiceVariable_Expr() {}
// ServiceVariableValidationExpr represents validation rule and error message.
type ServiceVariableValidationExpr struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// if specifies condition in CEL. If the condition is true, it returns error.
// The return value must always be of type boolean.
If string `protobuf:"bytes,1,opt,name=if,proto3" json:"if,omitempty"`
// message is a error message in CEL.
Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
}
func (x *ServiceVariableValidationExpr) Reset() {
*x = ServiceVariableValidationExpr{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[8]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ServiceVariableValidationExpr) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ServiceVariableValidationExpr) ProtoMessage() {}
func (x *ServiceVariableValidationExpr) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[8]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ServiceVariableValidationExpr.ProtoReflect.Descriptor instead.
func (*ServiceVariableValidationExpr) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{8}
}
func (x *ServiceVariableValidationExpr) GetIf() string {
if x != nil {
return x.If
}
return ""
}
func (x *ServiceVariableValidationExpr) GetMessage() string {
if x != nil {
return x.Message
}
return ""
}
// EnvVar represents an environment variable.
type EnvVar struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// name is an environment variable name.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// type is an environment variable type.
Type *EnvType `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"`
// option is an additional option for parsing environment variable.
Option *EnvVarOption `protobuf:"bytes,3,opt,name=option,proto3,oneof" json:"option,omitempty"`
}
func (x *EnvVar) Reset() {
*x = EnvVar{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[9]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *EnvVar) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*EnvVar) ProtoMessage() {}
func (x *EnvVar) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[9]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use EnvVar.ProtoReflect.Descriptor instead.
func (*EnvVar) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{9}
}
func (x *EnvVar) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *EnvVar) GetType() *EnvType {
if x != nil {
return x.Type
}
return nil
}
func (x *EnvVar) GetOption() *EnvVarOption {
if x != nil {
return x.Option
}
return nil
}
// EnvType represents type information for environment variable.
type EnvType struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Types that are assignable to Type:
//
// *EnvType_Kind
// *EnvType_Repeated
// *EnvType_Map
Type isEnvType_Type `protobuf_oneof:"type"`
}
func (x *EnvType) Reset() {
*x = EnvType{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[10]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *EnvType) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*EnvType) ProtoMessage() {}
func (x *EnvType) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[10]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use EnvType.ProtoReflect.Descriptor instead.
func (*EnvType) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{10}
}
func (m *EnvType) GetType() isEnvType_Type {
if m != nil {
return m.Type
}
return nil
}
func (x *EnvType) GetKind() TypeKind {
if x, ok := x.GetType().(*EnvType_Kind); ok {
return x.Kind
}
return TypeKind_UNKNOWN
}
func (x *EnvType) GetRepeated() *EnvType {
if x, ok := x.GetType().(*EnvType_Repeated); ok {
return x.Repeated
}
return nil
}
func (x *EnvType) GetMap() *EnvMapType {
if x, ok := x.GetType().(*EnvType_Map); ok {
return x.Map
}
return nil
}
type isEnvType_Type interface {
isEnvType_Type()
}
type EnvType_Kind struct {
// kind is used when the type is a primitive type.
Kind TypeKind `protobuf:"varint,1,opt,name=kind,proto3,enum=grpc.federation.TypeKind,oneof"`
}
type EnvType_Repeated struct {
// repeated is used when the type is a repeated type.
Repeated *EnvType `protobuf:"bytes,2,opt,name=repeated,proto3,oneof"`
}
type EnvType_Map struct {
// map is used when the type is a map type.
Map *EnvMapType `protobuf:"bytes,3,opt,name=map,proto3,oneof"`
}
func (*EnvType_Kind) isEnvType_Type() {}
func (*EnvType_Repeated) isEnvType_Type() {}
func (*EnvType_Map) isEnvType_Type() {}
// EnvMapType represents map type.
type EnvMapType struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// key represents map's key type.
Key *EnvType `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
// value represents map's value type.
Value *EnvType `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
}
func (x *EnvMapType) Reset() {
*x = EnvMapType{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[11]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *EnvMapType) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*EnvMapType) ProtoMessage() {}
func (x *EnvMapType) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[11]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use EnvMapType.ProtoReflect.Descriptor instead.
func (*EnvMapType) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{11}
}
func (x *EnvMapType) GetKey() *EnvType {
if x != nil {
return x.Key
}
return nil
}
func (x *EnvMapType) GetValue() *EnvType {
if x != nil {
return x.Value
}
return nil
}
// EnvVarOption represents additional option for environment variable.
// The option work with the `envconfig` library in Go language.
// For detailed specifications, please refer to the library's documentation ( https://pkg.go.dev/github.com/kelseyhightower/envconfig#section-readme ).
type EnvVarOption struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// alternate use this option if you want to use an environment variable with a different name than the value specified in `EnvVar.name`.
Alternate *string `protobuf:"bytes,1,opt,name=alternate,proto3,oneof" json:"alternate,omitempty"`
// default specify the value to use as a fallback if the specified environment variable is not found.
Default *string `protobuf:"bytes,2,opt,name=default,proto3,oneof" json:"default,omitempty"`
// required require the environment variable to exist.
// If it does not exist, an error will occur at startup.
Required *bool `protobuf:"varint,3,opt,name=required,proto3,oneof" json:"required,omitempty"`
// ignored if ignored is true, it does nothing even if the environment variable exists.
Ignored *bool `protobuf:"varint,4,opt,name=ignored,proto3,oneof" json:"ignored,omitempty"`
}
func (x *EnvVarOption) Reset() {
*x = EnvVarOption{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[12]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *EnvVarOption) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*EnvVarOption) ProtoMessage() {}
func (x *EnvVarOption) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[12]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use EnvVarOption.ProtoReflect.Descriptor instead.
func (*EnvVarOption) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{12}
}
func (x *EnvVarOption) GetAlternate() string {
if x != nil && x.Alternate != nil {
return *x.Alternate
}
return ""
}
func (x *EnvVarOption) GetDefault() string {
if x != nil && x.Default != nil {
return *x.Default
}
return ""
}
func (x *EnvVarOption) GetRequired() bool {
if x != nil && x.Required != nil {
return *x.Required
}
return false
}
func (x *EnvVarOption) GetIgnored() bool {
if x != nil && x.Ignored != nil {
return *x.Ignored
}
return false
}
type MethodRule struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// the time to timeout. If the specified time period elapses, DEADLINE_EXCEEDED status is returned.
// If you want to handle this error, you need to implement a custom error handler in Go.
// The format is the same as Go's time.Duration format. See https://pkg.go.dev/time#ParseDuration.
Timeout *string `protobuf:"bytes,1,opt,name=timeout,proto3,oneof" json:"timeout,omitempty"`
// response specify the name of the message you want to use to create the response value.
// If you specify a reserved type like `google.protobuf.Empty` as the response, you cannot define gRPC Federation options.
// In such cases, you can specify a separate message to create the response value.
// The specified response message must contain fields with the same names and types as all the fields in the original response.
Response *string `protobuf:"bytes,2,opt,name=response,proto3,oneof" json:"response,omitempty"`
}
func (x *MethodRule) Reset() {
*x = MethodRule{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[13]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *MethodRule) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*MethodRule) ProtoMessage() {}
func (x *MethodRule) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[13]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use MethodRule.ProtoReflect.Descriptor instead.
func (*MethodRule) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{13}
}
func (x *MethodRule) GetTimeout() string {
if x != nil && x.Timeout != nil {
return *x.Timeout
}
return ""
}
func (x *MethodRule) GetResponse() string {
if x != nil && x.Response != nil {
return *x.Response
}
return ""
}
// MessageRule define gRPC Federation rules for the message.
type MessageRule struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// def specify variables to be used in field binding by `grpc.federation.field` option.
Def []*VariableDefinition `protobuf:"bytes,1,rep,name=def,proto3" json:"def,omitempty"`
// if custom_resolver is true, the resolver for this message is implemented by Go.
// If there are any values retrieved by resolver or messages, they are passed as arguments for custom resolver.
// Each field of the message returned by the custom resolver is automatically bound.
// If you want to change the binding process for a particular field, set `custom_resolver=true` option for that field.
CustomResolver *bool `protobuf:"varint,2,opt,name=custom_resolver,json=customResolver,proto3,oneof" json:"custom_resolver,omitempty"`
// alias mapping between messages defined in other packages and messages defined on the federation service side.
// The alias is the FQDN ( . ) to the message.
// If this definition exists, type conversion is automatically performed before the field assignment operation.
// If a message with this option has a field that is not present in the message specified by alias, and the alias option is not specified for that field, an error is occurred.
// You can specify multiple aliases. In that case, only fields common to all aliases will be considered.
// Specifying a field that is not included in either alias will result in an error.
Alias []string `protobuf:"bytes,3,rep,name=alias,proto3" json:"alias,omitempty"`
}
func (x *MessageRule) Reset() {
*x = MessageRule{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[14]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *MessageRule) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*MessageRule) ProtoMessage() {}
func (x *MessageRule) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[14]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use MessageRule.ProtoReflect.Descriptor instead.
func (*MessageRule) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{14}
}
func (x *MessageRule) GetDef() []*VariableDefinition {
if x != nil {
return x.Def
}
return nil
}
func (x *MessageRule) GetCustomResolver() bool {
if x != nil && x.CustomResolver != nil {
return *x.CustomResolver
}
return false
}
func (x *MessageRule) GetAlias() []string {
if x != nil {
return x.Alias
}
return nil
}
// VariableDefinition represents variable definition.
type VariableDefinition struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// name is a variable name.
// This name can be referenced in all CELs defined after itself in the same message.
// It can also be referenced in `grpc.federation.field` option.
Name *string `protobuf:"bytes,1,opt,name=name,proto3,oneof" json:"name,omitempty"`
// if specify the condition for evaluating expr.
// this value evaluated by CEL and it must return a boolean value.
// If the result of evaluation is `false`, the value assigned to name is the default value of the result of evaluation of `expr`.
If *string `protobuf:"bytes,2,opt,name=if,proto3,oneof" json:"if,omitempty"`
// autobind if the result value of `expr` is a message type,
// the value of a field with the same name and type as the field name of its own message is automatically assigned to the value of the field in the message.
// If multiple autobinds are used at the same message,
// you must explicitly use the `grpc.federation.field` option to do the binding yourself, since duplicate field names cannot be correctly determined as one.
Autobind *bool `protobuf:"varint,3,opt,name=autobind,proto3,oneof" json:"autobind,omitempty"`
// expr specify the value to be assigned to name.
//
// Types that are assignable to Expr:
//
// *VariableDefinition_By
// *VariableDefinition_Map
// *VariableDefinition_Message
// *VariableDefinition_Call
// *VariableDefinition_Validation
// *VariableDefinition_Enum
// *VariableDefinition_Switch
Expr isVariableDefinition_Expr `protobuf_oneof:"expr"`
}
func (x *VariableDefinition) Reset() {
*x = VariableDefinition{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[15]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *VariableDefinition) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*VariableDefinition) ProtoMessage() {}
func (x *VariableDefinition) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[15]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use VariableDefinition.ProtoReflect.Descriptor instead.
func (*VariableDefinition) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{15}
}
func (x *VariableDefinition) GetName() string {
if x != nil && x.Name != nil {
return *x.Name
}
return ""
}
func (x *VariableDefinition) GetIf() string {
if x != nil && x.If != nil {
return *x.If
}
return ""
}
func (x *VariableDefinition) GetAutobind() bool {
if x != nil && x.Autobind != nil {
return *x.Autobind
}
return false
}
func (m *VariableDefinition) GetExpr() isVariableDefinition_Expr {
if m != nil {
return m.Expr
}
return nil
}
func (x *VariableDefinition) GetBy() string {
if x, ok := x.GetExpr().(*VariableDefinition_By); ok {
return x.By
}
return ""
}
func (x *VariableDefinition) GetMap() *MapExpr {
if x, ok := x.GetExpr().(*VariableDefinition_Map); ok {
return x.Map
}
return nil
}
func (x *VariableDefinition) GetMessage() *MessageExpr {
if x, ok := x.GetExpr().(*VariableDefinition_Message); ok {
return x.Message
}
return nil
}
func (x *VariableDefinition) GetCall() *CallExpr {
if x, ok := x.GetExpr().(*VariableDefinition_Call); ok {
return x.Call
}
return nil
}
func (x *VariableDefinition) GetValidation() *ValidationExpr {
if x, ok := x.GetExpr().(*VariableDefinition_Validation); ok {
return x.Validation
}
return nil
}
func (x *VariableDefinition) GetEnum() *EnumExpr {
if x, ok := x.GetExpr().(*VariableDefinition_Enum); ok {
return x.Enum
}
return nil
}
func (x *VariableDefinition) GetSwitch() *SwitchExpr {
if x, ok := x.GetExpr().(*VariableDefinition_Switch); ok {
return x.Switch
}
return nil
}
type isVariableDefinition_Expr interface {
isVariableDefinition_Expr()
}
type VariableDefinition_By struct {
// `by` evaluates with CEL.
By string `protobuf:"bytes,11,opt,name=by,proto3,oneof"`
}
type VariableDefinition_Map struct {
// map apply map operation for the specified repeated type.
Map *MapExpr `protobuf:"bytes,12,opt,name=map,proto3,oneof"`
}
type VariableDefinition_Message struct {
// message gets with message arguments.
Message *MessageExpr `protobuf:"bytes,13,opt,name=message,proto3,oneof"`
}
type VariableDefinition_Call struct {
// call specifies how to call gRPC method.
Call *CallExpr `protobuf:"bytes,14,opt,name=call,proto3,oneof"`
}
type VariableDefinition_Validation struct {
// validation defines the validation rule and error.
Validation *ValidationExpr `protobuf:"bytes,15,opt,name=validation,proto3,oneof"`
}
type VariableDefinition_Enum struct {
// enum gets with cel value.
Enum *EnumExpr `protobuf:"bytes,16,opt,name=enum,proto3,oneof"`
}
type VariableDefinition_Switch struct {
// switch provides conditional evaluation with multiple branches.
Switch *SwitchExpr `protobuf:"bytes,17,opt,name=switch,proto3,oneof"`
}
func (*VariableDefinition_By) isVariableDefinition_Expr() {}
func (*VariableDefinition_Map) isVariableDefinition_Expr() {}
func (*VariableDefinition_Message) isVariableDefinition_Expr() {}
func (*VariableDefinition_Call) isVariableDefinition_Expr() {}
func (*VariableDefinition_Validation) isVariableDefinition_Expr() {}
func (*VariableDefinition_Enum) isVariableDefinition_Expr() {}
func (*VariableDefinition_Switch) isVariableDefinition_Expr() {}
// MapExpr apply map operation for the specified repeated type.
type MapExpr struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// iterator define iterator variable.
// When evaluating CEL in `expr`, we can refer to the name defined in iterator.
Iterator *Iterator `protobuf:"bytes,1,opt,name=iterator,proto3" json:"iterator,omitempty"`
// expr creates map elements using iterator variable.
//
// Types that are assignable to Expr:
//
// *MapExpr_By
// *MapExpr_Message
// *MapExpr_Enum
Expr isMapExpr_Expr `protobuf_oneof:"expr"`
}
func (x *MapExpr) Reset() {
*x = MapExpr{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[16]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *MapExpr) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*MapExpr) ProtoMessage() {}
func (x *MapExpr) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[16]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use MapExpr.ProtoReflect.Descriptor instead.
func (*MapExpr) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{16}
}
func (x *MapExpr) GetIterator() *Iterator {
if x != nil {
return x.Iterator
}
return nil
}
func (m *MapExpr) GetExpr() isMapExpr_Expr {
if m != nil {
return m.Expr
}
return nil
}
func (x *MapExpr) GetBy() string {
if x, ok := x.GetExpr().(*MapExpr_By); ok {
return x.By
}
return ""
}
func (x *MapExpr) GetMessage() *MessageExpr {
if x, ok := x.GetExpr().(*MapExpr_Message); ok {
return x.Message
}
return nil
}
func (x *MapExpr) GetEnum() *EnumExpr {
if x, ok := x.GetExpr().(*MapExpr_Enum); ok {
return x.Enum
}
return nil
}
type isMapExpr_Expr interface {
isMapExpr_Expr()
}
type MapExpr_By struct {
// `by` evaluates with CEL.
// this can refer to the variable declared by `iterator`.
By string `protobuf:"bytes,11,opt,name=by,proto3,oneof"`
}
type MapExpr_Message struct {
// message gets with message arguments, and it is made an element of the map.
// The result type of MapExpr is the repeated type of the specified message.
Message *MessageExpr `protobuf:"bytes,12,opt,name=message,proto3,oneof"`
}
type MapExpr_Enum struct {
// enum creates enum value for each element of the map.
// The result type of MapExpr is the repeated type of the specified enum.
Enum *EnumExpr `protobuf:"bytes,13,opt,name=enum,proto3,oneof"`
}
func (*MapExpr_By) isMapExpr_Expr() {}
func (*MapExpr_Message) isMapExpr_Expr() {}
func (*MapExpr_Enum) isMapExpr_Expr() {}
// Iterator represents iterator variable.
type Iterator struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// variable name.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// src the value that will be the source for creating the iterator.
// src must be a repeated type.
Src string `protobuf:"bytes,2,opt,name=src,proto3" json:"src,omitempty"`
}
func (x *Iterator) Reset() {
*x = Iterator{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[17]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Iterator) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Iterator) ProtoMessage() {}
func (x *Iterator) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[17]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Iterator.ProtoReflect.Descriptor instead.
func (*Iterator) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{17}
}
func (x *Iterator) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *Iterator) GetSrc() string {
if x != nil {
return x.Src
}
return ""
}
// MessageExpr represents dependent message.
type MessageExpr struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// name specify the message name by FQDN. format is `.`.
// can be omitted when referring to messages in the same package.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// args specify the parameters needed to get the message. This is called the "message arguments".
Args []*Argument `protobuf:"bytes,2,rep,name=args,proto3" json:"args,omitempty"`
}
func (x *MessageExpr) Reset() {
*x = MessageExpr{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[18]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *MessageExpr) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*MessageExpr) ProtoMessage() {}
func (x *MessageExpr) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[18]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use MessageExpr.ProtoReflect.Descriptor instead.
func (*MessageExpr) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{18}
}
func (x *MessageExpr) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *MessageExpr) GetArgs() []*Argument {
if x != nil {
return x.Args
}
return nil
}
// EnumExpr represents dependent enum.
type EnumExpr struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// name specify the enum name by FQDN. format is `.`.
// can be omitted when referring to enum in the same package.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// `by` evaluates with CEL.
By string `protobuf:"bytes,2,opt,name=by,proto3" json:"by,omitempty"`
}
func (x *EnumExpr) Reset() {
*x = EnumExpr{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[19]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *EnumExpr) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*EnumExpr) ProtoMessage() {}
func (x *EnumExpr) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[19]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use EnumExpr.ProtoReflect.Descriptor instead.
func (*EnumExpr) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{19}
}
func (x *EnumExpr) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *EnumExpr) GetBy() string {
if x != nil {
return x.By
}
return ""
}
// CallExpr represents how to call gRPC method.
type CallExpr struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// method specify the FQDN for the gRPC method. format is `./`.
Method string `protobuf:"bytes,1,opt,name=method,proto3" json:"method,omitempty"`
// request specify request parameters for the gRPC method.
Request []*MethodRequest `protobuf:"bytes,2,rep,name=request,proto3" json:"request,omitempty"`
// the time to timeout. If the specified time period elapses, DEADLINE_EXCEEDED status is returned.
// If you want to handle this error, you need to implement a custom error handler in Go.
// The format is the same as Go's time.Duration format. See https://pkg.go.dev/time#ParseDuration.
Timeout *string `protobuf:"bytes,3,opt,name=timeout,proto3,oneof" json:"timeout,omitempty"`
// retry specifies the retry policy if the method call fails.
Retry *RetryPolicy `protobuf:"bytes,4,opt,name=retry,proto3,oneof" json:"retry,omitempty"`
// error evaluated when an error occurs during a method call.
// Multiple errors can be defined and are evaluated in the order in which they are described.
// If an error occurs while creating an gRPC status error, original error will be returned.
Error []*GRPCError `protobuf:"bytes,5,rep,name=error,proto3" json:"error,omitempty"`
// option is the gRPC's call option (https://pkg.go.dev/google.golang.org/grpc#CallOption).
Option *GRPCCallOption `protobuf:"bytes,6,opt,name=option,proto3,oneof" json:"option,omitempty"`
// metadata specify outgoing metadata with CEL value.
// The specified type must always be of type map.
Metadata *string `protobuf:"bytes,7,opt,name=metadata,proto3,oneof" json:"metadata,omitempty"`
}
func (x *CallExpr) Reset() {
*x = CallExpr{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[20]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *CallExpr) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CallExpr) ProtoMessage() {}
func (x *CallExpr) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[20]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use CallExpr.ProtoReflect.Descriptor instead.
func (*CallExpr) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{20}
}
func (x *CallExpr) GetMethod() string {
if x != nil {
return x.Method
}
return ""
}
func (x *CallExpr) GetRequest() []*MethodRequest {
if x != nil {
return x.Request
}
return nil
}
func (x *CallExpr) GetTimeout() string {
if x != nil && x.Timeout != nil {
return *x.Timeout
}
return ""
}
func (x *CallExpr) GetRetry() *RetryPolicy {
if x != nil {
return x.Retry
}
return nil
}
func (x *CallExpr) GetError() []*GRPCError {
if x != nil {
return x.Error
}
return nil
}
func (x *CallExpr) GetOption() *GRPCCallOption {
if x != nil {
return x.Option
}
return nil
}
func (x *CallExpr) GetMetadata() string {
if x != nil && x.Metadata != nil {
return *x.Metadata
}
return ""
}
// SwitchExpr represents a switch statement. At least one "case", and "default", must be defined. All
// case.if expressions must evaluate to a boolean value. All case.by expressions, and default.by, must
// evaluate to the same type (the return type of the switch).
//
// When executed, the case.if expressions are evaluated in order, and, for the first case whose
// case.if expression evaluates to true, its case.by is evaluated to make the return value of the
// SwitchExpr.
// If no case.if evaluates to true, default.by is evaluated to make the return value.
type SwitchExpr struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Cases for the switch expression.
Case []*SwitchCaseExpr `protobuf:"bytes,1,rep,name=case,proto3" json:"case,omitempty"`
// The default case, if none of the "case.if" expressions evaluate to true.
Default *SwitchDefaultExpr `protobuf:"bytes,2,opt,name=default,proto3" json:"default,omitempty"`
}
func (x *SwitchExpr) Reset() {
*x = SwitchExpr{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[21]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *SwitchExpr) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*SwitchExpr) ProtoMessage() {}
func (x *SwitchExpr) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[21]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use SwitchExpr.ProtoReflect.Descriptor instead.
func (*SwitchExpr) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{21}
}
func (x *SwitchExpr) GetCase() []*SwitchCaseExpr {
if x != nil {
return x.Case
}
return nil
}
func (x *SwitchExpr) GetDefault() *SwitchDefaultExpr {
if x != nil {
return x.Default
}
return nil
}
// SwitchCaseExpr represents a single case for a switch expression.
type SwitchCaseExpr struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// if specify the condition for evaluating expr.
// this value evaluated by CEL and it must return a boolean value.
If string `protobuf:"bytes,1,opt,name=if,proto3" json:"if,omitempty"`
// def define variables in current scope.
Def []*VariableDefinition `protobuf:"bytes,2,rep,name=def,proto3" json:"def,omitempty"`
// expr specify the value to return for the case.
//
// Types that are assignable to Expr:
//
// *SwitchCaseExpr_By
Expr isSwitchCaseExpr_Expr `protobuf_oneof:"expr"`
}
func (x *SwitchCaseExpr) Reset() {
*x = SwitchCaseExpr{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[22]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *SwitchCaseExpr) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*SwitchCaseExpr) ProtoMessage() {}
func (x *SwitchCaseExpr) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[22]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use SwitchCaseExpr.ProtoReflect.Descriptor instead.
func (*SwitchCaseExpr) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{22}
}
func (x *SwitchCaseExpr) GetIf() string {
if x != nil {
return x.If
}
return ""
}
func (x *SwitchCaseExpr) GetDef() []*VariableDefinition {
if x != nil {
return x.Def
}
return nil
}
func (m *SwitchCaseExpr) GetExpr() isSwitchCaseExpr_Expr {
if m != nil {
return m.Expr
}
return nil
}
func (x *SwitchCaseExpr) GetBy() string {
if x, ok := x.GetExpr().(*SwitchCaseExpr_By); ok {
return x.By
}
return ""
}
type isSwitchCaseExpr_Expr interface {
isSwitchCaseExpr_Expr()
}
type SwitchCaseExpr_By struct {
// `by` evaluates with CEL.
By string `protobuf:"bytes,11,opt,name=by,proto3,oneof"`
}
func (*SwitchCaseExpr_By) isSwitchCaseExpr_Expr() {}
// SwitchDefaultExpr represents the default case for a switch expression.
type SwitchDefaultExpr struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// def define variables in current scope.
Def []*VariableDefinition `protobuf:"bytes,1,rep,name=def,proto3" json:"def,omitempty"`
// expr specify the value to return for the default case.
//
// Types that are assignable to Expr:
//
// *SwitchDefaultExpr_By
Expr isSwitchDefaultExpr_Expr `protobuf_oneof:"expr"`
}
func (x *SwitchDefaultExpr) Reset() {
*x = SwitchDefaultExpr{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[23]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *SwitchDefaultExpr) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*SwitchDefaultExpr) ProtoMessage() {}
func (x *SwitchDefaultExpr) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[23]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use SwitchDefaultExpr.ProtoReflect.Descriptor instead.
func (*SwitchDefaultExpr) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{23}
}
func (x *SwitchDefaultExpr) GetDef() []*VariableDefinition {
if x != nil {
return x.Def
}
return nil
}
func (m *SwitchDefaultExpr) GetExpr() isSwitchDefaultExpr_Expr {
if m != nil {
return m.Expr
}
return nil
}
func (x *SwitchDefaultExpr) GetBy() string {
if x, ok := x.GetExpr().(*SwitchDefaultExpr_By); ok {
return x.By
}
return ""
}
type isSwitchDefaultExpr_Expr interface {
isSwitchDefaultExpr_Expr()
}
type SwitchDefaultExpr_By struct {
// `by` evaluates with CEL.
By string `protobuf:"bytes,11,opt,name=by,proto3,oneof"`
}
func (*SwitchDefaultExpr_By) isSwitchDefaultExpr_Expr() {}
// GRPCError create gRPC status value.
type GRPCError struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// def define variables in current scope.
Def []*VariableDefinition `protobuf:"bytes,1,rep,name=def,proto3" json:"def,omitempty"`
// if specifies condition in CEL. If the condition is true, it returns defined error information.
// If this field is omitted, it is always treated as 'true' and returns defined error information.
// The return value must always be of type boolean.
If *string `protobuf:"bytes,2,opt,name=if,proto3,oneof" json:"if,omitempty"`
// code is a gRPC status code.
Code *code.Code `protobuf:"varint,3,opt,name=code,proto3,enum=google.rpc.Code,oneof" json:"code,omitempty"`
// message is a gRPC status message.
// If omitted, the message will be auto-generated from the configurations.
Message *string `protobuf:"bytes,4,opt,name=message,proto3,oneof" json:"message,omitempty"`
// details is a list of error details.
// If returns error, the corresponding error details are set.
Details []*GRPCErrorDetail `protobuf:"bytes,5,rep,name=details,proto3" json:"details,omitempty"`
// ignore ignore the error if the condition in the "if" field is true and "ignore" field is set to true.
// When an error is ignored, the returned response is always null value.
// If you want to return a response that is not null, please use `ignore_and_response` feature.
// Therefore, `ignore` and `ignore_and_response` cannot be specified same.
Ignore *bool `protobuf:"varint,6,opt,name=ignore,proto3,oneof" json:"ignore,omitempty"`
// ignore_and_response ignore the error if the condition in the "if" field is true and it returns response specified in CEL.
// The evaluation value of CEL must always be the same as the response message type.
// `ignore` and `ignore_and_response` cannot be specified same.
IgnoreAndResponse *string `protobuf:"bytes,7,opt,name=ignore_and_response,json=ignoreAndResponse,proto3,oneof" json:"ignore_and_response,omitempty"`
// log_level can be configured to output logs as any log level.
// If DEBUG is specified for the log_level, logs are output as debug logs.
// default value is ERROR.
LogLevel *GRPCError_LogLevel `protobuf:"varint,8,opt,name=log_level,json=logLevel,proto3,enum=grpc.federation.GRPCError_LogLevel,oneof" json:"log_level,omitempty"`
}
func (x *GRPCError) Reset() {
*x = GRPCError{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[24]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GRPCError) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GRPCError) ProtoMessage() {}
func (x *GRPCError) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[24]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GRPCError.ProtoReflect.Descriptor instead.
func (*GRPCError) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{24}
}
func (x *GRPCError) GetDef() []*VariableDefinition {
if x != nil {
return x.Def
}
return nil
}
func (x *GRPCError) GetIf() string {
if x != nil && x.If != nil {
return *x.If
}
return ""
}
func (x *GRPCError) GetCode() code.Code {
if x != nil && x.Code != nil {
return *x.Code
}
return code.Code(0)
}
func (x *GRPCError) GetMessage() string {
if x != nil && x.Message != nil {
return *x.Message
}
return ""
}
func (x *GRPCError) GetDetails() []*GRPCErrorDetail {
if x != nil {
return x.Details
}
return nil
}
func (x *GRPCError) GetIgnore() bool {
if x != nil && x.Ignore != nil {
return *x.Ignore
}
return false
}
func (x *GRPCError) GetIgnoreAndResponse() string {
if x != nil && x.IgnoreAndResponse != nil {
return *x.IgnoreAndResponse
}
return ""
}
func (x *GRPCError) GetLogLevel() GRPCError_LogLevel {
if x != nil && x.LogLevel != nil {
return *x.LogLevel
}
return GRPCError_UNKNOWN
}
type GRPCErrorDetail struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// if specifies condition rule in CEL. If the condition is true, gRPC error detail is added to the error.
If string `protobuf:"bytes,1,opt,name=if,proto3" json:"if,omitempty"`
// def define variables in current scope.
Def []*VariableDefinition `protobuf:"bytes,2,rep,name=def,proto3" json:"def,omitempty"`
// message represents arbitrary messages to describe the detail of the error.
Message []*MessageExpr `protobuf:"bytes,3,rep,name=message,proto3" json:"message,omitempty"`
// error_info describes the cause of the error with structured details.
ErrorInfo []*errdetails.ErrorInfo `protobuf:"bytes,4,rep,name=error_info,json=errorInfo,proto3" json:"error_info,omitempty"`
// retry_info describes when the clients can retry a failed request.
RetryInfo []*errdetails.RetryInfo `protobuf:"bytes,5,rep,name=retry_info,json=retryInfo,proto3" json:"retry_info,omitempty"`
// debug_info describes additional debugging info.
DebugInfo []*errdetails.DebugInfo `protobuf:"bytes,6,rep,name=debug_info,json=debugInfo,proto3" json:"debug_info,omitempty"`
// quota_failure describes how a quota check failed.
QuotaFailure []*errdetails.QuotaFailure `protobuf:"bytes,7,rep,name=quota_failure,json=quotaFailure,proto3" json:"quota_failure,omitempty"`
// precondition_failure describes what preconditions have failed.
PreconditionFailure []*errdetails.PreconditionFailure `protobuf:"bytes,8,rep,name=precondition_failure,json=preconditionFailure,proto3" json:"precondition_failure,omitempty"`
// bad_request describes violations in a client request.
BadRequest []*errdetails.BadRequest `protobuf:"bytes,9,rep,name=bad_request,json=badRequest,proto3" json:"bad_request,omitempty"`
// request_info contains metadata about the request that clients can attach.
RequestInfo []*errdetails.RequestInfo `protobuf:"bytes,10,rep,name=request_info,json=requestInfo,proto3" json:"request_info,omitempty"`
// resource_info describes the resource that is being accessed.
ResourceInfo []*errdetails.ResourceInfo `protobuf:"bytes,11,rep,name=resource_info,json=resourceInfo,proto3" json:"resource_info,omitempty"`
// help provides links to documentation or for performing an out of band action.
Help []*errdetails.Help `protobuf:"bytes,12,rep,name=help,proto3" json:"help,omitempty"`
// localized_message provides a localized error message that is safe to return to the user.
LocalizedMessage []*errdetails.LocalizedMessage `protobuf:"bytes,13,rep,name=localized_message,json=localizedMessage,proto3" json:"localized_message,omitempty"`
// by specify a message in CEL to express the details of the error.
By []string `protobuf:"bytes,14,rep,name=by,proto3" json:"by,omitempty"`
}
func (x *GRPCErrorDetail) Reset() {
*x = GRPCErrorDetail{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[25]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GRPCErrorDetail) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GRPCErrorDetail) ProtoMessage() {}
func (x *GRPCErrorDetail) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[25]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GRPCErrorDetail.ProtoReflect.Descriptor instead.
func (*GRPCErrorDetail) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{25}
}
func (x *GRPCErrorDetail) GetIf() string {
if x != nil {
return x.If
}
return ""
}
func (x *GRPCErrorDetail) GetDef() []*VariableDefinition {
if x != nil {
return x.Def
}
return nil
}
func (x *GRPCErrorDetail) GetMessage() []*MessageExpr {
if x != nil {
return x.Message
}
return nil
}
func (x *GRPCErrorDetail) GetErrorInfo() []*errdetails.ErrorInfo {
if x != nil {
return x.ErrorInfo
}
return nil
}
func (x *GRPCErrorDetail) GetRetryInfo() []*errdetails.RetryInfo {
if x != nil {
return x.RetryInfo
}
return nil
}
func (x *GRPCErrorDetail) GetDebugInfo() []*errdetails.DebugInfo {
if x != nil {
return x.DebugInfo
}
return nil
}
func (x *GRPCErrorDetail) GetQuotaFailure() []*errdetails.QuotaFailure {
if x != nil {
return x.QuotaFailure
}
return nil
}
func (x *GRPCErrorDetail) GetPreconditionFailure() []*errdetails.PreconditionFailure {
if x != nil {
return x.PreconditionFailure
}
return nil
}
func (x *GRPCErrorDetail) GetBadRequest() []*errdetails.BadRequest {
if x != nil {
return x.BadRequest
}
return nil
}
func (x *GRPCErrorDetail) GetRequestInfo() []*errdetails.RequestInfo {
if x != nil {
return x.RequestInfo
}
return nil
}
func (x *GRPCErrorDetail) GetResourceInfo() []*errdetails.ResourceInfo {
if x != nil {
return x.ResourceInfo
}
return nil
}
func (x *GRPCErrorDetail) GetHelp() []*errdetails.Help {
if x != nil {
return x.Help
}
return nil
}
func (x *GRPCErrorDetail) GetLocalizedMessage() []*errdetails.LocalizedMessage {
if x != nil {
return x.LocalizedMessage
}
return nil
}
func (x *GRPCErrorDetail) GetBy() []string {
if x != nil {
return x.By
}
return nil
}
// GRPCCallOption configures a gRPC Call before it starts or extracts information from a gRPC Call after it completes.
type GRPCCallOption struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// set the content-subtype. For example, if content-subtype is "json", the Content-Type over the wire will be "application/grpc+json".
// The content-subtype is converted to lowercase before being included in Content-Type.
// See Content-Type on https://github.com/grpc/grpc/blob/master/doc/PROTOCOL-HTTP2.md#requests for more details.
// If no such codec is found, the call will result in an error with code INTERNAL.
ContentSubtype *string `protobuf:"bytes,1,opt,name=content_subtype,json=contentSubtype,proto3,oneof" json:"content_subtype,omitempty"`
// header retrieves the header metadata for a unary RPC.
// In order to obtain the metadata, you must specify a variable of type map in the header.
// e.g.)
// def [
//
// { name: "hdr" by: "grpc.federation.metadata.new()" }
// { call { method: "pkg.Method" option { header: "hdr" } } }
//
// ]
Header *string `protobuf:"bytes,2,opt,name=header,proto3,oneof" json:"header,omitempty"`
// max_call_recv_msg_size sets the maximum message size in bytes the client can receive.
// If this is not set, gRPC uses the default 4MB.
MaxCallRecvMsgSize *int64 `protobuf:"varint,3,opt,name=max_call_recv_msg_size,json=maxCallRecvMsgSize,proto3,oneof" json:"max_call_recv_msg_size,omitempty"`
// max_call_send_msg_size sets the maximum message size in bytes the client can send.
// If this is not set, gRPC uses the default maximum number of int32 range.
MaxCallSendMsgSize *int64 `protobuf:"varint,4,opt,name=max_call_send_msg_size,json=maxCallSendMsgSize,proto3,oneof" json:"max_call_send_msg_size,omitempty"`
// static_method specifies that a call is being made to a method that is static,
// which means the method is known at compile time and doesn't change at runtime.
// This can be used as a signal to stats plugins that this method is safe to include as a key to a measurement.
StaticMethod *bool `protobuf:"varint,5,opt,name=static_method,json=staticMethod,proto3,oneof" json:"static_method,omitempty"`
// trailer retrieves the trailer metadata for a unary RPC.
// In order to obtain the metadata, you must specify a variable of type map in the trailer.
// e.g.)
// def [
//
// { name: "trl" by: "grpc.federation.metadata.new()" }
// { call { method: "pkg.Method" option { trailer: "trl" } } }
//
// ]
Trailer *string `protobuf:"bytes,6,opt,name=trailer,proto3,oneof" json:"trailer,omitempty"`
// wait_for_ready configures the RPC's behavior when the client is in TRANSIENT_FAILURE,
// which occurs when all addresses fail to connect.
// If wait_for_ready is false, the RPC will fail immediately.
// Otherwise, the client will wait until a connection becomes available or the RPC's deadline is reached.
// By default, RPCs do not "wait for ready".
WaitForReady *bool `protobuf:"varint,7,opt,name=wait_for_ready,json=waitForReady,proto3,oneof" json:"wait_for_ready,omitempty"`
}
func (x *GRPCCallOption) Reset() {
*x = GRPCCallOption{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[26]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GRPCCallOption) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GRPCCallOption) ProtoMessage() {}
func (x *GRPCCallOption) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[26]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GRPCCallOption.ProtoReflect.Descriptor instead.
func (*GRPCCallOption) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{26}
}
func (x *GRPCCallOption) GetContentSubtype() string {
if x != nil && x.ContentSubtype != nil {
return *x.ContentSubtype
}
return ""
}
func (x *GRPCCallOption) GetHeader() string {
if x != nil && x.Header != nil {
return *x.Header
}
return ""
}
func (x *GRPCCallOption) GetMaxCallRecvMsgSize() int64 {
if x != nil && x.MaxCallRecvMsgSize != nil {
return *x.MaxCallRecvMsgSize
}
return 0
}
func (x *GRPCCallOption) GetMaxCallSendMsgSize() int64 {
if x != nil && x.MaxCallSendMsgSize != nil {
return *x.MaxCallSendMsgSize
}
return 0
}
func (x *GRPCCallOption) GetStaticMethod() bool {
if x != nil && x.StaticMethod != nil {
return *x.StaticMethod
}
return false
}
func (x *GRPCCallOption) GetTrailer() string {
if x != nil && x.Trailer != nil {
return *x.Trailer
}
return ""
}
func (x *GRPCCallOption) GetWaitForReady() bool {
if x != nil && x.WaitForReady != nil {
return *x.WaitForReady
}
return false
}
// Validation represents a validation rule against variables defined within the current scope.
type ValidationExpr struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// name is a unique name for the validation.
// If set, the validation error type will be Error.
// If omitted, the validation error type will be ValidationError.
Name *string `protobuf:"bytes,1,opt,name=name,proto3,oneof" json:"name,omitempty"`
// error defines the actual validation rules and an error to returned if the validation fails.
Error *GRPCError `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"`
}
func (x *ValidationExpr) Reset() {
*x = ValidationExpr{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[27]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ValidationExpr) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ValidationExpr) ProtoMessage() {}
func (x *ValidationExpr) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[27]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ValidationExpr.ProtoReflect.Descriptor instead.
func (*ValidationExpr) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{27}
}
func (x *ValidationExpr) GetName() string {
if x != nil && x.Name != nil {
return *x.Name
}
return ""
}
func (x *ValidationExpr) GetError() *GRPCError {
if x != nil {
return x.Error
}
return nil
}
// RetryPolicy define the retry policy if the method call fails.
type RetryPolicy struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Types that are assignable to Policy:
//
// *RetryPolicy_Constant
// *RetryPolicy_Exponential
Policy isRetryPolicy_Policy `protobuf_oneof:"policy"`
// if specifies condition in CEL. If the condition is true, run the retry process according to the policy.
// If this field is omitted, it is always treated as 'true' and run the retry process.
// The return value must always be of type boolean.
If string `protobuf:"bytes,3,opt,name=if,proto3" json:"if,omitempty"`
}
func (x *RetryPolicy) Reset() {
*x = RetryPolicy{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[28]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *RetryPolicy) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*RetryPolicy) ProtoMessage() {}
func (x *RetryPolicy) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[28]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use RetryPolicy.ProtoReflect.Descriptor instead.
func (*RetryPolicy) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{28}
}
func (m *RetryPolicy) GetPolicy() isRetryPolicy_Policy {
if m != nil {
return m.Policy
}
return nil
}
func (x *RetryPolicy) GetConstant() *RetryPolicyConstant {
if x, ok := x.GetPolicy().(*RetryPolicy_Constant); ok {
return x.Constant
}
return nil
}
func (x *RetryPolicy) GetExponential() *RetryPolicyExponential {
if x, ok := x.GetPolicy().(*RetryPolicy_Exponential); ok {
return x.Exponential
}
return nil
}
func (x *RetryPolicy) GetIf() string {
if x != nil {
return x.If
}
return ""
}
type isRetryPolicy_Policy interface {
isRetryPolicy_Policy()
}
type RetryPolicy_Constant struct {
// retry according to the "constant" policy.
Constant *RetryPolicyConstant `protobuf:"bytes,1,opt,name=constant,proto3,oneof"`
}
type RetryPolicy_Exponential struct {
// retry according to the "exponential backoff" policy.
// The following Go library is used in the implementation,
// so please refer to the library documentation for how to specify each parameter.
// https://pkg.go.dev/github.com/cenkalti/backoff/v4#section-readme.
Exponential *RetryPolicyExponential `protobuf:"bytes,2,opt,name=exponential,proto3,oneof"`
}
func (*RetryPolicy_Constant) isRetryPolicy_Policy() {}
func (*RetryPolicy_Exponential) isRetryPolicy_Policy() {}
// RetryPolicyConstant define "constant" based retry policy.
type RetryPolicyConstant struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// interval value. ( default value is 1s ).
Interval *string `protobuf:"bytes,1,opt,name=interval,proto3,oneof" json:"interval,omitempty"`
// max retry count. ( default value is 5. If zero is specified, it never stops )
MaxRetries *uint64 `protobuf:"varint,2,opt,name=max_retries,json=maxRetries,proto3,oneof" json:"max_retries,omitempty"`
}
func (x *RetryPolicyConstant) Reset() {
*x = RetryPolicyConstant{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[29]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *RetryPolicyConstant) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*RetryPolicyConstant) ProtoMessage() {}
func (x *RetryPolicyConstant) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[29]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use RetryPolicyConstant.ProtoReflect.Descriptor instead.
func (*RetryPolicyConstant) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{29}
}
func (x *RetryPolicyConstant) GetInterval() string {
if x != nil && x.Interval != nil {
return *x.Interval
}
return ""
}
func (x *RetryPolicyConstant) GetMaxRetries() uint64 {
if x != nil && x.MaxRetries != nil {
return *x.MaxRetries
}
return 0
}
// RetryPolicyExponential define "exponential backoff" based retry policy.
type RetryPolicyExponential struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// initial interval value. ( default value is "500ms" ).
InitialInterval *string `protobuf:"bytes,1,opt,name=initial_interval,json=initialInterval,proto3,oneof" json:"initial_interval,omitempty"`
// randomization factor value. ( default value is 0.5 ).
RandomizationFactor *float64 `protobuf:"fixed64,2,opt,name=randomization_factor,json=randomizationFactor,proto3,oneof" json:"randomization_factor,omitempty"`
// multiplier. ( default value is 1.5 ).
Multiplier *float64 `protobuf:"fixed64,3,opt,name=multiplier,proto3,oneof" json:"multiplier,omitempty"`
// max interval value. ( default value is "60s" ).
MaxInterval *string `protobuf:"bytes,4,opt,name=max_interval,json=maxInterval,proto3,oneof" json:"max_interval,omitempty"`
// max retry count. ( default value is 5. If zero is specified, it never stops ).
MaxRetries *uint64 `protobuf:"varint,5,opt,name=max_retries,json=maxRetries,proto3,oneof" json:"max_retries,omitempty"`
}
func (x *RetryPolicyExponential) Reset() {
*x = RetryPolicyExponential{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[30]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *RetryPolicyExponential) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*RetryPolicyExponential) ProtoMessage() {}
func (x *RetryPolicyExponential) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[30]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use RetryPolicyExponential.ProtoReflect.Descriptor instead.
func (*RetryPolicyExponential) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{30}
}
func (x *RetryPolicyExponential) GetInitialInterval() string {
if x != nil && x.InitialInterval != nil {
return *x.InitialInterval
}
return ""
}
func (x *RetryPolicyExponential) GetRandomizationFactor() float64 {
if x != nil && x.RandomizationFactor != nil {
return *x.RandomizationFactor
}
return 0
}
func (x *RetryPolicyExponential) GetMultiplier() float64 {
if x != nil && x.Multiplier != nil {
return *x.Multiplier
}
return 0
}
func (x *RetryPolicyExponential) GetMaxInterval() string {
if x != nil && x.MaxInterval != nil {
return *x.MaxInterval
}
return ""
}
func (x *RetryPolicyExponential) GetMaxRetries() uint64 {
if x != nil && x.MaxRetries != nil {
return *x.MaxRetries
}
return 0
}
// MethodRequest define parameters to be used for gRPC method request.
type MethodRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// field name of the request message.
Field string `protobuf:"bytes,1,opt,name=field,proto3" json:"field,omitempty"`
// by used to refer to a name or message argument defined in a MessageRule, use `$.` to refer to the message argument.
// Use CEL (https://github.com/google/cel-spec) to evaluate the expression.
// Variables are already defined in MessageRule can be used.
By *string `protobuf:"bytes,2,opt,name=by,proto3,oneof" json:"by,omitempty"`
// if describes the condition to be assigned to field.
// The return value must be of type bool.
// Use CEL (https://github.com/google/cel-spec) to evaluate the expression.
// Variables are already defined in MessageRule can be used.
// If the field is a 'oneof' field, it must be specified.
If *string `protobuf:"bytes,3,opt,name=if,proto3,oneof" json:"if,omitempty"`
}
func (x *MethodRequest) Reset() {
*x = MethodRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[31]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *MethodRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*MethodRequest) ProtoMessage() {}
func (x *MethodRequest) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[31]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use MethodRequest.ProtoReflect.Descriptor instead.
func (*MethodRequest) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{31}
}
func (x *MethodRequest) GetField() string {
if x != nil {
return x.Field
}
return ""
}
func (x *MethodRequest) GetBy() string {
if x != nil && x.By != nil {
return *x.By
}
return ""
}
func (x *MethodRequest) GetIf() string {
if x != nil && x.If != nil {
return *x.If
}
return ""
}
// MethodResponse define which value of the method response is referenced.
type MethodResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// name specify the unique name that can be used in a `MessageRule` / `FieldRule` for the same message for a specific field in the response.
Name *string `protobuf:"bytes,1,opt,name=name,proto3,oneof" json:"name,omitempty"`
// field name in response message.
Field *string `protobuf:"bytes,2,opt,name=field,proto3,oneof" json:"field,omitempty"`
// autobind if the value referenced by `field` is a message type,
// the value of a field with the same name and type as the field name of its own message is automatically assigned to the value of the field in the message.
// If multiple autobinds are used at the same message,
// you must explicitly use the `grpc.federation.field` option to do the binding yourself, since duplicate field names cannot be correctly determined as one.
Autobind *bool `protobuf:"varint,3,opt,name=autobind,proto3,oneof" json:"autobind,omitempty"`
}
func (x *MethodResponse) Reset() {
*x = MethodResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[32]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *MethodResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*MethodResponse) ProtoMessage() {}
func (x *MethodResponse) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[32]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use MethodResponse.ProtoReflect.Descriptor instead.
func (*MethodResponse) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{32}
}
func (x *MethodResponse) GetName() string {
if x != nil && x.Name != nil {
return *x.Name
}
return ""
}
func (x *MethodResponse) GetField() string {
if x != nil && x.Field != nil {
return *x.Field
}
return ""
}
func (x *MethodResponse) GetAutobind() bool {
if x != nil && x.Autobind != nil {
return *x.Autobind
}
return false
}
// Argument define message argument.
type Argument struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// name of the message argument.
// Use this name to refer to the message argument.
// For example, if `foo` is specified as the name, it is referenced by `$.foo`.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// by used to refer to a name or message argument defined in a MessageRule, use `$.` to refer to the message argument.
// Use CEL (https://github.com/google/cel-spec) to evaluate the expression.
// Variables are already defined in MessageRule can be used.
By *string `protobuf:"bytes,2,opt,name=by,proto3,oneof" json:"by,omitempty"`
// inline like by, it refers to the specified value and expands all fields beyond it.
// For this reason, the referenced value must always be of message type.
Inline *string `protobuf:"bytes,3,opt,name=inline,proto3,oneof" json:"inline,omitempty"`
}
func (x *Argument) Reset() {
*x = Argument{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[33]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Argument) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Argument) ProtoMessage() {}
func (x *Argument) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[33]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Argument.ProtoReflect.Descriptor instead.
func (*Argument) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{33}
}
func (x *Argument) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *Argument) GetBy() string {
if x != nil && x.By != nil {
return *x.By
}
return ""
}
func (x *Argument) GetInline() string {
if x != nil && x.Inline != nil {
return *x.Inline
}
return ""
}
// FieldRule define gRPC Federation rules for the field of message.
type FieldRule struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// If custom_resolver is true, the field binding process is to be implemented in Go.
// If there are any values retrieved by grpc.federation.message option, they are passed as arguments for custom resolver.
CustomResolver *bool `protobuf:"varint,1,opt,name=custom_resolver,json=customResolver,proto3,oneof" json:"custom_resolver,omitempty"`
// by used to refer to a name or message argument defined in a MessageRule, use `$.` to refer to the message argument.
// Use CEL (https://github.com/google/cel-spec) to evaluate the expression.
// Variables are already defined in MessageRule can be used.
By *string `protobuf:"bytes,2,opt,name=by,proto3,oneof" json:"by,omitempty"`
// alias can be used when alias is specified in grpc.federation.message option,
// and specifies the field name to be referenced among the messages specified in alias of message option.
// If the specified field has the same type or can be converted automatically, its value is assigned.
Alias *string `protobuf:"bytes,3,opt,name=alias,proto3,oneof" json:"alias,omitempty"`
// use to evaluate any one of fields. this field only available in oneof.
Oneof *FieldOneof `protobuf:"bytes,4,opt,name=oneof,proto3" json:"oneof,omitempty"`
// when defining an environment variable, use it for fields where you want to set additional options.
Env *EnvVarOption `protobuf:"bytes,5,opt,name=env,proto3" json:"env,omitempty"`
}
func (x *FieldRule) Reset() {
*x = FieldRule{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[34]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *FieldRule) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*FieldRule) ProtoMessage() {}
func (x *FieldRule) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[34]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use FieldRule.ProtoReflect.Descriptor instead.
func (*FieldRule) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{34}
}
func (x *FieldRule) GetCustomResolver() bool {
if x != nil && x.CustomResolver != nil {
return *x.CustomResolver
}
return false
}
func (x *FieldRule) GetBy() string {
if x != nil && x.By != nil {
return *x.By
}
return ""
}
func (x *FieldRule) GetAlias() string {
if x != nil && x.Alias != nil {
return *x.Alias
}
return ""
}
func (x *FieldRule) GetOneof() *FieldOneof {
if x != nil {
return x.Oneof
}
return nil
}
func (x *FieldRule) GetEnv() *EnvVarOption {
if x != nil {
return x.Env
}
return nil
}
// FieldOneof evaluate "messages" or other field only if expr is true and assign to the oneof field.
// This feature only available in oneof.
type FieldOneof struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// cond specify either `expr` or `default`. Only one `default` can be set per oneof.
//
// Types that are assignable to Cond:
//
// *FieldOneof_If
// *FieldOneof_Default
Cond isFieldOneof_Cond `protobuf_oneof:"cond"`
// def specify variables to be used in current oneof field's scope for field binding.
Def []*VariableDefinition `protobuf:"bytes,3,rep,name=def,proto3" json:"def,omitempty"`
// by used to refer to a name or message argument defined in a MessageRule, use `$.` to refer to the message argument.
// Use CEL (https://github.com/google/cel-spec) to evaluate the expression.
// Variables are already defined in MessageRule and FieldOneOf can be used.
By string `protobuf:"bytes,4,opt,name=by,proto3" json:"by,omitempty"`
}
func (x *FieldOneof) Reset() {
*x = FieldOneof{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[35]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *FieldOneof) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*FieldOneof) ProtoMessage() {}
func (x *FieldOneof) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[35]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use FieldOneof.ProtoReflect.Descriptor instead.
func (*FieldOneof) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{35}
}
func (m *FieldOneof) GetCond() isFieldOneof_Cond {
if m != nil {
return m.Cond
}
return nil
}
func (x *FieldOneof) GetIf() string {
if x, ok := x.GetCond().(*FieldOneof_If); ok {
return x.If
}
return ""
}
func (x *FieldOneof) GetDefault() bool {
if x, ok := x.GetCond().(*FieldOneof_Default); ok {
return x.Default
}
return false
}
func (x *FieldOneof) GetDef() []*VariableDefinition {
if x != nil {
return x.Def
}
return nil
}
func (x *FieldOneof) GetBy() string {
if x != nil {
return x.By
}
return ""
}
type isFieldOneof_Cond interface {
isFieldOneof_Cond()
}
type FieldOneof_If struct {
// if describes the condition to be assigned to field.
// The return value must be of type bool.
// Use CEL (https://github.com/google/cel-spec) to evaluate the expression.
// Variables are already defined in MessageRule can be used.
If string `protobuf:"bytes,1,opt,name=if,proto3,oneof"`
}
type FieldOneof_Default struct {
// default used to assign a value when none of the other fields match any of the specified expressions.
// Only one value can be defined per oneof.
Default bool `protobuf:"varint,2,opt,name=default,proto3,oneof"`
}
func (*FieldOneof_If) isFieldOneof_Cond() {}
func (*FieldOneof_Default) isFieldOneof_Cond() {}
// CELPlugin define schema of CEL plugin.
type CELPlugin struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Export []*CELPluginExport `protobuf:"bytes,1,rep,name=export,proto3" json:"export,omitempty"`
}
func (x *CELPlugin) Reset() {
*x = CELPlugin{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[36]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *CELPlugin) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CELPlugin) ProtoMessage() {}
func (x *CELPlugin) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[36]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use CELPlugin.ProtoReflect.Descriptor instead.
func (*CELPlugin) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{36}
}
func (x *CELPlugin) GetExport() []*CELPluginExport {
if x != nil {
return x.Export
}
return nil
}
// CELPluginExport describe the schema to be exposed as a CEL plugin.
type CELPluginExport struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// name is the plugin name.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// desc is the description of plugin.
// This description is used as documentation at code generation.
Desc string `protobuf:"bytes,2,opt,name=desc,proto3" json:"desc,omitempty"`
// types describe the message type you want to expose.
Types []*CELReceiverType `protobuf:"bytes,3,rep,name=types,proto3" json:"types,omitempty"`
// functions describe the definition of the function you want to expose.
Functions []*CELFunction `protobuf:"bytes,4,rep,name=functions,proto3" json:"functions,omitempty"`
// variables describe the definition of the variable you want to expose.
Variables []*CELVariable `protobuf:"bytes,5,rep,name=variables,proto3" json:"variables,omitempty"`
Capability *CELPluginCapability `protobuf:"bytes,6,opt,name=capability,proto3" json:"capability,omitempty"`
}
func (x *CELPluginExport) Reset() {
*x = CELPluginExport{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[37]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *CELPluginExport) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CELPluginExport) ProtoMessage() {}
func (x *CELPluginExport) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[37]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use CELPluginExport.ProtoReflect.Descriptor instead.
func (*CELPluginExport) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{37}
}
func (x *CELPluginExport) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *CELPluginExport) GetDesc() string {
if x != nil {
return x.Desc
}
return ""
}
func (x *CELPluginExport) GetTypes() []*CELReceiverType {
if x != nil {
return x.Types
}
return nil
}
func (x *CELPluginExport) GetFunctions() []*CELFunction {
if x != nil {
return x.Functions
}
return nil
}
func (x *CELPluginExport) GetVariables() []*CELVariable {
if x != nil {
return x.Variables
}
return nil
}
func (x *CELPluginExport) GetCapability() *CELPluginCapability {
if x != nil {
return x.Capability
}
return nil
}
// CELPluginCapability controls the permissions granted to the WebAssembly plugin.
type CELPluginCapability struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// env is the capability for environment variable.
Env *CELPluginEnvCapability `protobuf:"bytes,1,opt,name=env,proto3,oneof" json:"env,omitempty"`
// file_system is the capability for file system.
FileSystem *CELPluginFileSystemCapability `protobuf:"bytes,2,opt,name=file_system,json=fileSystem,proto3,oneof" json:"file_system,omitempty"`
// network is the capability for network.
Network *CELPluginNetworkCapability `protobuf:"bytes,3,opt,name=network,proto3,oneof" json:"network,omitempty"`
}
func (x *CELPluginCapability) Reset() {
*x = CELPluginCapability{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[38]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *CELPluginCapability) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CELPluginCapability) ProtoMessage() {}
func (x *CELPluginCapability) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[38]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use CELPluginCapability.ProtoReflect.Descriptor instead.
func (*CELPluginCapability) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{38}
}
func (x *CELPluginCapability) GetEnv() *CELPluginEnvCapability {
if x != nil {
return x.Env
}
return nil
}
func (x *CELPluginCapability) GetFileSystem() *CELPluginFileSystemCapability {
if x != nil {
return x.FileSystem
}
return nil
}
func (x *CELPluginCapability) GetNetwork() *CELPluginNetworkCapability {
if x != nil {
return x.Network
}
return nil
}
// CELPluginEnvCapability controls access to the environment variable.
type CELPluginEnvCapability struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// all allows access to all environment variables.
All bool `protobuf:"varint,1,opt,name=all,proto3" json:"all,omitempty"`
// specifies accessible names. If "all" is true, it takes precedence.
Names []string `protobuf:"bytes,2,rep,name=names,proto3" json:"names,omitempty"`
}
func (x *CELPluginEnvCapability) Reset() {
*x = CELPluginEnvCapability{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[39]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *CELPluginEnvCapability) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CELPluginEnvCapability) ProtoMessage() {}
func (x *CELPluginEnvCapability) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[39]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use CELPluginEnvCapability.ProtoReflect.Descriptor instead.
func (*CELPluginEnvCapability) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{39}
}
func (x *CELPluginEnvCapability) GetAll() bool {
if x != nil {
return x.All
}
return false
}
func (x *CELPluginEnvCapability) GetNames() []string {
if x != nil {
return x.Names
}
return nil
}
// CELPluginFileSystemCapability controls access to the file system.
type CELPluginFileSystemCapability struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// mount_path specifies the file path of the host to mount.
// If not specified, the root directory will be used.
MountPath string `protobuf:"bytes,1,opt,name=mount_path,json=mountPath,proto3" json:"mount_path,omitempty"`
}
func (x *CELPluginFileSystemCapability) Reset() {
*x = CELPluginFileSystemCapability{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[40]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *CELPluginFileSystemCapability) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CELPluginFileSystemCapability) ProtoMessage() {}
func (x *CELPluginFileSystemCapability) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[40]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use CELPluginFileSystemCapability.ProtoReflect.Descriptor instead.
func (*CELPluginFileSystemCapability) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{40}
}
func (x *CELPluginFileSystemCapability) GetMountPath() string {
if x != nil {
return x.MountPath
}
return ""
}
// CELPluginNetworkCapability sets permissions related to network access.
// This is an experimental feature.
type CELPluginNetworkCapability struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
}
func (x *CELPluginNetworkCapability) Reset() {
*x = CELPluginNetworkCapability{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[41]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *CELPluginNetworkCapability) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CELPluginNetworkCapability) ProtoMessage() {}
func (x *CELPluginNetworkCapability) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[41]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use CELPluginNetworkCapability.ProtoReflect.Descriptor instead.
func (*CELPluginNetworkCapability) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{41}
}
// CELFunction represents the CEL function definition.
type CELFunction struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// name is the function name.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// desc is the description of function.
// This description is used as documentation at code generation.
Desc string `protobuf:"bytes,2,opt,name=desc,proto3" json:"desc,omitempty"`
// args describe the definition of the function argument.
Args []*CELFunctionArgument `protobuf:"bytes,3,rep,name=args,proto3" json:"args,omitempty"`
// return describe the definition of return type of function.
Return *CELType `protobuf:"bytes,4,opt,name=return,proto3" json:"return,omitempty"`
}
func (x *CELFunction) Reset() {
*x = CELFunction{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[42]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *CELFunction) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CELFunction) ProtoMessage() {}
func (x *CELFunction) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[42]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use CELFunction.ProtoReflect.Descriptor instead.
func (*CELFunction) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{42}
}
func (x *CELFunction) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *CELFunction) GetDesc() string {
if x != nil {
return x.Desc
}
return ""
}
func (x *CELFunction) GetArgs() []*CELFunctionArgument {
if x != nil {
return x.Args
}
return nil
}
func (x *CELFunction) GetReturn() *CELType {
if x != nil {
return x.Return
}
return nil
}
// CELReceiverType represents methods tied to the message.
type CELReceiverType struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// name is the message name.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// desc is the description of plugin.
// This description is used as documentation at code generation.
Desc string `protobuf:"bytes,2,opt,name=desc,proto3" json:"desc,omitempty"`
// methods describe the definition of the method for the message.
Methods []*CELFunction `protobuf:"bytes,3,rep,name=methods,proto3" json:"methods,omitempty"`
}
func (x *CELReceiverType) Reset() {
*x = CELReceiverType{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[43]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *CELReceiverType) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CELReceiverType) ProtoMessage() {}
func (x *CELReceiverType) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[43]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use CELReceiverType.ProtoReflect.Descriptor instead.
func (*CELReceiverType) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{43}
}
func (x *CELReceiverType) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *CELReceiverType) GetDesc() string {
if x != nil {
return x.Desc
}
return ""
}
func (x *CELReceiverType) GetMethods() []*CELFunction {
if x != nil {
return x.Methods
}
return nil
}
// CELFunctionArgument represents the function argument.
type CELFunctionArgument struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// name is the argument value name.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// desc is the description of plugin.
// This description is used as documentation at code generation.
Desc string `protobuf:"bytes,2,opt,name=desc,proto3" json:"desc,omitempty"`
// type is the argument type.
Type *CELType `protobuf:"bytes,3,opt,name=type,proto3" json:"type,omitempty"`
}
func (x *CELFunctionArgument) Reset() {
*x = CELFunctionArgument{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[44]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *CELFunctionArgument) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CELFunctionArgument) ProtoMessage() {}
func (x *CELFunctionArgument) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[44]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use CELFunctionArgument.ProtoReflect.Descriptor instead.
func (*CELFunctionArgument) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{44}
}
func (x *CELFunctionArgument) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *CELFunctionArgument) GetDesc() string {
if x != nil {
return x.Desc
}
return ""
}
func (x *CELFunctionArgument) GetType() *CELType {
if x != nil {
return x.Type
}
return nil
}
// CELType represents type information for CEL plugin interface.
type CELType struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Types that are assignable to Type:
//
// *CELType_Kind
// *CELType_Repeated
// *CELType_Map
// *CELType_Message
// *CELType_Enum
Type isCELType_Type `protobuf_oneof:"type"`
}
func (x *CELType) Reset() {
*x = CELType{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[45]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *CELType) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CELType) ProtoMessage() {}
func (x *CELType) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[45]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use CELType.ProtoReflect.Descriptor instead.
func (*CELType) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{45}
}
func (m *CELType) GetType() isCELType_Type {
if m != nil {
return m.Type
}
return nil
}
func (x *CELType) GetKind() TypeKind {
if x, ok := x.GetType().(*CELType_Kind); ok {
return x.Kind
}
return TypeKind_UNKNOWN
}
func (x *CELType) GetRepeated() *CELType {
if x, ok := x.GetType().(*CELType_Repeated); ok {
return x.Repeated
}
return nil
}
func (x *CELType) GetMap() *CELMapType {
if x, ok := x.GetType().(*CELType_Map); ok {
return x.Map
}
return nil
}
func (x *CELType) GetMessage() string {
if x, ok := x.GetType().(*CELType_Message); ok {
return x.Message
}
return ""
}
func (x *CELType) GetEnum() string {
if x, ok := x.GetType().(*CELType_Enum); ok {
return x.Enum
}
return ""
}
type isCELType_Type interface {
isCELType_Type()
}
type CELType_Kind struct {
// kind is used when the type is a primitive type.
Kind TypeKind `protobuf:"varint,1,opt,name=kind,proto3,enum=grpc.federation.TypeKind,oneof"`
}
type CELType_Repeated struct {
// repeated is used when the type is a repeated type.
Repeated *CELType `protobuf:"bytes,2,opt,name=repeated,proto3,oneof"`
}
type CELType_Map struct {
// map is used when the type is a map type.
Map *CELMapType `protobuf:"bytes,3,opt,name=map,proto3,oneof"`
}
type CELType_Message struct {
// message is a fqdn to the message type.
Message string `protobuf:"bytes,4,opt,name=message,proto3,oneof"`
}
type CELType_Enum struct {
// enum is a fqdn to the enum type.
Enum string `protobuf:"bytes,5,opt,name=enum,proto3,oneof"`
}
func (*CELType_Kind) isCELType_Type() {}
func (*CELType_Repeated) isCELType_Type() {}
func (*CELType_Map) isCELType_Type() {}
func (*CELType_Message) isCELType_Type() {}
func (*CELType_Enum) isCELType_Type() {}
// CELMapType represents map type.
type CELMapType struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// key represents map's key type.
Key *CELType `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
// value represents map's value type.
Value *CELType `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
}
func (x *CELMapType) Reset() {
*x = CELMapType{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[46]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *CELMapType) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CELMapType) ProtoMessage() {}
func (x *CELMapType) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[46]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use CELMapType.ProtoReflect.Descriptor instead.
func (*CELMapType) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{46}
}
func (x *CELMapType) GetKey() *CELType {
if x != nil {
return x.Key
}
return nil
}
func (x *CELMapType) GetValue() *CELType {
if x != nil {
return x.Value
}
return nil
}
// CELVariable represents CEL variable.
type CELVariable struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// name is the variable name.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// desc is the description of plugin.
// This description is used as documentation at code generation.
Desc string `protobuf:"bytes,2,opt,name=desc,proto3" json:"desc,omitempty"`
// type is the variable type.
Type *CELType `protobuf:"bytes,3,opt,name=type,proto3" json:"type,omitempty"`
}
func (x *CELVariable) Reset() {
*x = CELVariable{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[47]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *CELVariable) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CELVariable) ProtoMessage() {}
func (x *CELVariable) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[47]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use CELVariable.ProtoReflect.Descriptor instead.
func (*CELVariable) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{47}
}
func (x *CELVariable) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *CELVariable) GetDesc() string {
if x != nil {
return x.Desc
}
return ""
}
func (x *CELVariable) GetType() *CELType {
if x != nil {
return x.Type
}
return nil
}
var file_grpc_federation_federation_proto_extTypes = []protoimpl.ExtensionInfo{
{
ExtendedType: (*descriptorpb.FileOptions)(nil),
ExtensionType: (*FileRule)(nil),
Field: 1187,
Name: "grpc.federation.file",
Tag: "bytes,1187,opt,name=file",
Filename: "grpc/federation/federation.proto",
},
{
ExtendedType: (*descriptorpb.ServiceOptions)(nil),
ExtensionType: (*ServiceRule)(nil),
Field: 1187,
Name: "grpc.federation.service",
Tag: "bytes,1187,opt,name=service",
Filename: "grpc/federation/federation.proto",
},
{
ExtendedType: (*descriptorpb.MethodOptions)(nil),
ExtensionType: (*MethodRule)(nil),
Field: 1187,
Name: "grpc.federation.method",
Tag: "bytes,1187,opt,name=method",
Filename: "grpc/federation/federation.proto",
},
{
ExtendedType: (*descriptorpb.MessageOptions)(nil),
ExtensionType: (*MessageRule)(nil),
Field: 1187,
Name: "grpc.federation.message",
Tag: "bytes,1187,opt,name=message",
Filename: "grpc/federation/federation.proto",
},
{
ExtendedType: (*descriptorpb.FieldOptions)(nil),
ExtensionType: (*FieldRule)(nil),
Field: 1187,
Name: "grpc.federation.field",
Tag: "bytes,1187,opt,name=field",
Filename: "grpc/federation/federation.proto",
},
{
ExtendedType: (*descriptorpb.EnumOptions)(nil),
ExtensionType: (*EnumRule)(nil),
Field: 1187,
Name: "grpc.federation.enum",
Tag: "bytes,1187,opt,name=enum",
Filename: "grpc/federation/federation.proto",
},
{
ExtendedType: (*descriptorpb.EnumValueOptions)(nil),
ExtensionType: (*EnumValueRule)(nil),
Field: 1187,
Name: "grpc.federation.enum_value",
Tag: "bytes,1187,opt,name=enum_value",
Filename: "grpc/federation/federation.proto",
},
{
ExtendedType: (*descriptorpb.OneofOptions)(nil),
ExtensionType: (*OneofRule)(nil),
Field: 1187,
Name: "grpc.federation.oneof",
Tag: "bytes,1187,opt,name=oneof",
Filename: "grpc/federation/federation.proto",
},
}
// Extension fields to descriptorpb.FileOptions.
var (
// optional grpc.federation.FileRule file = 1187;
E_File = &file_grpc_federation_federation_proto_extTypes[0]
)
// Extension fields to descriptorpb.ServiceOptions.
var (
// optional grpc.federation.ServiceRule service = 1187;
E_Service = &file_grpc_federation_federation_proto_extTypes[1]
)
// Extension fields to descriptorpb.MethodOptions.
var (
// optional grpc.federation.MethodRule method = 1187;
E_Method = &file_grpc_federation_federation_proto_extTypes[2]
)
// Extension fields to descriptorpb.MessageOptions.
var (
// optional grpc.federation.MessageRule message = 1187;
E_Message = &file_grpc_federation_federation_proto_extTypes[3]
)
// Extension fields to descriptorpb.FieldOptions.
var (
// optional grpc.federation.FieldRule field = 1187;
E_Field = &file_grpc_federation_federation_proto_extTypes[4]
)
// Extension fields to descriptorpb.EnumOptions.
var (
// optional grpc.federation.EnumRule enum = 1187;
E_Enum = &file_grpc_federation_federation_proto_extTypes[5]
)
// Extension fields to descriptorpb.EnumValueOptions.
var (
// optional grpc.federation.EnumValueRule enum_value = 1187;
E_EnumValue = &file_grpc_federation_federation_proto_extTypes[6]
)
// Extension fields to descriptorpb.OneofOptions.
var (
// optional grpc.federation.OneofRule oneof = 1187;
E_Oneof = &file_grpc_federation_federation_proto_extTypes[7]
)
var File_grpc_federation_federation_proto protoreflect.FileDescriptor
var file_grpc_federation_federation_proto_rawDesc = []byte{
0x0a, 0x20, 0x67, 0x72, 0x70, 0x63, 0x2f, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f,
0x6e, 0x2f, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f,
0x74, 0x6f, 0x12, 0x0f, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74,
0x69, 0x6f, 0x6e, 0x1a, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x2e,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x15, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x72, 0x70,
0x63, 0x2f, 0x63, 0x6f, 0x64, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f,
0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x72, 0x70, 0x63, 0x2f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x64,
0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x67, 0x72,
0x70, 0x63, 0x2f, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x70, 0x72,
0x69, 0x76, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1a, 0x67, 0x72, 0x70,
0x63, 0x2f, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x74, 0x69, 0x6d,
0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x56, 0x0a, 0x08, 0x46, 0x69, 0x6c, 0x65, 0x52,
0x75, 0x6c, 0x65, 0x12, 0x32, 0x0a, 0x06, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x18, 0x01, 0x20,
0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72,
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x43, 0x45, 0x4c, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x52,
0x06, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x69, 0x6d, 0x70, 0x6f, 0x72,
0x74, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x69, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x22,
0x20, 0x0a, 0x08, 0x45, 0x6e, 0x75, 0x6d, 0x52, 0x75, 0x6c, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x61,
0x6c, 0x69, 0x61, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x61, 0x6c, 0x69, 0x61,
0x73, 0x22, 0xb4, 0x01, 0x0a, 0x0d, 0x45, 0x6e, 0x75, 0x6d, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52,
0x75, 0x6c, 0x65, 0x12, 0x1d, 0x0a, 0x07, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x18, 0x01,
0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x07, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x88,
0x01, 0x01, 0x12, 0x14, 0x0a, 0x05, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28,
0x09, 0x52, 0x05, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x12, 0x37, 0x0a, 0x04, 0x61, 0x74, 0x74, 0x72,
0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65,
0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x56, 0x61, 0x6c,
0x75, 0x65, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x52, 0x04, 0x61, 0x74, 0x74,
0x72, 0x12, 0x1d, 0x0a, 0x07, 0x6e, 0x6f, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x18, 0x04, 0x20, 0x01,
0x28, 0x08, 0x48, 0x01, 0x52, 0x07, 0x6e, 0x6f, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x88, 0x01, 0x01,
0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x42, 0x0a, 0x0a, 0x08,
0x5f, 0x6e, 0x6f, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x22, 0x3e, 0x0a, 0x12, 0x45, 0x6e, 0x75, 0x6d,
0x56, 0x61, 0x6c, 0x75, 0x65, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 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, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28,
0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x0b, 0x0a, 0x09, 0x4f, 0x6e, 0x65, 0x6f,
0x66, 0x52, 0x75, 0x6c, 0x65, 0x22, 0x69, 0x0a, 0x0b, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65,
0x52, 0x75, 0x6c, 0x65, 0x12, 0x26, 0x0a, 0x03, 0x65, 0x6e, 0x76, 0x18, 0x01, 0x20, 0x01, 0x28,
0x0b, 0x32, 0x14, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74,
0x69, 0x6f, 0x6e, 0x2e, 0x45, 0x6e, 0x76, 0x52, 0x03, 0x65, 0x6e, 0x76, 0x12, 0x32, 0x0a, 0x03,
0x76, 0x61, 0x72, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x67, 0x72, 0x70, 0x63,
0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x53, 0x65, 0x72, 0x76,
0x69, 0x63, 0x65, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x03, 0x76, 0x61, 0x72,
0x22, 0x4a, 0x0a, 0x03, 0x45, 0x6e, 0x76, 0x12, 0x29, 0x0a, 0x03, 0x76, 0x61, 0x72, 0x18, 0x01,
0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65,
0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x45, 0x6e, 0x76, 0x56, 0x61, 0x72, 0x52, 0x03, 0x76,
0x61, 0x72, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20,
0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x8b, 0x03, 0x0a,
0x0f, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65,
0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01,
0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x13, 0x0a, 0x02, 0x69, 0x66, 0x18,
0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x02, 0x52, 0x02, 0x69, 0x66, 0x88, 0x01, 0x01, 0x12, 0x10,
0x0a, 0x02, 0x62, 0x79, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x02, 0x62, 0x79,
0x12, 0x2c, 0x0a, 0x03, 0x6d, 0x61, 0x70, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e,
0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e,
0x4d, 0x61, 0x70, 0x45, 0x78, 0x70, 0x72, 0x48, 0x00, 0x52, 0x03, 0x6d, 0x61, 0x70, 0x12, 0x38,
0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32,
0x1c, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f,
0x6e, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x45, 0x78, 0x70, 0x72, 0x48, 0x00, 0x52,
0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x50, 0x0a, 0x0a, 0x76, 0x61, 0x6c, 0x69,
0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x67,
0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x53,
0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x56, 0x61,
0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x78, 0x70, 0x72, 0x48, 0x00, 0x52, 0x0a,
0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2f, 0x0a, 0x04, 0x65, 0x6e,
0x75, 0x6d, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e,
0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x45,
0x78, 0x70, 0x72, 0x48, 0x00, 0x52, 0x04, 0x65, 0x6e, 0x75, 0x6d, 0x12, 0x35, 0x0a, 0x06, 0x73,
0x77, 0x69, 0x74, 0x63, 0x68, 0x18, 0x10, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x72,
0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x53, 0x77,
0x69, 0x74, 0x63, 0x68, 0x45, 0x78, 0x70, 0x72, 0x48, 0x00, 0x52, 0x06, 0x73, 0x77, 0x69, 0x74,
0x63, 0x68, 0x42, 0x06, 0x0a, 0x04, 0x65, 0x78, 0x70, 0x72, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e,
0x61, 0x6d, 0x65, 0x42, 0x05, 0x0a, 0x03, 0x5f, 0x69, 0x66, 0x22, 0x49, 0x0a, 0x1d, 0x53, 0x65,
0x72, 0x76, 0x69, 0x63, 0x65, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x56, 0x61, 0x6c,
0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x78, 0x70, 0x72, 0x12, 0x0e, 0x0a, 0x02, 0x69,
0x66, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x66, 0x12, 0x18, 0x0a, 0x07, 0x6d,
0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65,
0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x91, 0x01, 0x0a, 0x06, 0x45, 0x6e, 0x76, 0x56, 0x61, 0x72,
0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04,
0x6e, 0x61, 0x6d, 0x65, 0x12, 0x2c, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01,
0x28, 0x0b, 0x32, 0x18, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61,
0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x45, 0x6e, 0x76, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79,
0x70, 0x65, 0x12, 0x3a, 0x0a, 0x06, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01,
0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61,
0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x45, 0x6e, 0x76, 0x56, 0x61, 0x72, 0x4f, 0x70, 0x74, 0x69, 0x6f,
0x6e, 0x48, 0x00, 0x52, 0x06, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x88, 0x01, 0x01, 0x42, 0x09,
0x0a, 0x07, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xab, 0x01, 0x0a, 0x07, 0x45, 0x6e,
0x76, 0x54, 0x79, 0x70, 0x65, 0x12, 0x2f, 0x0a, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x18, 0x01, 0x20,
0x01, 0x28, 0x0e, 0x32, 0x19, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72,
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x4b, 0x69, 0x6e, 0x64, 0x48, 0x00,
0x52, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x12, 0x36, 0x0a, 0x08, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74,
0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e,
0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x45, 0x6e, 0x76, 0x54, 0x79,
0x70, 0x65, 0x48, 0x00, 0x52, 0x08, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x12, 0x2f,
0x0a, 0x03, 0x6d, 0x61, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x72,
0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x45, 0x6e,
0x76, 0x4d, 0x61, 0x70, 0x54, 0x79, 0x70, 0x65, 0x48, 0x00, 0x52, 0x03, 0x6d, 0x61, 0x70, 0x42,
0x06, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x22, 0x68, 0x0a, 0x0a, 0x45, 0x6e, 0x76, 0x4d, 0x61,
0x70, 0x54, 0x79, 0x70, 0x65, 0x12, 0x2a, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01,
0x28, 0x0b, 0x32, 0x18, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61,
0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x45, 0x6e, 0x76, 0x54, 0x79, 0x70, 0x65, 0x52, 0x03, 0x6b, 0x65,
0x79, 0x12, 0x2e, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b,
0x32, 0x18, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69,
0x6f, 0x6e, 0x2e, 0x45, 0x6e, 0x76, 0x54, 0x79, 0x70, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75,
0x65, 0x22, 0xc3, 0x01, 0x0a, 0x0c, 0x45, 0x6e, 0x76, 0x56, 0x61, 0x72, 0x4f, 0x70, 0x74, 0x69,
0x6f, 0x6e, 0x12, 0x21, 0x0a, 0x09, 0x61, 0x6c, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x74, 0x65, 0x18,
0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x09, 0x61, 0x6c, 0x74, 0x65, 0x72, 0x6e, 0x61,
0x74, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1d, 0x0a, 0x07, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74,
0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x07, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c,
0x74, 0x88, 0x01, 0x01, 0x12, 0x1f, 0x0a, 0x08, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64,
0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x48, 0x02, 0x52, 0x08, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72,
0x65, 0x64, 0x88, 0x01, 0x01, 0x12, 0x1d, 0x0a, 0x07, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x64,
0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x48, 0x03, 0x52, 0x07, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65,
0x64, 0x88, 0x01, 0x01, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x61, 0x6c, 0x74, 0x65, 0x72, 0x6e, 0x61,
0x74, 0x65, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x42, 0x0b,
0x0a, 0x09, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x42, 0x0a, 0x0a, 0x08, 0x5f,
0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x64, 0x22, 0x65, 0x0a, 0x0a, 0x4d, 0x65, 0x74, 0x68, 0x6f,
0x64, 0x52, 0x75, 0x6c, 0x65, 0x12, 0x1d, 0x0a, 0x07, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74,
0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x07, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75,
0x74, 0x88, 0x01, 0x01, 0x12, 0x1f, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e,
0x73, 0x65, 0x88, 0x01, 0x01, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75,
0x74, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x9c,
0x01, 0x0a, 0x0b, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x75, 0x6c, 0x65, 0x12, 0x35,
0x0a, 0x03, 0x64, 0x65, 0x66, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x67, 0x72,
0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x56, 0x61,
0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e,
0x52, 0x03, 0x64, 0x65, 0x66, 0x12, 0x2c, 0x0a, 0x0f, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x5f,
0x72, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00,
0x52, 0x0e, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x52, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x72,
0x88, 0x01, 0x01, 0x12, 0x14, 0x0a, 0x05, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x18, 0x03, 0x20, 0x03,
0x28, 0x09, 0x52, 0x05, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x42, 0x12, 0x0a, 0x10, 0x5f, 0x63, 0x75,
0x73, 0x74, 0x6f, 0x6d, 0x5f, 0x72, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x72, 0x22, 0xde, 0x03,
0x0a, 0x12, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69,
0x74, 0x69, 0x6f, 0x6e, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01,
0x28, 0x09, 0x48, 0x01, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x13, 0x0a,
0x02, 0x69, 0x66, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x02, 0x52, 0x02, 0x69, 0x66, 0x88,
0x01, 0x01, 0x12, 0x1f, 0x0a, 0x08, 0x61, 0x75, 0x74, 0x6f, 0x62, 0x69, 0x6e, 0x64, 0x18, 0x03,
0x20, 0x01, 0x28, 0x08, 0x48, 0x03, 0x52, 0x08, 0x61, 0x75, 0x74, 0x6f, 0x62, 0x69, 0x6e, 0x64,
0x88, 0x01, 0x01, 0x12, 0x10, 0x0a, 0x02, 0x62, 0x79, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x48,
0x00, 0x52, 0x02, 0x62, 0x79, 0x12, 0x2c, 0x0a, 0x03, 0x6d, 0x61, 0x70, 0x18, 0x0c, 0x20, 0x01,
0x28, 0x0b, 0x32, 0x18, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61,
0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x4d, 0x61, 0x70, 0x45, 0x78, 0x70, 0x72, 0x48, 0x00, 0x52, 0x03,
0x6d, 0x61, 0x70, 0x12, 0x38, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x0d,
0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65,
0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x45, 0x78,
0x70, 0x72, 0x48, 0x00, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x2f, 0x0a,
0x04, 0x63, 0x61, 0x6c, 0x6c, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x72,
0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x43, 0x61,
0x6c, 0x6c, 0x45, 0x78, 0x70, 0x72, 0x48, 0x00, 0x52, 0x04, 0x63, 0x61, 0x6c, 0x6c, 0x12, 0x41,
0x0a, 0x0a, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x0f, 0x20, 0x01,
0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61,
0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45,
0x78, 0x70, 0x72, 0x48, 0x00, 0x52, 0x0a, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f,
0x6e, 0x12, 0x2f, 0x0a, 0x04, 0x65, 0x6e, 0x75, 0x6d, 0x18, 0x10, 0x20, 0x01, 0x28, 0x0b, 0x32,
0x19, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f,
0x6e, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x45, 0x78, 0x70, 0x72, 0x48, 0x00, 0x52, 0x04, 0x65, 0x6e,
0x75, 0x6d, 0x12, 0x35, 0x0a, 0x06, 0x73, 0x77, 0x69, 0x74, 0x63, 0x68, 0x18, 0x11, 0x20, 0x01,
0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61,
0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x53, 0x77, 0x69, 0x74, 0x63, 0x68, 0x45, 0x78, 0x70, 0x72, 0x48,
0x00, 0x52, 0x06, 0x73, 0x77, 0x69, 0x74, 0x63, 0x68, 0x42, 0x06, 0x0a, 0x04, 0x65, 0x78, 0x70,
0x72, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x05, 0x0a, 0x03, 0x5f, 0x69,
0x66, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x61, 0x75, 0x74, 0x6f, 0x62, 0x69, 0x6e, 0x64, 0x22, 0xc5,
0x01, 0x0a, 0x07, 0x4d, 0x61, 0x70, 0x45, 0x78, 0x70, 0x72, 0x12, 0x35, 0x0a, 0x08, 0x69, 0x74,
0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67,
0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x49,
0x74, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x08, 0x69, 0x74, 0x65, 0x72, 0x61, 0x74, 0x6f,
0x72, 0x12, 0x10, 0x0a, 0x02, 0x62, 0x79, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52,
0x02, 0x62, 0x79, 0x12, 0x38, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x0c,
0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65,
0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x45, 0x78,
0x70, 0x72, 0x48, 0x00, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x2f, 0x0a,
0x04, 0x65, 0x6e, 0x75, 0x6d, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x72,
0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x45, 0x6e,
0x75, 0x6d, 0x45, 0x78, 0x70, 0x72, 0x48, 0x00, 0x52, 0x04, 0x65, 0x6e, 0x75, 0x6d, 0x42, 0x06,
0x0a, 0x04, 0x65, 0x78, 0x70, 0x72, 0x22, 0x30, 0x0a, 0x08, 0x49, 0x74, 0x65, 0x72, 0x61, 0x74,
0x6f, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x73, 0x72, 0x63, 0x18, 0x02, 0x20,
0x01, 0x28, 0x09, 0x52, 0x03, 0x73, 0x72, 0x63, 0x22, 0x50, 0x0a, 0x0b, 0x4d, 0x65, 0x73, 0x73,
0x61, 0x67, 0x65, 0x45, 0x78, 0x70, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18,
0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x2d, 0x0a, 0x04, 0x61,
0x72, 0x67, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x72, 0x70, 0x63,
0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x41, 0x72, 0x67, 0x75,
0x6d, 0x65, 0x6e, 0x74, 0x52, 0x04, 0x61, 0x72, 0x67, 0x73, 0x22, 0x2e, 0x0a, 0x08, 0x45, 0x6e,
0x75, 0x6d, 0x45, 0x78, 0x70, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01,
0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x62, 0x79,
0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x62, 0x79, 0x22, 0xf3, 0x02, 0x0a, 0x08, 0x43,
0x61, 0x6c, 0x6c, 0x45, 0x78, 0x70, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f,
0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12,
0x38, 0x0a, 0x07, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b,
0x32, 0x1e, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69,
0x6f, 0x6e, 0x2e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
0x52, 0x07, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x07, 0x74, 0x69, 0x6d,
0x65, 0x6f, 0x75, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x07, 0x74, 0x69,
0x6d, 0x65, 0x6f, 0x75, 0x74, 0x88, 0x01, 0x01, 0x12, 0x37, 0x0a, 0x05, 0x72, 0x65, 0x74, 0x72,
0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66,
0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x52, 0x65, 0x74, 0x72, 0x79, 0x50,
0x6f, 0x6c, 0x69, 0x63, 0x79, 0x48, 0x01, 0x52, 0x05, 0x72, 0x65, 0x74, 0x72, 0x79, 0x88, 0x01,
0x01, 0x12, 0x30, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b,
0x32, 0x1a, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69,
0x6f, 0x6e, 0x2e, 0x47, 0x52, 0x50, 0x43, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x05, 0x65, 0x72,
0x72, 0x6f, 0x72, 0x12, 0x3c, 0x0a, 0x06, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x06, 0x20,
0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72,
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x47, 0x52, 0x50, 0x43, 0x43, 0x61, 0x6c, 0x6c, 0x4f, 0x70,
0x74, 0x69, 0x6f, 0x6e, 0x48, 0x02, 0x52, 0x06, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x88, 0x01,
0x01, 0x12, 0x1f, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x07, 0x20,
0x01, 0x28, 0x09, 0x48, 0x03, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x88,
0x01, 0x01, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x42, 0x08,
0x0a, 0x06, 0x5f, 0x72, 0x65, 0x74, 0x72, 0x79, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6f, 0x70, 0x74,
0x69, 0x6f, 0x6e, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61,
0x22, 0x7f, 0x0a, 0x0a, 0x53, 0x77, 0x69, 0x74, 0x63, 0x68, 0x45, 0x78, 0x70, 0x72, 0x12, 0x33,
0x0a, 0x04, 0x63, 0x61, 0x73, 0x65, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x67,
0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x53,
0x77, 0x69, 0x74, 0x63, 0x68, 0x43, 0x61, 0x73, 0x65, 0x45, 0x78, 0x70, 0x72, 0x52, 0x04, 0x63,
0x61, 0x73, 0x65, 0x12, 0x3c, 0x0a, 0x07, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x18, 0x02,
0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65,
0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x53, 0x77, 0x69, 0x74, 0x63, 0x68, 0x44, 0x65, 0x66,
0x61, 0x75, 0x6c, 0x74, 0x45, 0x78, 0x70, 0x72, 0x52, 0x07, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c,
0x74, 0x22, 0x71, 0x0a, 0x0e, 0x53, 0x77, 0x69, 0x74, 0x63, 0x68, 0x43, 0x61, 0x73, 0x65, 0x45,
0x78, 0x70, 0x72, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x66, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
0x02, 0x69, 0x66, 0x12, 0x35, 0x0a, 0x03, 0x64, 0x65, 0x66, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b,
0x32, 0x23, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69,
0x6f, 0x6e, 0x2e, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x44, 0x65, 0x66, 0x69, 0x6e,
0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x03, 0x64, 0x65, 0x66, 0x12, 0x10, 0x0a, 0x02, 0x62, 0x79,
0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x02, 0x62, 0x79, 0x42, 0x06, 0x0a, 0x04,
0x65, 0x78, 0x70, 0x72, 0x22, 0x64, 0x0a, 0x11, 0x53, 0x77, 0x69, 0x74, 0x63, 0x68, 0x44, 0x65,
0x66, 0x61, 0x75, 0x6c, 0x74, 0x45, 0x78, 0x70, 0x72, 0x12, 0x35, 0x0a, 0x03, 0x64, 0x65, 0x66,
0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65,
0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c,
0x65, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x03, 0x64, 0x65, 0x66,
0x12, 0x10, 0x0a, 0x02, 0x62, 0x79, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x02,
0x62, 0x79, 0x42, 0x06, 0x0a, 0x04, 0x65, 0x78, 0x70, 0x72, 0x22, 0x86, 0x04, 0x0a, 0x09, 0x47,
0x52, 0x50, 0x43, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x35, 0x0a, 0x03, 0x64, 0x65, 0x66, 0x18,
0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64,
0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65,
0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x03, 0x64, 0x65, 0x66, 0x12,
0x13, 0x0a, 0x02, 0x69, 0x66, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x02, 0x69,
0x66, 0x88, 0x01, 0x01, 0x12, 0x29, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x03, 0x20, 0x01,
0x28, 0x0e, 0x32, 0x10, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x72, 0x70, 0x63, 0x2e,
0x43, 0x6f, 0x64, 0x65, 0x48, 0x01, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x88, 0x01, 0x01, 0x12,
0x1d, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09,
0x48, 0x02, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x88, 0x01, 0x01, 0x12, 0x3a,
0x0a, 0x07, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32,
0x20, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f,
0x6e, 0x2e, 0x47, 0x52, 0x50, 0x43, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x44, 0x65, 0x74, 0x61, 0x69,
0x6c, 0x52, 0x07, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x12, 0x1b, 0x0a, 0x06, 0x69, 0x67,
0x6e, 0x6f, 0x72, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x48, 0x03, 0x52, 0x06, 0x69, 0x67,
0x6e, 0x6f, 0x72, 0x65, 0x88, 0x01, 0x01, 0x12, 0x33, 0x0a, 0x13, 0x69, 0x67, 0x6e, 0x6f, 0x72,
0x65, 0x5f, 0x61, 0x6e, 0x64, 0x5f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x07,
0x20, 0x01, 0x28, 0x09, 0x48, 0x04, 0x52, 0x11, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x41, 0x6e,
0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x88, 0x01, 0x01, 0x12, 0x45, 0x0a, 0x09,
0x6c, 0x6f, 0x67, 0x5f, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0e, 0x32,
0x23, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f,
0x6e, 0x2e, 0x47, 0x52, 0x50, 0x43, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x2e, 0x4c, 0x6f, 0x67, 0x4c,
0x65, 0x76, 0x65, 0x6c, 0x48, 0x05, 0x52, 0x08, 0x6c, 0x6f, 0x67, 0x4c, 0x65, 0x76, 0x65, 0x6c,
0x88, 0x01, 0x01, 0x22, 0x41, 0x0a, 0x08, 0x4c, 0x6f, 0x67, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x12,
0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05,
0x44, 0x45, 0x42, 0x55, 0x47, 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, 0x49, 0x4e, 0x46, 0x4f, 0x10,
0x02, 0x12, 0x08, 0x0a, 0x04, 0x57, 0x41, 0x52, 0x4e, 0x10, 0x03, 0x12, 0x09, 0x0a, 0x05, 0x45,
0x52, 0x52, 0x4f, 0x52, 0x10, 0x04, 0x42, 0x05, 0x0a, 0x03, 0x5f, 0x69, 0x66, 0x42, 0x07, 0x0a,
0x05, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61,
0x67, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x42, 0x16, 0x0a,
0x14, 0x5f, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x5f, 0x61, 0x6e, 0x64, 0x5f, 0x72, 0x65, 0x73,
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x6c, 0x6f, 0x67, 0x5f, 0x6c, 0x65,
0x76, 0x65, 0x6c, 0x22, 0xfa, 0x05, 0x0a, 0x0f, 0x47, 0x52, 0x50, 0x43, 0x45, 0x72, 0x72, 0x6f,
0x72, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x66, 0x18, 0x01, 0x20,
0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x66, 0x12, 0x35, 0x0a, 0x03, 0x64, 0x65, 0x66, 0x18, 0x02,
0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65,
0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x44,
0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x03, 0x64, 0x65, 0x66, 0x12, 0x36,
0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32,
0x1c, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f,
0x6e, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x45, 0x78, 0x70, 0x72, 0x52, 0x07, 0x6d,
0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x34, 0x0a, 0x0a, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f,
0x69, 0x6e, 0x66, 0x6f, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x67, 0x6f, 0x6f,
0x67, 0x6c, 0x65, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x49, 0x6e, 0x66,
0x6f, 0x52, 0x09, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x34, 0x0a, 0x0a,
0x72, 0x65, 0x74, 0x72, 0x79, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b,
0x32, 0x15, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x52, 0x65,
0x74, 0x72, 0x79, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x09, 0x72, 0x65, 0x74, 0x72, 0x79, 0x49, 0x6e,
0x66, 0x6f, 0x12, 0x34, 0x0a, 0x0a, 0x64, 0x65, 0x62, 0x75, 0x67, 0x5f, 0x69, 0x6e, 0x66, 0x6f,
0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e,
0x72, 0x70, 0x63, 0x2e, 0x44, 0x65, 0x62, 0x75, 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x09, 0x64,
0x65, 0x62, 0x75, 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x3d, 0x0a, 0x0d, 0x71, 0x75, 0x6f, 0x74,
0x61, 0x5f, 0x66, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32,
0x18, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x51, 0x75, 0x6f,
0x74, 0x61, 0x46, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x52, 0x0c, 0x71, 0x75, 0x6f, 0x74, 0x61,
0x46, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x12, 0x52, 0x0a, 0x14, 0x70, 0x72, 0x65, 0x63, 0x6f,
0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x66, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x18,
0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x72,
0x70, 0x63, 0x2e, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x46,
0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x52, 0x13, 0x70, 0x72, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x69,
0x74, 0x69, 0x6f, 0x6e, 0x46, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x12, 0x37, 0x0a, 0x0b, 0x62,
0x61, 0x64, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b,
0x32, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x42, 0x61,
0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x0a, 0x62, 0x61, 0x64, 0x52, 0x65, 0x71,
0x75, 0x65, 0x73, 0x74, 0x12, 0x3a, 0x0a, 0x0c, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f,
0x69, 0x6e, 0x66, 0x6f, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f,
0x67, 0x6c, 0x65, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x49,
0x6e, 0x66, 0x6f, 0x52, 0x0b, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, 0x6e, 0x66, 0x6f,
0x12, 0x3d, 0x0a, 0x0d, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x69, 0x6e, 0x66,
0x6f, 0x18, 0x0b, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,
0x2e, 0x72, 0x70, 0x63, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x6e, 0x66,
0x6f, 0x52, 0x0c, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12,
0x24, 0x0a, 0x04, 0x68, 0x65, 0x6c, 0x70, 0x18, 0x0c, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e,
0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x48, 0x65, 0x6c, 0x70, 0x52,
0x04, 0x68, 0x65, 0x6c, 0x70, 0x12, 0x49, 0x0a, 0x11, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x69, 0x7a,
0x65, 0x64, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x0d, 0x20, 0x03, 0x28, 0x0b,
0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x6f,
0x63, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x10,
0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65,
0x12, 0x0e, 0x0a, 0x02, 0x62, 0x79, 0x18, 0x0e, 0x20, 0x03, 0x28, 0x09, 0x52, 0x02, 0x62, 0x79,
0x22, 0xc7, 0x03, 0x0a, 0x0e, 0x47, 0x52, 0x50, 0x43, 0x43, 0x61, 0x6c, 0x6c, 0x4f, 0x70, 0x74,
0x69, 0x6f, 0x6e, 0x12, 0x2c, 0x0a, 0x0f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x5f, 0x73,
0x75, 0x62, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0e,
0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x53, 0x75, 0x62, 0x74, 0x79, 0x70, 0x65, 0x88, 0x01,
0x01, 0x12, 0x1b, 0x0a, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28,
0x09, 0x48, 0x01, 0x52, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x88, 0x01, 0x01, 0x12, 0x37,
0x0a, 0x16, 0x6d, 0x61, 0x78, 0x5f, 0x63, 0x61, 0x6c, 0x6c, 0x5f, 0x72, 0x65, 0x63, 0x76, 0x5f,
0x6d, 0x73, 0x67, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x48, 0x02,
0x52, 0x12, 0x6d, 0x61, 0x78, 0x43, 0x61, 0x6c, 0x6c, 0x52, 0x65, 0x63, 0x76, 0x4d, 0x73, 0x67,
0x53, 0x69, 0x7a, 0x65, 0x88, 0x01, 0x01, 0x12, 0x37, 0x0a, 0x16, 0x6d, 0x61, 0x78, 0x5f, 0x63,
0x61, 0x6c, 0x6c, 0x5f, 0x73, 0x65, 0x6e, 0x64, 0x5f, 0x6d, 0x73, 0x67, 0x5f, 0x73, 0x69, 0x7a,
0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x48, 0x03, 0x52, 0x12, 0x6d, 0x61, 0x78, 0x43, 0x61,
0x6c, 0x6c, 0x53, 0x65, 0x6e, 0x64, 0x4d, 0x73, 0x67, 0x53, 0x69, 0x7a, 0x65, 0x88, 0x01, 0x01,
0x12, 0x28, 0x0a, 0x0d, 0x73, 0x74, 0x61, 0x74, 0x69, 0x63, 0x5f, 0x6d, 0x65, 0x74, 0x68, 0x6f,
0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x48, 0x04, 0x52, 0x0c, 0x73, 0x74, 0x61, 0x74, 0x69,
0x63, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x88, 0x01, 0x01, 0x12, 0x1d, 0x0a, 0x07, 0x74, 0x72,
0x61, 0x69, 0x6c, 0x65, 0x72, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x48, 0x05, 0x52, 0x07, 0x74,
0x72, 0x61, 0x69, 0x6c, 0x65, 0x72, 0x88, 0x01, 0x01, 0x12, 0x29, 0x0a, 0x0e, 0x77, 0x61, 0x69,
0x74, 0x5f, 0x66, 0x6f, 0x72, 0x5f, 0x72, 0x65, 0x61, 0x64, 0x79, 0x18, 0x07, 0x20, 0x01, 0x28,
0x08, 0x48, 0x06, 0x52, 0x0c, 0x77, 0x61, 0x69, 0x74, 0x46, 0x6f, 0x72, 0x52, 0x65, 0x61, 0x64,
0x79, 0x88, 0x01, 0x01, 0x42, 0x12, 0x0a, 0x10, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74,
0x5f, 0x73, 0x75, 0x62, 0x74, 0x79, 0x70, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x68, 0x65, 0x61,
0x64, 0x65, 0x72, 0x42, 0x19, 0x0a, 0x17, 0x5f, 0x6d, 0x61, 0x78, 0x5f, 0x63, 0x61, 0x6c, 0x6c,
0x5f, 0x72, 0x65, 0x63, 0x76, 0x5f, 0x6d, 0x73, 0x67, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x42, 0x19,
0x0a, 0x17, 0x5f, 0x6d, 0x61, 0x78, 0x5f, 0x63, 0x61, 0x6c, 0x6c, 0x5f, 0x73, 0x65, 0x6e, 0x64,
0x5f, 0x6d, 0x73, 0x67, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x42, 0x10, 0x0a, 0x0e, 0x5f, 0x73, 0x74,
0x61, 0x74, 0x69, 0x63, 0x5f, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x42, 0x0a, 0x0a, 0x08, 0x5f,
0x74, 0x72, 0x61, 0x69, 0x6c, 0x65, 0x72, 0x42, 0x11, 0x0a, 0x0f, 0x5f, 0x77, 0x61, 0x69, 0x74,
0x5f, 0x66, 0x6f, 0x72, 0x5f, 0x72, 0x65, 0x61, 0x64, 0x79, 0x22, 0x64, 0x0a, 0x0e, 0x56, 0x61,
0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x78, 0x70, 0x72, 0x12, 0x17, 0x0a, 0x04,
0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61,
0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x30, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x02,
0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65,
0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x47, 0x52, 0x50, 0x43, 0x45, 0x72, 0x72, 0x6f, 0x72,
0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65,
0x22, 0xb8, 0x01, 0x0a, 0x0b, 0x52, 0x65, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79,
0x12, 0x42, 0x0a, 0x08, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01,
0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61,
0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x52, 0x65, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79,
0x43, 0x6f, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x08, 0x63, 0x6f, 0x6e, 0x73,
0x74, 0x61, 0x6e, 0x74, 0x12, 0x4b, 0x0a, 0x0b, 0x65, 0x78, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74,
0x69, 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x67, 0x72, 0x70, 0x63,
0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x52, 0x65, 0x74, 0x72,
0x79, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x45, 0x78, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x69,
0x61, 0x6c, 0x48, 0x00, 0x52, 0x0b, 0x65, 0x78, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x69, 0x61,
0x6c, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x66, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69,
0x66, 0x42, 0x08, 0x0a, 0x06, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x22, 0x79, 0x0a, 0x13, 0x52,
0x65, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x61,
0x6e, 0x74, 0x12, 0x1f, 0x0a, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x01,
0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c,
0x88, 0x01, 0x01, 0x12, 0x24, 0x0a, 0x0b, 0x6d, 0x61, 0x78, 0x5f, 0x72, 0x65, 0x74, 0x72, 0x69,
0x65, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x48, 0x01, 0x52, 0x0a, 0x6d, 0x61, 0x78, 0x52,
0x65, 0x74, 0x72, 0x69, 0x65, 0x73, 0x88, 0x01, 0x01, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x69, 0x6e,
0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x6d, 0x61, 0x78, 0x5f, 0x72,
0x65, 0x74, 0x72, 0x69, 0x65, 0x73, 0x22, 0xd1, 0x02, 0x0a, 0x16, 0x52, 0x65, 0x74, 0x72, 0x79,
0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x45, 0x78, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x69, 0x61,
0x6c, 0x12, 0x2e, 0x0a, 0x10, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x5f, 0x69, 0x6e, 0x74,
0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0f, 0x69,
0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x88, 0x01,
0x01, 0x12, 0x36, 0x0a, 0x14, 0x72, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x69, 0x7a, 0x61, 0x74, 0x69,
0x6f, 0x6e, 0x5f, 0x66, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x01, 0x48,
0x01, 0x52, 0x13, 0x72, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e,
0x46, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x88, 0x01, 0x01, 0x12, 0x23, 0x0a, 0x0a, 0x6d, 0x75, 0x6c,
0x74, 0x69, 0x70, 0x6c, 0x69, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x01, 0x48, 0x02, 0x52,
0x0a, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x69, 0x65, 0x72, 0x88, 0x01, 0x01, 0x12, 0x26,
0x0a, 0x0c, 0x6d, 0x61, 0x78, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x04,
0x20, 0x01, 0x28, 0x09, 0x48, 0x03, 0x52, 0x0b, 0x6d, 0x61, 0x78, 0x49, 0x6e, 0x74, 0x65, 0x72,
0x76, 0x61, 0x6c, 0x88, 0x01, 0x01, 0x12, 0x24, 0x0a, 0x0b, 0x6d, 0x61, 0x78, 0x5f, 0x72, 0x65,
0x74, 0x72, 0x69, 0x65, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x48, 0x04, 0x52, 0x0a, 0x6d,
0x61, 0x78, 0x52, 0x65, 0x74, 0x72, 0x69, 0x65, 0x73, 0x88, 0x01, 0x01, 0x42, 0x13, 0x0a, 0x11,
0x5f, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61,
0x6c, 0x42, 0x17, 0x0a, 0x15, 0x5f, 0x72, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x69, 0x7a, 0x61, 0x74,
0x69, 0x6f, 0x6e, 0x5f, 0x66, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x6d,
0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x69, 0x65, 0x72, 0x42, 0x0f, 0x0a, 0x0d, 0x5f, 0x6d, 0x61,
0x78, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x6d,
0x61, 0x78, 0x5f, 0x72, 0x65, 0x74, 0x72, 0x69, 0x65, 0x73, 0x22, 0x5d, 0x0a, 0x0d, 0x4d, 0x65,
0x74, 0x68, 0x6f, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x66,
0x69, 0x65, 0x6c, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x66, 0x69, 0x65, 0x6c,
0x64, 0x12, 0x13, 0x0a, 0x02, 0x62, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52,
0x02, 0x62, 0x79, 0x88, 0x01, 0x01, 0x12, 0x13, 0x0a, 0x02, 0x69, 0x66, 0x18, 0x03, 0x20, 0x01,
0x28, 0x09, 0x48, 0x01, 0x52, 0x02, 0x69, 0x66, 0x88, 0x01, 0x01, 0x42, 0x05, 0x0a, 0x03, 0x5f,
0x62, 0x79, 0x42, 0x05, 0x0a, 0x03, 0x5f, 0x69, 0x66, 0x22, 0x85, 0x01, 0x0a, 0x0e, 0x4d, 0x65,
0x74, 0x68, 0x6f, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x17, 0x0a, 0x04,
0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61,
0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x18, 0x02,
0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x05, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x88, 0x01, 0x01,
0x12, 0x1f, 0x0a, 0x08, 0x61, 0x75, 0x74, 0x6f, 0x62, 0x69, 0x6e, 0x64, 0x18, 0x03, 0x20, 0x01,
0x28, 0x08, 0x48, 0x02, 0x52, 0x08, 0x61, 0x75, 0x74, 0x6f, 0x62, 0x69, 0x6e, 0x64, 0x88, 0x01,
0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x66,
0x69, 0x65, 0x6c, 0x64, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x61, 0x75, 0x74, 0x6f, 0x62, 0x69, 0x6e,
0x64, 0x22, 0x62, 0x0a, 0x08, 0x41, 0x72, 0x67, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x12, 0x0a,
0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d,
0x65, 0x12, 0x13, 0x0a, 0x02, 0x62, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52,
0x02, 0x62, 0x79, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x69, 0x6e, 0x6c, 0x69, 0x6e, 0x65,
0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x06, 0x69, 0x6e, 0x6c, 0x69, 0x6e, 0x65,
0x88, 0x01, 0x01, 0x42, 0x05, 0x0a, 0x03, 0x5f, 0x62, 0x79, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x69,
0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x22, 0xf2, 0x01, 0x0a, 0x09, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x52,
0x75, 0x6c, 0x65, 0x12, 0x2c, 0x0a, 0x0f, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x5f, 0x72, 0x65,
0x73, 0x6f, 0x6c, 0x76, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x0e,
0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x52, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x72, 0x88, 0x01,
0x01, 0x12, 0x13, 0x0a, 0x02, 0x62, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52,
0x02, 0x62, 0x79, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x18,
0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x02, 0x52, 0x05, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x88, 0x01,
0x01, 0x12, 0x31, 0x0a, 0x05, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b,
0x32, 0x1b, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69,
0x6f, 0x6e, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x6e, 0x65, 0x6f, 0x66, 0x52, 0x05, 0x6f,
0x6e, 0x65, 0x6f, 0x66, 0x12, 0x2f, 0x0a, 0x03, 0x65, 0x6e, 0x76, 0x18, 0x05, 0x20, 0x01, 0x28,
0x0b, 0x32, 0x1d, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74,
0x69, 0x6f, 0x6e, 0x2e, 0x45, 0x6e, 0x76, 0x56, 0x61, 0x72, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e,
0x52, 0x03, 0x65, 0x6e, 0x76, 0x42, 0x12, 0x0a, 0x10, 0x5f, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d,
0x5f, 0x72, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x72, 0x42, 0x05, 0x0a, 0x03, 0x5f, 0x62, 0x79,
0x42, 0x08, 0x0a, 0x06, 0x5f, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x22, 0x89, 0x01, 0x0a, 0x0a, 0x46,
0x69, 0x65, 0x6c, 0x64, 0x4f, 0x6e, 0x65, 0x6f, 0x66, 0x12, 0x10, 0x0a, 0x02, 0x69, 0x66, 0x18,
0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x02, 0x69, 0x66, 0x12, 0x1a, 0x0a, 0x07, 0x64,
0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x07,
0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x12, 0x35, 0x0a, 0x03, 0x64, 0x65, 0x66, 0x18, 0x03,
0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65,
0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x44,
0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x03, 0x64, 0x65, 0x66, 0x12, 0x0e,
0x0a, 0x02, 0x62, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x62, 0x79, 0x42, 0x06,
0x0a, 0x04, 0x63, 0x6f, 0x6e, 0x64, 0x22, 0x45, 0x0a, 0x09, 0x43, 0x45, 0x4c, 0x50, 0x6c, 0x75,
0x67, 0x69, 0x6e, 0x12, 0x38, 0x0a, 0x06, 0x65, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x01, 0x20,
0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72,
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x43, 0x45, 0x4c, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x45,
0x78, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x06, 0x65, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x22, 0xaf, 0x02,
0x0a, 0x0f, 0x43, 0x45, 0x4c, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x45, 0x78, 0x70, 0x6f, 0x72,
0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x65, 0x73, 0x63, 0x18, 0x02, 0x20,
0x01, 0x28, 0x09, 0x52, 0x04, 0x64, 0x65, 0x73, 0x63, 0x12, 0x36, 0x0a, 0x05, 0x74, 0x79, 0x70,
0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e,
0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x43, 0x45, 0x4c, 0x52, 0x65,
0x63, 0x65, 0x69, 0x76, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x52, 0x05, 0x74, 0x79, 0x70, 0x65,
0x73, 0x12, 0x3a, 0x0a, 0x09, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x04,
0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65,
0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x43, 0x45, 0x4c, 0x46, 0x75, 0x6e, 0x63, 0x74, 0x69,
0x6f, 0x6e, 0x52, 0x09, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x3a, 0x0a,
0x09, 0x76, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b,
0x32, 0x1c, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69,
0x6f, 0x6e, 0x2e, 0x43, 0x45, 0x4c, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x09,
0x76, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x12, 0x44, 0x0a, 0x0a, 0x63, 0x61, 0x70,
0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e,
0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e,
0x43, 0x45, 0x4c, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c,
0x69, 0x74, 0x79, 0x52, 0x0a, 0x63, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x22,
0x9b, 0x02, 0x0a, 0x13, 0x43, 0x45, 0x4c, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x43, 0x61, 0x70,
0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x12, 0x3e, 0x0a, 0x03, 0x65, 0x6e, 0x76, 0x18, 0x01,
0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65,
0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x43, 0x45, 0x4c, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e,
0x45, 0x6e, 0x76, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x48, 0x00, 0x52,
0x03, 0x65, 0x6e, 0x76, 0x88, 0x01, 0x01, 0x12, 0x54, 0x0a, 0x0b, 0x66, 0x69, 0x6c, 0x65, 0x5f,
0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x67,
0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x43,
0x45, 0x4c, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x46, 0x69, 0x6c, 0x65, 0x53, 0x79, 0x73, 0x74,
0x65, 0x6d, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x48, 0x01, 0x52, 0x0a,
0x66, 0x69, 0x6c, 0x65, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x88, 0x01, 0x01, 0x12, 0x4a, 0x0a,
0x07, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b,
0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e,
0x2e, 0x43, 0x45, 0x4c, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72,
0x6b, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x48, 0x02, 0x52, 0x07, 0x6e,
0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x88, 0x01, 0x01, 0x42, 0x06, 0x0a, 0x04, 0x5f, 0x65, 0x6e,
0x76, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x73, 0x79, 0x73, 0x74, 0x65,
0x6d, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x22, 0x40, 0x0a,
0x16, 0x43, 0x45, 0x4c, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x45, 0x6e, 0x76, 0x43, 0x61, 0x70,
0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x61, 0x6c, 0x6c, 0x18, 0x01,
0x20, 0x01, 0x28, 0x08, 0x52, 0x03, 0x61, 0x6c, 0x6c, 0x12, 0x14, 0x0a, 0x05, 0x6e, 0x61, 0x6d,
0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x22,
0x3e, 0x0a, 0x1d, 0x43, 0x45, 0x4c, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x46, 0x69, 0x6c, 0x65,
0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79,
0x12, 0x1d, 0x0a, 0x0a, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01,
0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x50, 0x61, 0x74, 0x68, 0x22,
0x1c, 0x0a, 0x1a, 0x43, 0x45, 0x4c, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x4e, 0x65, 0x74, 0x77,
0x6f, 0x72, 0x6b, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x22, 0xa1, 0x01,
0x0a, 0x0b, 0x43, 0x45, 0x4c, 0x46, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a,
0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d,
0x65, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x65, 0x73, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52,
0x04, 0x64, 0x65, 0x73, 0x63, 0x12, 0x38, 0x0a, 0x04, 0x61, 0x72, 0x67, 0x73, 0x18, 0x03, 0x20,
0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72,
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x43, 0x45, 0x4c, 0x46, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f,
0x6e, 0x41, 0x72, 0x67, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x04, 0x61, 0x72, 0x67, 0x73, 0x12,
0x30, 0x0a, 0x06, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32,
0x18, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f,
0x6e, 0x2e, 0x43, 0x45, 0x4c, 0x54, 0x79, 0x70, 0x65, 0x52, 0x06, 0x72, 0x65, 0x74, 0x75, 0x72,
0x6e, 0x22, 0x71, 0x0a, 0x0f, 0x43, 0x45, 0x4c, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x72,
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, 0x12, 0x0a, 0x04, 0x64, 0x65, 0x73, 0x63,
0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x64, 0x65, 0x73, 0x63, 0x12, 0x36, 0x0a, 0x07,
0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e,
0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e,
0x43, 0x45, 0x4c, 0x46, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x6d, 0x65, 0x74,
0x68, 0x6f, 0x64, 0x73, 0x22, 0x6b, 0x0a, 0x13, 0x43, 0x45, 0x4c, 0x46, 0x75, 0x6e, 0x63, 0x74,
0x69, 0x6f, 0x6e, 0x41, 0x72, 0x67, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e,
0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12,
0x12, 0x0a, 0x04, 0x64, 0x65, 0x73, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x64,
0x65, 0x73, 0x63, 0x12, 0x2c, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28,
0x0b, 0x32, 0x18, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74,
0x69, 0x6f, 0x6e, 0x2e, 0x43, 0x45, 0x4c, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70,
0x65, 0x22, 0xdd, 0x01, 0x0a, 0x07, 0x43, 0x45, 0x4c, 0x54, 0x79, 0x70, 0x65, 0x12, 0x2f, 0x0a,
0x04, 0x6b, 0x69, 0x6e, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x19, 0x2e, 0x67, 0x72,
0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x54, 0x79,
0x70, 0x65, 0x4b, 0x69, 0x6e, 0x64, 0x48, 0x00, 0x52, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x12, 0x36,
0x0a, 0x08, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b,
0x32, 0x18, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69,
0x6f, 0x6e, 0x2e, 0x43, 0x45, 0x4c, 0x54, 0x79, 0x70, 0x65, 0x48, 0x00, 0x52, 0x08, 0x72, 0x65,
0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x12, 0x2f, 0x0a, 0x03, 0x6d, 0x61, 0x70, 0x18, 0x03, 0x20,
0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72,
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x43, 0x45, 0x4c, 0x4d, 0x61, 0x70, 0x54, 0x79, 0x70, 0x65,
0x48, 0x00, 0x52, 0x03, 0x6d, 0x61, 0x70, 0x12, 0x1a, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61,
0x67, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73,
0x61, 0x67, 0x65, 0x12, 0x14, 0x0a, 0x04, 0x65, 0x6e, 0x75, 0x6d, 0x18, 0x05, 0x20, 0x01, 0x28,
0x09, 0x48, 0x00, 0x52, 0x04, 0x65, 0x6e, 0x75, 0x6d, 0x42, 0x06, 0x0a, 0x04, 0x74, 0x79, 0x70,
0x65, 0x22, 0x68, 0x0a, 0x0a, 0x43, 0x45, 0x4c, 0x4d, 0x61, 0x70, 0x54, 0x79, 0x70, 0x65, 0x12,
0x2a, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x67,
0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x43,
0x45, 0x4c, 0x54, 0x79, 0x70, 0x65, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x2e, 0x0a, 0x05, 0x76,
0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x67, 0x72, 0x70,
0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x43, 0x45, 0x4c,
0x54, 0x79, 0x70, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x63, 0x0a, 0x0b, 0x43,
0x45, 0x4c, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61,
0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x12,
0x0a, 0x04, 0x64, 0x65, 0x73, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x64, 0x65,
0x73, 0x63, 0x12, 0x2c, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b,
0x32, 0x18, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69,
0x6f, 0x6e, 0x2e, 0x43, 0x45, 0x4c, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65,
0x2a, 0x5e, 0x0a, 0x08, 0x54, 0x79, 0x70, 0x65, 0x4b, 0x69, 0x6e, 0x64, 0x12, 0x0b, 0x0a, 0x07,
0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x53, 0x54, 0x52,
0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, 0x42, 0x4f, 0x4f, 0x4c, 0x10, 0x02, 0x12,
0x09, 0x0a, 0x05, 0x49, 0x4e, 0x54, 0x36, 0x34, 0x10, 0x03, 0x12, 0x0a, 0x0a, 0x06, 0x55, 0x49,
0x4e, 0x54, 0x36, 0x34, 0x10, 0x04, 0x12, 0x0a, 0x0a, 0x06, 0x44, 0x4f, 0x55, 0x42, 0x4c, 0x45,
0x10, 0x05, 0x12, 0x0c, 0x0a, 0x08, 0x44, 0x55, 0x52, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x06,
0x3a, 0x4c, 0x0a, 0x04, 0x66, 0x69, 0x6c, 0x65, 0x12, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c,
0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x4f,
0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xa3, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e,
0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e,
0x46, 0x69, 0x6c, 0x65, 0x52, 0x75, 0x6c, 0x65, 0x52, 0x04, 0x66, 0x69, 0x6c, 0x65, 0x3a, 0x58,
0x0a, 0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x1f, 0x2e, 0x67, 0x6f, 0x6f, 0x67,
0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x65, 0x72, 0x76,
0x69, 0x63, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xa3, 0x09, 0x20, 0x01, 0x28,
0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74,
0x69, 0x6f, 0x6e, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x75, 0x6c, 0x65, 0x52,
0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x3a, 0x54, 0x0a, 0x06, 0x6d, 0x65, 0x74, 0x68,
0x6f, 0x64, 0x12, 0x1e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f,
0x6e, 0x73, 0x18, 0xa3, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x72, 0x70, 0x63,
0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x4d, 0x65, 0x74, 0x68,
0x6f, 0x64, 0x52, 0x75, 0x6c, 0x65, 0x52, 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x3a, 0x58,
0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x1f, 0x2e, 0x67, 0x6f, 0x6f, 0x67,
0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4d, 0x65, 0x73, 0x73,
0x61, 0x67, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xa3, 0x09, 0x20, 0x01, 0x28,
0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74,
0x69, 0x6f, 0x6e, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x75, 0x6c, 0x65, 0x52,
0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x3a, 0x50, 0x0a, 0x05, 0x66, 0x69, 0x65, 0x6c,
0x64, 0x12, 0x1d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73,
0x18, 0xa3, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66,
0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x52,
0x75, 0x6c, 0x65, 0x52, 0x05, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x3a, 0x4c, 0x0a, 0x04, 0x65, 0x6e,
0x75, 0x6d, 0x12, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73,
0x18, 0xa3, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66,
0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x52, 0x75,
0x6c, 0x65, 0x52, 0x04, 0x65, 0x6e, 0x75, 0x6d, 0x3a, 0x61, 0x0a, 0x0a, 0x65, 0x6e, 0x75, 0x6d,
0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x21, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x56, 0x61, 0x6c,
0x75, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xa3, 0x09, 0x20, 0x01, 0x28, 0x0b,
0x32, 0x1e, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69,
0x6f, 0x6e, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x75, 0x6c, 0x65,
0x52, 0x09, 0x65, 0x6e, 0x75, 0x6d, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x50, 0x0a, 0x05, 0x6f,
0x6e, 0x65, 0x6f, 0x66, 0x12, 0x1d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4f, 0x6e, 0x65, 0x6f, 0x66, 0x4f, 0x70, 0x74, 0x69,
0x6f, 0x6e, 0x73, 0x18, 0xa3, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x72, 0x70,
0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x4f, 0x6e, 0x65,
0x6f, 0x66, 0x52, 0x75, 0x6c, 0x65, 0x52, 0x05, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x42, 0xc2, 0x01,
0x0a, 0x13, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72,
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x0f, 0x46, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f,
0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3d, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62,
0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6d, 0x65, 0x72, 0x63, 0x61, 0x72, 0x69, 0x2f, 0x67, 0x72, 0x70,
0x63, 0x2d, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x67, 0x72, 0x70,
0x63, 0x2f, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x3b, 0x66, 0x65, 0x64,
0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0xa2, 0x02, 0x03, 0x47, 0x46, 0x58, 0xaa, 0x02, 0x0f,
0x47, 0x72, 0x70, 0x63, 0x2e, 0x46, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0xca,
0x02, 0x0f, 0x47, 0x72, 0x70, 0x63, 0x5c, 0x46, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f,
0x6e, 0xe2, 0x02, 0x1b, 0x47, 0x72, 0x70, 0x63, 0x5c, 0x46, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74,
0x69, 0x6f, 0x6e, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea,
0x02, 0x10, 0x47, 0x72, 0x70, 0x63, 0x3a, 0x3a, 0x46, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69,
0x6f, 0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_grpc_federation_federation_proto_rawDescOnce sync.Once
file_grpc_federation_federation_proto_rawDescData = file_grpc_federation_federation_proto_rawDesc
)
func file_grpc_federation_federation_proto_rawDescGZIP() []byte {
file_grpc_federation_federation_proto_rawDescOnce.Do(func() {
file_grpc_federation_federation_proto_rawDescData = protoimpl.X.CompressGZIP(file_grpc_federation_federation_proto_rawDescData)
})
return file_grpc_federation_federation_proto_rawDescData
}
var file_grpc_federation_federation_proto_enumTypes = make([]protoimpl.EnumInfo, 2)
var file_grpc_federation_federation_proto_msgTypes = make([]protoimpl.MessageInfo, 48)
var file_grpc_federation_federation_proto_goTypes = []interface{}{
(TypeKind)(0), // 0: grpc.federation.TypeKind
(GRPCError_LogLevel)(0), // 1: grpc.federation.GRPCError.LogLevel
(*FileRule)(nil), // 2: grpc.federation.FileRule
(*EnumRule)(nil), // 3: grpc.federation.EnumRule
(*EnumValueRule)(nil), // 4: grpc.federation.EnumValueRule
(*EnumValueAttribute)(nil), // 5: grpc.federation.EnumValueAttribute
(*OneofRule)(nil), // 6: grpc.federation.OneofRule
(*ServiceRule)(nil), // 7: grpc.federation.ServiceRule
(*Env)(nil), // 8: grpc.federation.Env
(*ServiceVariable)(nil), // 9: grpc.federation.ServiceVariable
(*ServiceVariableValidationExpr)(nil), // 10: grpc.federation.ServiceVariableValidationExpr
(*EnvVar)(nil), // 11: grpc.federation.EnvVar
(*EnvType)(nil), // 12: grpc.federation.EnvType
(*EnvMapType)(nil), // 13: grpc.federation.EnvMapType
(*EnvVarOption)(nil), // 14: grpc.federation.EnvVarOption
(*MethodRule)(nil), // 15: grpc.federation.MethodRule
(*MessageRule)(nil), // 16: grpc.federation.MessageRule
(*VariableDefinition)(nil), // 17: grpc.federation.VariableDefinition
(*MapExpr)(nil), // 18: grpc.federation.MapExpr
(*Iterator)(nil), // 19: grpc.federation.Iterator
(*MessageExpr)(nil), // 20: grpc.federation.MessageExpr
(*EnumExpr)(nil), // 21: grpc.federation.EnumExpr
(*CallExpr)(nil), // 22: grpc.federation.CallExpr
(*SwitchExpr)(nil), // 23: grpc.federation.SwitchExpr
(*SwitchCaseExpr)(nil), // 24: grpc.federation.SwitchCaseExpr
(*SwitchDefaultExpr)(nil), // 25: grpc.federation.SwitchDefaultExpr
(*GRPCError)(nil), // 26: grpc.federation.GRPCError
(*GRPCErrorDetail)(nil), // 27: grpc.federation.GRPCErrorDetail
(*GRPCCallOption)(nil), // 28: grpc.federation.GRPCCallOption
(*ValidationExpr)(nil), // 29: grpc.federation.ValidationExpr
(*RetryPolicy)(nil), // 30: grpc.federation.RetryPolicy
(*RetryPolicyConstant)(nil), // 31: grpc.federation.RetryPolicyConstant
(*RetryPolicyExponential)(nil), // 32: grpc.federation.RetryPolicyExponential
(*MethodRequest)(nil), // 33: grpc.federation.MethodRequest
(*MethodResponse)(nil), // 34: grpc.federation.MethodResponse
(*Argument)(nil), // 35: grpc.federation.Argument
(*FieldRule)(nil), // 36: grpc.federation.FieldRule
(*FieldOneof)(nil), // 37: grpc.federation.FieldOneof
(*CELPlugin)(nil), // 38: grpc.federation.CELPlugin
(*CELPluginExport)(nil), // 39: grpc.federation.CELPluginExport
(*CELPluginCapability)(nil), // 40: grpc.federation.CELPluginCapability
(*CELPluginEnvCapability)(nil), // 41: grpc.federation.CELPluginEnvCapability
(*CELPluginFileSystemCapability)(nil), // 42: grpc.federation.CELPluginFileSystemCapability
(*CELPluginNetworkCapability)(nil), // 43: grpc.federation.CELPluginNetworkCapability
(*CELFunction)(nil), // 44: grpc.federation.CELFunction
(*CELReceiverType)(nil), // 45: grpc.federation.CELReceiverType
(*CELFunctionArgument)(nil), // 46: grpc.federation.CELFunctionArgument
(*CELType)(nil), // 47: grpc.federation.CELType
(*CELMapType)(nil), // 48: grpc.federation.CELMapType
(*CELVariable)(nil), // 49: grpc.federation.CELVariable
(code.Code)(0), // 50: google.rpc.Code
(*errdetails.ErrorInfo)(nil), // 51: google.rpc.ErrorInfo
(*errdetails.RetryInfo)(nil), // 52: google.rpc.RetryInfo
(*errdetails.DebugInfo)(nil), // 53: google.rpc.DebugInfo
(*errdetails.QuotaFailure)(nil), // 54: google.rpc.QuotaFailure
(*errdetails.PreconditionFailure)(nil), // 55: google.rpc.PreconditionFailure
(*errdetails.BadRequest)(nil), // 56: google.rpc.BadRequest
(*errdetails.RequestInfo)(nil), // 57: google.rpc.RequestInfo
(*errdetails.ResourceInfo)(nil), // 58: google.rpc.ResourceInfo
(*errdetails.Help)(nil), // 59: google.rpc.Help
(*errdetails.LocalizedMessage)(nil), // 60: google.rpc.LocalizedMessage
(*descriptorpb.FileOptions)(nil), // 61: google.protobuf.FileOptions
(*descriptorpb.ServiceOptions)(nil), // 62: google.protobuf.ServiceOptions
(*descriptorpb.MethodOptions)(nil), // 63: google.protobuf.MethodOptions
(*descriptorpb.MessageOptions)(nil), // 64: google.protobuf.MessageOptions
(*descriptorpb.FieldOptions)(nil), // 65: google.protobuf.FieldOptions
(*descriptorpb.EnumOptions)(nil), // 66: google.protobuf.EnumOptions
(*descriptorpb.EnumValueOptions)(nil), // 67: google.protobuf.EnumValueOptions
(*descriptorpb.OneofOptions)(nil), // 68: google.protobuf.OneofOptions
}
var file_grpc_federation_federation_proto_depIdxs = []int32{
38, // 0: grpc.federation.FileRule.plugin:type_name -> grpc.federation.CELPlugin
5, // 1: grpc.federation.EnumValueRule.attr:type_name -> grpc.federation.EnumValueAttribute
8, // 2: grpc.federation.ServiceRule.env:type_name -> grpc.federation.Env
9, // 3: grpc.federation.ServiceRule.var:type_name -> grpc.federation.ServiceVariable
11, // 4: grpc.federation.Env.var:type_name -> grpc.federation.EnvVar
18, // 5: grpc.federation.ServiceVariable.map:type_name -> grpc.federation.MapExpr
20, // 6: grpc.federation.ServiceVariable.message:type_name -> grpc.federation.MessageExpr
10, // 7: grpc.federation.ServiceVariable.validation:type_name -> grpc.federation.ServiceVariableValidationExpr
21, // 8: grpc.federation.ServiceVariable.enum:type_name -> grpc.federation.EnumExpr
23, // 9: grpc.federation.ServiceVariable.switch:type_name -> grpc.federation.SwitchExpr
12, // 10: grpc.federation.EnvVar.type:type_name -> grpc.federation.EnvType
14, // 11: grpc.federation.EnvVar.option:type_name -> grpc.federation.EnvVarOption
0, // 12: grpc.federation.EnvType.kind:type_name -> grpc.federation.TypeKind
12, // 13: grpc.federation.EnvType.repeated:type_name -> grpc.federation.EnvType
13, // 14: grpc.federation.EnvType.map:type_name -> grpc.federation.EnvMapType
12, // 15: grpc.federation.EnvMapType.key:type_name -> grpc.federation.EnvType
12, // 16: grpc.federation.EnvMapType.value:type_name -> grpc.federation.EnvType
17, // 17: grpc.federation.MessageRule.def:type_name -> grpc.federation.VariableDefinition
18, // 18: grpc.federation.VariableDefinition.map:type_name -> grpc.federation.MapExpr
20, // 19: grpc.federation.VariableDefinition.message:type_name -> grpc.federation.MessageExpr
22, // 20: grpc.federation.VariableDefinition.call:type_name -> grpc.federation.CallExpr
29, // 21: grpc.federation.VariableDefinition.validation:type_name -> grpc.federation.ValidationExpr
21, // 22: grpc.federation.VariableDefinition.enum:type_name -> grpc.federation.EnumExpr
23, // 23: grpc.federation.VariableDefinition.switch:type_name -> grpc.federation.SwitchExpr
19, // 24: grpc.federation.MapExpr.iterator:type_name -> grpc.federation.Iterator
20, // 25: grpc.federation.MapExpr.message:type_name -> grpc.federation.MessageExpr
21, // 26: grpc.federation.MapExpr.enum:type_name -> grpc.federation.EnumExpr
35, // 27: grpc.federation.MessageExpr.args:type_name -> grpc.federation.Argument
33, // 28: grpc.federation.CallExpr.request:type_name -> grpc.federation.MethodRequest
30, // 29: grpc.federation.CallExpr.retry:type_name -> grpc.federation.RetryPolicy
26, // 30: grpc.federation.CallExpr.error:type_name -> grpc.federation.GRPCError
28, // 31: grpc.federation.CallExpr.option:type_name -> grpc.federation.GRPCCallOption
24, // 32: grpc.federation.SwitchExpr.case:type_name -> grpc.federation.SwitchCaseExpr
25, // 33: grpc.federation.SwitchExpr.default:type_name -> grpc.federation.SwitchDefaultExpr
17, // 34: grpc.federation.SwitchCaseExpr.def:type_name -> grpc.federation.VariableDefinition
17, // 35: grpc.federation.SwitchDefaultExpr.def:type_name -> grpc.federation.VariableDefinition
17, // 36: grpc.federation.GRPCError.def:type_name -> grpc.federation.VariableDefinition
50, // 37: grpc.federation.GRPCError.code:type_name -> google.rpc.Code
27, // 38: grpc.federation.GRPCError.details:type_name -> grpc.federation.GRPCErrorDetail
1, // 39: grpc.federation.GRPCError.log_level:type_name -> grpc.federation.GRPCError.LogLevel
17, // 40: grpc.federation.GRPCErrorDetail.def:type_name -> grpc.federation.VariableDefinition
20, // 41: grpc.federation.GRPCErrorDetail.message:type_name -> grpc.federation.MessageExpr
51, // 42: grpc.federation.GRPCErrorDetail.error_info:type_name -> google.rpc.ErrorInfo
52, // 43: grpc.federation.GRPCErrorDetail.retry_info:type_name -> google.rpc.RetryInfo
53, // 44: grpc.federation.GRPCErrorDetail.debug_info:type_name -> google.rpc.DebugInfo
54, // 45: grpc.federation.GRPCErrorDetail.quota_failure:type_name -> google.rpc.QuotaFailure
55, // 46: grpc.federation.GRPCErrorDetail.precondition_failure:type_name -> google.rpc.PreconditionFailure
56, // 47: grpc.federation.GRPCErrorDetail.bad_request:type_name -> google.rpc.BadRequest
57, // 48: grpc.federation.GRPCErrorDetail.request_info:type_name -> google.rpc.RequestInfo
58, // 49: grpc.federation.GRPCErrorDetail.resource_info:type_name -> google.rpc.ResourceInfo
59, // 50: grpc.federation.GRPCErrorDetail.help:type_name -> google.rpc.Help
60, // 51: grpc.federation.GRPCErrorDetail.localized_message:type_name -> google.rpc.LocalizedMessage
26, // 52: grpc.federation.ValidationExpr.error:type_name -> grpc.federation.GRPCError
31, // 53: grpc.federation.RetryPolicy.constant:type_name -> grpc.federation.RetryPolicyConstant
32, // 54: grpc.federation.RetryPolicy.exponential:type_name -> grpc.federation.RetryPolicyExponential
37, // 55: grpc.federation.FieldRule.oneof:type_name -> grpc.federation.FieldOneof
14, // 56: grpc.federation.FieldRule.env:type_name -> grpc.federation.EnvVarOption
17, // 57: grpc.federation.FieldOneof.def:type_name -> grpc.federation.VariableDefinition
39, // 58: grpc.federation.CELPlugin.export:type_name -> grpc.federation.CELPluginExport
45, // 59: grpc.federation.CELPluginExport.types:type_name -> grpc.federation.CELReceiverType
44, // 60: grpc.federation.CELPluginExport.functions:type_name -> grpc.federation.CELFunction
49, // 61: grpc.federation.CELPluginExport.variables:type_name -> grpc.federation.CELVariable
40, // 62: grpc.federation.CELPluginExport.capability:type_name -> grpc.federation.CELPluginCapability
41, // 63: grpc.federation.CELPluginCapability.env:type_name -> grpc.federation.CELPluginEnvCapability
42, // 64: grpc.federation.CELPluginCapability.file_system:type_name -> grpc.federation.CELPluginFileSystemCapability
43, // 65: grpc.federation.CELPluginCapability.network:type_name -> grpc.federation.CELPluginNetworkCapability
46, // 66: grpc.federation.CELFunction.args:type_name -> grpc.federation.CELFunctionArgument
47, // 67: grpc.federation.CELFunction.return:type_name -> grpc.federation.CELType
44, // 68: grpc.federation.CELReceiverType.methods:type_name -> grpc.federation.CELFunction
47, // 69: grpc.federation.CELFunctionArgument.type:type_name -> grpc.federation.CELType
0, // 70: grpc.federation.CELType.kind:type_name -> grpc.federation.TypeKind
47, // 71: grpc.federation.CELType.repeated:type_name -> grpc.federation.CELType
48, // 72: grpc.federation.CELType.map:type_name -> grpc.federation.CELMapType
47, // 73: grpc.federation.CELMapType.key:type_name -> grpc.federation.CELType
47, // 74: grpc.federation.CELMapType.value:type_name -> grpc.federation.CELType
47, // 75: grpc.federation.CELVariable.type:type_name -> grpc.federation.CELType
61, // 76: grpc.federation.file:extendee -> google.protobuf.FileOptions
62, // 77: grpc.federation.service:extendee -> google.protobuf.ServiceOptions
63, // 78: grpc.federation.method:extendee -> google.protobuf.MethodOptions
64, // 79: grpc.federation.message:extendee -> google.protobuf.MessageOptions
65, // 80: grpc.federation.field:extendee -> google.protobuf.FieldOptions
66, // 81: grpc.federation.enum:extendee -> google.protobuf.EnumOptions
67, // 82: grpc.federation.enum_value:extendee -> google.protobuf.EnumValueOptions
68, // 83: grpc.federation.oneof:extendee -> google.protobuf.OneofOptions
2, // 84: grpc.federation.file:type_name -> grpc.federation.FileRule
7, // 85: grpc.federation.service:type_name -> grpc.federation.ServiceRule
15, // 86: grpc.federation.method:type_name -> grpc.federation.MethodRule
16, // 87: grpc.federation.message:type_name -> grpc.federation.MessageRule
36, // 88: grpc.federation.field:type_name -> grpc.federation.FieldRule
3, // 89: grpc.federation.enum:type_name -> grpc.federation.EnumRule
4, // 90: grpc.federation.enum_value:type_name -> grpc.federation.EnumValueRule
6, // 91: grpc.federation.oneof:type_name -> grpc.federation.OneofRule
92, // [92:92] is the sub-list for method output_type
92, // [92:92] is the sub-list for method input_type
84, // [84:92] is the sub-list for extension type_name
76, // [76:84] is the sub-list for extension extendee
0, // [0:76] is the sub-list for field type_name
}
func init() { file_grpc_federation_federation_proto_init() }
func file_grpc_federation_federation_proto_init() {
if File_grpc_federation_federation_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_grpc_federation_federation_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*FileRule); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*EnumRule); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*EnumValueRule); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*EnumValueAttribute); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*OneofRule); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ServiceRule); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Env); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ServiceVariable); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ServiceVariableValidationExpr); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*EnvVar); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*EnvType); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*EnvMapType); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*EnvVarOption); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*MethodRule); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*MessageRule); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*VariableDefinition); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*MapExpr); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Iterator); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*MessageExpr); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*EnumExpr); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CallExpr); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*SwitchExpr); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*SwitchCaseExpr); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*SwitchDefaultExpr); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GRPCError); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GRPCErrorDetail); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GRPCCallOption); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ValidationExpr); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[28].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*RetryPolicy); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[29].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*RetryPolicyConstant); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[30].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*RetryPolicyExponential); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[31].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*MethodRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[32].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*MethodResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[33].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Argument); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[34].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*FieldRule); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[35].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*FieldOneof); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[36].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CELPlugin); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[37].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CELPluginExport); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[38].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CELPluginCapability); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[39].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CELPluginEnvCapability); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[40].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CELPluginFileSystemCapability); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[41].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CELPluginNetworkCapability); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[42].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CELFunction); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[43].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CELReceiverType); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[44].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CELFunctionArgument); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[45].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CELType); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[46].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CELMapType); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[47].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CELVariable); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
file_grpc_federation_federation_proto_msgTypes[2].OneofWrappers = []interface{}{}
file_grpc_federation_federation_proto_msgTypes[7].OneofWrappers = []interface{}{
(*ServiceVariable_By)(nil),
(*ServiceVariable_Map)(nil),
(*ServiceVariable_Message)(nil),
(*ServiceVariable_Validation)(nil),
(*ServiceVariable_Enum)(nil),
(*ServiceVariable_Switch)(nil),
}
file_grpc_federation_federation_proto_msgTypes[9].OneofWrappers = []interface{}{}
file_grpc_federation_federation_proto_msgTypes[10].OneofWrappers = []interface{}{
(*EnvType_Kind)(nil),
(*EnvType_Repeated)(nil),
(*EnvType_Map)(nil),
}
file_grpc_federation_federation_proto_msgTypes[12].OneofWrappers = []interface{}{}
file_grpc_federation_federation_proto_msgTypes[13].OneofWrappers = []interface{}{}
file_grpc_federation_federation_proto_msgTypes[14].OneofWrappers = []interface{}{}
file_grpc_federation_federation_proto_msgTypes[15].OneofWrappers = []interface{}{
(*VariableDefinition_By)(nil),
(*VariableDefinition_Map)(nil),
(*VariableDefinition_Message)(nil),
(*VariableDefinition_Call)(nil),
(*VariableDefinition_Validation)(nil),
(*VariableDefinition_Enum)(nil),
(*VariableDefinition_Switch)(nil),
}
file_grpc_federation_federation_proto_msgTypes[16].OneofWrappers = []interface{}{
(*MapExpr_By)(nil),
(*MapExpr_Message)(nil),
(*MapExpr_Enum)(nil),
}
file_grpc_federation_federation_proto_msgTypes[20].OneofWrappers = []interface{}{}
file_grpc_federation_federation_proto_msgTypes[22].OneofWrappers = []interface{}{
(*SwitchCaseExpr_By)(nil),
}
file_grpc_federation_federation_proto_msgTypes[23].OneofWrappers = []interface{}{
(*SwitchDefaultExpr_By)(nil),
}
file_grpc_federation_federation_proto_msgTypes[24].OneofWrappers = []interface{}{}
file_grpc_federation_federation_proto_msgTypes[26].OneofWrappers = []interface{}{}
file_grpc_federation_federation_proto_msgTypes[27].OneofWrappers = []interface{}{}
file_grpc_federation_federation_proto_msgTypes[28].OneofWrappers = []interface{}{
(*RetryPolicy_Constant)(nil),
(*RetryPolicy_Exponential)(nil),
}
file_grpc_federation_federation_proto_msgTypes[29].OneofWrappers = []interface{}{}
file_grpc_federation_federation_proto_msgTypes[30].OneofWrappers = []interface{}{}
file_grpc_federation_federation_proto_msgTypes[31].OneofWrappers = []interface{}{}
file_grpc_federation_federation_proto_msgTypes[32].OneofWrappers = []interface{}{}
file_grpc_federation_federation_proto_msgTypes[33].OneofWrappers = []interface{}{}
file_grpc_federation_federation_proto_msgTypes[34].OneofWrappers = []interface{}{}
file_grpc_federation_federation_proto_msgTypes[35].OneofWrappers = []interface{}{
(*FieldOneof_If)(nil),
(*FieldOneof_Default)(nil),
}
file_grpc_federation_federation_proto_msgTypes[38].OneofWrappers = []interface{}{}
file_grpc_federation_federation_proto_msgTypes[45].OneofWrappers = []interface{}{
(*CELType_Kind)(nil),
(*CELType_Repeated)(nil),
(*CELType_Map)(nil),
(*CELType_Message)(nil),
(*CELType_Enum)(nil),
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_grpc_federation_federation_proto_rawDesc,
NumEnums: 2,
NumMessages: 48,
NumExtensions: 8,
NumServices: 0,
},
GoTypes: file_grpc_federation_federation_proto_goTypes,
DependencyIndexes: file_grpc_federation_federation_proto_depIdxs,
EnumInfos: file_grpc_federation_federation_proto_enumTypes,
MessageInfos: file_grpc_federation_federation_proto_msgTypes,
ExtensionInfos: file_grpc_federation_federation_proto_extTypes,
}.Build()
File_grpc_federation_federation_proto = out.File
file_grpc_federation_federation_proto_rawDesc = nil
file_grpc_federation_federation_proto_goTypes = nil
file_grpc_federation_federation_proto_depIdxs = nil
}
================================================
FILE: _examples/04_timeout/grpc-federation.yaml
================================================
imports:
- proto
src:
- proto
out: .
plugins:
- plugin: go
opt: paths=source_relative
- plugin: go-grpc
opt: paths=source_relative
- plugin: grpc-federation
opt: paths=source_relative
================================================
FILE: _examples/04_timeout/main_test.go
================================================
package main_test
import (
"context"
"fmt"
"log/slog"
"net"
"os"
"testing"
"time"
"go.opentelemetry.io/otel"
"go.opentelemetry.io/otel/attribute"
"go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc"
"go.opentelemetry.io/otel/propagation"
"go.opentelemetry.io/otel/sdk/resource"
sdktrace "go.opentelemetry.io/otel/sdk/trace"
semconv "go.opentelemetry.io/otel/semconv/v1.4.0"
"go.uber.org/goleak"
"google.golang.org/grpc"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/status"
"google.golang.org/grpc/test/bufconn"
"example/federation"
"example/post"
)
const bufSize = 1024
var (
listener *bufconn.Listener
postClient post.PostServiceClient
updateDone = make(chan struct{})
blockCh = make(chan struct{})
)
type clientConfig struct{}
func (c *clientConfig) Post_PostServiceClient(cfg federation.FederationServiceClientConfig) (post.PostServiceClient, error) {
return postClient, nil
}
type PostServer struct {
*post.UnimplementedPostServiceServer
}
func (s *PostServer) GetPost(ctx context.Context, req *post.GetPostRequest) (*post.GetPostResponse, error) {
<-blockCh
return &post.GetPostResponse{
Post: &post.Post{
Id: req.Id,
Title: "foo",
Content: "bar",
UserId: fmt.Sprintf("user:%s", req.Id),
},
}, nil
}
func (s *PostServer) UpdatePost(ctx context.Context, req *post.UpdatePostRequest) (*post.UpdatePostResponse, error) {
time.Sleep(2 * time.Second)
updateDone <- struct{}{}
return nil, nil
}
func (s *PostServer) DeletePost(ctx context.Context, req *post.DeletePostRequest) (*post.DeletePostResponse, error) {
time.Sleep(1 * time.Second)
return nil, status.New(codes.Internal, "failed to delete").Err()
}
func dialer(ctx context.Context, address string) (net.Conn, error) {
return listener.Dial()
}
func TestFederation(t *testing.T) {
defer goleak.VerifyNone(t)
ctx := context.Background()
listener = bufconn.Listen(bufSize)
if os.Getenv("ENABLE_JAEGER") != "" {
exporter, err := otlptracegrpc.New(ctx, otlptracegrpc.WithInsecure())
if err != nil {
t.Fatal(err)
}
tp := sdktrace.NewTracerProvider(
sdktrace.WithBatcher(exporter),
sdktrace.WithResource(
resource.NewWithAttributes(
semconv.SchemaURL,
semconv.ServiceNameKey.String("example04/timeout"),
semconv.ServiceVersionKey.String("1.0.0"),
attribute.String("environment", "dev"),
),
),
sdktrace.WithSampler(sdktrace.AlwaysSample()),
)
defer tp.Shutdown(ctx)
otel.SetTextMapPropagator(propagation.TraceContext{})
otel.SetTracerProvider(tp)
}
conn, err := grpc.DialContext(ctx, "", grpc.WithContextDialer(dialer), grpc.WithInsecure())
if err != nil {
t.Fatal(err)
}
defer conn.Close()
postClient = post.NewPostServiceClient(conn)
grpcServer := grpc.NewServer()
defer grpcServer.Stop()
logger := slog.New(slog.NewJSONHandler(os.Stdout, &slog.HandlerOptions{
Level: slog.LevelDebug,
}))
federationServer, err := federation.NewFederationService(federation.FederationServiceConfig{
Client: new(clientConfig),
Logger: logger,
})
if err != nil {
t.Fatal(err)
}
defer federation.CleanupFederationService(ctx, federationServer)
post.RegisterPostServiceServer(grpcServer, &PostServer{})
federation.RegisterFederationServiceServer(grpcServer, federationServer)
go func() {
if err := grpcServer.Serve(listener); err != nil {
t.Fatal(err)
}
}()
client := federation.NewFederationServiceClient(conn)
t.Run("GetPost", func(t *testing.T) {
if _, err := client.GetPost(ctx, &federation.GetPostRequest{
Id: "foo",
}); err == nil {
t.Fatal("expected error")
} else {
if status.Code(err) != codes.DeadlineExceeded {
t.Fatalf("unexpected status code: %v", err)
}
}
})
t.Run("UpdatePost", func(t *testing.T) {
_, err := client.UpdatePost(ctx, &federation.UpdatePostRequest{
Id: "foo",
})
if err == nil {
t.Fatal("expected error")
}
st, ok := status.FromError(err)
if !ok {
t.Fatal("failed to get gRPC status error")
}
if st.Code() != codes.Internal {
t.Fatalf("failed to get status code: %s", st.Code())
}
})
blockCh <- struct{}{}
<-updateDone
time.Sleep(100 * time.Millisecond)
}
================================================
FILE: _examples/04_timeout/post/post.pb.go
================================================
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.33.0
// protoc (unknown)
// source: post/post.proto
package post
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
type GetPostRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
}
func (x *GetPostRequest) Reset() {
*x = GetPostRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_post_post_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GetPostRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetPostRequest) ProtoMessage() {}
func (x *GetPostRequest) ProtoReflect() protoreflect.Message {
mi := &file_post_post_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GetPostRequest.ProtoReflect.Descriptor instead.
func (*GetPostRequest) Descriptor() ([]byte, []int) {
return file_post_post_proto_rawDescGZIP(), []int{0}
}
func (x *GetPostRequest) GetId() string {
if x != nil {
return x.Id
}
return ""
}
type GetPostResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Post *Post `protobuf:"bytes,1,opt,name=post,proto3" json:"post,omitempty"`
}
func (x *GetPostResponse) Reset() {
*x = GetPostResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_post_post_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GetPostResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetPostResponse) ProtoMessage() {}
func (x *GetPostResponse) ProtoReflect() protoreflect.Message {
mi := &file_post_post_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GetPostResponse.ProtoReflect.Descriptor instead.
func (*GetPostResponse) Descriptor() ([]byte, []int) {
return file_post_post_proto_rawDescGZIP(), []int{1}
}
func (x *GetPostResponse) GetPost() *Post {
if x != nil {
return x.Post
}
return nil
}
type Post struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
Title string `protobuf:"bytes,2,opt,name=title,proto3" json:"title,omitempty"`
Content string `protobuf:"bytes,3,opt,name=content,proto3" json:"content,omitempty"`
UserId string `protobuf:"bytes,4,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
}
func (x *Post) Reset() {
*x = Post{}
if protoimpl.UnsafeEnabled {
mi := &file_post_post_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Post) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Post) ProtoMessage() {}
func (x *Post) ProtoReflect() protoreflect.Message {
mi := &file_post_post_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Post.ProtoReflect.Descriptor instead.
func (*Post) Descriptor() ([]byte, []int) {
return file_post_post_proto_rawDescGZIP(), []int{2}
}
func (x *Post) GetId() string {
if x != nil {
return x.Id
}
return ""
}
func (x *Post) GetTitle() string {
if x != nil {
return x.Title
}
return ""
}
func (x *Post) GetContent() string {
if x != nil {
return x.Content
}
return ""
}
func (x *Post) GetUserId() string {
if x != nil {
return x.UserId
}
return ""
}
type UpdatePostRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
}
func (x *UpdatePostRequest) Reset() {
*x = UpdatePostRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_post_post_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *UpdatePostRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*UpdatePostRequest) ProtoMessage() {}
func (x *UpdatePostRequest) ProtoReflect() protoreflect.Message {
mi := &file_post_post_proto_msgTypes[3]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use UpdatePostRequest.ProtoReflect.Descriptor instead.
func (*UpdatePostRequest) Descriptor() ([]byte, []int) {
return file_post_post_proto_rawDescGZIP(), []int{3}
}
func (x *UpdatePostRequest) GetId() string {
if x != nil {
return x.Id
}
return ""
}
type UpdatePostResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
}
func (x *UpdatePostResponse) Reset() {
*x = UpdatePostResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_post_post_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *UpdatePostResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*UpdatePostResponse) ProtoMessage() {}
func (x *UpdatePostResponse) ProtoReflect() protoreflect.Message {
mi := &file_post_post_proto_msgTypes[4]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use UpdatePostResponse.ProtoReflect.Descriptor instead.
func (*UpdatePostResponse) Descriptor() ([]byte, []int) {
return file_post_post_proto_rawDescGZIP(), []int{4}
}
type DeletePostRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
}
func (x *DeletePostRequest) Reset() {
*x = DeletePostRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_post_post_proto_msgTypes[5]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *DeletePostRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*DeletePostRequest) ProtoMessage() {}
func (x *DeletePostRequest) ProtoReflect() protoreflect.Message {
mi := &file_post_post_proto_msgTypes[5]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use DeletePostRequest.ProtoReflect.Descriptor instead.
func (*DeletePostRequest) Descriptor() ([]byte, []int) {
return file_post_post_proto_rawDescGZIP(), []int{5}
}
func (x *DeletePostRequest) GetId() string {
if x != nil {
return x.Id
}
return ""
}
type DeletePostResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
}
func (x *DeletePostResponse) Reset() {
*x = DeletePostResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_post_post_proto_msgTypes[6]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *DeletePostResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*DeletePostResponse) ProtoMessage() {}
func (x *DeletePostResponse) ProtoReflect() protoreflect.Message {
mi := &file_post_post_proto_msgTypes[6]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use DeletePostResponse.ProtoReflect.Descriptor instead.
func (*DeletePostResponse) Descriptor() ([]byte, []int) {
return file_post_post_proto_rawDescGZIP(), []int{6}
}
var File_post_post_proto protoreflect.FileDescriptor
var file_post_post_proto_rawDesc = []byte{
0x0a, 0x0f, 0x70, 0x6f, 0x73, 0x74, 0x2f, 0x70, 0x6f, 0x73, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x12, 0x04, 0x70, 0x6f, 0x73, 0x74, 0x22, 0x20, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x50, 0x6f,
0x73, 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, 0x31, 0x0a, 0x0f, 0x47, 0x65, 0x74,
0x50, 0x6f, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1e, 0x0a, 0x04,
0x70, 0x6f, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x70, 0x6f, 0x73,
0x74, 0x2e, 0x50, 0x6f, 0x73, 0x74, 0x52, 0x04, 0x70, 0x6f, 0x73, 0x74, 0x22, 0x5f, 0x0a, 0x04,
0x50, 0x6f, 0x73, 0x74, 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, 0x18, 0x0a, 0x07, 0x63, 0x6f,
0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6e,
0x74, 0x65, 0x6e, 0x74, 0x12, 0x17, 0x0a, 0x07, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18,
0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x22, 0x23, 0x0a,
0x11, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x6f, 0x73, 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, 0x14, 0x0a, 0x12, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x6f, 0x73, 0x74,
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x23, 0x0a, 0x11, 0x44, 0x65, 0x6c, 0x65,
0x74, 0x65, 0x50, 0x6f, 0x73, 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, 0x14, 0x0a,
0x12, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x50, 0x6f, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f,
0x6e, 0x73, 0x65, 0x32, 0xcd, 0x01, 0x0a, 0x0b, 0x50, 0x6f, 0x73, 0x74, 0x53, 0x65, 0x72, 0x76,
0x69, 0x63, 0x65, 0x12, 0x38, 0x0a, 0x07, 0x47, 0x65, 0x74, 0x50, 0x6f, 0x73, 0x74, 0x12, 0x14,
0x2e, 0x70, 0x6f, 0x73, 0x74, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x6f, 0x73, 0x74, 0x52, 0x65, 0x71,
0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x70, 0x6f, 0x73, 0x74, 0x2e, 0x47, 0x65, 0x74, 0x50,
0x6f, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x41, 0x0a,
0x0a, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x6f, 0x73, 0x74, 0x12, 0x17, 0x2e, 0x70, 0x6f,
0x73, 0x74, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x6f, 0x73, 0x74, 0x52, 0x65, 0x71,
0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x70, 0x6f, 0x73, 0x74, 0x2e, 0x55, 0x70, 0x64, 0x61,
0x74, 0x65, 0x50, 0x6f, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00,
0x12, 0x41, 0x0a, 0x0a, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x50, 0x6f, 0x73, 0x74, 0x12, 0x17,
0x2e, 0x70, 0x6f, 0x73, 0x74, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x50, 0x6f, 0x73, 0x74,
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x70, 0x6f, 0x73, 0x74, 0x2e, 0x44,
0x65, 0x6c, 0x65, 0x74, 0x65, 0x50, 0x6f, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
0x65, 0x22, 0x00, 0x42, 0x58, 0x0a, 0x08, 0x63, 0x6f, 0x6d, 0x2e, 0x70, 0x6f, 0x73, 0x74, 0x42,
0x09, 0x50, 0x6f, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x11, 0x65, 0x78,
0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2f, 0x70, 0x6f, 0x73, 0x74, 0x3b, 0x70, 0x6f, 0x73, 0x74, 0xa2,
0x02, 0x03, 0x50, 0x58, 0x58, 0xaa, 0x02, 0x04, 0x50, 0x6f, 0x73, 0x74, 0xca, 0x02, 0x04, 0x50,
0x6f, 0x73, 0x74, 0xe2, 0x02, 0x10, 0x50, 0x6f, 0x73, 0x74, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65,
0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x04, 0x50, 0x6f, 0x73, 0x74, 0x62, 0x06, 0x70,
0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_post_post_proto_rawDescOnce sync.Once
file_post_post_proto_rawDescData = file_post_post_proto_rawDesc
)
func file_post_post_proto_rawDescGZIP() []byte {
file_post_post_proto_rawDescOnce.Do(func() {
file_post_post_proto_rawDescData = protoimpl.X.CompressGZIP(file_post_post_proto_rawDescData)
})
return file_post_post_proto_rawDescData
}
var file_post_post_proto_msgTypes = make([]protoimpl.MessageInfo, 7)
var file_post_post_proto_goTypes = []interface{}{
(*GetPostRequest)(nil), // 0: post.GetPostRequest
(*GetPostResponse)(nil), // 1: post.GetPostResponse
(*Post)(nil), // 2: post.Post
(*UpdatePostRequest)(nil), // 3: post.UpdatePostRequest
(*UpdatePostResponse)(nil), // 4: post.UpdatePostResponse
(*DeletePostRequest)(nil), // 5: post.DeletePostRequest
(*DeletePostResponse)(nil), // 6: post.DeletePostResponse
}
var file_post_post_proto_depIdxs = []int32{
2, // 0: post.GetPostResponse.post:type_name -> post.Post
0, // 1: post.PostService.GetPost:input_type -> post.GetPostRequest
3, // 2: post.PostService.UpdatePost:input_type -> post.UpdatePostRequest
5, // 3: post.PostService.DeletePost:input_type -> post.DeletePostRequest
1, // 4: post.PostService.GetPost:output_type -> post.GetPostResponse
4, // 5: post.PostService.UpdatePost:output_type -> post.UpdatePostResponse
6, // 6: post.PostService.DeletePost:output_type -> post.DeletePostResponse
4, // [4:7] is the sub-list for method output_type
1, // [1:4] is the sub-list for method input_type
1, // [1:1] is the sub-list for extension type_name
1, // [1:1] is the sub-list for extension extendee
0, // [0:1] is the sub-list for field type_name
}
func init() { file_post_post_proto_init() }
func file_post_post_proto_init() {
if File_post_post_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_post_post_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetPostRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_post_post_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetPostResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_post_post_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Post); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_post_post_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*UpdatePostRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_post_post_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*UpdatePostResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_post_post_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*DeletePostRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_post_post_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*DeletePostResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_post_post_proto_rawDesc,
NumEnums: 0,
NumMessages: 7,
NumExtensions: 0,
NumServices: 1,
},
GoTypes: file_post_post_proto_goTypes,
DependencyIndexes: file_post_post_proto_depIdxs,
MessageInfos: file_post_post_proto_msgTypes,
}.Build()
File_post_post_proto = out.File
file_post_post_proto_rawDesc = nil
file_post_post_proto_goTypes = nil
file_post_post_proto_depIdxs = nil
}
================================================
FILE: _examples/04_timeout/post/post_grpc.pb.go
================================================
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.3.0
// - protoc (unknown)
// source: post/post.proto
package post
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 (
PostService_GetPost_FullMethodName = "/post.PostService/GetPost"
PostService_UpdatePost_FullMethodName = "/post.PostService/UpdatePost"
PostService_DeletePost_FullMethodName = "/post.PostService/DeletePost"
)
// PostServiceClient is the client API for PostService 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 PostServiceClient interface {
GetPost(ctx context.Context, in *GetPostRequest, opts ...grpc.CallOption) (*GetPostResponse, error)
UpdatePost(ctx context.Context, in *UpdatePostRequest, opts ...grpc.CallOption) (*UpdatePostResponse, error)
DeletePost(ctx context.Context, in *DeletePostRequest, opts ...grpc.CallOption) (*DeletePostResponse, error)
}
type postServiceClient struct {
cc grpc.ClientConnInterface
}
func NewPostServiceClient(cc grpc.ClientConnInterface) PostServiceClient {
return &postServiceClient{cc}
}
func (c *postServiceClient) GetPost(ctx context.Context, in *GetPostRequest, opts ...grpc.CallOption) (*GetPostResponse, error) {
out := new(GetPostResponse)
err := c.cc.Invoke(ctx, PostService_GetPost_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *postServiceClient) UpdatePost(ctx context.Context, in *UpdatePostRequest, opts ...grpc.CallOption) (*UpdatePostResponse, error) {
out := new(UpdatePostResponse)
err := c.cc.Invoke(ctx, PostService_UpdatePost_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *postServiceClient) DeletePost(ctx context.Context, in *DeletePostRequest, opts ...grpc.CallOption) (*DeletePostResponse, error) {
out := new(DeletePostResponse)
err := c.cc.Invoke(ctx, PostService_DeletePost_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// PostServiceServer is the server API for PostService service.
// All implementations must embed UnimplementedPostServiceServer
// for forward compatibility
type PostServiceServer interface {
GetPost(context.Context, *GetPostRequest) (*GetPostResponse, error)
UpdatePost(context.Context, *UpdatePostRequest) (*UpdatePostResponse, error)
DeletePost(context.Context, *DeletePostRequest) (*DeletePostResponse, error)
mustEmbedUnimplementedPostServiceServer()
}
// UnimplementedPostServiceServer must be embedded to have forward compatible implementations.
type UnimplementedPostServiceServer struct {
}
func (UnimplementedPostServiceServer) GetPost(context.Context, *GetPostRequest) (*GetPostResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetPost not implemented")
}
func (UnimplementedPostServiceServer) UpdatePost(context.Context, *UpdatePostRequest) (*UpdatePostResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method UpdatePost not implemented")
}
func (UnimplementedPostServiceServer) DeletePost(context.Context, *DeletePostRequest) (*DeletePostResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method DeletePost not implemented")
}
func (UnimplementedPostServiceServer) mustEmbedUnimplementedPostServiceServer() {}
// UnsafePostServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to PostServiceServer will
// result in compilation errors.
type UnsafePostServiceServer interface {
mustEmbedUnimplementedPostServiceServer()
}
func RegisterPostServiceServer(s grpc.ServiceRegistrar, srv PostServiceServer) {
s.RegisterService(&PostService_ServiceDesc, srv)
}
func _PostService_GetPost_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetPostRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(PostServiceServer).GetPost(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: PostService_GetPost_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(PostServiceServer).GetPost(ctx, req.(*GetPostRequest))
}
return interceptor(ctx, in, info, handler)
}
func _PostService_UpdatePost_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(UpdatePostRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(PostServiceServer).UpdatePost(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: PostService_UpdatePost_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(PostServiceServer).UpdatePost(ctx, req.(*UpdatePostRequest))
}
return interceptor(ctx, in, info, handler)
}
func _PostService_DeletePost_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(DeletePostRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(PostServiceServer).DeletePost(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: PostService_DeletePost_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(PostServiceServer).DeletePost(ctx, req.(*DeletePostRequest))
}
return interceptor(ctx, in, info, handler)
}
// PostService_ServiceDesc is the grpc.ServiceDesc for PostService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var PostService_ServiceDesc = grpc.ServiceDesc{
ServiceName: "post.PostService",
HandlerType: (*PostServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "GetPost",
Handler: _PostService_GetPost_Handler,
},
{
MethodName: "UpdatePost",
Handler: _PostService_UpdatePost_Handler,
},
{
MethodName: "DeletePost",
Handler: _PostService_DeletePost_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "post/post.proto",
}
================================================
FILE: _examples/04_timeout/proto/buf.yaml
================================================
version: v1
breaking:
use:
- FILE
lint:
use:
- DEFAULT
================================================
FILE: _examples/04_timeout/proto/federation/federation.proto
================================================
syntax = "proto3";
package federation;
import "grpc/federation/federation.proto";
import "google/protobuf/descriptor.proto";
import "google/protobuf/empty.proto";
option go_package = "example/federation;federation";
option (grpc.federation.file)= {
import: ["post/post.proto"]
};
extend google.protobuf.MethodOptions {
Ext ext = 70001;
}
message Ext {
string foo = 1;
}
service FederationService {
option (grpc.federation.service) = {};
rpc GetPost(GetPostRequest) returns (GetPostResponse) {
option (grpc.federation.method).timeout = "1s";
option (ext).foo = "xxx";
};
rpc UpdatePost(UpdatePostRequest) returns (google.protobuf.Empty) {
option (grpc.federation.method).response = "UpdatePostResponse";
}
}
message GetPostRequest {
string id = 1;
}
message GetPostResponse {
option (.grpc.federation.message) = {
def {
name: "post"
message {
name: "Post"
args { name: "id", by: "$.id" }
}
}
};
Post post = 1 [(grpc.federation.field).by = "post"];
}
message Post {
option (grpc.federation.message) = {
def {
name: "res"
call {
method: "post.PostService/GetPost"
request { field: "id", by: "$.id" }
}
}
def { name: "post", by: "res.post", autobind: true }
};
string id = 1;
string title = 2;
string content = 3;
}
message UpdatePostRequest {
string id = 1;
}
message UpdatePostResponse {
option (grpc.federation.message) = {
def {
call {
method: "post.PostService/UpdatePost"
request { field: "id" by: "$.id" }
timeout: "3s"
}
}
def {
call {
method: "post.PostService/DeletePost"
request { field: "id" by: "$.id" }
}
}
};
}
================================================
FILE: _examples/04_timeout/proto/post/post.proto
================================================
syntax = "proto3";
package post;
option go_package = "example/post;post";
service PostService {
rpc GetPost(GetPostRequest) returns (GetPostResponse) {};
rpc UpdatePost(UpdatePostRequest) returns (UpdatePostResponse) {};
rpc DeletePost(DeletePostRequest) returns (DeletePostResponse) {};
}
message GetPostRequest {
string id = 1;
}
message GetPostResponse {
Post post = 1;
}
message Post {
string id = 1;
string title = 2;
string content = 3;
string user_id = 4;
}
message UpdatePostRequest {
string id = 1;
}
message UpdatePostResponse {
}
message DeletePostRequest {
string id = 1;
}
message DeletePostResponse {
}
================================================
FILE: _examples/05_async/.gitignore
================================================
grpc/federation
================================================
FILE: _examples/05_async/Makefile
================================================
MAKEFILE_DIR := $(dir $(lastword $(MAKEFILE_LIST)))
GOBIN := $(MAKEFILE_DIR)/../../bin
PATH := $(GOBIN):$(PATH)
JAEGER_IMAGE := jaegertracing/all-in-one:latest
.PHONY: generate
generate:
$(GOBIN)/buf generate
.PHONY: lint
lint:
@$(GOBIN)/grpc-federation-linter -Iproto -Iproto_deps ./proto/federation/federation.proto
.PHONY: test
test:
go test -race ./ -count=1
.PHONY: grpc-federation/generate
grpc-federation/generate:
@$(GOBIN)/grpc-federation-generator ./proto/federation/federation.proto
.PHONY: grpc-federation/watch
grpc-federation/watch:
@$(GOBIN)/grpc-federation-generator -w
.PHONY: jaeger/start
jaeger/start:
@docker run \
-e COLLECTOR_OTLP_ENABLED=true \
-p 16686:16686 \
-p 4317:4317 \
-p 4318:4318 \
-d \
$(JAEGER_IMAGE)
.PHONY: jaeger/stop
jaeger/stop:
@docker stop $(shell docker ps -q --filter ancestor=$(JAEGER_IMAGE))
================================================
FILE: _examples/05_async/buf.gen.yaml
================================================
version: v1
managed:
enabled: true
plugins:
- plugin: go
out: .
opt: paths=source_relative
- plugin: go-grpc
out: .
opt: paths=source_relative
- plugin: grpc-federation
out: .
opt: paths=source_relative
================================================
FILE: _examples/05_async/buf.work.yaml
================================================
version: v1
directories:
- proto
- proto_deps
================================================
FILE: _examples/05_async/federation/federation.pb.go
================================================
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.33.0
// protoc (unknown)
// source: federation/federation.proto
package federation
import (
_ "github.com/mercari/grpc-federation/grpc/federation"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
type GetRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
}
func (x *GetRequest) Reset() {
*x = GetRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_federation_federation_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GetRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetRequest) ProtoMessage() {}
func (x *GetRequest) ProtoReflect() protoreflect.Message {
mi := &file_federation_federation_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GetRequest.ProtoReflect.Descriptor instead.
func (*GetRequest) Descriptor() ([]byte, []int) {
return file_federation_federation_proto_rawDescGZIP(), []int{0}
}
type GetResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Hname string `protobuf:"bytes,1,opt,name=hname,proto3" json:"hname,omitempty"`
Jname string `protobuf:"bytes,2,opt,name=jname,proto3" json:"jname,omitempty"`
}
func (x *GetResponse) Reset() {
*x = GetResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_federation_federation_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GetResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetResponse) ProtoMessage() {}
func (x *GetResponse) ProtoReflect() protoreflect.Message {
mi := &file_federation_federation_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GetResponse.ProtoReflect.Descriptor instead.
func (*GetResponse) Descriptor() ([]byte, []int) {
return file_federation_federation_proto_rawDescGZIP(), []int{1}
}
func (x *GetResponse) GetHname() string {
if x != nil {
return x.Hname
}
return ""
}
func (x *GetResponse) GetJname() string {
if x != nil {
return x.Jname
}
return ""
}
type A struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
}
func (x *A) Reset() {
*x = A{}
if protoimpl.UnsafeEnabled {
mi := &file_federation_federation_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *A) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*A) ProtoMessage() {}
func (x *A) ProtoReflect() protoreflect.Message {
mi := &file_federation_federation_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use A.ProtoReflect.Descriptor instead.
func (*A) Descriptor() ([]byte, []int) {
return file_federation_federation_proto_rawDescGZIP(), []int{2}
}
func (x *A) GetName() string {
if x != nil {
return x.Name
}
return ""
}
type AA struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
}
func (x *AA) Reset() {
*x = AA{}
if protoimpl.UnsafeEnabled {
mi := &file_federation_federation_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *AA) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*AA) ProtoMessage() {}
func (x *AA) ProtoReflect() protoreflect.Message {
mi := &file_federation_federation_proto_msgTypes[3]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use AA.ProtoReflect.Descriptor instead.
func (*AA) Descriptor() ([]byte, []int) {
return file_federation_federation_proto_rawDescGZIP(), []int{3}
}
func (x *AA) GetName() string {
if x != nil {
return x.Name
}
return ""
}
type AB struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
}
func (x *AB) Reset() {
*x = AB{}
if protoimpl.UnsafeEnabled {
mi := &file_federation_federation_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *AB) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*AB) ProtoMessage() {}
func (x *AB) ProtoReflect() protoreflect.Message {
mi := &file_federation_federation_proto_msgTypes[4]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use AB.ProtoReflect.Descriptor instead.
func (*AB) Descriptor() ([]byte, []int) {
return file_federation_federation_proto_rawDescGZIP(), []int{4}
}
func (x *AB) GetName() string {
if x != nil {
return x.Name
}
return ""
}
type B struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
}
func (x *B) Reset() {
*x = B{}
if protoimpl.UnsafeEnabled {
mi := &file_federation_federation_proto_msgTypes[5]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *B) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*B) ProtoMessage() {}
func (x *B) ProtoReflect() protoreflect.Message {
mi := &file_federation_federation_proto_msgTypes[5]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use B.ProtoReflect.Descriptor instead.
func (*B) Descriptor() ([]byte, []int) {
return file_federation_federation_proto_rawDescGZIP(), []int{5}
}
func (x *B) GetName() string {
if x != nil {
return x.Name
}
return ""
}
type C struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
}
func (x *C) Reset() {
*x = C{}
if protoimpl.UnsafeEnabled {
mi := &file_federation_federation_proto_msgTypes[6]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *C) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*C) ProtoMessage() {}
func (x *C) ProtoReflect() protoreflect.Message {
mi := &file_federation_federation_proto_msgTypes[6]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use C.ProtoReflect.Descriptor instead.
func (*C) Descriptor() ([]byte, []int) {
return file_federation_federation_proto_rawDescGZIP(), []int{6}
}
func (x *C) GetName() string {
if x != nil {
return x.Name
}
return ""
}
type D struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
}
func (x *D) Reset() {
*x = D{}
if protoimpl.UnsafeEnabled {
mi := &file_federation_federation_proto_msgTypes[7]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *D) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*D) ProtoMessage() {}
func (x *D) ProtoReflect() protoreflect.Message {
mi := &file_federation_federation_proto_msgTypes[7]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use D.ProtoReflect.Descriptor instead.
func (*D) Descriptor() ([]byte, []int) {
return file_federation_federation_proto_rawDescGZIP(), []int{7}
}
func (x *D) GetName() string {
if x != nil {
return x.Name
}
return ""
}
type E struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
}
func (x *E) Reset() {
*x = E{}
if protoimpl.UnsafeEnabled {
mi := &file_federation_federation_proto_msgTypes[8]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *E) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*E) ProtoMessage() {}
func (x *E) ProtoReflect() protoreflect.Message {
mi := &file_federation_federation_proto_msgTypes[8]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use E.ProtoReflect.Descriptor instead.
func (*E) Descriptor() ([]byte, []int) {
return file_federation_federation_proto_rawDescGZIP(), []int{8}
}
func (x *E) GetName() string {
if x != nil {
return x.Name
}
return ""
}
type F struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
}
func (x *F) Reset() {
*x = F{}
if protoimpl.UnsafeEnabled {
mi := &file_federation_federation_proto_msgTypes[9]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *F) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*F) ProtoMessage() {}
func (x *F) ProtoReflect() protoreflect.Message {
mi := &file_federation_federation_proto_msgTypes[9]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use F.ProtoReflect.Descriptor instead.
func (*F) Descriptor() ([]byte, []int) {
return file_federation_federation_proto_rawDescGZIP(), []int{9}
}
func (x *F) GetName() string {
if x != nil {
return x.Name
}
return ""
}
type G struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
}
func (x *G) Reset() {
*x = G{}
if protoimpl.UnsafeEnabled {
mi := &file_federation_federation_proto_msgTypes[10]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *G) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*G) ProtoMessage() {}
func (x *G) ProtoReflect() protoreflect.Message {
mi := &file_federation_federation_proto_msgTypes[10]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use G.ProtoReflect.Descriptor instead.
func (*G) Descriptor() ([]byte, []int) {
return file_federation_federation_proto_rawDescGZIP(), []int{10}
}
func (x *G) GetName() string {
if x != nil {
return x.Name
}
return ""
}
type H struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
}
func (x *H) Reset() {
*x = H{}
if protoimpl.UnsafeEnabled {
mi := &file_federation_federation_proto_msgTypes[11]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *H) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*H) ProtoMessage() {}
func (x *H) ProtoReflect() protoreflect.Message {
mi := &file_federation_federation_proto_msgTypes[11]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use H.ProtoReflect.Descriptor instead.
func (*H) Descriptor() ([]byte, []int) {
return file_federation_federation_proto_rawDescGZIP(), []int{11}
}
func (x *H) GetName() string {
if x != nil {
return x.Name
}
return ""
}
type I struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
}
func (x *I) Reset() {
*x = I{}
if protoimpl.UnsafeEnabled {
mi := &file_federation_federation_proto_msgTypes[12]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *I) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*I) ProtoMessage() {}
func (x *I) ProtoReflect() protoreflect.Message {
mi := &file_federation_federation_proto_msgTypes[12]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use I.ProtoReflect.Descriptor instead.
func (*I) Descriptor() ([]byte, []int) {
return file_federation_federation_proto_rawDescGZIP(), []int{12}
}
func (x *I) GetName() string {
if x != nil {
return x.Name
}
return ""
}
type J struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
}
func (x *J) Reset() {
*x = J{}
if protoimpl.UnsafeEnabled {
mi := &file_federation_federation_proto_msgTypes[13]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *J) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*J) ProtoMessage() {}
func (x *J) ProtoReflect() protoreflect.Message {
mi := &file_federation_federation_proto_msgTypes[13]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use J.ProtoReflect.Descriptor instead.
func (*J) Descriptor() ([]byte, []int) {
return file_federation_federation_proto_rawDescGZIP(), []int{13}
}
func (x *J) GetName() string {
if x != nil {
return x.Name
}
return ""
}
var File_federation_federation_proto protoreflect.FileDescriptor
var file_federation_federation_proto_rawDesc = []byte{
0x0a, 0x1b, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x66, 0x65, 0x64,
0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0e, 0x6f,
0x72, 0x67, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x20, 0x67,
0x72, 0x70, 0x63, 0x2f, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x66,
0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22,
0x0c, 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0xc0, 0x02,
0x0a, 0x0b, 0x47, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x21, 0x0a,
0x05, 0x68, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0b, 0x9a, 0x4a,
0x08, 0x12, 0x06, 0x68, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x52, 0x05, 0x68, 0x6e, 0x61, 0x6d, 0x65,
0x12, 0x21, 0x0a, 0x05, 0x6a, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42,
0x0b, 0x9a, 0x4a, 0x08, 0x12, 0x06, 0x6a, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x52, 0x05, 0x6a, 0x6e,
0x61, 0x6d, 0x65, 0x3a, 0xea, 0x01, 0x9a, 0x4a, 0xe6, 0x01, 0x0a, 0x08, 0x0a, 0x01, 0x61, 0x6a,
0x03, 0x0a, 0x01, 0x41, 0x0a, 0x08, 0x0a, 0x01, 0x62, 0x6a, 0x03, 0x0a, 0x01, 0x42, 0x0a, 0x15,
0x0a, 0x01, 0x63, 0x6a, 0x10, 0x0a, 0x01, 0x43, 0x12, 0x0b, 0x0a, 0x01, 0x61, 0x12, 0x06, 0x61,
0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x0a, 0x15, 0x0a, 0x01, 0x64, 0x6a, 0x10, 0x0a, 0x01, 0x44, 0x12,
0x0b, 0x0a, 0x01, 0x62, 0x12, 0x06, 0x62, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x0a, 0x22, 0x0a, 0x01,
0x65, 0x6a, 0x1d, 0x0a, 0x01, 0x45, 0x12, 0x0b, 0x0a, 0x01, 0x63, 0x12, 0x06, 0x63, 0x2e, 0x6e,
0x61, 0x6d, 0x65, 0x12, 0x0b, 0x0a, 0x01, 0x64, 0x12, 0x06, 0x64, 0x2e, 0x6e, 0x61, 0x6d, 0x65,
0x0a, 0x22, 0x0a, 0x01, 0x66, 0x6a, 0x1d, 0x0a, 0x01, 0x46, 0x12, 0x0b, 0x0a, 0x01, 0x63, 0x12,
0x06, 0x63, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x0b, 0x0a, 0x01, 0x64, 0x12, 0x06, 0x64, 0x2e,
0x6e, 0x61, 0x6d, 0x65, 0x0a, 0x08, 0x0a, 0x01, 0x67, 0x6a, 0x03, 0x0a, 0x01, 0x47, 0x0a, 0x2f,
0x0a, 0x01, 0x68, 0x6a, 0x2a, 0x0a, 0x01, 0x48, 0x12, 0x0b, 0x0a, 0x01, 0x65, 0x12, 0x06, 0x65,
0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x0b, 0x0a, 0x01, 0x66, 0x12, 0x06, 0x66, 0x2e, 0x6e, 0x61,
0x6d, 0x65, 0x12, 0x0b, 0x0a, 0x01, 0x67, 0x12, 0x06, 0x67, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x0a,
0x08, 0x0a, 0x01, 0x69, 0x6a, 0x03, 0x0a, 0x01, 0x49, 0x0a, 0x15, 0x0a, 0x01, 0x6a, 0x6a, 0x10,
0x0a, 0x01, 0x4a, 0x12, 0x0b, 0x0a, 0x01, 0x69, 0x12, 0x06, 0x69, 0x2e, 0x6e, 0x61, 0x6d, 0x65,
0x22, 0x3e, 0x0a, 0x01, 0x41, 0x12, 0x1c, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20,
0x01, 0x28, 0x09, 0x42, 0x08, 0x9a, 0x4a, 0x05, 0x12, 0x03, 0x27, 0x61, 0x27, 0x52, 0x04, 0x6e,
0x61, 0x6d, 0x65, 0x3a, 0x1b, 0x9a, 0x4a, 0x18, 0x0a, 0x0a, 0x0a, 0x02, 0x61, 0x61, 0x6a, 0x04,
0x0a, 0x02, 0x41, 0x41, 0x0a, 0x0a, 0x0a, 0x02, 0x61, 0x62, 0x6a, 0x04, 0x0a, 0x02, 0x41, 0x42,
0x22, 0x23, 0x0a, 0x02, 0x41, 0x41, 0x12, 0x1d, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01,
0x20, 0x01, 0x28, 0x09, 0x42, 0x09, 0x9a, 0x4a, 0x06, 0x12, 0x04, 0x27, 0x61, 0x61, 0x27, 0x52,
0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x23, 0x0a, 0x02, 0x41, 0x42, 0x12, 0x1d, 0x0a, 0x04, 0x6e,
0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x09, 0x9a, 0x4a, 0x06, 0x12, 0x04,
0x27, 0x61, 0x62, 0x27, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x21, 0x0a, 0x01, 0x42, 0x12,
0x1c, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x08, 0x9a,
0x4a, 0x05, 0x12, 0x03, 0x27, 0x62, 0x27, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x21, 0x0a,
0x01, 0x43, 0x12, 0x1c, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
0x42, 0x08, 0x9a, 0x4a, 0x05, 0x12, 0x03, 0x27, 0x63, 0x27, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65,
0x22, 0x21, 0x0a, 0x01, 0x44, 0x12, 0x1c, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20,
0x01, 0x28, 0x09, 0x42, 0x08, 0x9a, 0x4a, 0x05, 0x12, 0x03, 0x27, 0x64, 0x27, 0x52, 0x04, 0x6e,
0x61, 0x6d, 0x65, 0x22, 0x21, 0x0a, 0x01, 0x45, 0x12, 0x1c, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65,
0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x08, 0x9a, 0x4a, 0x05, 0x12, 0x03, 0x27, 0x65, 0x27,
0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x21, 0x0a, 0x01, 0x46, 0x12, 0x1c, 0x0a, 0x04, 0x6e,
0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x08, 0x9a, 0x4a, 0x05, 0x12, 0x03,
0x27, 0x66, 0x27, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x21, 0x0a, 0x01, 0x47, 0x12, 0x1c,
0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x08, 0x9a, 0x4a,
0x05, 0x12, 0x03, 0x27, 0x67, 0x27, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x21, 0x0a, 0x01,
0x48, 0x12, 0x1c, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42,
0x08, 0x9a, 0x4a, 0x05, 0x12, 0x03, 0x27, 0x68, 0x27, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22,
0x21, 0x0a, 0x01, 0x49, 0x12, 0x1c, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01,
0x28, 0x09, 0x42, 0x08, 0x9a, 0x4a, 0x05, 0x12, 0x03, 0x27, 0x69, 0x27, 0x52, 0x04, 0x6e, 0x61,
0x6d, 0x65, 0x22, 0x21, 0x0a, 0x01, 0x4a, 0x12, 0x1c, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18,
0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x08, 0x9a, 0x4a, 0x05, 0x12, 0x03, 0x27, 0x6a, 0x27, 0x52,
0x04, 0x6e, 0x61, 0x6d, 0x65, 0x32, 0x5a, 0x0a, 0x11, 0x46, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74,
0x69, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x40, 0x0a, 0x03, 0x47, 0x65,
0x74, 0x12, 0x1a, 0x2e, 0x6f, 0x72, 0x67, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69,
0x6f, 0x6e, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e,
0x6f, 0x72, 0x67, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x47,
0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x1a, 0x03, 0x9a, 0x4a,
0x00, 0x42, 0x9d, 0x01, 0x0a, 0x12, 0x63, 0x6f, 0x6d, 0x2e, 0x6f, 0x72, 0x67, 0x2e, 0x66, 0x65,
0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x0f, 0x46, 0x65, 0x64, 0x65, 0x72, 0x61,
0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x1d, 0x65, 0x78, 0x61,
0x6d, 0x70, 0x6c, 0x65, 0x2f, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x3b,
0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0xa2, 0x02, 0x03, 0x4f, 0x46, 0x58,
0xaa, 0x02, 0x0e, 0x4f, 0x72, 0x67, 0x2e, 0x46, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f,
0x6e, 0xca, 0x02, 0x0e, 0x4f, 0x72, 0x67, 0x5c, 0x46, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69,
0x6f, 0x6e, 0xe2, 0x02, 0x1a, 0x4f, 0x72, 0x67, 0x5c, 0x46, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74,
0x69, 0x6f, 0x6e, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea,
0x02, 0x0f, 0x4f, 0x72, 0x67, 0x3a, 0x3a, 0x46, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f,
0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_federation_federation_proto_rawDescOnce sync.Once
file_federation_federation_proto_rawDescData = file_federation_federation_proto_rawDesc
)
func file_federation_federation_proto_rawDescGZIP() []byte {
file_federation_federation_proto_rawDescOnce.Do(func() {
file_federation_federation_proto_rawDescData = protoimpl.X.CompressGZIP(file_federation_federation_proto_rawDescData)
})
return file_federation_federation_proto_rawDescData
}
var file_federation_federation_proto_msgTypes = make([]protoimpl.MessageInfo, 14)
var file_federation_federation_proto_goTypes = []interface{}{
(*GetRequest)(nil), // 0: org.federation.GetRequest
(*GetResponse)(nil), // 1: org.federation.GetResponse
(*A)(nil), // 2: org.federation.A
(*AA)(nil), // 3: org.federation.AA
(*AB)(nil), // 4: org.federation.AB
(*B)(nil), // 5: org.federation.B
(*C)(nil), // 6: org.federation.C
(*D)(nil), // 7: org.federation.D
(*E)(nil), // 8: org.federation.E
(*F)(nil), // 9: org.federation.F
(*G)(nil), // 10: org.federation.G
(*H)(nil), // 11: org.federation.H
(*I)(nil), // 12: org.federation.I
(*J)(nil), // 13: org.federation.J
}
var file_federation_federation_proto_depIdxs = []int32{
0, // 0: org.federation.FederationService.Get:input_type -> org.federation.GetRequest
1, // 1: org.federation.FederationService.Get:output_type -> org.federation.GetResponse
1, // [1:2] is the sub-list for method output_type
0, // [0:1] is the sub-list for method input_type
0, // [0:0] is the sub-list for extension type_name
0, // [0:0] is the sub-list for extension extendee
0, // [0:0] is the sub-list for field type_name
}
func init() { file_federation_federation_proto_init() }
func file_federation_federation_proto_init() {
if File_federation_federation_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_federation_federation_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_federation_federation_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_federation_federation_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*A); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_federation_federation_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*AA); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_federation_federation_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*AB); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_federation_federation_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*B); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_federation_federation_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*C); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_federation_federation_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*D); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_federation_federation_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*E); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_federation_federation_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*F); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_federation_federation_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*G); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_federation_federation_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*H); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_federation_federation_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*I); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_federation_federation_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*J); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_federation_federation_proto_rawDesc,
NumEnums: 0,
NumMessages: 14,
NumExtensions: 0,
NumServices: 1,
},
GoTypes: file_federation_federation_proto_goTypes,
DependencyIndexes: file_federation_federation_proto_depIdxs,
MessageInfos: file_federation_federation_proto_msgTypes,
}.Build()
File_federation_federation_proto = out.File
file_federation_federation_proto_rawDesc = nil
file_federation_federation_proto_goTypes = nil
file_federation_federation_proto_depIdxs = nil
}
================================================
FILE: _examples/05_async/federation/federation_grpc.pb.go
================================================
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.3.0
// - protoc (unknown)
// source: federation/federation.proto
package federation
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 (
FederationService_Get_FullMethodName = "/org.federation.FederationService/Get"
)
// FederationServiceClient is the client API for FederationService 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 FederationServiceClient interface {
Get(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*GetResponse, error)
}
type federationServiceClient struct {
cc grpc.ClientConnInterface
}
func NewFederationServiceClient(cc grpc.ClientConnInterface) FederationServiceClient {
return &federationServiceClient{cc}
}
func (c *federationServiceClient) Get(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*GetResponse, error) {
out := new(GetResponse)
err := c.cc.Invoke(ctx, FederationService_Get_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// FederationServiceServer is the server API for FederationService service.
// All implementations must embed UnimplementedFederationServiceServer
// for forward compatibility
type FederationServiceServer interface {
Get(context.Context, *GetRequest) (*GetResponse, error)
mustEmbedUnimplementedFederationServiceServer()
}
// UnimplementedFederationServiceServer must be embedded to have forward compatible implementations.
type UnimplementedFederationServiceServer struct {
}
func (UnimplementedFederationServiceServer) Get(context.Context, *GetRequest) (*GetResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method Get not implemented")
}
func (UnimplementedFederationServiceServer) mustEmbedUnimplementedFederationServiceServer() {}
// UnsafeFederationServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to FederationServiceServer will
// result in compilation errors.
type UnsafeFederationServiceServer interface {
mustEmbedUnimplementedFederationServiceServer()
}
func RegisterFederationServiceServer(s grpc.ServiceRegistrar, srv FederationServiceServer) {
s.RegisterService(&FederationService_ServiceDesc, srv)
}
func _FederationService_Get_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(FederationServiceServer).Get(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: FederationService_Get_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(FederationServiceServer).Get(ctx, req.(*GetRequest))
}
return interceptor(ctx, in, info, handler)
}
// FederationService_ServiceDesc is the grpc.ServiceDesc for FederationService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var FederationService_ServiceDesc = grpc.ServiceDesc{
ServiceName: "org.federation.FederationService",
HandlerType: (*FederationServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "Get",
Handler: _FederationService_Get_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "federation/federation.proto",
}
================================================
FILE: _examples/05_async/federation/federation_grpc_federation.pb.go
================================================
// Code generated by protoc-gen-grpc-federation. DO NOT EDIT!
// versions:
//
// protoc-gen-grpc-federation: (devel)
//
// source: federation/federation.proto
package federation
import (
"context"
"io"
"log/slog"
"reflect"
grpcfed "github.com/mercari/grpc-federation/grpc/federation"
grpcfedcel "github.com/mercari/grpc-federation/grpc/federation/cel"
"go.opentelemetry.io/otel"
"go.opentelemetry.io/otel/trace"
)
var (
_ = reflect.Invalid // to avoid "imported and not used error"
)
// Org_Federation_AAVariable represents variable definitions in "org.federation.AA".
type FederationService_Org_Federation_AAVariable struct {
}
// Org_Federation_AAArgument is argument for "org.federation.AA" message.
type FederationService_Org_Federation_AAArgument struct {
FederationService_Org_Federation_AAVariable
}
// Org_Federation_AVariable represents variable definitions in "org.federation.A".
type FederationService_Org_Federation_AVariable struct {
}
// Org_Federation_AArgument is argument for "org.federation.A" message.
type FederationService_Org_Federation_AArgument struct {
FederationService_Org_Federation_AVariable
}
// Org_Federation_ABVariable represents variable definitions in "org.federation.AB".
type FederationService_Org_Federation_ABVariable struct {
}
// Org_Federation_ABArgument is argument for "org.federation.AB" message.
type FederationService_Org_Federation_ABArgument struct {
FederationService_Org_Federation_ABVariable
}
// Org_Federation_BVariable represents variable definitions in "org.federation.B".
type FederationService_Org_Federation_BVariable struct {
}
// Org_Federation_BArgument is argument for "org.federation.B" message.
type FederationService_Org_Federation_BArgument struct {
FederationService_Org_Federation_BVariable
}
// Org_Federation_CVariable represents variable definitions in "org.federation.C".
type FederationService_Org_Federation_CVariable struct {
}
// Org_Federation_CArgument is argument for "org.federation.C" message.
type FederationService_Org_Federation_CArgument struct {
A string
FederationService_Org_Federation_CVariable
}
// Org_Federation_DVariable represents variable definitions in "org.federation.D".
type FederationService_Org_Federation_DVariable struct {
}
// Org_Federation_DArgument is argument for "org.federation.D" message.
type FederationService_Org_Federation_DArgument struct {
B string
FederationService_Org_Federation_DVariable
}
// Org_Federation_EVariable represents variable definitions in "org.federation.E".
type FederationService_Org_Federation_EVariable struct {
}
// Org_Federation_EArgument is argument for "org.federation.E" message.
type FederationService_Org_Federation_EArgument struct {
C string
D string
FederationService_Org_Federation_EVariable
}
// Org_Federation_FVariable represents variable definitions in "org.federation.F".
type FederationService_Org_Federation_FVariable struct {
}
// Org_Federation_FArgument is argument for "org.federation.F" message.
type FederationService_Org_Federation_FArgument struct {
C string
D string
FederationService_Org_Federation_FVariable
}
// Org_Federation_GVariable represents variable definitions in "org.federation.G".
type FederationService_Org_Federation_GVariable struct {
}
// Org_Federation_GArgument is argument for "org.federation.G" message.
type FederationService_Org_Federation_GArgument struct {
FederationService_Org_Federation_GVariable
}
// Org_Federation_GetResponseVariable represents variable definitions in "org.federation.GetResponse".
type FederationService_Org_Federation_GetResponseVariable struct {
A *A
B *B
C *C
D *D
E *E
F *F
G *G
H *H
I *I
J *J
}
// Org_Federation_GetResponseArgument is argument for "org.federation.GetResponse" message.
type FederationService_Org_Federation_GetResponseArgument struct {
FederationService_Org_Federation_GetResponseVariable
}
// Org_Federation_HVariable represents variable definitions in "org.federation.H".
type FederationService_Org_Federation_HVariable struct {
}
// Org_Federation_HArgument is argument for "org.federation.H" message.
type FederationService_Org_Federation_HArgument struct {
E string
F string
G string
FederationService_Org_Federation_HVariable
}
// Org_Federation_IVariable represents variable definitions in "org.federation.I".
type FederationService_Org_Federation_IVariable struct {
}
// Org_Federation_IArgument is argument for "org.federation.I" message.
type FederationService_Org_Federation_IArgument struct {
FederationService_Org_Federation_IVariable
}
// Org_Federation_JVariable represents variable definitions in "org.federation.J".
type FederationService_Org_Federation_JVariable struct {
}
// Org_Federation_JArgument is argument for "org.federation.J" message.
type FederationService_Org_Federation_JArgument struct {
I string
FederationService_Org_Federation_JVariable
}
// FederationServiceConfig configuration required to initialize the service that use GRPC Federation.
type FederationServiceConfig struct {
// ErrorHandler Federation Service often needs to convert errors received from downstream services.
// If an error occurs during method execution in the Federation Service, this error handler is called and the returned error is treated as a final error.
ErrorHandler grpcfed.ErrorHandler
// Logger sets the logger used to output Debug/Info/Error information.
Logger *slog.Logger
}
// FederationServiceClientFactory provides a factory that creates the gRPC Client needed to invoke methods of the gRPC Service on which the Federation Service depends.
type FederationServiceClientFactory interface {
}
// FederationServiceClientConfig helper to create gRPC client.
// Hints for creating a gRPC Client.
type FederationServiceClientConfig struct {
// Service FQDN ( `.` ) of the service on Protocol Buffers.
Service string
}
// FederationServiceDependentClientSet has a gRPC client for all services on which the federation service depends.
// This is provided as an argument when implementing the custom resolver.
type FederationServiceDependentClientSet struct {
}
// FederationServiceResolver provides an interface to directly implement message resolver and field resolver not defined in Protocol Buffers.
type FederationServiceResolver interface {
}
// FederationServiceCELPluginWasmConfig type alias for grpcfedcel.WasmConfig.
type FederationServiceCELPluginWasmConfig = grpcfedcel.WasmConfig
// FederationServiceCELPluginConfig hints for loading a WebAssembly based plugin.
type FederationServiceCELPluginConfig struct {
CacheDir string
}
// FederationServiceUnimplementedResolver a structure implemented to satisfy the Resolver interface.
// An Unimplemented error is always returned.
// This is intended for use when there are many Resolver interfaces that do not need to be implemented,
// by embedding them in a resolver structure that you have created.
type FederationServiceUnimplementedResolver struct{}
// FederationService represents Federation Service.
type FederationService struct {
UnimplementedFederationServiceServer
cfg FederationServiceConfig
logger *slog.Logger
isLogLevelDebug bool
errorHandler grpcfed.ErrorHandler
celCacheMap *grpcfed.CELCacheMap
tracer trace.Tracer
celTypeHelper *grpcfed.CELTypeHelper
celEnvOpts []grpcfed.CELEnvOption
celPlugins []*grpcfedcel.CELPlugin
client *FederationServiceDependentClientSet
}
// NewFederationService creates FederationService instance by FederationServiceConfig.
func NewFederationService(cfg FederationServiceConfig) (*FederationService, error) {
logger := cfg.Logger
if logger == nil {
logger = slog.New(slog.NewJSONHandler(io.Discard, nil))
}
tracer := otel.Tracer("org.federation.FederationService")
ctx := grpcfed.WithLogger(context.Background(), logger)
ctx = grpcfed.WithTracer(ctx, tracer)
errorHandler := cfg.ErrorHandler
if errorHandler == nil {
errorHandler = func(ctx context.Context, methodName string, err error) error { return err }
}
celTypeHelperFieldMap := grpcfed.CELTypeHelperFieldMap{
"grpc.federation.private.org.federation.AAArgument": {},
"grpc.federation.private.org.federation.AArgument": {},
"grpc.federation.private.org.federation.ABArgument": {},
"grpc.federation.private.org.federation.BArgument": {},
"grpc.federation.private.org.federation.CArgument": {
"a": grpcfed.NewCELFieldType(grpcfed.CELStringType, "A"),
},
"grpc.federation.private.org.federation.DArgument": {
"b": grpcfed.NewCELFieldType(grpcfed.CELStringType, "B"),
},
"grpc.federation.private.org.federation.EArgument": {
"c": grpcfed.NewCELFieldType(grpcfed.CELStringType, "C"),
"d": grpcfed.NewCELFieldType(grpcfed.CELStringType, "D"),
},
"grpc.federation.private.org.federation.FArgument": {
"c": grpcfed.NewCELFieldType(grpcfed.CELStringType, "C"),
"d": grpcfed.NewCELFieldType(grpcfed.CELStringType, "D"),
},
"grpc.federation.private.org.federation.GArgument": {},
"grpc.federation.private.org.federation.GetResponseArgument": {},
"grpc.federation.private.org.federation.HArgument": {
"e": grpcfed.NewCELFieldType(grpcfed.CELStringType, "E"),
"f": grpcfed.NewCELFieldType(grpcfed.CELStringType, "F"),
"g": grpcfed.NewCELFieldType(grpcfed.CELStringType, "G"),
},
"grpc.federation.private.org.federation.IArgument": {},
"grpc.federation.private.org.federation.JArgument": {
"i": grpcfed.NewCELFieldType(grpcfed.CELStringType, "I"),
},
}
celTypeHelper := grpcfed.NewCELTypeHelper("org.federation", celTypeHelperFieldMap)
var celEnvOpts []grpcfed.CELEnvOption
celEnvOpts = append(celEnvOpts, grpcfed.NewDefaultEnvOptions(celTypeHelper)...)
svc := &FederationService{
cfg: cfg,
logger: logger,
isLogLevelDebug: logger.Enabled(context.Background(), slog.LevelDebug),
errorHandler: errorHandler,
celEnvOpts: celEnvOpts,
celTypeHelper: celTypeHelper,
celCacheMap: grpcfed.NewCELCacheMap(),
tracer: tracer,
client: &FederationServiceDependentClientSet{},
}
return svc, nil
}
// CleanupFederationService cleanup all resources to prevent goroutine leaks.
func CleanupFederationService(ctx context.Context, svc *FederationService) {
svc.cleanup(ctx)
}
func (s *FederationService) cleanup(ctx context.Context) {
for _, plugin := range s.celPlugins {
plugin.Close()
}
}
// Get implements "org.federation.FederationService/Get" method.
func (s *FederationService) Get(ctx context.Context, req *GetRequest) (res *GetResponse, e error) {
ctx, span := s.tracer.Start(ctx, "org.federation.FederationService/Get")
defer span.End()
ctx = grpcfed.WithLogger(ctx, s.logger)
ctx = grpcfed.WithCELCacheMap(ctx, s.celCacheMap)
defer func() {
if r := recover(); r != nil {
e = grpcfed.RecoverError(r, grpcfed.StackTrace())
grpcfed.OutputErrorLog(ctx, e)
}
}()
defer func() {
for _, celPlugin := range s.celPlugins {
celPlugin.Cleanup()
}
}()
res, err := s.resolve_Org_Federation_GetResponse(ctx, &FederationService_Org_Federation_GetResponseArgument{})
if err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
grpcfed.OutputErrorLog(ctx, err)
return nil, err
}
return res, nil
}
// resolve_Org_Federation_A resolve "org.federation.A" message.
func (s *FederationService) resolve_Org_Federation_A(ctx context.Context, req *FederationService_Org_Federation_AArgument) (*A, error) {
ctx, span := s.tracer.Start(ctx, "org.federation.A")
defer span.End()
ctx = grpcfed.WithLogger(ctx, grpcfed.Logger(ctx), grpcfed.LogAttrs(ctx)...)
grpcfed.Logger(ctx).DebugContext(ctx, "resolve org.federation.A", slog.Any("message_args", s.logvalue_Org_Federation_AArgument(req)))
type localValueType struct {
*grpcfed.LocalValue
vars struct {
Aa *AA
Ab *AB
}
}
value := &localValueType{LocalValue: grpcfed.NewLocalValue(ctx, s.celEnvOpts, "grpc.federation.private.org.federation.AArgument", req)}
ctx = grpcfed.WithLocalValue(ctx, value.LocalValue)
/*
def {
name: "aa"
message {
name: "AA"
}
}
*/
def_aa := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[*AA, *localValueType]{
Name: `aa`,
Type: grpcfed.CELObjectType("org.federation.AA"),
Setter: func(value *localValueType, v *AA) error {
value.vars.Aa = v
return nil
},
Message: func(ctx context.Context, value *localValueType) (any, error) {
args := &FederationService_Org_Federation_AAArgument{}
ret, err := s.resolve_Org_Federation_AA(ctx, args)
if err != nil {
return nil, err
}
return ret, nil
},
})
}
/*
def {
name: "ab"
message {
name: "AB"
}
}
*/
def_ab := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[*AB, *localValueType]{
Name: `ab`,
Type: grpcfed.CELObjectType("org.federation.AB"),
Setter: func(value *localValueType, v *AB) error {
value.vars.Ab = v
return nil
},
Message: func(ctx context.Context, value *localValueType) (any, error) {
args := &FederationService_Org_Federation_ABArgument{}
ret, err := s.resolve_Org_Federation_AB(ctx, args)
if err != nil {
return nil, err
}
return ret, nil
},
})
}
// A tree view of message dependencies is shown below.
/*
aa ─┐
ab ─┤
*/
eg, ctx1 := grpcfed.ErrorGroupWithContext(ctx)
grpcfed.GoWithRecover(eg, func() (any, error) {
if err := def_aa(ctx1); err != nil {
grpcfed.RecordErrorToSpan(ctx1, err)
return nil, err
}
return nil, nil
})
grpcfed.GoWithRecover(eg, func() (any, error) {
if err := def_ab(ctx1); err != nil {
grpcfed.RecordErrorToSpan(ctx1, err)
return nil, err
}
return nil, nil
})
if err := eg.Wait(); err != nil {
return nil, err
}
// create a message value to be returned.
ret := &A{}
// field binding section.
// (grpc.federation.field).by = "'a'"
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[string]{
Value: value,
Expr: `'a'`,
CacheIndex: 1,
Setter: func(v string) error {
ret.Name = v
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
grpcfed.Logger(ctx).DebugContext(ctx, "resolved org.federation.A", slog.Any("org.federation.A", s.logvalue_Org_Federation_A(ret)))
return ret, nil
}
// resolve_Org_Federation_AA resolve "org.federation.AA" message.
func (s *FederationService) resolve_Org_Federation_AA(ctx context.Context, req *FederationService_Org_Federation_AAArgument) (*AA, error) {
ctx, span := s.tracer.Start(ctx, "org.federation.AA")
defer span.End()
ctx = grpcfed.WithLogger(ctx, grpcfed.Logger(ctx), grpcfed.LogAttrs(ctx)...)
grpcfed.Logger(ctx).DebugContext(ctx, "resolve org.federation.AA", slog.Any("message_args", s.logvalue_Org_Federation_AAArgument(req)))
type localValueType struct {
*grpcfed.LocalValue
vars struct {
}
}
value := &localValueType{LocalValue: grpcfed.NewLocalValue(ctx, s.celEnvOpts, "grpc.federation.private.org.federation.AAArgument", req)}
ctx = grpcfed.WithLocalValue(ctx, value.LocalValue)
// create a message value to be returned.
ret := &AA{}
// field binding section.
// (grpc.federation.field).by = "'aa'"
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[string]{
Value: value,
Expr: `'aa'`,
CacheIndex: 2,
Setter: func(v string) error {
ret.Name = v
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
grpcfed.Logger(ctx).DebugContext(ctx, "resolved org.federation.AA", slog.Any("org.federation.AA", s.logvalue_Org_Federation_AA(ret)))
return ret, nil
}
// resolve_Org_Federation_AB resolve "org.federation.AB" message.
func (s *FederationService) resolve_Org_Federation_AB(ctx context.Context, req *FederationService_Org_Federation_ABArgument) (*AB, error) {
ctx, span := s.tracer.Start(ctx, "org.federation.AB")
defer span.End()
ctx = grpcfed.WithLogger(ctx, grpcfed.Logger(ctx), grpcfed.LogAttrs(ctx)...)
grpcfed.Logger(ctx).DebugContext(ctx, "resolve org.federation.AB", slog.Any("message_args", s.logvalue_Org_Federation_ABArgument(req)))
type localValueType struct {
*grpcfed.LocalValue
vars struct {
}
}
value := &localValueType{LocalValue: grpcfed.NewLocalValue(ctx, s.celEnvOpts, "grpc.federation.private.org.federation.ABArgument", req)}
ctx = grpcfed.WithLocalValue(ctx, value.LocalValue)
// create a message value to be returned.
ret := &AB{}
// field binding section.
// (grpc.federation.field).by = "'ab'"
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[string]{
Value: value,
Expr: `'ab'`,
CacheIndex: 3,
Setter: func(v string) error {
ret.Name = v
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
grpcfed.Logger(ctx).DebugContext(ctx, "resolved org.federation.AB", slog.Any("org.federation.AB", s.logvalue_Org_Federation_AB(ret)))
return ret, nil
}
// resolve_Org_Federation_B resolve "org.federation.B" message.
func (s *FederationService) resolve_Org_Federation_B(ctx context.Context, req *FederationService_Org_Federation_BArgument) (*B, error) {
ctx, span := s.tracer.Start(ctx, "org.federation.B")
defer span.End()
ctx = grpcfed.WithLogger(ctx, grpcfed.Logger(ctx), grpcfed.LogAttrs(ctx)...)
grpcfed.Logger(ctx).DebugContext(ctx, "resolve org.federation.B", slog.Any("message_args", s.logvalue_Org_Federation_BArgument(req)))
type localValueType struct {
*grpcfed.LocalValue
vars struct {
}
}
value := &localValueType{LocalValue: grpcfed.NewLocalValue(ctx, s.celEnvOpts, "grpc.federation.private.org.federation.BArgument", req)}
ctx = grpcfed.WithLocalValue(ctx, value.LocalValue)
// create a message value to be returned.
ret := &B{}
// field binding section.
// (grpc.federation.field).by = "'b'"
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[string]{
Value: value,
Expr: `'b'`,
CacheIndex: 4,
Setter: func(v string) error {
ret.Name = v
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
grpcfed.Logger(ctx).DebugContext(ctx, "resolved org.federation.B", slog.Any("org.federation.B", s.logvalue_Org_Federation_B(ret)))
return ret, nil
}
// resolve_Org_Federation_C resolve "org.federation.C" message.
func (s *FederationService) resolve_Org_Federation_C(ctx context.Context, req *FederationService_Org_Federation_CArgument) (*C, error) {
ctx, span := s.tracer.Start(ctx, "org.federation.C")
defer span.End()
ctx = grpcfed.WithLogger(ctx, grpcfed.Logger(ctx), grpcfed.LogAttrs(ctx)...)
grpcfed.Logger(ctx).DebugContext(ctx, "resolve org.federation.C", slog.Any("message_args", s.logvalue_Org_Federation_CArgument(req)))
type localValueType struct {
*grpcfed.LocalValue
vars struct {
}
}
value := &localValueType{LocalValue: grpcfed.NewLocalValue(ctx, s.celEnvOpts, "grpc.federation.private.org.federation.CArgument", req)}
ctx = grpcfed.WithLocalValue(ctx, value.LocalValue)
// create a message value to be returned.
ret := &C{}
// field binding section.
// (grpc.federation.field).by = "'c'"
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[string]{
Value: value,
Expr: `'c'`,
CacheIndex: 5,
Setter: func(v string) error {
ret.Name = v
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
grpcfed.Logger(ctx).DebugContext(ctx, "resolved org.federation.C", slog.Any("org.federation.C", s.logvalue_Org_Federation_C(ret)))
return ret, nil
}
// resolve_Org_Federation_D resolve "org.federation.D" message.
func (s *FederationService) resolve_Org_Federation_D(ctx context.Context, req *FederationService_Org_Federation_DArgument) (*D, error) {
ctx, span := s.tracer.Start(ctx, "org.federation.D")
defer span.End()
ctx = grpcfed.WithLogger(ctx, grpcfed.Logger(ctx), grpcfed.LogAttrs(ctx)...)
grpcfed.Logger(ctx).DebugContext(ctx, "resolve org.federation.D", slog.Any("message_args", s.logvalue_Org_Federation_DArgument(req)))
type localValueType struct {
*grpcfed.LocalValue
vars struct {
}
}
value := &localValueType{LocalValue: grpcfed.NewLocalValue(ctx, s.celEnvOpts, "grpc.federation.private.org.federation.DArgument", req)}
ctx = grpcfed.WithLocalValue(ctx, value.LocalValue)
// create a message value to be returned.
ret := &D{}
// field binding section.
// (grpc.federation.field).by = "'d'"
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[string]{
Value: value,
Expr: `'d'`,
CacheIndex: 6,
Setter: func(v string) error {
ret.Name = v
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
grpcfed.Logger(ctx).DebugContext(ctx, "resolved org.federation.D", slog.Any("org.federation.D", s.logvalue_Org_Federation_D(ret)))
return ret, nil
}
// resolve_Org_Federation_E resolve "org.federation.E" message.
func (s *FederationService) resolve_Org_Federation_E(ctx context.Context, req *FederationService_Org_Federation_EArgument) (*E, error) {
ctx, span := s.tracer.Start(ctx, "org.federation.E")
defer span.End()
ctx = grpcfed.WithLogger(ctx, grpcfed.Logger(ctx), grpcfed.LogAttrs(ctx)...)
grpcfed.Logger(ctx).DebugContext(ctx, "resolve org.federation.E", slog.Any("message_args", s.logvalue_Org_Federation_EArgument(req)))
type localValueType struct {
*grpcfed.LocalValue
vars struct {
}
}
value := &localValueType{LocalValue: grpcfed.NewLocalValue(ctx, s.celEnvOpts, "grpc.federation.private.org.federation.EArgument", req)}
ctx = grpcfed.WithLocalValue(ctx, value.LocalValue)
// create a message value to be returned.
ret := &E{}
// field binding section.
// (grpc.federation.field).by = "'e'"
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[string]{
Value: value,
Expr: `'e'`,
CacheIndex: 7,
Setter: func(v string) error {
ret.Name = v
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
grpcfed.Logger(ctx).DebugContext(ctx, "resolved org.federation.E", slog.Any("org.federation.E", s.logvalue_Org_Federation_E(ret)))
return ret, nil
}
// resolve_Org_Federation_F resolve "org.federation.F" message.
func (s *FederationService) resolve_Org_Federation_F(ctx context.Context, req *FederationService_Org_Federation_FArgument) (*F, error) {
ctx, span := s.tracer.Start(ctx, "org.federation.F")
defer span.End()
ctx = grpcfed.WithLogger(ctx, grpcfed.Logger(ctx), grpcfed.LogAttrs(ctx)...)
grpcfed.Logger(ctx).DebugContext(ctx, "resolve org.federation.F", slog.Any("message_args", s.logvalue_Org_Federation_FArgument(req)))
type localValueType struct {
*grpcfed.LocalValue
vars struct {
}
}
value := &localValueType{LocalValue: grpcfed.NewLocalValue(ctx, s.celEnvOpts, "grpc.federation.private.org.federation.FArgument", req)}
ctx = grpcfed.WithLocalValue(ctx, value.LocalValue)
// create a message value to be returned.
ret := &F{}
// field binding section.
// (grpc.federation.field).by = "'f'"
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[string]{
Value: value,
Expr: `'f'`,
CacheIndex: 8,
Setter: func(v string) error {
ret.Name = v
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
grpcfed.Logger(ctx).DebugContext(ctx, "resolved org.federation.F", slog.Any("org.federation.F", s.logvalue_Org_Federation_F(ret)))
return ret, nil
}
// resolve_Org_Federation_G resolve "org.federation.G" message.
func (s *FederationService) resolve_Org_Federation_G(ctx context.Context, req *FederationService_Org_Federation_GArgument) (*G, error) {
ctx, span := s.tracer.Start(ctx, "org.federation.G")
defer span.End()
ctx = grpcfed.WithLogger(ctx, grpcfed.Logger(ctx), grpcfed.LogAttrs(ctx)...)
grpcfed.Logger(ctx).DebugContext(ctx, "resolve org.federation.G", slog.Any("message_args", s.logvalue_Org_Federation_GArgument(req)))
type localValueType struct {
*grpcfed.LocalValue
vars struct {
}
}
value := &localValueType{LocalValue: grpcfed.NewLocalValue(ctx, s.celEnvOpts, "grpc.federation.private.org.federation.GArgument", req)}
ctx = grpcfed.WithLocalValue(ctx, value.LocalValue)
// create a message value to be returned.
ret := &G{}
// field binding section.
// (grpc.federation.field).by = "'g'"
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[string]{
Value: value,
Expr: `'g'`,
CacheIndex: 9,
Setter: func(v string) error {
ret.Name = v
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
grpcfed.Logger(ctx).DebugContext(ctx, "resolved org.federation.G", slog.Any("org.federation.G", s.logvalue_Org_Federation_G(ret)))
return ret, nil
}
// resolve_Org_Federation_GetResponse resolve "org.federation.GetResponse" message.
func (s *FederationService) resolve_Org_Federation_GetResponse(ctx context.Context, req *FederationService_Org_Federation_GetResponseArgument) (*GetResponse, error) {
ctx, span := s.tracer.Start(ctx, "org.federation.GetResponse")
defer span.End()
ctx = grpcfed.WithLogger(ctx, grpcfed.Logger(ctx), grpcfed.LogAttrs(ctx)...)
grpcfed.Logger(ctx).DebugContext(ctx, "resolve org.federation.GetResponse", slog.Any("message_args", s.logvalue_Org_Federation_GetResponseArgument(req)))
type localValueType struct {
*grpcfed.LocalValue
vars struct {
A *A
B *B
C *C
D *D
E *E
F *F
G *G
H *H
I *I
J *J
}
}
value := &localValueType{LocalValue: grpcfed.NewLocalValue(ctx, s.celEnvOpts, "grpc.federation.private.org.federation.GetResponseArgument", req)}
ctx = grpcfed.WithLocalValue(ctx, value.LocalValue)
/*
def {
name: "a"
message {
name: "A"
}
}
*/
def_a := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[*A, *localValueType]{
Name: `a`,
Type: grpcfed.CELObjectType("org.federation.A"),
Setter: func(value *localValueType, v *A) error {
value.vars.A = v
return nil
},
Message: func(ctx context.Context, value *localValueType) (any, error) {
args := &FederationService_Org_Federation_AArgument{}
ret, err := s.resolve_Org_Federation_A(ctx, args)
if err != nil {
return nil, err
}
return ret, nil
},
})
}
/*
def {
name: "b"
message {
name: "B"
}
}
*/
def_b := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[*B, *localValueType]{
Name: `b`,
Type: grpcfed.CELObjectType("org.federation.B"),
Setter: func(value *localValueType, v *B) error {
value.vars.B = v
return nil
},
Message: func(ctx context.Context, value *localValueType) (any, error) {
args := &FederationService_Org_Federation_BArgument{}
ret, err := s.resolve_Org_Federation_B(ctx, args)
if err != nil {
return nil, err
}
return ret, nil
},
})
}
/*
def {
name: "c"
message {
name: "C"
args { name: "a", by: "a.name" }
}
}
*/
def_c := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[*C, *localValueType]{
Name: `c`,
Type: grpcfed.CELObjectType("org.federation.C"),
Setter: func(value *localValueType, v *C) error {
value.vars.C = v
return nil
},
Message: func(ctx context.Context, value *localValueType) (any, error) {
args := &FederationService_Org_Federation_CArgument{}
// { name: "a", by: "a.name" }
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[string]{
Value: value,
Expr: `a.name`,
CacheIndex: 10,
Setter: func(v string) error {
args.A = v
return nil
},
}); err != nil {
return nil, err
}
ret, err := s.resolve_Org_Federation_C(ctx, args)
if err != nil {
return nil, err
}
return ret, nil
},
})
}
/*
def {
name: "d"
message {
name: "D"
args { name: "b", by: "b.name" }
}
}
*/
def_d := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[*D, *localValueType]{
Name: `d`,
Type: grpcfed.CELObjectType("org.federation.D"),
Setter: func(value *localValueType, v *D) error {
value.vars.D = v
return nil
},
Message: func(ctx context.Context, value *localValueType) (any, error) {
args := &FederationService_Org_Federation_DArgument{}
// { name: "b", by: "b.name" }
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[string]{
Value: value,
Expr: `b.name`,
CacheIndex: 11,
Setter: func(v string) error {
args.B = v
return nil
},
}); err != nil {
return nil, err
}
ret, err := s.resolve_Org_Federation_D(ctx, args)
if err != nil {
return nil, err
}
return ret, nil
},
})
}
/*
def {
name: "e"
message {
name: "E"
args: [
{ name: "c", by: "c.name" },
{ name: "d", by: "d.name" }
]
}
}
*/
def_e := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[*E, *localValueType]{
Name: `e`,
Type: grpcfed.CELObjectType("org.federation.E"),
Setter: func(value *localValueType, v *E) error {
value.vars.E = v
return nil
},
Message: func(ctx context.Context, value *localValueType) (any, error) {
args := &FederationService_Org_Federation_EArgument{}
// { name: "c", by: "c.name" }
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[string]{
Value: value,
Expr: `c.name`,
CacheIndex: 12,
Setter: func(v string) error {
args.C = v
return nil
},
}); err != nil {
return nil, err
}
// { name: "d", by: "d.name" }
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[string]{
Value: value,
Expr: `d.name`,
CacheIndex: 13,
Setter: func(v string) error {
args.D = v
return nil
},
}); err != nil {
return nil, err
}
ret, err := s.resolve_Org_Federation_E(ctx, args)
if err != nil {
return nil, err
}
return ret, nil
},
})
}
/*
def {
name: "f"
message {
name: "F"
args: [
{ name: "c", by: "c.name" },
{ name: "d", by: "d.name" }
]
}
}
*/
def_f := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[*F, *localValueType]{
Name: `f`,
Type: grpcfed.CELObjectType("org.federation.F"),
Setter: func(value *localValueType, v *F) error {
value.vars.F = v
return nil
},
Message: func(ctx context.Context, value *localValueType) (any, error) {
args := &FederationService_Org_Federation_FArgument{}
// { name: "c", by: "c.name" }
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[string]{
Value: value,
Expr: `c.name`,
CacheIndex: 14,
Setter: func(v string) error {
args.C = v
return nil
},
}); err != nil {
return nil, err
}
// { name: "d", by: "d.name" }
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[string]{
Value: value,
Expr: `d.name`,
CacheIndex: 15,
Setter: func(v string) error {
args.D = v
return nil
},
}); err != nil {
return nil, err
}
ret, err := s.resolve_Org_Federation_F(ctx, args)
if err != nil {
return nil, err
}
return ret, nil
},
})
}
/*
def {
name: "g"
message {
name: "G"
}
}
*/
def_g := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[*G, *localValueType]{
Name: `g`,
Type: grpcfed.CELObjectType("org.federation.G"),
Setter: func(value *localValueType, v *G) error {
value.vars.G = v
return nil
},
Message: func(ctx context.Context, value *localValueType) (any, error) {
args := &FederationService_Org_Federation_GArgument{}
ret, err := s.resolve_Org_Federation_G(ctx, args)
if err != nil {
return nil, err
}
return ret, nil
},
})
}
/*
def {
name: "h"
message {
name: "H"
args: [
{ name: "e", by: "e.name" },
{ name: "f", by: "f.name" },
{ name: "g", by: "g.name" }
]
}
}
*/
def_h := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[*H, *localValueType]{
Name: `h`,
Type: grpcfed.CELObjectType("org.federation.H"),
Setter: func(value *localValueType, v *H) error {
value.vars.H = v
return nil
},
Message: func(ctx context.Context, value *localValueType) (any, error) {
args := &FederationService_Org_Federation_HArgument{}
// { name: "e", by: "e.name" }
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[string]{
Value: value,
Expr: `e.name`,
CacheIndex: 16,
Setter: func(v string) error {
args.E = v
return nil
},
}); err != nil {
return nil, err
}
// { name: "f", by: "f.name" }
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[string]{
Value: value,
Expr: `f.name`,
CacheIndex: 17,
Setter: func(v string) error {
args.F = v
return nil
},
}); err != nil {
return nil, err
}
// { name: "g", by: "g.name" }
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[string]{
Value: value,
Expr: `g.name`,
CacheIndex: 18,
Setter: func(v string) error {
args.G = v
return nil
},
}); err != nil {
return nil, err
}
ret, err := s.resolve_Org_Federation_H(ctx, args)
if err != nil {
return nil, err
}
return ret, nil
},
})
}
/*
def {
name: "i"
message {
name: "I"
}
}
*/
def_i := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[*I, *localValueType]{
Name: `i`,
Type: grpcfed.CELObjectType("org.federation.I"),
Setter: func(value *localValueType, v *I) error {
value.vars.I = v
return nil
},
Message: func(ctx context.Context, value *localValueType) (any, error) {
args := &FederationService_Org_Federation_IArgument{}
ret, err := s.resolve_Org_Federation_I(ctx, args)
if err != nil {
return nil, err
}
return ret, nil
},
})
}
/*
def {
name: "j"
message {
name: "J"
args { name: "i", by: "i.name" }
}
}
*/
def_j := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[*J, *localValueType]{
Name: `j`,
Type: grpcfed.CELObjectType("org.federation.J"),
Setter: func(value *localValueType, v *J) error {
value.vars.J = v
return nil
},
Message: func(ctx context.Context, value *localValueType) (any, error) {
args := &FederationService_Org_Federation_JArgument{}
// { name: "i", by: "i.name" }
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[string]{
Value: value,
Expr: `i.name`,
CacheIndex: 19,
Setter: func(v string) error {
args.I = v
return nil
},
}); err != nil {
return nil, err
}
ret, err := s.resolve_Org_Federation_J(ctx, args)
if err != nil {
return nil, err
}
return ret, nil
},
})
}
// A tree view of message dependencies is shown below.
/*
a ─┐
c ─┐
b ─┐ │
d ─┤
e ─┐
a ─┐ │
c ─┐ │
b ─┐ │ │
d ─┤ │
f ─┤
g ─┤
h ─┐
i ─┐ │
j ─┤
*/
eg, ctx1 := grpcfed.ErrorGroupWithContext(ctx)
grpcfed.GoWithRecover(eg, func() (any, error) {
eg, ctx2 := grpcfed.ErrorGroupWithContext(ctx1)
grpcfed.GoWithRecover(eg, func() (any, error) {
eg, ctx3 := grpcfed.ErrorGroupWithContext(ctx2)
grpcfed.GoWithRecover(eg, func() (any, error) {
if err := def_a(ctx3); err != nil {
grpcfed.RecordErrorToSpan(ctx3, err)
return nil, err
}
if err := def_c(ctx3); err != nil {
grpcfed.RecordErrorToSpan(ctx3, err)
return nil, err
}
return nil, nil
})
grpcfed.GoWithRecover(eg, func() (any, error) {
if err := def_b(ctx3); err != nil {
grpcfed.RecordErrorToSpan(ctx3, err)
return nil, err
}
if err := def_d(ctx3); err != nil {
grpcfed.RecordErrorToSpan(ctx3, err)
return nil, err
}
return nil, nil
})
if err := eg.Wait(); err != nil {
return nil, err
}
if err := def_e(ctx2); err != nil {
grpcfed.RecordErrorToSpan(ctx2, err)
return nil, err
}
return nil, nil
})
grpcfed.GoWithRecover(eg, func() (any, error) {
eg, ctx3 := grpcfed.ErrorGroupWithContext(ctx2)
grpcfed.GoWithRecover(eg, func() (any, error) {
if err := def_a(ctx3); err != nil {
grpcfed.RecordErrorToSpan(ctx3, err)
return nil, err
}
if err := def_c(ctx3); err != nil {
grpcfed.RecordErrorToSpan(ctx3, err)
return nil, err
}
return nil, nil
})
grpcfed.GoWithRecover(eg, func() (any, error) {
if err := def_b(ctx3); err != nil {
grpcfed.RecordErrorToSpan(ctx3, err)
return nil, err
}
if err := def_d(ctx3); err != nil {
grpcfed.RecordErrorToSpan(ctx3, err)
return nil, err
}
return nil, nil
})
if err := eg.Wait(); err != nil {
return nil, err
}
if err := def_f(ctx2); err != nil {
grpcfed.RecordErrorToSpan(ctx2, err)
return nil, err
}
return nil, nil
})
grpcfed.GoWithRecover(eg, func() (any, error) {
if err := def_g(ctx2); err != nil {
grpcfed.RecordErrorToSpan(ctx2, err)
return nil, err
}
return nil, nil
})
if err := eg.Wait(); err != nil {
return nil, err
}
if err := def_h(ctx1); err != nil {
grpcfed.RecordErrorToSpan(ctx1, err)
return nil, err
}
return nil, nil
})
grpcfed.GoWithRecover(eg, func() (any, error) {
if err := def_i(ctx1); err != nil {
grpcfed.RecordErrorToSpan(ctx1, err)
return nil, err
}
if err := def_j(ctx1); err != nil {
grpcfed.RecordErrorToSpan(ctx1, err)
return nil, err
}
return nil, nil
})
if err := eg.Wait(); err != nil {
return nil, err
}
// assign named parameters to message arguments to pass to the custom resolver.
req.FederationService_Org_Federation_GetResponseVariable.A = value.vars.A
req.FederationService_Org_Federation_GetResponseVariable.B = value.vars.B
req.FederationService_Org_Federation_GetResponseVariable.C = value.vars.C
req.FederationService_Org_Federation_GetResponseVariable.D = value.vars.D
req.FederationService_Org_Federation_GetResponseVariable.E = value.vars.E
req.FederationService_Org_Federation_GetResponseVariable.F = value.vars.F
req.FederationService_Org_Federation_GetResponseVariable.G = value.vars.G
req.FederationService_Org_Federation_GetResponseVariable.H = value.vars.H
req.FederationService_Org_Federation_GetResponseVariable.I = value.vars.I
req.FederationService_Org_Federation_GetResponseVariable.J = value.vars.J
// create a message value to be returned.
ret := &GetResponse{}
// field binding section.
// (grpc.federation.field).by = "h.name"
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[string]{
Value: value,
Expr: `h.name`,
CacheIndex: 20,
Setter: func(v string) error {
ret.Hname = v
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
// (grpc.federation.field).by = "j.name"
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[string]{
Value: value,
Expr: `j.name`,
CacheIndex: 21,
Setter: func(v string) error {
ret.Jname = v
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
grpcfed.Logger(ctx).DebugContext(ctx, "resolved org.federation.GetResponse", slog.Any("org.federation.GetResponse", s.logvalue_Org_Federation_GetResponse(ret)))
return ret, nil
}
// resolve_Org_Federation_H resolve "org.federation.H" message.
func (s *FederationService) resolve_Org_Federation_H(ctx context.Context, req *FederationService_Org_Federation_HArgument) (*H, error) {
ctx, span := s.tracer.Start(ctx, "org.federation.H")
defer span.End()
ctx = grpcfed.WithLogger(ctx, grpcfed.Logger(ctx), grpcfed.LogAttrs(ctx)...)
grpcfed.Logger(ctx).DebugContext(ctx, "resolve org.federation.H", slog.Any("message_args", s.logvalue_Org_Federation_HArgument(req)))
type localValueType struct {
*grpcfed.LocalValue
vars struct {
}
}
value := &localValueType{LocalValue: grpcfed.NewLocalValue(ctx, s.celEnvOpts, "grpc.federation.private.org.federation.HArgument", req)}
ctx = grpcfed.WithLocalValue(ctx, value.LocalValue)
// create a message value to be returned.
ret := &H{}
// field binding section.
// (grpc.federation.field).by = "'h'"
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[string]{
Value: value,
Expr: `'h'`,
CacheIndex: 22,
Setter: func(v string) error {
ret.Name = v
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
grpcfed.Logger(ctx).DebugContext(ctx, "resolved org.federation.H", slog.Any("org.federation.H", s.logvalue_Org_Federation_H(ret)))
return ret, nil
}
// resolve_Org_Federation_I resolve "org.federation.I" message.
func (s *FederationService) resolve_Org_Federation_I(ctx context.Context, req *FederationService_Org_Federation_IArgument) (*I, error) {
ctx, span := s.tracer.Start(ctx, "org.federation.I")
defer span.End()
ctx = grpcfed.WithLogger(ctx, grpcfed.Logger(ctx), grpcfed.LogAttrs(ctx)...)
grpcfed.Logger(ctx).DebugContext(ctx, "resolve org.federation.I", slog.Any("message_args", s.logvalue_Org_Federation_IArgument(req)))
type localValueType struct {
*grpcfed.LocalValue
vars struct {
}
}
value := &localValueType{LocalValue: grpcfed.NewLocalValue(ctx, s.celEnvOpts, "grpc.federation.private.org.federation.IArgument", req)}
ctx = grpcfed.WithLocalValue(ctx, value.LocalValue)
// create a message value to be returned.
ret := &I{}
// field binding section.
// (grpc.federation.field).by = "'i'"
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[string]{
Value: value,
Expr: `'i'`,
CacheIndex: 23,
Setter: func(v string) error {
ret.Name = v
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
grpcfed.Logger(ctx).DebugContext(ctx, "resolved org.federation.I", slog.Any("org.federation.I", s.logvalue_Org_Federation_I(ret)))
return ret, nil
}
// resolve_Org_Federation_J resolve "org.federation.J" message.
func (s *FederationService) resolve_Org_Federation_J(ctx context.Context, req *FederationService_Org_Federation_JArgument) (*J, error) {
ctx, span := s.tracer.Start(ctx, "org.federation.J")
defer span.End()
ctx = grpcfed.WithLogger(ctx, grpcfed.Logger(ctx), grpcfed.LogAttrs(ctx)...)
grpcfed.Logger(ctx).DebugContext(ctx, "resolve org.federation.J", slog.Any("message_args", s.logvalue_Org_Federation_JArgument(req)))
type localValueType struct {
*grpcfed.LocalValue
vars struct {
}
}
value := &localValueType{LocalValue: grpcfed.NewLocalValue(ctx, s.celEnvOpts, "grpc.federation.private.org.federation.JArgument", req)}
ctx = grpcfed.WithLocalValue(ctx, value.LocalValue)
// create a message value to be returned.
ret := &J{}
// field binding section.
// (grpc.federation.field).by = "'j'"
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[string]{
Value: value,
Expr: `'j'`,
CacheIndex: 24,
Setter: func(v string) error {
ret.Name = v
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
grpcfed.Logger(ctx).DebugContext(ctx, "resolved org.federation.J", slog.Any("org.federation.J", s.logvalue_Org_Federation_J(ret)))
return ret, nil
}
func (s *FederationService) logvalue_Org_Federation_A(v *A) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.String("name", v.GetName()),
)
}
func (s *FederationService) logvalue_Org_Federation_AA(v *AA) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.String("name", v.GetName()),
)
}
func (s *FederationService) logvalue_Org_Federation_AAArgument(v *FederationService_Org_Federation_AAArgument) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue()
}
func (s *FederationService) logvalue_Org_Federation_AArgument(v *FederationService_Org_Federation_AArgument) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue()
}
func (s *FederationService) logvalue_Org_Federation_AB(v *AB) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.String("name", v.GetName()),
)
}
func (s *FederationService) logvalue_Org_Federation_ABArgument(v *FederationService_Org_Federation_ABArgument) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue()
}
func (s *FederationService) logvalue_Org_Federation_B(v *B) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.String("name", v.GetName()),
)
}
func (s *FederationService) logvalue_Org_Federation_BArgument(v *FederationService_Org_Federation_BArgument) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue()
}
func (s *FederationService) logvalue_Org_Federation_C(v *C) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.String("name", v.GetName()),
)
}
func (s *FederationService) logvalue_Org_Federation_CArgument(v *FederationService_Org_Federation_CArgument) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.String("a", v.A),
)
}
func (s *FederationService) logvalue_Org_Federation_D(v *D) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.String("name", v.GetName()),
)
}
func (s *FederationService) logvalue_Org_Federation_DArgument(v *FederationService_Org_Federation_DArgument) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.String("b", v.B),
)
}
func (s *FederationService) logvalue_Org_Federation_E(v *E) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.String("name", v.GetName()),
)
}
func (s *FederationService) logvalue_Org_Federation_EArgument(v *FederationService_Org_Federation_EArgument) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.String("c", v.C),
slog.String("d", v.D),
)
}
func (s *FederationService) logvalue_Org_Federation_F(v *F) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.String("name", v.GetName()),
)
}
func (s *FederationService) logvalue_Org_Federation_FArgument(v *FederationService_Org_Federation_FArgument) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.String("c", v.C),
slog.String("d", v.D),
)
}
func (s *FederationService) logvalue_Org_Federation_G(v *G) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.String("name", v.GetName()),
)
}
func (s *FederationService) logvalue_Org_Federation_GArgument(v *FederationService_Org_Federation_GArgument) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue()
}
func (s *FederationService) logvalue_Org_Federation_GetResponse(v *GetResponse) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.String("hname", v.GetHname()),
slog.String("jname", v.GetJname()),
)
}
func (s *FederationService) logvalue_Org_Federation_GetResponseArgument(v *FederationService_Org_Federation_GetResponseArgument) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue()
}
func (s *FederationService) logvalue_Org_Federation_H(v *H) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.String("name", v.GetName()),
)
}
func (s *FederationService) logvalue_Org_Federation_HArgument(v *FederationService_Org_Federation_HArgument) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.String("e", v.E),
slog.String("f", v.F),
slog.String("g", v.G),
)
}
func (s *FederationService) logvalue_Org_Federation_I(v *I) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.String("name", v.GetName()),
)
}
func (s *FederationService) logvalue_Org_Federation_IArgument(v *FederationService_Org_Federation_IArgument) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue()
}
func (s *FederationService) logvalue_Org_Federation_J(v *J) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.String("name", v.GetName()),
)
}
func (s *FederationService) logvalue_Org_Federation_JArgument(v *FederationService_Org_Federation_JArgument) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.String("i", v.I),
)
}
================================================
FILE: _examples/05_async/go.mod
================================================
module example
go 1.24.0
replace github.com/mercari/grpc-federation => ../../
require (
github.com/google/go-cmp v0.7.0
github.com/mercari/grpc-federation v0.0.0-00010101000000-000000000000
go.opentelemetry.io/otel v1.24.0
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.21.0
go.opentelemetry.io/otel/sdk v1.24.0
go.opentelemetry.io/otel/trace v1.24.0
go.uber.org/goleak v1.3.0
google.golang.org/genproto/googleapis/rpc v0.0.0-20240826202546-f6391c0de4c7
google.golang.org/grpc v1.65.0
google.golang.org/protobuf v1.34.2
)
require (
cel.dev/expr v0.19.1 // indirect
github.com/antlr4-go/antlr/v4 v4.13.0 // indirect
github.com/cenkalti/backoff/v4 v4.2.1 // indirect
github.com/go-logr/logr v1.4.1 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
github.com/goccy/wasi-go v0.3.2 // indirect
github.com/google/cel-go v0.23.1 // indirect
github.com/google/uuid v1.6.0 // indirect
github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0 // indirect
github.com/kelseyhightower/envconfig v1.4.0 // indirect
github.com/stealthrocket/wazergo v0.19.1 // indirect
github.com/stoewer/go-strcase v1.3.0 // indirect
github.com/tetratelabs/wazero v1.10.1 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.21.0 // indirect
go.opentelemetry.io/otel/metric v1.24.0 // indirect
go.opentelemetry.io/proto/otlp v1.0.0 // indirect
golang.org/x/exp v0.0.0-20250506013437-ce4c2cf36ca6 // indirect
golang.org/x/net v0.38.0 // indirect
golang.org/x/sync v0.14.0 // indirect
golang.org/x/sys v0.37.0 // indirect
golang.org/x/text v0.23.0 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20240826202546-f6391c0de4c7 // indirect
)
================================================
FILE: _examples/05_async/go.sum
================================================
cel.dev/expr v0.19.1 h1:NciYrtDRIR0lNCnH1LFJegdjspNx9fI59O7TWcua/W4=
cel.dev/expr v0.19.1/go.mod h1:MrpN08Q+lEBs+bGYdLxxHkZoUSsCp0nSKTs0nTymJgw=
github.com/antlr4-go/antlr/v4 v4.13.0 h1:lxCg3LAv+EUK6t1i0y1V6/SLeUi0eKEKdhQAlS8TVTI=
github.com/antlr4-go/antlr/v4 v4.13.0/go.mod h1:pfChB/xh/Unjila75QW7+VU4TSnWnnk9UTnmpPaOR2g=
github.com/cenkalti/backoff/v4 v4.2.1 h1:y4OZtCnogmCPw98Zjyt5a6+QwPLGkiQsYW5oUqylYbM=
github.com/cenkalti/backoff/v4 v4.2.1/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A=
github.com/go-logr/logr v1.4.1 h1:pKouT5E8xu9zeFC39JXRDukb6JFQPXM5p5I91188VAQ=
github.com/go-logr/logr v1.4.1/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY=
github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag=
github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE=
github.com/goccy/wasi-go v0.3.2 h1:wAvGXmqCkfcp0B0AwIp5Ya53hzDwkKm9W8iuT3nCCz0=
github.com/goccy/wasi-go v0.3.2/go.mod h1:nIKD204n9xa4Z20UV+XA483kIr9TAl2vXr+X5qVAO5M=
github.com/golang/glog v1.2.1 h1:OptwRhECazUx5ix5TTWC3EZhsZEHWcYWY4FQHTIubm4=
github.com/golang/glog v1.2.1/go.mod h1:6AhwSGph0fcJtXVM/PEHPqZlFeoLxhs7/t5UDAwmO+w=
github.com/google/cel-go v0.23.1 h1:91ThhEZlBcE5rB2adBVXqvDoqdL8BG2oyhd0bK1I/r4=
github.com/google/cel-go v0.23.1/go.mod h1:52Pb6QsDbC5kvgxvZhiL9QX1oZEkcUF/ZqaPx1J5Wwo=
github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8=
github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU=
github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0 h1:YBftPWNWd4WwGqtY2yeZL2ef8rHAxPBD8KFhJpmcqms=
github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0/go.mod h1:YN5jB8ie0yfIUg6VvR9Kz84aCaG7AsGZnLjhHbUqwPg=
github.com/kelseyhightower/envconfig v1.4.0 h1:Im6hONhd3pLkfDFsbRgu68RDNkGF1r3dvMUtDTo2cv8=
github.com/kelseyhightower/envconfig v1.4.0/go.mod h1:cccZRl6mQpaq41TPp5QxidR+Sa3axMbJDNb//FQX6Gg=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/stealthrocket/wazergo v0.19.1 h1:BPrITETPgSFwiytwmToO0MbUC/+RGC39JScz1JmmG6c=
github.com/stealthrocket/wazergo v0.19.1/go.mod h1:riI0hxw4ndZA5e6z7PesHg2BtTftcZaMxRcoiGGipTs=
github.com/stoewer/go-strcase v1.3.0 h1:g0eASXYtp+yvN9fK8sH94oCIk0fau9uV1/ZdJ0AVEzs=
github.com/stoewer/go-strcase v1.3.0/go.mod h1:fAH5hQ5pehh+j3nZfvwdk2RgEgQjAoM8wodgtPmh1xo=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=
github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo=
github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk=
github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
github.com/tetratelabs/wazero v1.10.1 h1:2DugeJf6VVk58KTPszlNfeeN8AhhpwcZqkJj2wwFuH8=
github.com/tetratelabs/wazero v1.10.1/go.mod h1:DRm5twOQ5Gr1AoEdSi0CLjDQF1J9ZAuyqFIjl1KKfQU=
go.opentelemetry.io/otel v1.24.0 h1:0LAOdjNmQeSTzGBzduGe/rU4tZhMwL5rWgtp9Ku5Jfo=
go.opentelemetry.io/otel v1.24.0/go.mod h1:W7b9Ozg4nkF5tWI5zsXkaKKDjdVjpD4oAt9Qi/MArHo=
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.21.0 h1:cl5P5/GIfFh4t6xyruOgJP5QiA1pw4fYYdv6nc6CBWw=
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.21.0/go.mod h1:zgBdWWAu7oEEMC06MMKc5NLbA/1YDXV1sMpSqEeLQLg=
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.21.0 h1:tIqheXEFWAZ7O8A7m+J0aPTmpJN3YQ7qetUAdkkkKpk=
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.21.0/go.mod h1:nUeKExfxAQVbiVFn32YXpXZZHZ61Cc3s3Rn1pDBGAb0=
go.opentelemetry.io/otel/metric v1.24.0 h1:6EhoGWWK28x1fbpA4tYTOWBkPefTDQnb8WSGXlc88kI=
go.opentelemetry.io/otel/metric v1.24.0/go.mod h1:VYhLe1rFfxuTXLgj4CBiyz+9WYBA8pNGJgDcSFRKBco=
go.opentelemetry.io/otel/sdk v1.24.0 h1:YMPPDNymmQN3ZgczicBY3B6sf9n62Dlj9pWD3ucgoDw=
go.opentelemetry.io/otel/sdk v1.24.0/go.mod h1:KVrIYw6tEubO9E96HQpcmpTKDVn9gdv35HoYiQWGDFg=
go.opentelemetry.io/otel/trace v1.24.0 h1:CsKnnL4dUAr/0llH9FKuc698G04IrpWV0MQA/Y1YELI=
go.opentelemetry.io/otel/trace v1.24.0/go.mod h1:HPc3Xr/cOApsBI154IU0OI0HJexz+aw5uPdbs3UCjNU=
go.opentelemetry.io/proto/otlp v1.0.0 h1:T0TX0tmXU8a3CbNXzEKGeU5mIVOdf0oykP+u2lIVU/I=
go.opentelemetry.io/proto/otlp v1.0.0/go.mod h1:Sy6pihPLfYHkr3NkUbEhGHFhINUSI/v80hjKIs5JXpM=
go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto=
go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE=
golang.org/x/exp v0.0.0-20250506013437-ce4c2cf36ca6 h1:y5zboxd6LQAqYIhHnB48p0ByQ/GnQx2BE33L8BOHQkI=
golang.org/x/exp v0.0.0-20250506013437-ce4c2cf36ca6/go.mod h1:U6Lno4MTRCDY+Ba7aCcauB9T60gsv5s4ralQzP72ZoQ=
golang.org/x/net v0.38.0 h1:vRMAPTMaeGqVhG5QyLJHqNDwecKTomGeqbnfZyKlBI8=
golang.org/x/net v0.38.0/go.mod h1:ivrbrMbzFq5J41QOQh0siUuly180yBYtLp+CKbEaFx8=
golang.org/x/sync v0.14.0 h1:woo0S4Yywslg6hp4eUFjTVOyKt0RookbpAHG4c1HmhQ=
golang.org/x/sync v0.14.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA=
golang.org/x/sys v0.37.0 h1:fdNQudmxPjkdUTPnLn5mdQv7Zwvbvpaxqs831goi9kQ=
golang.org/x/sys v0.37.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks=
golang.org/x/text v0.23.0 h1:D71I7dUrlY+VX0gQShAThNGHFxZ13dGLBHQLVl1mJlY=
golang.org/x/text v0.23.0/go.mod h1:/BLNzu4aZCJ1+kcD0DNRotWKage4q2rGVAg4o22unh4=
google.golang.org/genproto/googleapis/api v0.0.0-20240826202546-f6391c0de4c7 h1:YcyjlL1PRr2Q17/I0dPk2JmYS5CDXfcdb2Z3YRioEbw=
google.golang.org/genproto/googleapis/api v0.0.0-20240826202546-f6391c0de4c7/go.mod h1:OCdP9MfskevB/rbYvHTsXTtKC+3bHWajPdoKgjcYkfo=
google.golang.org/genproto/googleapis/rpc v0.0.0-20240826202546-f6391c0de4c7 h1:2035KHhUv+EpyB+hWgJnaWKJOdX1E95w2S8Rr4uWKTs=
google.golang.org/genproto/googleapis/rpc v0.0.0-20240826202546-f6391c0de4c7/go.mod h1:UqMtugtsSgubUsoxbuAoiCXvqvErP7Gf0so0mK9tHxU=
google.golang.org/grpc v1.65.0 h1:bs/cUb4lp1G5iImFFd3u5ixQzweKizoZJAwBNLR42lc=
google.golang.org/grpc v1.65.0/go.mod h1:WgYC2ypjlB0EiQi6wdKixMqukr6lBc0Vo+oOgjrM5ZQ=
google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg=
google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
================================================
FILE: _examples/05_async/grpc/federation/federation.pb.go
================================================
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.33.0
// protoc (unknown)
// source: grpc/federation/federation.proto
package federation
import (
_ "github.com/mercari/grpc-federation/grpc/federation/cel"
code "google.golang.org/genproto/googleapis/rpc/code"
errdetails "google.golang.org/genproto/googleapis/rpc/errdetails"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
descriptorpb "google.golang.org/protobuf/types/descriptorpb"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
// TypeKind is primitive kind list.
type TypeKind int32
const (
// UNKNOWN represents unexpected value.
TypeKind_UNKNOWN TypeKind = 0
// STRING is used to convert the input value to `string` type.
TypeKind_STRING TypeKind = 1
// BOOL is used to convert the input value to `bool` type.
TypeKind_BOOL TypeKind = 2
// INT64 is used to convert the input value to `int64` type.
TypeKind_INT64 TypeKind = 3
// UINT64 is used to convert the input value to `uint64` type.
TypeKind_UINT64 TypeKind = 4
// DOUBLE is used to convert the input value to `double` type.
TypeKind_DOUBLE TypeKind = 5
// DURATION is used to convert the input value to the `google.protobuf.Duration` type.
TypeKind_DURATION TypeKind = 6
)
// Enum value maps for TypeKind.
var (
TypeKind_name = map[int32]string{
0: "UNKNOWN",
1: "STRING",
2: "BOOL",
3: "INT64",
4: "UINT64",
5: "DOUBLE",
6: "DURATION",
}
TypeKind_value = map[string]int32{
"UNKNOWN": 0,
"STRING": 1,
"BOOL": 2,
"INT64": 3,
"UINT64": 4,
"DOUBLE": 5,
"DURATION": 6,
}
)
func (x TypeKind) Enum() *TypeKind {
p := new(TypeKind)
*p = x
return p
}
func (x TypeKind) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (TypeKind) Descriptor() protoreflect.EnumDescriptor {
return file_grpc_federation_federation_proto_enumTypes[0].Descriptor()
}
func (TypeKind) Type() protoreflect.EnumType {
return &file_grpc_federation_federation_proto_enumTypes[0]
}
func (x TypeKind) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use TypeKind.Descriptor instead.
func (TypeKind) EnumDescriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{0}
}
// LogLevel is the importance or severity of a log event.
type GRPCError_LogLevel int32
const (
// UNKNOWN represents unexpected value.
GRPCError_UNKNOWN GRPCError_LogLevel = 0
// DEBUG is used for detailed information that is useful during development and debugging.
GRPCError_DEBUG GRPCError_LogLevel = 1
// INFO logs are used to provide information about the normal functioning of the application.
GRPCError_INFO GRPCError_LogLevel = 2
// WARN signifies a potential problem or warning that does not necessarily stop the program from working but may lead to issues in the future.
GRPCError_WARN GRPCError_LogLevel = 3
// ERROR indicates a serious issue that has caused a failure in the application.
GRPCError_ERROR GRPCError_LogLevel = 4
)
// Enum value maps for GRPCError_LogLevel.
var (
GRPCError_LogLevel_name = map[int32]string{
0: "UNKNOWN",
1: "DEBUG",
2: "INFO",
3: "WARN",
4: "ERROR",
}
GRPCError_LogLevel_value = map[string]int32{
"UNKNOWN": 0,
"DEBUG": 1,
"INFO": 2,
"WARN": 3,
"ERROR": 4,
}
)
func (x GRPCError_LogLevel) Enum() *GRPCError_LogLevel {
p := new(GRPCError_LogLevel)
*p = x
return p
}
func (x GRPCError_LogLevel) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (GRPCError_LogLevel) Descriptor() protoreflect.EnumDescriptor {
return file_grpc_federation_federation_proto_enumTypes[1].Descriptor()
}
func (GRPCError_LogLevel) Type() protoreflect.EnumType {
return &file_grpc_federation_federation_proto_enumTypes[1]
}
func (x GRPCError_LogLevel) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use GRPCError_LogLevel.Descriptor instead.
func (GRPCError_LogLevel) EnumDescriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{24, 0}
}
type FileRule struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Plugin *CELPlugin `protobuf:"bytes,1,opt,name=plugin,proto3" json:"plugin,omitempty"`
// import can be used to resolve methods, messages, etc. that are referenced in gRPC Federation rules.
Import []string `protobuf:"bytes,2,rep,name=import,proto3" json:"import,omitempty"`
}
func (x *FileRule) Reset() {
*x = FileRule{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *FileRule) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*FileRule) ProtoMessage() {}
func (x *FileRule) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use FileRule.ProtoReflect.Descriptor instead.
func (*FileRule) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{0}
}
func (x *FileRule) GetPlugin() *CELPlugin {
if x != nil {
return x.Plugin
}
return nil
}
func (x *FileRule) GetImport() []string {
if x != nil {
return x.Import
}
return nil
}
type EnumRule struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// alias mapping between enums defined in other packages and enums defined on the federation service side.
// The alias is the FQDN ( . ) to the enum.
// If this definition exists, type conversion is automatically performed before the enum value assignment operation.
// If a enum with this option has a value that is not present in the enum specified by alias, and the alias option is not specified for that value, an error is occurred.
// You can specify multiple aliases. In that case, only values common to all aliases will be considered.
// Specifying a value that is not included in either alias will result in an error.
Alias []string `protobuf:"bytes,1,rep,name=alias,proto3" json:"alias,omitempty"`
}
func (x *EnumRule) Reset() {
*x = EnumRule{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *EnumRule) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*EnumRule) ProtoMessage() {}
func (x *EnumRule) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use EnumRule.ProtoReflect.Descriptor instead.
func (*EnumRule) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{1}
}
func (x *EnumRule) GetAlias() []string {
if x != nil {
return x.Alias
}
return nil
}
type EnumValueRule struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// specifies the default value of the enum.
// All values other than those specified in alias will be default values.
Default *bool `protobuf:"varint,1,opt,name=default,proto3,oneof" json:"default,omitempty"`
// alias can be used when alias is specified in grpc.federation.enum option,
// and specifies the value name to be referenced among the enums specified in alias of enum option.
// multiple value names can be specified for alias.
Alias []string `protobuf:"bytes,2,rep,name=alias,proto3" json:"alias,omitempty"`
// attr is used to hold multiple name-value pairs corresponding to an enum value.
// The values specified by the name must be consistently specified for all enum values.
// The values stored using this feature can be retrieved using the `attr()` method of the enum API.
Attr []*EnumValueAttribute `protobuf:"bytes,3,rep,name=attr,proto3" json:"attr,omitempty"`
// noalias exclude from the target of alias.
// This option cannot be specified simultaneously with `default` or `alias`.
Noalias *bool `protobuf:"varint,4,opt,name=noalias,proto3,oneof" json:"noalias,omitempty"`
}
func (x *EnumValueRule) Reset() {
*x = EnumValueRule{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *EnumValueRule) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*EnumValueRule) ProtoMessage() {}
func (x *EnumValueRule) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use EnumValueRule.ProtoReflect.Descriptor instead.
func (*EnumValueRule) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{2}
}
func (x *EnumValueRule) GetDefault() bool {
if x != nil && x.Default != nil {
return *x.Default
}
return false
}
func (x *EnumValueRule) GetAlias() []string {
if x != nil {
return x.Alias
}
return nil
}
func (x *EnumValueRule) GetAttr() []*EnumValueAttribute {
if x != nil {
return x.Attr
}
return nil
}
func (x *EnumValueRule) GetNoalias() bool {
if x != nil && x.Noalias != nil {
return *x.Noalias
}
return false
}
type EnumValueAttribute struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// name is the attribute key.
// This value is used to search for values using the `attr()` method.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// value represents the value corresponding to `name`.
Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
}
func (x *EnumValueAttribute) Reset() {
*x = EnumValueAttribute{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *EnumValueAttribute) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*EnumValueAttribute) ProtoMessage() {}
func (x *EnumValueAttribute) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[3]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use EnumValueAttribute.ProtoReflect.Descriptor instead.
func (*EnumValueAttribute) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{3}
}
func (x *EnumValueAttribute) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *EnumValueAttribute) GetValue() string {
if x != nil {
return x.Value
}
return ""
}
type OneofRule struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
}
func (x *OneofRule) Reset() {
*x = OneofRule{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *OneofRule) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*OneofRule) ProtoMessage() {}
func (x *OneofRule) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[4]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use OneofRule.ProtoReflect.Descriptor instead.
func (*OneofRule) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{4}
}
// ServiceRule define gRPC Federation rules for the service.
type ServiceRule struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// env defines the environment variable.
Env *Env `protobuf:"bytes,1,opt,name=env,proto3" json:"env,omitempty"`
// var defines the service-level variables.
Var []*ServiceVariable `protobuf:"bytes,2,rep,name=var,proto3" json:"var,omitempty"`
}
func (x *ServiceRule) Reset() {
*x = ServiceRule{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[5]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ServiceRule) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ServiceRule) ProtoMessage() {}
func (x *ServiceRule) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[5]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ServiceRule.ProtoReflect.Descriptor instead.
func (*ServiceRule) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{5}
}
func (x *ServiceRule) GetEnv() *Env {
if x != nil {
return x.Env
}
return nil
}
func (x *ServiceRule) GetVar() []*ServiceVariable {
if x != nil {
return x.Var
}
return nil
}
// Env is used when setting environment variables.
// There are two ways to configure it.
type Env struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// var is used to directly list environment variables.
Var []*EnvVar `protobuf:"bytes,1,rep,name=var,proto3" json:"var,omitempty"`
// message is used to reference an already defined Protocol Buffers' message for defining environment variables.
// If you want to set detailed options for the fields of the message, use the `env` option in FieldRule.
Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
}
func (x *Env) Reset() {
*x = Env{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[6]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Env) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Env) ProtoMessage() {}
func (x *Env) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[6]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Env.ProtoReflect.Descriptor instead.
func (*Env) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{6}
}
func (x *Env) GetVar() []*EnvVar {
if x != nil {
return x.Var
}
return nil
}
func (x *Env) GetMessage() string {
if x != nil {
return x.Message
}
return ""
}
// ServiceVariable define variables at the service level.
// This definition is executed at server startup, after the initialization of Env.
// The defined variables can be used across all messages that the service depends on.
type ServiceVariable struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// name is a variable name.
// This name can be referenced in all CELs related to the service by using `grpc.federation.var.` prefix.
Name *string `protobuf:"bytes,1,opt,name=name,proto3,oneof" json:"name,omitempty"`
// if specify the condition for evaluating expr.
// this value evaluated by CEL and it must return a boolean value.
// If the result of evaluation is `false`, the value assigned to name is the default value of the result of evaluation of `expr`.
If *string `protobuf:"bytes,2,opt,name=if,proto3,oneof" json:"if,omitempty"`
// expr specify the value to be assigned to name.
//
// Types that are assignable to Expr:
//
// *ServiceVariable_By
// *ServiceVariable_Map
// *ServiceVariable_Message
// *ServiceVariable_Validation
// *ServiceVariable_Enum
// *ServiceVariable_Switch
Expr isServiceVariable_Expr `protobuf_oneof:"expr"`
}
func (x *ServiceVariable) Reset() {
*x = ServiceVariable{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[7]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ServiceVariable) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ServiceVariable) ProtoMessage() {}
func (x *ServiceVariable) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[7]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ServiceVariable.ProtoReflect.Descriptor instead.
func (*ServiceVariable) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{7}
}
func (x *ServiceVariable) GetName() string {
if x != nil && x.Name != nil {
return *x.Name
}
return ""
}
func (x *ServiceVariable) GetIf() string {
if x != nil && x.If != nil {
return *x.If
}
return ""
}
func (m *ServiceVariable) GetExpr() isServiceVariable_Expr {
if m != nil {
return m.Expr
}
return nil
}
func (x *ServiceVariable) GetBy() string {
if x, ok := x.GetExpr().(*ServiceVariable_By); ok {
return x.By
}
return ""
}
func (x *ServiceVariable) GetMap() *MapExpr {
if x, ok := x.GetExpr().(*ServiceVariable_Map); ok {
return x.Map
}
return nil
}
func (x *ServiceVariable) GetMessage() *MessageExpr {
if x, ok := x.GetExpr().(*ServiceVariable_Message); ok {
return x.Message
}
return nil
}
func (x *ServiceVariable) GetValidation() *ServiceVariableValidationExpr {
if x, ok := x.GetExpr().(*ServiceVariable_Validation); ok {
return x.Validation
}
return nil
}
func (x *ServiceVariable) GetEnum() *EnumExpr {
if x, ok := x.GetExpr().(*ServiceVariable_Enum); ok {
return x.Enum
}
return nil
}
func (x *ServiceVariable) GetSwitch() *SwitchExpr {
if x, ok := x.GetExpr().(*ServiceVariable_Switch); ok {
return x.Switch
}
return nil
}
type isServiceVariable_Expr interface {
isServiceVariable_Expr()
}
type ServiceVariable_By struct {
// `by` evaluates with CEL.
By string `protobuf:"bytes,11,opt,name=by,proto3,oneof"`
}
type ServiceVariable_Map struct {
// map apply map operation for the specified repeated type.
Map *MapExpr `protobuf:"bytes,12,opt,name=map,proto3,oneof"`
}
type ServiceVariable_Message struct {
// message gets with message arguments.
Message *MessageExpr `protobuf:"bytes,13,opt,name=message,proto3,oneof"`
}
type ServiceVariable_Validation struct {
// validation defines the validation rule and message.
Validation *ServiceVariableValidationExpr `protobuf:"bytes,14,opt,name=validation,proto3,oneof"`
}
type ServiceVariable_Enum struct {
// enum gets with cel value.
Enum *EnumExpr `protobuf:"bytes,15,opt,name=enum,proto3,oneof"`
}
type ServiceVariable_Switch struct {
// switch provides conditional evaluation with multiple branches.
Switch *SwitchExpr `protobuf:"bytes,16,opt,name=switch,proto3,oneof"`
}
func (*ServiceVariable_By) isServiceVariable_Expr() {}
func (*ServiceVariable_Map) isServiceVariable_Expr() {}
func (*ServiceVariable_Message) isServiceVariable_Expr() {}
func (*ServiceVariable_Validation) isServiceVariable_Expr() {}
func (*ServiceVariable_Enum) isServiceVariable_Expr() {}
func (*ServiceVariable_Switch) isServiceVariable_Expr() {}
// ServiceVariableValidationExpr represents validation rule and error message.
type ServiceVariableValidationExpr struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// if specifies condition in CEL. If the condition is true, it returns error.
// The return value must always be of type boolean.
If string `protobuf:"bytes,1,opt,name=if,proto3" json:"if,omitempty"`
// message is a error message in CEL.
Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
}
func (x *ServiceVariableValidationExpr) Reset() {
*x = ServiceVariableValidationExpr{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[8]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ServiceVariableValidationExpr) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ServiceVariableValidationExpr) ProtoMessage() {}
func (x *ServiceVariableValidationExpr) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[8]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ServiceVariableValidationExpr.ProtoReflect.Descriptor instead.
func (*ServiceVariableValidationExpr) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{8}
}
func (x *ServiceVariableValidationExpr) GetIf() string {
if x != nil {
return x.If
}
return ""
}
func (x *ServiceVariableValidationExpr) GetMessage() string {
if x != nil {
return x.Message
}
return ""
}
// EnvVar represents an environment variable.
type EnvVar struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// name is an environment variable name.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// type is an environment variable type.
Type *EnvType `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"`
// option is an additional option for parsing environment variable.
Option *EnvVarOption `protobuf:"bytes,3,opt,name=option,proto3,oneof" json:"option,omitempty"`
}
func (x *EnvVar) Reset() {
*x = EnvVar{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[9]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *EnvVar) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*EnvVar) ProtoMessage() {}
func (x *EnvVar) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[9]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use EnvVar.ProtoReflect.Descriptor instead.
func (*EnvVar) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{9}
}
func (x *EnvVar) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *EnvVar) GetType() *EnvType {
if x != nil {
return x.Type
}
return nil
}
func (x *EnvVar) GetOption() *EnvVarOption {
if x != nil {
return x.Option
}
return nil
}
// EnvType represents type information for environment variable.
type EnvType struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Types that are assignable to Type:
//
// *EnvType_Kind
// *EnvType_Repeated
// *EnvType_Map
Type isEnvType_Type `protobuf_oneof:"type"`
}
func (x *EnvType) Reset() {
*x = EnvType{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[10]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *EnvType) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*EnvType) ProtoMessage() {}
func (x *EnvType) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[10]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use EnvType.ProtoReflect.Descriptor instead.
func (*EnvType) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{10}
}
func (m *EnvType) GetType() isEnvType_Type {
if m != nil {
return m.Type
}
return nil
}
func (x *EnvType) GetKind() TypeKind {
if x, ok := x.GetType().(*EnvType_Kind); ok {
return x.Kind
}
return TypeKind_UNKNOWN
}
func (x *EnvType) GetRepeated() *EnvType {
if x, ok := x.GetType().(*EnvType_Repeated); ok {
return x.Repeated
}
return nil
}
func (x *EnvType) GetMap() *EnvMapType {
if x, ok := x.GetType().(*EnvType_Map); ok {
return x.Map
}
return nil
}
type isEnvType_Type interface {
isEnvType_Type()
}
type EnvType_Kind struct {
// kind is used when the type is a primitive type.
Kind TypeKind `protobuf:"varint,1,opt,name=kind,proto3,enum=grpc.federation.TypeKind,oneof"`
}
type EnvType_Repeated struct {
// repeated is used when the type is a repeated type.
Repeated *EnvType `protobuf:"bytes,2,opt,name=repeated,proto3,oneof"`
}
type EnvType_Map struct {
// map is used when the type is a map type.
Map *EnvMapType `protobuf:"bytes,3,opt,name=map,proto3,oneof"`
}
func (*EnvType_Kind) isEnvType_Type() {}
func (*EnvType_Repeated) isEnvType_Type() {}
func (*EnvType_Map) isEnvType_Type() {}
// EnvMapType represents map type.
type EnvMapType struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// key represents map's key type.
Key *EnvType `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
// value represents map's value type.
Value *EnvType `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
}
func (x *EnvMapType) Reset() {
*x = EnvMapType{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[11]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *EnvMapType) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*EnvMapType) ProtoMessage() {}
func (x *EnvMapType) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[11]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use EnvMapType.ProtoReflect.Descriptor instead.
func (*EnvMapType) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{11}
}
func (x *EnvMapType) GetKey() *EnvType {
if x != nil {
return x.Key
}
return nil
}
func (x *EnvMapType) GetValue() *EnvType {
if x != nil {
return x.Value
}
return nil
}
// EnvVarOption represents additional option for environment variable.
// The option work with the `envconfig` library in Go language.
// For detailed specifications, please refer to the library's documentation ( https://pkg.go.dev/github.com/kelseyhightower/envconfig#section-readme ).
type EnvVarOption struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// alternate use this option if you want to use an environment variable with a different name than the value specified in `EnvVar.name`.
Alternate *string `protobuf:"bytes,1,opt,name=alternate,proto3,oneof" json:"alternate,omitempty"`
// default specify the value to use as a fallback if the specified environment variable is not found.
Default *string `protobuf:"bytes,2,opt,name=default,proto3,oneof" json:"default,omitempty"`
// required require the environment variable to exist.
// If it does not exist, an error will occur at startup.
Required *bool `protobuf:"varint,3,opt,name=required,proto3,oneof" json:"required,omitempty"`
// ignored if ignored is true, it does nothing even if the environment variable exists.
Ignored *bool `protobuf:"varint,4,opt,name=ignored,proto3,oneof" json:"ignored,omitempty"`
}
func (x *EnvVarOption) Reset() {
*x = EnvVarOption{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[12]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *EnvVarOption) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*EnvVarOption) ProtoMessage() {}
func (x *EnvVarOption) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[12]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use EnvVarOption.ProtoReflect.Descriptor instead.
func (*EnvVarOption) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{12}
}
func (x *EnvVarOption) GetAlternate() string {
if x != nil && x.Alternate != nil {
return *x.Alternate
}
return ""
}
func (x *EnvVarOption) GetDefault() string {
if x != nil && x.Default != nil {
return *x.Default
}
return ""
}
func (x *EnvVarOption) GetRequired() bool {
if x != nil && x.Required != nil {
return *x.Required
}
return false
}
func (x *EnvVarOption) GetIgnored() bool {
if x != nil && x.Ignored != nil {
return *x.Ignored
}
return false
}
type MethodRule struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// the time to timeout. If the specified time period elapses, DEADLINE_EXCEEDED status is returned.
// If you want to handle this error, you need to implement a custom error handler in Go.
// The format is the same as Go's time.Duration format. See https://pkg.go.dev/time#ParseDuration.
Timeout *string `protobuf:"bytes,1,opt,name=timeout,proto3,oneof" json:"timeout,omitempty"`
// response specify the name of the message you want to use to create the response value.
// If you specify a reserved type like `google.protobuf.Empty` as the response, you cannot define gRPC Federation options.
// In such cases, you can specify a separate message to create the response value.
// The specified response message must contain fields with the same names and types as all the fields in the original response.
Response *string `protobuf:"bytes,2,opt,name=response,proto3,oneof" json:"response,omitempty"`
}
func (x *MethodRule) Reset() {
*x = MethodRule{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[13]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *MethodRule) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*MethodRule) ProtoMessage() {}
func (x *MethodRule) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[13]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use MethodRule.ProtoReflect.Descriptor instead.
func (*MethodRule) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{13}
}
func (x *MethodRule) GetTimeout() string {
if x != nil && x.Timeout != nil {
return *x.Timeout
}
return ""
}
func (x *MethodRule) GetResponse() string {
if x != nil && x.Response != nil {
return *x.Response
}
return ""
}
// MessageRule define gRPC Federation rules for the message.
type MessageRule struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// def specify variables to be used in field binding by `grpc.federation.field` option.
Def []*VariableDefinition `protobuf:"bytes,1,rep,name=def,proto3" json:"def,omitempty"`
// if custom_resolver is true, the resolver for this message is implemented by Go.
// If there are any values retrieved by resolver or messages, they are passed as arguments for custom resolver.
// Each field of the message returned by the custom resolver is automatically bound.
// If you want to change the binding process for a particular field, set `custom_resolver=true` option for that field.
CustomResolver *bool `protobuf:"varint,2,opt,name=custom_resolver,json=customResolver,proto3,oneof" json:"custom_resolver,omitempty"`
// alias mapping between messages defined in other packages and messages defined on the federation service side.
// The alias is the FQDN ( . ) to the message.
// If this definition exists, type conversion is automatically performed before the field assignment operation.
// If a message with this option has a field that is not present in the message specified by alias, and the alias option is not specified for that field, an error is occurred.
// You can specify multiple aliases. In that case, only fields common to all aliases will be considered.
// Specifying a field that is not included in either alias will result in an error.
Alias []string `protobuf:"bytes,3,rep,name=alias,proto3" json:"alias,omitempty"`
}
func (x *MessageRule) Reset() {
*x = MessageRule{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[14]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *MessageRule) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*MessageRule) ProtoMessage() {}
func (x *MessageRule) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[14]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use MessageRule.ProtoReflect.Descriptor instead.
func (*MessageRule) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{14}
}
func (x *MessageRule) GetDef() []*VariableDefinition {
if x != nil {
return x.Def
}
return nil
}
func (x *MessageRule) GetCustomResolver() bool {
if x != nil && x.CustomResolver != nil {
return *x.CustomResolver
}
return false
}
func (x *MessageRule) GetAlias() []string {
if x != nil {
return x.Alias
}
return nil
}
// VariableDefinition represents variable definition.
type VariableDefinition struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// name is a variable name.
// This name can be referenced in all CELs defined after itself in the same message.
// It can also be referenced in `grpc.federation.field` option.
Name *string `protobuf:"bytes,1,opt,name=name,proto3,oneof" json:"name,omitempty"`
// if specify the condition for evaluating expr.
// this value evaluated by CEL and it must return a boolean value.
// If the result of evaluation is `false`, the value assigned to name is the default value of the result of evaluation of `expr`.
If *string `protobuf:"bytes,2,opt,name=if,proto3,oneof" json:"if,omitempty"`
// autobind if the result value of `expr` is a message type,
// the value of a field with the same name and type as the field name of its own message is automatically assigned to the value of the field in the message.
// If multiple autobinds are used at the same message,
// you must explicitly use the `grpc.federation.field` option to do the binding yourself, since duplicate field names cannot be correctly determined as one.
Autobind *bool `protobuf:"varint,3,opt,name=autobind,proto3,oneof" json:"autobind,omitempty"`
// expr specify the value to be assigned to name.
//
// Types that are assignable to Expr:
//
// *VariableDefinition_By
// *VariableDefinition_Map
// *VariableDefinition_Message
// *VariableDefinition_Call
// *VariableDefinition_Validation
// *VariableDefinition_Enum
// *VariableDefinition_Switch
Expr isVariableDefinition_Expr `protobuf_oneof:"expr"`
}
func (x *VariableDefinition) Reset() {
*x = VariableDefinition{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[15]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *VariableDefinition) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*VariableDefinition) ProtoMessage() {}
func (x *VariableDefinition) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[15]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use VariableDefinition.ProtoReflect.Descriptor instead.
func (*VariableDefinition) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{15}
}
func (x *VariableDefinition) GetName() string {
if x != nil && x.Name != nil {
return *x.Name
}
return ""
}
func (x *VariableDefinition) GetIf() string {
if x != nil && x.If != nil {
return *x.If
}
return ""
}
func (x *VariableDefinition) GetAutobind() bool {
if x != nil && x.Autobind != nil {
return *x.Autobind
}
return false
}
func (m *VariableDefinition) GetExpr() isVariableDefinition_Expr {
if m != nil {
return m.Expr
}
return nil
}
func (x *VariableDefinition) GetBy() string {
if x, ok := x.GetExpr().(*VariableDefinition_By); ok {
return x.By
}
return ""
}
func (x *VariableDefinition) GetMap() *MapExpr {
if x, ok := x.GetExpr().(*VariableDefinition_Map); ok {
return x.Map
}
return nil
}
func (x *VariableDefinition) GetMessage() *MessageExpr {
if x, ok := x.GetExpr().(*VariableDefinition_Message); ok {
return x.Message
}
return nil
}
func (x *VariableDefinition) GetCall() *CallExpr {
if x, ok := x.GetExpr().(*VariableDefinition_Call); ok {
return x.Call
}
return nil
}
func (x *VariableDefinition) GetValidation() *ValidationExpr {
if x, ok := x.GetExpr().(*VariableDefinition_Validation); ok {
return x.Validation
}
return nil
}
func (x *VariableDefinition) GetEnum() *EnumExpr {
if x, ok := x.GetExpr().(*VariableDefinition_Enum); ok {
return x.Enum
}
return nil
}
func (x *VariableDefinition) GetSwitch() *SwitchExpr {
if x, ok := x.GetExpr().(*VariableDefinition_Switch); ok {
return x.Switch
}
return nil
}
type isVariableDefinition_Expr interface {
isVariableDefinition_Expr()
}
type VariableDefinition_By struct {
// `by` evaluates with CEL.
By string `protobuf:"bytes,11,opt,name=by,proto3,oneof"`
}
type VariableDefinition_Map struct {
// map apply map operation for the specified repeated type.
Map *MapExpr `protobuf:"bytes,12,opt,name=map,proto3,oneof"`
}
type VariableDefinition_Message struct {
// message gets with message arguments.
Message *MessageExpr `protobuf:"bytes,13,opt,name=message,proto3,oneof"`
}
type VariableDefinition_Call struct {
// call specifies how to call gRPC method.
Call *CallExpr `protobuf:"bytes,14,opt,name=call,proto3,oneof"`
}
type VariableDefinition_Validation struct {
// validation defines the validation rule and error.
Validation *ValidationExpr `protobuf:"bytes,15,opt,name=validation,proto3,oneof"`
}
type VariableDefinition_Enum struct {
// enum gets with cel value.
Enum *EnumExpr `protobuf:"bytes,16,opt,name=enum,proto3,oneof"`
}
type VariableDefinition_Switch struct {
// switch provides conditional evaluation with multiple branches.
Switch *SwitchExpr `protobuf:"bytes,17,opt,name=switch,proto3,oneof"`
}
func (*VariableDefinition_By) isVariableDefinition_Expr() {}
func (*VariableDefinition_Map) isVariableDefinition_Expr() {}
func (*VariableDefinition_Message) isVariableDefinition_Expr() {}
func (*VariableDefinition_Call) isVariableDefinition_Expr() {}
func (*VariableDefinition_Validation) isVariableDefinition_Expr() {}
func (*VariableDefinition_Enum) isVariableDefinition_Expr() {}
func (*VariableDefinition_Switch) isVariableDefinition_Expr() {}
// MapExpr apply map operation for the specified repeated type.
type MapExpr struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// iterator define iterator variable.
// When evaluating CEL in `expr`, we can refer to the name defined in iterator.
Iterator *Iterator `protobuf:"bytes,1,opt,name=iterator,proto3" json:"iterator,omitempty"`
// expr creates map elements using iterator variable.
//
// Types that are assignable to Expr:
//
// *MapExpr_By
// *MapExpr_Message
// *MapExpr_Enum
Expr isMapExpr_Expr `protobuf_oneof:"expr"`
}
func (x *MapExpr) Reset() {
*x = MapExpr{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[16]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *MapExpr) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*MapExpr) ProtoMessage() {}
func (x *MapExpr) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[16]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use MapExpr.ProtoReflect.Descriptor instead.
func (*MapExpr) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{16}
}
func (x *MapExpr) GetIterator() *Iterator {
if x != nil {
return x.Iterator
}
return nil
}
func (m *MapExpr) GetExpr() isMapExpr_Expr {
if m != nil {
return m.Expr
}
return nil
}
func (x *MapExpr) GetBy() string {
if x, ok := x.GetExpr().(*MapExpr_By); ok {
return x.By
}
return ""
}
func (x *MapExpr) GetMessage() *MessageExpr {
if x, ok := x.GetExpr().(*MapExpr_Message); ok {
return x.Message
}
return nil
}
func (x *MapExpr) GetEnum() *EnumExpr {
if x, ok := x.GetExpr().(*MapExpr_Enum); ok {
return x.Enum
}
return nil
}
type isMapExpr_Expr interface {
isMapExpr_Expr()
}
type MapExpr_By struct {
// `by` evaluates with CEL.
// this can refer to the variable declared by `iterator`.
By string `protobuf:"bytes,11,opt,name=by,proto3,oneof"`
}
type MapExpr_Message struct {
// message gets with message arguments, and it is made an element of the map.
// The result type of MapExpr is the repeated type of the specified message.
Message *MessageExpr `protobuf:"bytes,12,opt,name=message,proto3,oneof"`
}
type MapExpr_Enum struct {
// enum creates enum value for each element of the map.
// The result type of MapExpr is the repeated type of the specified enum.
Enum *EnumExpr `protobuf:"bytes,13,opt,name=enum,proto3,oneof"`
}
func (*MapExpr_By) isMapExpr_Expr() {}
func (*MapExpr_Message) isMapExpr_Expr() {}
func (*MapExpr_Enum) isMapExpr_Expr() {}
// Iterator represents iterator variable.
type Iterator struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// variable name.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// src the value that will be the source for creating the iterator.
// src must be a repeated type.
Src string `protobuf:"bytes,2,opt,name=src,proto3" json:"src,omitempty"`
}
func (x *Iterator) Reset() {
*x = Iterator{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[17]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Iterator) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Iterator) ProtoMessage() {}
func (x *Iterator) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[17]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Iterator.ProtoReflect.Descriptor instead.
func (*Iterator) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{17}
}
func (x *Iterator) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *Iterator) GetSrc() string {
if x != nil {
return x.Src
}
return ""
}
// MessageExpr represents dependent message.
type MessageExpr struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// name specify the message name by FQDN. format is `.`.
// can be omitted when referring to messages in the same package.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// args specify the parameters needed to get the message. This is called the "message arguments".
Args []*Argument `protobuf:"bytes,2,rep,name=args,proto3" json:"args,omitempty"`
}
func (x *MessageExpr) Reset() {
*x = MessageExpr{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[18]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *MessageExpr) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*MessageExpr) ProtoMessage() {}
func (x *MessageExpr) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[18]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use MessageExpr.ProtoReflect.Descriptor instead.
func (*MessageExpr) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{18}
}
func (x *MessageExpr) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *MessageExpr) GetArgs() []*Argument {
if x != nil {
return x.Args
}
return nil
}
// EnumExpr represents dependent enum.
type EnumExpr struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// name specify the enum name by FQDN. format is `.`.
// can be omitted when referring to enum in the same package.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// `by` evaluates with CEL.
By string `protobuf:"bytes,2,opt,name=by,proto3" json:"by,omitempty"`
}
func (x *EnumExpr) Reset() {
*x = EnumExpr{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[19]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *EnumExpr) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*EnumExpr) ProtoMessage() {}
func (x *EnumExpr) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[19]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use EnumExpr.ProtoReflect.Descriptor instead.
func (*EnumExpr) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{19}
}
func (x *EnumExpr) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *EnumExpr) GetBy() string {
if x != nil {
return x.By
}
return ""
}
// CallExpr represents how to call gRPC method.
type CallExpr struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// method specify the FQDN for the gRPC method. format is `./`.
Method string `protobuf:"bytes,1,opt,name=method,proto3" json:"method,omitempty"`
// request specify request parameters for the gRPC method.
Request []*MethodRequest `protobuf:"bytes,2,rep,name=request,proto3" json:"request,omitempty"`
// the time to timeout. If the specified time period elapses, DEADLINE_EXCEEDED status is returned.
// If you want to handle this error, you need to implement a custom error handler in Go.
// The format is the same as Go's time.Duration format. See https://pkg.go.dev/time#ParseDuration.
Timeout *string `protobuf:"bytes,3,opt,name=timeout,proto3,oneof" json:"timeout,omitempty"`
// retry specifies the retry policy if the method call fails.
Retry *RetryPolicy `protobuf:"bytes,4,opt,name=retry,proto3,oneof" json:"retry,omitempty"`
// error evaluated when an error occurs during a method call.
// Multiple errors can be defined and are evaluated in the order in which they are described.
// If an error occurs while creating an gRPC status error, original error will be returned.
Error []*GRPCError `protobuf:"bytes,5,rep,name=error,proto3" json:"error,omitempty"`
// option is the gRPC's call option (https://pkg.go.dev/google.golang.org/grpc#CallOption).
Option *GRPCCallOption `protobuf:"bytes,6,opt,name=option,proto3,oneof" json:"option,omitempty"`
// metadata specify outgoing metadata with CEL value.
// The specified type must always be of type map.
Metadata *string `protobuf:"bytes,7,opt,name=metadata,proto3,oneof" json:"metadata,omitempty"`
}
func (x *CallExpr) Reset() {
*x = CallExpr{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[20]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *CallExpr) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CallExpr) ProtoMessage() {}
func (x *CallExpr) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[20]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use CallExpr.ProtoReflect.Descriptor instead.
func (*CallExpr) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{20}
}
func (x *CallExpr) GetMethod() string {
if x != nil {
return x.Method
}
return ""
}
func (x *CallExpr) GetRequest() []*MethodRequest {
if x != nil {
return x.Request
}
return nil
}
func (x *CallExpr) GetTimeout() string {
if x != nil && x.Timeout != nil {
return *x.Timeout
}
return ""
}
func (x *CallExpr) GetRetry() *RetryPolicy {
if x != nil {
return x.Retry
}
return nil
}
func (x *CallExpr) GetError() []*GRPCError {
if x != nil {
return x.Error
}
return nil
}
func (x *CallExpr) GetOption() *GRPCCallOption {
if x != nil {
return x.Option
}
return nil
}
func (x *CallExpr) GetMetadata() string {
if x != nil && x.Metadata != nil {
return *x.Metadata
}
return ""
}
// SwitchExpr represents a switch statement. At least one "case", and "default", must be defined. All
// case.if expressions must evaluate to a boolean value. All case.by expressions, and default.by, must
// evaluate to the same type (the return type of the switch).
//
// When executed, the case.if expressions are evaluated in order, and, for the first case whose
// case.if expression evaluates to true, its case.by is evaluated to make the return value of the
// SwitchExpr.
// If no case.if evaluates to true, default.by is evaluated to make the return value.
type SwitchExpr struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Cases for the switch expression.
Case []*SwitchCaseExpr `protobuf:"bytes,1,rep,name=case,proto3" json:"case,omitempty"`
// The default case, if none of the "case.if" expressions evaluate to true.
Default *SwitchDefaultExpr `protobuf:"bytes,2,opt,name=default,proto3" json:"default,omitempty"`
}
func (x *SwitchExpr) Reset() {
*x = SwitchExpr{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[21]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *SwitchExpr) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*SwitchExpr) ProtoMessage() {}
func (x *SwitchExpr) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[21]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use SwitchExpr.ProtoReflect.Descriptor instead.
func (*SwitchExpr) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{21}
}
func (x *SwitchExpr) GetCase() []*SwitchCaseExpr {
if x != nil {
return x.Case
}
return nil
}
func (x *SwitchExpr) GetDefault() *SwitchDefaultExpr {
if x != nil {
return x.Default
}
return nil
}
// SwitchCaseExpr represents a single case for a switch expression.
type SwitchCaseExpr struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// if specify the condition for evaluating expr.
// this value evaluated by CEL and it must return a boolean value.
If string `protobuf:"bytes,1,opt,name=if,proto3" json:"if,omitempty"`
// def define variables in current scope.
Def []*VariableDefinition `protobuf:"bytes,2,rep,name=def,proto3" json:"def,omitempty"`
// expr specify the value to return for the case.
//
// Types that are assignable to Expr:
//
// *SwitchCaseExpr_By
Expr isSwitchCaseExpr_Expr `protobuf_oneof:"expr"`
}
func (x *SwitchCaseExpr) Reset() {
*x = SwitchCaseExpr{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[22]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *SwitchCaseExpr) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*SwitchCaseExpr) ProtoMessage() {}
func (x *SwitchCaseExpr) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[22]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use SwitchCaseExpr.ProtoReflect.Descriptor instead.
func (*SwitchCaseExpr) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{22}
}
func (x *SwitchCaseExpr) GetIf() string {
if x != nil {
return x.If
}
return ""
}
func (x *SwitchCaseExpr) GetDef() []*VariableDefinition {
if x != nil {
return x.Def
}
return nil
}
func (m *SwitchCaseExpr) GetExpr() isSwitchCaseExpr_Expr {
if m != nil {
return m.Expr
}
return nil
}
func (x *SwitchCaseExpr) GetBy() string {
if x, ok := x.GetExpr().(*SwitchCaseExpr_By); ok {
return x.By
}
return ""
}
type isSwitchCaseExpr_Expr interface {
isSwitchCaseExpr_Expr()
}
type SwitchCaseExpr_By struct {
// `by` evaluates with CEL.
By string `protobuf:"bytes,11,opt,name=by,proto3,oneof"`
}
func (*SwitchCaseExpr_By) isSwitchCaseExpr_Expr() {}
// SwitchDefaultExpr represents the default case for a switch expression.
type SwitchDefaultExpr struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// def define variables in current scope.
Def []*VariableDefinition `protobuf:"bytes,1,rep,name=def,proto3" json:"def,omitempty"`
// expr specify the value to return for the default case.
//
// Types that are assignable to Expr:
//
// *SwitchDefaultExpr_By
Expr isSwitchDefaultExpr_Expr `protobuf_oneof:"expr"`
}
func (x *SwitchDefaultExpr) Reset() {
*x = SwitchDefaultExpr{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[23]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *SwitchDefaultExpr) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*SwitchDefaultExpr) ProtoMessage() {}
func (x *SwitchDefaultExpr) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[23]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use SwitchDefaultExpr.ProtoReflect.Descriptor instead.
func (*SwitchDefaultExpr) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{23}
}
func (x *SwitchDefaultExpr) GetDef() []*VariableDefinition {
if x != nil {
return x.Def
}
return nil
}
func (m *SwitchDefaultExpr) GetExpr() isSwitchDefaultExpr_Expr {
if m != nil {
return m.Expr
}
return nil
}
func (x *SwitchDefaultExpr) GetBy() string {
if x, ok := x.GetExpr().(*SwitchDefaultExpr_By); ok {
return x.By
}
return ""
}
type isSwitchDefaultExpr_Expr interface {
isSwitchDefaultExpr_Expr()
}
type SwitchDefaultExpr_By struct {
// `by` evaluates with CEL.
By string `protobuf:"bytes,11,opt,name=by,proto3,oneof"`
}
func (*SwitchDefaultExpr_By) isSwitchDefaultExpr_Expr() {}
// GRPCError create gRPC status value.
type GRPCError struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// def define variables in current scope.
Def []*VariableDefinition `protobuf:"bytes,1,rep,name=def,proto3" json:"def,omitempty"`
// if specifies condition in CEL. If the condition is true, it returns defined error information.
// If this field is omitted, it is always treated as 'true' and returns defined error information.
// The return value must always be of type boolean.
If *string `protobuf:"bytes,2,opt,name=if,proto3,oneof" json:"if,omitempty"`
// code is a gRPC status code.
Code *code.Code `protobuf:"varint,3,opt,name=code,proto3,enum=google.rpc.Code,oneof" json:"code,omitempty"`
// message is a gRPC status message.
// If omitted, the message will be auto-generated from the configurations.
Message *string `protobuf:"bytes,4,opt,name=message,proto3,oneof" json:"message,omitempty"`
// details is a list of error details.
// If returns error, the corresponding error details are set.
Details []*GRPCErrorDetail `protobuf:"bytes,5,rep,name=details,proto3" json:"details,omitempty"`
// ignore ignore the error if the condition in the "if" field is true and "ignore" field is set to true.
// When an error is ignored, the returned response is always null value.
// If you want to return a response that is not null, please use `ignore_and_response` feature.
// Therefore, `ignore` and `ignore_and_response` cannot be specified same.
Ignore *bool `protobuf:"varint,6,opt,name=ignore,proto3,oneof" json:"ignore,omitempty"`
// ignore_and_response ignore the error if the condition in the "if" field is true and it returns response specified in CEL.
// The evaluation value of CEL must always be the same as the response message type.
// `ignore` and `ignore_and_response` cannot be specified same.
IgnoreAndResponse *string `protobuf:"bytes,7,opt,name=ignore_and_response,json=ignoreAndResponse,proto3,oneof" json:"ignore_and_response,omitempty"`
// log_level can be configured to output logs as any log level.
// If DEBUG is specified for the log_level, logs are output as debug logs.
// default value is ERROR.
LogLevel *GRPCError_LogLevel `protobuf:"varint,8,opt,name=log_level,json=logLevel,proto3,enum=grpc.federation.GRPCError_LogLevel,oneof" json:"log_level,omitempty"`
}
func (x *GRPCError) Reset() {
*x = GRPCError{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[24]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GRPCError) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GRPCError) ProtoMessage() {}
func (x *GRPCError) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[24]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GRPCError.ProtoReflect.Descriptor instead.
func (*GRPCError) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{24}
}
func (x *GRPCError) GetDef() []*VariableDefinition {
if x != nil {
return x.Def
}
return nil
}
func (x *GRPCError) GetIf() string {
if x != nil && x.If != nil {
return *x.If
}
return ""
}
func (x *GRPCError) GetCode() code.Code {
if x != nil && x.Code != nil {
return *x.Code
}
return code.Code(0)
}
func (x *GRPCError) GetMessage() string {
if x != nil && x.Message != nil {
return *x.Message
}
return ""
}
func (x *GRPCError) GetDetails() []*GRPCErrorDetail {
if x != nil {
return x.Details
}
return nil
}
func (x *GRPCError) GetIgnore() bool {
if x != nil && x.Ignore != nil {
return *x.Ignore
}
return false
}
func (x *GRPCError) GetIgnoreAndResponse() string {
if x != nil && x.IgnoreAndResponse != nil {
return *x.IgnoreAndResponse
}
return ""
}
func (x *GRPCError) GetLogLevel() GRPCError_LogLevel {
if x != nil && x.LogLevel != nil {
return *x.LogLevel
}
return GRPCError_UNKNOWN
}
type GRPCErrorDetail struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// if specifies condition rule in CEL. If the condition is true, gRPC error detail is added to the error.
If string `protobuf:"bytes,1,opt,name=if,proto3" json:"if,omitempty"`
// def define variables in current scope.
Def []*VariableDefinition `protobuf:"bytes,2,rep,name=def,proto3" json:"def,omitempty"`
// message represents arbitrary messages to describe the detail of the error.
Message []*MessageExpr `protobuf:"bytes,3,rep,name=message,proto3" json:"message,omitempty"`
// error_info describes the cause of the error with structured details.
ErrorInfo []*errdetails.ErrorInfo `protobuf:"bytes,4,rep,name=error_info,json=errorInfo,proto3" json:"error_info,omitempty"`
// retry_info describes when the clients can retry a failed request.
RetryInfo []*errdetails.RetryInfo `protobuf:"bytes,5,rep,name=retry_info,json=retryInfo,proto3" json:"retry_info,omitempty"`
// debug_info describes additional debugging info.
DebugInfo []*errdetails.DebugInfo `protobuf:"bytes,6,rep,name=debug_info,json=debugInfo,proto3" json:"debug_info,omitempty"`
// quota_failure describes how a quota check failed.
QuotaFailure []*errdetails.QuotaFailure `protobuf:"bytes,7,rep,name=quota_failure,json=quotaFailure,proto3" json:"quota_failure,omitempty"`
// precondition_failure describes what preconditions have failed.
PreconditionFailure []*errdetails.PreconditionFailure `protobuf:"bytes,8,rep,name=precondition_failure,json=preconditionFailure,proto3" json:"precondition_failure,omitempty"`
// bad_request describes violations in a client request.
BadRequest []*errdetails.BadRequest `protobuf:"bytes,9,rep,name=bad_request,json=badRequest,proto3" json:"bad_request,omitempty"`
// request_info contains metadata about the request that clients can attach.
RequestInfo []*errdetails.RequestInfo `protobuf:"bytes,10,rep,name=request_info,json=requestInfo,proto3" json:"request_info,omitempty"`
// resource_info describes the resource that is being accessed.
ResourceInfo []*errdetails.ResourceInfo `protobuf:"bytes,11,rep,name=resource_info,json=resourceInfo,proto3" json:"resource_info,omitempty"`
// help provides links to documentation or for performing an out of band action.
Help []*errdetails.Help `protobuf:"bytes,12,rep,name=help,proto3" json:"help,omitempty"`
// localized_message provides a localized error message that is safe to return to the user.
LocalizedMessage []*errdetails.LocalizedMessage `protobuf:"bytes,13,rep,name=localized_message,json=localizedMessage,proto3" json:"localized_message,omitempty"`
// by specify a message in CEL to express the details of the error.
By []string `protobuf:"bytes,14,rep,name=by,proto3" json:"by,omitempty"`
}
func (x *GRPCErrorDetail) Reset() {
*x = GRPCErrorDetail{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[25]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GRPCErrorDetail) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GRPCErrorDetail) ProtoMessage() {}
func (x *GRPCErrorDetail) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[25]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GRPCErrorDetail.ProtoReflect.Descriptor instead.
func (*GRPCErrorDetail) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{25}
}
func (x *GRPCErrorDetail) GetIf() string {
if x != nil {
return x.If
}
return ""
}
func (x *GRPCErrorDetail) GetDef() []*VariableDefinition {
if x != nil {
return x.Def
}
return nil
}
func (x *GRPCErrorDetail) GetMessage() []*MessageExpr {
if x != nil {
return x.Message
}
return nil
}
func (x *GRPCErrorDetail) GetErrorInfo() []*errdetails.ErrorInfo {
if x != nil {
return x.ErrorInfo
}
return nil
}
func (x *GRPCErrorDetail) GetRetryInfo() []*errdetails.RetryInfo {
if x != nil {
return x.RetryInfo
}
return nil
}
func (x *GRPCErrorDetail) GetDebugInfo() []*errdetails.DebugInfo {
if x != nil {
return x.DebugInfo
}
return nil
}
func (x *GRPCErrorDetail) GetQuotaFailure() []*errdetails.QuotaFailure {
if x != nil {
return x.QuotaFailure
}
return nil
}
func (x *GRPCErrorDetail) GetPreconditionFailure() []*errdetails.PreconditionFailure {
if x != nil {
return x.PreconditionFailure
}
return nil
}
func (x *GRPCErrorDetail) GetBadRequest() []*errdetails.BadRequest {
if x != nil {
return x.BadRequest
}
return nil
}
func (x *GRPCErrorDetail) GetRequestInfo() []*errdetails.RequestInfo {
if x != nil {
return x.RequestInfo
}
return nil
}
func (x *GRPCErrorDetail) GetResourceInfo() []*errdetails.ResourceInfo {
if x != nil {
return x.ResourceInfo
}
return nil
}
func (x *GRPCErrorDetail) GetHelp() []*errdetails.Help {
if x != nil {
return x.Help
}
return nil
}
func (x *GRPCErrorDetail) GetLocalizedMessage() []*errdetails.LocalizedMessage {
if x != nil {
return x.LocalizedMessage
}
return nil
}
func (x *GRPCErrorDetail) GetBy() []string {
if x != nil {
return x.By
}
return nil
}
// GRPCCallOption configures a gRPC Call before it starts or extracts information from a gRPC Call after it completes.
type GRPCCallOption struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// set the content-subtype. For example, if content-subtype is "json", the Content-Type over the wire will be "application/grpc+json".
// The content-subtype is converted to lowercase before being included in Content-Type.
// See Content-Type on https://github.com/grpc/grpc/blob/master/doc/PROTOCOL-HTTP2.md#requests for more details.
// If no such codec is found, the call will result in an error with code INTERNAL.
ContentSubtype *string `protobuf:"bytes,1,opt,name=content_subtype,json=contentSubtype,proto3,oneof" json:"content_subtype,omitempty"`
// header retrieves the header metadata for a unary RPC.
// In order to obtain the metadata, you must specify a variable of type map in the header.
// e.g.)
// def [
//
// { name: "hdr" by: "grpc.federation.metadata.new()" }
// { call { method: "pkg.Method" option { header: "hdr" } } }
//
// ]
Header *string `protobuf:"bytes,2,opt,name=header,proto3,oneof" json:"header,omitempty"`
// max_call_recv_msg_size sets the maximum message size in bytes the client can receive.
// If this is not set, gRPC uses the default 4MB.
MaxCallRecvMsgSize *int64 `protobuf:"varint,3,opt,name=max_call_recv_msg_size,json=maxCallRecvMsgSize,proto3,oneof" json:"max_call_recv_msg_size,omitempty"`
// max_call_send_msg_size sets the maximum message size in bytes the client can send.
// If this is not set, gRPC uses the default maximum number of int32 range.
MaxCallSendMsgSize *int64 `protobuf:"varint,4,opt,name=max_call_send_msg_size,json=maxCallSendMsgSize,proto3,oneof" json:"max_call_send_msg_size,omitempty"`
// static_method specifies that a call is being made to a method that is static,
// which means the method is known at compile time and doesn't change at runtime.
// This can be used as a signal to stats plugins that this method is safe to include as a key to a measurement.
StaticMethod *bool `protobuf:"varint,5,opt,name=static_method,json=staticMethod,proto3,oneof" json:"static_method,omitempty"`
// trailer retrieves the trailer metadata for a unary RPC.
// In order to obtain the metadata, you must specify a variable of type map in the trailer.
// e.g.)
// def [
//
// { name: "trl" by: "grpc.federation.metadata.new()" }
// { call { method: "pkg.Method" option { trailer: "trl" } } }
//
// ]
Trailer *string `protobuf:"bytes,6,opt,name=trailer,proto3,oneof" json:"trailer,omitempty"`
// wait_for_ready configures the RPC's behavior when the client is in TRANSIENT_FAILURE,
// which occurs when all addresses fail to connect.
// If wait_for_ready is false, the RPC will fail immediately.
// Otherwise, the client will wait until a connection becomes available or the RPC's deadline is reached.
// By default, RPCs do not "wait for ready".
WaitForReady *bool `protobuf:"varint,7,opt,name=wait_for_ready,json=waitForReady,proto3,oneof" json:"wait_for_ready,omitempty"`
}
func (x *GRPCCallOption) Reset() {
*x = GRPCCallOption{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[26]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GRPCCallOption) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GRPCCallOption) ProtoMessage() {}
func (x *GRPCCallOption) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[26]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GRPCCallOption.ProtoReflect.Descriptor instead.
func (*GRPCCallOption) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{26}
}
func (x *GRPCCallOption) GetContentSubtype() string {
if x != nil && x.ContentSubtype != nil {
return *x.ContentSubtype
}
return ""
}
func (x *GRPCCallOption) GetHeader() string {
if x != nil && x.Header != nil {
return *x.Header
}
return ""
}
func (x *GRPCCallOption) GetMaxCallRecvMsgSize() int64 {
if x != nil && x.MaxCallRecvMsgSize != nil {
return *x.MaxCallRecvMsgSize
}
return 0
}
func (x *GRPCCallOption) GetMaxCallSendMsgSize() int64 {
if x != nil && x.MaxCallSendMsgSize != nil {
return *x.MaxCallSendMsgSize
}
return 0
}
func (x *GRPCCallOption) GetStaticMethod() bool {
if x != nil && x.StaticMethod != nil {
return *x.StaticMethod
}
return false
}
func (x *GRPCCallOption) GetTrailer() string {
if x != nil && x.Trailer != nil {
return *x.Trailer
}
return ""
}
func (x *GRPCCallOption) GetWaitForReady() bool {
if x != nil && x.WaitForReady != nil {
return *x.WaitForReady
}
return false
}
// Validation represents a validation rule against variables defined within the current scope.
type ValidationExpr struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// name is a unique name for the validation.
// If set, the validation error type will be Error.
// If omitted, the validation error type will be ValidationError.
Name *string `protobuf:"bytes,1,opt,name=name,proto3,oneof" json:"name,omitempty"`
// error defines the actual validation rules and an error to returned if the validation fails.
Error *GRPCError `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"`
}
func (x *ValidationExpr) Reset() {
*x = ValidationExpr{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[27]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ValidationExpr) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ValidationExpr) ProtoMessage() {}
func (x *ValidationExpr) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[27]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ValidationExpr.ProtoReflect.Descriptor instead.
func (*ValidationExpr) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{27}
}
func (x *ValidationExpr) GetName() string {
if x != nil && x.Name != nil {
return *x.Name
}
return ""
}
func (x *ValidationExpr) GetError() *GRPCError {
if x != nil {
return x.Error
}
return nil
}
// RetryPolicy define the retry policy if the method call fails.
type RetryPolicy struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Types that are assignable to Policy:
//
// *RetryPolicy_Constant
// *RetryPolicy_Exponential
Policy isRetryPolicy_Policy `protobuf_oneof:"policy"`
// if specifies condition in CEL. If the condition is true, run the retry process according to the policy.
// If this field is omitted, it is always treated as 'true' and run the retry process.
// The return value must always be of type boolean.
If string `protobuf:"bytes,3,opt,name=if,proto3" json:"if,omitempty"`
}
func (x *RetryPolicy) Reset() {
*x = RetryPolicy{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[28]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *RetryPolicy) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*RetryPolicy) ProtoMessage() {}
func (x *RetryPolicy) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[28]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use RetryPolicy.ProtoReflect.Descriptor instead.
func (*RetryPolicy) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{28}
}
func (m *RetryPolicy) GetPolicy() isRetryPolicy_Policy {
if m != nil {
return m.Policy
}
return nil
}
func (x *RetryPolicy) GetConstant() *RetryPolicyConstant {
if x, ok := x.GetPolicy().(*RetryPolicy_Constant); ok {
return x.Constant
}
return nil
}
func (x *RetryPolicy) GetExponential() *RetryPolicyExponential {
if x, ok := x.GetPolicy().(*RetryPolicy_Exponential); ok {
return x.Exponential
}
return nil
}
func (x *RetryPolicy) GetIf() string {
if x != nil {
return x.If
}
return ""
}
type isRetryPolicy_Policy interface {
isRetryPolicy_Policy()
}
type RetryPolicy_Constant struct {
// retry according to the "constant" policy.
Constant *RetryPolicyConstant `protobuf:"bytes,1,opt,name=constant,proto3,oneof"`
}
type RetryPolicy_Exponential struct {
// retry according to the "exponential backoff" policy.
// The following Go library is used in the implementation,
// so please refer to the library documentation for how to specify each parameter.
// https://pkg.go.dev/github.com/cenkalti/backoff/v4#section-readme.
Exponential *RetryPolicyExponential `protobuf:"bytes,2,opt,name=exponential,proto3,oneof"`
}
func (*RetryPolicy_Constant) isRetryPolicy_Policy() {}
func (*RetryPolicy_Exponential) isRetryPolicy_Policy() {}
// RetryPolicyConstant define "constant" based retry policy.
type RetryPolicyConstant struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// interval value. ( default value is 1s ).
Interval *string `protobuf:"bytes,1,opt,name=interval,proto3,oneof" json:"interval,omitempty"`
// max retry count. ( default value is 5. If zero is specified, it never stops )
MaxRetries *uint64 `protobuf:"varint,2,opt,name=max_retries,json=maxRetries,proto3,oneof" json:"max_retries,omitempty"`
}
func (x *RetryPolicyConstant) Reset() {
*x = RetryPolicyConstant{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[29]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *RetryPolicyConstant) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*RetryPolicyConstant) ProtoMessage() {}
func (x *RetryPolicyConstant) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[29]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use RetryPolicyConstant.ProtoReflect.Descriptor instead.
func (*RetryPolicyConstant) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{29}
}
func (x *RetryPolicyConstant) GetInterval() string {
if x != nil && x.Interval != nil {
return *x.Interval
}
return ""
}
func (x *RetryPolicyConstant) GetMaxRetries() uint64 {
if x != nil && x.MaxRetries != nil {
return *x.MaxRetries
}
return 0
}
// RetryPolicyExponential define "exponential backoff" based retry policy.
type RetryPolicyExponential struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// initial interval value. ( default value is "500ms" ).
InitialInterval *string `protobuf:"bytes,1,opt,name=initial_interval,json=initialInterval,proto3,oneof" json:"initial_interval,omitempty"`
// randomization factor value. ( default value is 0.5 ).
RandomizationFactor *float64 `protobuf:"fixed64,2,opt,name=randomization_factor,json=randomizationFactor,proto3,oneof" json:"randomization_factor,omitempty"`
// multiplier. ( default value is 1.5 ).
Multiplier *float64 `protobuf:"fixed64,3,opt,name=multiplier,proto3,oneof" json:"multiplier,omitempty"`
// max interval value. ( default value is "60s" ).
MaxInterval *string `protobuf:"bytes,4,opt,name=max_interval,json=maxInterval,proto3,oneof" json:"max_interval,omitempty"`
// max retry count. ( default value is 5. If zero is specified, it never stops ).
MaxRetries *uint64 `protobuf:"varint,5,opt,name=max_retries,json=maxRetries,proto3,oneof" json:"max_retries,omitempty"`
}
func (x *RetryPolicyExponential) Reset() {
*x = RetryPolicyExponential{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[30]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *RetryPolicyExponential) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*RetryPolicyExponential) ProtoMessage() {}
func (x *RetryPolicyExponential) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[30]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use RetryPolicyExponential.ProtoReflect.Descriptor instead.
func (*RetryPolicyExponential) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{30}
}
func (x *RetryPolicyExponential) GetInitialInterval() string {
if x != nil && x.InitialInterval != nil {
return *x.InitialInterval
}
return ""
}
func (x *RetryPolicyExponential) GetRandomizationFactor() float64 {
if x != nil && x.RandomizationFactor != nil {
return *x.RandomizationFactor
}
return 0
}
func (x *RetryPolicyExponential) GetMultiplier() float64 {
if x != nil && x.Multiplier != nil {
return *x.Multiplier
}
return 0
}
func (x *RetryPolicyExponential) GetMaxInterval() string {
if x != nil && x.MaxInterval != nil {
return *x.MaxInterval
}
return ""
}
func (x *RetryPolicyExponential) GetMaxRetries() uint64 {
if x != nil && x.MaxRetries != nil {
return *x.MaxRetries
}
return 0
}
// MethodRequest define parameters to be used for gRPC method request.
type MethodRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// field name of the request message.
Field string `protobuf:"bytes,1,opt,name=field,proto3" json:"field,omitempty"`
// by used to refer to a name or message argument defined in a MessageRule, use `$.` to refer to the message argument.
// Use CEL (https://github.com/google/cel-spec) to evaluate the expression.
// Variables are already defined in MessageRule can be used.
By *string `protobuf:"bytes,2,opt,name=by,proto3,oneof" json:"by,omitempty"`
// if describes the condition to be assigned to field.
// The return value must be of type bool.
// Use CEL (https://github.com/google/cel-spec) to evaluate the expression.
// Variables are already defined in MessageRule can be used.
// If the field is a 'oneof' field, it must be specified.
If *string `protobuf:"bytes,3,opt,name=if,proto3,oneof" json:"if,omitempty"`
}
func (x *MethodRequest) Reset() {
*x = MethodRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[31]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *MethodRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*MethodRequest) ProtoMessage() {}
func (x *MethodRequest) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[31]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use MethodRequest.ProtoReflect.Descriptor instead.
func (*MethodRequest) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{31}
}
func (x *MethodRequest) GetField() string {
if x != nil {
return x.Field
}
return ""
}
func (x *MethodRequest) GetBy() string {
if x != nil && x.By != nil {
return *x.By
}
return ""
}
func (x *MethodRequest) GetIf() string {
if x != nil && x.If != nil {
return *x.If
}
return ""
}
// MethodResponse define which value of the method response is referenced.
type MethodResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// name specify the unique name that can be used in a `MessageRule` / `FieldRule` for the same message for a specific field in the response.
Name *string `protobuf:"bytes,1,opt,name=name,proto3,oneof" json:"name,omitempty"`
// field name in response message.
Field *string `protobuf:"bytes,2,opt,name=field,proto3,oneof" json:"field,omitempty"`
// autobind if the value referenced by `field` is a message type,
// the value of a field with the same name and type as the field name of its own message is automatically assigned to the value of the field in the message.
// If multiple autobinds are used at the same message,
// you must explicitly use the `grpc.federation.field` option to do the binding yourself, since duplicate field names cannot be correctly determined as one.
Autobind *bool `protobuf:"varint,3,opt,name=autobind,proto3,oneof" json:"autobind,omitempty"`
}
func (x *MethodResponse) Reset() {
*x = MethodResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[32]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *MethodResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*MethodResponse) ProtoMessage() {}
func (x *MethodResponse) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[32]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use MethodResponse.ProtoReflect.Descriptor instead.
func (*MethodResponse) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{32}
}
func (x *MethodResponse) GetName() string {
if x != nil && x.Name != nil {
return *x.Name
}
return ""
}
func (x *MethodResponse) GetField() string {
if x != nil && x.Field != nil {
return *x.Field
}
return ""
}
func (x *MethodResponse) GetAutobind() bool {
if x != nil && x.Autobind != nil {
return *x.Autobind
}
return false
}
// Argument define message argument.
type Argument struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// name of the message argument.
// Use this name to refer to the message argument.
// For example, if `foo` is specified as the name, it is referenced by `$.foo`.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// by used to refer to a name or message argument defined in a MessageRule, use `$.` to refer to the message argument.
// Use CEL (https://github.com/google/cel-spec) to evaluate the expression.
// Variables are already defined in MessageRule can be used.
By *string `protobuf:"bytes,2,opt,name=by,proto3,oneof" json:"by,omitempty"`
// inline like by, it refers to the specified value and expands all fields beyond it.
// For this reason, the referenced value must always be of message type.
Inline *string `protobuf:"bytes,3,opt,name=inline,proto3,oneof" json:"inline,omitempty"`
}
func (x *Argument) Reset() {
*x = Argument{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[33]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Argument) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Argument) ProtoMessage() {}
func (x *Argument) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[33]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Argument.ProtoReflect.Descriptor instead.
func (*Argument) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{33}
}
func (x *Argument) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *Argument) GetBy() string {
if x != nil && x.By != nil {
return *x.By
}
return ""
}
func (x *Argument) GetInline() string {
if x != nil && x.Inline != nil {
return *x.Inline
}
return ""
}
// FieldRule define gRPC Federation rules for the field of message.
type FieldRule struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// If custom_resolver is true, the field binding process is to be implemented in Go.
// If there are any values retrieved by grpc.federation.message option, they are passed as arguments for custom resolver.
CustomResolver *bool `protobuf:"varint,1,opt,name=custom_resolver,json=customResolver,proto3,oneof" json:"custom_resolver,omitempty"`
// by used to refer to a name or message argument defined in a MessageRule, use `$.` to refer to the message argument.
// Use CEL (https://github.com/google/cel-spec) to evaluate the expression.
// Variables are already defined in MessageRule can be used.
By *string `protobuf:"bytes,2,opt,name=by,proto3,oneof" json:"by,omitempty"`
// alias can be used when alias is specified in grpc.federation.message option,
// and specifies the field name to be referenced among the messages specified in alias of message option.
// If the specified field has the same type or can be converted automatically, its value is assigned.
Alias *string `protobuf:"bytes,3,opt,name=alias,proto3,oneof" json:"alias,omitempty"`
// use to evaluate any one of fields. this field only available in oneof.
Oneof *FieldOneof `protobuf:"bytes,4,opt,name=oneof,proto3" json:"oneof,omitempty"`
// when defining an environment variable, use it for fields where you want to set additional options.
Env *EnvVarOption `protobuf:"bytes,5,opt,name=env,proto3" json:"env,omitempty"`
}
func (x *FieldRule) Reset() {
*x = FieldRule{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[34]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *FieldRule) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*FieldRule) ProtoMessage() {}
func (x *FieldRule) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[34]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use FieldRule.ProtoReflect.Descriptor instead.
func (*FieldRule) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{34}
}
func (x *FieldRule) GetCustomResolver() bool {
if x != nil && x.CustomResolver != nil {
return *x.CustomResolver
}
return false
}
func (x *FieldRule) GetBy() string {
if x != nil && x.By != nil {
return *x.By
}
return ""
}
func (x *FieldRule) GetAlias() string {
if x != nil && x.Alias != nil {
return *x.Alias
}
return ""
}
func (x *FieldRule) GetOneof() *FieldOneof {
if x != nil {
return x.Oneof
}
return nil
}
func (x *FieldRule) GetEnv() *EnvVarOption {
if x != nil {
return x.Env
}
return nil
}
// FieldOneof evaluate "messages" or other field only if expr is true and assign to the oneof field.
// This feature only available in oneof.
type FieldOneof struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// cond specify either `expr` or `default`. Only one `default` can be set per oneof.
//
// Types that are assignable to Cond:
//
// *FieldOneof_If
// *FieldOneof_Default
Cond isFieldOneof_Cond `protobuf_oneof:"cond"`
// def specify variables to be used in current oneof field's scope for field binding.
Def []*VariableDefinition `protobuf:"bytes,3,rep,name=def,proto3" json:"def,omitempty"`
// by used to refer to a name or message argument defined in a MessageRule, use `$.` to refer to the message argument.
// Use CEL (https://github.com/google/cel-spec) to evaluate the expression.
// Variables are already defined in MessageRule and FieldOneOf can be used.
By string `protobuf:"bytes,4,opt,name=by,proto3" json:"by,omitempty"`
}
func (x *FieldOneof) Reset() {
*x = FieldOneof{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[35]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *FieldOneof) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*FieldOneof) ProtoMessage() {}
func (x *FieldOneof) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[35]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use FieldOneof.ProtoReflect.Descriptor instead.
func (*FieldOneof) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{35}
}
func (m *FieldOneof) GetCond() isFieldOneof_Cond {
if m != nil {
return m.Cond
}
return nil
}
func (x *FieldOneof) GetIf() string {
if x, ok := x.GetCond().(*FieldOneof_If); ok {
return x.If
}
return ""
}
func (x *FieldOneof) GetDefault() bool {
if x, ok := x.GetCond().(*FieldOneof_Default); ok {
return x.Default
}
return false
}
func (x *FieldOneof) GetDef() []*VariableDefinition {
if x != nil {
return x.Def
}
return nil
}
func (x *FieldOneof) GetBy() string {
if x != nil {
return x.By
}
return ""
}
type isFieldOneof_Cond interface {
isFieldOneof_Cond()
}
type FieldOneof_If struct {
// if describes the condition to be assigned to field.
// The return value must be of type bool.
// Use CEL (https://github.com/google/cel-spec) to evaluate the expression.
// Variables are already defined in MessageRule can be used.
If string `protobuf:"bytes,1,opt,name=if,proto3,oneof"`
}
type FieldOneof_Default struct {
// default used to assign a value when none of the other fields match any of the specified expressions.
// Only one value can be defined per oneof.
Default bool `protobuf:"varint,2,opt,name=default,proto3,oneof"`
}
func (*FieldOneof_If) isFieldOneof_Cond() {}
func (*FieldOneof_Default) isFieldOneof_Cond() {}
// CELPlugin define schema of CEL plugin.
type CELPlugin struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Export []*CELPluginExport `protobuf:"bytes,1,rep,name=export,proto3" json:"export,omitempty"`
}
func (x *CELPlugin) Reset() {
*x = CELPlugin{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[36]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *CELPlugin) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CELPlugin) ProtoMessage() {}
func (x *CELPlugin) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[36]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use CELPlugin.ProtoReflect.Descriptor instead.
func (*CELPlugin) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{36}
}
func (x *CELPlugin) GetExport() []*CELPluginExport {
if x != nil {
return x.Export
}
return nil
}
// CELPluginExport describe the schema to be exposed as a CEL plugin.
type CELPluginExport struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// name is the plugin name.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// desc is the description of plugin.
// This description is used as documentation at code generation.
Desc string `protobuf:"bytes,2,opt,name=desc,proto3" json:"desc,omitempty"`
// types describe the message type you want to expose.
Types []*CELReceiverType `protobuf:"bytes,3,rep,name=types,proto3" json:"types,omitempty"`
// functions describe the definition of the function you want to expose.
Functions []*CELFunction `protobuf:"bytes,4,rep,name=functions,proto3" json:"functions,omitempty"`
// variables describe the definition of the variable you want to expose.
Variables []*CELVariable `protobuf:"bytes,5,rep,name=variables,proto3" json:"variables,omitempty"`
Capability *CELPluginCapability `protobuf:"bytes,6,opt,name=capability,proto3" json:"capability,omitempty"`
}
func (x *CELPluginExport) Reset() {
*x = CELPluginExport{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[37]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *CELPluginExport) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CELPluginExport) ProtoMessage() {}
func (x *CELPluginExport) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[37]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use CELPluginExport.ProtoReflect.Descriptor instead.
func (*CELPluginExport) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{37}
}
func (x *CELPluginExport) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *CELPluginExport) GetDesc() string {
if x != nil {
return x.Desc
}
return ""
}
func (x *CELPluginExport) GetTypes() []*CELReceiverType {
if x != nil {
return x.Types
}
return nil
}
func (x *CELPluginExport) GetFunctions() []*CELFunction {
if x != nil {
return x.Functions
}
return nil
}
func (x *CELPluginExport) GetVariables() []*CELVariable {
if x != nil {
return x.Variables
}
return nil
}
func (x *CELPluginExport) GetCapability() *CELPluginCapability {
if x != nil {
return x.Capability
}
return nil
}
// CELPluginCapability controls the permissions granted to the WebAssembly plugin.
type CELPluginCapability struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// env is the capability for environment variable.
Env *CELPluginEnvCapability `protobuf:"bytes,1,opt,name=env,proto3,oneof" json:"env,omitempty"`
// file_system is the capability for file system.
FileSystem *CELPluginFileSystemCapability `protobuf:"bytes,2,opt,name=file_system,json=fileSystem,proto3,oneof" json:"file_system,omitempty"`
// network is the capability for network.
Network *CELPluginNetworkCapability `protobuf:"bytes,3,opt,name=network,proto3,oneof" json:"network,omitempty"`
}
func (x *CELPluginCapability) Reset() {
*x = CELPluginCapability{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[38]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *CELPluginCapability) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CELPluginCapability) ProtoMessage() {}
func (x *CELPluginCapability) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[38]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use CELPluginCapability.ProtoReflect.Descriptor instead.
func (*CELPluginCapability) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{38}
}
func (x *CELPluginCapability) GetEnv() *CELPluginEnvCapability {
if x != nil {
return x.Env
}
return nil
}
func (x *CELPluginCapability) GetFileSystem() *CELPluginFileSystemCapability {
if x != nil {
return x.FileSystem
}
return nil
}
func (x *CELPluginCapability) GetNetwork() *CELPluginNetworkCapability {
if x != nil {
return x.Network
}
return nil
}
// CELPluginEnvCapability controls access to the environment variable.
type CELPluginEnvCapability struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// all allows access to all environment variables.
All bool `protobuf:"varint,1,opt,name=all,proto3" json:"all,omitempty"`
// specifies accessible names. If "all" is true, it takes precedence.
Names []string `protobuf:"bytes,2,rep,name=names,proto3" json:"names,omitempty"`
}
func (x *CELPluginEnvCapability) Reset() {
*x = CELPluginEnvCapability{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[39]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *CELPluginEnvCapability) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CELPluginEnvCapability) ProtoMessage() {}
func (x *CELPluginEnvCapability) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[39]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use CELPluginEnvCapability.ProtoReflect.Descriptor instead.
func (*CELPluginEnvCapability) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{39}
}
func (x *CELPluginEnvCapability) GetAll() bool {
if x != nil {
return x.All
}
return false
}
func (x *CELPluginEnvCapability) GetNames() []string {
if x != nil {
return x.Names
}
return nil
}
// CELPluginFileSystemCapability controls access to the file system.
type CELPluginFileSystemCapability struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// mount_path specifies the file path of the host to mount.
// If not specified, the root directory will be used.
MountPath string `protobuf:"bytes,1,opt,name=mount_path,json=mountPath,proto3" json:"mount_path,omitempty"`
}
func (x *CELPluginFileSystemCapability) Reset() {
*x = CELPluginFileSystemCapability{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[40]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *CELPluginFileSystemCapability) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CELPluginFileSystemCapability) ProtoMessage() {}
func (x *CELPluginFileSystemCapability) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[40]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use CELPluginFileSystemCapability.ProtoReflect.Descriptor instead.
func (*CELPluginFileSystemCapability) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{40}
}
func (x *CELPluginFileSystemCapability) GetMountPath() string {
if x != nil {
return x.MountPath
}
return ""
}
// CELPluginNetworkCapability sets permissions related to network access.
// This is an experimental feature.
type CELPluginNetworkCapability struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
}
func (x *CELPluginNetworkCapability) Reset() {
*x = CELPluginNetworkCapability{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[41]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *CELPluginNetworkCapability) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CELPluginNetworkCapability) ProtoMessage() {}
func (x *CELPluginNetworkCapability) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[41]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use CELPluginNetworkCapability.ProtoReflect.Descriptor instead.
func (*CELPluginNetworkCapability) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{41}
}
// CELFunction represents the CEL function definition.
type CELFunction struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// name is the function name.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// desc is the description of function.
// This description is used as documentation at code generation.
Desc string `protobuf:"bytes,2,opt,name=desc,proto3" json:"desc,omitempty"`
// args describe the definition of the function argument.
Args []*CELFunctionArgument `protobuf:"bytes,3,rep,name=args,proto3" json:"args,omitempty"`
// return describe the definition of return type of function.
Return *CELType `protobuf:"bytes,4,opt,name=return,proto3" json:"return,omitempty"`
}
func (x *CELFunction) Reset() {
*x = CELFunction{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[42]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *CELFunction) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CELFunction) ProtoMessage() {}
func (x *CELFunction) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[42]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use CELFunction.ProtoReflect.Descriptor instead.
func (*CELFunction) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{42}
}
func (x *CELFunction) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *CELFunction) GetDesc() string {
if x != nil {
return x.Desc
}
return ""
}
func (x *CELFunction) GetArgs() []*CELFunctionArgument {
if x != nil {
return x.Args
}
return nil
}
func (x *CELFunction) GetReturn() *CELType {
if x != nil {
return x.Return
}
return nil
}
// CELReceiverType represents methods tied to the message.
type CELReceiverType struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// name is the message name.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// desc is the description of plugin.
// This description is used as documentation at code generation.
Desc string `protobuf:"bytes,2,opt,name=desc,proto3" json:"desc,omitempty"`
// methods describe the definition of the method for the message.
Methods []*CELFunction `protobuf:"bytes,3,rep,name=methods,proto3" json:"methods,omitempty"`
}
func (x *CELReceiverType) Reset() {
*x = CELReceiverType{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[43]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *CELReceiverType) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CELReceiverType) ProtoMessage() {}
func (x *CELReceiverType) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[43]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use CELReceiverType.ProtoReflect.Descriptor instead.
func (*CELReceiverType) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{43}
}
func (x *CELReceiverType) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *CELReceiverType) GetDesc() string {
if x != nil {
return x.Desc
}
return ""
}
func (x *CELReceiverType) GetMethods() []*CELFunction {
if x != nil {
return x.Methods
}
return nil
}
// CELFunctionArgument represents the function argument.
type CELFunctionArgument struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// name is the argument value name.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// desc is the description of plugin.
// This description is used as documentation at code generation.
Desc string `protobuf:"bytes,2,opt,name=desc,proto3" json:"desc,omitempty"`
// type is the argument type.
Type *CELType `protobuf:"bytes,3,opt,name=type,proto3" json:"type,omitempty"`
}
func (x *CELFunctionArgument) Reset() {
*x = CELFunctionArgument{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[44]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *CELFunctionArgument) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CELFunctionArgument) ProtoMessage() {}
func (x *CELFunctionArgument) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[44]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use CELFunctionArgument.ProtoReflect.Descriptor instead.
func (*CELFunctionArgument) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{44}
}
func (x *CELFunctionArgument) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *CELFunctionArgument) GetDesc() string {
if x != nil {
return x.Desc
}
return ""
}
func (x *CELFunctionArgument) GetType() *CELType {
if x != nil {
return x.Type
}
return nil
}
// CELType represents type information for CEL plugin interface.
type CELType struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Types that are assignable to Type:
//
// *CELType_Kind
// *CELType_Repeated
// *CELType_Map
// *CELType_Message
// *CELType_Enum
Type isCELType_Type `protobuf_oneof:"type"`
}
func (x *CELType) Reset() {
*x = CELType{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[45]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *CELType) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CELType) ProtoMessage() {}
func (x *CELType) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[45]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use CELType.ProtoReflect.Descriptor instead.
func (*CELType) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{45}
}
func (m *CELType) GetType() isCELType_Type {
if m != nil {
return m.Type
}
return nil
}
func (x *CELType) GetKind() TypeKind {
if x, ok := x.GetType().(*CELType_Kind); ok {
return x.Kind
}
return TypeKind_UNKNOWN
}
func (x *CELType) GetRepeated() *CELType {
if x, ok := x.GetType().(*CELType_Repeated); ok {
return x.Repeated
}
return nil
}
func (x *CELType) GetMap() *CELMapType {
if x, ok := x.GetType().(*CELType_Map); ok {
return x.Map
}
return nil
}
func (x *CELType) GetMessage() string {
if x, ok := x.GetType().(*CELType_Message); ok {
return x.Message
}
return ""
}
func (x *CELType) GetEnum() string {
if x, ok := x.GetType().(*CELType_Enum); ok {
return x.Enum
}
return ""
}
type isCELType_Type interface {
isCELType_Type()
}
type CELType_Kind struct {
// kind is used when the type is a primitive type.
Kind TypeKind `protobuf:"varint,1,opt,name=kind,proto3,enum=grpc.federation.TypeKind,oneof"`
}
type CELType_Repeated struct {
// repeated is used when the type is a repeated type.
Repeated *CELType `protobuf:"bytes,2,opt,name=repeated,proto3,oneof"`
}
type CELType_Map struct {
// map is used when the type is a map type.
Map *CELMapType `protobuf:"bytes,3,opt,name=map,proto3,oneof"`
}
type CELType_Message struct {
// message is a fqdn to the message type.
Message string `protobuf:"bytes,4,opt,name=message,proto3,oneof"`
}
type CELType_Enum struct {
// enum is a fqdn to the enum type.
Enum string `protobuf:"bytes,5,opt,name=enum,proto3,oneof"`
}
func (*CELType_Kind) isCELType_Type() {}
func (*CELType_Repeated) isCELType_Type() {}
func (*CELType_Map) isCELType_Type() {}
func (*CELType_Message) isCELType_Type() {}
func (*CELType_Enum) isCELType_Type() {}
// CELMapType represents map type.
type CELMapType struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// key represents map's key type.
Key *CELType `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
// value represents map's value type.
Value *CELType `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
}
func (x *CELMapType) Reset() {
*x = CELMapType{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[46]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *CELMapType) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CELMapType) ProtoMessage() {}
func (x *CELMapType) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[46]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use CELMapType.ProtoReflect.Descriptor instead.
func (*CELMapType) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{46}
}
func (x *CELMapType) GetKey() *CELType {
if x != nil {
return x.Key
}
return nil
}
func (x *CELMapType) GetValue() *CELType {
if x != nil {
return x.Value
}
return nil
}
// CELVariable represents CEL variable.
type CELVariable struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// name is the variable name.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// desc is the description of plugin.
// This description is used as documentation at code generation.
Desc string `protobuf:"bytes,2,opt,name=desc,proto3" json:"desc,omitempty"`
// type is the variable type.
Type *CELType `protobuf:"bytes,3,opt,name=type,proto3" json:"type,omitempty"`
}
func (x *CELVariable) Reset() {
*x = CELVariable{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[47]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *CELVariable) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CELVariable) ProtoMessage() {}
func (x *CELVariable) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[47]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use CELVariable.ProtoReflect.Descriptor instead.
func (*CELVariable) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{47}
}
func (x *CELVariable) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *CELVariable) GetDesc() string {
if x != nil {
return x.Desc
}
return ""
}
func (x *CELVariable) GetType() *CELType {
if x != nil {
return x.Type
}
return nil
}
var file_grpc_federation_federation_proto_extTypes = []protoimpl.ExtensionInfo{
{
ExtendedType: (*descriptorpb.FileOptions)(nil),
ExtensionType: (*FileRule)(nil),
Field: 1187,
Name: "grpc.federation.file",
Tag: "bytes,1187,opt,name=file",
Filename: "grpc/federation/federation.proto",
},
{
ExtendedType: (*descriptorpb.ServiceOptions)(nil),
ExtensionType: (*ServiceRule)(nil),
Field: 1187,
Name: "grpc.federation.service",
Tag: "bytes,1187,opt,name=service",
Filename: "grpc/federation/federation.proto",
},
{
ExtendedType: (*descriptorpb.MethodOptions)(nil),
ExtensionType: (*MethodRule)(nil),
Field: 1187,
Name: "grpc.federation.method",
Tag: "bytes,1187,opt,name=method",
Filename: "grpc/federation/federation.proto",
},
{
ExtendedType: (*descriptorpb.MessageOptions)(nil),
ExtensionType: (*MessageRule)(nil),
Field: 1187,
Name: "grpc.federation.message",
Tag: "bytes,1187,opt,name=message",
Filename: "grpc/federation/federation.proto",
},
{
ExtendedType: (*descriptorpb.FieldOptions)(nil),
ExtensionType: (*FieldRule)(nil),
Field: 1187,
Name: "grpc.federation.field",
Tag: "bytes,1187,opt,name=field",
Filename: "grpc/federation/federation.proto",
},
{
ExtendedType: (*descriptorpb.EnumOptions)(nil),
ExtensionType: (*EnumRule)(nil),
Field: 1187,
Name: "grpc.federation.enum",
Tag: "bytes,1187,opt,name=enum",
Filename: "grpc/federation/federation.proto",
},
{
ExtendedType: (*descriptorpb.EnumValueOptions)(nil),
ExtensionType: (*EnumValueRule)(nil),
Field: 1187,
Name: "grpc.federation.enum_value",
Tag: "bytes,1187,opt,name=enum_value",
Filename: "grpc/federation/federation.proto",
},
{
ExtendedType: (*descriptorpb.OneofOptions)(nil),
ExtensionType: (*OneofRule)(nil),
Field: 1187,
Name: "grpc.federation.oneof",
Tag: "bytes,1187,opt,name=oneof",
Filename: "grpc/federation/federation.proto",
},
}
// Extension fields to descriptorpb.FileOptions.
var (
// optional grpc.federation.FileRule file = 1187;
E_File = &file_grpc_federation_federation_proto_extTypes[0]
)
// Extension fields to descriptorpb.ServiceOptions.
var (
// optional grpc.federation.ServiceRule service = 1187;
E_Service = &file_grpc_federation_federation_proto_extTypes[1]
)
// Extension fields to descriptorpb.MethodOptions.
var (
// optional grpc.federation.MethodRule method = 1187;
E_Method = &file_grpc_federation_federation_proto_extTypes[2]
)
// Extension fields to descriptorpb.MessageOptions.
var (
// optional grpc.federation.MessageRule message = 1187;
E_Message = &file_grpc_federation_federation_proto_extTypes[3]
)
// Extension fields to descriptorpb.FieldOptions.
var (
// optional grpc.federation.FieldRule field = 1187;
E_Field = &file_grpc_federation_federation_proto_extTypes[4]
)
// Extension fields to descriptorpb.EnumOptions.
var (
// optional grpc.federation.EnumRule enum = 1187;
E_Enum = &file_grpc_federation_federation_proto_extTypes[5]
)
// Extension fields to descriptorpb.EnumValueOptions.
var (
// optional grpc.federation.EnumValueRule enum_value = 1187;
E_EnumValue = &file_grpc_federation_federation_proto_extTypes[6]
)
// Extension fields to descriptorpb.OneofOptions.
var (
// optional grpc.federation.OneofRule oneof = 1187;
E_Oneof = &file_grpc_federation_federation_proto_extTypes[7]
)
var File_grpc_federation_federation_proto protoreflect.FileDescriptor
var file_grpc_federation_federation_proto_rawDesc = []byte{
0x0a, 0x20, 0x67, 0x72, 0x70, 0x63, 0x2f, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f,
0x6e, 0x2f, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f,
0x74, 0x6f, 0x12, 0x0f, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74,
0x69, 0x6f, 0x6e, 0x1a, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x2e,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x15, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x72, 0x70,
0x63, 0x2f, 0x63, 0x6f, 0x64, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f,
0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x72, 0x70, 0x63, 0x2f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x64,
0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x67, 0x72,
0x70, 0x63, 0x2f, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x70, 0x72,
0x69, 0x76, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1a, 0x67, 0x72, 0x70,
0x63, 0x2f, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x74, 0x69, 0x6d,
0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x56, 0x0a, 0x08, 0x46, 0x69, 0x6c, 0x65, 0x52,
0x75, 0x6c, 0x65, 0x12, 0x32, 0x0a, 0x06, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x18, 0x01, 0x20,
0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72,
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x43, 0x45, 0x4c, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x52,
0x06, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x69, 0x6d, 0x70, 0x6f, 0x72,
0x74, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x69, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x22,
0x20, 0x0a, 0x08, 0x45, 0x6e, 0x75, 0x6d, 0x52, 0x75, 0x6c, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x61,
0x6c, 0x69, 0x61, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x61, 0x6c, 0x69, 0x61,
0x73, 0x22, 0xb4, 0x01, 0x0a, 0x0d, 0x45, 0x6e, 0x75, 0x6d, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52,
0x75, 0x6c, 0x65, 0x12, 0x1d, 0x0a, 0x07, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x18, 0x01,
0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x07, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x88,
0x01, 0x01, 0x12, 0x14, 0x0a, 0x05, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28,
0x09, 0x52, 0x05, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x12, 0x37, 0x0a, 0x04, 0x61, 0x74, 0x74, 0x72,
0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65,
0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x56, 0x61, 0x6c,
0x75, 0x65, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x52, 0x04, 0x61, 0x74, 0x74,
0x72, 0x12, 0x1d, 0x0a, 0x07, 0x6e, 0x6f, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x18, 0x04, 0x20, 0x01,
0x28, 0x08, 0x48, 0x01, 0x52, 0x07, 0x6e, 0x6f, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x88, 0x01, 0x01,
0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x42, 0x0a, 0x0a, 0x08,
0x5f, 0x6e, 0x6f, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x22, 0x3e, 0x0a, 0x12, 0x45, 0x6e, 0x75, 0x6d,
0x56, 0x61, 0x6c, 0x75, 0x65, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 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, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28,
0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x0b, 0x0a, 0x09, 0x4f, 0x6e, 0x65, 0x6f,
0x66, 0x52, 0x75, 0x6c, 0x65, 0x22, 0x69, 0x0a, 0x0b, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65,
0x52, 0x75, 0x6c, 0x65, 0x12, 0x26, 0x0a, 0x03, 0x65, 0x6e, 0x76, 0x18, 0x01, 0x20, 0x01, 0x28,
0x0b, 0x32, 0x14, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74,
0x69, 0x6f, 0x6e, 0x2e, 0x45, 0x6e, 0x76, 0x52, 0x03, 0x65, 0x6e, 0x76, 0x12, 0x32, 0x0a, 0x03,
0x76, 0x61, 0x72, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x67, 0x72, 0x70, 0x63,
0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x53, 0x65, 0x72, 0x76,
0x69, 0x63, 0x65, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x03, 0x76, 0x61, 0x72,
0x22, 0x4a, 0x0a, 0x03, 0x45, 0x6e, 0x76, 0x12, 0x29, 0x0a, 0x03, 0x76, 0x61, 0x72, 0x18, 0x01,
0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65,
0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x45, 0x6e, 0x76, 0x56, 0x61, 0x72, 0x52, 0x03, 0x76,
0x61, 0x72, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20,
0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x8b, 0x03, 0x0a,
0x0f, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65,
0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01,
0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x13, 0x0a, 0x02, 0x69, 0x66, 0x18,
0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x02, 0x52, 0x02, 0x69, 0x66, 0x88, 0x01, 0x01, 0x12, 0x10,
0x0a, 0x02, 0x62, 0x79, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x02, 0x62, 0x79,
0x12, 0x2c, 0x0a, 0x03, 0x6d, 0x61, 0x70, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e,
0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e,
0x4d, 0x61, 0x70, 0x45, 0x78, 0x70, 0x72, 0x48, 0x00, 0x52, 0x03, 0x6d, 0x61, 0x70, 0x12, 0x38,
0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32,
0x1c, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f,
0x6e, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x45, 0x78, 0x70, 0x72, 0x48, 0x00, 0x52,
0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x50, 0x0a, 0x0a, 0x76, 0x61, 0x6c, 0x69,
0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x67,
0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x53,
0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x56, 0x61,
0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x78, 0x70, 0x72, 0x48, 0x00, 0x52, 0x0a,
0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2f, 0x0a, 0x04, 0x65, 0x6e,
0x75, 0x6d, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e,
0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x45,
0x78, 0x70, 0x72, 0x48, 0x00, 0x52, 0x04, 0x65, 0x6e, 0x75, 0x6d, 0x12, 0x35, 0x0a, 0x06, 0x73,
0x77, 0x69, 0x74, 0x63, 0x68, 0x18, 0x10, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x72,
0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x53, 0x77,
0x69, 0x74, 0x63, 0x68, 0x45, 0x78, 0x70, 0x72, 0x48, 0x00, 0x52, 0x06, 0x73, 0x77, 0x69, 0x74,
0x63, 0x68, 0x42, 0x06, 0x0a, 0x04, 0x65, 0x78, 0x70, 0x72, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e,
0x61, 0x6d, 0x65, 0x42, 0x05, 0x0a, 0x03, 0x5f, 0x69, 0x66, 0x22, 0x49, 0x0a, 0x1d, 0x53, 0x65,
0x72, 0x76, 0x69, 0x63, 0x65, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x56, 0x61, 0x6c,
0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x78, 0x70, 0x72, 0x12, 0x0e, 0x0a, 0x02, 0x69,
0x66, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x66, 0x12, 0x18, 0x0a, 0x07, 0x6d,
0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65,
0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x91, 0x01, 0x0a, 0x06, 0x45, 0x6e, 0x76, 0x56, 0x61, 0x72,
0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04,
0x6e, 0x61, 0x6d, 0x65, 0x12, 0x2c, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01,
0x28, 0x0b, 0x32, 0x18, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61,
0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x45, 0x6e, 0x76, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79,
0x70, 0x65, 0x12, 0x3a, 0x0a, 0x06, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01,
0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61,
0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x45, 0x6e, 0x76, 0x56, 0x61, 0x72, 0x4f, 0x70, 0x74, 0x69, 0x6f,
0x6e, 0x48, 0x00, 0x52, 0x06, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x88, 0x01, 0x01, 0x42, 0x09,
0x0a, 0x07, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xab, 0x01, 0x0a, 0x07, 0x45, 0x6e,
0x76, 0x54, 0x79, 0x70, 0x65, 0x12, 0x2f, 0x0a, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x18, 0x01, 0x20,
0x01, 0x28, 0x0e, 0x32, 0x19, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72,
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x4b, 0x69, 0x6e, 0x64, 0x48, 0x00,
0x52, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x12, 0x36, 0x0a, 0x08, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74,
0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e,
0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x45, 0x6e, 0x76, 0x54, 0x79,
0x70, 0x65, 0x48, 0x00, 0x52, 0x08, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x12, 0x2f,
0x0a, 0x03, 0x6d, 0x61, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x72,
0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x45, 0x6e,
0x76, 0x4d, 0x61, 0x70, 0x54, 0x79, 0x70, 0x65, 0x48, 0x00, 0x52, 0x03, 0x6d, 0x61, 0x70, 0x42,
0x06, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x22, 0x68, 0x0a, 0x0a, 0x45, 0x6e, 0x76, 0x4d, 0x61,
0x70, 0x54, 0x79, 0x70, 0x65, 0x12, 0x2a, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01,
0x28, 0x0b, 0x32, 0x18, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61,
0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x45, 0x6e, 0x76, 0x54, 0x79, 0x70, 0x65, 0x52, 0x03, 0x6b, 0x65,
0x79, 0x12, 0x2e, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b,
0x32, 0x18, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69,
0x6f, 0x6e, 0x2e, 0x45, 0x6e, 0x76, 0x54, 0x79, 0x70, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75,
0x65, 0x22, 0xc3, 0x01, 0x0a, 0x0c, 0x45, 0x6e, 0x76, 0x56, 0x61, 0x72, 0x4f, 0x70, 0x74, 0x69,
0x6f, 0x6e, 0x12, 0x21, 0x0a, 0x09, 0x61, 0x6c, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x74, 0x65, 0x18,
0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x09, 0x61, 0x6c, 0x74, 0x65, 0x72, 0x6e, 0x61,
0x74, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1d, 0x0a, 0x07, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74,
0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x07, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c,
0x74, 0x88, 0x01, 0x01, 0x12, 0x1f, 0x0a, 0x08, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64,
0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x48, 0x02, 0x52, 0x08, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72,
0x65, 0x64, 0x88, 0x01, 0x01, 0x12, 0x1d, 0x0a, 0x07, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x64,
0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x48, 0x03, 0x52, 0x07, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65,
0x64, 0x88, 0x01, 0x01, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x61, 0x6c, 0x74, 0x65, 0x72, 0x6e, 0x61,
0x74, 0x65, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x42, 0x0b,
0x0a, 0x09, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x42, 0x0a, 0x0a, 0x08, 0x5f,
0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x64, 0x22, 0x65, 0x0a, 0x0a, 0x4d, 0x65, 0x74, 0x68, 0x6f,
0x64, 0x52, 0x75, 0x6c, 0x65, 0x12, 0x1d, 0x0a, 0x07, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74,
0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x07, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75,
0x74, 0x88, 0x01, 0x01, 0x12, 0x1f, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e,
0x73, 0x65, 0x88, 0x01, 0x01, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75,
0x74, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x9c,
0x01, 0x0a, 0x0b, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x75, 0x6c, 0x65, 0x12, 0x35,
0x0a, 0x03, 0x64, 0x65, 0x66, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x67, 0x72,
0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x56, 0x61,
0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e,
0x52, 0x03, 0x64, 0x65, 0x66, 0x12, 0x2c, 0x0a, 0x0f, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x5f,
0x72, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00,
0x52, 0x0e, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x52, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x72,
0x88, 0x01, 0x01, 0x12, 0x14, 0x0a, 0x05, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x18, 0x03, 0x20, 0x03,
0x28, 0x09, 0x52, 0x05, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x42, 0x12, 0x0a, 0x10, 0x5f, 0x63, 0x75,
0x73, 0x74, 0x6f, 0x6d, 0x5f, 0x72, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x72, 0x22, 0xde, 0x03,
0x0a, 0x12, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69,
0x74, 0x69, 0x6f, 0x6e, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01,
0x28, 0x09, 0x48, 0x01, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x13, 0x0a,
0x02, 0x69, 0x66, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x02, 0x52, 0x02, 0x69, 0x66, 0x88,
0x01, 0x01, 0x12, 0x1f, 0x0a, 0x08, 0x61, 0x75, 0x74, 0x6f, 0x62, 0x69, 0x6e, 0x64, 0x18, 0x03,
0x20, 0x01, 0x28, 0x08, 0x48, 0x03, 0x52, 0x08, 0x61, 0x75, 0x74, 0x6f, 0x62, 0x69, 0x6e, 0x64,
0x88, 0x01, 0x01, 0x12, 0x10, 0x0a, 0x02, 0x62, 0x79, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x48,
0x00, 0x52, 0x02, 0x62, 0x79, 0x12, 0x2c, 0x0a, 0x03, 0x6d, 0x61, 0x70, 0x18, 0x0c, 0x20, 0x01,
0x28, 0x0b, 0x32, 0x18, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61,
0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x4d, 0x61, 0x70, 0x45, 0x78, 0x70, 0x72, 0x48, 0x00, 0x52, 0x03,
0x6d, 0x61, 0x70, 0x12, 0x38, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x0d,
0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65,
0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x45, 0x78,
0x70, 0x72, 0x48, 0x00, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x2f, 0x0a,
0x04, 0x63, 0x61, 0x6c, 0x6c, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x72,
0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x43, 0x61,
0x6c, 0x6c, 0x45, 0x78, 0x70, 0x72, 0x48, 0x00, 0x52, 0x04, 0x63, 0x61, 0x6c, 0x6c, 0x12, 0x41,
0x0a, 0x0a, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x0f, 0x20, 0x01,
0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61,
0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45,
0x78, 0x70, 0x72, 0x48, 0x00, 0x52, 0x0a, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f,
0x6e, 0x12, 0x2f, 0x0a, 0x04, 0x65, 0x6e, 0x75, 0x6d, 0x18, 0x10, 0x20, 0x01, 0x28, 0x0b, 0x32,
0x19, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f,
0x6e, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x45, 0x78, 0x70, 0x72, 0x48, 0x00, 0x52, 0x04, 0x65, 0x6e,
0x75, 0x6d, 0x12, 0x35, 0x0a, 0x06, 0x73, 0x77, 0x69, 0x74, 0x63, 0x68, 0x18, 0x11, 0x20, 0x01,
0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61,
0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x53, 0x77, 0x69, 0x74, 0x63, 0x68, 0x45, 0x78, 0x70, 0x72, 0x48,
0x00, 0x52, 0x06, 0x73, 0x77, 0x69, 0x74, 0x63, 0x68, 0x42, 0x06, 0x0a, 0x04, 0x65, 0x78, 0x70,
0x72, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x05, 0x0a, 0x03, 0x5f, 0x69,
0x66, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x61, 0x75, 0x74, 0x6f, 0x62, 0x69, 0x6e, 0x64, 0x22, 0xc5,
0x01, 0x0a, 0x07, 0x4d, 0x61, 0x70, 0x45, 0x78, 0x70, 0x72, 0x12, 0x35, 0x0a, 0x08, 0x69, 0x74,
0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67,
0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x49,
0x74, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x08, 0x69, 0x74, 0x65, 0x72, 0x61, 0x74, 0x6f,
0x72, 0x12, 0x10, 0x0a, 0x02, 0x62, 0x79, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52,
0x02, 0x62, 0x79, 0x12, 0x38, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x0c,
0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65,
0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x45, 0x78,
0x70, 0x72, 0x48, 0x00, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x2f, 0x0a,
0x04, 0x65, 0x6e, 0x75, 0x6d, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x72,
0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x45, 0x6e,
0x75, 0x6d, 0x45, 0x78, 0x70, 0x72, 0x48, 0x00, 0x52, 0x04, 0x65, 0x6e, 0x75, 0x6d, 0x42, 0x06,
0x0a, 0x04, 0x65, 0x78, 0x70, 0x72, 0x22, 0x30, 0x0a, 0x08, 0x49, 0x74, 0x65, 0x72, 0x61, 0x74,
0x6f, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x73, 0x72, 0x63, 0x18, 0x02, 0x20,
0x01, 0x28, 0x09, 0x52, 0x03, 0x73, 0x72, 0x63, 0x22, 0x50, 0x0a, 0x0b, 0x4d, 0x65, 0x73, 0x73,
0x61, 0x67, 0x65, 0x45, 0x78, 0x70, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18,
0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x2d, 0x0a, 0x04, 0x61,
0x72, 0x67, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x72, 0x70, 0x63,
0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x41, 0x72, 0x67, 0x75,
0x6d, 0x65, 0x6e, 0x74, 0x52, 0x04, 0x61, 0x72, 0x67, 0x73, 0x22, 0x2e, 0x0a, 0x08, 0x45, 0x6e,
0x75, 0x6d, 0x45, 0x78, 0x70, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01,
0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x62, 0x79,
0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x62, 0x79, 0x22, 0xf3, 0x02, 0x0a, 0x08, 0x43,
0x61, 0x6c, 0x6c, 0x45, 0x78, 0x70, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f,
0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12,
0x38, 0x0a, 0x07, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b,
0x32, 0x1e, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69,
0x6f, 0x6e, 0x2e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
0x52, 0x07, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x07, 0x74, 0x69, 0x6d,
0x65, 0x6f, 0x75, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x07, 0x74, 0x69,
0x6d, 0x65, 0x6f, 0x75, 0x74, 0x88, 0x01, 0x01, 0x12, 0x37, 0x0a, 0x05, 0x72, 0x65, 0x74, 0x72,
0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66,
0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x52, 0x65, 0x74, 0x72, 0x79, 0x50,
0x6f, 0x6c, 0x69, 0x63, 0x79, 0x48, 0x01, 0x52, 0x05, 0x72, 0x65, 0x74, 0x72, 0x79, 0x88, 0x01,
0x01, 0x12, 0x30, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b,
0x32, 0x1a, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69,
0x6f, 0x6e, 0x2e, 0x47, 0x52, 0x50, 0x43, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x05, 0x65, 0x72,
0x72, 0x6f, 0x72, 0x12, 0x3c, 0x0a, 0x06, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x06, 0x20,
0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72,
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x47, 0x52, 0x50, 0x43, 0x43, 0x61, 0x6c, 0x6c, 0x4f, 0x70,
0x74, 0x69, 0x6f, 0x6e, 0x48, 0x02, 0x52, 0x06, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x88, 0x01,
0x01, 0x12, 0x1f, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x07, 0x20,
0x01, 0x28, 0x09, 0x48, 0x03, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x88,
0x01, 0x01, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x42, 0x08,
0x0a, 0x06, 0x5f, 0x72, 0x65, 0x74, 0x72, 0x79, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6f, 0x70, 0x74,
0x69, 0x6f, 0x6e, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61,
0x22, 0x7f, 0x0a, 0x0a, 0x53, 0x77, 0x69, 0x74, 0x63, 0x68, 0x45, 0x78, 0x70, 0x72, 0x12, 0x33,
0x0a, 0x04, 0x63, 0x61, 0x73, 0x65, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x67,
0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x53,
0x77, 0x69, 0x74, 0x63, 0x68, 0x43, 0x61, 0x73, 0x65, 0x45, 0x78, 0x70, 0x72, 0x52, 0x04, 0x63,
0x61, 0x73, 0x65, 0x12, 0x3c, 0x0a, 0x07, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x18, 0x02,
0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65,
0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x53, 0x77, 0x69, 0x74, 0x63, 0x68, 0x44, 0x65, 0x66,
0x61, 0x75, 0x6c, 0x74, 0x45, 0x78, 0x70, 0x72, 0x52, 0x07, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c,
0x74, 0x22, 0x71, 0x0a, 0x0e, 0x53, 0x77, 0x69, 0x74, 0x63, 0x68, 0x43, 0x61, 0x73, 0x65, 0x45,
0x78, 0x70, 0x72, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x66, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
0x02, 0x69, 0x66, 0x12, 0x35, 0x0a, 0x03, 0x64, 0x65, 0x66, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b,
0x32, 0x23, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69,
0x6f, 0x6e, 0x2e, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x44, 0x65, 0x66, 0x69, 0x6e,
0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x03, 0x64, 0x65, 0x66, 0x12, 0x10, 0x0a, 0x02, 0x62, 0x79,
0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x02, 0x62, 0x79, 0x42, 0x06, 0x0a, 0x04,
0x65, 0x78, 0x70, 0x72, 0x22, 0x64, 0x0a, 0x11, 0x53, 0x77, 0x69, 0x74, 0x63, 0x68, 0x44, 0x65,
0x66, 0x61, 0x75, 0x6c, 0x74, 0x45, 0x78, 0x70, 0x72, 0x12, 0x35, 0x0a, 0x03, 0x64, 0x65, 0x66,
0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65,
0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c,
0x65, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x03, 0x64, 0x65, 0x66,
0x12, 0x10, 0x0a, 0x02, 0x62, 0x79, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x02,
0x62, 0x79, 0x42, 0x06, 0x0a, 0x04, 0x65, 0x78, 0x70, 0x72, 0x22, 0x86, 0x04, 0x0a, 0x09, 0x47,
0x52, 0x50, 0x43, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x35, 0x0a, 0x03, 0x64, 0x65, 0x66, 0x18,
0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64,
0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65,
0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x03, 0x64, 0x65, 0x66, 0x12,
0x13, 0x0a, 0x02, 0x69, 0x66, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x02, 0x69,
0x66, 0x88, 0x01, 0x01, 0x12, 0x29, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x03, 0x20, 0x01,
0x28, 0x0e, 0x32, 0x10, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x72, 0x70, 0x63, 0x2e,
0x43, 0x6f, 0x64, 0x65, 0x48, 0x01, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x88, 0x01, 0x01, 0x12,
0x1d, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09,
0x48, 0x02, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x88, 0x01, 0x01, 0x12, 0x3a,
0x0a, 0x07, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32,
0x20, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f,
0x6e, 0x2e, 0x47, 0x52, 0x50, 0x43, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x44, 0x65, 0x74, 0x61, 0x69,
0x6c, 0x52, 0x07, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x12, 0x1b, 0x0a, 0x06, 0x69, 0x67,
0x6e, 0x6f, 0x72, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x48, 0x03, 0x52, 0x06, 0x69, 0x67,
0x6e, 0x6f, 0x72, 0x65, 0x88, 0x01, 0x01, 0x12, 0x33, 0x0a, 0x13, 0x69, 0x67, 0x6e, 0x6f, 0x72,
0x65, 0x5f, 0x61, 0x6e, 0x64, 0x5f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x07,
0x20, 0x01, 0x28, 0x09, 0x48, 0x04, 0x52, 0x11, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x41, 0x6e,
0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x88, 0x01, 0x01, 0x12, 0x45, 0x0a, 0x09,
0x6c, 0x6f, 0x67, 0x5f, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0e, 0x32,
0x23, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f,
0x6e, 0x2e, 0x47, 0x52, 0x50, 0x43, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x2e, 0x4c, 0x6f, 0x67, 0x4c,
0x65, 0x76, 0x65, 0x6c, 0x48, 0x05, 0x52, 0x08, 0x6c, 0x6f, 0x67, 0x4c, 0x65, 0x76, 0x65, 0x6c,
0x88, 0x01, 0x01, 0x22, 0x41, 0x0a, 0x08, 0x4c, 0x6f, 0x67, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x12,
0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05,
0x44, 0x45, 0x42, 0x55, 0x47, 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, 0x49, 0x4e, 0x46, 0x4f, 0x10,
0x02, 0x12, 0x08, 0x0a, 0x04, 0x57, 0x41, 0x52, 0x4e, 0x10, 0x03, 0x12, 0x09, 0x0a, 0x05, 0x45,
0x52, 0x52, 0x4f, 0x52, 0x10, 0x04, 0x42, 0x05, 0x0a, 0x03, 0x5f, 0x69, 0x66, 0x42, 0x07, 0x0a,
0x05, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61,
0x67, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x42, 0x16, 0x0a,
0x14, 0x5f, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x5f, 0x61, 0x6e, 0x64, 0x5f, 0x72, 0x65, 0x73,
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x6c, 0x6f, 0x67, 0x5f, 0x6c, 0x65,
0x76, 0x65, 0x6c, 0x22, 0xfa, 0x05, 0x0a, 0x0f, 0x47, 0x52, 0x50, 0x43, 0x45, 0x72, 0x72, 0x6f,
0x72, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x66, 0x18, 0x01, 0x20,
0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x66, 0x12, 0x35, 0x0a, 0x03, 0x64, 0x65, 0x66, 0x18, 0x02,
0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65,
0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x44,
0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x03, 0x64, 0x65, 0x66, 0x12, 0x36,
0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32,
0x1c, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f,
0x6e, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x45, 0x78, 0x70, 0x72, 0x52, 0x07, 0x6d,
0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x34, 0x0a, 0x0a, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f,
0x69, 0x6e, 0x66, 0x6f, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x67, 0x6f, 0x6f,
0x67, 0x6c, 0x65, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x49, 0x6e, 0x66,
0x6f, 0x52, 0x09, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x34, 0x0a, 0x0a,
0x72, 0x65, 0x74, 0x72, 0x79, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b,
0x32, 0x15, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x52, 0x65,
0x74, 0x72, 0x79, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x09, 0x72, 0x65, 0x74, 0x72, 0x79, 0x49, 0x6e,
0x66, 0x6f, 0x12, 0x34, 0x0a, 0x0a, 0x64, 0x65, 0x62, 0x75, 0x67, 0x5f, 0x69, 0x6e, 0x66, 0x6f,
0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e,
0x72, 0x70, 0x63, 0x2e, 0x44, 0x65, 0x62, 0x75, 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x09, 0x64,
0x65, 0x62, 0x75, 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x3d, 0x0a, 0x0d, 0x71, 0x75, 0x6f, 0x74,
0x61, 0x5f, 0x66, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32,
0x18, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x51, 0x75, 0x6f,
0x74, 0x61, 0x46, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x52, 0x0c, 0x71, 0x75, 0x6f, 0x74, 0x61,
0x46, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x12, 0x52, 0x0a, 0x14, 0x70, 0x72, 0x65, 0x63, 0x6f,
0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x66, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x18,
0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x72,
0x70, 0x63, 0x2e, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x46,
0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x52, 0x13, 0x70, 0x72, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x69,
0x74, 0x69, 0x6f, 0x6e, 0x46, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x12, 0x37, 0x0a, 0x0b, 0x62,
0x61, 0x64, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b,
0x32, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x42, 0x61,
0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x0a, 0x62, 0x61, 0x64, 0x52, 0x65, 0x71,
0x75, 0x65, 0x73, 0x74, 0x12, 0x3a, 0x0a, 0x0c, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f,
0x69, 0x6e, 0x66, 0x6f, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f,
0x67, 0x6c, 0x65, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x49,
0x6e, 0x66, 0x6f, 0x52, 0x0b, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, 0x6e, 0x66, 0x6f,
0x12, 0x3d, 0x0a, 0x0d, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x69, 0x6e, 0x66,
0x6f, 0x18, 0x0b, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,
0x2e, 0x72, 0x70, 0x63, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x6e, 0x66,
0x6f, 0x52, 0x0c, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12,
0x24, 0x0a, 0x04, 0x68, 0x65, 0x6c, 0x70, 0x18, 0x0c, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e,
0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x48, 0x65, 0x6c, 0x70, 0x52,
0x04, 0x68, 0x65, 0x6c, 0x70, 0x12, 0x49, 0x0a, 0x11, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x69, 0x7a,
0x65, 0x64, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x0d, 0x20, 0x03, 0x28, 0x0b,
0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x6f,
0x63, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x10,
0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65,
0x12, 0x0e, 0x0a, 0x02, 0x62, 0x79, 0x18, 0x0e, 0x20, 0x03, 0x28, 0x09, 0x52, 0x02, 0x62, 0x79,
0x22, 0xc7, 0x03, 0x0a, 0x0e, 0x47, 0x52, 0x50, 0x43, 0x43, 0x61, 0x6c, 0x6c, 0x4f, 0x70, 0x74,
0x69, 0x6f, 0x6e, 0x12, 0x2c, 0x0a, 0x0f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x5f, 0x73,
0x75, 0x62, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0e,
0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x53, 0x75, 0x62, 0x74, 0x79, 0x70, 0x65, 0x88, 0x01,
0x01, 0x12, 0x1b, 0x0a, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28,
0x09, 0x48, 0x01, 0x52, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x88, 0x01, 0x01, 0x12, 0x37,
0x0a, 0x16, 0x6d, 0x61, 0x78, 0x5f, 0x63, 0x61, 0x6c, 0x6c, 0x5f, 0x72, 0x65, 0x63, 0x76, 0x5f,
0x6d, 0x73, 0x67, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x48, 0x02,
0x52, 0x12, 0x6d, 0x61, 0x78, 0x43, 0x61, 0x6c, 0x6c, 0x52, 0x65, 0x63, 0x76, 0x4d, 0x73, 0x67,
0x53, 0x69, 0x7a, 0x65, 0x88, 0x01, 0x01, 0x12, 0x37, 0x0a, 0x16, 0x6d, 0x61, 0x78, 0x5f, 0x63,
0x61, 0x6c, 0x6c, 0x5f, 0x73, 0x65, 0x6e, 0x64, 0x5f, 0x6d, 0x73, 0x67, 0x5f, 0x73, 0x69, 0x7a,
0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x48, 0x03, 0x52, 0x12, 0x6d, 0x61, 0x78, 0x43, 0x61,
0x6c, 0x6c, 0x53, 0x65, 0x6e, 0x64, 0x4d, 0x73, 0x67, 0x53, 0x69, 0x7a, 0x65, 0x88, 0x01, 0x01,
0x12, 0x28, 0x0a, 0x0d, 0x73, 0x74, 0x61, 0x74, 0x69, 0x63, 0x5f, 0x6d, 0x65, 0x74, 0x68, 0x6f,
0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x48, 0x04, 0x52, 0x0c, 0x73, 0x74, 0x61, 0x74, 0x69,
0x63, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x88, 0x01, 0x01, 0x12, 0x1d, 0x0a, 0x07, 0x74, 0x72,
0x61, 0x69, 0x6c, 0x65, 0x72, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x48, 0x05, 0x52, 0x07, 0x74,
0x72, 0x61, 0x69, 0x6c, 0x65, 0x72, 0x88, 0x01, 0x01, 0x12, 0x29, 0x0a, 0x0e, 0x77, 0x61, 0x69,
0x74, 0x5f, 0x66, 0x6f, 0x72, 0x5f, 0x72, 0x65, 0x61, 0x64, 0x79, 0x18, 0x07, 0x20, 0x01, 0x28,
0x08, 0x48, 0x06, 0x52, 0x0c, 0x77, 0x61, 0x69, 0x74, 0x46, 0x6f, 0x72, 0x52, 0x65, 0x61, 0x64,
0x79, 0x88, 0x01, 0x01, 0x42, 0x12, 0x0a, 0x10, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74,
0x5f, 0x73, 0x75, 0x62, 0x74, 0x79, 0x70, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x68, 0x65, 0x61,
0x64, 0x65, 0x72, 0x42, 0x19, 0x0a, 0x17, 0x5f, 0x6d, 0x61, 0x78, 0x5f, 0x63, 0x61, 0x6c, 0x6c,
0x5f, 0x72, 0x65, 0x63, 0x76, 0x5f, 0x6d, 0x73, 0x67, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x42, 0x19,
0x0a, 0x17, 0x5f, 0x6d, 0x61, 0x78, 0x5f, 0x63, 0x61, 0x6c, 0x6c, 0x5f, 0x73, 0x65, 0x6e, 0x64,
0x5f, 0x6d, 0x73, 0x67, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x42, 0x10, 0x0a, 0x0e, 0x5f, 0x73, 0x74,
0x61, 0x74, 0x69, 0x63, 0x5f, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x42, 0x0a, 0x0a, 0x08, 0x5f,
0x74, 0x72, 0x61, 0x69, 0x6c, 0x65, 0x72, 0x42, 0x11, 0x0a, 0x0f, 0x5f, 0x77, 0x61, 0x69, 0x74,
0x5f, 0x66, 0x6f, 0x72, 0x5f, 0x72, 0x65, 0x61, 0x64, 0x79, 0x22, 0x64, 0x0a, 0x0e, 0x56, 0x61,
0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x78, 0x70, 0x72, 0x12, 0x17, 0x0a, 0x04,
0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61,
0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x30, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x02,
0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65,
0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x47, 0x52, 0x50, 0x43, 0x45, 0x72, 0x72, 0x6f, 0x72,
0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65,
0x22, 0xb8, 0x01, 0x0a, 0x0b, 0x52, 0x65, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79,
0x12, 0x42, 0x0a, 0x08, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01,
0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61,
0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x52, 0x65, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79,
0x43, 0x6f, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x08, 0x63, 0x6f, 0x6e, 0x73,
0x74, 0x61, 0x6e, 0x74, 0x12, 0x4b, 0x0a, 0x0b, 0x65, 0x78, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74,
0x69, 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x67, 0x72, 0x70, 0x63,
0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x52, 0x65, 0x74, 0x72,
0x79, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x45, 0x78, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x69,
0x61, 0x6c, 0x48, 0x00, 0x52, 0x0b, 0x65, 0x78, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x69, 0x61,
0x6c, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x66, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69,
0x66, 0x42, 0x08, 0x0a, 0x06, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x22, 0x79, 0x0a, 0x13, 0x52,
0x65, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x61,
0x6e, 0x74, 0x12, 0x1f, 0x0a, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x01,
0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c,
0x88, 0x01, 0x01, 0x12, 0x24, 0x0a, 0x0b, 0x6d, 0x61, 0x78, 0x5f, 0x72, 0x65, 0x74, 0x72, 0x69,
0x65, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x48, 0x01, 0x52, 0x0a, 0x6d, 0x61, 0x78, 0x52,
0x65, 0x74, 0x72, 0x69, 0x65, 0x73, 0x88, 0x01, 0x01, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x69, 0x6e,
0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x6d, 0x61, 0x78, 0x5f, 0x72,
0x65, 0x74, 0x72, 0x69, 0x65, 0x73, 0x22, 0xd1, 0x02, 0x0a, 0x16, 0x52, 0x65, 0x74, 0x72, 0x79,
0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x45, 0x78, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x69, 0x61,
0x6c, 0x12, 0x2e, 0x0a, 0x10, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x5f, 0x69, 0x6e, 0x74,
0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0f, 0x69,
0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x88, 0x01,
0x01, 0x12, 0x36, 0x0a, 0x14, 0x72, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x69, 0x7a, 0x61, 0x74, 0x69,
0x6f, 0x6e, 0x5f, 0x66, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x01, 0x48,
0x01, 0x52, 0x13, 0x72, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e,
0x46, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x88, 0x01, 0x01, 0x12, 0x23, 0x0a, 0x0a, 0x6d, 0x75, 0x6c,
0x74, 0x69, 0x70, 0x6c, 0x69, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x01, 0x48, 0x02, 0x52,
0x0a, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x69, 0x65, 0x72, 0x88, 0x01, 0x01, 0x12, 0x26,
0x0a, 0x0c, 0x6d, 0x61, 0x78, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x04,
0x20, 0x01, 0x28, 0x09, 0x48, 0x03, 0x52, 0x0b, 0x6d, 0x61, 0x78, 0x49, 0x6e, 0x74, 0x65, 0x72,
0x76, 0x61, 0x6c, 0x88, 0x01, 0x01, 0x12, 0x24, 0x0a, 0x0b, 0x6d, 0x61, 0x78, 0x5f, 0x72, 0x65,
0x74, 0x72, 0x69, 0x65, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x48, 0x04, 0x52, 0x0a, 0x6d,
0x61, 0x78, 0x52, 0x65, 0x74, 0x72, 0x69, 0x65, 0x73, 0x88, 0x01, 0x01, 0x42, 0x13, 0x0a, 0x11,
0x5f, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61,
0x6c, 0x42, 0x17, 0x0a, 0x15, 0x5f, 0x72, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x69, 0x7a, 0x61, 0x74,
0x69, 0x6f, 0x6e, 0x5f, 0x66, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x6d,
0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x69, 0x65, 0x72, 0x42, 0x0f, 0x0a, 0x0d, 0x5f, 0x6d, 0x61,
0x78, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x6d,
0x61, 0x78, 0x5f, 0x72, 0x65, 0x74, 0x72, 0x69, 0x65, 0x73, 0x22, 0x5d, 0x0a, 0x0d, 0x4d, 0x65,
0x74, 0x68, 0x6f, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x66,
0x69, 0x65, 0x6c, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x66, 0x69, 0x65, 0x6c,
0x64, 0x12, 0x13, 0x0a, 0x02, 0x62, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52,
0x02, 0x62, 0x79, 0x88, 0x01, 0x01, 0x12, 0x13, 0x0a, 0x02, 0x69, 0x66, 0x18, 0x03, 0x20, 0x01,
0x28, 0x09, 0x48, 0x01, 0x52, 0x02, 0x69, 0x66, 0x88, 0x01, 0x01, 0x42, 0x05, 0x0a, 0x03, 0x5f,
0x62, 0x79, 0x42, 0x05, 0x0a, 0x03, 0x5f, 0x69, 0x66, 0x22, 0x85, 0x01, 0x0a, 0x0e, 0x4d, 0x65,
0x74, 0x68, 0x6f, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x17, 0x0a, 0x04,
0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61,
0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x18, 0x02,
0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x05, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x88, 0x01, 0x01,
0x12, 0x1f, 0x0a, 0x08, 0x61, 0x75, 0x74, 0x6f, 0x62, 0x69, 0x6e, 0x64, 0x18, 0x03, 0x20, 0x01,
0x28, 0x08, 0x48, 0x02, 0x52, 0x08, 0x61, 0x75, 0x74, 0x6f, 0x62, 0x69, 0x6e, 0x64, 0x88, 0x01,
0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x66,
0x69, 0x65, 0x6c, 0x64, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x61, 0x75, 0x74, 0x6f, 0x62, 0x69, 0x6e,
0x64, 0x22, 0x62, 0x0a, 0x08, 0x41, 0x72, 0x67, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x12, 0x0a,
0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d,
0x65, 0x12, 0x13, 0x0a, 0x02, 0x62, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52,
0x02, 0x62, 0x79, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x69, 0x6e, 0x6c, 0x69, 0x6e, 0x65,
0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x06, 0x69, 0x6e, 0x6c, 0x69, 0x6e, 0x65,
0x88, 0x01, 0x01, 0x42, 0x05, 0x0a, 0x03, 0x5f, 0x62, 0x79, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x69,
0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x22, 0xf2, 0x01, 0x0a, 0x09, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x52,
0x75, 0x6c, 0x65, 0x12, 0x2c, 0x0a, 0x0f, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x5f, 0x72, 0x65,
0x73, 0x6f, 0x6c, 0x76, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x0e,
0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x52, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x72, 0x88, 0x01,
0x01, 0x12, 0x13, 0x0a, 0x02, 0x62, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52,
0x02, 0x62, 0x79, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x18,
0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x02, 0x52, 0x05, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x88, 0x01,
0x01, 0x12, 0x31, 0x0a, 0x05, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b,
0x32, 0x1b, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69,
0x6f, 0x6e, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x6e, 0x65, 0x6f, 0x66, 0x52, 0x05, 0x6f,
0x6e, 0x65, 0x6f, 0x66, 0x12, 0x2f, 0x0a, 0x03, 0x65, 0x6e, 0x76, 0x18, 0x05, 0x20, 0x01, 0x28,
0x0b, 0x32, 0x1d, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74,
0x69, 0x6f, 0x6e, 0x2e, 0x45, 0x6e, 0x76, 0x56, 0x61, 0x72, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e,
0x52, 0x03, 0x65, 0x6e, 0x76, 0x42, 0x12, 0x0a, 0x10, 0x5f, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d,
0x5f, 0x72, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x72, 0x42, 0x05, 0x0a, 0x03, 0x5f, 0x62, 0x79,
0x42, 0x08, 0x0a, 0x06, 0x5f, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x22, 0x89, 0x01, 0x0a, 0x0a, 0x46,
0x69, 0x65, 0x6c, 0x64, 0x4f, 0x6e, 0x65, 0x6f, 0x66, 0x12, 0x10, 0x0a, 0x02, 0x69, 0x66, 0x18,
0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x02, 0x69, 0x66, 0x12, 0x1a, 0x0a, 0x07, 0x64,
0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x07,
0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x12, 0x35, 0x0a, 0x03, 0x64, 0x65, 0x66, 0x18, 0x03,
0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65,
0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x44,
0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x03, 0x64, 0x65, 0x66, 0x12, 0x0e,
0x0a, 0x02, 0x62, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x62, 0x79, 0x42, 0x06,
0x0a, 0x04, 0x63, 0x6f, 0x6e, 0x64, 0x22, 0x45, 0x0a, 0x09, 0x43, 0x45, 0x4c, 0x50, 0x6c, 0x75,
0x67, 0x69, 0x6e, 0x12, 0x38, 0x0a, 0x06, 0x65, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x01, 0x20,
0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72,
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x43, 0x45, 0x4c, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x45,
0x78, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x06, 0x65, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x22, 0xaf, 0x02,
0x0a, 0x0f, 0x43, 0x45, 0x4c, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x45, 0x78, 0x70, 0x6f, 0x72,
0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x65, 0x73, 0x63, 0x18, 0x02, 0x20,
0x01, 0x28, 0x09, 0x52, 0x04, 0x64, 0x65, 0x73, 0x63, 0x12, 0x36, 0x0a, 0x05, 0x74, 0x79, 0x70,
0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e,
0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x43, 0x45, 0x4c, 0x52, 0x65,
0x63, 0x65, 0x69, 0x76, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x52, 0x05, 0x74, 0x79, 0x70, 0x65,
0x73, 0x12, 0x3a, 0x0a, 0x09, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x04,
0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65,
0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x43, 0x45, 0x4c, 0x46, 0x75, 0x6e, 0x63, 0x74, 0x69,
0x6f, 0x6e, 0x52, 0x09, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x3a, 0x0a,
0x09, 0x76, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b,
0x32, 0x1c, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69,
0x6f, 0x6e, 0x2e, 0x43, 0x45, 0x4c, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x09,
0x76, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x12, 0x44, 0x0a, 0x0a, 0x63, 0x61, 0x70,
0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e,
0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e,
0x43, 0x45, 0x4c, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c,
0x69, 0x74, 0x79, 0x52, 0x0a, 0x63, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x22,
0x9b, 0x02, 0x0a, 0x13, 0x43, 0x45, 0x4c, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x43, 0x61, 0x70,
0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x12, 0x3e, 0x0a, 0x03, 0x65, 0x6e, 0x76, 0x18, 0x01,
0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65,
0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x43, 0x45, 0x4c, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e,
0x45, 0x6e, 0x76, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x48, 0x00, 0x52,
0x03, 0x65, 0x6e, 0x76, 0x88, 0x01, 0x01, 0x12, 0x54, 0x0a, 0x0b, 0x66, 0x69, 0x6c, 0x65, 0x5f,
0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x67,
0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x43,
0x45, 0x4c, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x46, 0x69, 0x6c, 0x65, 0x53, 0x79, 0x73, 0x74,
0x65, 0x6d, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x48, 0x01, 0x52, 0x0a,
0x66, 0x69, 0x6c, 0x65, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x88, 0x01, 0x01, 0x12, 0x4a, 0x0a,
0x07, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b,
0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e,
0x2e, 0x43, 0x45, 0x4c, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72,
0x6b, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x48, 0x02, 0x52, 0x07, 0x6e,
0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x88, 0x01, 0x01, 0x42, 0x06, 0x0a, 0x04, 0x5f, 0x65, 0x6e,
0x76, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x73, 0x79, 0x73, 0x74, 0x65,
0x6d, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x22, 0x40, 0x0a,
0x16, 0x43, 0x45, 0x4c, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x45, 0x6e, 0x76, 0x43, 0x61, 0x70,
0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x61, 0x6c, 0x6c, 0x18, 0x01,
0x20, 0x01, 0x28, 0x08, 0x52, 0x03, 0x61, 0x6c, 0x6c, 0x12, 0x14, 0x0a, 0x05, 0x6e, 0x61, 0x6d,
0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x22,
0x3e, 0x0a, 0x1d, 0x43, 0x45, 0x4c, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x46, 0x69, 0x6c, 0x65,
0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79,
0x12, 0x1d, 0x0a, 0x0a, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01,
0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x50, 0x61, 0x74, 0x68, 0x22,
0x1c, 0x0a, 0x1a, 0x43, 0x45, 0x4c, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x4e, 0x65, 0x74, 0x77,
0x6f, 0x72, 0x6b, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x22, 0xa1, 0x01,
0x0a, 0x0b, 0x43, 0x45, 0x4c, 0x46, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a,
0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d,
0x65, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x65, 0x73, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52,
0x04, 0x64, 0x65, 0x73, 0x63, 0x12, 0x38, 0x0a, 0x04, 0x61, 0x72, 0x67, 0x73, 0x18, 0x03, 0x20,
0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72,
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x43, 0x45, 0x4c, 0x46, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f,
0x6e, 0x41, 0x72, 0x67, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x04, 0x61, 0x72, 0x67, 0x73, 0x12,
0x30, 0x0a, 0x06, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32,
0x18, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f,
0x6e, 0x2e, 0x43, 0x45, 0x4c, 0x54, 0x79, 0x70, 0x65, 0x52, 0x06, 0x72, 0x65, 0x74, 0x75, 0x72,
0x6e, 0x22, 0x71, 0x0a, 0x0f, 0x43, 0x45, 0x4c, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x72,
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, 0x12, 0x0a, 0x04, 0x64, 0x65, 0x73, 0x63,
0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x64, 0x65, 0x73, 0x63, 0x12, 0x36, 0x0a, 0x07,
0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e,
0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e,
0x43, 0x45, 0x4c, 0x46, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x6d, 0x65, 0x74,
0x68, 0x6f, 0x64, 0x73, 0x22, 0x6b, 0x0a, 0x13, 0x43, 0x45, 0x4c, 0x46, 0x75, 0x6e, 0x63, 0x74,
0x69, 0x6f, 0x6e, 0x41, 0x72, 0x67, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e,
0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12,
0x12, 0x0a, 0x04, 0x64, 0x65, 0x73, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x64,
0x65, 0x73, 0x63, 0x12, 0x2c, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28,
0x0b, 0x32, 0x18, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74,
0x69, 0x6f, 0x6e, 0x2e, 0x43, 0x45, 0x4c, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70,
0x65, 0x22, 0xdd, 0x01, 0x0a, 0x07, 0x43, 0x45, 0x4c, 0x54, 0x79, 0x70, 0x65, 0x12, 0x2f, 0x0a,
0x04, 0x6b, 0x69, 0x6e, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x19, 0x2e, 0x67, 0x72,
0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x54, 0x79,
0x70, 0x65, 0x4b, 0x69, 0x6e, 0x64, 0x48, 0x00, 0x52, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x12, 0x36,
0x0a, 0x08, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b,
0x32, 0x18, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69,
0x6f, 0x6e, 0x2e, 0x43, 0x45, 0x4c, 0x54, 0x79, 0x70, 0x65, 0x48, 0x00, 0x52, 0x08, 0x72, 0x65,
0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x12, 0x2f, 0x0a, 0x03, 0x6d, 0x61, 0x70, 0x18, 0x03, 0x20,
0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72,
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x43, 0x45, 0x4c, 0x4d, 0x61, 0x70, 0x54, 0x79, 0x70, 0x65,
0x48, 0x00, 0x52, 0x03, 0x6d, 0x61, 0x70, 0x12, 0x1a, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61,
0x67, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73,
0x61, 0x67, 0x65, 0x12, 0x14, 0x0a, 0x04, 0x65, 0x6e, 0x75, 0x6d, 0x18, 0x05, 0x20, 0x01, 0x28,
0x09, 0x48, 0x00, 0x52, 0x04, 0x65, 0x6e, 0x75, 0x6d, 0x42, 0x06, 0x0a, 0x04, 0x74, 0x79, 0x70,
0x65, 0x22, 0x68, 0x0a, 0x0a, 0x43, 0x45, 0x4c, 0x4d, 0x61, 0x70, 0x54, 0x79, 0x70, 0x65, 0x12,
0x2a, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x67,
0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x43,
0x45, 0x4c, 0x54, 0x79, 0x70, 0x65, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x2e, 0x0a, 0x05, 0x76,
0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x67, 0x72, 0x70,
0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x43, 0x45, 0x4c,
0x54, 0x79, 0x70, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x63, 0x0a, 0x0b, 0x43,
0x45, 0x4c, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61,
0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x12,
0x0a, 0x04, 0x64, 0x65, 0x73, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x64, 0x65,
0x73, 0x63, 0x12, 0x2c, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b,
0x32, 0x18, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69,
0x6f, 0x6e, 0x2e, 0x43, 0x45, 0x4c, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65,
0x2a, 0x5e, 0x0a, 0x08, 0x54, 0x79, 0x70, 0x65, 0x4b, 0x69, 0x6e, 0x64, 0x12, 0x0b, 0x0a, 0x07,
0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x53, 0x54, 0x52,
0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, 0x42, 0x4f, 0x4f, 0x4c, 0x10, 0x02, 0x12,
0x09, 0x0a, 0x05, 0x49, 0x4e, 0x54, 0x36, 0x34, 0x10, 0x03, 0x12, 0x0a, 0x0a, 0x06, 0x55, 0x49,
0x4e, 0x54, 0x36, 0x34, 0x10, 0x04, 0x12, 0x0a, 0x0a, 0x06, 0x44, 0x4f, 0x55, 0x42, 0x4c, 0x45,
0x10, 0x05, 0x12, 0x0c, 0x0a, 0x08, 0x44, 0x55, 0x52, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x06,
0x3a, 0x4c, 0x0a, 0x04, 0x66, 0x69, 0x6c, 0x65, 0x12, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c,
0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x4f,
0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xa3, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e,
0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e,
0x46, 0x69, 0x6c, 0x65, 0x52, 0x75, 0x6c, 0x65, 0x52, 0x04, 0x66, 0x69, 0x6c, 0x65, 0x3a, 0x58,
0x0a, 0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x1f, 0x2e, 0x67, 0x6f, 0x6f, 0x67,
0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x65, 0x72, 0x76,
0x69, 0x63, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xa3, 0x09, 0x20, 0x01, 0x28,
0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74,
0x69, 0x6f, 0x6e, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x75, 0x6c, 0x65, 0x52,
0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x3a, 0x54, 0x0a, 0x06, 0x6d, 0x65, 0x74, 0x68,
0x6f, 0x64, 0x12, 0x1e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f,
0x6e, 0x73, 0x18, 0xa3, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x72, 0x70, 0x63,
0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x4d, 0x65, 0x74, 0x68,
0x6f, 0x64, 0x52, 0x75, 0x6c, 0x65, 0x52, 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x3a, 0x58,
0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x1f, 0x2e, 0x67, 0x6f, 0x6f, 0x67,
0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4d, 0x65, 0x73, 0x73,
0x61, 0x67, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xa3, 0x09, 0x20, 0x01, 0x28,
0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74,
0x69, 0x6f, 0x6e, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x75, 0x6c, 0x65, 0x52,
0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x3a, 0x50, 0x0a, 0x05, 0x66, 0x69, 0x65, 0x6c,
0x64, 0x12, 0x1d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73,
0x18, 0xa3, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66,
0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x52,
0x75, 0x6c, 0x65, 0x52, 0x05, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x3a, 0x4c, 0x0a, 0x04, 0x65, 0x6e,
0x75, 0x6d, 0x12, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73,
0x18, 0xa3, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66,
0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x52, 0x75,
0x6c, 0x65, 0x52, 0x04, 0x65, 0x6e, 0x75, 0x6d, 0x3a, 0x61, 0x0a, 0x0a, 0x65, 0x6e, 0x75, 0x6d,
0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x21, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x56, 0x61, 0x6c,
0x75, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xa3, 0x09, 0x20, 0x01, 0x28, 0x0b,
0x32, 0x1e, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69,
0x6f, 0x6e, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x75, 0x6c, 0x65,
0x52, 0x09, 0x65, 0x6e, 0x75, 0x6d, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x50, 0x0a, 0x05, 0x6f,
0x6e, 0x65, 0x6f, 0x66, 0x12, 0x1d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4f, 0x6e, 0x65, 0x6f, 0x66, 0x4f, 0x70, 0x74, 0x69,
0x6f, 0x6e, 0x73, 0x18, 0xa3, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x72, 0x70,
0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x4f, 0x6e, 0x65,
0x6f, 0x66, 0x52, 0x75, 0x6c, 0x65, 0x52, 0x05, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x42, 0xc2, 0x01,
0x0a, 0x13, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72,
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x0f, 0x46, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f,
0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3d, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62,
0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6d, 0x65, 0x72, 0x63, 0x61, 0x72, 0x69, 0x2f, 0x67, 0x72, 0x70,
0x63, 0x2d, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x67, 0x72, 0x70,
0x63, 0x2f, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x3b, 0x66, 0x65, 0x64,
0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0xa2, 0x02, 0x03, 0x47, 0x46, 0x58, 0xaa, 0x02, 0x0f,
0x47, 0x72, 0x70, 0x63, 0x2e, 0x46, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0xca,
0x02, 0x0f, 0x47, 0x72, 0x70, 0x63, 0x5c, 0x46, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f,
0x6e, 0xe2, 0x02, 0x1b, 0x47, 0x72, 0x70, 0x63, 0x5c, 0x46, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74,
0x69, 0x6f, 0x6e, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea,
0x02, 0x10, 0x47, 0x72, 0x70, 0x63, 0x3a, 0x3a, 0x46, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69,
0x6f, 0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_grpc_federation_federation_proto_rawDescOnce sync.Once
file_grpc_federation_federation_proto_rawDescData = file_grpc_federation_federation_proto_rawDesc
)
func file_grpc_federation_federation_proto_rawDescGZIP() []byte {
file_grpc_federation_federation_proto_rawDescOnce.Do(func() {
file_grpc_federation_federation_proto_rawDescData = protoimpl.X.CompressGZIP(file_grpc_federation_federation_proto_rawDescData)
})
return file_grpc_federation_federation_proto_rawDescData
}
var file_grpc_federation_federation_proto_enumTypes = make([]protoimpl.EnumInfo, 2)
var file_grpc_federation_federation_proto_msgTypes = make([]protoimpl.MessageInfo, 48)
var file_grpc_federation_federation_proto_goTypes = []interface{}{
(TypeKind)(0), // 0: grpc.federation.TypeKind
(GRPCError_LogLevel)(0), // 1: grpc.federation.GRPCError.LogLevel
(*FileRule)(nil), // 2: grpc.federation.FileRule
(*EnumRule)(nil), // 3: grpc.federation.EnumRule
(*EnumValueRule)(nil), // 4: grpc.federation.EnumValueRule
(*EnumValueAttribute)(nil), // 5: grpc.federation.EnumValueAttribute
(*OneofRule)(nil), // 6: grpc.federation.OneofRule
(*ServiceRule)(nil), // 7: grpc.federation.ServiceRule
(*Env)(nil), // 8: grpc.federation.Env
(*ServiceVariable)(nil), // 9: grpc.federation.ServiceVariable
(*ServiceVariableValidationExpr)(nil), // 10: grpc.federation.ServiceVariableValidationExpr
(*EnvVar)(nil), // 11: grpc.federation.EnvVar
(*EnvType)(nil), // 12: grpc.federation.EnvType
(*EnvMapType)(nil), // 13: grpc.federation.EnvMapType
(*EnvVarOption)(nil), // 14: grpc.federation.EnvVarOption
(*MethodRule)(nil), // 15: grpc.federation.MethodRule
(*MessageRule)(nil), // 16: grpc.federation.MessageRule
(*VariableDefinition)(nil), // 17: grpc.federation.VariableDefinition
(*MapExpr)(nil), // 18: grpc.federation.MapExpr
(*Iterator)(nil), // 19: grpc.federation.Iterator
(*MessageExpr)(nil), // 20: grpc.federation.MessageExpr
(*EnumExpr)(nil), // 21: grpc.federation.EnumExpr
(*CallExpr)(nil), // 22: grpc.federation.CallExpr
(*SwitchExpr)(nil), // 23: grpc.federation.SwitchExpr
(*SwitchCaseExpr)(nil), // 24: grpc.federation.SwitchCaseExpr
(*SwitchDefaultExpr)(nil), // 25: grpc.federation.SwitchDefaultExpr
(*GRPCError)(nil), // 26: grpc.federation.GRPCError
(*GRPCErrorDetail)(nil), // 27: grpc.federation.GRPCErrorDetail
(*GRPCCallOption)(nil), // 28: grpc.federation.GRPCCallOption
(*ValidationExpr)(nil), // 29: grpc.federation.ValidationExpr
(*RetryPolicy)(nil), // 30: grpc.federation.RetryPolicy
(*RetryPolicyConstant)(nil), // 31: grpc.federation.RetryPolicyConstant
(*RetryPolicyExponential)(nil), // 32: grpc.federation.RetryPolicyExponential
(*MethodRequest)(nil), // 33: grpc.federation.MethodRequest
(*MethodResponse)(nil), // 34: grpc.federation.MethodResponse
(*Argument)(nil), // 35: grpc.federation.Argument
(*FieldRule)(nil), // 36: grpc.federation.FieldRule
(*FieldOneof)(nil), // 37: grpc.federation.FieldOneof
(*CELPlugin)(nil), // 38: grpc.federation.CELPlugin
(*CELPluginExport)(nil), // 39: grpc.federation.CELPluginExport
(*CELPluginCapability)(nil), // 40: grpc.federation.CELPluginCapability
(*CELPluginEnvCapability)(nil), // 41: grpc.federation.CELPluginEnvCapability
(*CELPluginFileSystemCapability)(nil), // 42: grpc.federation.CELPluginFileSystemCapability
(*CELPluginNetworkCapability)(nil), // 43: grpc.federation.CELPluginNetworkCapability
(*CELFunction)(nil), // 44: grpc.federation.CELFunction
(*CELReceiverType)(nil), // 45: grpc.federation.CELReceiverType
(*CELFunctionArgument)(nil), // 46: grpc.federation.CELFunctionArgument
(*CELType)(nil), // 47: grpc.federation.CELType
(*CELMapType)(nil), // 48: grpc.federation.CELMapType
(*CELVariable)(nil), // 49: grpc.federation.CELVariable
(code.Code)(0), // 50: google.rpc.Code
(*errdetails.ErrorInfo)(nil), // 51: google.rpc.ErrorInfo
(*errdetails.RetryInfo)(nil), // 52: google.rpc.RetryInfo
(*errdetails.DebugInfo)(nil), // 53: google.rpc.DebugInfo
(*errdetails.QuotaFailure)(nil), // 54: google.rpc.QuotaFailure
(*errdetails.PreconditionFailure)(nil), // 55: google.rpc.PreconditionFailure
(*errdetails.BadRequest)(nil), // 56: google.rpc.BadRequest
(*errdetails.RequestInfo)(nil), // 57: google.rpc.RequestInfo
(*errdetails.ResourceInfo)(nil), // 58: google.rpc.ResourceInfo
(*errdetails.Help)(nil), // 59: google.rpc.Help
(*errdetails.LocalizedMessage)(nil), // 60: google.rpc.LocalizedMessage
(*descriptorpb.FileOptions)(nil), // 61: google.protobuf.FileOptions
(*descriptorpb.ServiceOptions)(nil), // 62: google.protobuf.ServiceOptions
(*descriptorpb.MethodOptions)(nil), // 63: google.protobuf.MethodOptions
(*descriptorpb.MessageOptions)(nil), // 64: google.protobuf.MessageOptions
(*descriptorpb.FieldOptions)(nil), // 65: google.protobuf.FieldOptions
(*descriptorpb.EnumOptions)(nil), // 66: google.protobuf.EnumOptions
(*descriptorpb.EnumValueOptions)(nil), // 67: google.protobuf.EnumValueOptions
(*descriptorpb.OneofOptions)(nil), // 68: google.protobuf.OneofOptions
}
var file_grpc_federation_federation_proto_depIdxs = []int32{
38, // 0: grpc.federation.FileRule.plugin:type_name -> grpc.federation.CELPlugin
5, // 1: grpc.federation.EnumValueRule.attr:type_name -> grpc.federation.EnumValueAttribute
8, // 2: grpc.federation.ServiceRule.env:type_name -> grpc.federation.Env
9, // 3: grpc.federation.ServiceRule.var:type_name -> grpc.federation.ServiceVariable
11, // 4: grpc.federation.Env.var:type_name -> grpc.federation.EnvVar
18, // 5: grpc.federation.ServiceVariable.map:type_name -> grpc.federation.MapExpr
20, // 6: grpc.federation.ServiceVariable.message:type_name -> grpc.federation.MessageExpr
10, // 7: grpc.federation.ServiceVariable.validation:type_name -> grpc.federation.ServiceVariableValidationExpr
21, // 8: grpc.federation.ServiceVariable.enum:type_name -> grpc.federation.EnumExpr
23, // 9: grpc.federation.ServiceVariable.switch:type_name -> grpc.federation.SwitchExpr
12, // 10: grpc.federation.EnvVar.type:type_name -> grpc.federation.EnvType
14, // 11: grpc.federation.EnvVar.option:type_name -> grpc.federation.EnvVarOption
0, // 12: grpc.federation.EnvType.kind:type_name -> grpc.federation.TypeKind
12, // 13: grpc.federation.EnvType.repeated:type_name -> grpc.federation.EnvType
13, // 14: grpc.federation.EnvType.map:type_name -> grpc.federation.EnvMapType
12, // 15: grpc.federation.EnvMapType.key:type_name -> grpc.federation.EnvType
12, // 16: grpc.federation.EnvMapType.value:type_name -> grpc.federation.EnvType
17, // 17: grpc.federation.MessageRule.def:type_name -> grpc.federation.VariableDefinition
18, // 18: grpc.federation.VariableDefinition.map:type_name -> grpc.federation.MapExpr
20, // 19: grpc.federation.VariableDefinition.message:type_name -> grpc.federation.MessageExpr
22, // 20: grpc.federation.VariableDefinition.call:type_name -> grpc.federation.CallExpr
29, // 21: grpc.federation.VariableDefinition.validation:type_name -> grpc.federation.ValidationExpr
21, // 22: grpc.federation.VariableDefinition.enum:type_name -> grpc.federation.EnumExpr
23, // 23: grpc.federation.VariableDefinition.switch:type_name -> grpc.federation.SwitchExpr
19, // 24: grpc.federation.MapExpr.iterator:type_name -> grpc.federation.Iterator
20, // 25: grpc.federation.MapExpr.message:type_name -> grpc.federation.MessageExpr
21, // 26: grpc.federation.MapExpr.enum:type_name -> grpc.federation.EnumExpr
35, // 27: grpc.federation.MessageExpr.args:type_name -> grpc.federation.Argument
33, // 28: grpc.federation.CallExpr.request:type_name -> grpc.federation.MethodRequest
30, // 29: grpc.federation.CallExpr.retry:type_name -> grpc.federation.RetryPolicy
26, // 30: grpc.federation.CallExpr.error:type_name -> grpc.federation.GRPCError
28, // 31: grpc.federation.CallExpr.option:type_name -> grpc.federation.GRPCCallOption
24, // 32: grpc.federation.SwitchExpr.case:type_name -> grpc.federation.SwitchCaseExpr
25, // 33: grpc.federation.SwitchExpr.default:type_name -> grpc.federation.SwitchDefaultExpr
17, // 34: grpc.federation.SwitchCaseExpr.def:type_name -> grpc.federation.VariableDefinition
17, // 35: grpc.federation.SwitchDefaultExpr.def:type_name -> grpc.federation.VariableDefinition
17, // 36: grpc.federation.GRPCError.def:type_name -> grpc.federation.VariableDefinition
50, // 37: grpc.federation.GRPCError.code:type_name -> google.rpc.Code
27, // 38: grpc.federation.GRPCError.details:type_name -> grpc.federation.GRPCErrorDetail
1, // 39: grpc.federation.GRPCError.log_level:type_name -> grpc.federation.GRPCError.LogLevel
17, // 40: grpc.federation.GRPCErrorDetail.def:type_name -> grpc.federation.VariableDefinition
20, // 41: grpc.federation.GRPCErrorDetail.message:type_name -> grpc.federation.MessageExpr
51, // 42: grpc.federation.GRPCErrorDetail.error_info:type_name -> google.rpc.ErrorInfo
52, // 43: grpc.federation.GRPCErrorDetail.retry_info:type_name -> google.rpc.RetryInfo
53, // 44: grpc.federation.GRPCErrorDetail.debug_info:type_name -> google.rpc.DebugInfo
54, // 45: grpc.federation.GRPCErrorDetail.quota_failure:type_name -> google.rpc.QuotaFailure
55, // 46: grpc.federation.GRPCErrorDetail.precondition_failure:type_name -> google.rpc.PreconditionFailure
56, // 47: grpc.federation.GRPCErrorDetail.bad_request:type_name -> google.rpc.BadRequest
57, // 48: grpc.federation.GRPCErrorDetail.request_info:type_name -> google.rpc.RequestInfo
58, // 49: grpc.federation.GRPCErrorDetail.resource_info:type_name -> google.rpc.ResourceInfo
59, // 50: grpc.federation.GRPCErrorDetail.help:type_name -> google.rpc.Help
60, // 51: grpc.federation.GRPCErrorDetail.localized_message:type_name -> google.rpc.LocalizedMessage
26, // 52: grpc.federation.ValidationExpr.error:type_name -> grpc.federation.GRPCError
31, // 53: grpc.federation.RetryPolicy.constant:type_name -> grpc.federation.RetryPolicyConstant
32, // 54: grpc.federation.RetryPolicy.exponential:type_name -> grpc.federation.RetryPolicyExponential
37, // 55: grpc.federation.FieldRule.oneof:type_name -> grpc.federation.FieldOneof
14, // 56: grpc.federation.FieldRule.env:type_name -> grpc.federation.EnvVarOption
17, // 57: grpc.federation.FieldOneof.def:type_name -> grpc.federation.VariableDefinition
39, // 58: grpc.federation.CELPlugin.export:type_name -> grpc.federation.CELPluginExport
45, // 59: grpc.federation.CELPluginExport.types:type_name -> grpc.federation.CELReceiverType
44, // 60: grpc.federation.CELPluginExport.functions:type_name -> grpc.federation.CELFunction
49, // 61: grpc.federation.CELPluginExport.variables:type_name -> grpc.federation.CELVariable
40, // 62: grpc.federation.CELPluginExport.capability:type_name -> grpc.federation.CELPluginCapability
41, // 63: grpc.federation.CELPluginCapability.env:type_name -> grpc.federation.CELPluginEnvCapability
42, // 64: grpc.federation.CELPluginCapability.file_system:type_name -> grpc.federation.CELPluginFileSystemCapability
43, // 65: grpc.federation.CELPluginCapability.network:type_name -> grpc.federation.CELPluginNetworkCapability
46, // 66: grpc.federation.CELFunction.args:type_name -> grpc.federation.CELFunctionArgument
47, // 67: grpc.federation.CELFunction.return:type_name -> grpc.federation.CELType
44, // 68: grpc.federation.CELReceiverType.methods:type_name -> grpc.federation.CELFunction
47, // 69: grpc.federation.CELFunctionArgument.type:type_name -> grpc.federation.CELType
0, // 70: grpc.federation.CELType.kind:type_name -> grpc.federation.TypeKind
47, // 71: grpc.federation.CELType.repeated:type_name -> grpc.federation.CELType
48, // 72: grpc.federation.CELType.map:type_name -> grpc.federation.CELMapType
47, // 73: grpc.federation.CELMapType.key:type_name -> grpc.federation.CELType
47, // 74: grpc.federation.CELMapType.value:type_name -> grpc.federation.CELType
47, // 75: grpc.federation.CELVariable.type:type_name -> grpc.federation.CELType
61, // 76: grpc.federation.file:extendee -> google.protobuf.FileOptions
62, // 77: grpc.federation.service:extendee -> google.protobuf.ServiceOptions
63, // 78: grpc.federation.method:extendee -> google.protobuf.MethodOptions
64, // 79: grpc.federation.message:extendee -> google.protobuf.MessageOptions
65, // 80: grpc.federation.field:extendee -> google.protobuf.FieldOptions
66, // 81: grpc.federation.enum:extendee -> google.protobuf.EnumOptions
67, // 82: grpc.federation.enum_value:extendee -> google.protobuf.EnumValueOptions
68, // 83: grpc.federation.oneof:extendee -> google.protobuf.OneofOptions
2, // 84: grpc.federation.file:type_name -> grpc.federation.FileRule
7, // 85: grpc.federation.service:type_name -> grpc.federation.ServiceRule
15, // 86: grpc.federation.method:type_name -> grpc.federation.MethodRule
16, // 87: grpc.federation.message:type_name -> grpc.federation.MessageRule
36, // 88: grpc.federation.field:type_name -> grpc.federation.FieldRule
3, // 89: grpc.federation.enum:type_name -> grpc.federation.EnumRule
4, // 90: grpc.federation.enum_value:type_name -> grpc.federation.EnumValueRule
6, // 91: grpc.federation.oneof:type_name -> grpc.federation.OneofRule
92, // [92:92] is the sub-list for method output_type
92, // [92:92] is the sub-list for method input_type
84, // [84:92] is the sub-list for extension type_name
76, // [76:84] is the sub-list for extension extendee
0, // [0:76] is the sub-list for field type_name
}
func init() { file_grpc_federation_federation_proto_init() }
func file_grpc_federation_federation_proto_init() {
if File_grpc_federation_federation_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_grpc_federation_federation_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*FileRule); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*EnumRule); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*EnumValueRule); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*EnumValueAttribute); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*OneofRule); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ServiceRule); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Env); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ServiceVariable); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ServiceVariableValidationExpr); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*EnvVar); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*EnvType); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*EnvMapType); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*EnvVarOption); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*MethodRule); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*MessageRule); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*VariableDefinition); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*MapExpr); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Iterator); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*MessageExpr); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*EnumExpr); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CallExpr); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*SwitchExpr); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*SwitchCaseExpr); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*SwitchDefaultExpr); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GRPCError); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GRPCErrorDetail); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GRPCCallOption); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ValidationExpr); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[28].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*RetryPolicy); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[29].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*RetryPolicyConstant); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[30].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*RetryPolicyExponential); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[31].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*MethodRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[32].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*MethodResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[33].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Argument); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[34].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*FieldRule); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[35].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*FieldOneof); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[36].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CELPlugin); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[37].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CELPluginExport); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[38].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CELPluginCapability); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[39].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CELPluginEnvCapability); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[40].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CELPluginFileSystemCapability); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[41].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CELPluginNetworkCapability); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[42].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CELFunction); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[43].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CELReceiverType); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[44].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CELFunctionArgument); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[45].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CELType); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[46].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CELMapType); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[47].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CELVariable); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
file_grpc_federation_federation_proto_msgTypes[2].OneofWrappers = []interface{}{}
file_grpc_federation_federation_proto_msgTypes[7].OneofWrappers = []interface{}{
(*ServiceVariable_By)(nil),
(*ServiceVariable_Map)(nil),
(*ServiceVariable_Message)(nil),
(*ServiceVariable_Validation)(nil),
(*ServiceVariable_Enum)(nil),
(*ServiceVariable_Switch)(nil),
}
file_grpc_federation_federation_proto_msgTypes[9].OneofWrappers = []interface{}{}
file_grpc_federation_federation_proto_msgTypes[10].OneofWrappers = []interface{}{
(*EnvType_Kind)(nil),
(*EnvType_Repeated)(nil),
(*EnvType_Map)(nil),
}
file_grpc_federation_federation_proto_msgTypes[12].OneofWrappers = []interface{}{}
file_grpc_federation_federation_proto_msgTypes[13].OneofWrappers = []interface{}{}
file_grpc_federation_federation_proto_msgTypes[14].OneofWrappers = []interface{}{}
file_grpc_federation_federation_proto_msgTypes[15].OneofWrappers = []interface{}{
(*VariableDefinition_By)(nil),
(*VariableDefinition_Map)(nil),
(*VariableDefinition_Message)(nil),
(*VariableDefinition_Call)(nil),
(*VariableDefinition_Validation)(nil),
(*VariableDefinition_Enum)(nil),
(*VariableDefinition_Switch)(nil),
}
file_grpc_federation_federation_proto_msgTypes[16].OneofWrappers = []interface{}{
(*MapExpr_By)(nil),
(*MapExpr_Message)(nil),
(*MapExpr_Enum)(nil),
}
file_grpc_federation_federation_proto_msgTypes[20].OneofWrappers = []interface{}{}
file_grpc_federation_federation_proto_msgTypes[22].OneofWrappers = []interface{}{
(*SwitchCaseExpr_By)(nil),
}
file_grpc_federation_federation_proto_msgTypes[23].OneofWrappers = []interface{}{
(*SwitchDefaultExpr_By)(nil),
}
file_grpc_federation_federation_proto_msgTypes[24].OneofWrappers = []interface{}{}
file_grpc_federation_federation_proto_msgTypes[26].OneofWrappers = []interface{}{}
file_grpc_federation_federation_proto_msgTypes[27].OneofWrappers = []interface{}{}
file_grpc_federation_federation_proto_msgTypes[28].OneofWrappers = []interface{}{
(*RetryPolicy_Constant)(nil),
(*RetryPolicy_Exponential)(nil),
}
file_grpc_federation_federation_proto_msgTypes[29].OneofWrappers = []interface{}{}
file_grpc_federation_federation_proto_msgTypes[30].OneofWrappers = []interface{}{}
file_grpc_federation_federation_proto_msgTypes[31].OneofWrappers = []interface{}{}
file_grpc_federation_federation_proto_msgTypes[32].OneofWrappers = []interface{}{}
file_grpc_federation_federation_proto_msgTypes[33].OneofWrappers = []interface{}{}
file_grpc_federation_federation_proto_msgTypes[34].OneofWrappers = []interface{}{}
file_grpc_federation_federation_proto_msgTypes[35].OneofWrappers = []interface{}{
(*FieldOneof_If)(nil),
(*FieldOneof_Default)(nil),
}
file_grpc_federation_federation_proto_msgTypes[38].OneofWrappers = []interface{}{}
file_grpc_federation_federation_proto_msgTypes[45].OneofWrappers = []interface{}{
(*CELType_Kind)(nil),
(*CELType_Repeated)(nil),
(*CELType_Map)(nil),
(*CELType_Message)(nil),
(*CELType_Enum)(nil),
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_grpc_federation_federation_proto_rawDesc,
NumEnums: 2,
NumMessages: 48,
NumExtensions: 8,
NumServices: 0,
},
GoTypes: file_grpc_federation_federation_proto_goTypes,
DependencyIndexes: file_grpc_federation_federation_proto_depIdxs,
EnumInfos: file_grpc_federation_federation_proto_enumTypes,
MessageInfos: file_grpc_federation_federation_proto_msgTypes,
ExtensionInfos: file_grpc_federation_federation_proto_extTypes,
}.Build()
File_grpc_federation_federation_proto = out.File
file_grpc_federation_federation_proto_rawDesc = nil
file_grpc_federation_federation_proto_goTypes = nil
file_grpc_federation_federation_proto_depIdxs = nil
}
================================================
FILE: _examples/05_async/main_test.go
================================================
package main_test
import (
"context"
"log/slog"
"net"
"os"
"testing"
"github.com/google/go-cmp/cmp"
"github.com/google/go-cmp/cmp/cmpopts"
"go.opentelemetry.io/otel"
"go.opentelemetry.io/otel/attribute"
"go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc"
"go.opentelemetry.io/otel/propagation"
"go.opentelemetry.io/otel/sdk/resource"
sdktrace "go.opentelemetry.io/otel/sdk/trace"
semconv "go.opentelemetry.io/otel/semconv/v1.4.0"
"go.uber.org/goleak"
"google.golang.org/grpc"
"google.golang.org/grpc/test/bufconn"
"example/federation"
)
const bufSize = 1024
var (
listener *bufconn.Listener
)
func dialer(ctx context.Context, address string) (net.Conn, error) {
return listener.Dial()
}
func TestFederation(t *testing.T) {
defer goleak.VerifyNone(t)
ctx := context.Background()
listener = bufconn.Listen(bufSize)
if os.Getenv("ENABLE_JAEGER") != "" {
exporter, err := otlptracegrpc.New(ctx, otlptracegrpc.WithInsecure())
if err != nil {
t.Fatal(err)
}
tp := sdktrace.NewTracerProvider(
sdktrace.WithBatcher(exporter),
sdktrace.WithResource(
resource.NewWithAttributes(
semconv.SchemaURL,
semconv.ServiceNameKey.String("example05/async"),
semconv.ServiceVersionKey.String("1.0.0"),
attribute.String("environment", "dev"),
),
),
sdktrace.WithSampler(sdktrace.AlwaysSample()),
)
defer tp.Shutdown(ctx)
otel.SetTextMapPropagator(propagation.TraceContext{})
otel.SetTracerProvider(tp)
}
conn, err := grpc.DialContext(ctx, "", grpc.WithContextDialer(dialer), grpc.WithInsecure())
if err != nil {
t.Fatal(err)
}
defer conn.Close()
grpcServer := grpc.NewServer()
defer grpcServer.Stop()
logger := slog.New(slog.NewJSONHandler(os.Stdout, &slog.HandlerOptions{
Level: slog.LevelDebug,
}))
federationServer, err := federation.NewFederationService(federation.FederationServiceConfig{
Logger: logger,
})
if err != nil {
t.Fatal(err)
}
defer federation.CleanupFederationService(ctx, federationServer)
federation.RegisterFederationServiceServer(grpcServer, federationServer)
go func() {
if err := grpcServer.Serve(listener); err != nil {
t.Fatal(err)
}
}()
client := federation.NewFederationServiceClient(conn)
res, err := client.Get(ctx, &federation.GetRequest{})
if err != nil {
t.Fatal(err)
}
if diff := cmp.Diff(res, &federation.GetResponse{
Hname: "h",
Jname: "j",
}, cmpopts.IgnoreUnexported(federation.GetResponse{})); diff != "" {
t.Errorf("(-got, +want)\n%s", diff)
}
}
================================================
FILE: _examples/05_async/proto/buf.yaml
================================================
version: v1
breaking:
use:
- FILE
lint:
use:
- DEFAULT
================================================
FILE: _examples/05_async/proto/federation/federation.proto
================================================
syntax = "proto3";
package org.federation;
import "grpc/federation/federation.proto";
option go_package = "example/federation;federation";
service FederationService {
option (grpc.federation.service) = {};
rpc Get(GetRequest) returns (GetResponse) {};
}
message GetRequest {}
message GetResponse {
option (grpc.federation.message) = {
def [
{ name: "a", message { name: "A" } },
{ name: "b", message { name: "B" } },
{ name: "c", message { name: "C", args { name: "a", by: "a.name" } } },
{ name: "d", message { name: "D", args { name: "b", by: "b.name" } } },
{ name: "e", message { name: "E", args: [ { name: "c", by: "c.name" }, { name: "d", by: "d.name" } ] } },
{ name: "f", message { name: "F", args: [ { name: "c", by: "c.name" }, { name: "d", by: "d.name" } ] } },
{ name: "g", message { name: "G" } },
{ name: "h", message { name: "H", args: [ { name: "e", by: "e.name" }, { name: "f", by: "f.name" }, { name: "g", by: "g.name"} ] } },
{ name: "i", message { name: "I" } },
{ name: "j", message { name: "J", args { name: "i", by: "i.name" } } }
]
};
string hname = 1 [(grpc.federation.field).by = "h.name"];
string jname = 2 [(grpc.federation.field).by = "j.name"];
}
message A {
option (grpc.federation.message) = {
def [
{ name: "aa", message { name: "AA" } },
{ name: "ab", message { name: "AB" } }
]
};
string name = 1 [(grpc.federation.field).by = "'a'"];
}
message AA {
string name = 1 [(grpc.federation.field).by = "'aa'"];
}
message AB {
string name = 1 [(grpc.federation.field).by = "'ab'"];
}
message B {
string name = 1 [(grpc.federation.field).by = "'b'"];
}
message C {
string name = 1 [(grpc.federation.field).by = "'c'"];
}
message D {
string name = 1 [(grpc.federation.field).by = "'d'"];
}
message E {
string name = 1 [(grpc.federation.field).by = "'e'"];
}
message F {
string name = 1 [(grpc.federation.field).by = "'f'"];
}
message G {
string name = 1 [(grpc.federation.field).by = "'g'"];
}
message H {
string name = 1 [(grpc.federation.field).by = "'h'"];
}
message I {
string name = 1 [(grpc.federation.field).by = "'i'"];
}
message J {
string name = 1 [(grpc.federation.field).by = "'j'"];
}
================================================
FILE: _examples/06_alias/.gitignore
================================================
grpc/federation
================================================
FILE: _examples/06_alias/Makefile
================================================
MAKEFILE_DIR := $(dir $(lastword $(MAKEFILE_LIST)))
GOBIN := $(MAKEFILE_DIR)/../../bin
PATH := $(GOBIN):$(PATH)
JAEGER_IMAGE := jaegertracing/all-in-one:latest
.PHONY: generate
generate:
$(GOBIN)/buf generate
.PHONY: lint
lint:
@$(GOBIN)/grpc-federation-linter -Iproto -Iproto_deps ./proto/federation/federation.proto
.PHONY: test
test:
go test -race ./ -count=1
.PHONY: grpc-federation/generate
grpc-federation/generate:
@$(GOBIN)/grpc-federation-generator ./proto/federation/federation.proto
.PHONY: grpc-federation/watch
grpc-federation/watch:
@$(GOBIN)/grpc-federation-generator -w
.PHONY: jaeger/start
jaeger/start:
@docker run \
-e COLLECTOR_OTLP_ENABLED=true \
-p 16686:16686 \
-p 4317:4317 \
-p 4318:4318 \
-d \
$(JAEGER_IMAGE)
.PHONY: jaeger/stop
jaeger/stop:
@docker stop $(shell docker ps -q --filter ancestor=$(JAEGER_IMAGE))
================================================
FILE: _examples/06_alias/buf.gen.yaml
================================================
version: v1
managed:
enabled: true
plugins:
- plugin: go
out: .
opt: paths=source_relative
- plugin: go-grpc
out: .
opt: paths=source_relative
- plugin: grpc-federation
out: .
opt:
- paths=source_relative
- import_paths=proto
================================================
FILE: _examples/06_alias/buf.work.yaml
================================================
version: v1
directories:
- proto
- proto_deps
================================================
FILE: _examples/06_alias/federation/federation.pb.go
================================================
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.33.0
// protoc (unknown)
// source: federation/federation.proto
package federation
import (
post "example/post"
_ "github.com/mercari/grpc-federation/grpc/federation"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
type PostType int32
const (
PostType_POST_TYPE_UNKNOWN PostType = 0
PostType_POST_TYPE_FOO PostType = 1
PostType_POST_TYPE_BAR PostType = 2
PostType_POST_TYPE_BAZ PostType = 3
)
// Enum value maps for PostType.
var (
PostType_name = map[int32]string{
0: "POST_TYPE_UNKNOWN",
1: "POST_TYPE_FOO",
2: "POST_TYPE_BAR",
3: "POST_TYPE_BAZ",
}
PostType_value = map[string]int32{
"POST_TYPE_UNKNOWN": 0,
"POST_TYPE_FOO": 1,
"POST_TYPE_BAR": 2,
"POST_TYPE_BAZ": 3,
}
)
func (x PostType) Enum() *PostType {
p := new(PostType)
*p = x
return p
}
func (x PostType) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (PostType) Descriptor() protoreflect.EnumDescriptor {
return file_federation_federation_proto_enumTypes[0].Descriptor()
}
func (PostType) Type() protoreflect.EnumType {
return &file_federation_federation_proto_enumTypes[0]
}
func (x PostType) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use PostType.Descriptor instead.
func (PostType) EnumDescriptor() ([]byte, []int) {
return file_federation_federation_proto_rawDescGZIP(), []int{0}
}
type PostContent_Category int32
const (
PostContent_CATEGORY_A PostContent_Category = 0
PostContent_CATEGORY_B PostContent_Category = 1
PostContent_CATEGORY_C PostContent_Category = 2
)
// Enum value maps for PostContent_Category.
var (
PostContent_Category_name = map[int32]string{
0: "CATEGORY_A",
1: "CATEGORY_B",
2: "CATEGORY_C",
}
PostContent_Category_value = map[string]int32{
"CATEGORY_A": 0,
"CATEGORY_B": 1,
"CATEGORY_C": 2,
}
)
func (x PostContent_Category) Enum() *PostContent_Category {
p := new(PostContent_Category)
*p = x
return p
}
func (x PostContent_Category) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (PostContent_Category) Descriptor() protoreflect.EnumDescriptor {
return file_federation_federation_proto_enumTypes[1].Descriptor()
}
func (PostContent_Category) Type() protoreflect.EnumType {
return &file_federation_federation_proto_enumTypes[1]
}
func (x PostContent_Category) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use PostContent_Category.Descriptor instead.
func (PostContent_Category) EnumDescriptor() ([]byte, []int) {
return file_federation_federation_proto_rawDescGZIP(), []int{4, 0}
}
type GetPostRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
// Types that are assignable to Condition:
//
// *GetPostRequest_A
// *GetPostRequest_ConditionB_
Condition isGetPostRequest_Condition `protobuf_oneof:"condition"`
}
func (x *GetPostRequest) Reset() {
*x = GetPostRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_federation_federation_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GetPostRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetPostRequest) ProtoMessage() {}
func (x *GetPostRequest) ProtoReflect() protoreflect.Message {
mi := &file_federation_federation_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GetPostRequest.ProtoReflect.Descriptor instead.
func (*GetPostRequest) Descriptor() ([]byte, []int) {
return file_federation_federation_proto_rawDescGZIP(), []int{0}
}
func (x *GetPostRequest) GetId() string {
if x != nil {
return x.Id
}
return ""
}
func (m *GetPostRequest) GetCondition() isGetPostRequest_Condition {
if m != nil {
return m.Condition
}
return nil
}
func (x *GetPostRequest) GetA() *GetPostRequest_ConditionA {
if x, ok := x.GetCondition().(*GetPostRequest_A); ok {
return x.A
}
return nil
}
func (x *GetPostRequest) GetConditionB() *GetPostRequest_ConditionB {
if x, ok := x.GetCondition().(*GetPostRequest_ConditionB_); ok {
return x.ConditionB
}
return nil
}
type isGetPostRequest_Condition interface {
isGetPostRequest_Condition()
}
type GetPostRequest_A struct {
A *GetPostRequest_ConditionA `protobuf:"bytes,2,opt,name=a,proto3,oneof"`
}
type GetPostRequest_ConditionB_ struct {
ConditionB *GetPostRequest_ConditionB `protobuf:"bytes,3,opt,name=condition_b,json=conditionB,proto3,oneof"`
}
func (*GetPostRequest_A) isGetPostRequest_Condition() {}
func (*GetPostRequest_ConditionB_) isGetPostRequest_Condition() {}
type GetPostResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Post *Post `protobuf:"bytes,1,opt,name=post,proto3" json:"post,omitempty"`
}
func (x *GetPostResponse) Reset() {
*x = GetPostResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_federation_federation_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GetPostResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetPostResponse) ProtoMessage() {}
func (x *GetPostResponse) ProtoReflect() protoreflect.Message {
mi := &file_federation_federation_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GetPostResponse.ProtoReflect.Descriptor instead.
func (*GetPostResponse) Descriptor() ([]byte, []int) {
return file_federation_federation_proto_rawDescGZIP(), []int{1}
}
func (x *GetPostResponse) GetPost() *Post {
if x != nil {
return x.Post
}
return nil
}
type Post struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
Data *PostData `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"`
Data2 *PostData `protobuf:"bytes,3,opt,name=data2,proto3" json:"data2,omitempty"`
Type PostType `protobuf:"varint,4,opt,name=type,proto3,enum=org.federation.PostType" json:"type,omitempty"`
Type2 PostType `protobuf:"varint,5,opt,name=type2,proto3,enum=org.federation.PostType" json:"type2,omitempty"`
Type3 PostType `protobuf:"varint,6,opt,name=type3,proto3,enum=org.federation.PostType" json:"type3,omitempty"`
Type4 PostType `protobuf:"varint,7,opt,name=type4,proto3,enum=org.federation.PostType" json:"type4,omitempty"`
M *post.M `protobuf:"bytes,8,opt,name=m,proto3" json:"m,omitempty"`
}
func (x *Post) Reset() {
*x = Post{}
if protoimpl.UnsafeEnabled {
mi := &file_federation_federation_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Post) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Post) ProtoMessage() {}
func (x *Post) ProtoReflect() protoreflect.Message {
mi := &file_federation_federation_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Post.ProtoReflect.Descriptor instead.
func (*Post) Descriptor() ([]byte, []int) {
return file_federation_federation_proto_rawDescGZIP(), []int{2}
}
func (x *Post) GetId() string {
if x != nil {
return x.Id
}
return ""
}
func (x *Post) GetData() *PostData {
if x != nil {
return x.Data
}
return nil
}
func (x *Post) GetData2() *PostData {
if x != nil {
return x.Data2
}
return nil
}
func (x *Post) GetType() PostType {
if x != nil {
return x.Type
}
return PostType_POST_TYPE_UNKNOWN
}
func (x *Post) GetType2() PostType {
if x != nil {
return x.Type2
}
return PostType_POST_TYPE_UNKNOWN
}
func (x *Post) GetType3() PostType {
if x != nil {
return x.Type3
}
return PostType_POST_TYPE_UNKNOWN
}
func (x *Post) GetType4() PostType {
if x != nil {
return x.Type4
}
return PostType_POST_TYPE_UNKNOWN
}
func (x *Post) GetM() *post.M {
if x != nil {
return x.M
}
return nil
}
type PostData struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Type PostType `protobuf:"varint,1,opt,name=type,proto3,enum=org.federation.PostType" json:"type,omitempty"`
Title string `protobuf:"bytes,2,opt,name=title,proto3" json:"title,omitempty"`
Content *PostContent `protobuf:"bytes,3,opt,name=content,proto3" json:"content,omitempty"`
}
func (x *PostData) Reset() {
*x = PostData{}
if protoimpl.UnsafeEnabled {
mi := &file_federation_federation_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *PostData) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*PostData) ProtoMessage() {}
func (x *PostData) ProtoReflect() protoreflect.Message {
mi := &file_federation_federation_proto_msgTypes[3]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use PostData.ProtoReflect.Descriptor instead.
func (*PostData) Descriptor() ([]byte, []int) {
return file_federation_federation_proto_rawDescGZIP(), []int{3}
}
func (x *PostData) GetType() PostType {
if x != nil {
return x.Type
}
return PostType_POST_TYPE_UNKNOWN
}
func (x *PostData) GetTitle() string {
if x != nil {
return x.Title
}
return ""
}
func (x *PostData) GetContent() *PostContent {
if x != nil {
return x.Content
}
return nil
}
type PostContent struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Category PostContent_Category `protobuf:"varint,1,opt,name=category,proto3,enum=org.federation.PostContent_Category" json:"category,omitempty"`
Head string `protobuf:"bytes,2,opt,name=head,proto3" json:"head,omitempty"`
Body string `protobuf:"bytes,3,opt,name=body,proto3" json:"body,omitempty"`
DupBody string `protobuf:"bytes,4,opt,name=dup_body,json=dupBody,proto3" json:"dup_body,omitempty"`
Counts map[int32]int32 `protobuf:"bytes,5,rep,name=counts,proto3" json:"counts,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"`
}
func (x *PostContent) Reset() {
*x = PostContent{}
if protoimpl.UnsafeEnabled {
mi := &file_federation_federation_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *PostContent) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*PostContent) ProtoMessage() {}
func (x *PostContent) ProtoReflect() protoreflect.Message {
mi := &file_federation_federation_proto_msgTypes[4]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use PostContent.ProtoReflect.Descriptor instead.
func (*PostContent) Descriptor() ([]byte, []int) {
return file_federation_federation_proto_rawDescGZIP(), []int{4}
}
func (x *PostContent) GetCategory() PostContent_Category {
if x != nil {
return x.Category
}
return PostContent_CATEGORY_A
}
func (x *PostContent) GetHead() string {
if x != nil {
return x.Head
}
return ""
}
func (x *PostContent) GetBody() string {
if x != nil {
return x.Body
}
return ""
}
func (x *PostContent) GetDupBody() string {
if x != nil {
return x.DupBody
}
return ""
}
func (x *PostContent) GetCounts() map[int32]int32 {
if x != nil {
return x.Counts
}
return nil
}
type M struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
X string `protobuf:"bytes,1,opt,name=x,proto3" json:"x,omitempty"`
}
func (x *M) Reset() {
*x = M{}
if protoimpl.UnsafeEnabled {
mi := &file_federation_federation_proto_msgTypes[5]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *M) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*M) ProtoMessage() {}
func (x *M) ProtoReflect() protoreflect.Message {
mi := &file_federation_federation_proto_msgTypes[5]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use M.ProtoReflect.Descriptor instead.
func (*M) Descriptor() ([]byte, []int) {
return file_federation_federation_proto_rawDescGZIP(), []int{5}
}
func (x *M) GetX() string {
if x != nil {
return x.X
}
return ""
}
type GetPostRequest_ConditionA struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Prop string `protobuf:"bytes,1,opt,name=prop,proto3" json:"prop,omitempty"`
}
func (x *GetPostRequest_ConditionA) Reset() {
*x = GetPostRequest_ConditionA{}
if protoimpl.UnsafeEnabled {
mi := &file_federation_federation_proto_msgTypes[6]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GetPostRequest_ConditionA) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetPostRequest_ConditionA) ProtoMessage() {}
func (x *GetPostRequest_ConditionA) ProtoReflect() protoreflect.Message {
mi := &file_federation_federation_proto_msgTypes[6]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GetPostRequest_ConditionA.ProtoReflect.Descriptor instead.
func (*GetPostRequest_ConditionA) Descriptor() ([]byte, []int) {
return file_federation_federation_proto_rawDescGZIP(), []int{0, 0}
}
func (x *GetPostRequest_ConditionA) GetProp() string {
if x != nil {
return x.Prop
}
return ""
}
type GetPostRequest_ConditionB struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
}
func (x *GetPostRequest_ConditionB) Reset() {
*x = GetPostRequest_ConditionB{}
if protoimpl.UnsafeEnabled {
mi := &file_federation_federation_proto_msgTypes[7]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GetPostRequest_ConditionB) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetPostRequest_ConditionB) ProtoMessage() {}
func (x *GetPostRequest_ConditionB) ProtoReflect() protoreflect.Message {
mi := &file_federation_federation_proto_msgTypes[7]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GetPostRequest_ConditionB.ProtoReflect.Descriptor instead.
func (*GetPostRequest_ConditionB) Descriptor() ([]byte, []int) {
return file_federation_federation_proto_rawDescGZIP(), []int{0, 1}
}
var File_federation_federation_proto protoreflect.FileDescriptor
var file_federation_federation_proto_rawDesc = []byte{
0x0a, 0x1b, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x66, 0x65, 0x64,
0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0e, 0x6f,
0x72, 0x67, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x20, 0x67,
0x72, 0x70, 0x63, 0x2f, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x66,
0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a,
0x0f, 0x70, 0x6f, 0x73, 0x74, 0x2f, 0x70, 0x6f, 0x73, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
0x22, 0xa2, 0x02, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x50, 0x6f, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75,
0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
0x02, 0x69, 0x64, 0x12, 0x39, 0x0a, 0x01, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29,
0x2e, 0x6f, 0x72, 0x67, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e,
0x47, 0x65, 0x74, 0x50, 0x6f, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x43,
0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x48, 0x00, 0x52, 0x01, 0x61, 0x12, 0x4c,
0x0a, 0x0b, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x62, 0x18, 0x03, 0x20,
0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x6f, 0x72, 0x67, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61,
0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x6f, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75,
0x65, 0x73, 0x74, 0x2e, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x48, 0x00,
0x52, 0x0a, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x1a, 0x3e, 0x0a, 0x0a,
0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x72,
0x6f, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x72, 0x6f, 0x70, 0x3a, 0x1c,
0x9a, 0x4a, 0x19, 0x1a, 0x17, 0x6f, 0x72, 0x67, 0x2e, 0x70, 0x6f, 0x73, 0x74, 0x2e, 0x50, 0x6f,
0x73, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x1a, 0x2a, 0x0a, 0x0a,
0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x3a, 0x1c, 0x9a, 0x4a, 0x19, 0x1a,
0x17, 0x6f, 0x72, 0x67, 0x2e, 0x70, 0x6f, 0x73, 0x74, 0x2e, 0x50, 0x6f, 0x73, 0x74, 0x43, 0x6f,
0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x42, 0x0b, 0x0a, 0x09, 0x63, 0x6f, 0x6e, 0x64,
0x69, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x85, 0x01, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x50, 0x6f, 0x73,
0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x33, 0x0a, 0x04, 0x70, 0x6f, 0x73,
0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6f, 0x72, 0x67, 0x2e, 0x66, 0x65,
0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x50, 0x6f, 0x73, 0x74, 0x42, 0x09, 0x9a,
0x4a, 0x06, 0x12, 0x04, 0x70, 0x6f, 0x73, 0x74, 0x52, 0x04, 0x70, 0x6f, 0x73, 0x74, 0x3a, 0x3d,
0x9a, 0x4a, 0x3a, 0x0a, 0x38, 0x0a, 0x04, 0x70, 0x6f, 0x73, 0x74, 0x6a, 0x30, 0x0a, 0x04, 0x50,
0x6f, 0x73, 0x74, 0x12, 0x0a, 0x0a, 0x02, 0x69, 0x64, 0x12, 0x04, 0x24, 0x2e, 0x69, 0x64, 0x12,
0x08, 0x0a, 0x01, 0x61, 0x12, 0x03, 0x24, 0x2e, 0x61, 0x12, 0x12, 0x0a, 0x01, 0x62, 0x12, 0x0d,
0x24, 0x2e, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x62, 0x22, 0x9a, 0x08,
0x0a, 0x04, 0x50, 0x6f, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01,
0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x2c, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02,
0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x6f, 0x72, 0x67, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72,
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x50, 0x6f, 0x73, 0x74, 0x44, 0x61, 0x74, 0x61, 0x52, 0x04,
0x64, 0x61, 0x74, 0x61, 0x12, 0x3a, 0x0a, 0x05, 0x64, 0x61, 0x74, 0x61, 0x32, 0x18, 0x03, 0x20,
0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x6f, 0x72, 0x67, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61,
0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x50, 0x6f, 0x73, 0x74, 0x44, 0x61, 0x74, 0x61, 0x42, 0x0a, 0x9a,
0x4a, 0x07, 0x12, 0x05, 0x64, 0x61, 0x74, 0x61, 0x32, 0x52, 0x05, 0x64, 0x61, 0x74, 0x61, 0x32,
0x12, 0x3d, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x18,
0x2e, 0x6f, 0x72, 0x67, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e,
0x50, 0x6f, 0x73, 0x74, 0x54, 0x79, 0x70, 0x65, 0x42, 0x0f, 0x9a, 0x4a, 0x0c, 0x12, 0x0a, 0x64,
0x61, 0x74, 0x61, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x32, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12,
0x3d, 0x0a, 0x05, 0x74, 0x79, 0x70, 0x65, 0x32, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x18,
0x2e, 0x6f, 0x72, 0x67, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e,
0x50, 0x6f, 0x73, 0x74, 0x54, 0x79, 0x70, 0x65, 0x42, 0x0d, 0x9a, 0x4a, 0x0a, 0x12, 0x08, 0x74,
0x79, 0x70, 0x65, 0x5f, 0x66, 0x65, 0x64, 0x52, 0x05, 0x74, 0x79, 0x70, 0x65, 0x32, 0x12, 0x65,
0x0a, 0x05, 0x74, 0x79, 0x70, 0x65, 0x33, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x18, 0x2e,
0x6f, 0x72, 0x67, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x50,
0x6f, 0x73, 0x74, 0x54, 0x79, 0x70, 0x65, 0x42, 0x35, 0x9a, 0x4a, 0x32, 0x12, 0x30, 0x6f, 0x72,
0x67, 0x2e, 0x70, 0x6f, 0x73, 0x74, 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x6f, 0x73, 0x74, 0x44, 0x61,
0x74, 0x61, 0x54, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x28, 0x27, 0x50, 0x4f,
0x53, 0x54, 0x5f, 0x56, 0x32, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x43, 0x27, 0x29, 0x52, 0x05,
0x74, 0x79, 0x70, 0x65, 0x33, 0x12, 0x3e, 0x0a, 0x05, 0x74, 0x79, 0x70, 0x65, 0x34, 0x18, 0x07,
0x20, 0x01, 0x28, 0x0e, 0x32, 0x18, 0x2e, 0x6f, 0x72, 0x67, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72,
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x50, 0x6f, 0x73, 0x74, 0x54, 0x79, 0x70, 0x65, 0x42, 0x0e,
0x9a, 0x4a, 0x0b, 0x12, 0x09, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x66, 0x65, 0x64, 0x32, 0x52, 0x05,
0x74, 0x79, 0x70, 0x65, 0x34, 0x12, 0x2b, 0x0a, 0x01, 0x6d, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b,
0x32, 0x0b, 0x2e, 0x6f, 0x72, 0x67, 0x2e, 0x70, 0x6f, 0x73, 0x74, 0x2e, 0x4d, 0x42, 0x10, 0x9a,
0x4a, 0x0d, 0x12, 0x0b, 0x4d, 0x7b, 0x78, 0x3a, 0x20, 0x27, 0x78, 0x78, 0x78, 0x27, 0x7d, 0x52,
0x01, 0x6d, 0x3a, 0xc5, 0x04, 0x9a, 0x4a, 0xc1, 0x04, 0x0a, 0x5f, 0x0a, 0x03, 0x72, 0x65, 0x73,
0x72, 0x58, 0x0a, 0x1c, 0x6f, 0x72, 0x67, 0x2e, 0x70, 0x6f, 0x73, 0x74, 0x2e, 0x50, 0x6f, 0x73,
0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x47, 0x65, 0x74, 0x50, 0x6f, 0x73, 0x74,
0x12, 0x0a, 0x0a, 0x02, 0x69, 0x64, 0x12, 0x04, 0x24, 0x2e, 0x69, 0x64, 0x12, 0x15, 0x0a, 0x01,
0x61, 0x12, 0x03, 0x24, 0x2e, 0x61, 0x1a, 0x0b, 0x24, 0x2e, 0x61, 0x20, 0x21, 0x3d, 0x20, 0x6e,
0x75, 0x6c, 0x6c, 0x12, 0x15, 0x0a, 0x01, 0x62, 0x12, 0x03, 0x24, 0x2e, 0x62, 0x1a, 0x0b, 0x24,
0x2e, 0x62, 0x20, 0x21, 0x3d, 0x20, 0x6e, 0x75, 0x6c, 0x6c, 0x0a, 0x12, 0x0a, 0x04, 0x70, 0x6f,
0x73, 0x74, 0x18, 0x01, 0x5a, 0x08, 0x72, 0x65, 0x73, 0x2e, 0x70, 0x6f, 0x73, 0x74, 0x0a, 0x35,
0x0a, 0x04, 0x72, 0x65, 0x73, 0x32, 0x72, 0x2d, 0x0a, 0x1f, 0x6f, 0x72, 0x67, 0x2e, 0x70, 0x6f,
0x73, 0x74, 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x6f, 0x73, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63,
0x65, 0x2f, 0x47, 0x65, 0x74, 0x50, 0x6f, 0x73, 0x74, 0x12, 0x0a, 0x0a, 0x02, 0x69, 0x64, 0x12,
0x04, 0x24, 0x2e, 0x69, 0x64, 0x0a, 0x17, 0x0a, 0x05, 0x64, 0x61, 0x74, 0x61, 0x32, 0x5a, 0x0e,
0x72, 0x65, 0x73, 0x32, 0x2e, 0x70, 0x6f, 0x73, 0x74, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x0a, 0xa0,
0x01, 0x0a, 0x09, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x5a, 0x92, 0x01, 0x67,
0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x65,
0x6e, 0x75, 0x6d, 0x2e, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x28, 0x74, 0x72, 0x75, 0x65, 0x2c,
0x20, 0x6f, 0x72, 0x67, 0x2e, 0x70, 0x6f, 0x73, 0x74, 0x2e, 0x50, 0x6f, 0x73, 0x74, 0x44, 0x61,
0x74, 0x61, 0x54, 0x79, 0x70, 0x65, 0x2e, 0x66, 0x72, 0x6f, 0x6d, 0x28, 0x6f, 0x72, 0x67, 0x2e,
0x70, 0x6f, 0x73, 0x74, 0x2e, 0x50, 0x6f, 0x73, 0x74, 0x44, 0x61, 0x74, 0x61, 0x54, 0x79, 0x70,
0x65, 0x2e, 0x50, 0x4f, 0x53, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x42, 0x29, 0x2c, 0x20,
0x6f, 0x72, 0x67, 0x2e, 0x70, 0x6f, 0x73, 0x74, 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x6f, 0x73, 0x74,
0x44, 0x61, 0x74, 0x61, 0x54, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x28, 0x27,
0x50, 0x4f, 0x53, 0x54, 0x5f, 0x56, 0x32, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x42, 0x27, 0x29,
0x29, 0x0a, 0x6c, 0x0a, 0x0a, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x32, 0x5a,
0x5e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e,
0x2e, 0x65, 0x6e, 0x75, 0x6d, 0x2e, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x28, 0x74, 0x72, 0x75,
0x65, 0x2c, 0x20, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x2c, 0x20, 0x6f, 0x72,
0x67, 0x2e, 0x70, 0x6f, 0x73, 0x74, 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x6f, 0x73, 0x74, 0x44, 0x61,
0x74, 0x61, 0x54, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x28, 0x27, 0x50, 0x4f,
0x53, 0x54, 0x5f, 0x56, 0x32, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x43, 0x27, 0x29, 0x29, 0x0a,
0x23, 0x0a, 0x08, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x66, 0x65, 0x64, 0x82, 0x01, 0x16, 0x0a, 0x08,
0x50, 0x6f, 0x73, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0a, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x74,
0x79, 0x70, 0x65, 0x32, 0x0a, 0x44, 0x0a, 0x09, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x66, 0x65, 0x64,
0x32, 0x82, 0x01, 0x36, 0x0a, 0x08, 0x50, 0x6f, 0x73, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x2a,
0x6f, 0x72, 0x67, 0x2e, 0x70, 0x6f, 0x73, 0x74, 0x2e, 0x50, 0x6f, 0x73, 0x74, 0x44, 0x61, 0x74,
0x61, 0x54, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x28, 0x27, 0x50, 0x4f, 0x53,
0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x41, 0x27, 0x29, 0x22, 0xb3, 0x01, 0x0a, 0x08, 0x50,
0x6f, 0x73, 0x74, 0x44, 0x61, 0x74, 0x61, 0x12, 0x2c, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18,
0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x18, 0x2e, 0x6f, 0x72, 0x67, 0x2e, 0x66, 0x65, 0x64, 0x65,
0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x50, 0x6f, 0x73, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52,
0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x18, 0x02,
0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x12, 0x35, 0x0a, 0x07, 0x63,
0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x6f,
0x72, 0x67, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x50, 0x6f,
0x73, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65,
0x6e, 0x74, 0x3a, 0x2c, 0x9a, 0x4a, 0x29, 0x1a, 0x11, 0x6f, 0x72, 0x67, 0x2e, 0x70, 0x6f, 0x73,
0x74, 0x2e, 0x50, 0x6f, 0x73, 0x74, 0x44, 0x61, 0x74, 0x61, 0x1a, 0x14, 0x6f, 0x72, 0x67, 0x2e,
0x70, 0x6f, 0x73, 0x74, 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x6f, 0x73, 0x74, 0x44, 0x61, 0x74, 0x61,
0x22, 0xd7, 0x03, 0x0a, 0x0b, 0x50, 0x6f, 0x73, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74,
0x12, 0x40, 0x0a, 0x08, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x18, 0x01, 0x20, 0x01,
0x28, 0x0e, 0x32, 0x24, 0x2e, 0x6f, 0x72, 0x67, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74,
0x69, 0x6f, 0x6e, 0x2e, 0x50, 0x6f, 0x73, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2e,
0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x52, 0x08, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f,
0x72, 0x79, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x65, 0x61, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09,
0x52, 0x04, 0x68, 0x65, 0x61, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x03,
0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x12, 0x24, 0x0a, 0x08, 0x64, 0x75,
0x70, 0x5f, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x09, 0x9a, 0x4a,
0x06, 0x1a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x52, 0x07, 0x64, 0x75, 0x70, 0x42, 0x6f, 0x64, 0x79,
0x12, 0x3f, 0x0a, 0x06, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b,
0x32, 0x27, 0x2e, 0x6f, 0x72, 0x67, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f,
0x6e, 0x2e, 0x50, 0x6f, 0x73, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2e, 0x43, 0x6f,
0x75, 0x6e, 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x06, 0x63, 0x6f, 0x75, 0x6e, 0x74,
0x73, 0x1a, 0x39, 0x0a, 0x0b, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79,
0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x6b,
0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28,
0x05, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x87, 0x01, 0x0a,
0x08, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x12, 0x0e, 0x0a, 0x0a, 0x43, 0x41, 0x54,
0x45, 0x47, 0x4f, 0x52, 0x59, 0x5f, 0x41, 0x10, 0x00, 0x12, 0x0e, 0x0a, 0x0a, 0x43, 0x41, 0x54,
0x45, 0x47, 0x4f, 0x52, 0x59, 0x5f, 0x42, 0x10, 0x01, 0x12, 0x15, 0x0a, 0x0a, 0x43, 0x41, 0x54,
0x45, 0x47, 0x4f, 0x52, 0x59, 0x5f, 0x43, 0x10, 0x02, 0x1a, 0x05, 0x9a, 0x4a, 0x02, 0x20, 0x01,
0x1a, 0x44, 0x9a, 0x4a, 0x41, 0x0a, 0x1d, 0x6f, 0x72, 0x67, 0x2e, 0x70, 0x6f, 0x73, 0x74, 0x2e,
0x50, 0x6f, 0x73, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2e, 0x43, 0x61, 0x74, 0x65,
0x67, 0x6f, 0x72, 0x79, 0x0a, 0x20, 0x6f, 0x72, 0x67, 0x2e, 0x70, 0x6f, 0x73, 0x74, 0x2e, 0x76,
0x32, 0x2e, 0x50, 0x6f, 0x73, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2e, 0x43, 0x61,
0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x3a, 0x32, 0x9a, 0x4a, 0x2f, 0x1a, 0x14, 0x6f, 0x72, 0x67,
0x2e, 0x70, 0x6f, 0x73, 0x74, 0x2e, 0x50, 0x6f, 0x73, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e,
0x74, 0x1a, 0x17, 0x6f, 0x72, 0x67, 0x2e, 0x70, 0x6f, 0x73, 0x74, 0x2e, 0x76, 0x32, 0x2e, 0x50,
0x6f, 0x73, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x22, 0x22, 0x0a, 0x01, 0x4d, 0x12,
0x0c, 0x0a, 0x01, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x01, 0x78, 0x3a, 0x0f, 0x9a,
0x4a, 0x0c, 0x1a, 0x0a, 0x6f, 0x72, 0x67, 0x2e, 0x70, 0x6f, 0x73, 0x74, 0x2e, 0x4d, 0x2a, 0xd0,
0x02, 0x0a, 0x08, 0x50, 0x6f, 0x73, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1c, 0x0a, 0x11, 0x50,
0x4f, 0x53, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e,
0x10, 0x00, 0x1a, 0x05, 0x9a, 0x4a, 0x02, 0x08, 0x01, 0x12, 0x23, 0x0a, 0x0d, 0x50, 0x4f, 0x53,
0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x46, 0x4f, 0x4f, 0x10, 0x01, 0x1a, 0x10, 0x9a, 0x4a,
0x0d, 0x12, 0x0b, 0x50, 0x4f, 0x53, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x41, 0x12, 0xb0,
0x01, 0x0a, 0x0d, 0x50, 0x4f, 0x53, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x42, 0x41, 0x52,
0x10, 0x02, 0x1a, 0x9c, 0x01, 0x9a, 0x4a, 0x98, 0x01, 0x12, 0x21, 0x6f, 0x72, 0x67, 0x2e, 0x70,
0x6f, 0x73, 0x74, 0x2e, 0x50, 0x6f, 0x73, 0x74, 0x44, 0x61, 0x74, 0x61, 0x54, 0x79, 0x70, 0x65,
0x2e, 0x50, 0x4f, 0x53, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x42, 0x12, 0x21, 0x6f, 0x72,
0x67, 0x2e, 0x70, 0x6f, 0x73, 0x74, 0x2e, 0x50, 0x6f, 0x73, 0x74, 0x44, 0x61, 0x74, 0x61, 0x54,
0x79, 0x70, 0x65, 0x2e, 0x50, 0x4f, 0x53, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x43, 0x12,
0x27, 0x6f, 0x72, 0x67, 0x2e, 0x70, 0x6f, 0x73, 0x74, 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x6f, 0x73,
0x74, 0x44, 0x61, 0x74, 0x61, 0x54, 0x79, 0x70, 0x65, 0x2e, 0x50, 0x4f, 0x53, 0x54, 0x5f, 0x56,
0x32, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x42, 0x12, 0x27, 0x6f, 0x72, 0x67, 0x2e, 0x70, 0x6f,
0x73, 0x74, 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x6f, 0x73, 0x74, 0x44, 0x61, 0x74, 0x61, 0x54, 0x79,
0x70, 0x65, 0x2e, 0x50, 0x4f, 0x53, 0x54, 0x5f, 0x56, 0x32, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f,
0x43, 0x12, 0x18, 0x0a, 0x0d, 0x50, 0x4f, 0x53, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x42,
0x41, 0x5a, 0x10, 0x03, 0x1a, 0x05, 0x9a, 0x4a, 0x02, 0x20, 0x01, 0x1a, 0x34, 0x9a, 0x4a, 0x31,
0x0a, 0x15, 0x6f, 0x72, 0x67, 0x2e, 0x70, 0x6f, 0x73, 0x74, 0x2e, 0x50, 0x6f, 0x73, 0x74, 0x44,
0x61, 0x74, 0x61, 0x54, 0x79, 0x70, 0x65, 0x0a, 0x18, 0x6f, 0x72, 0x67, 0x2e, 0x70, 0x6f, 0x73,
0x74, 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x6f, 0x73, 0x74, 0x44, 0x61, 0x74, 0x61, 0x54, 0x79, 0x70,
0x65, 0x32, 0x66, 0x0a, 0x11, 0x46, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53,
0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x4c, 0x0a, 0x07, 0x47, 0x65, 0x74, 0x50, 0x6f, 0x73,
0x74, 0x12, 0x1e, 0x2e, 0x6f, 0x72, 0x67, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69,
0x6f, 0x6e, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x6f, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
0x74, 0x1a, 0x1f, 0x2e, 0x6f, 0x72, 0x67, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69,
0x6f, 0x6e, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x6f, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
0x73, 0x65, 0x22, 0x00, 0x1a, 0x03, 0x9a, 0x4a, 0x00, 0x42, 0xc9, 0x01, 0x9a, 0x4a, 0x29, 0x12,
0x12, 0x70, 0x6f, 0x73, 0x74, 0x2f, 0x76, 0x32, 0x2f, 0x70, 0x6f, 0x73, 0x74, 0x2e, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x12, 0x13, 0x70, 0x6f, 0x73, 0x74, 0x2f, 0x76, 0x32, 0x2f, 0x65, 0x78, 0x74,
0x72, 0x61, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x0a, 0x12, 0x63, 0x6f, 0x6d, 0x2e, 0x6f, 0x72,
0x67, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x0f, 0x46, 0x65,
0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a,
0x1d, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2f, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74,
0x69, 0x6f, 0x6e, 0x3b, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0xa2, 0x02,
0x03, 0x4f, 0x46, 0x58, 0xaa, 0x02, 0x0e, 0x4f, 0x72, 0x67, 0x2e, 0x46, 0x65, 0x64, 0x65, 0x72,
0x61, 0x74, 0x69, 0x6f, 0x6e, 0xca, 0x02, 0x0e, 0x4f, 0x72, 0x67, 0x5c, 0x46, 0x65, 0x64, 0x65,
0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0xe2, 0x02, 0x1a, 0x4f, 0x72, 0x67, 0x5c, 0x46, 0x65, 0x64,
0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64,
0x61, 0x74, 0x61, 0xea, 0x02, 0x0f, 0x4f, 0x72, 0x67, 0x3a, 0x3a, 0x46, 0x65, 0x64, 0x65, 0x72,
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_federation_federation_proto_rawDescOnce sync.Once
file_federation_federation_proto_rawDescData = file_federation_federation_proto_rawDesc
)
func file_federation_federation_proto_rawDescGZIP() []byte {
file_federation_federation_proto_rawDescOnce.Do(func() {
file_federation_federation_proto_rawDescData = protoimpl.X.CompressGZIP(file_federation_federation_proto_rawDescData)
})
return file_federation_federation_proto_rawDescData
}
var file_federation_federation_proto_enumTypes = make([]protoimpl.EnumInfo, 2)
var file_federation_federation_proto_msgTypes = make([]protoimpl.MessageInfo, 9)
var file_federation_federation_proto_goTypes = []interface{}{
(PostType)(0), // 0: org.federation.PostType
(PostContent_Category)(0), // 1: org.federation.PostContent.Category
(*GetPostRequest)(nil), // 2: org.federation.GetPostRequest
(*GetPostResponse)(nil), // 3: org.federation.GetPostResponse
(*Post)(nil), // 4: org.federation.Post
(*PostData)(nil), // 5: org.federation.PostData
(*PostContent)(nil), // 6: org.federation.PostContent
(*M)(nil), // 7: org.federation.M
(*GetPostRequest_ConditionA)(nil), // 8: org.federation.GetPostRequest.ConditionA
(*GetPostRequest_ConditionB)(nil), // 9: org.federation.GetPostRequest.ConditionB
nil, // 10: org.federation.PostContent.CountsEntry
(*post.M)(nil), // 11: org.post.M
}
var file_federation_federation_proto_depIdxs = []int32{
8, // 0: org.federation.GetPostRequest.a:type_name -> org.federation.GetPostRequest.ConditionA
9, // 1: org.federation.GetPostRequest.condition_b:type_name -> org.federation.GetPostRequest.ConditionB
4, // 2: org.federation.GetPostResponse.post:type_name -> org.federation.Post
5, // 3: org.federation.Post.data:type_name -> org.federation.PostData
5, // 4: org.federation.Post.data2:type_name -> org.federation.PostData
0, // 5: org.federation.Post.type:type_name -> org.federation.PostType
0, // 6: org.federation.Post.type2:type_name -> org.federation.PostType
0, // 7: org.federation.Post.type3:type_name -> org.federation.PostType
0, // 8: org.federation.Post.type4:type_name -> org.federation.PostType
11, // 9: org.federation.Post.m:type_name -> org.post.M
0, // 10: org.federation.PostData.type:type_name -> org.federation.PostType
6, // 11: org.federation.PostData.content:type_name -> org.federation.PostContent
1, // 12: org.federation.PostContent.category:type_name -> org.federation.PostContent.Category
10, // 13: org.federation.PostContent.counts:type_name -> org.federation.PostContent.CountsEntry
2, // 14: org.federation.FederationService.GetPost:input_type -> org.federation.GetPostRequest
3, // 15: org.federation.FederationService.GetPost:output_type -> org.federation.GetPostResponse
15, // [15:16] is the sub-list for method output_type
14, // [14:15] is the sub-list for method input_type
14, // [14:14] is the sub-list for extension type_name
14, // [14:14] is the sub-list for extension extendee
0, // [0:14] is the sub-list for field type_name
}
func init() { file_federation_federation_proto_init() }
func file_federation_federation_proto_init() {
if File_federation_federation_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_federation_federation_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetPostRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_federation_federation_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetPostResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_federation_federation_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Post); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_federation_federation_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*PostData); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_federation_federation_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*PostContent); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_federation_federation_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*M); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_federation_federation_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetPostRequest_ConditionA); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_federation_federation_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetPostRequest_ConditionB); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
file_federation_federation_proto_msgTypes[0].OneofWrappers = []interface{}{
(*GetPostRequest_A)(nil),
(*GetPostRequest_ConditionB_)(nil),
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_federation_federation_proto_rawDesc,
NumEnums: 2,
NumMessages: 9,
NumExtensions: 0,
NumServices: 1,
},
GoTypes: file_federation_federation_proto_goTypes,
DependencyIndexes: file_federation_federation_proto_depIdxs,
EnumInfos: file_federation_federation_proto_enumTypes,
MessageInfos: file_federation_federation_proto_msgTypes,
}.Build()
File_federation_federation_proto = out.File
file_federation_federation_proto_rawDesc = nil
file_federation_federation_proto_goTypes = nil
file_federation_federation_proto_depIdxs = nil
}
================================================
FILE: _examples/06_alias/federation/federation_grpc.pb.go
================================================
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.3.0
// - protoc (unknown)
// source: federation/federation.proto
package federation
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 (
FederationService_GetPost_FullMethodName = "/org.federation.FederationService/GetPost"
)
// FederationServiceClient is the client API for FederationService 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 FederationServiceClient interface {
GetPost(ctx context.Context, in *GetPostRequest, opts ...grpc.CallOption) (*GetPostResponse, error)
}
type federationServiceClient struct {
cc grpc.ClientConnInterface
}
func NewFederationServiceClient(cc grpc.ClientConnInterface) FederationServiceClient {
return &federationServiceClient{cc}
}
func (c *federationServiceClient) GetPost(ctx context.Context, in *GetPostRequest, opts ...grpc.CallOption) (*GetPostResponse, error) {
out := new(GetPostResponse)
err := c.cc.Invoke(ctx, FederationService_GetPost_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// FederationServiceServer is the server API for FederationService service.
// All implementations must embed UnimplementedFederationServiceServer
// for forward compatibility
type FederationServiceServer interface {
GetPost(context.Context, *GetPostRequest) (*GetPostResponse, error)
mustEmbedUnimplementedFederationServiceServer()
}
// UnimplementedFederationServiceServer must be embedded to have forward compatible implementations.
type UnimplementedFederationServiceServer struct {
}
func (UnimplementedFederationServiceServer) GetPost(context.Context, *GetPostRequest) (*GetPostResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetPost not implemented")
}
func (UnimplementedFederationServiceServer) mustEmbedUnimplementedFederationServiceServer() {}
// UnsafeFederationServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to FederationServiceServer will
// result in compilation errors.
type UnsafeFederationServiceServer interface {
mustEmbedUnimplementedFederationServiceServer()
}
func RegisterFederationServiceServer(s grpc.ServiceRegistrar, srv FederationServiceServer) {
s.RegisterService(&FederationService_ServiceDesc, srv)
}
func _FederationService_GetPost_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetPostRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(FederationServiceServer).GetPost(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: FederationService_GetPost_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(FederationServiceServer).GetPost(ctx, req.(*GetPostRequest))
}
return interceptor(ctx, in, info, handler)
}
// FederationService_ServiceDesc is the grpc.ServiceDesc for FederationService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var FederationService_ServiceDesc = grpc.ServiceDesc{
ServiceName: "org.federation.FederationService",
HandlerType: (*FederationServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "GetPost",
Handler: _FederationService_GetPost_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "federation/federation.proto",
}
================================================
FILE: _examples/06_alias/federation/federation_grpc_federation.pb.go
================================================
// Code generated by protoc-gen-grpc-federation. DO NOT EDIT!
// versions:
//
// protoc-gen-grpc-federation: (devel)
//
// source: federation/federation.proto
package federation
import (
"context"
"io"
"log/slog"
"reflect"
grpcfed "github.com/mercari/grpc-federation/grpc/federation"
grpcfedcel "github.com/mercari/grpc-federation/grpc/federation/cel"
"go.opentelemetry.io/otel"
"go.opentelemetry.io/otel/trace"
post "example/post"
post1 "example/post/v2"
)
var (
_ = reflect.Invalid // to avoid "imported and not used error"
)
// Org_Federation_GetPostResponseVariable represents variable definitions in "org.federation.GetPostResponse".
type FederationService_Org_Federation_GetPostResponseVariable struct {
Post *Post
}
// Org_Federation_GetPostResponseArgument is argument for "org.federation.GetPostResponse" message.
type FederationService_Org_Federation_GetPostResponseArgument struct {
A *GetPostRequest_ConditionA
ConditionB *GetPostRequest_ConditionB
Id string
FederationService_Org_Federation_GetPostResponseVariable
}
// Org_Federation_PostVariable represents variable definitions in "org.federation.Post".
type FederationService_Org_Federation_PostVariable struct {
Data2 *post1.PostData
DataType *grpcfedcel.EnumSelector
DataType2 *grpcfedcel.EnumSelector
Post *post.Post
Res *post.GetPostResponse
Res2 *post1.GetPostResponse
TypeFed PostType
TypeFed2 PostType
}
// Org_Federation_PostArgument is argument for "org.federation.Post" message.
type FederationService_Org_Federation_PostArgument struct {
A *GetPostRequest_ConditionA
B *GetPostRequest_ConditionB
Id string
FederationService_Org_Federation_PostVariable
}
// FederationServiceConfig configuration required to initialize the service that use GRPC Federation.
type FederationServiceConfig struct {
// Client provides a factory that creates the gRPC Client needed to invoke methods of the gRPC Service on which the Federation Service depends.
// If this interface is not provided, an error is returned during initialization.
Client FederationServiceClientFactory // required
// ErrorHandler Federation Service often needs to convert errors received from downstream services.
// If an error occurs during method execution in the Federation Service, this error handler is called and the returned error is treated as a final error.
ErrorHandler grpcfed.ErrorHandler
// Logger sets the logger used to output Debug/Info/Error information.
Logger *slog.Logger
}
// FederationServiceClientFactory provides a factory that creates the gRPC Client needed to invoke methods of the gRPC Service on which the Federation Service depends.
type FederationServiceClientFactory interface {
// Org_Post_PostServiceClient create a gRPC Client to be used to call methods in org.post.PostService.
Org_Post_PostServiceClient(FederationServiceClientConfig) (post.PostServiceClient, error)
// Org_Post_V2_PostServiceClient create a gRPC Client to be used to call methods in org.post.v2.PostService.
Org_Post_V2_PostServiceClient(FederationServiceClientConfig) (post1.PostServiceClient, error)
}
// FederationServiceClientConfig helper to create gRPC client.
// Hints for creating a gRPC Client.
type FederationServiceClientConfig struct {
// Service FQDN ( `.` ) of the service on Protocol Buffers.
Service string
}
// FederationServiceDependentClientSet has a gRPC client for all services on which the federation service depends.
// This is provided as an argument when implementing the custom resolver.
type FederationServiceDependentClientSet struct {
Org_Post_PostServiceClient post.PostServiceClient
Org_Post_V2_PostServiceClient post1.PostServiceClient
}
// FederationServiceResolver provides an interface to directly implement message resolver and field resolver not defined in Protocol Buffers.
type FederationServiceResolver interface {
}
// FederationServiceCELPluginWasmConfig type alias for grpcfedcel.WasmConfig.
type FederationServiceCELPluginWasmConfig = grpcfedcel.WasmConfig
// FederationServiceCELPluginConfig hints for loading a WebAssembly based plugin.
type FederationServiceCELPluginConfig struct {
CacheDir string
}
// FederationServiceUnimplementedResolver a structure implemented to satisfy the Resolver interface.
// An Unimplemented error is always returned.
// This is intended for use when there are many Resolver interfaces that do not need to be implemented,
// by embedding them in a resolver structure that you have created.
type FederationServiceUnimplementedResolver struct{}
const (
FederationService_DependentMethod_Org_Post_PostService_GetPost = "/org.post.PostService/GetPost"
FederationService_DependentMethod_Org_Post_V2_PostService_GetPost = "/org.post.v2.PostService/GetPost"
)
// FederationService represents Federation Service.
type FederationService struct {
UnimplementedFederationServiceServer
cfg FederationServiceConfig
logger *slog.Logger
isLogLevelDebug bool
errorHandler grpcfed.ErrorHandler
celCacheMap *grpcfed.CELCacheMap
tracer trace.Tracer
celTypeHelper *grpcfed.CELTypeHelper
celEnvOpts []grpcfed.CELEnvOption
celPlugins []*grpcfedcel.CELPlugin
client *FederationServiceDependentClientSet
}
// NewFederationService creates FederationService instance by FederationServiceConfig.
func NewFederationService(cfg FederationServiceConfig) (*FederationService, error) {
if cfg.Client == nil {
return nil, grpcfed.ErrClientConfig
}
Org_Post_PostServiceClient, err := cfg.Client.Org_Post_PostServiceClient(FederationServiceClientConfig{
Service: "org.post.PostService",
})
if err != nil {
return nil, err
}
Org_Post_V2_PostServiceClient, err := cfg.Client.Org_Post_V2_PostServiceClient(FederationServiceClientConfig{
Service: "org.post.v2.PostService",
})
if err != nil {
return nil, err
}
logger := cfg.Logger
if logger == nil {
logger = slog.New(slog.NewJSONHandler(io.Discard, nil))
}
tracer := otel.Tracer("org.federation.FederationService")
ctx := grpcfed.WithLogger(context.Background(), logger)
ctx = grpcfed.WithTracer(ctx, tracer)
errorHandler := cfg.ErrorHandler
if errorHandler == nil {
errorHandler = func(ctx context.Context, methodName string, err error) error { return err }
}
celTypeHelperFieldMap := grpcfed.CELTypeHelperFieldMap{
"grpc.federation.private.org.federation.GetPostResponseArgument": {
"id": grpcfed.NewCELFieldType(grpcfed.CELStringType, "Id"),
"a": grpcfed.NewCELFieldType(grpcfed.NewCELObjectType("org.federation.GetPostRequest.ConditionA"), "A"),
"condition_b": grpcfed.NewCELFieldType(grpcfed.NewCELObjectType("org.federation.GetPostRequest.ConditionB"), "ConditionB"),
},
"grpc.federation.private.org.federation.PostArgument": {
"id": grpcfed.NewCELFieldType(grpcfed.CELStringType, "Id"),
"a": grpcfed.NewCELFieldType(grpcfed.NewCELObjectType("org.federation.GetPostRequest.ConditionA"), "A"),
"b": grpcfed.NewCELFieldType(grpcfed.NewCELObjectType("org.federation.GetPostRequest.ConditionB"), "B"),
},
}
celTypeHelper := grpcfed.NewCELTypeHelper("org.federation", celTypeHelperFieldMap)
var celEnvOpts []grpcfed.CELEnvOption
celEnvOpts = append(celEnvOpts, grpcfed.NewDefaultEnvOptions(celTypeHelper)...)
celEnvOpts = append(celEnvOpts, grpcfed.GRPCErrorAccessorOptions(celTypeHelper, "org.post.GetPostResponse")...)
celEnvOpts = append(celEnvOpts, grpcfed.GRPCErrorAccessorOptions(celTypeHelper, "org.post.v2.GetPostResponse")...)
celEnvOpts = append(celEnvOpts, grpcfed.EnumAccessorOptions("org.federation.PostContent.Category", PostContent_Category_value, PostContent_Category_name)...)
celEnvOpts = append(celEnvOpts, grpcfed.EnumAccessorOptions("org.federation.PostType", PostType_value, PostType_name)...)
celEnvOpts = append(celEnvOpts, grpcfed.EnumAccessorOptions("org.post.PostContent.Category", post.PostContent_Category_value, post.PostContent_Category_name)...)
celEnvOpts = append(celEnvOpts, grpcfed.EnumAccessorOptions("org.post.PostDataType", post.PostDataType_value, post.PostDataType_name)...)
celEnvOpts = append(celEnvOpts, grpcfed.EnumAccessorOptions("org.post.v2.ExtraType", post1.ExtraType_value, post1.ExtraType_name)...)
celEnvOpts = append(celEnvOpts, grpcfed.EnumAccessorOptions("org.post.v2.PostContent.Category", post1.PostContent_Category_value, post1.PostContent_Category_name)...)
celEnvOpts = append(celEnvOpts, grpcfed.EnumAccessorOptions("org.post.v2.PostDataType", post1.PostDataType_value, post1.PostDataType_name)...)
svc := &FederationService{
cfg: cfg,
logger: logger,
isLogLevelDebug: logger.Enabled(context.Background(), slog.LevelDebug),
errorHandler: errorHandler,
celEnvOpts: celEnvOpts,
celTypeHelper: celTypeHelper,
celCacheMap: grpcfed.NewCELCacheMap(),
tracer: tracer,
client: &FederationServiceDependentClientSet{
Org_Post_PostServiceClient: Org_Post_PostServiceClient,
Org_Post_V2_PostServiceClient: Org_Post_V2_PostServiceClient,
},
}
return svc, nil
}
// CleanupFederationService cleanup all resources to prevent goroutine leaks.
func CleanupFederationService(ctx context.Context, svc *FederationService) {
svc.cleanup(ctx)
}
func (s *FederationService) cleanup(ctx context.Context) {
for _, plugin := range s.celPlugins {
plugin.Close()
}
}
// GetPost implements "org.federation.FederationService/GetPost" method.
func (s *FederationService) GetPost(ctx context.Context, req *GetPostRequest) (res *GetPostResponse, e error) {
ctx, span := s.tracer.Start(ctx, "org.federation.FederationService/GetPost")
defer span.End()
ctx = grpcfed.WithLogger(ctx, s.logger)
ctx = grpcfed.WithCELCacheMap(ctx, s.celCacheMap)
defer func() {
if r := recover(); r != nil {
e = grpcfed.RecoverError(r, grpcfed.StackTrace())
grpcfed.OutputErrorLog(ctx, e)
}
}()
defer func() {
for _, celPlugin := range s.celPlugins {
celPlugin.Cleanup()
}
}()
res, err := s.resolve_Org_Federation_GetPostResponse(ctx, &FederationService_Org_Federation_GetPostResponseArgument{
Id: req.GetId(),
A: req.GetA(),
ConditionB: req.GetConditionB(),
})
if err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
grpcfed.OutputErrorLog(ctx, err)
return nil, err
}
return res, nil
}
// resolve_Org_Federation_GetPostResponse resolve "org.federation.GetPostResponse" message.
func (s *FederationService) resolve_Org_Federation_GetPostResponse(ctx context.Context, req *FederationService_Org_Federation_GetPostResponseArgument) (*GetPostResponse, error) {
ctx, span := s.tracer.Start(ctx, "org.federation.GetPostResponse")
defer span.End()
ctx = grpcfed.WithLogger(ctx, grpcfed.Logger(ctx), grpcfed.LogAttrs(ctx)...)
grpcfed.Logger(ctx).DebugContext(ctx, "resolve org.federation.GetPostResponse", slog.Any("message_args", s.logvalue_Org_Federation_GetPostResponseArgument(req)))
type localValueType struct {
*grpcfed.LocalValue
vars struct {
Post *Post
}
}
value := &localValueType{LocalValue: grpcfed.NewLocalValue(ctx, s.celEnvOpts, "grpc.federation.private.org.federation.GetPostResponseArgument", req)}
ctx = grpcfed.WithLocalValue(ctx, value.LocalValue)
/*
def {
name: "post"
message {
name: "Post"
args: [
{ name: "id", by: "$.id" },
{ name: "a", by: "$.a" },
{ name: "b", by: "$.condition_b" }
]
}
}
*/
def_post := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[*Post, *localValueType]{
Name: `post`,
Type: grpcfed.CELObjectType("org.federation.Post"),
Setter: func(value *localValueType, v *Post) error {
value.vars.Post = v
return nil
},
Message: func(ctx context.Context, value *localValueType) (any, error) {
args := &FederationService_Org_Federation_PostArgument{}
// { name: "id", by: "$.id" }
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[string]{
Value: value,
Expr: `$.id`,
CacheIndex: 1,
Setter: func(v string) error {
args.Id = v
return nil
},
}); err != nil {
return nil, err
}
// { name: "a", by: "$.a" }
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[*GetPostRequest_ConditionA]{
Value: value,
Expr: `$.a`,
CacheIndex: 2,
Setter: func(v *GetPostRequest_ConditionA) error {
args.A = v
return nil
},
}); err != nil {
return nil, err
}
// { name: "b", by: "$.condition_b" }
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[*GetPostRequest_ConditionB]{
Value: value,
Expr: `$.condition_b`,
CacheIndex: 3,
Setter: func(v *GetPostRequest_ConditionB) error {
args.B = v
return nil
},
}); err != nil {
return nil, err
}
ret, err := s.resolve_Org_Federation_Post(ctx, args)
if err != nil {
return nil, err
}
return ret, nil
},
})
}
if err := def_post(ctx); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
// assign named parameters to message arguments to pass to the custom resolver.
req.FederationService_Org_Federation_GetPostResponseVariable.Post = value.vars.Post
// create a message value to be returned.
ret := &GetPostResponse{}
// field binding section.
// (grpc.federation.field).by = "post"
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[*Post]{
Value: value,
Expr: `post`,
CacheIndex: 4,
Setter: func(v *Post) error {
ret.Post = v
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
grpcfed.Logger(ctx).DebugContext(ctx, "resolved org.federation.GetPostResponse", slog.Any("org.federation.GetPostResponse", s.logvalue_Org_Federation_GetPostResponse(ret)))
return ret, nil
}
// resolve_Org_Federation_Post resolve "org.federation.Post" message.
func (s *FederationService) resolve_Org_Federation_Post(ctx context.Context, req *FederationService_Org_Federation_PostArgument) (*Post, error) {
ctx, span := s.tracer.Start(ctx, "org.federation.Post")
defer span.End()
ctx = grpcfed.WithLogger(ctx, grpcfed.Logger(ctx), grpcfed.LogAttrs(ctx)...)
grpcfed.Logger(ctx).DebugContext(ctx, "resolve org.federation.Post", slog.Any("message_args", s.logvalue_Org_Federation_PostArgument(req)))
type localValueType struct {
*grpcfed.LocalValue
vars struct {
Data2 *post1.PostData
DataType *grpcfedcel.EnumSelector
DataType2 *grpcfedcel.EnumSelector
Post *post.Post
Res *post.GetPostResponse
Res2 *post1.GetPostResponse
TypeFed PostType
TypeFed2 PostType
}
}
value := &localValueType{LocalValue: grpcfed.NewLocalValue(ctx, s.celEnvOpts, "grpc.federation.private.org.federation.PostArgument", req)}
ctx = grpcfed.WithLocalValue(ctx, value.LocalValue)
/*
def {
name: "res"
call {
method: "org.post.PostService/GetPost"
request: [
{ field: "id", by: "$.id" },
{ field: "a", by: "$.a", if: "$.a != null" },
{ field: "b", by: "$.b", if: "$.b != null" }
]
}
}
*/
def_res := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[*post.GetPostResponse, *localValueType]{
Name: `res`,
Type: grpcfed.CELObjectType("org.post.GetPostResponse"),
Setter: func(value *localValueType, v *post.GetPostResponse) error {
value.vars.Res = v
return nil
},
Message: func(ctx context.Context, value *localValueType) (any, error) {
args := &post.GetPostRequest{}
// { field: "id", by: "$.id" }
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[string]{
Value: value,
Expr: `$.id`,
CacheIndex: 5,
Setter: func(v string) error {
args.Id = v
return nil
},
}); err != nil {
return nil, err
}
// { field: "a", by: "$.a", if: "$.a != null" }
if err := grpcfed.If(ctx, &grpcfed.IfParam[*localValueType]{
Value: value,
Expr: `$.a != null`,
CacheIndex: 6,
Body: func(value *localValueType) error {
return grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[*GetPostRequest_ConditionA]{
Value: value,
Expr: `$.a`,
CacheIndex: 7,
Setter: func(v *GetPostRequest_ConditionA) error {
aValue, err := s.cast_Org_Federation_GetPostRequest_ConditionA__to__Org_Post_PostConditionA(v)
if err != nil {
return err
}
args.Condition = &post.GetPostRequest_A{
A: aValue,
}
return nil
},
})
},
}); err != nil {
return nil, err
}
// { field: "b", by: "$.b", if: "$.b != null" }
if err := grpcfed.If(ctx, &grpcfed.IfParam[*localValueType]{
Value: value,
Expr: `$.b != null`,
CacheIndex: 8,
Body: func(value *localValueType) error {
return grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[*GetPostRequest_ConditionB]{
Value: value,
Expr: `$.b`,
CacheIndex: 9,
Setter: func(v *GetPostRequest_ConditionB) error {
bValue, err := s.cast_Org_Federation_GetPostRequest_ConditionB__to__Org_Post_PostConditionB(v)
if err != nil {
return err
}
args.Condition = &post.GetPostRequest_B{
B: bValue,
}
return nil
},
})
},
}); err != nil {
return nil, err
}
grpcfed.Logger(ctx).DebugContext(ctx, "call org.post.PostService/GetPost", slog.Any("org.post.GetPostRequest", s.logvalue_Org_Post_GetPostRequest(args)))
ret, err := s.client.Org_Post_PostServiceClient.GetPost(ctx, args)
if err != nil {
if err := s.errorHandler(ctx, FederationService_DependentMethod_Org_Post_PostService_GetPost, err); err != nil {
return nil, grpcfed.NewErrorWithLogAttrs(err, slog.LevelError, grpcfed.LogAttrs(ctx))
}
}
return ret, nil
},
})
}
/*
def {
name: "post"
autobind: true
by: "res.post"
}
*/
def_post := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[*post.Post, *localValueType]{
Name: `post`,
Type: grpcfed.CELObjectType("org.post.Post"),
Setter: func(value *localValueType, v *post.Post) error {
value.vars.Post = v
return nil
},
By: `res.post`,
ByCacheIndex: 10,
})
}
/*
def {
name: "res2"
call {
method: "org.post.v2.PostService/GetPost"
request { field: "id", by: "$.id" }
}
}
*/
def_res2 := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[*post1.GetPostResponse, *localValueType]{
Name: `res2`,
Type: grpcfed.CELObjectType("org.post.v2.GetPostResponse"),
Setter: func(value *localValueType, v *post1.GetPostResponse) error {
value.vars.Res2 = v
return nil
},
Message: func(ctx context.Context, value *localValueType) (any, error) {
args := &post1.GetPostRequest{}
// { field: "id", by: "$.id" }
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[string]{
Value: value,
Expr: `$.id`,
CacheIndex: 11,
Setter: func(v string) error {
args.Id = v
return nil
},
}); err != nil {
return nil, err
}
grpcfed.Logger(ctx).DebugContext(ctx, "call org.post.v2.PostService/GetPost", slog.Any("org.post.v2.GetPostRequest", s.logvalue_Org_Post_V2_GetPostRequest(args)))
ret, err := s.client.Org_Post_V2_PostServiceClient.GetPost(ctx, args)
if err != nil {
if err := s.errorHandler(ctx, FederationService_DependentMethod_Org_Post_V2_PostService_GetPost, err); err != nil {
return nil, grpcfed.NewErrorWithLogAttrs(err, slog.LevelError, grpcfed.LogAttrs(ctx))
}
}
return ret, nil
},
})
}
/*
def {
name: "data2"
by: "res2.post.data"
}
*/
def_data2 := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[*post1.PostData, *localValueType]{
Name: `data2`,
Type: grpcfed.CELObjectType("org.post.v2.PostData"),
Setter: func(value *localValueType, v *post1.PostData) error {
value.vars.Data2 = v
return nil
},
By: `res2.post.data`,
ByCacheIndex: 12,
})
}
/*
def {
name: "data_type"
by: "grpc.federation.enum.select(true, org.post.PostDataType.from(org.post.PostDataType.POST_TYPE_B), org.post.v2.PostDataType.value('POST_V2_TYPE_B'))"
}
*/
def_data_type := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[*grpcfedcel.EnumSelector, *localValueType]{
Name: `data_type`,
Type: grpcfed.CELObjectType("grpc.federation.private.EnumSelector"),
Setter: func(value *localValueType, v *grpcfedcel.EnumSelector) error {
value.vars.DataType = v
return nil
},
By: `grpc.federation.enum.select(true, org.post.PostDataType.from(org.post.PostDataType.POST_TYPE_B), org.post.v2.PostDataType.value('POST_V2_TYPE_B'))`,
ByCacheIndex: 13,
})
}
/*
def {
name: "data_type2"
by: "grpc.federation.enum.select(true, data_type, org.post.v2.PostDataType.value('POST_V2_TYPE_C'))"
}
*/
def_data_type2 := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[*grpcfedcel.EnumSelector, *localValueType]{
Name: `data_type2`,
Type: grpcfed.CELObjectType("grpc.federation.private.EnumSelector"),
Setter: func(value *localValueType, v *grpcfedcel.EnumSelector) error {
value.vars.DataType2 = v
return nil
},
By: `grpc.federation.enum.select(true, data_type, org.post.v2.PostDataType.value('POST_V2_TYPE_C'))`,
ByCacheIndex: 14,
})
}
/*
def {
name: "type_fed"
enum {
name: "org.federation.PostType"
by: "data_type2"
}
}
*/
def_type_fed := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[PostType, *localValueType]{
Name: `type_fed`,
Type: grpcfed.CELIntType,
Setter: func(value *localValueType, v PostType) error {
value.vars.TypeFed = v
return nil
},
Enum: func(ctx context.Context, value *localValueType) (PostType, error) {
src, err := grpcfed.EvalCEL(ctx, &grpcfed.EvalCELRequest{
Value: value,
Expr: `data_type2`,
OutType: reflect.TypeOf((*grpcfedcel.EnumSelector)(nil)),
CacheIndex: 15,
})
if err != nil {
return 0, err
}
v := src.(*grpcfedcel.EnumSelector)
var dst PostType
if err := func() error {
if v.GetCond() {
if err := func(v *grpcfedcel.EnumSelector) error {
if v.GetCond() {
casted, err := s.cast_Org_Post_PostDataType__to__Org_Federation_PostType(post.PostDataType(v.GetTrueValue()))
if err != nil {
return err
}
dst = casted
} else {
casted, err := s.cast_Org_Post_V2_PostDataType__to__Org_Federation_PostType(post1.PostDataType(v.GetFalseValue()))
if err != nil {
return err
}
dst = casted
}
return nil
}(v.GetTrueSelector()); err != nil {
return err
}
} else {
casted, err := s.cast_Org_Post_V2_PostDataType__to__Org_Federation_PostType(post1.PostDataType(v.GetFalseValue()))
if err != nil {
return err
}
dst = casted
}
return nil
}(); err != nil {
return 0, err
}
return dst, nil
},
})
}
/*
def {
name: "type_fed2"
enum {
name: "org.federation.PostType"
by: "org.post.PostDataType.value('POST_TYPE_A')"
}
}
*/
def_type_fed2 := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[PostType, *localValueType]{
Name: `type_fed2`,
Type: grpcfed.CELIntType,
Setter: func(value *localValueType, v PostType) error {
value.vars.TypeFed2 = v
return nil
},
Enum: func(ctx context.Context, value *localValueType) (PostType, error) {
src, err := grpcfed.EvalCEL(ctx, &grpcfed.EvalCELRequest{
Value: value,
Expr: `org.post.PostDataType.value('POST_TYPE_A')`,
OutType: reflect.TypeOf(post.PostDataType(0)),
CacheIndex: 16,
})
if err != nil {
return 0, err
}
v := src.(post.PostDataType)
return s.cast_Org_Post_PostDataType__to__Org_Federation_PostType(v)
},
})
}
// A tree view of message dependencies is shown below.
/*
res2 ─┐
data2 ─┐
res ─┐ │
post ─┤
data_type ─┐ │
data_type2 ─┐ │
type_fed ─┤
type_fed2 ─┤
*/
eg, ctx1 := grpcfed.ErrorGroupWithContext(ctx)
grpcfed.GoWithRecover(eg, func() (any, error) {
if err := def_res2(ctx1); err != nil {
grpcfed.RecordErrorToSpan(ctx1, err)
return nil, err
}
if err := def_data2(ctx1); err != nil {
grpcfed.RecordErrorToSpan(ctx1, err)
return nil, err
}
return nil, nil
})
grpcfed.GoWithRecover(eg, func() (any, error) {
if err := def_res(ctx1); err != nil {
grpcfed.RecordErrorToSpan(ctx1, err)
return nil, err
}
if err := def_post(ctx1); err != nil {
grpcfed.RecordErrorToSpan(ctx1, err)
return nil, err
}
return nil, nil
})
grpcfed.GoWithRecover(eg, func() (any, error) {
if err := def_data_type(ctx1); err != nil {
grpcfed.RecordErrorToSpan(ctx1, err)
return nil, err
}
if err := def_data_type2(ctx1); err != nil {
grpcfed.RecordErrorToSpan(ctx1, err)
return nil, err
}
if err := def_type_fed(ctx1); err != nil {
grpcfed.RecordErrorToSpan(ctx1, err)
return nil, err
}
return nil, nil
})
grpcfed.GoWithRecover(eg, func() (any, error) {
if err := def_type_fed2(ctx1); err != nil {
grpcfed.RecordErrorToSpan(ctx1, err)
return nil, err
}
return nil, nil
})
if err := eg.Wait(); err != nil {
return nil, err
}
// assign named parameters to message arguments to pass to the custom resolver.
req.FederationService_Org_Federation_PostVariable.Data2 = value.vars.Data2
req.FederationService_Org_Federation_PostVariable.DataType = value.vars.DataType
req.FederationService_Org_Federation_PostVariable.DataType2 = value.vars.DataType2
req.FederationService_Org_Federation_PostVariable.Post = value.vars.Post
req.FederationService_Org_Federation_PostVariable.Res = value.vars.Res
req.FederationService_Org_Federation_PostVariable.Res2 = value.vars.Res2
req.FederationService_Org_Federation_PostVariable.TypeFed = value.vars.TypeFed
req.FederationService_Org_Federation_PostVariable.TypeFed2 = value.vars.TypeFed2
// create a message value to be returned.
ret := &Post{}
// field binding section.
ret.Id = value.vars.Post.GetId() // { name: "post", autobind: true }
{
dataValue, err := s.cast_Org_Post_PostData__to__Org_Federation_PostData(value.vars.Post.GetData()) // { name: "post", autobind: true }
if err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
ret.Data = dataValue
}
// (grpc.federation.field).by = "data2"
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[*post1.PostData]{
Value: value,
Expr: `data2`,
CacheIndex: 17,
Setter: func(v *post1.PostData) error {
data2Value, err := s.cast_Org_Post_V2_PostData__to__Org_Federation_PostData(v)
if err != nil {
return err
}
ret.Data2 = data2Value
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
// (grpc.federation.field).by = "data_type2"
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[*grpcfedcel.EnumSelector]{
Value: value,
Expr: `data_type2`,
CacheIndex: 18,
Setter: func(v *grpcfedcel.EnumSelector) error {
var typeValue PostType
if v.GetCond() {
if err := func(v *grpcfedcel.EnumSelector) error {
if v.GetCond() {
casted, err := s.cast_Org_Post_PostDataType__to__Org_Federation_PostType(post.PostDataType(v.GetTrueValue()))
if err != nil {
return err
}
typeValue = casted
} else {
casted, err := s.cast_Org_Post_V2_PostDataType__to__Org_Federation_PostType(post1.PostDataType(v.GetFalseValue()))
if err != nil {
return err
}
typeValue = casted
}
return nil
}(v.GetTrueSelector()); err != nil {
return err
}
} else {
casted, err := s.cast_Org_Post_V2_PostDataType__to__Org_Federation_PostType(post1.PostDataType(v.GetFalseValue()))
if err != nil {
return err
}
typeValue = casted
}
ret.Type = typeValue
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
// (grpc.federation.field).by = "type_fed"
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[PostType]{
Value: value,
Expr: `type_fed`,
CacheIndex: 19,
Setter: func(v PostType) error {
ret.Type2 = v
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
// (grpc.federation.field).by = "org.post.v2.PostDataType.value('POST_V2_TYPE_C')"
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[post1.PostDataType]{
Value: value,
Expr: `org.post.v2.PostDataType.value('POST_V2_TYPE_C')`,
CacheIndex: 20,
Setter: func(v post1.PostDataType) error {
type3Value, err := s.cast_Org_Post_V2_PostDataType__to__Org_Federation_PostType(v)
if err != nil {
return err
}
ret.Type3 = type3Value
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
// (grpc.federation.field).by = "type_fed2"
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[PostType]{
Value: value,
Expr: `type_fed2`,
CacheIndex: 21,
Setter: func(v PostType) error {
ret.Type4 = v
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
// (grpc.federation.field).by = "M{x: 'xxx'}"
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[*M]{
Value: value,
Expr: `M{x: 'xxx'}`,
CacheIndex: 22,
Setter: func(v *M) error {
mValue, err := s.cast_Org_Federation_M__to__Org_Post_M(v)
if err != nil {
return err
}
ret.M = mValue
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
grpcfed.Logger(ctx).DebugContext(ctx, "resolved org.federation.Post", slog.Any("org.federation.Post", s.logvalue_Org_Federation_Post(ret)))
return ret, nil
}
// cast_Org_Federation_GetPostRequest_ConditionA__to__Org_Post_PostConditionA cast from "org.federation.GetPostRequest.ConditionA" to "org.post.PostConditionA".
func (s *FederationService) cast_Org_Federation_GetPostRequest_ConditionA__to__Org_Post_PostConditionA(from *GetPostRequest_ConditionA) (*post.PostConditionA, error) {
if from == nil {
return nil, nil
}
propValue := from.GetProp()
ret := &post.PostConditionA{
Prop: propValue,
}
return ret, nil
}
// cast_Org_Federation_GetPostRequest_ConditionB__to__Org_Post_PostConditionB cast from "org.federation.GetPostRequest.ConditionB" to "org.post.PostConditionB".
func (s *FederationService) cast_Org_Federation_GetPostRequest_ConditionB__to__Org_Post_PostConditionB(from *GetPostRequest_ConditionB) (*post.PostConditionB, error) {
if from == nil {
return nil, nil
}
ret := &post.PostConditionB{}
return ret, nil
}
// cast_Org_Federation_M__to__Org_Post_M cast from "org.federation.M" to "org.post.M".
func (s *FederationService) cast_Org_Federation_M__to__Org_Post_M(from *M) (*post.M, error) {
if from == nil {
return nil, nil
}
xValue := from.GetX()
ret := &post.M{
X: xValue,
}
return ret, nil
}
// cast_Org_Post_PostContent_Category__to__Org_Federation_PostContent_Category cast from "org.post.PostContent.Category" to "org.federation.PostContent.Category".
func (s *FederationService) cast_Org_Post_PostContent_Category__to__Org_Federation_PostContent_Category(from post.PostContent_Category) (PostContent_Category, error) {
var ret PostContent_Category
switch from {
case post.PostContent_CATEGORY_A:
ret = PostContent_CATEGORY_A
case post.PostContent_CATEGORY_B:
ret = PostContent_CATEGORY_B
default:
ret = 0
}
return ret, nil
}
// cast_Org_Post_PostContent__to__Org_Federation_PostContent cast from "org.post.PostContent" to "org.federation.PostContent".
func (s *FederationService) cast_Org_Post_PostContent__to__Org_Federation_PostContent(from *post.PostContent) (*PostContent, error) {
if from == nil {
return nil, nil
}
categoryValue, err := s.cast_Org_Post_PostContent_Category__to__Org_Federation_PostContent_Category(from.GetCategory())
if err != nil {
return nil, err
}
headValue := from.GetHead()
bodyValue := from.GetBody()
dupBodyValue := from.GetBody()
countsValue := from.GetCounts()
ret := &PostContent{
Category: categoryValue,
Head: headValue,
Body: bodyValue,
DupBody: dupBodyValue,
Counts: countsValue,
}
return ret, nil
}
// cast_Org_Post_PostDataType__to__Org_Federation_PostType cast from "org.post.PostDataType" to "org.federation.PostType".
func (s *FederationService) cast_Org_Post_PostDataType__to__Org_Federation_PostType(from post.PostDataType) (PostType, error) {
var ret PostType
switch from {
case post.PostDataType_POST_TYPE_A:
ret = PostType_POST_TYPE_FOO
case post.PostDataType_POST_TYPE_B:
ret = PostType_POST_TYPE_BAR
case post.PostDataType_POST_TYPE_C:
ret = PostType_POST_TYPE_BAR
default:
ret = PostType_POST_TYPE_UNKNOWN
}
return ret, nil
}
// cast_Org_Post_PostData__to__Org_Federation_PostData cast from "org.post.PostData" to "org.federation.PostData".
func (s *FederationService) cast_Org_Post_PostData__to__Org_Federation_PostData(from *post.PostData) (*PostData, error) {
if from == nil {
return nil, nil
}
typeValue, err := s.cast_Org_Post_PostDataType__to__Org_Federation_PostType(from.GetType())
if err != nil {
return nil, err
}
titleValue := from.GetTitle()
contentValue, err := s.cast_Org_Post_PostContent__to__Org_Federation_PostContent(from.GetContent())
if err != nil {
return nil, err
}
ret := &PostData{
Type: typeValue,
Title: titleValue,
Content: contentValue,
}
return ret, nil
}
// cast_Org_Post_V2_PostContent_Category__to__Org_Federation_PostContent_Category cast from "org.post.v2.PostContent.Category" to "org.federation.PostContent.Category".
func (s *FederationService) cast_Org_Post_V2_PostContent_Category__to__Org_Federation_PostContent_Category(from post1.PostContent_Category) (PostContent_Category, error) {
var ret PostContent_Category
switch from {
case post1.PostContent_CATEGORY_A:
ret = PostContent_CATEGORY_A
case post1.PostContent_CATEGORY_B:
ret = PostContent_CATEGORY_B
default:
ret = 0
}
return ret, nil
}
// cast_Org_Post_V2_PostContent__to__Org_Federation_PostContent cast from "org.post.v2.PostContent" to "org.federation.PostContent".
func (s *FederationService) cast_Org_Post_V2_PostContent__to__Org_Federation_PostContent(from *post1.PostContent) (*PostContent, error) {
if from == nil {
return nil, nil
}
categoryValue, err := s.cast_Org_Post_V2_PostContent_Category__to__Org_Federation_PostContent_Category(from.GetCategory())
if err != nil {
return nil, err
}
headValue := from.GetHead()
bodyValue := from.GetBody()
dupBodyValue := from.GetBody()
countsValue := from.GetCounts()
ret := &PostContent{
Category: categoryValue,
Head: headValue,
Body: bodyValue,
DupBody: dupBodyValue,
Counts: countsValue,
}
return ret, nil
}
// cast_Org_Post_V2_PostDataType__to__Org_Federation_PostType cast from "org.post.v2.PostDataType" to "org.federation.PostType".
func (s *FederationService) cast_Org_Post_V2_PostDataType__to__Org_Federation_PostType(from post1.PostDataType) (PostType, error) {
var ret PostType
switch from {
case post1.PostDataType_POST_TYPE_A:
ret = PostType_POST_TYPE_FOO
case post1.PostDataType_POST_V2_TYPE_B:
ret = PostType_POST_TYPE_BAR
case post1.PostDataType_POST_V2_TYPE_C:
ret = PostType_POST_TYPE_BAR
default:
ret = PostType_POST_TYPE_UNKNOWN
}
return ret, nil
}
// cast_Org_Post_V2_PostData__to__Org_Federation_PostData cast from "org.post.v2.PostData" to "org.federation.PostData".
func (s *FederationService) cast_Org_Post_V2_PostData__to__Org_Federation_PostData(from *post1.PostData) (*PostData, error) {
if from == nil {
return nil, nil
}
typeValue, err := s.cast_Org_Post_V2_PostDataType__to__Org_Federation_PostType(from.GetType())
if err != nil {
return nil, err
}
titleValue := from.GetTitle()
contentValue, err := s.cast_Org_Post_V2_PostContent__to__Org_Federation_PostContent(from.GetContent())
if err != nil {
return nil, err
}
ret := &PostData{
Type: typeValue,
Title: titleValue,
Content: contentValue,
}
return ret, nil
}
func (s *FederationService) logvalue_Org_Federation_GetPostRequest_ConditionA(v *GetPostRequest_ConditionA) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.String("prop", v.GetProp()),
)
}
func (s *FederationService) logvalue_Org_Federation_GetPostRequest_ConditionB(v *GetPostRequest_ConditionB) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue()
}
func (s *FederationService) logvalue_Org_Federation_GetPostResponse(v *GetPostResponse) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.Any("post", s.logvalue_Org_Federation_Post(v.GetPost())),
)
}
func (s *FederationService) logvalue_Org_Federation_GetPostResponseArgument(v *FederationService_Org_Federation_GetPostResponseArgument) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.String("id", v.Id),
slog.Any("a", s.logvalue_Org_Federation_GetPostRequest_ConditionA(v.A)),
slog.Any("condition_b", s.logvalue_Org_Federation_GetPostRequest_ConditionB(v.ConditionB)),
)
}
func (s *FederationService) logvalue_Org_Federation_Post(v *Post) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.String("id", v.GetId()),
slog.Any("data", s.logvalue_Org_Federation_PostData(v.GetData())),
slog.Any("data2", s.logvalue_Org_Federation_PostData(v.GetData2())),
slog.String("type", s.logvalue_Org_Federation_PostType(v.GetType()).String()),
slog.String("type2", s.logvalue_Org_Federation_PostType(v.GetType2()).String()),
slog.String("type3", s.logvalue_Org_Federation_PostType(v.GetType3()).String()),
slog.String("type4", s.logvalue_Org_Federation_PostType(v.GetType4()).String()),
slog.Any("m", s.logvalue_Org_Post_M(v.GetM())),
)
}
func (s *FederationService) logvalue_Org_Federation_PostArgument(v *FederationService_Org_Federation_PostArgument) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.String("id", v.Id),
slog.Any("a", s.logvalue_Org_Federation_GetPostRequest_ConditionA(v.A)),
slog.Any("b", s.logvalue_Org_Federation_GetPostRequest_ConditionB(v.B)),
)
}
func (s *FederationService) logvalue_Org_Federation_PostContent(v *PostContent) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.String("category", s.logvalue_Org_Federation_PostContent_Category(v.GetCategory()).String()),
slog.String("head", v.GetHead()),
slog.String("body", v.GetBody()),
slog.String("dup_body", v.GetDupBody()),
slog.Any("counts", s.logvalue_Org_Federation_PostContent_CountsEntry(v.GetCounts())),
)
}
func (s *FederationService) logvalue_Org_Federation_PostContent_Category(v PostContent_Category) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
switch v {
case PostContent_CATEGORY_A:
return slog.StringValue("CATEGORY_A")
case PostContent_CATEGORY_B:
return slog.StringValue("CATEGORY_B")
case PostContent_CATEGORY_C:
return slog.StringValue("CATEGORY_C")
}
return slog.StringValue("")
}
func (s *FederationService) logvalue_Org_Federation_PostContent_CountsEntry(v map[int32]int32) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
attrs := make([]slog.Attr, 0, len(v))
for key, value := range v {
attrs = append(attrs, slog.Attr{
Key: grpcfed.ToLogAttrKey(key),
Value: slog.AnyValue(value),
})
}
return slog.GroupValue(attrs...)
}
func (s *FederationService) logvalue_Org_Federation_PostData(v *PostData) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.String("type", s.logvalue_Org_Federation_PostType(v.GetType()).String()),
slog.String("title", v.GetTitle()),
slog.Any("content", s.logvalue_Org_Federation_PostContent(v.GetContent())),
)
}
func (s *FederationService) logvalue_Org_Federation_PostType(v PostType) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
switch v {
case PostType_POST_TYPE_UNKNOWN:
return slog.StringValue("POST_TYPE_UNKNOWN")
case PostType_POST_TYPE_FOO:
return slog.StringValue("POST_TYPE_FOO")
case PostType_POST_TYPE_BAR:
return slog.StringValue("POST_TYPE_BAR")
case PostType_POST_TYPE_BAZ:
return slog.StringValue("POST_TYPE_BAZ")
}
return slog.StringValue("")
}
func (s *FederationService) logvalue_Org_Post_GetPostRequest(v *post.GetPostRequest) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.String("id", v.GetId()),
slog.Any("a", s.logvalue_Org_Post_PostConditionA(v.GetA())),
slog.Any("b", s.logvalue_Org_Post_PostConditionB(v.GetB())),
)
}
func (s *FederationService) logvalue_Org_Post_M(v *post.M) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.String("x", v.GetX()),
)
}
func (s *FederationService) logvalue_Org_Post_PostConditionA(v *post.PostConditionA) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.String("prop", v.GetProp()),
)
}
func (s *FederationService) logvalue_Org_Post_PostConditionB(v *post.PostConditionB) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue()
}
func (s *FederationService) logvalue_Org_Post_V2_GetPostRequest(v *post1.GetPostRequest) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.String("id", v.GetId()),
)
}
================================================
FILE: _examples/06_alias/go.mod
================================================
module example
go 1.24.0
replace github.com/mercari/grpc-federation => ../../
require (
github.com/google/go-cmp v0.7.0
github.com/mercari/grpc-federation v0.0.0-00010101000000-000000000000
go.opentelemetry.io/otel v1.24.0
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.21.0
go.opentelemetry.io/otel/sdk v1.24.0
go.opentelemetry.io/otel/trace v1.24.0
go.uber.org/goleak v1.3.0
google.golang.org/genproto/googleapis/rpc v0.0.0-20240826202546-f6391c0de4c7
google.golang.org/grpc v1.65.0
google.golang.org/protobuf v1.34.2
)
require (
cel.dev/expr v0.19.1 // indirect
github.com/antlr4-go/antlr/v4 v4.13.0 // indirect
github.com/cenkalti/backoff/v4 v4.2.1 // indirect
github.com/go-logr/logr v1.4.1 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
github.com/goccy/wasi-go v0.3.2 // indirect
github.com/google/cel-go v0.23.1 // indirect
github.com/google/uuid v1.6.0 // indirect
github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0 // indirect
github.com/kelseyhightower/envconfig v1.4.0 // indirect
github.com/stealthrocket/wazergo v0.19.1 // indirect
github.com/stoewer/go-strcase v1.3.0 // indirect
github.com/tetratelabs/wazero v1.10.1 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.21.0 // indirect
go.opentelemetry.io/otel/metric v1.24.0 // indirect
go.opentelemetry.io/proto/otlp v1.0.0 // indirect
golang.org/x/exp v0.0.0-20250506013437-ce4c2cf36ca6 // indirect
golang.org/x/net v0.38.0 // indirect
golang.org/x/sync v0.14.0 // indirect
golang.org/x/sys v0.37.0 // indirect
golang.org/x/text v0.23.0 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20240826202546-f6391c0de4c7 // indirect
)
================================================
FILE: _examples/06_alias/go.sum
================================================
cel.dev/expr v0.19.1 h1:NciYrtDRIR0lNCnH1LFJegdjspNx9fI59O7TWcua/W4=
cel.dev/expr v0.19.1/go.mod h1:MrpN08Q+lEBs+bGYdLxxHkZoUSsCp0nSKTs0nTymJgw=
github.com/antlr4-go/antlr/v4 v4.13.0 h1:lxCg3LAv+EUK6t1i0y1V6/SLeUi0eKEKdhQAlS8TVTI=
github.com/antlr4-go/antlr/v4 v4.13.0/go.mod h1:pfChB/xh/Unjila75QW7+VU4TSnWnnk9UTnmpPaOR2g=
github.com/cenkalti/backoff/v4 v4.2.1 h1:y4OZtCnogmCPw98Zjyt5a6+QwPLGkiQsYW5oUqylYbM=
github.com/cenkalti/backoff/v4 v4.2.1/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A=
github.com/go-logr/logr v1.4.1 h1:pKouT5E8xu9zeFC39JXRDukb6JFQPXM5p5I91188VAQ=
github.com/go-logr/logr v1.4.1/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY=
github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag=
github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE=
github.com/goccy/wasi-go v0.3.2 h1:wAvGXmqCkfcp0B0AwIp5Ya53hzDwkKm9W8iuT3nCCz0=
github.com/goccy/wasi-go v0.3.2/go.mod h1:nIKD204n9xa4Z20UV+XA483kIr9TAl2vXr+X5qVAO5M=
github.com/golang/glog v1.2.1 h1:OptwRhECazUx5ix5TTWC3EZhsZEHWcYWY4FQHTIubm4=
github.com/golang/glog v1.2.1/go.mod h1:6AhwSGph0fcJtXVM/PEHPqZlFeoLxhs7/t5UDAwmO+w=
github.com/google/cel-go v0.23.1 h1:91ThhEZlBcE5rB2adBVXqvDoqdL8BG2oyhd0bK1I/r4=
github.com/google/cel-go v0.23.1/go.mod h1:52Pb6QsDbC5kvgxvZhiL9QX1oZEkcUF/ZqaPx1J5Wwo=
github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8=
github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU=
github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0 h1:YBftPWNWd4WwGqtY2yeZL2ef8rHAxPBD8KFhJpmcqms=
github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0/go.mod h1:YN5jB8ie0yfIUg6VvR9Kz84aCaG7AsGZnLjhHbUqwPg=
github.com/kelseyhightower/envconfig v1.4.0 h1:Im6hONhd3pLkfDFsbRgu68RDNkGF1r3dvMUtDTo2cv8=
github.com/kelseyhightower/envconfig v1.4.0/go.mod h1:cccZRl6mQpaq41TPp5QxidR+Sa3axMbJDNb//FQX6Gg=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/stealthrocket/wazergo v0.19.1 h1:BPrITETPgSFwiytwmToO0MbUC/+RGC39JScz1JmmG6c=
github.com/stealthrocket/wazergo v0.19.1/go.mod h1:riI0hxw4ndZA5e6z7PesHg2BtTftcZaMxRcoiGGipTs=
github.com/stoewer/go-strcase v1.3.0 h1:g0eASXYtp+yvN9fK8sH94oCIk0fau9uV1/ZdJ0AVEzs=
github.com/stoewer/go-strcase v1.3.0/go.mod h1:fAH5hQ5pehh+j3nZfvwdk2RgEgQjAoM8wodgtPmh1xo=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=
github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo=
github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk=
github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
github.com/tetratelabs/wazero v1.10.1 h1:2DugeJf6VVk58KTPszlNfeeN8AhhpwcZqkJj2wwFuH8=
github.com/tetratelabs/wazero v1.10.1/go.mod h1:DRm5twOQ5Gr1AoEdSi0CLjDQF1J9ZAuyqFIjl1KKfQU=
go.opentelemetry.io/otel v1.24.0 h1:0LAOdjNmQeSTzGBzduGe/rU4tZhMwL5rWgtp9Ku5Jfo=
go.opentelemetry.io/otel v1.24.0/go.mod h1:W7b9Ozg4nkF5tWI5zsXkaKKDjdVjpD4oAt9Qi/MArHo=
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.21.0 h1:cl5P5/GIfFh4t6xyruOgJP5QiA1pw4fYYdv6nc6CBWw=
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.21.0/go.mod h1:zgBdWWAu7oEEMC06MMKc5NLbA/1YDXV1sMpSqEeLQLg=
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.21.0 h1:tIqheXEFWAZ7O8A7m+J0aPTmpJN3YQ7qetUAdkkkKpk=
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.21.0/go.mod h1:nUeKExfxAQVbiVFn32YXpXZZHZ61Cc3s3Rn1pDBGAb0=
go.opentelemetry.io/otel/metric v1.24.0 h1:6EhoGWWK28x1fbpA4tYTOWBkPefTDQnb8WSGXlc88kI=
go.opentelemetry.io/otel/metric v1.24.0/go.mod h1:VYhLe1rFfxuTXLgj4CBiyz+9WYBA8pNGJgDcSFRKBco=
go.opentelemetry.io/otel/sdk v1.24.0 h1:YMPPDNymmQN3ZgczicBY3B6sf9n62Dlj9pWD3ucgoDw=
go.opentelemetry.io/otel/sdk v1.24.0/go.mod h1:KVrIYw6tEubO9E96HQpcmpTKDVn9gdv35HoYiQWGDFg=
go.opentelemetry.io/otel/trace v1.24.0 h1:CsKnnL4dUAr/0llH9FKuc698G04IrpWV0MQA/Y1YELI=
go.opentelemetry.io/otel/trace v1.24.0/go.mod h1:HPc3Xr/cOApsBI154IU0OI0HJexz+aw5uPdbs3UCjNU=
go.opentelemetry.io/proto/otlp v1.0.0 h1:T0TX0tmXU8a3CbNXzEKGeU5mIVOdf0oykP+u2lIVU/I=
go.opentelemetry.io/proto/otlp v1.0.0/go.mod h1:Sy6pihPLfYHkr3NkUbEhGHFhINUSI/v80hjKIs5JXpM=
go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto=
go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE=
golang.org/x/exp v0.0.0-20250506013437-ce4c2cf36ca6 h1:y5zboxd6LQAqYIhHnB48p0ByQ/GnQx2BE33L8BOHQkI=
golang.org/x/exp v0.0.0-20250506013437-ce4c2cf36ca6/go.mod h1:U6Lno4MTRCDY+Ba7aCcauB9T60gsv5s4ralQzP72ZoQ=
golang.org/x/net v0.38.0 h1:vRMAPTMaeGqVhG5QyLJHqNDwecKTomGeqbnfZyKlBI8=
golang.org/x/net v0.38.0/go.mod h1:ivrbrMbzFq5J41QOQh0siUuly180yBYtLp+CKbEaFx8=
golang.org/x/sync v0.14.0 h1:woo0S4Yywslg6hp4eUFjTVOyKt0RookbpAHG4c1HmhQ=
golang.org/x/sync v0.14.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA=
golang.org/x/sys v0.37.0 h1:fdNQudmxPjkdUTPnLn5mdQv7Zwvbvpaxqs831goi9kQ=
golang.org/x/sys v0.37.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks=
golang.org/x/text v0.23.0 h1:D71I7dUrlY+VX0gQShAThNGHFxZ13dGLBHQLVl1mJlY=
golang.org/x/text v0.23.0/go.mod h1:/BLNzu4aZCJ1+kcD0DNRotWKage4q2rGVAg4o22unh4=
google.golang.org/genproto/googleapis/api v0.0.0-20240826202546-f6391c0de4c7 h1:YcyjlL1PRr2Q17/I0dPk2JmYS5CDXfcdb2Z3YRioEbw=
google.golang.org/genproto/googleapis/api v0.0.0-20240826202546-f6391c0de4c7/go.mod h1:OCdP9MfskevB/rbYvHTsXTtKC+3bHWajPdoKgjcYkfo=
google.golang.org/genproto/googleapis/rpc v0.0.0-20240826202546-f6391c0de4c7 h1:2035KHhUv+EpyB+hWgJnaWKJOdX1E95w2S8Rr4uWKTs=
google.golang.org/genproto/googleapis/rpc v0.0.0-20240826202546-f6391c0de4c7/go.mod h1:UqMtugtsSgubUsoxbuAoiCXvqvErP7Gf0so0mK9tHxU=
google.golang.org/grpc v1.65.0 h1:bs/cUb4lp1G5iImFFd3u5ixQzweKizoZJAwBNLR42lc=
google.golang.org/grpc v1.65.0/go.mod h1:WgYC2ypjlB0EiQi6wdKixMqukr6lBc0Vo+oOgjrM5ZQ=
google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg=
google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
================================================
FILE: _examples/06_alias/grpc/federation/federation.pb.go
================================================
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.33.0
// protoc (unknown)
// source: grpc/federation/federation.proto
package federation
import (
_ "github.com/mercari/grpc-federation/grpc/federation/cel"
code "google.golang.org/genproto/googleapis/rpc/code"
errdetails "google.golang.org/genproto/googleapis/rpc/errdetails"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
descriptorpb "google.golang.org/protobuf/types/descriptorpb"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
// TypeKind is primitive kind list.
type TypeKind int32
const (
// UNKNOWN represents unexpected value.
TypeKind_UNKNOWN TypeKind = 0
// STRING is used to convert the input value to `string` type.
TypeKind_STRING TypeKind = 1
// BOOL is used to convert the input value to `bool` type.
TypeKind_BOOL TypeKind = 2
// INT64 is used to convert the input value to `int64` type.
TypeKind_INT64 TypeKind = 3
// UINT64 is used to convert the input value to `uint64` type.
TypeKind_UINT64 TypeKind = 4
// DOUBLE is used to convert the input value to `double` type.
TypeKind_DOUBLE TypeKind = 5
// DURATION is used to convert the input value to the `google.protobuf.Duration` type.
TypeKind_DURATION TypeKind = 6
)
// Enum value maps for TypeKind.
var (
TypeKind_name = map[int32]string{
0: "UNKNOWN",
1: "STRING",
2: "BOOL",
3: "INT64",
4: "UINT64",
5: "DOUBLE",
6: "DURATION",
}
TypeKind_value = map[string]int32{
"UNKNOWN": 0,
"STRING": 1,
"BOOL": 2,
"INT64": 3,
"UINT64": 4,
"DOUBLE": 5,
"DURATION": 6,
}
)
func (x TypeKind) Enum() *TypeKind {
p := new(TypeKind)
*p = x
return p
}
func (x TypeKind) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (TypeKind) Descriptor() protoreflect.EnumDescriptor {
return file_grpc_federation_federation_proto_enumTypes[0].Descriptor()
}
func (TypeKind) Type() protoreflect.EnumType {
return &file_grpc_federation_federation_proto_enumTypes[0]
}
func (x TypeKind) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use TypeKind.Descriptor instead.
func (TypeKind) EnumDescriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{0}
}
// LogLevel is the importance or severity of a log event.
type GRPCError_LogLevel int32
const (
// UNKNOWN represents unexpected value.
GRPCError_UNKNOWN GRPCError_LogLevel = 0
// DEBUG is used for detailed information that is useful during development and debugging.
GRPCError_DEBUG GRPCError_LogLevel = 1
// INFO logs are used to provide information about the normal functioning of the application.
GRPCError_INFO GRPCError_LogLevel = 2
// WARN signifies a potential problem or warning that does not necessarily stop the program from working but may lead to issues in the future.
GRPCError_WARN GRPCError_LogLevel = 3
// ERROR indicates a serious issue that has caused a failure in the application.
GRPCError_ERROR GRPCError_LogLevel = 4
)
// Enum value maps for GRPCError_LogLevel.
var (
GRPCError_LogLevel_name = map[int32]string{
0: "UNKNOWN",
1: "DEBUG",
2: "INFO",
3: "WARN",
4: "ERROR",
}
GRPCError_LogLevel_value = map[string]int32{
"UNKNOWN": 0,
"DEBUG": 1,
"INFO": 2,
"WARN": 3,
"ERROR": 4,
}
)
func (x GRPCError_LogLevel) Enum() *GRPCError_LogLevel {
p := new(GRPCError_LogLevel)
*p = x
return p
}
func (x GRPCError_LogLevel) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (GRPCError_LogLevel) Descriptor() protoreflect.EnumDescriptor {
return file_grpc_federation_federation_proto_enumTypes[1].Descriptor()
}
func (GRPCError_LogLevel) Type() protoreflect.EnumType {
return &file_grpc_federation_federation_proto_enumTypes[1]
}
func (x GRPCError_LogLevel) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use GRPCError_LogLevel.Descriptor instead.
func (GRPCError_LogLevel) EnumDescriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{24, 0}
}
type FileRule struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Plugin *CELPlugin `protobuf:"bytes,1,opt,name=plugin,proto3" json:"plugin,omitempty"`
// import can be used to resolve methods, messages, etc. that are referenced in gRPC Federation rules.
Import []string `protobuf:"bytes,2,rep,name=import,proto3" json:"import,omitempty"`
}
func (x *FileRule) Reset() {
*x = FileRule{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *FileRule) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*FileRule) ProtoMessage() {}
func (x *FileRule) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use FileRule.ProtoReflect.Descriptor instead.
func (*FileRule) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{0}
}
func (x *FileRule) GetPlugin() *CELPlugin {
if x != nil {
return x.Plugin
}
return nil
}
func (x *FileRule) GetImport() []string {
if x != nil {
return x.Import
}
return nil
}
type EnumRule struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// alias mapping between enums defined in other packages and enums defined on the federation service side.
// The alias is the FQDN ( . ) to the enum.
// If this definition exists, type conversion is automatically performed before the enum value assignment operation.
// If a enum with this option has a value that is not present in the enum specified by alias, and the alias option is not specified for that value, an error is occurred.
// You can specify multiple aliases. In that case, only values common to all aliases will be considered.
// Specifying a value that is not included in either alias will result in an error.
Alias []string `protobuf:"bytes,1,rep,name=alias,proto3" json:"alias,omitempty"`
}
func (x *EnumRule) Reset() {
*x = EnumRule{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *EnumRule) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*EnumRule) ProtoMessage() {}
func (x *EnumRule) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use EnumRule.ProtoReflect.Descriptor instead.
func (*EnumRule) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{1}
}
func (x *EnumRule) GetAlias() []string {
if x != nil {
return x.Alias
}
return nil
}
type EnumValueRule struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// specifies the default value of the enum.
// All values other than those specified in alias will be default values.
Default *bool `protobuf:"varint,1,opt,name=default,proto3,oneof" json:"default,omitempty"`
// alias can be used when alias is specified in grpc.federation.enum option,
// and specifies the value name to be referenced among the enums specified in alias of enum option.
// multiple value names can be specified for alias.
Alias []string `protobuf:"bytes,2,rep,name=alias,proto3" json:"alias,omitempty"`
// attr is used to hold multiple name-value pairs corresponding to an enum value.
// The values specified by the name must be consistently specified for all enum values.
// The values stored using this feature can be retrieved using the `attr()` method of the enum API.
Attr []*EnumValueAttribute `protobuf:"bytes,3,rep,name=attr,proto3" json:"attr,omitempty"`
// noalias exclude from the target of alias.
// This option cannot be specified simultaneously with `default` or `alias`.
Noalias *bool `protobuf:"varint,4,opt,name=noalias,proto3,oneof" json:"noalias,omitempty"`
}
func (x *EnumValueRule) Reset() {
*x = EnumValueRule{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *EnumValueRule) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*EnumValueRule) ProtoMessage() {}
func (x *EnumValueRule) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use EnumValueRule.ProtoReflect.Descriptor instead.
func (*EnumValueRule) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{2}
}
func (x *EnumValueRule) GetDefault() bool {
if x != nil && x.Default != nil {
return *x.Default
}
return false
}
func (x *EnumValueRule) GetAlias() []string {
if x != nil {
return x.Alias
}
return nil
}
func (x *EnumValueRule) GetAttr() []*EnumValueAttribute {
if x != nil {
return x.Attr
}
return nil
}
func (x *EnumValueRule) GetNoalias() bool {
if x != nil && x.Noalias != nil {
return *x.Noalias
}
return false
}
type EnumValueAttribute struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// name is the attribute key.
// This value is used to search for values using the `attr()` method.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// value represents the value corresponding to `name`.
Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
}
func (x *EnumValueAttribute) Reset() {
*x = EnumValueAttribute{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *EnumValueAttribute) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*EnumValueAttribute) ProtoMessage() {}
func (x *EnumValueAttribute) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[3]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use EnumValueAttribute.ProtoReflect.Descriptor instead.
func (*EnumValueAttribute) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{3}
}
func (x *EnumValueAttribute) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *EnumValueAttribute) GetValue() string {
if x != nil {
return x.Value
}
return ""
}
type OneofRule struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
}
func (x *OneofRule) Reset() {
*x = OneofRule{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *OneofRule) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*OneofRule) ProtoMessage() {}
func (x *OneofRule) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[4]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use OneofRule.ProtoReflect.Descriptor instead.
func (*OneofRule) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{4}
}
// ServiceRule define gRPC Federation rules for the service.
type ServiceRule struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// env defines the environment variable.
Env *Env `protobuf:"bytes,1,opt,name=env,proto3" json:"env,omitempty"`
// var defines the service-level variables.
Var []*ServiceVariable `protobuf:"bytes,2,rep,name=var,proto3" json:"var,omitempty"`
}
func (x *ServiceRule) Reset() {
*x = ServiceRule{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[5]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ServiceRule) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ServiceRule) ProtoMessage() {}
func (x *ServiceRule) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[5]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ServiceRule.ProtoReflect.Descriptor instead.
func (*ServiceRule) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{5}
}
func (x *ServiceRule) GetEnv() *Env {
if x != nil {
return x.Env
}
return nil
}
func (x *ServiceRule) GetVar() []*ServiceVariable {
if x != nil {
return x.Var
}
return nil
}
// Env is used when setting environment variables.
// There are two ways to configure it.
type Env struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// var is used to directly list environment variables.
Var []*EnvVar `protobuf:"bytes,1,rep,name=var,proto3" json:"var,omitempty"`
// message is used to reference an already defined Protocol Buffers' message for defining environment variables.
// If you want to set detailed options for the fields of the message, use the `env` option in FieldRule.
Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
}
func (x *Env) Reset() {
*x = Env{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[6]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Env) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Env) ProtoMessage() {}
func (x *Env) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[6]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Env.ProtoReflect.Descriptor instead.
func (*Env) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{6}
}
func (x *Env) GetVar() []*EnvVar {
if x != nil {
return x.Var
}
return nil
}
func (x *Env) GetMessage() string {
if x != nil {
return x.Message
}
return ""
}
// ServiceVariable define variables at the service level.
// This definition is executed at server startup, after the initialization of Env.
// The defined variables can be used across all messages that the service depends on.
type ServiceVariable struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// name is a variable name.
// This name can be referenced in all CELs related to the service by using `grpc.federation.var.` prefix.
Name *string `protobuf:"bytes,1,opt,name=name,proto3,oneof" json:"name,omitempty"`
// if specify the condition for evaluating expr.
// this value evaluated by CEL and it must return a boolean value.
// If the result of evaluation is `false`, the value assigned to name is the default value of the result of evaluation of `expr`.
If *string `protobuf:"bytes,2,opt,name=if,proto3,oneof" json:"if,omitempty"`
// expr specify the value to be assigned to name.
//
// Types that are assignable to Expr:
//
// *ServiceVariable_By
// *ServiceVariable_Map
// *ServiceVariable_Message
// *ServiceVariable_Validation
// *ServiceVariable_Enum
// *ServiceVariable_Switch
Expr isServiceVariable_Expr `protobuf_oneof:"expr"`
}
func (x *ServiceVariable) Reset() {
*x = ServiceVariable{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[7]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ServiceVariable) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ServiceVariable) ProtoMessage() {}
func (x *ServiceVariable) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[7]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ServiceVariable.ProtoReflect.Descriptor instead.
func (*ServiceVariable) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{7}
}
func (x *ServiceVariable) GetName() string {
if x != nil && x.Name != nil {
return *x.Name
}
return ""
}
func (x *ServiceVariable) GetIf() string {
if x != nil && x.If != nil {
return *x.If
}
return ""
}
func (m *ServiceVariable) GetExpr() isServiceVariable_Expr {
if m != nil {
return m.Expr
}
return nil
}
func (x *ServiceVariable) GetBy() string {
if x, ok := x.GetExpr().(*ServiceVariable_By); ok {
return x.By
}
return ""
}
func (x *ServiceVariable) GetMap() *MapExpr {
if x, ok := x.GetExpr().(*ServiceVariable_Map); ok {
return x.Map
}
return nil
}
func (x *ServiceVariable) GetMessage() *MessageExpr {
if x, ok := x.GetExpr().(*ServiceVariable_Message); ok {
return x.Message
}
return nil
}
func (x *ServiceVariable) GetValidation() *ServiceVariableValidationExpr {
if x, ok := x.GetExpr().(*ServiceVariable_Validation); ok {
return x.Validation
}
return nil
}
func (x *ServiceVariable) GetEnum() *EnumExpr {
if x, ok := x.GetExpr().(*ServiceVariable_Enum); ok {
return x.Enum
}
return nil
}
func (x *ServiceVariable) GetSwitch() *SwitchExpr {
if x, ok := x.GetExpr().(*ServiceVariable_Switch); ok {
return x.Switch
}
return nil
}
type isServiceVariable_Expr interface {
isServiceVariable_Expr()
}
type ServiceVariable_By struct {
// `by` evaluates with CEL.
By string `protobuf:"bytes,11,opt,name=by,proto3,oneof"`
}
type ServiceVariable_Map struct {
// map apply map operation for the specified repeated type.
Map *MapExpr `protobuf:"bytes,12,opt,name=map,proto3,oneof"`
}
type ServiceVariable_Message struct {
// message gets with message arguments.
Message *MessageExpr `protobuf:"bytes,13,opt,name=message,proto3,oneof"`
}
type ServiceVariable_Validation struct {
// validation defines the validation rule and message.
Validation *ServiceVariableValidationExpr `protobuf:"bytes,14,opt,name=validation,proto3,oneof"`
}
type ServiceVariable_Enum struct {
// enum gets with cel value.
Enum *EnumExpr `protobuf:"bytes,15,opt,name=enum,proto3,oneof"`
}
type ServiceVariable_Switch struct {
// switch provides conditional evaluation with multiple branches.
Switch *SwitchExpr `protobuf:"bytes,16,opt,name=switch,proto3,oneof"`
}
func (*ServiceVariable_By) isServiceVariable_Expr() {}
func (*ServiceVariable_Map) isServiceVariable_Expr() {}
func (*ServiceVariable_Message) isServiceVariable_Expr() {}
func (*ServiceVariable_Validation) isServiceVariable_Expr() {}
func (*ServiceVariable_Enum) isServiceVariable_Expr() {}
func (*ServiceVariable_Switch) isServiceVariable_Expr() {}
// ServiceVariableValidationExpr represents validation rule and error message.
type ServiceVariableValidationExpr struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// if specifies condition in CEL. If the condition is true, it returns error.
// The return value must always be of type boolean.
If string `protobuf:"bytes,1,opt,name=if,proto3" json:"if,omitempty"`
// message is a error message in CEL.
Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
}
func (x *ServiceVariableValidationExpr) Reset() {
*x = ServiceVariableValidationExpr{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[8]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ServiceVariableValidationExpr) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ServiceVariableValidationExpr) ProtoMessage() {}
func (x *ServiceVariableValidationExpr) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[8]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ServiceVariableValidationExpr.ProtoReflect.Descriptor instead.
func (*ServiceVariableValidationExpr) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{8}
}
func (x *ServiceVariableValidationExpr) GetIf() string {
if x != nil {
return x.If
}
return ""
}
func (x *ServiceVariableValidationExpr) GetMessage() string {
if x != nil {
return x.Message
}
return ""
}
// EnvVar represents an environment variable.
type EnvVar struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// name is an environment variable name.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// type is an environment variable type.
Type *EnvType `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"`
// option is an additional option for parsing environment variable.
Option *EnvVarOption `protobuf:"bytes,3,opt,name=option,proto3,oneof" json:"option,omitempty"`
}
func (x *EnvVar) Reset() {
*x = EnvVar{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[9]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *EnvVar) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*EnvVar) ProtoMessage() {}
func (x *EnvVar) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[9]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use EnvVar.ProtoReflect.Descriptor instead.
func (*EnvVar) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{9}
}
func (x *EnvVar) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *EnvVar) GetType() *EnvType {
if x != nil {
return x.Type
}
return nil
}
func (x *EnvVar) GetOption() *EnvVarOption {
if x != nil {
return x.Option
}
return nil
}
// EnvType represents type information for environment variable.
type EnvType struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Types that are assignable to Type:
//
// *EnvType_Kind
// *EnvType_Repeated
// *EnvType_Map
Type isEnvType_Type `protobuf_oneof:"type"`
}
func (x *EnvType) Reset() {
*x = EnvType{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[10]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *EnvType) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*EnvType) ProtoMessage() {}
func (x *EnvType) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[10]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use EnvType.ProtoReflect.Descriptor instead.
func (*EnvType) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{10}
}
func (m *EnvType) GetType() isEnvType_Type {
if m != nil {
return m.Type
}
return nil
}
func (x *EnvType) GetKind() TypeKind {
if x, ok := x.GetType().(*EnvType_Kind); ok {
return x.Kind
}
return TypeKind_UNKNOWN
}
func (x *EnvType) GetRepeated() *EnvType {
if x, ok := x.GetType().(*EnvType_Repeated); ok {
return x.Repeated
}
return nil
}
func (x *EnvType) GetMap() *EnvMapType {
if x, ok := x.GetType().(*EnvType_Map); ok {
return x.Map
}
return nil
}
type isEnvType_Type interface {
isEnvType_Type()
}
type EnvType_Kind struct {
// kind is used when the type is a primitive type.
Kind TypeKind `protobuf:"varint,1,opt,name=kind,proto3,enum=grpc.federation.TypeKind,oneof"`
}
type EnvType_Repeated struct {
// repeated is used when the type is a repeated type.
Repeated *EnvType `protobuf:"bytes,2,opt,name=repeated,proto3,oneof"`
}
type EnvType_Map struct {
// map is used when the type is a map type.
Map *EnvMapType `protobuf:"bytes,3,opt,name=map,proto3,oneof"`
}
func (*EnvType_Kind) isEnvType_Type() {}
func (*EnvType_Repeated) isEnvType_Type() {}
func (*EnvType_Map) isEnvType_Type() {}
// EnvMapType represents map type.
type EnvMapType struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// key represents map's key type.
Key *EnvType `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
// value represents map's value type.
Value *EnvType `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
}
func (x *EnvMapType) Reset() {
*x = EnvMapType{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[11]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *EnvMapType) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*EnvMapType) ProtoMessage() {}
func (x *EnvMapType) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[11]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use EnvMapType.ProtoReflect.Descriptor instead.
func (*EnvMapType) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{11}
}
func (x *EnvMapType) GetKey() *EnvType {
if x != nil {
return x.Key
}
return nil
}
func (x *EnvMapType) GetValue() *EnvType {
if x != nil {
return x.Value
}
return nil
}
// EnvVarOption represents additional option for environment variable.
// The option work with the `envconfig` library in Go language.
// For detailed specifications, please refer to the library's documentation ( https://pkg.go.dev/github.com/kelseyhightower/envconfig#section-readme ).
type EnvVarOption struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// alternate use this option if you want to use an environment variable with a different name than the value specified in `EnvVar.name`.
Alternate *string `protobuf:"bytes,1,opt,name=alternate,proto3,oneof" json:"alternate,omitempty"`
// default specify the value to use as a fallback if the specified environment variable is not found.
Default *string `protobuf:"bytes,2,opt,name=default,proto3,oneof" json:"default,omitempty"`
// required require the environment variable to exist.
// If it does not exist, an error will occur at startup.
Required *bool `protobuf:"varint,3,opt,name=required,proto3,oneof" json:"required,omitempty"`
// ignored if ignored is true, it does nothing even if the environment variable exists.
Ignored *bool `protobuf:"varint,4,opt,name=ignored,proto3,oneof" json:"ignored,omitempty"`
}
func (x *EnvVarOption) Reset() {
*x = EnvVarOption{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[12]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *EnvVarOption) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*EnvVarOption) ProtoMessage() {}
func (x *EnvVarOption) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[12]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use EnvVarOption.ProtoReflect.Descriptor instead.
func (*EnvVarOption) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{12}
}
func (x *EnvVarOption) GetAlternate() string {
if x != nil && x.Alternate != nil {
return *x.Alternate
}
return ""
}
func (x *EnvVarOption) GetDefault() string {
if x != nil && x.Default != nil {
return *x.Default
}
return ""
}
func (x *EnvVarOption) GetRequired() bool {
if x != nil && x.Required != nil {
return *x.Required
}
return false
}
func (x *EnvVarOption) GetIgnored() bool {
if x != nil && x.Ignored != nil {
return *x.Ignored
}
return false
}
type MethodRule struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// the time to timeout. If the specified time period elapses, DEADLINE_EXCEEDED status is returned.
// If you want to handle this error, you need to implement a custom error handler in Go.
// The format is the same as Go's time.Duration format. See https://pkg.go.dev/time#ParseDuration.
Timeout *string `protobuf:"bytes,1,opt,name=timeout,proto3,oneof" json:"timeout,omitempty"`
// response specify the name of the message you want to use to create the response value.
// If you specify a reserved type like `google.protobuf.Empty` as the response, you cannot define gRPC Federation options.
// In such cases, you can specify a separate message to create the response value.
// The specified response message must contain fields with the same names and types as all the fields in the original response.
Response *string `protobuf:"bytes,2,opt,name=response,proto3,oneof" json:"response,omitempty"`
}
func (x *MethodRule) Reset() {
*x = MethodRule{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[13]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *MethodRule) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*MethodRule) ProtoMessage() {}
func (x *MethodRule) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[13]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use MethodRule.ProtoReflect.Descriptor instead.
func (*MethodRule) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{13}
}
func (x *MethodRule) GetTimeout() string {
if x != nil && x.Timeout != nil {
return *x.Timeout
}
return ""
}
func (x *MethodRule) GetResponse() string {
if x != nil && x.Response != nil {
return *x.Response
}
return ""
}
// MessageRule define gRPC Federation rules for the message.
type MessageRule struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// def specify variables to be used in field binding by `grpc.federation.field` option.
Def []*VariableDefinition `protobuf:"bytes,1,rep,name=def,proto3" json:"def,omitempty"`
// if custom_resolver is true, the resolver for this message is implemented by Go.
// If there are any values retrieved by resolver or messages, they are passed as arguments for custom resolver.
// Each field of the message returned by the custom resolver is automatically bound.
// If you want to change the binding process for a particular field, set `custom_resolver=true` option for that field.
CustomResolver *bool `protobuf:"varint,2,opt,name=custom_resolver,json=customResolver,proto3,oneof" json:"custom_resolver,omitempty"`
// alias mapping between messages defined in other packages and messages defined on the federation service side.
// The alias is the FQDN ( . ) to the message.
// If this definition exists, type conversion is automatically performed before the field assignment operation.
// If a message with this option has a field that is not present in the message specified by alias, and the alias option is not specified for that field, an error is occurred.
// You can specify multiple aliases. In that case, only fields common to all aliases will be considered.
// Specifying a field that is not included in either alias will result in an error.
Alias []string `protobuf:"bytes,3,rep,name=alias,proto3" json:"alias,omitempty"`
}
func (x *MessageRule) Reset() {
*x = MessageRule{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[14]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *MessageRule) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*MessageRule) ProtoMessage() {}
func (x *MessageRule) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[14]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use MessageRule.ProtoReflect.Descriptor instead.
func (*MessageRule) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{14}
}
func (x *MessageRule) GetDef() []*VariableDefinition {
if x != nil {
return x.Def
}
return nil
}
func (x *MessageRule) GetCustomResolver() bool {
if x != nil && x.CustomResolver != nil {
return *x.CustomResolver
}
return false
}
func (x *MessageRule) GetAlias() []string {
if x != nil {
return x.Alias
}
return nil
}
// VariableDefinition represents variable definition.
type VariableDefinition struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// name is a variable name.
// This name can be referenced in all CELs defined after itself in the same message.
// It can also be referenced in `grpc.federation.field` option.
Name *string `protobuf:"bytes,1,opt,name=name,proto3,oneof" json:"name,omitempty"`
// if specify the condition for evaluating expr.
// this value evaluated by CEL and it must return a boolean value.
// If the result of evaluation is `false`, the value assigned to name is the default value of the result of evaluation of `expr`.
If *string `protobuf:"bytes,2,opt,name=if,proto3,oneof" json:"if,omitempty"`
// autobind if the result value of `expr` is a message type,
// the value of a field with the same name and type as the field name of its own message is automatically assigned to the value of the field in the message.
// If multiple autobinds are used at the same message,
// you must explicitly use the `grpc.federation.field` option to do the binding yourself, since duplicate field names cannot be correctly determined as one.
Autobind *bool `protobuf:"varint,3,opt,name=autobind,proto3,oneof" json:"autobind,omitempty"`
// expr specify the value to be assigned to name.
//
// Types that are assignable to Expr:
//
// *VariableDefinition_By
// *VariableDefinition_Map
// *VariableDefinition_Message
// *VariableDefinition_Call
// *VariableDefinition_Validation
// *VariableDefinition_Enum
// *VariableDefinition_Switch
Expr isVariableDefinition_Expr `protobuf_oneof:"expr"`
}
func (x *VariableDefinition) Reset() {
*x = VariableDefinition{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[15]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *VariableDefinition) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*VariableDefinition) ProtoMessage() {}
func (x *VariableDefinition) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[15]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use VariableDefinition.ProtoReflect.Descriptor instead.
func (*VariableDefinition) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{15}
}
func (x *VariableDefinition) GetName() string {
if x != nil && x.Name != nil {
return *x.Name
}
return ""
}
func (x *VariableDefinition) GetIf() string {
if x != nil && x.If != nil {
return *x.If
}
return ""
}
func (x *VariableDefinition) GetAutobind() bool {
if x != nil && x.Autobind != nil {
return *x.Autobind
}
return false
}
func (m *VariableDefinition) GetExpr() isVariableDefinition_Expr {
if m != nil {
return m.Expr
}
return nil
}
func (x *VariableDefinition) GetBy() string {
if x, ok := x.GetExpr().(*VariableDefinition_By); ok {
return x.By
}
return ""
}
func (x *VariableDefinition) GetMap() *MapExpr {
if x, ok := x.GetExpr().(*VariableDefinition_Map); ok {
return x.Map
}
return nil
}
func (x *VariableDefinition) GetMessage() *MessageExpr {
if x, ok := x.GetExpr().(*VariableDefinition_Message); ok {
return x.Message
}
return nil
}
func (x *VariableDefinition) GetCall() *CallExpr {
if x, ok := x.GetExpr().(*VariableDefinition_Call); ok {
return x.Call
}
return nil
}
func (x *VariableDefinition) GetValidation() *ValidationExpr {
if x, ok := x.GetExpr().(*VariableDefinition_Validation); ok {
return x.Validation
}
return nil
}
func (x *VariableDefinition) GetEnum() *EnumExpr {
if x, ok := x.GetExpr().(*VariableDefinition_Enum); ok {
return x.Enum
}
return nil
}
func (x *VariableDefinition) GetSwitch() *SwitchExpr {
if x, ok := x.GetExpr().(*VariableDefinition_Switch); ok {
return x.Switch
}
return nil
}
type isVariableDefinition_Expr interface {
isVariableDefinition_Expr()
}
type VariableDefinition_By struct {
// `by` evaluates with CEL.
By string `protobuf:"bytes,11,opt,name=by,proto3,oneof"`
}
type VariableDefinition_Map struct {
// map apply map operation for the specified repeated type.
Map *MapExpr `protobuf:"bytes,12,opt,name=map,proto3,oneof"`
}
type VariableDefinition_Message struct {
// message gets with message arguments.
Message *MessageExpr `protobuf:"bytes,13,opt,name=message,proto3,oneof"`
}
type VariableDefinition_Call struct {
// call specifies how to call gRPC method.
Call *CallExpr `protobuf:"bytes,14,opt,name=call,proto3,oneof"`
}
type VariableDefinition_Validation struct {
// validation defines the validation rule and error.
Validation *ValidationExpr `protobuf:"bytes,15,opt,name=validation,proto3,oneof"`
}
type VariableDefinition_Enum struct {
// enum gets with cel value.
Enum *EnumExpr `protobuf:"bytes,16,opt,name=enum,proto3,oneof"`
}
type VariableDefinition_Switch struct {
// switch provides conditional evaluation with multiple branches.
Switch *SwitchExpr `protobuf:"bytes,17,opt,name=switch,proto3,oneof"`
}
func (*VariableDefinition_By) isVariableDefinition_Expr() {}
func (*VariableDefinition_Map) isVariableDefinition_Expr() {}
func (*VariableDefinition_Message) isVariableDefinition_Expr() {}
func (*VariableDefinition_Call) isVariableDefinition_Expr() {}
func (*VariableDefinition_Validation) isVariableDefinition_Expr() {}
func (*VariableDefinition_Enum) isVariableDefinition_Expr() {}
func (*VariableDefinition_Switch) isVariableDefinition_Expr() {}
// MapExpr apply map operation for the specified repeated type.
type MapExpr struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// iterator define iterator variable.
// When evaluating CEL in `expr`, we can refer to the name defined in iterator.
Iterator *Iterator `protobuf:"bytes,1,opt,name=iterator,proto3" json:"iterator,omitempty"`
// expr creates map elements using iterator variable.
//
// Types that are assignable to Expr:
//
// *MapExpr_By
// *MapExpr_Message
// *MapExpr_Enum
Expr isMapExpr_Expr `protobuf_oneof:"expr"`
}
func (x *MapExpr) Reset() {
*x = MapExpr{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[16]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *MapExpr) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*MapExpr) ProtoMessage() {}
func (x *MapExpr) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[16]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use MapExpr.ProtoReflect.Descriptor instead.
func (*MapExpr) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{16}
}
func (x *MapExpr) GetIterator() *Iterator {
if x != nil {
return x.Iterator
}
return nil
}
func (m *MapExpr) GetExpr() isMapExpr_Expr {
if m != nil {
return m.Expr
}
return nil
}
func (x *MapExpr) GetBy() string {
if x, ok := x.GetExpr().(*MapExpr_By); ok {
return x.By
}
return ""
}
func (x *MapExpr) GetMessage() *MessageExpr {
if x, ok := x.GetExpr().(*MapExpr_Message); ok {
return x.Message
}
return nil
}
func (x *MapExpr) GetEnum() *EnumExpr {
if x, ok := x.GetExpr().(*MapExpr_Enum); ok {
return x.Enum
}
return nil
}
type isMapExpr_Expr interface {
isMapExpr_Expr()
}
type MapExpr_By struct {
// `by` evaluates with CEL.
// this can refer to the variable declared by `iterator`.
By string `protobuf:"bytes,11,opt,name=by,proto3,oneof"`
}
type MapExpr_Message struct {
// message gets with message arguments, and it is made an element of the map.
// The result type of MapExpr is the repeated type of the specified message.
Message *MessageExpr `protobuf:"bytes,12,opt,name=message,proto3,oneof"`
}
type MapExpr_Enum struct {
// enum creates enum value for each element of the map.
// The result type of MapExpr is the repeated type of the specified enum.
Enum *EnumExpr `protobuf:"bytes,13,opt,name=enum,proto3,oneof"`
}
func (*MapExpr_By) isMapExpr_Expr() {}
func (*MapExpr_Message) isMapExpr_Expr() {}
func (*MapExpr_Enum) isMapExpr_Expr() {}
// Iterator represents iterator variable.
type Iterator struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// variable name.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// src the value that will be the source for creating the iterator.
// src must be a repeated type.
Src string `protobuf:"bytes,2,opt,name=src,proto3" json:"src,omitempty"`
}
func (x *Iterator) Reset() {
*x = Iterator{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[17]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Iterator) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Iterator) ProtoMessage() {}
func (x *Iterator) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[17]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Iterator.ProtoReflect.Descriptor instead.
func (*Iterator) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{17}
}
func (x *Iterator) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *Iterator) GetSrc() string {
if x != nil {
return x.Src
}
return ""
}
// MessageExpr represents dependent message.
type MessageExpr struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// name specify the message name by FQDN. format is `.`.
// can be omitted when referring to messages in the same package.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// args specify the parameters needed to get the message. This is called the "message arguments".
Args []*Argument `protobuf:"bytes,2,rep,name=args,proto3" json:"args,omitempty"`
}
func (x *MessageExpr) Reset() {
*x = MessageExpr{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[18]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *MessageExpr) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*MessageExpr) ProtoMessage() {}
func (x *MessageExpr) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[18]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use MessageExpr.ProtoReflect.Descriptor instead.
func (*MessageExpr) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{18}
}
func (x *MessageExpr) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *MessageExpr) GetArgs() []*Argument {
if x != nil {
return x.Args
}
return nil
}
// EnumExpr represents dependent enum.
type EnumExpr struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// name specify the enum name by FQDN. format is `.`.
// can be omitted when referring to enum in the same package.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// `by` evaluates with CEL.
By string `protobuf:"bytes,2,opt,name=by,proto3" json:"by,omitempty"`
}
func (x *EnumExpr) Reset() {
*x = EnumExpr{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[19]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *EnumExpr) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*EnumExpr) ProtoMessage() {}
func (x *EnumExpr) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[19]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use EnumExpr.ProtoReflect.Descriptor instead.
func (*EnumExpr) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{19}
}
func (x *EnumExpr) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *EnumExpr) GetBy() string {
if x != nil {
return x.By
}
return ""
}
// CallExpr represents how to call gRPC method.
type CallExpr struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// method specify the FQDN for the gRPC method. format is `./`.
Method string `protobuf:"bytes,1,opt,name=method,proto3" json:"method,omitempty"`
// request specify request parameters for the gRPC method.
Request []*MethodRequest `protobuf:"bytes,2,rep,name=request,proto3" json:"request,omitempty"`
// the time to timeout. If the specified time period elapses, DEADLINE_EXCEEDED status is returned.
// If you want to handle this error, you need to implement a custom error handler in Go.
// The format is the same as Go's time.Duration format. See https://pkg.go.dev/time#ParseDuration.
Timeout *string `protobuf:"bytes,3,opt,name=timeout,proto3,oneof" json:"timeout,omitempty"`
// retry specifies the retry policy if the method call fails.
Retry *RetryPolicy `protobuf:"bytes,4,opt,name=retry,proto3,oneof" json:"retry,omitempty"`
// error evaluated when an error occurs during a method call.
// Multiple errors can be defined and are evaluated in the order in which they are described.
// If an error occurs while creating an gRPC status error, original error will be returned.
Error []*GRPCError `protobuf:"bytes,5,rep,name=error,proto3" json:"error,omitempty"`
// option is the gRPC's call option (https://pkg.go.dev/google.golang.org/grpc#CallOption).
Option *GRPCCallOption `protobuf:"bytes,6,opt,name=option,proto3,oneof" json:"option,omitempty"`
// metadata specify outgoing metadata with CEL value.
// The specified type must always be of type map.
Metadata *string `protobuf:"bytes,7,opt,name=metadata,proto3,oneof" json:"metadata,omitempty"`
}
func (x *CallExpr) Reset() {
*x = CallExpr{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[20]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *CallExpr) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CallExpr) ProtoMessage() {}
func (x *CallExpr) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[20]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use CallExpr.ProtoReflect.Descriptor instead.
func (*CallExpr) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{20}
}
func (x *CallExpr) GetMethod() string {
if x != nil {
return x.Method
}
return ""
}
func (x *CallExpr) GetRequest() []*MethodRequest {
if x != nil {
return x.Request
}
return nil
}
func (x *CallExpr) GetTimeout() string {
if x != nil && x.Timeout != nil {
return *x.Timeout
}
return ""
}
func (x *CallExpr) GetRetry() *RetryPolicy {
if x != nil {
return x.Retry
}
return nil
}
func (x *CallExpr) GetError() []*GRPCError {
if x != nil {
return x.Error
}
return nil
}
func (x *CallExpr) GetOption() *GRPCCallOption {
if x != nil {
return x.Option
}
return nil
}
func (x *CallExpr) GetMetadata() string {
if x != nil && x.Metadata != nil {
return *x.Metadata
}
return ""
}
// SwitchExpr represents a switch statement. At least one "case", and "default", must be defined. All
// case.if expressions must evaluate to a boolean value. All case.by expressions, and default.by, must
// evaluate to the same type (the return type of the switch).
//
// When executed, the case.if expressions are evaluated in order, and, for the first case whose
// case.if expression evaluates to true, its case.by is evaluated to make the return value of the
// SwitchExpr.
// If no case.if evaluates to true, default.by is evaluated to make the return value.
type SwitchExpr struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Cases for the switch expression.
Case []*SwitchCaseExpr `protobuf:"bytes,1,rep,name=case,proto3" json:"case,omitempty"`
// The default case, if none of the "case.if" expressions evaluate to true.
Default *SwitchDefaultExpr `protobuf:"bytes,2,opt,name=default,proto3" json:"default,omitempty"`
}
func (x *SwitchExpr) Reset() {
*x = SwitchExpr{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[21]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *SwitchExpr) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*SwitchExpr) ProtoMessage() {}
func (x *SwitchExpr) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[21]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use SwitchExpr.ProtoReflect.Descriptor instead.
func (*SwitchExpr) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{21}
}
func (x *SwitchExpr) GetCase() []*SwitchCaseExpr {
if x != nil {
return x.Case
}
return nil
}
func (x *SwitchExpr) GetDefault() *SwitchDefaultExpr {
if x != nil {
return x.Default
}
return nil
}
// SwitchCaseExpr represents a single case for a switch expression.
type SwitchCaseExpr struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// if specify the condition for evaluating expr.
// this value evaluated by CEL and it must return a boolean value.
If string `protobuf:"bytes,1,opt,name=if,proto3" json:"if,omitempty"`
// def define variables in current scope.
Def []*VariableDefinition `protobuf:"bytes,2,rep,name=def,proto3" json:"def,omitempty"`
// expr specify the value to return for the case.
//
// Types that are assignable to Expr:
//
// *SwitchCaseExpr_By
Expr isSwitchCaseExpr_Expr `protobuf_oneof:"expr"`
}
func (x *SwitchCaseExpr) Reset() {
*x = SwitchCaseExpr{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[22]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *SwitchCaseExpr) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*SwitchCaseExpr) ProtoMessage() {}
func (x *SwitchCaseExpr) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[22]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use SwitchCaseExpr.ProtoReflect.Descriptor instead.
func (*SwitchCaseExpr) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{22}
}
func (x *SwitchCaseExpr) GetIf() string {
if x != nil {
return x.If
}
return ""
}
func (x *SwitchCaseExpr) GetDef() []*VariableDefinition {
if x != nil {
return x.Def
}
return nil
}
func (m *SwitchCaseExpr) GetExpr() isSwitchCaseExpr_Expr {
if m != nil {
return m.Expr
}
return nil
}
func (x *SwitchCaseExpr) GetBy() string {
if x, ok := x.GetExpr().(*SwitchCaseExpr_By); ok {
return x.By
}
return ""
}
type isSwitchCaseExpr_Expr interface {
isSwitchCaseExpr_Expr()
}
type SwitchCaseExpr_By struct {
// `by` evaluates with CEL.
By string `protobuf:"bytes,11,opt,name=by,proto3,oneof"`
}
func (*SwitchCaseExpr_By) isSwitchCaseExpr_Expr() {}
// SwitchDefaultExpr represents the default case for a switch expression.
type SwitchDefaultExpr struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// def define variables in current scope.
Def []*VariableDefinition `protobuf:"bytes,1,rep,name=def,proto3" json:"def,omitempty"`
// expr specify the value to return for the default case.
//
// Types that are assignable to Expr:
//
// *SwitchDefaultExpr_By
Expr isSwitchDefaultExpr_Expr `protobuf_oneof:"expr"`
}
func (x *SwitchDefaultExpr) Reset() {
*x = SwitchDefaultExpr{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[23]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *SwitchDefaultExpr) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*SwitchDefaultExpr) ProtoMessage() {}
func (x *SwitchDefaultExpr) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[23]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use SwitchDefaultExpr.ProtoReflect.Descriptor instead.
func (*SwitchDefaultExpr) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{23}
}
func (x *SwitchDefaultExpr) GetDef() []*VariableDefinition {
if x != nil {
return x.Def
}
return nil
}
func (m *SwitchDefaultExpr) GetExpr() isSwitchDefaultExpr_Expr {
if m != nil {
return m.Expr
}
return nil
}
func (x *SwitchDefaultExpr) GetBy() string {
if x, ok := x.GetExpr().(*SwitchDefaultExpr_By); ok {
return x.By
}
return ""
}
type isSwitchDefaultExpr_Expr interface {
isSwitchDefaultExpr_Expr()
}
type SwitchDefaultExpr_By struct {
// `by` evaluates with CEL.
By string `protobuf:"bytes,11,opt,name=by,proto3,oneof"`
}
func (*SwitchDefaultExpr_By) isSwitchDefaultExpr_Expr() {}
// GRPCError create gRPC status value.
type GRPCError struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// def define variables in current scope.
Def []*VariableDefinition `protobuf:"bytes,1,rep,name=def,proto3" json:"def,omitempty"`
// if specifies condition in CEL. If the condition is true, it returns defined error information.
// If this field is omitted, it is always treated as 'true' and returns defined error information.
// The return value must always be of type boolean.
If *string `protobuf:"bytes,2,opt,name=if,proto3,oneof" json:"if,omitempty"`
// code is a gRPC status code.
Code *code.Code `protobuf:"varint,3,opt,name=code,proto3,enum=google.rpc.Code,oneof" json:"code,omitempty"`
// message is a gRPC status message.
// If omitted, the message will be auto-generated from the configurations.
Message *string `protobuf:"bytes,4,opt,name=message,proto3,oneof" json:"message,omitempty"`
// details is a list of error details.
// If returns error, the corresponding error details are set.
Details []*GRPCErrorDetail `protobuf:"bytes,5,rep,name=details,proto3" json:"details,omitempty"`
// ignore ignore the error if the condition in the "if" field is true and "ignore" field is set to true.
// When an error is ignored, the returned response is always null value.
// If you want to return a response that is not null, please use `ignore_and_response` feature.
// Therefore, `ignore` and `ignore_and_response` cannot be specified same.
Ignore *bool `protobuf:"varint,6,opt,name=ignore,proto3,oneof" json:"ignore,omitempty"`
// ignore_and_response ignore the error if the condition in the "if" field is true and it returns response specified in CEL.
// The evaluation value of CEL must always be the same as the response message type.
// `ignore` and `ignore_and_response` cannot be specified same.
IgnoreAndResponse *string `protobuf:"bytes,7,opt,name=ignore_and_response,json=ignoreAndResponse,proto3,oneof" json:"ignore_and_response,omitempty"`
// log_level can be configured to output logs as any log level.
// If DEBUG is specified for the log_level, logs are output as debug logs.
// default value is ERROR.
LogLevel *GRPCError_LogLevel `protobuf:"varint,8,opt,name=log_level,json=logLevel,proto3,enum=grpc.federation.GRPCError_LogLevel,oneof" json:"log_level,omitempty"`
}
func (x *GRPCError) Reset() {
*x = GRPCError{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[24]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GRPCError) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GRPCError) ProtoMessage() {}
func (x *GRPCError) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[24]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GRPCError.ProtoReflect.Descriptor instead.
func (*GRPCError) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{24}
}
func (x *GRPCError) GetDef() []*VariableDefinition {
if x != nil {
return x.Def
}
return nil
}
func (x *GRPCError) GetIf() string {
if x != nil && x.If != nil {
return *x.If
}
return ""
}
func (x *GRPCError) GetCode() code.Code {
if x != nil && x.Code != nil {
return *x.Code
}
return code.Code(0)
}
func (x *GRPCError) GetMessage() string {
if x != nil && x.Message != nil {
return *x.Message
}
return ""
}
func (x *GRPCError) GetDetails() []*GRPCErrorDetail {
if x != nil {
return x.Details
}
return nil
}
func (x *GRPCError) GetIgnore() bool {
if x != nil && x.Ignore != nil {
return *x.Ignore
}
return false
}
func (x *GRPCError) GetIgnoreAndResponse() string {
if x != nil && x.IgnoreAndResponse != nil {
return *x.IgnoreAndResponse
}
return ""
}
func (x *GRPCError) GetLogLevel() GRPCError_LogLevel {
if x != nil && x.LogLevel != nil {
return *x.LogLevel
}
return GRPCError_UNKNOWN
}
type GRPCErrorDetail struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// if specifies condition rule in CEL. If the condition is true, gRPC error detail is added to the error.
If string `protobuf:"bytes,1,opt,name=if,proto3" json:"if,omitempty"`
// def define variables in current scope.
Def []*VariableDefinition `protobuf:"bytes,2,rep,name=def,proto3" json:"def,omitempty"`
// message represents arbitrary messages to describe the detail of the error.
Message []*MessageExpr `protobuf:"bytes,3,rep,name=message,proto3" json:"message,omitempty"`
// error_info describes the cause of the error with structured details.
ErrorInfo []*errdetails.ErrorInfo `protobuf:"bytes,4,rep,name=error_info,json=errorInfo,proto3" json:"error_info,omitempty"`
// retry_info describes when the clients can retry a failed request.
RetryInfo []*errdetails.RetryInfo `protobuf:"bytes,5,rep,name=retry_info,json=retryInfo,proto3" json:"retry_info,omitempty"`
// debug_info describes additional debugging info.
DebugInfo []*errdetails.DebugInfo `protobuf:"bytes,6,rep,name=debug_info,json=debugInfo,proto3" json:"debug_info,omitempty"`
// quota_failure describes how a quota check failed.
QuotaFailure []*errdetails.QuotaFailure `protobuf:"bytes,7,rep,name=quota_failure,json=quotaFailure,proto3" json:"quota_failure,omitempty"`
// precondition_failure describes what preconditions have failed.
PreconditionFailure []*errdetails.PreconditionFailure `protobuf:"bytes,8,rep,name=precondition_failure,json=preconditionFailure,proto3" json:"precondition_failure,omitempty"`
// bad_request describes violations in a client request.
BadRequest []*errdetails.BadRequest `protobuf:"bytes,9,rep,name=bad_request,json=badRequest,proto3" json:"bad_request,omitempty"`
// request_info contains metadata about the request that clients can attach.
RequestInfo []*errdetails.RequestInfo `protobuf:"bytes,10,rep,name=request_info,json=requestInfo,proto3" json:"request_info,omitempty"`
// resource_info describes the resource that is being accessed.
ResourceInfo []*errdetails.ResourceInfo `protobuf:"bytes,11,rep,name=resource_info,json=resourceInfo,proto3" json:"resource_info,omitempty"`
// help provides links to documentation or for performing an out of band action.
Help []*errdetails.Help `protobuf:"bytes,12,rep,name=help,proto3" json:"help,omitempty"`
// localized_message provides a localized error message that is safe to return to the user.
LocalizedMessage []*errdetails.LocalizedMessage `protobuf:"bytes,13,rep,name=localized_message,json=localizedMessage,proto3" json:"localized_message,omitempty"`
// by specify a message in CEL to express the details of the error.
By []string `protobuf:"bytes,14,rep,name=by,proto3" json:"by,omitempty"`
}
func (x *GRPCErrorDetail) Reset() {
*x = GRPCErrorDetail{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[25]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GRPCErrorDetail) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GRPCErrorDetail) ProtoMessage() {}
func (x *GRPCErrorDetail) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[25]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GRPCErrorDetail.ProtoReflect.Descriptor instead.
func (*GRPCErrorDetail) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{25}
}
func (x *GRPCErrorDetail) GetIf() string {
if x != nil {
return x.If
}
return ""
}
func (x *GRPCErrorDetail) GetDef() []*VariableDefinition {
if x != nil {
return x.Def
}
return nil
}
func (x *GRPCErrorDetail) GetMessage() []*MessageExpr {
if x != nil {
return x.Message
}
return nil
}
func (x *GRPCErrorDetail) GetErrorInfo() []*errdetails.ErrorInfo {
if x != nil {
return x.ErrorInfo
}
return nil
}
func (x *GRPCErrorDetail) GetRetryInfo() []*errdetails.RetryInfo {
if x != nil {
return x.RetryInfo
}
return nil
}
func (x *GRPCErrorDetail) GetDebugInfo() []*errdetails.DebugInfo {
if x != nil {
return x.DebugInfo
}
return nil
}
func (x *GRPCErrorDetail) GetQuotaFailure() []*errdetails.QuotaFailure {
if x != nil {
return x.QuotaFailure
}
return nil
}
func (x *GRPCErrorDetail) GetPreconditionFailure() []*errdetails.PreconditionFailure {
if x != nil {
return x.PreconditionFailure
}
return nil
}
func (x *GRPCErrorDetail) GetBadRequest() []*errdetails.BadRequest {
if x != nil {
return x.BadRequest
}
return nil
}
func (x *GRPCErrorDetail) GetRequestInfo() []*errdetails.RequestInfo {
if x != nil {
return x.RequestInfo
}
return nil
}
func (x *GRPCErrorDetail) GetResourceInfo() []*errdetails.ResourceInfo {
if x != nil {
return x.ResourceInfo
}
return nil
}
func (x *GRPCErrorDetail) GetHelp() []*errdetails.Help {
if x != nil {
return x.Help
}
return nil
}
func (x *GRPCErrorDetail) GetLocalizedMessage() []*errdetails.LocalizedMessage {
if x != nil {
return x.LocalizedMessage
}
return nil
}
func (x *GRPCErrorDetail) GetBy() []string {
if x != nil {
return x.By
}
return nil
}
// GRPCCallOption configures a gRPC Call before it starts or extracts information from a gRPC Call after it completes.
type GRPCCallOption struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// set the content-subtype. For example, if content-subtype is "json", the Content-Type over the wire will be "application/grpc+json".
// The content-subtype is converted to lowercase before being included in Content-Type.
// See Content-Type on https://github.com/grpc/grpc/blob/master/doc/PROTOCOL-HTTP2.md#requests for more details.
// If no such codec is found, the call will result in an error with code INTERNAL.
ContentSubtype *string `protobuf:"bytes,1,opt,name=content_subtype,json=contentSubtype,proto3,oneof" json:"content_subtype,omitempty"`
// header retrieves the header metadata for a unary RPC.
// In order to obtain the metadata, you must specify a variable of type map in the header.
// e.g.)
// def [
//
// { name: "hdr" by: "grpc.federation.metadata.new()" }
// { call { method: "pkg.Method" option { header: "hdr" } } }
//
// ]
Header *string `protobuf:"bytes,2,opt,name=header,proto3,oneof" json:"header,omitempty"`
// max_call_recv_msg_size sets the maximum message size in bytes the client can receive.
// If this is not set, gRPC uses the default 4MB.
MaxCallRecvMsgSize *int64 `protobuf:"varint,3,opt,name=max_call_recv_msg_size,json=maxCallRecvMsgSize,proto3,oneof" json:"max_call_recv_msg_size,omitempty"`
// max_call_send_msg_size sets the maximum message size in bytes the client can send.
// If this is not set, gRPC uses the default maximum number of int32 range.
MaxCallSendMsgSize *int64 `protobuf:"varint,4,opt,name=max_call_send_msg_size,json=maxCallSendMsgSize,proto3,oneof" json:"max_call_send_msg_size,omitempty"`
// static_method specifies that a call is being made to a method that is static,
// which means the method is known at compile time and doesn't change at runtime.
// This can be used as a signal to stats plugins that this method is safe to include as a key to a measurement.
StaticMethod *bool `protobuf:"varint,5,opt,name=static_method,json=staticMethod,proto3,oneof" json:"static_method,omitempty"`
// trailer retrieves the trailer metadata for a unary RPC.
// In order to obtain the metadata, you must specify a variable of type map in the trailer.
// e.g.)
// def [
//
// { name: "trl" by: "grpc.federation.metadata.new()" }
// { call { method: "pkg.Method" option { trailer: "trl" } } }
//
// ]
Trailer *string `protobuf:"bytes,6,opt,name=trailer,proto3,oneof" json:"trailer,omitempty"`
// wait_for_ready configures the RPC's behavior when the client is in TRANSIENT_FAILURE,
// which occurs when all addresses fail to connect.
// If wait_for_ready is false, the RPC will fail immediately.
// Otherwise, the client will wait until a connection becomes available or the RPC's deadline is reached.
// By default, RPCs do not "wait for ready".
WaitForReady *bool `protobuf:"varint,7,opt,name=wait_for_ready,json=waitForReady,proto3,oneof" json:"wait_for_ready,omitempty"`
}
func (x *GRPCCallOption) Reset() {
*x = GRPCCallOption{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[26]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GRPCCallOption) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GRPCCallOption) ProtoMessage() {}
func (x *GRPCCallOption) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[26]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GRPCCallOption.ProtoReflect.Descriptor instead.
func (*GRPCCallOption) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{26}
}
func (x *GRPCCallOption) GetContentSubtype() string {
if x != nil && x.ContentSubtype != nil {
return *x.ContentSubtype
}
return ""
}
func (x *GRPCCallOption) GetHeader() string {
if x != nil && x.Header != nil {
return *x.Header
}
return ""
}
func (x *GRPCCallOption) GetMaxCallRecvMsgSize() int64 {
if x != nil && x.MaxCallRecvMsgSize != nil {
return *x.MaxCallRecvMsgSize
}
return 0
}
func (x *GRPCCallOption) GetMaxCallSendMsgSize() int64 {
if x != nil && x.MaxCallSendMsgSize != nil {
return *x.MaxCallSendMsgSize
}
return 0
}
func (x *GRPCCallOption) GetStaticMethod() bool {
if x != nil && x.StaticMethod != nil {
return *x.StaticMethod
}
return false
}
func (x *GRPCCallOption) GetTrailer() string {
if x != nil && x.Trailer != nil {
return *x.Trailer
}
return ""
}
func (x *GRPCCallOption) GetWaitForReady() bool {
if x != nil && x.WaitForReady != nil {
return *x.WaitForReady
}
return false
}
// Validation represents a validation rule against variables defined within the current scope.
type ValidationExpr struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// name is a unique name for the validation.
// If set, the validation error type will be Error.
// If omitted, the validation error type will be ValidationError.
Name *string `protobuf:"bytes,1,opt,name=name,proto3,oneof" json:"name,omitempty"`
// error defines the actual validation rules and an error to returned if the validation fails.
Error *GRPCError `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"`
}
func (x *ValidationExpr) Reset() {
*x = ValidationExpr{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[27]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ValidationExpr) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ValidationExpr) ProtoMessage() {}
func (x *ValidationExpr) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[27]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ValidationExpr.ProtoReflect.Descriptor instead.
func (*ValidationExpr) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{27}
}
func (x *ValidationExpr) GetName() string {
if x != nil && x.Name != nil {
return *x.Name
}
return ""
}
func (x *ValidationExpr) GetError() *GRPCError {
if x != nil {
return x.Error
}
return nil
}
// RetryPolicy define the retry policy if the method call fails.
type RetryPolicy struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Types that are assignable to Policy:
//
// *RetryPolicy_Constant
// *RetryPolicy_Exponential
Policy isRetryPolicy_Policy `protobuf_oneof:"policy"`
// if specifies condition in CEL. If the condition is true, run the retry process according to the policy.
// If this field is omitted, it is always treated as 'true' and run the retry process.
// The return value must always be of type boolean.
If string `protobuf:"bytes,3,opt,name=if,proto3" json:"if,omitempty"`
}
func (x *RetryPolicy) Reset() {
*x = RetryPolicy{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[28]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *RetryPolicy) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*RetryPolicy) ProtoMessage() {}
func (x *RetryPolicy) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[28]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use RetryPolicy.ProtoReflect.Descriptor instead.
func (*RetryPolicy) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{28}
}
func (m *RetryPolicy) GetPolicy() isRetryPolicy_Policy {
if m != nil {
return m.Policy
}
return nil
}
func (x *RetryPolicy) GetConstant() *RetryPolicyConstant {
if x, ok := x.GetPolicy().(*RetryPolicy_Constant); ok {
return x.Constant
}
return nil
}
func (x *RetryPolicy) GetExponential() *RetryPolicyExponential {
if x, ok := x.GetPolicy().(*RetryPolicy_Exponential); ok {
return x.Exponential
}
return nil
}
func (x *RetryPolicy) GetIf() string {
if x != nil {
return x.If
}
return ""
}
type isRetryPolicy_Policy interface {
isRetryPolicy_Policy()
}
type RetryPolicy_Constant struct {
// retry according to the "constant" policy.
Constant *RetryPolicyConstant `protobuf:"bytes,1,opt,name=constant,proto3,oneof"`
}
type RetryPolicy_Exponential struct {
// retry according to the "exponential backoff" policy.
// The following Go library is used in the implementation,
// so please refer to the library documentation for how to specify each parameter.
// https://pkg.go.dev/github.com/cenkalti/backoff/v4#section-readme.
Exponential *RetryPolicyExponential `protobuf:"bytes,2,opt,name=exponential,proto3,oneof"`
}
func (*RetryPolicy_Constant) isRetryPolicy_Policy() {}
func (*RetryPolicy_Exponential) isRetryPolicy_Policy() {}
// RetryPolicyConstant define "constant" based retry policy.
type RetryPolicyConstant struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// interval value. ( default value is 1s ).
Interval *string `protobuf:"bytes,1,opt,name=interval,proto3,oneof" json:"interval,omitempty"`
// max retry count. ( default value is 5. If zero is specified, it never stops )
MaxRetries *uint64 `protobuf:"varint,2,opt,name=max_retries,json=maxRetries,proto3,oneof" json:"max_retries,omitempty"`
}
func (x *RetryPolicyConstant) Reset() {
*x = RetryPolicyConstant{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[29]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *RetryPolicyConstant) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*RetryPolicyConstant) ProtoMessage() {}
func (x *RetryPolicyConstant) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[29]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use RetryPolicyConstant.ProtoReflect.Descriptor instead.
func (*RetryPolicyConstant) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{29}
}
func (x *RetryPolicyConstant) GetInterval() string {
if x != nil && x.Interval != nil {
return *x.Interval
}
return ""
}
func (x *RetryPolicyConstant) GetMaxRetries() uint64 {
if x != nil && x.MaxRetries != nil {
return *x.MaxRetries
}
return 0
}
// RetryPolicyExponential define "exponential backoff" based retry policy.
type RetryPolicyExponential struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// initial interval value. ( default value is "500ms" ).
InitialInterval *string `protobuf:"bytes,1,opt,name=initial_interval,json=initialInterval,proto3,oneof" json:"initial_interval,omitempty"`
// randomization factor value. ( default value is 0.5 ).
RandomizationFactor *float64 `protobuf:"fixed64,2,opt,name=randomization_factor,json=randomizationFactor,proto3,oneof" json:"randomization_factor,omitempty"`
// multiplier. ( default value is 1.5 ).
Multiplier *float64 `protobuf:"fixed64,3,opt,name=multiplier,proto3,oneof" json:"multiplier,omitempty"`
// max interval value. ( default value is "60s" ).
MaxInterval *string `protobuf:"bytes,4,opt,name=max_interval,json=maxInterval,proto3,oneof" json:"max_interval,omitempty"`
// max retry count. ( default value is 5. If zero is specified, it never stops ).
MaxRetries *uint64 `protobuf:"varint,5,opt,name=max_retries,json=maxRetries,proto3,oneof" json:"max_retries,omitempty"`
}
func (x *RetryPolicyExponential) Reset() {
*x = RetryPolicyExponential{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[30]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *RetryPolicyExponential) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*RetryPolicyExponential) ProtoMessage() {}
func (x *RetryPolicyExponential) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[30]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use RetryPolicyExponential.ProtoReflect.Descriptor instead.
func (*RetryPolicyExponential) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{30}
}
func (x *RetryPolicyExponential) GetInitialInterval() string {
if x != nil && x.InitialInterval != nil {
return *x.InitialInterval
}
return ""
}
func (x *RetryPolicyExponential) GetRandomizationFactor() float64 {
if x != nil && x.RandomizationFactor != nil {
return *x.RandomizationFactor
}
return 0
}
func (x *RetryPolicyExponential) GetMultiplier() float64 {
if x != nil && x.Multiplier != nil {
return *x.Multiplier
}
return 0
}
func (x *RetryPolicyExponential) GetMaxInterval() string {
if x != nil && x.MaxInterval != nil {
return *x.MaxInterval
}
return ""
}
func (x *RetryPolicyExponential) GetMaxRetries() uint64 {
if x != nil && x.MaxRetries != nil {
return *x.MaxRetries
}
return 0
}
// MethodRequest define parameters to be used for gRPC method request.
type MethodRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// field name of the request message.
Field string `protobuf:"bytes,1,opt,name=field,proto3" json:"field,omitempty"`
// by used to refer to a name or message argument defined in a MessageRule, use `$.` to refer to the message argument.
// Use CEL (https://github.com/google/cel-spec) to evaluate the expression.
// Variables are already defined in MessageRule can be used.
By *string `protobuf:"bytes,2,opt,name=by,proto3,oneof" json:"by,omitempty"`
// if describes the condition to be assigned to field.
// The return value must be of type bool.
// Use CEL (https://github.com/google/cel-spec) to evaluate the expression.
// Variables are already defined in MessageRule can be used.
// If the field is a 'oneof' field, it must be specified.
If *string `protobuf:"bytes,3,opt,name=if,proto3,oneof" json:"if,omitempty"`
}
func (x *MethodRequest) Reset() {
*x = MethodRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[31]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *MethodRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*MethodRequest) ProtoMessage() {}
func (x *MethodRequest) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[31]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use MethodRequest.ProtoReflect.Descriptor instead.
func (*MethodRequest) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{31}
}
func (x *MethodRequest) GetField() string {
if x != nil {
return x.Field
}
return ""
}
func (x *MethodRequest) GetBy() string {
if x != nil && x.By != nil {
return *x.By
}
return ""
}
func (x *MethodRequest) GetIf() string {
if x != nil && x.If != nil {
return *x.If
}
return ""
}
// MethodResponse define which value of the method response is referenced.
type MethodResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// name specify the unique name that can be used in a `MessageRule` / `FieldRule` for the same message for a specific field in the response.
Name *string `protobuf:"bytes,1,opt,name=name,proto3,oneof" json:"name,omitempty"`
// field name in response message.
Field *string `protobuf:"bytes,2,opt,name=field,proto3,oneof" json:"field,omitempty"`
// autobind if the value referenced by `field` is a message type,
// the value of a field with the same name and type as the field name of its own message is automatically assigned to the value of the field in the message.
// If multiple autobinds are used at the same message,
// you must explicitly use the `grpc.federation.field` option to do the binding yourself, since duplicate field names cannot be correctly determined as one.
Autobind *bool `protobuf:"varint,3,opt,name=autobind,proto3,oneof" json:"autobind,omitempty"`
}
func (x *MethodResponse) Reset() {
*x = MethodResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[32]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *MethodResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*MethodResponse) ProtoMessage() {}
func (x *MethodResponse) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[32]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use MethodResponse.ProtoReflect.Descriptor instead.
func (*MethodResponse) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{32}
}
func (x *MethodResponse) GetName() string {
if x != nil && x.Name != nil {
return *x.Name
}
return ""
}
func (x *MethodResponse) GetField() string {
if x != nil && x.Field != nil {
return *x.Field
}
return ""
}
func (x *MethodResponse) GetAutobind() bool {
if x != nil && x.Autobind != nil {
return *x.Autobind
}
return false
}
// Argument define message argument.
type Argument struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// name of the message argument.
// Use this name to refer to the message argument.
// For example, if `foo` is specified as the name, it is referenced by `$.foo`.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// by used to refer to a name or message argument defined in a MessageRule, use `$.` to refer to the message argument.
// Use CEL (https://github.com/google/cel-spec) to evaluate the expression.
// Variables are already defined in MessageRule can be used.
By *string `protobuf:"bytes,2,opt,name=by,proto3,oneof" json:"by,omitempty"`
// inline like by, it refers to the specified value and expands all fields beyond it.
// For this reason, the referenced value must always be of message type.
Inline *string `protobuf:"bytes,3,opt,name=inline,proto3,oneof" json:"inline,omitempty"`
}
func (x *Argument) Reset() {
*x = Argument{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[33]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Argument) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Argument) ProtoMessage() {}
func (x *Argument) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[33]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Argument.ProtoReflect.Descriptor instead.
func (*Argument) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{33}
}
func (x *Argument) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *Argument) GetBy() string {
if x != nil && x.By != nil {
return *x.By
}
return ""
}
func (x *Argument) GetInline() string {
if x != nil && x.Inline != nil {
return *x.Inline
}
return ""
}
// FieldRule define gRPC Federation rules for the field of message.
type FieldRule struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// If custom_resolver is true, the field binding process is to be implemented in Go.
// If there are any values retrieved by grpc.federation.message option, they are passed as arguments for custom resolver.
CustomResolver *bool `protobuf:"varint,1,opt,name=custom_resolver,json=customResolver,proto3,oneof" json:"custom_resolver,omitempty"`
// by used to refer to a name or message argument defined in a MessageRule, use `$.` to refer to the message argument.
// Use CEL (https://github.com/google/cel-spec) to evaluate the expression.
// Variables are already defined in MessageRule can be used.
By *string `protobuf:"bytes,2,opt,name=by,proto3,oneof" json:"by,omitempty"`
// alias can be used when alias is specified in grpc.federation.message option,
// and specifies the field name to be referenced among the messages specified in alias of message option.
// If the specified field has the same type or can be converted automatically, its value is assigned.
Alias *string `protobuf:"bytes,3,opt,name=alias,proto3,oneof" json:"alias,omitempty"`
// use to evaluate any one of fields. this field only available in oneof.
Oneof *FieldOneof `protobuf:"bytes,4,opt,name=oneof,proto3" json:"oneof,omitempty"`
// when defining an environment variable, use it for fields where you want to set additional options.
Env *EnvVarOption `protobuf:"bytes,5,opt,name=env,proto3" json:"env,omitempty"`
}
func (x *FieldRule) Reset() {
*x = FieldRule{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[34]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *FieldRule) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*FieldRule) ProtoMessage() {}
func (x *FieldRule) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[34]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use FieldRule.ProtoReflect.Descriptor instead.
func (*FieldRule) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{34}
}
func (x *FieldRule) GetCustomResolver() bool {
if x != nil && x.CustomResolver != nil {
return *x.CustomResolver
}
return false
}
func (x *FieldRule) GetBy() string {
if x != nil && x.By != nil {
return *x.By
}
return ""
}
func (x *FieldRule) GetAlias() string {
if x != nil && x.Alias != nil {
return *x.Alias
}
return ""
}
func (x *FieldRule) GetOneof() *FieldOneof {
if x != nil {
return x.Oneof
}
return nil
}
func (x *FieldRule) GetEnv() *EnvVarOption {
if x != nil {
return x.Env
}
return nil
}
// FieldOneof evaluate "messages" or other field only if expr is true and assign to the oneof field.
// This feature only available in oneof.
type FieldOneof struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// cond specify either `expr` or `default`. Only one `default` can be set per oneof.
//
// Types that are assignable to Cond:
//
// *FieldOneof_If
// *FieldOneof_Default
Cond isFieldOneof_Cond `protobuf_oneof:"cond"`
// def specify variables to be used in current oneof field's scope for field binding.
Def []*VariableDefinition `protobuf:"bytes,3,rep,name=def,proto3" json:"def,omitempty"`
// by used to refer to a name or message argument defined in a MessageRule, use `$.` to refer to the message argument.
// Use CEL (https://github.com/google/cel-spec) to evaluate the expression.
// Variables are already defined in MessageRule and FieldOneOf can be used.
By string `protobuf:"bytes,4,opt,name=by,proto3" json:"by,omitempty"`
}
func (x *FieldOneof) Reset() {
*x = FieldOneof{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[35]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *FieldOneof) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*FieldOneof) ProtoMessage() {}
func (x *FieldOneof) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[35]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use FieldOneof.ProtoReflect.Descriptor instead.
func (*FieldOneof) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{35}
}
func (m *FieldOneof) GetCond() isFieldOneof_Cond {
if m != nil {
return m.Cond
}
return nil
}
func (x *FieldOneof) GetIf() string {
if x, ok := x.GetCond().(*FieldOneof_If); ok {
return x.If
}
return ""
}
func (x *FieldOneof) GetDefault() bool {
if x, ok := x.GetCond().(*FieldOneof_Default); ok {
return x.Default
}
return false
}
func (x *FieldOneof) GetDef() []*VariableDefinition {
if x != nil {
return x.Def
}
return nil
}
func (x *FieldOneof) GetBy() string {
if x != nil {
return x.By
}
return ""
}
type isFieldOneof_Cond interface {
isFieldOneof_Cond()
}
type FieldOneof_If struct {
// if describes the condition to be assigned to field.
// The return value must be of type bool.
// Use CEL (https://github.com/google/cel-spec) to evaluate the expression.
// Variables are already defined in MessageRule can be used.
If string `protobuf:"bytes,1,opt,name=if,proto3,oneof"`
}
type FieldOneof_Default struct {
// default used to assign a value when none of the other fields match any of the specified expressions.
// Only one value can be defined per oneof.
Default bool `protobuf:"varint,2,opt,name=default,proto3,oneof"`
}
func (*FieldOneof_If) isFieldOneof_Cond() {}
func (*FieldOneof_Default) isFieldOneof_Cond() {}
// CELPlugin define schema of CEL plugin.
type CELPlugin struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Export []*CELPluginExport `protobuf:"bytes,1,rep,name=export,proto3" json:"export,omitempty"`
}
func (x *CELPlugin) Reset() {
*x = CELPlugin{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[36]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *CELPlugin) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CELPlugin) ProtoMessage() {}
func (x *CELPlugin) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[36]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use CELPlugin.ProtoReflect.Descriptor instead.
func (*CELPlugin) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{36}
}
func (x *CELPlugin) GetExport() []*CELPluginExport {
if x != nil {
return x.Export
}
return nil
}
// CELPluginExport describe the schema to be exposed as a CEL plugin.
type CELPluginExport struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// name is the plugin name.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// desc is the description of plugin.
// This description is used as documentation at code generation.
Desc string `protobuf:"bytes,2,opt,name=desc,proto3" json:"desc,omitempty"`
// types describe the message type you want to expose.
Types []*CELReceiverType `protobuf:"bytes,3,rep,name=types,proto3" json:"types,omitempty"`
// functions describe the definition of the function you want to expose.
Functions []*CELFunction `protobuf:"bytes,4,rep,name=functions,proto3" json:"functions,omitempty"`
// variables describe the definition of the variable you want to expose.
Variables []*CELVariable `protobuf:"bytes,5,rep,name=variables,proto3" json:"variables,omitempty"`
Capability *CELPluginCapability `protobuf:"bytes,6,opt,name=capability,proto3" json:"capability,omitempty"`
}
func (x *CELPluginExport) Reset() {
*x = CELPluginExport{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[37]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *CELPluginExport) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CELPluginExport) ProtoMessage() {}
func (x *CELPluginExport) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[37]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use CELPluginExport.ProtoReflect.Descriptor instead.
func (*CELPluginExport) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{37}
}
func (x *CELPluginExport) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *CELPluginExport) GetDesc() string {
if x != nil {
return x.Desc
}
return ""
}
func (x *CELPluginExport) GetTypes() []*CELReceiverType {
if x != nil {
return x.Types
}
return nil
}
func (x *CELPluginExport) GetFunctions() []*CELFunction {
if x != nil {
return x.Functions
}
return nil
}
func (x *CELPluginExport) GetVariables() []*CELVariable {
if x != nil {
return x.Variables
}
return nil
}
func (x *CELPluginExport) GetCapability() *CELPluginCapability {
if x != nil {
return x.Capability
}
return nil
}
// CELPluginCapability controls the permissions granted to the WebAssembly plugin.
type CELPluginCapability struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// env is the capability for environment variable.
Env *CELPluginEnvCapability `protobuf:"bytes,1,opt,name=env,proto3,oneof" json:"env,omitempty"`
// file_system is the capability for file system.
FileSystem *CELPluginFileSystemCapability `protobuf:"bytes,2,opt,name=file_system,json=fileSystem,proto3,oneof" json:"file_system,omitempty"`
// network is the capability for network.
Network *CELPluginNetworkCapability `protobuf:"bytes,3,opt,name=network,proto3,oneof" json:"network,omitempty"`
}
func (x *CELPluginCapability) Reset() {
*x = CELPluginCapability{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[38]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *CELPluginCapability) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CELPluginCapability) ProtoMessage() {}
func (x *CELPluginCapability) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[38]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use CELPluginCapability.ProtoReflect.Descriptor instead.
func (*CELPluginCapability) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{38}
}
func (x *CELPluginCapability) GetEnv() *CELPluginEnvCapability {
if x != nil {
return x.Env
}
return nil
}
func (x *CELPluginCapability) GetFileSystem() *CELPluginFileSystemCapability {
if x != nil {
return x.FileSystem
}
return nil
}
func (x *CELPluginCapability) GetNetwork() *CELPluginNetworkCapability {
if x != nil {
return x.Network
}
return nil
}
// CELPluginEnvCapability controls access to the environment variable.
type CELPluginEnvCapability struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// all allows access to all environment variables.
All bool `protobuf:"varint,1,opt,name=all,proto3" json:"all,omitempty"`
// specifies accessible names. If "all" is true, it takes precedence.
Names []string `protobuf:"bytes,2,rep,name=names,proto3" json:"names,omitempty"`
}
func (x *CELPluginEnvCapability) Reset() {
*x = CELPluginEnvCapability{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[39]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *CELPluginEnvCapability) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CELPluginEnvCapability) ProtoMessage() {}
func (x *CELPluginEnvCapability) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[39]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use CELPluginEnvCapability.ProtoReflect.Descriptor instead.
func (*CELPluginEnvCapability) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{39}
}
func (x *CELPluginEnvCapability) GetAll() bool {
if x != nil {
return x.All
}
return false
}
func (x *CELPluginEnvCapability) GetNames() []string {
if x != nil {
return x.Names
}
return nil
}
// CELPluginFileSystemCapability controls access to the file system.
type CELPluginFileSystemCapability struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// mount_path specifies the file path of the host to mount.
// If not specified, the root directory will be used.
MountPath string `protobuf:"bytes,1,opt,name=mount_path,json=mountPath,proto3" json:"mount_path,omitempty"`
}
func (x *CELPluginFileSystemCapability) Reset() {
*x = CELPluginFileSystemCapability{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[40]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *CELPluginFileSystemCapability) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CELPluginFileSystemCapability) ProtoMessage() {}
func (x *CELPluginFileSystemCapability) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[40]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use CELPluginFileSystemCapability.ProtoReflect.Descriptor instead.
func (*CELPluginFileSystemCapability) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{40}
}
func (x *CELPluginFileSystemCapability) GetMountPath() string {
if x != nil {
return x.MountPath
}
return ""
}
// CELPluginNetworkCapability sets permissions related to network access.
// This is an experimental feature.
type CELPluginNetworkCapability struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
}
func (x *CELPluginNetworkCapability) Reset() {
*x = CELPluginNetworkCapability{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[41]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *CELPluginNetworkCapability) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CELPluginNetworkCapability) ProtoMessage() {}
func (x *CELPluginNetworkCapability) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[41]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use CELPluginNetworkCapability.ProtoReflect.Descriptor instead.
func (*CELPluginNetworkCapability) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{41}
}
// CELFunction represents the CEL function definition.
type CELFunction struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// name is the function name.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// desc is the description of function.
// This description is used as documentation at code generation.
Desc string `protobuf:"bytes,2,opt,name=desc,proto3" json:"desc,omitempty"`
// args describe the definition of the function argument.
Args []*CELFunctionArgument `protobuf:"bytes,3,rep,name=args,proto3" json:"args,omitempty"`
// return describe the definition of return type of function.
Return *CELType `protobuf:"bytes,4,opt,name=return,proto3" json:"return,omitempty"`
}
func (x *CELFunction) Reset() {
*x = CELFunction{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[42]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *CELFunction) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CELFunction) ProtoMessage() {}
func (x *CELFunction) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[42]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use CELFunction.ProtoReflect.Descriptor instead.
func (*CELFunction) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{42}
}
func (x *CELFunction) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *CELFunction) GetDesc() string {
if x != nil {
return x.Desc
}
return ""
}
func (x *CELFunction) GetArgs() []*CELFunctionArgument {
if x != nil {
return x.Args
}
return nil
}
func (x *CELFunction) GetReturn() *CELType {
if x != nil {
return x.Return
}
return nil
}
// CELReceiverType represents methods tied to the message.
type CELReceiverType struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// name is the message name.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// desc is the description of plugin.
// This description is used as documentation at code generation.
Desc string `protobuf:"bytes,2,opt,name=desc,proto3" json:"desc,omitempty"`
// methods describe the definition of the method for the message.
Methods []*CELFunction `protobuf:"bytes,3,rep,name=methods,proto3" json:"methods,omitempty"`
}
func (x *CELReceiverType) Reset() {
*x = CELReceiverType{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[43]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *CELReceiverType) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CELReceiverType) ProtoMessage() {}
func (x *CELReceiverType) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[43]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use CELReceiverType.ProtoReflect.Descriptor instead.
func (*CELReceiverType) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{43}
}
func (x *CELReceiverType) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *CELReceiverType) GetDesc() string {
if x != nil {
return x.Desc
}
return ""
}
func (x *CELReceiverType) GetMethods() []*CELFunction {
if x != nil {
return x.Methods
}
return nil
}
// CELFunctionArgument represents the function argument.
type CELFunctionArgument struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// name is the argument value name.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// desc is the description of plugin.
// This description is used as documentation at code generation.
Desc string `protobuf:"bytes,2,opt,name=desc,proto3" json:"desc,omitempty"`
// type is the argument type.
Type *CELType `protobuf:"bytes,3,opt,name=type,proto3" json:"type,omitempty"`
}
func (x *CELFunctionArgument) Reset() {
*x = CELFunctionArgument{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[44]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *CELFunctionArgument) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CELFunctionArgument) ProtoMessage() {}
func (x *CELFunctionArgument) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[44]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use CELFunctionArgument.ProtoReflect.Descriptor instead.
func (*CELFunctionArgument) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{44}
}
func (x *CELFunctionArgument) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *CELFunctionArgument) GetDesc() string {
if x != nil {
return x.Desc
}
return ""
}
func (x *CELFunctionArgument) GetType() *CELType {
if x != nil {
return x.Type
}
return nil
}
// CELType represents type information for CEL plugin interface.
type CELType struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Types that are assignable to Type:
//
// *CELType_Kind
// *CELType_Repeated
// *CELType_Map
// *CELType_Message
// *CELType_Enum
Type isCELType_Type `protobuf_oneof:"type"`
}
func (x *CELType) Reset() {
*x = CELType{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[45]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *CELType) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CELType) ProtoMessage() {}
func (x *CELType) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[45]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use CELType.ProtoReflect.Descriptor instead.
func (*CELType) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{45}
}
func (m *CELType) GetType() isCELType_Type {
if m != nil {
return m.Type
}
return nil
}
func (x *CELType) GetKind() TypeKind {
if x, ok := x.GetType().(*CELType_Kind); ok {
return x.Kind
}
return TypeKind_UNKNOWN
}
func (x *CELType) GetRepeated() *CELType {
if x, ok := x.GetType().(*CELType_Repeated); ok {
return x.Repeated
}
return nil
}
func (x *CELType) GetMap() *CELMapType {
if x, ok := x.GetType().(*CELType_Map); ok {
return x.Map
}
return nil
}
func (x *CELType) GetMessage() string {
if x, ok := x.GetType().(*CELType_Message); ok {
return x.Message
}
return ""
}
func (x *CELType) GetEnum() string {
if x, ok := x.GetType().(*CELType_Enum); ok {
return x.Enum
}
return ""
}
type isCELType_Type interface {
isCELType_Type()
}
type CELType_Kind struct {
// kind is used when the type is a primitive type.
Kind TypeKind `protobuf:"varint,1,opt,name=kind,proto3,enum=grpc.federation.TypeKind,oneof"`
}
type CELType_Repeated struct {
// repeated is used when the type is a repeated type.
Repeated *CELType `protobuf:"bytes,2,opt,name=repeated,proto3,oneof"`
}
type CELType_Map struct {
// map is used when the type is a map type.
Map *CELMapType `protobuf:"bytes,3,opt,name=map,proto3,oneof"`
}
type CELType_Message struct {
// message is a fqdn to the message type.
Message string `protobuf:"bytes,4,opt,name=message,proto3,oneof"`
}
type CELType_Enum struct {
// enum is a fqdn to the enum type.
Enum string `protobuf:"bytes,5,opt,name=enum,proto3,oneof"`
}
func (*CELType_Kind) isCELType_Type() {}
func (*CELType_Repeated) isCELType_Type() {}
func (*CELType_Map) isCELType_Type() {}
func (*CELType_Message) isCELType_Type() {}
func (*CELType_Enum) isCELType_Type() {}
// CELMapType represents map type.
type CELMapType struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// key represents map's key type.
Key *CELType `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
// value represents map's value type.
Value *CELType `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
}
func (x *CELMapType) Reset() {
*x = CELMapType{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[46]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *CELMapType) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CELMapType) ProtoMessage() {}
func (x *CELMapType) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[46]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use CELMapType.ProtoReflect.Descriptor instead.
func (*CELMapType) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{46}
}
func (x *CELMapType) GetKey() *CELType {
if x != nil {
return x.Key
}
return nil
}
func (x *CELMapType) GetValue() *CELType {
if x != nil {
return x.Value
}
return nil
}
// CELVariable represents CEL variable.
type CELVariable struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// name is the variable name.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// desc is the description of plugin.
// This description is used as documentation at code generation.
Desc string `protobuf:"bytes,2,opt,name=desc,proto3" json:"desc,omitempty"`
// type is the variable type.
Type *CELType `protobuf:"bytes,3,opt,name=type,proto3" json:"type,omitempty"`
}
func (x *CELVariable) Reset() {
*x = CELVariable{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[47]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *CELVariable) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CELVariable) ProtoMessage() {}
func (x *CELVariable) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[47]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use CELVariable.ProtoReflect.Descriptor instead.
func (*CELVariable) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{47}
}
func (x *CELVariable) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *CELVariable) GetDesc() string {
if x != nil {
return x.Desc
}
return ""
}
func (x *CELVariable) GetType() *CELType {
if x != nil {
return x.Type
}
return nil
}
var file_grpc_federation_federation_proto_extTypes = []protoimpl.ExtensionInfo{
{
ExtendedType: (*descriptorpb.FileOptions)(nil),
ExtensionType: (*FileRule)(nil),
Field: 1187,
Name: "grpc.federation.file",
Tag: "bytes,1187,opt,name=file",
Filename: "grpc/federation/federation.proto",
},
{
ExtendedType: (*descriptorpb.ServiceOptions)(nil),
ExtensionType: (*ServiceRule)(nil),
Field: 1187,
Name: "grpc.federation.service",
Tag: "bytes,1187,opt,name=service",
Filename: "grpc/federation/federation.proto",
},
{
ExtendedType: (*descriptorpb.MethodOptions)(nil),
ExtensionType: (*MethodRule)(nil),
Field: 1187,
Name: "grpc.federation.method",
Tag: "bytes,1187,opt,name=method",
Filename: "grpc/federation/federation.proto",
},
{
ExtendedType: (*descriptorpb.MessageOptions)(nil),
ExtensionType: (*MessageRule)(nil),
Field: 1187,
Name: "grpc.federation.message",
Tag: "bytes,1187,opt,name=message",
Filename: "grpc/federation/federation.proto",
},
{
ExtendedType: (*descriptorpb.FieldOptions)(nil),
ExtensionType: (*FieldRule)(nil),
Field: 1187,
Name: "grpc.federation.field",
Tag: "bytes,1187,opt,name=field",
Filename: "grpc/federation/federation.proto",
},
{
ExtendedType: (*descriptorpb.EnumOptions)(nil),
ExtensionType: (*EnumRule)(nil),
Field: 1187,
Name: "grpc.federation.enum",
Tag: "bytes,1187,opt,name=enum",
Filename: "grpc/federation/federation.proto",
},
{
ExtendedType: (*descriptorpb.EnumValueOptions)(nil),
ExtensionType: (*EnumValueRule)(nil),
Field: 1187,
Name: "grpc.federation.enum_value",
Tag: "bytes,1187,opt,name=enum_value",
Filename: "grpc/federation/federation.proto",
},
{
ExtendedType: (*descriptorpb.OneofOptions)(nil),
ExtensionType: (*OneofRule)(nil),
Field: 1187,
Name: "grpc.federation.oneof",
Tag: "bytes,1187,opt,name=oneof",
Filename: "grpc/federation/federation.proto",
},
}
// Extension fields to descriptorpb.FileOptions.
var (
// optional grpc.federation.FileRule file = 1187;
E_File = &file_grpc_federation_federation_proto_extTypes[0]
)
// Extension fields to descriptorpb.ServiceOptions.
var (
// optional grpc.federation.ServiceRule service = 1187;
E_Service = &file_grpc_federation_federation_proto_extTypes[1]
)
// Extension fields to descriptorpb.MethodOptions.
var (
// optional grpc.federation.MethodRule method = 1187;
E_Method = &file_grpc_federation_federation_proto_extTypes[2]
)
// Extension fields to descriptorpb.MessageOptions.
var (
// optional grpc.federation.MessageRule message = 1187;
E_Message = &file_grpc_federation_federation_proto_extTypes[3]
)
// Extension fields to descriptorpb.FieldOptions.
var (
// optional grpc.federation.FieldRule field = 1187;
E_Field = &file_grpc_federation_federation_proto_extTypes[4]
)
// Extension fields to descriptorpb.EnumOptions.
var (
// optional grpc.federation.EnumRule enum = 1187;
E_Enum = &file_grpc_federation_federation_proto_extTypes[5]
)
// Extension fields to descriptorpb.EnumValueOptions.
var (
// optional grpc.federation.EnumValueRule enum_value = 1187;
E_EnumValue = &file_grpc_federation_federation_proto_extTypes[6]
)
// Extension fields to descriptorpb.OneofOptions.
var (
// optional grpc.federation.OneofRule oneof = 1187;
E_Oneof = &file_grpc_federation_federation_proto_extTypes[7]
)
var File_grpc_federation_federation_proto protoreflect.FileDescriptor
var file_grpc_federation_federation_proto_rawDesc = []byte{
0x0a, 0x20, 0x67, 0x72, 0x70, 0x63, 0x2f, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f,
0x6e, 0x2f, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f,
0x74, 0x6f, 0x12, 0x0f, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74,
0x69, 0x6f, 0x6e, 0x1a, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x2e,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x15, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x72, 0x70,
0x63, 0x2f, 0x63, 0x6f, 0x64, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f,
0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x72, 0x70, 0x63, 0x2f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x64,
0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x67, 0x72,
0x70, 0x63, 0x2f, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x70, 0x72,
0x69, 0x76, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1a, 0x67, 0x72, 0x70,
0x63, 0x2f, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x74, 0x69, 0x6d,
0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x56, 0x0a, 0x08, 0x46, 0x69, 0x6c, 0x65, 0x52,
0x75, 0x6c, 0x65, 0x12, 0x32, 0x0a, 0x06, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x18, 0x01, 0x20,
0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72,
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x43, 0x45, 0x4c, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x52,
0x06, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x69, 0x6d, 0x70, 0x6f, 0x72,
0x74, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x69, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x22,
0x20, 0x0a, 0x08, 0x45, 0x6e, 0x75, 0x6d, 0x52, 0x75, 0x6c, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x61,
0x6c, 0x69, 0x61, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x61, 0x6c, 0x69, 0x61,
0x73, 0x22, 0xb4, 0x01, 0x0a, 0x0d, 0x45, 0x6e, 0x75, 0x6d, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52,
0x75, 0x6c, 0x65, 0x12, 0x1d, 0x0a, 0x07, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x18, 0x01,
0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x07, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x88,
0x01, 0x01, 0x12, 0x14, 0x0a, 0x05, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28,
0x09, 0x52, 0x05, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x12, 0x37, 0x0a, 0x04, 0x61, 0x74, 0x74, 0x72,
0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65,
0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x56, 0x61, 0x6c,
0x75, 0x65, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x52, 0x04, 0x61, 0x74, 0x74,
0x72, 0x12, 0x1d, 0x0a, 0x07, 0x6e, 0x6f, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x18, 0x04, 0x20, 0x01,
0x28, 0x08, 0x48, 0x01, 0x52, 0x07, 0x6e, 0x6f, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x88, 0x01, 0x01,
0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x42, 0x0a, 0x0a, 0x08,
0x5f, 0x6e, 0x6f, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x22, 0x3e, 0x0a, 0x12, 0x45, 0x6e, 0x75, 0x6d,
0x56, 0x61, 0x6c, 0x75, 0x65, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 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, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28,
0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x0b, 0x0a, 0x09, 0x4f, 0x6e, 0x65, 0x6f,
0x66, 0x52, 0x75, 0x6c, 0x65, 0x22, 0x69, 0x0a, 0x0b, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65,
0x52, 0x75, 0x6c, 0x65, 0x12, 0x26, 0x0a, 0x03, 0x65, 0x6e, 0x76, 0x18, 0x01, 0x20, 0x01, 0x28,
0x0b, 0x32, 0x14, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74,
0x69, 0x6f, 0x6e, 0x2e, 0x45, 0x6e, 0x76, 0x52, 0x03, 0x65, 0x6e, 0x76, 0x12, 0x32, 0x0a, 0x03,
0x76, 0x61, 0x72, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x67, 0x72, 0x70, 0x63,
0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x53, 0x65, 0x72, 0x76,
0x69, 0x63, 0x65, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x03, 0x76, 0x61, 0x72,
0x22, 0x4a, 0x0a, 0x03, 0x45, 0x6e, 0x76, 0x12, 0x29, 0x0a, 0x03, 0x76, 0x61, 0x72, 0x18, 0x01,
0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65,
0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x45, 0x6e, 0x76, 0x56, 0x61, 0x72, 0x52, 0x03, 0x76,
0x61, 0x72, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20,
0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x8b, 0x03, 0x0a,
0x0f, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65,
0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01,
0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x13, 0x0a, 0x02, 0x69, 0x66, 0x18,
0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x02, 0x52, 0x02, 0x69, 0x66, 0x88, 0x01, 0x01, 0x12, 0x10,
0x0a, 0x02, 0x62, 0x79, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x02, 0x62, 0x79,
0x12, 0x2c, 0x0a, 0x03, 0x6d, 0x61, 0x70, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e,
0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e,
0x4d, 0x61, 0x70, 0x45, 0x78, 0x70, 0x72, 0x48, 0x00, 0x52, 0x03, 0x6d, 0x61, 0x70, 0x12, 0x38,
0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32,
0x1c, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f,
0x6e, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x45, 0x78, 0x70, 0x72, 0x48, 0x00, 0x52,
0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x50, 0x0a, 0x0a, 0x76, 0x61, 0x6c, 0x69,
0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x67,
0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x53,
0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x56, 0x61,
0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x78, 0x70, 0x72, 0x48, 0x00, 0x52, 0x0a,
0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2f, 0x0a, 0x04, 0x65, 0x6e,
0x75, 0x6d, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e,
0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x45,
0x78, 0x70, 0x72, 0x48, 0x00, 0x52, 0x04, 0x65, 0x6e, 0x75, 0x6d, 0x12, 0x35, 0x0a, 0x06, 0x73,
0x77, 0x69, 0x74, 0x63, 0x68, 0x18, 0x10, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x72,
0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x53, 0x77,
0x69, 0x74, 0x63, 0x68, 0x45, 0x78, 0x70, 0x72, 0x48, 0x00, 0x52, 0x06, 0x73, 0x77, 0x69, 0x74,
0x63, 0x68, 0x42, 0x06, 0x0a, 0x04, 0x65, 0x78, 0x70, 0x72, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e,
0x61, 0x6d, 0x65, 0x42, 0x05, 0x0a, 0x03, 0x5f, 0x69, 0x66, 0x22, 0x49, 0x0a, 0x1d, 0x53, 0x65,
0x72, 0x76, 0x69, 0x63, 0x65, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x56, 0x61, 0x6c,
0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x78, 0x70, 0x72, 0x12, 0x0e, 0x0a, 0x02, 0x69,
0x66, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x66, 0x12, 0x18, 0x0a, 0x07, 0x6d,
0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65,
0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x91, 0x01, 0x0a, 0x06, 0x45, 0x6e, 0x76, 0x56, 0x61, 0x72,
0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04,
0x6e, 0x61, 0x6d, 0x65, 0x12, 0x2c, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01,
0x28, 0x0b, 0x32, 0x18, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61,
0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x45, 0x6e, 0x76, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79,
0x70, 0x65, 0x12, 0x3a, 0x0a, 0x06, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01,
0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61,
0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x45, 0x6e, 0x76, 0x56, 0x61, 0x72, 0x4f, 0x70, 0x74, 0x69, 0x6f,
0x6e, 0x48, 0x00, 0x52, 0x06, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x88, 0x01, 0x01, 0x42, 0x09,
0x0a, 0x07, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xab, 0x01, 0x0a, 0x07, 0x45, 0x6e,
0x76, 0x54, 0x79, 0x70, 0x65, 0x12, 0x2f, 0x0a, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x18, 0x01, 0x20,
0x01, 0x28, 0x0e, 0x32, 0x19, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72,
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x4b, 0x69, 0x6e, 0x64, 0x48, 0x00,
0x52, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x12, 0x36, 0x0a, 0x08, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74,
0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e,
0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x45, 0x6e, 0x76, 0x54, 0x79,
0x70, 0x65, 0x48, 0x00, 0x52, 0x08, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x12, 0x2f,
0x0a, 0x03, 0x6d, 0x61, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x72,
0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x45, 0x6e,
0x76, 0x4d, 0x61, 0x70, 0x54, 0x79, 0x70, 0x65, 0x48, 0x00, 0x52, 0x03, 0x6d, 0x61, 0x70, 0x42,
0x06, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x22, 0x68, 0x0a, 0x0a, 0x45, 0x6e, 0x76, 0x4d, 0x61,
0x70, 0x54, 0x79, 0x70, 0x65, 0x12, 0x2a, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01,
0x28, 0x0b, 0x32, 0x18, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61,
0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x45, 0x6e, 0x76, 0x54, 0x79, 0x70, 0x65, 0x52, 0x03, 0x6b, 0x65,
0x79, 0x12, 0x2e, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b,
0x32, 0x18, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69,
0x6f, 0x6e, 0x2e, 0x45, 0x6e, 0x76, 0x54, 0x79, 0x70, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75,
0x65, 0x22, 0xc3, 0x01, 0x0a, 0x0c, 0x45, 0x6e, 0x76, 0x56, 0x61, 0x72, 0x4f, 0x70, 0x74, 0x69,
0x6f, 0x6e, 0x12, 0x21, 0x0a, 0x09, 0x61, 0x6c, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x74, 0x65, 0x18,
0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x09, 0x61, 0x6c, 0x74, 0x65, 0x72, 0x6e, 0x61,
0x74, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1d, 0x0a, 0x07, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74,
0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x07, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c,
0x74, 0x88, 0x01, 0x01, 0x12, 0x1f, 0x0a, 0x08, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64,
0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x48, 0x02, 0x52, 0x08, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72,
0x65, 0x64, 0x88, 0x01, 0x01, 0x12, 0x1d, 0x0a, 0x07, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x64,
0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x48, 0x03, 0x52, 0x07, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65,
0x64, 0x88, 0x01, 0x01, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x61, 0x6c, 0x74, 0x65, 0x72, 0x6e, 0x61,
0x74, 0x65, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x42, 0x0b,
0x0a, 0x09, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x42, 0x0a, 0x0a, 0x08, 0x5f,
0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x64, 0x22, 0x65, 0x0a, 0x0a, 0x4d, 0x65, 0x74, 0x68, 0x6f,
0x64, 0x52, 0x75, 0x6c, 0x65, 0x12, 0x1d, 0x0a, 0x07, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74,
0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x07, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75,
0x74, 0x88, 0x01, 0x01, 0x12, 0x1f, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e,
0x73, 0x65, 0x88, 0x01, 0x01, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75,
0x74, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x9c,
0x01, 0x0a, 0x0b, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x75, 0x6c, 0x65, 0x12, 0x35,
0x0a, 0x03, 0x64, 0x65, 0x66, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x67, 0x72,
0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x56, 0x61,
0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e,
0x52, 0x03, 0x64, 0x65, 0x66, 0x12, 0x2c, 0x0a, 0x0f, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x5f,
0x72, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00,
0x52, 0x0e, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x52, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x72,
0x88, 0x01, 0x01, 0x12, 0x14, 0x0a, 0x05, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x18, 0x03, 0x20, 0x03,
0x28, 0x09, 0x52, 0x05, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x42, 0x12, 0x0a, 0x10, 0x5f, 0x63, 0x75,
0x73, 0x74, 0x6f, 0x6d, 0x5f, 0x72, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x72, 0x22, 0xde, 0x03,
0x0a, 0x12, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69,
0x74, 0x69, 0x6f, 0x6e, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01,
0x28, 0x09, 0x48, 0x01, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x13, 0x0a,
0x02, 0x69, 0x66, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x02, 0x52, 0x02, 0x69, 0x66, 0x88,
0x01, 0x01, 0x12, 0x1f, 0x0a, 0x08, 0x61, 0x75, 0x74, 0x6f, 0x62, 0x69, 0x6e, 0x64, 0x18, 0x03,
0x20, 0x01, 0x28, 0x08, 0x48, 0x03, 0x52, 0x08, 0x61, 0x75, 0x74, 0x6f, 0x62, 0x69, 0x6e, 0x64,
0x88, 0x01, 0x01, 0x12, 0x10, 0x0a, 0x02, 0x62, 0x79, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x48,
0x00, 0x52, 0x02, 0x62, 0x79, 0x12, 0x2c, 0x0a, 0x03, 0x6d, 0x61, 0x70, 0x18, 0x0c, 0x20, 0x01,
0x28, 0x0b, 0x32, 0x18, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61,
0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x4d, 0x61, 0x70, 0x45, 0x78, 0x70, 0x72, 0x48, 0x00, 0x52, 0x03,
0x6d, 0x61, 0x70, 0x12, 0x38, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x0d,
0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65,
0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x45, 0x78,
0x70, 0x72, 0x48, 0x00, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x2f, 0x0a,
0x04, 0x63, 0x61, 0x6c, 0x6c, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x72,
0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x43, 0x61,
0x6c, 0x6c, 0x45, 0x78, 0x70, 0x72, 0x48, 0x00, 0x52, 0x04, 0x63, 0x61, 0x6c, 0x6c, 0x12, 0x41,
0x0a, 0x0a, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x0f, 0x20, 0x01,
0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61,
0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45,
0x78, 0x70, 0x72, 0x48, 0x00, 0x52, 0x0a, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f,
0x6e, 0x12, 0x2f, 0x0a, 0x04, 0x65, 0x6e, 0x75, 0x6d, 0x18, 0x10, 0x20, 0x01, 0x28, 0x0b, 0x32,
0x19, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f,
0x6e, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x45, 0x78, 0x70, 0x72, 0x48, 0x00, 0x52, 0x04, 0x65, 0x6e,
0x75, 0x6d, 0x12, 0x35, 0x0a, 0x06, 0x73, 0x77, 0x69, 0x74, 0x63, 0x68, 0x18, 0x11, 0x20, 0x01,
0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61,
0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x53, 0x77, 0x69, 0x74, 0x63, 0x68, 0x45, 0x78, 0x70, 0x72, 0x48,
0x00, 0x52, 0x06, 0x73, 0x77, 0x69, 0x74, 0x63, 0x68, 0x42, 0x06, 0x0a, 0x04, 0x65, 0x78, 0x70,
0x72, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x05, 0x0a, 0x03, 0x5f, 0x69,
0x66, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x61, 0x75, 0x74, 0x6f, 0x62, 0x69, 0x6e, 0x64, 0x22, 0xc5,
0x01, 0x0a, 0x07, 0x4d, 0x61, 0x70, 0x45, 0x78, 0x70, 0x72, 0x12, 0x35, 0x0a, 0x08, 0x69, 0x74,
0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67,
0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x49,
0x74, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x08, 0x69, 0x74, 0x65, 0x72, 0x61, 0x74, 0x6f,
0x72, 0x12, 0x10, 0x0a, 0x02, 0x62, 0x79, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52,
0x02, 0x62, 0x79, 0x12, 0x38, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x0c,
0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65,
0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x45, 0x78,
0x70, 0x72, 0x48, 0x00, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x2f, 0x0a,
0x04, 0x65, 0x6e, 0x75, 0x6d, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x72,
0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x45, 0x6e,
0x75, 0x6d, 0x45, 0x78, 0x70, 0x72, 0x48, 0x00, 0x52, 0x04, 0x65, 0x6e, 0x75, 0x6d, 0x42, 0x06,
0x0a, 0x04, 0x65, 0x78, 0x70, 0x72, 0x22, 0x30, 0x0a, 0x08, 0x49, 0x74, 0x65, 0x72, 0x61, 0x74,
0x6f, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x73, 0x72, 0x63, 0x18, 0x02, 0x20,
0x01, 0x28, 0x09, 0x52, 0x03, 0x73, 0x72, 0x63, 0x22, 0x50, 0x0a, 0x0b, 0x4d, 0x65, 0x73, 0x73,
0x61, 0x67, 0x65, 0x45, 0x78, 0x70, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18,
0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x2d, 0x0a, 0x04, 0x61,
0x72, 0x67, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x72, 0x70, 0x63,
0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x41, 0x72, 0x67, 0x75,
0x6d, 0x65, 0x6e, 0x74, 0x52, 0x04, 0x61, 0x72, 0x67, 0x73, 0x22, 0x2e, 0x0a, 0x08, 0x45, 0x6e,
0x75, 0x6d, 0x45, 0x78, 0x70, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01,
0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x62, 0x79,
0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x62, 0x79, 0x22, 0xf3, 0x02, 0x0a, 0x08, 0x43,
0x61, 0x6c, 0x6c, 0x45, 0x78, 0x70, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f,
0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12,
0x38, 0x0a, 0x07, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b,
0x32, 0x1e, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69,
0x6f, 0x6e, 0x2e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
0x52, 0x07, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x07, 0x74, 0x69, 0x6d,
0x65, 0x6f, 0x75, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x07, 0x74, 0x69,
0x6d, 0x65, 0x6f, 0x75, 0x74, 0x88, 0x01, 0x01, 0x12, 0x37, 0x0a, 0x05, 0x72, 0x65, 0x74, 0x72,
0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66,
0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x52, 0x65, 0x74, 0x72, 0x79, 0x50,
0x6f, 0x6c, 0x69, 0x63, 0x79, 0x48, 0x01, 0x52, 0x05, 0x72, 0x65, 0x74, 0x72, 0x79, 0x88, 0x01,
0x01, 0x12, 0x30, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b,
0x32, 0x1a, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69,
0x6f, 0x6e, 0x2e, 0x47, 0x52, 0x50, 0x43, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x05, 0x65, 0x72,
0x72, 0x6f, 0x72, 0x12, 0x3c, 0x0a, 0x06, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x06, 0x20,
0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72,
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x47, 0x52, 0x50, 0x43, 0x43, 0x61, 0x6c, 0x6c, 0x4f, 0x70,
0x74, 0x69, 0x6f, 0x6e, 0x48, 0x02, 0x52, 0x06, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x88, 0x01,
0x01, 0x12, 0x1f, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x07, 0x20,
0x01, 0x28, 0x09, 0x48, 0x03, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x88,
0x01, 0x01, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x42, 0x08,
0x0a, 0x06, 0x5f, 0x72, 0x65, 0x74, 0x72, 0x79, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6f, 0x70, 0x74,
0x69, 0x6f, 0x6e, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61,
0x22, 0x7f, 0x0a, 0x0a, 0x53, 0x77, 0x69, 0x74, 0x63, 0x68, 0x45, 0x78, 0x70, 0x72, 0x12, 0x33,
0x0a, 0x04, 0x63, 0x61, 0x73, 0x65, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x67,
0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x53,
0x77, 0x69, 0x74, 0x63, 0x68, 0x43, 0x61, 0x73, 0x65, 0x45, 0x78, 0x70, 0x72, 0x52, 0x04, 0x63,
0x61, 0x73, 0x65, 0x12, 0x3c, 0x0a, 0x07, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x18, 0x02,
0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65,
0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x53, 0x77, 0x69, 0x74, 0x63, 0x68, 0x44, 0x65, 0x66,
0x61, 0x75, 0x6c, 0x74, 0x45, 0x78, 0x70, 0x72, 0x52, 0x07, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c,
0x74, 0x22, 0x71, 0x0a, 0x0e, 0x53, 0x77, 0x69, 0x74, 0x63, 0x68, 0x43, 0x61, 0x73, 0x65, 0x45,
0x78, 0x70, 0x72, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x66, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
0x02, 0x69, 0x66, 0x12, 0x35, 0x0a, 0x03, 0x64, 0x65, 0x66, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b,
0x32, 0x23, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69,
0x6f, 0x6e, 0x2e, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x44, 0x65, 0x66, 0x69, 0x6e,
0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x03, 0x64, 0x65, 0x66, 0x12, 0x10, 0x0a, 0x02, 0x62, 0x79,
0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x02, 0x62, 0x79, 0x42, 0x06, 0x0a, 0x04,
0x65, 0x78, 0x70, 0x72, 0x22, 0x64, 0x0a, 0x11, 0x53, 0x77, 0x69, 0x74, 0x63, 0x68, 0x44, 0x65,
0x66, 0x61, 0x75, 0x6c, 0x74, 0x45, 0x78, 0x70, 0x72, 0x12, 0x35, 0x0a, 0x03, 0x64, 0x65, 0x66,
0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65,
0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c,
0x65, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x03, 0x64, 0x65, 0x66,
0x12, 0x10, 0x0a, 0x02, 0x62, 0x79, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x02,
0x62, 0x79, 0x42, 0x06, 0x0a, 0x04, 0x65, 0x78, 0x70, 0x72, 0x22, 0x86, 0x04, 0x0a, 0x09, 0x47,
0x52, 0x50, 0x43, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x35, 0x0a, 0x03, 0x64, 0x65, 0x66, 0x18,
0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64,
0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65,
0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x03, 0x64, 0x65, 0x66, 0x12,
0x13, 0x0a, 0x02, 0x69, 0x66, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x02, 0x69,
0x66, 0x88, 0x01, 0x01, 0x12, 0x29, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x03, 0x20, 0x01,
0x28, 0x0e, 0x32, 0x10, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x72, 0x70, 0x63, 0x2e,
0x43, 0x6f, 0x64, 0x65, 0x48, 0x01, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x88, 0x01, 0x01, 0x12,
0x1d, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09,
0x48, 0x02, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x88, 0x01, 0x01, 0x12, 0x3a,
0x0a, 0x07, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32,
0x20, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f,
0x6e, 0x2e, 0x47, 0x52, 0x50, 0x43, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x44, 0x65, 0x74, 0x61, 0x69,
0x6c, 0x52, 0x07, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x12, 0x1b, 0x0a, 0x06, 0x69, 0x67,
0x6e, 0x6f, 0x72, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x48, 0x03, 0x52, 0x06, 0x69, 0x67,
0x6e, 0x6f, 0x72, 0x65, 0x88, 0x01, 0x01, 0x12, 0x33, 0x0a, 0x13, 0x69, 0x67, 0x6e, 0x6f, 0x72,
0x65, 0x5f, 0x61, 0x6e, 0x64, 0x5f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x07,
0x20, 0x01, 0x28, 0x09, 0x48, 0x04, 0x52, 0x11, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x41, 0x6e,
0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x88, 0x01, 0x01, 0x12, 0x45, 0x0a, 0x09,
0x6c, 0x6f, 0x67, 0x5f, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0e, 0x32,
0x23, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f,
0x6e, 0x2e, 0x47, 0x52, 0x50, 0x43, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x2e, 0x4c, 0x6f, 0x67, 0x4c,
0x65, 0x76, 0x65, 0x6c, 0x48, 0x05, 0x52, 0x08, 0x6c, 0x6f, 0x67, 0x4c, 0x65, 0x76, 0x65, 0x6c,
0x88, 0x01, 0x01, 0x22, 0x41, 0x0a, 0x08, 0x4c, 0x6f, 0x67, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x12,
0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05,
0x44, 0x45, 0x42, 0x55, 0x47, 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, 0x49, 0x4e, 0x46, 0x4f, 0x10,
0x02, 0x12, 0x08, 0x0a, 0x04, 0x57, 0x41, 0x52, 0x4e, 0x10, 0x03, 0x12, 0x09, 0x0a, 0x05, 0x45,
0x52, 0x52, 0x4f, 0x52, 0x10, 0x04, 0x42, 0x05, 0x0a, 0x03, 0x5f, 0x69, 0x66, 0x42, 0x07, 0x0a,
0x05, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61,
0x67, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x42, 0x16, 0x0a,
0x14, 0x5f, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x5f, 0x61, 0x6e, 0x64, 0x5f, 0x72, 0x65, 0x73,
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x6c, 0x6f, 0x67, 0x5f, 0x6c, 0x65,
0x76, 0x65, 0x6c, 0x22, 0xfa, 0x05, 0x0a, 0x0f, 0x47, 0x52, 0x50, 0x43, 0x45, 0x72, 0x72, 0x6f,
0x72, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x66, 0x18, 0x01, 0x20,
0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x66, 0x12, 0x35, 0x0a, 0x03, 0x64, 0x65, 0x66, 0x18, 0x02,
0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65,
0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x44,
0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x03, 0x64, 0x65, 0x66, 0x12, 0x36,
0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32,
0x1c, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f,
0x6e, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x45, 0x78, 0x70, 0x72, 0x52, 0x07, 0x6d,
0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x34, 0x0a, 0x0a, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f,
0x69, 0x6e, 0x66, 0x6f, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x67, 0x6f, 0x6f,
0x67, 0x6c, 0x65, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x49, 0x6e, 0x66,
0x6f, 0x52, 0x09, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x34, 0x0a, 0x0a,
0x72, 0x65, 0x74, 0x72, 0x79, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b,
0x32, 0x15, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x52, 0x65,
0x74, 0x72, 0x79, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x09, 0x72, 0x65, 0x74, 0x72, 0x79, 0x49, 0x6e,
0x66, 0x6f, 0x12, 0x34, 0x0a, 0x0a, 0x64, 0x65, 0x62, 0x75, 0x67, 0x5f, 0x69, 0x6e, 0x66, 0x6f,
0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e,
0x72, 0x70, 0x63, 0x2e, 0x44, 0x65, 0x62, 0x75, 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x09, 0x64,
0x65, 0x62, 0x75, 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x3d, 0x0a, 0x0d, 0x71, 0x75, 0x6f, 0x74,
0x61, 0x5f, 0x66, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32,
0x18, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x51, 0x75, 0x6f,
0x74, 0x61, 0x46, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x52, 0x0c, 0x71, 0x75, 0x6f, 0x74, 0x61,
0x46, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x12, 0x52, 0x0a, 0x14, 0x70, 0x72, 0x65, 0x63, 0x6f,
0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x66, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x18,
0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x72,
0x70, 0x63, 0x2e, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x46,
0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x52, 0x13, 0x70, 0x72, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x69,
0x74, 0x69, 0x6f, 0x6e, 0x46, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x12, 0x37, 0x0a, 0x0b, 0x62,
0x61, 0x64, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b,
0x32, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x42, 0x61,
0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x0a, 0x62, 0x61, 0x64, 0x52, 0x65, 0x71,
0x75, 0x65, 0x73, 0x74, 0x12, 0x3a, 0x0a, 0x0c, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f,
0x69, 0x6e, 0x66, 0x6f, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f,
0x67, 0x6c, 0x65, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x49,
0x6e, 0x66, 0x6f, 0x52, 0x0b, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, 0x6e, 0x66, 0x6f,
0x12, 0x3d, 0x0a, 0x0d, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x69, 0x6e, 0x66,
0x6f, 0x18, 0x0b, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,
0x2e, 0x72, 0x70, 0x63, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x6e, 0x66,
0x6f, 0x52, 0x0c, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12,
0x24, 0x0a, 0x04, 0x68, 0x65, 0x6c, 0x70, 0x18, 0x0c, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e,
0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x48, 0x65, 0x6c, 0x70, 0x52,
0x04, 0x68, 0x65, 0x6c, 0x70, 0x12, 0x49, 0x0a, 0x11, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x69, 0x7a,
0x65, 0x64, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x0d, 0x20, 0x03, 0x28, 0x0b,
0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x6f,
0x63, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x10,
0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65,
0x12, 0x0e, 0x0a, 0x02, 0x62, 0x79, 0x18, 0x0e, 0x20, 0x03, 0x28, 0x09, 0x52, 0x02, 0x62, 0x79,
0x22, 0xc7, 0x03, 0x0a, 0x0e, 0x47, 0x52, 0x50, 0x43, 0x43, 0x61, 0x6c, 0x6c, 0x4f, 0x70, 0x74,
0x69, 0x6f, 0x6e, 0x12, 0x2c, 0x0a, 0x0f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x5f, 0x73,
0x75, 0x62, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0e,
0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x53, 0x75, 0x62, 0x74, 0x79, 0x70, 0x65, 0x88, 0x01,
0x01, 0x12, 0x1b, 0x0a, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28,
0x09, 0x48, 0x01, 0x52, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x88, 0x01, 0x01, 0x12, 0x37,
0x0a, 0x16, 0x6d, 0x61, 0x78, 0x5f, 0x63, 0x61, 0x6c, 0x6c, 0x5f, 0x72, 0x65, 0x63, 0x76, 0x5f,
0x6d, 0x73, 0x67, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x48, 0x02,
0x52, 0x12, 0x6d, 0x61, 0x78, 0x43, 0x61, 0x6c, 0x6c, 0x52, 0x65, 0x63, 0x76, 0x4d, 0x73, 0x67,
0x53, 0x69, 0x7a, 0x65, 0x88, 0x01, 0x01, 0x12, 0x37, 0x0a, 0x16, 0x6d, 0x61, 0x78, 0x5f, 0x63,
0x61, 0x6c, 0x6c, 0x5f, 0x73, 0x65, 0x6e, 0x64, 0x5f, 0x6d, 0x73, 0x67, 0x5f, 0x73, 0x69, 0x7a,
0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x48, 0x03, 0x52, 0x12, 0x6d, 0x61, 0x78, 0x43, 0x61,
0x6c, 0x6c, 0x53, 0x65, 0x6e, 0x64, 0x4d, 0x73, 0x67, 0x53, 0x69, 0x7a, 0x65, 0x88, 0x01, 0x01,
0x12, 0x28, 0x0a, 0x0d, 0x73, 0x74, 0x61, 0x74, 0x69, 0x63, 0x5f, 0x6d, 0x65, 0x74, 0x68, 0x6f,
0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x48, 0x04, 0x52, 0x0c, 0x73, 0x74, 0x61, 0x74, 0x69,
0x63, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x88, 0x01, 0x01, 0x12, 0x1d, 0x0a, 0x07, 0x74, 0x72,
0x61, 0x69, 0x6c, 0x65, 0x72, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x48, 0x05, 0x52, 0x07, 0x74,
0x72, 0x61, 0x69, 0x6c, 0x65, 0x72, 0x88, 0x01, 0x01, 0x12, 0x29, 0x0a, 0x0e, 0x77, 0x61, 0x69,
0x74, 0x5f, 0x66, 0x6f, 0x72, 0x5f, 0x72, 0x65, 0x61, 0x64, 0x79, 0x18, 0x07, 0x20, 0x01, 0x28,
0x08, 0x48, 0x06, 0x52, 0x0c, 0x77, 0x61, 0x69, 0x74, 0x46, 0x6f, 0x72, 0x52, 0x65, 0x61, 0x64,
0x79, 0x88, 0x01, 0x01, 0x42, 0x12, 0x0a, 0x10, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74,
0x5f, 0x73, 0x75, 0x62, 0x74, 0x79, 0x70, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x68, 0x65, 0x61,
0x64, 0x65, 0x72, 0x42, 0x19, 0x0a, 0x17, 0x5f, 0x6d, 0x61, 0x78, 0x5f, 0x63, 0x61, 0x6c, 0x6c,
0x5f, 0x72, 0x65, 0x63, 0x76, 0x5f, 0x6d, 0x73, 0x67, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x42, 0x19,
0x0a, 0x17, 0x5f, 0x6d, 0x61, 0x78, 0x5f, 0x63, 0x61, 0x6c, 0x6c, 0x5f, 0x73, 0x65, 0x6e, 0x64,
0x5f, 0x6d, 0x73, 0x67, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x42, 0x10, 0x0a, 0x0e, 0x5f, 0x73, 0x74,
0x61, 0x74, 0x69, 0x63, 0x5f, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x42, 0x0a, 0x0a, 0x08, 0x5f,
0x74, 0x72, 0x61, 0x69, 0x6c, 0x65, 0x72, 0x42, 0x11, 0x0a, 0x0f, 0x5f, 0x77, 0x61, 0x69, 0x74,
0x5f, 0x66, 0x6f, 0x72, 0x5f, 0x72, 0x65, 0x61, 0x64, 0x79, 0x22, 0x64, 0x0a, 0x0e, 0x56, 0x61,
0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x78, 0x70, 0x72, 0x12, 0x17, 0x0a, 0x04,
0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61,
0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x30, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x02,
0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65,
0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x47, 0x52, 0x50, 0x43, 0x45, 0x72, 0x72, 0x6f, 0x72,
0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65,
0x22, 0xb8, 0x01, 0x0a, 0x0b, 0x52, 0x65, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79,
0x12, 0x42, 0x0a, 0x08, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01,
0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61,
0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x52, 0x65, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79,
0x43, 0x6f, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x08, 0x63, 0x6f, 0x6e, 0x73,
0x74, 0x61, 0x6e, 0x74, 0x12, 0x4b, 0x0a, 0x0b, 0x65, 0x78, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74,
0x69, 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x67, 0x72, 0x70, 0x63,
0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x52, 0x65, 0x74, 0x72,
0x79, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x45, 0x78, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x69,
0x61, 0x6c, 0x48, 0x00, 0x52, 0x0b, 0x65, 0x78, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x69, 0x61,
0x6c, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x66, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69,
0x66, 0x42, 0x08, 0x0a, 0x06, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x22, 0x79, 0x0a, 0x13, 0x52,
0x65, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x61,
0x6e, 0x74, 0x12, 0x1f, 0x0a, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x01,
0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c,
0x88, 0x01, 0x01, 0x12, 0x24, 0x0a, 0x0b, 0x6d, 0x61, 0x78, 0x5f, 0x72, 0x65, 0x74, 0x72, 0x69,
0x65, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x48, 0x01, 0x52, 0x0a, 0x6d, 0x61, 0x78, 0x52,
0x65, 0x74, 0x72, 0x69, 0x65, 0x73, 0x88, 0x01, 0x01, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x69, 0x6e,
0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x6d, 0x61, 0x78, 0x5f, 0x72,
0x65, 0x74, 0x72, 0x69, 0x65, 0x73, 0x22, 0xd1, 0x02, 0x0a, 0x16, 0x52, 0x65, 0x74, 0x72, 0x79,
0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x45, 0x78, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x69, 0x61,
0x6c, 0x12, 0x2e, 0x0a, 0x10, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x5f, 0x69, 0x6e, 0x74,
0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0f, 0x69,
0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x88, 0x01,
0x01, 0x12, 0x36, 0x0a, 0x14, 0x72, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x69, 0x7a, 0x61, 0x74, 0x69,
0x6f, 0x6e, 0x5f, 0x66, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x01, 0x48,
0x01, 0x52, 0x13, 0x72, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e,
0x46, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x88, 0x01, 0x01, 0x12, 0x23, 0x0a, 0x0a, 0x6d, 0x75, 0x6c,
0x74, 0x69, 0x70, 0x6c, 0x69, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x01, 0x48, 0x02, 0x52,
0x0a, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x69, 0x65, 0x72, 0x88, 0x01, 0x01, 0x12, 0x26,
0x0a, 0x0c, 0x6d, 0x61, 0x78, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x04,
0x20, 0x01, 0x28, 0x09, 0x48, 0x03, 0x52, 0x0b, 0x6d, 0x61, 0x78, 0x49, 0x6e, 0x74, 0x65, 0x72,
0x76, 0x61, 0x6c, 0x88, 0x01, 0x01, 0x12, 0x24, 0x0a, 0x0b, 0x6d, 0x61, 0x78, 0x5f, 0x72, 0x65,
0x74, 0x72, 0x69, 0x65, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x48, 0x04, 0x52, 0x0a, 0x6d,
0x61, 0x78, 0x52, 0x65, 0x74, 0x72, 0x69, 0x65, 0x73, 0x88, 0x01, 0x01, 0x42, 0x13, 0x0a, 0x11,
0x5f, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61,
0x6c, 0x42, 0x17, 0x0a, 0x15, 0x5f, 0x72, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x69, 0x7a, 0x61, 0x74,
0x69, 0x6f, 0x6e, 0x5f, 0x66, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x6d,
0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x69, 0x65, 0x72, 0x42, 0x0f, 0x0a, 0x0d, 0x5f, 0x6d, 0x61,
0x78, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x6d,
0x61, 0x78, 0x5f, 0x72, 0x65, 0x74, 0x72, 0x69, 0x65, 0x73, 0x22, 0x5d, 0x0a, 0x0d, 0x4d, 0x65,
0x74, 0x68, 0x6f, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x66,
0x69, 0x65, 0x6c, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x66, 0x69, 0x65, 0x6c,
0x64, 0x12, 0x13, 0x0a, 0x02, 0x62, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52,
0x02, 0x62, 0x79, 0x88, 0x01, 0x01, 0x12, 0x13, 0x0a, 0x02, 0x69, 0x66, 0x18, 0x03, 0x20, 0x01,
0x28, 0x09, 0x48, 0x01, 0x52, 0x02, 0x69, 0x66, 0x88, 0x01, 0x01, 0x42, 0x05, 0x0a, 0x03, 0x5f,
0x62, 0x79, 0x42, 0x05, 0x0a, 0x03, 0x5f, 0x69, 0x66, 0x22, 0x85, 0x01, 0x0a, 0x0e, 0x4d, 0x65,
0x74, 0x68, 0x6f, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x17, 0x0a, 0x04,
0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61,
0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x18, 0x02,
0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x05, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x88, 0x01, 0x01,
0x12, 0x1f, 0x0a, 0x08, 0x61, 0x75, 0x74, 0x6f, 0x62, 0x69, 0x6e, 0x64, 0x18, 0x03, 0x20, 0x01,
0x28, 0x08, 0x48, 0x02, 0x52, 0x08, 0x61, 0x75, 0x74, 0x6f, 0x62, 0x69, 0x6e, 0x64, 0x88, 0x01,
0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x66,
0x69, 0x65, 0x6c, 0x64, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x61, 0x75, 0x74, 0x6f, 0x62, 0x69, 0x6e,
0x64, 0x22, 0x62, 0x0a, 0x08, 0x41, 0x72, 0x67, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x12, 0x0a,
0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d,
0x65, 0x12, 0x13, 0x0a, 0x02, 0x62, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52,
0x02, 0x62, 0x79, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x69, 0x6e, 0x6c, 0x69, 0x6e, 0x65,
0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x06, 0x69, 0x6e, 0x6c, 0x69, 0x6e, 0x65,
0x88, 0x01, 0x01, 0x42, 0x05, 0x0a, 0x03, 0x5f, 0x62, 0x79, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x69,
0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x22, 0xf2, 0x01, 0x0a, 0x09, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x52,
0x75, 0x6c, 0x65, 0x12, 0x2c, 0x0a, 0x0f, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x5f, 0x72, 0x65,
0x73, 0x6f, 0x6c, 0x76, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x0e,
0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x52, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x72, 0x88, 0x01,
0x01, 0x12, 0x13, 0x0a, 0x02, 0x62, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52,
0x02, 0x62, 0x79, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x18,
0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x02, 0x52, 0x05, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x88, 0x01,
0x01, 0x12, 0x31, 0x0a, 0x05, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b,
0x32, 0x1b, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69,
0x6f, 0x6e, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x6e, 0x65, 0x6f, 0x66, 0x52, 0x05, 0x6f,
0x6e, 0x65, 0x6f, 0x66, 0x12, 0x2f, 0x0a, 0x03, 0x65, 0x6e, 0x76, 0x18, 0x05, 0x20, 0x01, 0x28,
0x0b, 0x32, 0x1d, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74,
0x69, 0x6f, 0x6e, 0x2e, 0x45, 0x6e, 0x76, 0x56, 0x61, 0x72, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e,
0x52, 0x03, 0x65, 0x6e, 0x76, 0x42, 0x12, 0x0a, 0x10, 0x5f, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d,
0x5f, 0x72, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x72, 0x42, 0x05, 0x0a, 0x03, 0x5f, 0x62, 0x79,
0x42, 0x08, 0x0a, 0x06, 0x5f, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x22, 0x89, 0x01, 0x0a, 0x0a, 0x46,
0x69, 0x65, 0x6c, 0x64, 0x4f, 0x6e, 0x65, 0x6f, 0x66, 0x12, 0x10, 0x0a, 0x02, 0x69, 0x66, 0x18,
0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x02, 0x69, 0x66, 0x12, 0x1a, 0x0a, 0x07, 0x64,
0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x07,
0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x12, 0x35, 0x0a, 0x03, 0x64, 0x65, 0x66, 0x18, 0x03,
0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65,
0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x44,
0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x03, 0x64, 0x65, 0x66, 0x12, 0x0e,
0x0a, 0x02, 0x62, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x62, 0x79, 0x42, 0x06,
0x0a, 0x04, 0x63, 0x6f, 0x6e, 0x64, 0x22, 0x45, 0x0a, 0x09, 0x43, 0x45, 0x4c, 0x50, 0x6c, 0x75,
0x67, 0x69, 0x6e, 0x12, 0x38, 0x0a, 0x06, 0x65, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x01, 0x20,
0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72,
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x43, 0x45, 0x4c, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x45,
0x78, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x06, 0x65, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x22, 0xaf, 0x02,
0x0a, 0x0f, 0x43, 0x45, 0x4c, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x45, 0x78, 0x70, 0x6f, 0x72,
0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x65, 0x73, 0x63, 0x18, 0x02, 0x20,
0x01, 0x28, 0x09, 0x52, 0x04, 0x64, 0x65, 0x73, 0x63, 0x12, 0x36, 0x0a, 0x05, 0x74, 0x79, 0x70,
0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e,
0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x43, 0x45, 0x4c, 0x52, 0x65,
0x63, 0x65, 0x69, 0x76, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x52, 0x05, 0x74, 0x79, 0x70, 0x65,
0x73, 0x12, 0x3a, 0x0a, 0x09, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x04,
0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65,
0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x43, 0x45, 0x4c, 0x46, 0x75, 0x6e, 0x63, 0x74, 0x69,
0x6f, 0x6e, 0x52, 0x09, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x3a, 0x0a,
0x09, 0x76, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b,
0x32, 0x1c, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69,
0x6f, 0x6e, 0x2e, 0x43, 0x45, 0x4c, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x09,
0x76, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x12, 0x44, 0x0a, 0x0a, 0x63, 0x61, 0x70,
0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e,
0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e,
0x43, 0x45, 0x4c, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c,
0x69, 0x74, 0x79, 0x52, 0x0a, 0x63, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x22,
0x9b, 0x02, 0x0a, 0x13, 0x43, 0x45, 0x4c, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x43, 0x61, 0x70,
0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x12, 0x3e, 0x0a, 0x03, 0x65, 0x6e, 0x76, 0x18, 0x01,
0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65,
0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x43, 0x45, 0x4c, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e,
0x45, 0x6e, 0x76, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x48, 0x00, 0x52,
0x03, 0x65, 0x6e, 0x76, 0x88, 0x01, 0x01, 0x12, 0x54, 0x0a, 0x0b, 0x66, 0x69, 0x6c, 0x65, 0x5f,
0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x67,
0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x43,
0x45, 0x4c, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x46, 0x69, 0x6c, 0x65, 0x53, 0x79, 0x73, 0x74,
0x65, 0x6d, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x48, 0x01, 0x52, 0x0a,
0x66, 0x69, 0x6c, 0x65, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x88, 0x01, 0x01, 0x12, 0x4a, 0x0a,
0x07, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b,
0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e,
0x2e, 0x43, 0x45, 0x4c, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72,
0x6b, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x48, 0x02, 0x52, 0x07, 0x6e,
0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x88, 0x01, 0x01, 0x42, 0x06, 0x0a, 0x04, 0x5f, 0x65, 0x6e,
0x76, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x73, 0x79, 0x73, 0x74, 0x65,
0x6d, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x22, 0x40, 0x0a,
0x16, 0x43, 0x45, 0x4c, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x45, 0x6e, 0x76, 0x43, 0x61, 0x70,
0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x61, 0x6c, 0x6c, 0x18, 0x01,
0x20, 0x01, 0x28, 0x08, 0x52, 0x03, 0x61, 0x6c, 0x6c, 0x12, 0x14, 0x0a, 0x05, 0x6e, 0x61, 0x6d,
0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x22,
0x3e, 0x0a, 0x1d, 0x43, 0x45, 0x4c, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x46, 0x69, 0x6c, 0x65,
0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79,
0x12, 0x1d, 0x0a, 0x0a, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01,
0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x50, 0x61, 0x74, 0x68, 0x22,
0x1c, 0x0a, 0x1a, 0x43, 0x45, 0x4c, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x4e, 0x65, 0x74, 0x77,
0x6f, 0x72, 0x6b, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x22, 0xa1, 0x01,
0x0a, 0x0b, 0x43, 0x45, 0x4c, 0x46, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a,
0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d,
0x65, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x65, 0x73, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52,
0x04, 0x64, 0x65, 0x73, 0x63, 0x12, 0x38, 0x0a, 0x04, 0x61, 0x72, 0x67, 0x73, 0x18, 0x03, 0x20,
0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72,
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x43, 0x45, 0x4c, 0x46, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f,
0x6e, 0x41, 0x72, 0x67, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x04, 0x61, 0x72, 0x67, 0x73, 0x12,
0x30, 0x0a, 0x06, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32,
0x18, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f,
0x6e, 0x2e, 0x43, 0x45, 0x4c, 0x54, 0x79, 0x70, 0x65, 0x52, 0x06, 0x72, 0x65, 0x74, 0x75, 0x72,
0x6e, 0x22, 0x71, 0x0a, 0x0f, 0x43, 0x45, 0x4c, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x72,
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, 0x12, 0x0a, 0x04, 0x64, 0x65, 0x73, 0x63,
0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x64, 0x65, 0x73, 0x63, 0x12, 0x36, 0x0a, 0x07,
0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e,
0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e,
0x43, 0x45, 0x4c, 0x46, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x6d, 0x65, 0x74,
0x68, 0x6f, 0x64, 0x73, 0x22, 0x6b, 0x0a, 0x13, 0x43, 0x45, 0x4c, 0x46, 0x75, 0x6e, 0x63, 0x74,
0x69, 0x6f, 0x6e, 0x41, 0x72, 0x67, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e,
0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12,
0x12, 0x0a, 0x04, 0x64, 0x65, 0x73, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x64,
0x65, 0x73, 0x63, 0x12, 0x2c, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28,
0x0b, 0x32, 0x18, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74,
0x69, 0x6f, 0x6e, 0x2e, 0x43, 0x45, 0x4c, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70,
0x65, 0x22, 0xdd, 0x01, 0x0a, 0x07, 0x43, 0x45, 0x4c, 0x54, 0x79, 0x70, 0x65, 0x12, 0x2f, 0x0a,
0x04, 0x6b, 0x69, 0x6e, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x19, 0x2e, 0x67, 0x72,
0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x54, 0x79,
0x70, 0x65, 0x4b, 0x69, 0x6e, 0x64, 0x48, 0x00, 0x52, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x12, 0x36,
0x0a, 0x08, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b,
0x32, 0x18, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69,
0x6f, 0x6e, 0x2e, 0x43, 0x45, 0x4c, 0x54, 0x79, 0x70, 0x65, 0x48, 0x00, 0x52, 0x08, 0x72, 0x65,
0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x12, 0x2f, 0x0a, 0x03, 0x6d, 0x61, 0x70, 0x18, 0x03, 0x20,
0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72,
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x43, 0x45, 0x4c, 0x4d, 0x61, 0x70, 0x54, 0x79, 0x70, 0x65,
0x48, 0x00, 0x52, 0x03, 0x6d, 0x61, 0x70, 0x12, 0x1a, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61,
0x67, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73,
0x61, 0x67, 0x65, 0x12, 0x14, 0x0a, 0x04, 0x65, 0x6e, 0x75, 0x6d, 0x18, 0x05, 0x20, 0x01, 0x28,
0x09, 0x48, 0x00, 0x52, 0x04, 0x65, 0x6e, 0x75, 0x6d, 0x42, 0x06, 0x0a, 0x04, 0x74, 0x79, 0x70,
0x65, 0x22, 0x68, 0x0a, 0x0a, 0x43, 0x45, 0x4c, 0x4d, 0x61, 0x70, 0x54, 0x79, 0x70, 0x65, 0x12,
0x2a, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x67,
0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x43,
0x45, 0x4c, 0x54, 0x79, 0x70, 0x65, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x2e, 0x0a, 0x05, 0x76,
0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x67, 0x72, 0x70,
0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x43, 0x45, 0x4c,
0x54, 0x79, 0x70, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x63, 0x0a, 0x0b, 0x43,
0x45, 0x4c, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61,
0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x12,
0x0a, 0x04, 0x64, 0x65, 0x73, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x64, 0x65,
0x73, 0x63, 0x12, 0x2c, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b,
0x32, 0x18, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69,
0x6f, 0x6e, 0x2e, 0x43, 0x45, 0x4c, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65,
0x2a, 0x5e, 0x0a, 0x08, 0x54, 0x79, 0x70, 0x65, 0x4b, 0x69, 0x6e, 0x64, 0x12, 0x0b, 0x0a, 0x07,
0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x53, 0x54, 0x52,
0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, 0x42, 0x4f, 0x4f, 0x4c, 0x10, 0x02, 0x12,
0x09, 0x0a, 0x05, 0x49, 0x4e, 0x54, 0x36, 0x34, 0x10, 0x03, 0x12, 0x0a, 0x0a, 0x06, 0x55, 0x49,
0x4e, 0x54, 0x36, 0x34, 0x10, 0x04, 0x12, 0x0a, 0x0a, 0x06, 0x44, 0x4f, 0x55, 0x42, 0x4c, 0x45,
0x10, 0x05, 0x12, 0x0c, 0x0a, 0x08, 0x44, 0x55, 0x52, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x06,
0x3a, 0x4c, 0x0a, 0x04, 0x66, 0x69, 0x6c, 0x65, 0x12, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c,
0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x4f,
0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xa3, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e,
0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e,
0x46, 0x69, 0x6c, 0x65, 0x52, 0x75, 0x6c, 0x65, 0x52, 0x04, 0x66, 0x69, 0x6c, 0x65, 0x3a, 0x58,
0x0a, 0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x1f, 0x2e, 0x67, 0x6f, 0x6f, 0x67,
0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x65, 0x72, 0x76,
0x69, 0x63, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xa3, 0x09, 0x20, 0x01, 0x28,
0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74,
0x69, 0x6f, 0x6e, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x75, 0x6c, 0x65, 0x52,
0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x3a, 0x54, 0x0a, 0x06, 0x6d, 0x65, 0x74, 0x68,
0x6f, 0x64, 0x12, 0x1e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f,
0x6e, 0x73, 0x18, 0xa3, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x72, 0x70, 0x63,
0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x4d, 0x65, 0x74, 0x68,
0x6f, 0x64, 0x52, 0x75, 0x6c, 0x65, 0x52, 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x3a, 0x58,
0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x1f, 0x2e, 0x67, 0x6f, 0x6f, 0x67,
0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4d, 0x65, 0x73, 0x73,
0x61, 0x67, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xa3, 0x09, 0x20, 0x01, 0x28,
0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74,
0x69, 0x6f, 0x6e, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x75, 0x6c, 0x65, 0x52,
0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x3a, 0x50, 0x0a, 0x05, 0x66, 0x69, 0x65, 0x6c,
0x64, 0x12, 0x1d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73,
0x18, 0xa3, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66,
0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x52,
0x75, 0x6c, 0x65, 0x52, 0x05, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x3a, 0x4c, 0x0a, 0x04, 0x65, 0x6e,
0x75, 0x6d, 0x12, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73,
0x18, 0xa3, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66,
0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x52, 0x75,
0x6c, 0x65, 0x52, 0x04, 0x65, 0x6e, 0x75, 0x6d, 0x3a, 0x61, 0x0a, 0x0a, 0x65, 0x6e, 0x75, 0x6d,
0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x21, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x56, 0x61, 0x6c,
0x75, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xa3, 0x09, 0x20, 0x01, 0x28, 0x0b,
0x32, 0x1e, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69,
0x6f, 0x6e, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x75, 0x6c, 0x65,
0x52, 0x09, 0x65, 0x6e, 0x75, 0x6d, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x50, 0x0a, 0x05, 0x6f,
0x6e, 0x65, 0x6f, 0x66, 0x12, 0x1d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4f, 0x6e, 0x65, 0x6f, 0x66, 0x4f, 0x70, 0x74, 0x69,
0x6f, 0x6e, 0x73, 0x18, 0xa3, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x72, 0x70,
0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x4f, 0x6e, 0x65,
0x6f, 0x66, 0x52, 0x75, 0x6c, 0x65, 0x52, 0x05, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x42, 0xc2, 0x01,
0x0a, 0x13, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72,
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x0f, 0x46, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f,
0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3d, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62,
0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6d, 0x65, 0x72, 0x63, 0x61, 0x72, 0x69, 0x2f, 0x67, 0x72, 0x70,
0x63, 0x2d, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x67, 0x72, 0x70,
0x63, 0x2f, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x3b, 0x66, 0x65, 0x64,
0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0xa2, 0x02, 0x03, 0x47, 0x46, 0x58, 0xaa, 0x02, 0x0f,
0x47, 0x72, 0x70, 0x63, 0x2e, 0x46, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0xca,
0x02, 0x0f, 0x47, 0x72, 0x70, 0x63, 0x5c, 0x46, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f,
0x6e, 0xe2, 0x02, 0x1b, 0x47, 0x72, 0x70, 0x63, 0x5c, 0x46, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74,
0x69, 0x6f, 0x6e, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea,
0x02, 0x10, 0x47, 0x72, 0x70, 0x63, 0x3a, 0x3a, 0x46, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69,
0x6f, 0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_grpc_federation_federation_proto_rawDescOnce sync.Once
file_grpc_federation_federation_proto_rawDescData = file_grpc_federation_federation_proto_rawDesc
)
func file_grpc_federation_federation_proto_rawDescGZIP() []byte {
file_grpc_federation_federation_proto_rawDescOnce.Do(func() {
file_grpc_federation_federation_proto_rawDescData = protoimpl.X.CompressGZIP(file_grpc_federation_federation_proto_rawDescData)
})
return file_grpc_federation_federation_proto_rawDescData
}
var file_grpc_federation_federation_proto_enumTypes = make([]protoimpl.EnumInfo, 2)
var file_grpc_federation_federation_proto_msgTypes = make([]protoimpl.MessageInfo, 48)
var file_grpc_federation_federation_proto_goTypes = []interface{}{
(TypeKind)(0), // 0: grpc.federation.TypeKind
(GRPCError_LogLevel)(0), // 1: grpc.federation.GRPCError.LogLevel
(*FileRule)(nil), // 2: grpc.federation.FileRule
(*EnumRule)(nil), // 3: grpc.federation.EnumRule
(*EnumValueRule)(nil), // 4: grpc.federation.EnumValueRule
(*EnumValueAttribute)(nil), // 5: grpc.federation.EnumValueAttribute
(*OneofRule)(nil), // 6: grpc.federation.OneofRule
(*ServiceRule)(nil), // 7: grpc.federation.ServiceRule
(*Env)(nil), // 8: grpc.federation.Env
(*ServiceVariable)(nil), // 9: grpc.federation.ServiceVariable
(*ServiceVariableValidationExpr)(nil), // 10: grpc.federation.ServiceVariableValidationExpr
(*EnvVar)(nil), // 11: grpc.federation.EnvVar
(*EnvType)(nil), // 12: grpc.federation.EnvType
(*EnvMapType)(nil), // 13: grpc.federation.EnvMapType
(*EnvVarOption)(nil), // 14: grpc.federation.EnvVarOption
(*MethodRule)(nil), // 15: grpc.federation.MethodRule
(*MessageRule)(nil), // 16: grpc.federation.MessageRule
(*VariableDefinition)(nil), // 17: grpc.federation.VariableDefinition
(*MapExpr)(nil), // 18: grpc.federation.MapExpr
(*Iterator)(nil), // 19: grpc.federation.Iterator
(*MessageExpr)(nil), // 20: grpc.federation.MessageExpr
(*EnumExpr)(nil), // 21: grpc.federation.EnumExpr
(*CallExpr)(nil), // 22: grpc.federation.CallExpr
(*SwitchExpr)(nil), // 23: grpc.federation.SwitchExpr
(*SwitchCaseExpr)(nil), // 24: grpc.federation.SwitchCaseExpr
(*SwitchDefaultExpr)(nil), // 25: grpc.federation.SwitchDefaultExpr
(*GRPCError)(nil), // 26: grpc.federation.GRPCError
(*GRPCErrorDetail)(nil), // 27: grpc.federation.GRPCErrorDetail
(*GRPCCallOption)(nil), // 28: grpc.federation.GRPCCallOption
(*ValidationExpr)(nil), // 29: grpc.federation.ValidationExpr
(*RetryPolicy)(nil), // 30: grpc.federation.RetryPolicy
(*RetryPolicyConstant)(nil), // 31: grpc.federation.RetryPolicyConstant
(*RetryPolicyExponential)(nil), // 32: grpc.federation.RetryPolicyExponential
(*MethodRequest)(nil), // 33: grpc.federation.MethodRequest
(*MethodResponse)(nil), // 34: grpc.federation.MethodResponse
(*Argument)(nil), // 35: grpc.federation.Argument
(*FieldRule)(nil), // 36: grpc.federation.FieldRule
(*FieldOneof)(nil), // 37: grpc.federation.FieldOneof
(*CELPlugin)(nil), // 38: grpc.federation.CELPlugin
(*CELPluginExport)(nil), // 39: grpc.federation.CELPluginExport
(*CELPluginCapability)(nil), // 40: grpc.federation.CELPluginCapability
(*CELPluginEnvCapability)(nil), // 41: grpc.federation.CELPluginEnvCapability
(*CELPluginFileSystemCapability)(nil), // 42: grpc.federation.CELPluginFileSystemCapability
(*CELPluginNetworkCapability)(nil), // 43: grpc.federation.CELPluginNetworkCapability
(*CELFunction)(nil), // 44: grpc.federation.CELFunction
(*CELReceiverType)(nil), // 45: grpc.federation.CELReceiverType
(*CELFunctionArgument)(nil), // 46: grpc.federation.CELFunctionArgument
(*CELType)(nil), // 47: grpc.federation.CELType
(*CELMapType)(nil), // 48: grpc.federation.CELMapType
(*CELVariable)(nil), // 49: grpc.federation.CELVariable
(code.Code)(0), // 50: google.rpc.Code
(*errdetails.ErrorInfo)(nil), // 51: google.rpc.ErrorInfo
(*errdetails.RetryInfo)(nil), // 52: google.rpc.RetryInfo
(*errdetails.DebugInfo)(nil), // 53: google.rpc.DebugInfo
(*errdetails.QuotaFailure)(nil), // 54: google.rpc.QuotaFailure
(*errdetails.PreconditionFailure)(nil), // 55: google.rpc.PreconditionFailure
(*errdetails.BadRequest)(nil), // 56: google.rpc.BadRequest
(*errdetails.RequestInfo)(nil), // 57: google.rpc.RequestInfo
(*errdetails.ResourceInfo)(nil), // 58: google.rpc.ResourceInfo
(*errdetails.Help)(nil), // 59: google.rpc.Help
(*errdetails.LocalizedMessage)(nil), // 60: google.rpc.LocalizedMessage
(*descriptorpb.FileOptions)(nil), // 61: google.protobuf.FileOptions
(*descriptorpb.ServiceOptions)(nil), // 62: google.protobuf.ServiceOptions
(*descriptorpb.MethodOptions)(nil), // 63: google.protobuf.MethodOptions
(*descriptorpb.MessageOptions)(nil), // 64: google.protobuf.MessageOptions
(*descriptorpb.FieldOptions)(nil), // 65: google.protobuf.FieldOptions
(*descriptorpb.EnumOptions)(nil), // 66: google.protobuf.EnumOptions
(*descriptorpb.EnumValueOptions)(nil), // 67: google.protobuf.EnumValueOptions
(*descriptorpb.OneofOptions)(nil), // 68: google.protobuf.OneofOptions
}
var file_grpc_federation_federation_proto_depIdxs = []int32{
38, // 0: grpc.federation.FileRule.plugin:type_name -> grpc.federation.CELPlugin
5, // 1: grpc.federation.EnumValueRule.attr:type_name -> grpc.federation.EnumValueAttribute
8, // 2: grpc.federation.ServiceRule.env:type_name -> grpc.federation.Env
9, // 3: grpc.federation.ServiceRule.var:type_name -> grpc.federation.ServiceVariable
11, // 4: grpc.federation.Env.var:type_name -> grpc.federation.EnvVar
18, // 5: grpc.federation.ServiceVariable.map:type_name -> grpc.federation.MapExpr
20, // 6: grpc.federation.ServiceVariable.message:type_name -> grpc.federation.MessageExpr
10, // 7: grpc.federation.ServiceVariable.validation:type_name -> grpc.federation.ServiceVariableValidationExpr
21, // 8: grpc.federation.ServiceVariable.enum:type_name -> grpc.federation.EnumExpr
23, // 9: grpc.federation.ServiceVariable.switch:type_name -> grpc.federation.SwitchExpr
12, // 10: grpc.federation.EnvVar.type:type_name -> grpc.federation.EnvType
14, // 11: grpc.federation.EnvVar.option:type_name -> grpc.federation.EnvVarOption
0, // 12: grpc.federation.EnvType.kind:type_name -> grpc.federation.TypeKind
12, // 13: grpc.federation.EnvType.repeated:type_name -> grpc.federation.EnvType
13, // 14: grpc.federation.EnvType.map:type_name -> grpc.federation.EnvMapType
12, // 15: grpc.federation.EnvMapType.key:type_name -> grpc.federation.EnvType
12, // 16: grpc.federation.EnvMapType.value:type_name -> grpc.federation.EnvType
17, // 17: grpc.federation.MessageRule.def:type_name -> grpc.federation.VariableDefinition
18, // 18: grpc.federation.VariableDefinition.map:type_name -> grpc.federation.MapExpr
20, // 19: grpc.federation.VariableDefinition.message:type_name -> grpc.federation.MessageExpr
22, // 20: grpc.federation.VariableDefinition.call:type_name -> grpc.federation.CallExpr
29, // 21: grpc.federation.VariableDefinition.validation:type_name -> grpc.federation.ValidationExpr
21, // 22: grpc.federation.VariableDefinition.enum:type_name -> grpc.federation.EnumExpr
23, // 23: grpc.federation.VariableDefinition.switch:type_name -> grpc.federation.SwitchExpr
19, // 24: grpc.federation.MapExpr.iterator:type_name -> grpc.federation.Iterator
20, // 25: grpc.federation.MapExpr.message:type_name -> grpc.federation.MessageExpr
21, // 26: grpc.federation.MapExpr.enum:type_name -> grpc.federation.EnumExpr
35, // 27: grpc.federation.MessageExpr.args:type_name -> grpc.federation.Argument
33, // 28: grpc.federation.CallExpr.request:type_name -> grpc.federation.MethodRequest
30, // 29: grpc.federation.CallExpr.retry:type_name -> grpc.federation.RetryPolicy
26, // 30: grpc.federation.CallExpr.error:type_name -> grpc.federation.GRPCError
28, // 31: grpc.federation.CallExpr.option:type_name -> grpc.federation.GRPCCallOption
24, // 32: grpc.federation.SwitchExpr.case:type_name -> grpc.federation.SwitchCaseExpr
25, // 33: grpc.federation.SwitchExpr.default:type_name -> grpc.federation.SwitchDefaultExpr
17, // 34: grpc.federation.SwitchCaseExpr.def:type_name -> grpc.federation.VariableDefinition
17, // 35: grpc.federation.SwitchDefaultExpr.def:type_name -> grpc.federation.VariableDefinition
17, // 36: grpc.federation.GRPCError.def:type_name -> grpc.federation.VariableDefinition
50, // 37: grpc.federation.GRPCError.code:type_name -> google.rpc.Code
27, // 38: grpc.federation.GRPCError.details:type_name -> grpc.federation.GRPCErrorDetail
1, // 39: grpc.federation.GRPCError.log_level:type_name -> grpc.federation.GRPCError.LogLevel
17, // 40: grpc.federation.GRPCErrorDetail.def:type_name -> grpc.federation.VariableDefinition
20, // 41: grpc.federation.GRPCErrorDetail.message:type_name -> grpc.federation.MessageExpr
51, // 42: grpc.federation.GRPCErrorDetail.error_info:type_name -> google.rpc.ErrorInfo
52, // 43: grpc.federation.GRPCErrorDetail.retry_info:type_name -> google.rpc.RetryInfo
53, // 44: grpc.federation.GRPCErrorDetail.debug_info:type_name -> google.rpc.DebugInfo
54, // 45: grpc.federation.GRPCErrorDetail.quota_failure:type_name -> google.rpc.QuotaFailure
55, // 46: grpc.federation.GRPCErrorDetail.precondition_failure:type_name -> google.rpc.PreconditionFailure
56, // 47: grpc.federation.GRPCErrorDetail.bad_request:type_name -> google.rpc.BadRequest
57, // 48: grpc.federation.GRPCErrorDetail.request_info:type_name -> google.rpc.RequestInfo
58, // 49: grpc.federation.GRPCErrorDetail.resource_info:type_name -> google.rpc.ResourceInfo
59, // 50: grpc.federation.GRPCErrorDetail.help:type_name -> google.rpc.Help
60, // 51: grpc.federation.GRPCErrorDetail.localized_message:type_name -> google.rpc.LocalizedMessage
26, // 52: grpc.federation.ValidationExpr.error:type_name -> grpc.federation.GRPCError
31, // 53: grpc.federation.RetryPolicy.constant:type_name -> grpc.federation.RetryPolicyConstant
32, // 54: grpc.federation.RetryPolicy.exponential:type_name -> grpc.federation.RetryPolicyExponential
37, // 55: grpc.federation.FieldRule.oneof:type_name -> grpc.federation.FieldOneof
14, // 56: grpc.federation.FieldRule.env:type_name -> grpc.federation.EnvVarOption
17, // 57: grpc.federation.FieldOneof.def:type_name -> grpc.federation.VariableDefinition
39, // 58: grpc.federation.CELPlugin.export:type_name -> grpc.federation.CELPluginExport
45, // 59: grpc.federation.CELPluginExport.types:type_name -> grpc.federation.CELReceiverType
44, // 60: grpc.federation.CELPluginExport.functions:type_name -> grpc.federation.CELFunction
49, // 61: grpc.federation.CELPluginExport.variables:type_name -> grpc.federation.CELVariable
40, // 62: grpc.federation.CELPluginExport.capability:type_name -> grpc.federation.CELPluginCapability
41, // 63: grpc.federation.CELPluginCapability.env:type_name -> grpc.federation.CELPluginEnvCapability
42, // 64: grpc.federation.CELPluginCapability.file_system:type_name -> grpc.federation.CELPluginFileSystemCapability
43, // 65: grpc.federation.CELPluginCapability.network:type_name -> grpc.federation.CELPluginNetworkCapability
46, // 66: grpc.federation.CELFunction.args:type_name -> grpc.federation.CELFunctionArgument
47, // 67: grpc.federation.CELFunction.return:type_name -> grpc.federation.CELType
44, // 68: grpc.federation.CELReceiverType.methods:type_name -> grpc.federation.CELFunction
47, // 69: grpc.federation.CELFunctionArgument.type:type_name -> grpc.federation.CELType
0, // 70: grpc.federation.CELType.kind:type_name -> grpc.federation.TypeKind
47, // 71: grpc.federation.CELType.repeated:type_name -> grpc.federation.CELType
48, // 72: grpc.federation.CELType.map:type_name -> grpc.federation.CELMapType
47, // 73: grpc.federation.CELMapType.key:type_name -> grpc.federation.CELType
47, // 74: grpc.federation.CELMapType.value:type_name -> grpc.federation.CELType
47, // 75: grpc.federation.CELVariable.type:type_name -> grpc.federation.CELType
61, // 76: grpc.federation.file:extendee -> google.protobuf.FileOptions
62, // 77: grpc.federation.service:extendee -> google.protobuf.ServiceOptions
63, // 78: grpc.federation.method:extendee -> google.protobuf.MethodOptions
64, // 79: grpc.federation.message:extendee -> google.protobuf.MessageOptions
65, // 80: grpc.federation.field:extendee -> google.protobuf.FieldOptions
66, // 81: grpc.federation.enum:extendee -> google.protobuf.EnumOptions
67, // 82: grpc.federation.enum_value:extendee -> google.protobuf.EnumValueOptions
68, // 83: grpc.federation.oneof:extendee -> google.protobuf.OneofOptions
2, // 84: grpc.federation.file:type_name -> grpc.federation.FileRule
7, // 85: grpc.federation.service:type_name -> grpc.federation.ServiceRule
15, // 86: grpc.federation.method:type_name -> grpc.federation.MethodRule
16, // 87: grpc.federation.message:type_name -> grpc.federation.MessageRule
36, // 88: grpc.federation.field:type_name -> grpc.federation.FieldRule
3, // 89: grpc.federation.enum:type_name -> grpc.federation.EnumRule
4, // 90: grpc.federation.enum_value:type_name -> grpc.federation.EnumValueRule
6, // 91: grpc.federation.oneof:type_name -> grpc.federation.OneofRule
92, // [92:92] is the sub-list for method output_type
92, // [92:92] is the sub-list for method input_type
84, // [84:92] is the sub-list for extension type_name
76, // [76:84] is the sub-list for extension extendee
0, // [0:76] is the sub-list for field type_name
}
func init() { file_grpc_federation_federation_proto_init() }
func file_grpc_federation_federation_proto_init() {
if File_grpc_federation_federation_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_grpc_federation_federation_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*FileRule); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*EnumRule); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*EnumValueRule); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*EnumValueAttribute); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*OneofRule); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ServiceRule); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Env); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ServiceVariable); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ServiceVariableValidationExpr); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*EnvVar); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*EnvType); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*EnvMapType); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*EnvVarOption); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*MethodRule); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*MessageRule); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*VariableDefinition); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*MapExpr); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Iterator); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*MessageExpr); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*EnumExpr); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CallExpr); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*SwitchExpr); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*SwitchCaseExpr); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*SwitchDefaultExpr); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GRPCError); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GRPCErrorDetail); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GRPCCallOption); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ValidationExpr); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[28].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*RetryPolicy); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[29].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*RetryPolicyConstant); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[30].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*RetryPolicyExponential); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[31].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*MethodRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[32].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*MethodResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[33].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Argument); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[34].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*FieldRule); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[35].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*FieldOneof); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[36].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CELPlugin); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[37].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CELPluginExport); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[38].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CELPluginCapability); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[39].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CELPluginEnvCapability); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[40].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CELPluginFileSystemCapability); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[41].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CELPluginNetworkCapability); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[42].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CELFunction); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[43].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CELReceiverType); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[44].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CELFunctionArgument); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[45].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CELType); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[46].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CELMapType); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[47].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CELVariable); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
file_grpc_federation_federation_proto_msgTypes[2].OneofWrappers = []interface{}{}
file_grpc_federation_federation_proto_msgTypes[7].OneofWrappers = []interface{}{
(*ServiceVariable_By)(nil),
(*ServiceVariable_Map)(nil),
(*ServiceVariable_Message)(nil),
(*ServiceVariable_Validation)(nil),
(*ServiceVariable_Enum)(nil),
(*ServiceVariable_Switch)(nil),
}
file_grpc_federation_federation_proto_msgTypes[9].OneofWrappers = []interface{}{}
file_grpc_federation_federation_proto_msgTypes[10].OneofWrappers = []interface{}{
(*EnvType_Kind)(nil),
(*EnvType_Repeated)(nil),
(*EnvType_Map)(nil),
}
file_grpc_federation_federation_proto_msgTypes[12].OneofWrappers = []interface{}{}
file_grpc_federation_federation_proto_msgTypes[13].OneofWrappers = []interface{}{}
file_grpc_federation_federation_proto_msgTypes[14].OneofWrappers = []interface{}{}
file_grpc_federation_federation_proto_msgTypes[15].OneofWrappers = []interface{}{
(*VariableDefinition_By)(nil),
(*VariableDefinition_Map)(nil),
(*VariableDefinition_Message)(nil),
(*VariableDefinition_Call)(nil),
(*VariableDefinition_Validation)(nil),
(*VariableDefinition_Enum)(nil),
(*VariableDefinition_Switch)(nil),
}
file_grpc_federation_federation_proto_msgTypes[16].OneofWrappers = []interface{}{
(*MapExpr_By)(nil),
(*MapExpr_Message)(nil),
(*MapExpr_Enum)(nil),
}
file_grpc_federation_federation_proto_msgTypes[20].OneofWrappers = []interface{}{}
file_grpc_federation_federation_proto_msgTypes[22].OneofWrappers = []interface{}{
(*SwitchCaseExpr_By)(nil),
}
file_grpc_federation_federation_proto_msgTypes[23].OneofWrappers = []interface{}{
(*SwitchDefaultExpr_By)(nil),
}
file_grpc_federation_federation_proto_msgTypes[24].OneofWrappers = []interface{}{}
file_grpc_federation_federation_proto_msgTypes[26].OneofWrappers = []interface{}{}
file_grpc_federation_federation_proto_msgTypes[27].OneofWrappers = []interface{}{}
file_grpc_federation_federation_proto_msgTypes[28].OneofWrappers = []interface{}{
(*RetryPolicy_Constant)(nil),
(*RetryPolicy_Exponential)(nil),
}
file_grpc_federation_federation_proto_msgTypes[29].OneofWrappers = []interface{}{}
file_grpc_federation_federation_proto_msgTypes[30].OneofWrappers = []interface{}{}
file_grpc_federation_federation_proto_msgTypes[31].OneofWrappers = []interface{}{}
file_grpc_federation_federation_proto_msgTypes[32].OneofWrappers = []interface{}{}
file_grpc_federation_federation_proto_msgTypes[33].OneofWrappers = []interface{}{}
file_grpc_federation_federation_proto_msgTypes[34].OneofWrappers = []interface{}{}
file_grpc_federation_federation_proto_msgTypes[35].OneofWrappers = []interface{}{
(*FieldOneof_If)(nil),
(*FieldOneof_Default)(nil),
}
file_grpc_federation_federation_proto_msgTypes[38].OneofWrappers = []interface{}{}
file_grpc_federation_federation_proto_msgTypes[45].OneofWrappers = []interface{}{
(*CELType_Kind)(nil),
(*CELType_Repeated)(nil),
(*CELType_Map)(nil),
(*CELType_Message)(nil),
(*CELType_Enum)(nil),
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_grpc_federation_federation_proto_rawDesc,
NumEnums: 2,
NumMessages: 48,
NumExtensions: 8,
NumServices: 0,
},
GoTypes: file_grpc_federation_federation_proto_goTypes,
DependencyIndexes: file_grpc_federation_federation_proto_depIdxs,
EnumInfos: file_grpc_federation_federation_proto_enumTypes,
MessageInfos: file_grpc_federation_federation_proto_msgTypes,
ExtensionInfos: file_grpc_federation_federation_proto_extTypes,
}.Build()
File_grpc_federation_federation_proto = out.File
file_grpc_federation_federation_proto_rawDesc = nil
file_grpc_federation_federation_proto_goTypes = nil
file_grpc_federation_federation_proto_depIdxs = nil
}
================================================
FILE: _examples/06_alias/main_test.go
================================================
package main_test
import (
"context"
"log/slog"
"net"
"os"
"testing"
"github.com/google/go-cmp/cmp"
"github.com/google/go-cmp/cmp/cmpopts"
"go.opentelemetry.io/otel"
"go.opentelemetry.io/otel/attribute"
"go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc"
"go.opentelemetry.io/otel/propagation"
"go.opentelemetry.io/otel/sdk/resource"
sdktrace "go.opentelemetry.io/otel/sdk/trace"
semconv "go.opentelemetry.io/otel/semconv/v1.4.0"
"go.uber.org/goleak"
"google.golang.org/grpc"
"google.golang.org/grpc/test/bufconn"
"example/federation"
"example/post"
postv2 "example/post/v2"
)
const bufSize = 1024
var (
listener *bufconn.Listener
postClient post.PostServiceClient
postv2Client postv2.PostServiceClient
)
type clientConfig struct{}
func (c *clientConfig) Org_Post_PostServiceClient(cfg federation.FederationServiceClientConfig) (post.PostServiceClient, error) {
return postClient, nil
}
func (c *clientConfig) Org_Post_V2_PostServiceClient(cfg federation.FederationServiceClientConfig) (postv2.PostServiceClient, error) {
return postv2Client, nil
}
type PostServer struct {
*post.UnimplementedPostServiceServer
}
func (s *PostServer) GetPost(ctx context.Context, req *post.GetPostRequest) (*post.GetPostResponse, error) {
return &post.GetPostResponse{
Post: &post.Post{
Id: req.Id,
Data: &post.PostData{
Type: post.PostDataType_POST_TYPE_C,
Title: "foo",
Content: &post.PostContent{
Category: post.PostContent_CATEGORY_A,
Head: "headhead",
Body: "bodybody",
},
},
},
}, nil
}
type PostV2Server struct {
*postv2.UnimplementedPostServiceServer
}
func (s *PostV2Server) GetPost(ctx context.Context, req *postv2.GetPostRequest) (*postv2.GetPostResponse, error) {
return &postv2.GetPostResponse{
Post: &postv2.Post{
Id: req.Id,
Data: &postv2.PostData{
Type: postv2.PostDataType_POST_V2_TYPE_C,
Title: "foo2",
Content: &postv2.PostContent{
Category: postv2.PostContent_CATEGORY_A,
Head: "headhead2",
Body: "bodybody2",
},
},
},
}, nil
}
func dialer(ctx context.Context, address string) (net.Conn, error) {
return listener.Dial()
}
func TestFederation(t *testing.T) {
defer goleak.VerifyNone(t)
ctx := context.Background()
listener = bufconn.Listen(bufSize)
if os.Getenv("ENABLE_JAEGER") != "" {
exporter, err := otlptracegrpc.New(ctx, otlptracegrpc.WithInsecure())
if err != nil {
t.Fatal(err)
}
tp := sdktrace.NewTracerProvider(
sdktrace.WithBatcher(exporter),
sdktrace.WithResource(
resource.NewWithAttributes(
semconv.SchemaURL,
semconv.ServiceNameKey.String("example06/alias"),
semconv.ServiceVersionKey.String("1.0.0"),
attribute.String("environment", "dev"),
),
),
sdktrace.WithSampler(sdktrace.AlwaysSample()),
)
defer tp.Shutdown(ctx)
otel.SetTextMapPropagator(propagation.TraceContext{})
otel.SetTracerProvider(tp)
}
conn, err := grpc.DialContext(ctx, "", grpc.WithContextDialer(dialer), grpc.WithInsecure())
if err != nil {
t.Fatal(err)
}
defer conn.Close()
postClient = post.NewPostServiceClient(conn)
postv2Client = postv2.NewPostServiceClient(conn)
grpcServer := grpc.NewServer()
defer grpcServer.Stop()
logger := slog.New(slog.NewJSONHandler(os.Stdout, &slog.HandlerOptions{
Level: slog.LevelDebug,
}))
federationServer, err := federation.NewFederationService(federation.FederationServiceConfig{
Client: new(clientConfig),
Logger: logger,
})
if err != nil {
t.Fatal(err)
}
defer federation.CleanupFederationService(ctx, federationServer)
post.RegisterPostServiceServer(grpcServer, &PostServer{})
postv2.RegisterPostServiceServer(grpcServer, &PostV2Server{})
federation.RegisterFederationServiceServer(grpcServer, federationServer)
go func() {
if err := grpcServer.Serve(listener); err != nil {
t.Fatal(err)
}
}()
client := federation.NewFederationServiceClient(conn)
res, err := client.GetPost(ctx, &federation.GetPostRequest{
Id: "foo",
Condition: &federation.GetPostRequest_A{
A: &federation.GetPostRequest_ConditionA{
Prop: "bar",
},
},
})
if err != nil {
t.Fatal(err)
}
if diff := cmp.Diff(res, &federation.GetPostResponse{
Post: &federation.Post{
Id: "foo",
Data: &federation.PostData{
Type: federation.PostType_POST_TYPE_BAR,
Title: "foo",
Content: &federation.PostContent{
Head: "headhead",
Body: "bodybody",
DupBody: "bodybody",
},
},
Data2: &federation.PostData{
Type: federation.PostType_POST_TYPE_BAR,
Title: "foo2",
Content: &federation.PostContent{
Head: "headhead2",
Body: "bodybody2",
DupBody: "bodybody2",
},
},
M: &post.M{X: "xxx"},
Type: federation.PostType_POST_TYPE_BAR,
Type2: federation.PostType_POST_TYPE_BAR,
Type3: federation.PostType_POST_TYPE_BAR,
Type4: federation.PostType_POST_TYPE_FOO,
},
}, cmpopts.IgnoreUnexported(
federation.GetPostResponse{},
federation.Post{},
federation.PostData{},
federation.PostContent{},
post.M{},
)); diff != "" {
t.Errorf("(-got, +want)\n%s", diff)
}
}
================================================
FILE: _examples/06_alias/post/post.pb.go
================================================
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.33.0
// protoc (unknown)
// source: post/post.proto
package post
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
type PostDataType int32
const (
PostDataType_POST_TYPE_A PostDataType = 0
PostDataType_POST_TYPE_B PostDataType = 1
PostDataType_POST_TYPE_C PostDataType = 2
PostDataType_POST_TYPE_D PostDataType = 3
)
// Enum value maps for PostDataType.
var (
PostDataType_name = map[int32]string{
0: "POST_TYPE_A",
1: "POST_TYPE_B",
2: "POST_TYPE_C",
3: "POST_TYPE_D",
}
PostDataType_value = map[string]int32{
"POST_TYPE_A": 0,
"POST_TYPE_B": 1,
"POST_TYPE_C": 2,
"POST_TYPE_D": 3,
}
)
func (x PostDataType) Enum() *PostDataType {
p := new(PostDataType)
*p = x
return p
}
func (x PostDataType) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (PostDataType) Descriptor() protoreflect.EnumDescriptor {
return file_post_post_proto_enumTypes[0].Descriptor()
}
func (PostDataType) Type() protoreflect.EnumType {
return &file_post_post_proto_enumTypes[0]
}
func (x PostDataType) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use PostDataType.Descriptor instead.
func (PostDataType) EnumDescriptor() ([]byte, []int) {
return file_post_post_proto_rawDescGZIP(), []int{0}
}
type PostContent_Category int32
const (
PostContent_CATEGORY_A PostContent_Category = 0
PostContent_CATEGORY_B PostContent_Category = 1
)
// Enum value maps for PostContent_Category.
var (
PostContent_Category_name = map[int32]string{
0: "CATEGORY_A",
1: "CATEGORY_B",
}
PostContent_Category_value = map[string]int32{
"CATEGORY_A": 0,
"CATEGORY_B": 1,
}
)
func (x PostContent_Category) Enum() *PostContent_Category {
p := new(PostContent_Category)
*p = x
return p
}
func (x PostContent_Category) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (PostContent_Category) Descriptor() protoreflect.EnumDescriptor {
return file_post_post_proto_enumTypes[1].Descriptor()
}
func (PostContent_Category) Type() protoreflect.EnumType {
return &file_post_post_proto_enumTypes[1]
}
func (x PostContent_Category) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use PostContent_Category.Descriptor instead.
func (PostContent_Category) EnumDescriptor() ([]byte, []int) {
return file_post_post_proto_rawDescGZIP(), []int{4, 0}
}
type GetPostRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
// Types that are assignable to Condition:
//
// *GetPostRequest_A
// *GetPostRequest_B
Condition isGetPostRequest_Condition `protobuf_oneof:"condition"`
}
func (x *GetPostRequest) Reset() {
*x = GetPostRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_post_post_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GetPostRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetPostRequest) ProtoMessage() {}
func (x *GetPostRequest) ProtoReflect() protoreflect.Message {
mi := &file_post_post_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GetPostRequest.ProtoReflect.Descriptor instead.
func (*GetPostRequest) Descriptor() ([]byte, []int) {
return file_post_post_proto_rawDescGZIP(), []int{0}
}
func (x *GetPostRequest) GetId() string {
if x != nil {
return x.Id
}
return ""
}
func (m *GetPostRequest) GetCondition() isGetPostRequest_Condition {
if m != nil {
return m.Condition
}
return nil
}
func (x *GetPostRequest) GetA() *PostConditionA {
if x, ok := x.GetCondition().(*GetPostRequest_A); ok {
return x.A
}
return nil
}
func (x *GetPostRequest) GetB() *PostConditionB {
if x, ok := x.GetCondition().(*GetPostRequest_B); ok {
return x.B
}
return nil
}
type isGetPostRequest_Condition interface {
isGetPostRequest_Condition()
}
type GetPostRequest_A struct {
A *PostConditionA `protobuf:"bytes,2,opt,name=a,proto3,oneof"`
}
type GetPostRequest_B struct {
B *PostConditionB `protobuf:"bytes,3,opt,name=b,proto3,oneof"`
}
func (*GetPostRequest_A) isGetPostRequest_Condition() {}
func (*GetPostRequest_B) isGetPostRequest_Condition() {}
type GetPostResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Post *Post `protobuf:"bytes,1,opt,name=post,proto3" json:"post,omitempty"`
}
func (x *GetPostResponse) Reset() {
*x = GetPostResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_post_post_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GetPostResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetPostResponse) ProtoMessage() {}
func (x *GetPostResponse) ProtoReflect() protoreflect.Message {
mi := &file_post_post_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GetPostResponse.ProtoReflect.Descriptor instead.
func (*GetPostResponse) Descriptor() ([]byte, []int) {
return file_post_post_proto_rawDescGZIP(), []int{1}
}
func (x *GetPostResponse) GetPost() *Post {
if x != nil {
return x.Post
}
return nil
}
type Post struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
Data *PostData `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"`
}
func (x *Post) Reset() {
*x = Post{}
if protoimpl.UnsafeEnabled {
mi := &file_post_post_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Post) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Post) ProtoMessage() {}
func (x *Post) ProtoReflect() protoreflect.Message {
mi := &file_post_post_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Post.ProtoReflect.Descriptor instead.
func (*Post) Descriptor() ([]byte, []int) {
return file_post_post_proto_rawDescGZIP(), []int{2}
}
func (x *Post) GetId() string {
if x != nil {
return x.Id
}
return ""
}
func (x *Post) GetData() *PostData {
if x != nil {
return x.Data
}
return nil
}
type PostData struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Type PostDataType `protobuf:"varint,1,opt,name=type,proto3,enum=org.post.PostDataType" json:"type,omitempty"`
Title string `protobuf:"bytes,2,opt,name=title,proto3" json:"title,omitempty"`
Content *PostContent `protobuf:"bytes,3,opt,name=content,proto3" json:"content,omitempty"`
Data string `protobuf:"bytes,4,opt,name=data,proto3" json:"data,omitempty"`
}
func (x *PostData) Reset() {
*x = PostData{}
if protoimpl.UnsafeEnabled {
mi := &file_post_post_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *PostData) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*PostData) ProtoMessage() {}
func (x *PostData) ProtoReflect() protoreflect.Message {
mi := &file_post_post_proto_msgTypes[3]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use PostData.ProtoReflect.Descriptor instead.
func (*PostData) Descriptor() ([]byte, []int) {
return file_post_post_proto_rawDescGZIP(), []int{3}
}
func (x *PostData) GetType() PostDataType {
if x != nil {
return x.Type
}
return PostDataType_POST_TYPE_A
}
func (x *PostData) GetTitle() string {
if x != nil {
return x.Title
}
return ""
}
func (x *PostData) GetContent() *PostContent {
if x != nil {
return x.Content
}
return nil
}
func (x *PostData) GetData() string {
if x != nil {
return x.Data
}
return ""
}
type PostContent struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Category PostContent_Category `protobuf:"varint,1,opt,name=category,proto3,enum=org.post.PostContent_Category" json:"category,omitempty"`
Head string `protobuf:"bytes,2,opt,name=head,proto3" json:"head,omitempty"`
Body string `protobuf:"bytes,3,opt,name=body,proto3" json:"body,omitempty"`
Counts map[int32]int32 `protobuf:"bytes,4,rep,name=counts,proto3" json:"counts,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"`
}
func (x *PostContent) Reset() {
*x = PostContent{}
if protoimpl.UnsafeEnabled {
mi := &file_post_post_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *PostContent) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*PostContent) ProtoMessage() {}
func (x *PostContent) ProtoReflect() protoreflect.Message {
mi := &file_post_post_proto_msgTypes[4]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use PostContent.ProtoReflect.Descriptor instead.
func (*PostContent) Descriptor() ([]byte, []int) {
return file_post_post_proto_rawDescGZIP(), []int{4}
}
func (x *PostContent) GetCategory() PostContent_Category {
if x != nil {
return x.Category
}
return PostContent_CATEGORY_A
}
func (x *PostContent) GetHead() string {
if x != nil {
return x.Head
}
return ""
}
func (x *PostContent) GetBody() string {
if x != nil {
return x.Body
}
return ""
}
func (x *PostContent) GetCounts() map[int32]int32 {
if x != nil {
return x.Counts
}
return nil
}
type PostConditionA struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Prop string `protobuf:"bytes,1,opt,name=prop,proto3" json:"prop,omitempty"`
}
func (x *PostConditionA) Reset() {
*x = PostConditionA{}
if protoimpl.UnsafeEnabled {
mi := &file_post_post_proto_msgTypes[5]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *PostConditionA) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*PostConditionA) ProtoMessage() {}
func (x *PostConditionA) ProtoReflect() protoreflect.Message {
mi := &file_post_post_proto_msgTypes[5]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use PostConditionA.ProtoReflect.Descriptor instead.
func (*PostConditionA) Descriptor() ([]byte, []int) {
return file_post_post_proto_rawDescGZIP(), []int{5}
}
func (x *PostConditionA) GetProp() string {
if x != nil {
return x.Prop
}
return ""
}
type PostConditionB struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
}
func (x *PostConditionB) Reset() {
*x = PostConditionB{}
if protoimpl.UnsafeEnabled {
mi := &file_post_post_proto_msgTypes[6]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *PostConditionB) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*PostConditionB) ProtoMessage() {}
func (x *PostConditionB) ProtoReflect() protoreflect.Message {
mi := &file_post_post_proto_msgTypes[6]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use PostConditionB.ProtoReflect.Descriptor instead.
func (*PostConditionB) Descriptor() ([]byte, []int) {
return file_post_post_proto_rawDescGZIP(), []int{6}
}
type M struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
X string `protobuf:"bytes,1,opt,name=x,proto3" json:"x,omitempty"`
}
func (x *M) Reset() {
*x = M{}
if protoimpl.UnsafeEnabled {
mi := &file_post_post_proto_msgTypes[7]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *M) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*M) ProtoMessage() {}
func (x *M) ProtoReflect() protoreflect.Message {
mi := &file_post_post_proto_msgTypes[7]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use M.ProtoReflect.Descriptor instead.
func (*M) Descriptor() ([]byte, []int) {
return file_post_post_proto_rawDescGZIP(), []int{7}
}
func (x *M) GetX() string {
if x != nil {
return x.X
}
return ""
}
var File_post_post_proto protoreflect.FileDescriptor
var file_post_post_proto_rawDesc = []byte{
0x0a, 0x0f, 0x70, 0x6f, 0x73, 0x74, 0x2f, 0x70, 0x6f, 0x73, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x12, 0x08, 0x6f, 0x72, 0x67, 0x2e, 0x70, 0x6f, 0x73, 0x74, 0x22, 0x81, 0x01, 0x0a, 0x0e,
0x47, 0x65, 0x74, 0x50, 0x6f, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e,
0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x28,
0x0a, 0x01, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x6f, 0x72, 0x67, 0x2e,
0x70, 0x6f, 0x73, 0x74, 0x2e, 0x50, 0x6f, 0x73, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69,
0x6f, 0x6e, 0x41, 0x48, 0x00, 0x52, 0x01, 0x61, 0x12, 0x28, 0x0a, 0x01, 0x62, 0x18, 0x03, 0x20,
0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x6f, 0x72, 0x67, 0x2e, 0x70, 0x6f, 0x73, 0x74, 0x2e, 0x50,
0x6f, 0x73, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x48, 0x00, 0x52,
0x01, 0x62, 0x42, 0x0b, 0x0a, 0x09, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x22,
0x35, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x50, 0x6f, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
0x73, 0x65, 0x12, 0x22, 0x0a, 0x04, 0x70, 0x6f, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b,
0x32, 0x0e, 0x2e, 0x6f, 0x72, 0x67, 0x2e, 0x70, 0x6f, 0x73, 0x74, 0x2e, 0x50, 0x6f, 0x73, 0x74,
0x52, 0x04, 0x70, 0x6f, 0x73, 0x74, 0x22, 0x3e, 0x0a, 0x04, 0x50, 0x6f, 0x73, 0x74, 0x12, 0x0e,
0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x26,
0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x6f,
0x72, 0x67, 0x2e, 0x70, 0x6f, 0x73, 0x74, 0x2e, 0x50, 0x6f, 0x73, 0x74, 0x44, 0x61, 0x74, 0x61,
0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x91, 0x01, 0x0a, 0x08, 0x50, 0x6f, 0x73, 0x74, 0x44,
0x61, 0x74, 0x61, 0x12, 0x2a, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28,
0x0e, 0x32, 0x16, 0x2e, 0x6f, 0x72, 0x67, 0x2e, 0x70, 0x6f, 0x73, 0x74, 0x2e, 0x50, 0x6f, 0x73,
0x74, 0x44, 0x61, 0x74, 0x61, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12,
0x14, 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05,
0x74, 0x69, 0x74, 0x6c, 0x65, 0x12, 0x2f, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74,
0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x6f, 0x72, 0x67, 0x2e, 0x70, 0x6f, 0x73,
0x74, 0x2e, 0x50, 0x6f, 0x73, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x52, 0x07, 0x63,
0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x04,
0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x93, 0x02, 0x0a, 0x0b, 0x50,
0x6f, 0x73, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, 0x3a, 0x0a, 0x08, 0x63, 0x61,
0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1e, 0x2e, 0x6f,
0x72, 0x67, 0x2e, 0x70, 0x6f, 0x73, 0x74, 0x2e, 0x50, 0x6f, 0x73, 0x74, 0x43, 0x6f, 0x6e, 0x74,
0x65, 0x6e, 0x74, 0x2e, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x52, 0x08, 0x63, 0x61,
0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x65, 0x61, 0x64, 0x18, 0x02,
0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x68, 0x65, 0x61, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x62, 0x6f,
0x64, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x12, 0x39,
0x0a, 0x06, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21,
0x2e, 0x6f, 0x72, 0x67, 0x2e, 0x70, 0x6f, 0x73, 0x74, 0x2e, 0x50, 0x6f, 0x73, 0x74, 0x43, 0x6f,
0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72,
0x79, 0x52, 0x06, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x1a, 0x39, 0x0a, 0x0b, 0x43, 0x6f, 0x75,
0x6e, 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18,
0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61,
0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65,
0x3a, 0x02, 0x38, 0x01, 0x22, 0x2a, 0x0a, 0x08, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79,
0x12, 0x0e, 0x0a, 0x0a, 0x43, 0x41, 0x54, 0x45, 0x47, 0x4f, 0x52, 0x59, 0x5f, 0x41, 0x10, 0x00,
0x12, 0x0e, 0x0a, 0x0a, 0x43, 0x41, 0x54, 0x45, 0x47, 0x4f, 0x52, 0x59, 0x5f, 0x42, 0x10, 0x01,
0x22, 0x24, 0x0a, 0x0e, 0x50, 0x6f, 0x73, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f,
0x6e, 0x41, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x72, 0x6f, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
0x52, 0x04, 0x70, 0x72, 0x6f, 0x70, 0x22, 0x10, 0x0a, 0x0e, 0x50, 0x6f, 0x73, 0x74, 0x43, 0x6f,
0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x22, 0x11, 0x0a, 0x01, 0x4d, 0x12, 0x0c, 0x0a,
0x01, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x01, 0x78, 0x2a, 0x52, 0x0a, 0x0c, 0x50,
0x6f, 0x73, 0x74, 0x44, 0x61, 0x74, 0x61, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0f, 0x0a, 0x0b, 0x50,
0x4f, 0x53, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x41, 0x10, 0x00, 0x12, 0x0f, 0x0a, 0x0b,
0x50, 0x4f, 0x53, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x42, 0x10, 0x01, 0x12, 0x0f, 0x0a,
0x0b, 0x50, 0x4f, 0x53, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x43, 0x10, 0x02, 0x12, 0x0f,
0x0a, 0x0b, 0x50, 0x4f, 0x53, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x44, 0x10, 0x03, 0x32,
0x4f, 0x0a, 0x0b, 0x50, 0x6f, 0x73, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x40,
0x0a, 0x07, 0x47, 0x65, 0x74, 0x50, 0x6f, 0x73, 0x74, 0x12, 0x18, 0x2e, 0x6f, 0x72, 0x67, 0x2e,
0x70, 0x6f, 0x73, 0x74, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x6f, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75,
0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x6f, 0x72, 0x67, 0x2e, 0x70, 0x6f, 0x73, 0x74, 0x2e, 0x47,
0x65, 0x74, 0x50, 0x6f, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00,
0x42, 0x6d, 0x0a, 0x0c, 0x63, 0x6f, 0x6d, 0x2e, 0x6f, 0x72, 0x67, 0x2e, 0x70, 0x6f, 0x73, 0x74,
0x42, 0x09, 0x50, 0x6f, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x11, 0x65,
0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2f, 0x70, 0x6f, 0x73, 0x74, 0x3b, 0x70, 0x6f, 0x73, 0x74,
0xa2, 0x02, 0x03, 0x4f, 0x50, 0x58, 0xaa, 0x02, 0x08, 0x4f, 0x72, 0x67, 0x2e, 0x50, 0x6f, 0x73,
0x74, 0xca, 0x02, 0x08, 0x4f, 0x72, 0x67, 0x5c, 0x50, 0x6f, 0x73, 0x74, 0xe2, 0x02, 0x14, 0x4f,
0x72, 0x67, 0x5c, 0x50, 0x6f, 0x73, 0x74, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64,
0x61, 0x74, 0x61, 0xea, 0x02, 0x09, 0x4f, 0x72, 0x67, 0x3a, 0x3a, 0x50, 0x6f, 0x73, 0x74, 0x62,
0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_post_post_proto_rawDescOnce sync.Once
file_post_post_proto_rawDescData = file_post_post_proto_rawDesc
)
func file_post_post_proto_rawDescGZIP() []byte {
file_post_post_proto_rawDescOnce.Do(func() {
file_post_post_proto_rawDescData = protoimpl.X.CompressGZIP(file_post_post_proto_rawDescData)
})
return file_post_post_proto_rawDescData
}
var file_post_post_proto_enumTypes = make([]protoimpl.EnumInfo, 2)
var file_post_post_proto_msgTypes = make([]protoimpl.MessageInfo, 9)
var file_post_post_proto_goTypes = []interface{}{
(PostDataType)(0), // 0: org.post.PostDataType
(PostContent_Category)(0), // 1: org.post.PostContent.Category
(*GetPostRequest)(nil), // 2: org.post.GetPostRequest
(*GetPostResponse)(nil), // 3: org.post.GetPostResponse
(*Post)(nil), // 4: org.post.Post
(*PostData)(nil), // 5: org.post.PostData
(*PostContent)(nil), // 6: org.post.PostContent
(*PostConditionA)(nil), // 7: org.post.PostConditionA
(*PostConditionB)(nil), // 8: org.post.PostConditionB
(*M)(nil), // 9: org.post.M
nil, // 10: org.post.PostContent.CountsEntry
}
var file_post_post_proto_depIdxs = []int32{
7, // 0: org.post.GetPostRequest.a:type_name -> org.post.PostConditionA
8, // 1: org.post.GetPostRequest.b:type_name -> org.post.PostConditionB
4, // 2: org.post.GetPostResponse.post:type_name -> org.post.Post
5, // 3: org.post.Post.data:type_name -> org.post.PostData
0, // 4: org.post.PostData.type:type_name -> org.post.PostDataType
6, // 5: org.post.PostData.content:type_name -> org.post.PostContent
1, // 6: org.post.PostContent.category:type_name -> org.post.PostContent.Category
10, // 7: org.post.PostContent.counts:type_name -> org.post.PostContent.CountsEntry
2, // 8: org.post.PostService.GetPost:input_type -> org.post.GetPostRequest
3, // 9: org.post.PostService.GetPost:output_type -> org.post.GetPostResponse
9, // [9:10] is the sub-list for method output_type
8, // [8:9] is the sub-list for method input_type
8, // [8:8] is the sub-list for extension type_name
8, // [8:8] is the sub-list for extension extendee
0, // [0:8] is the sub-list for field type_name
}
func init() { file_post_post_proto_init() }
func file_post_post_proto_init() {
if File_post_post_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_post_post_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetPostRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_post_post_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetPostResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_post_post_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Post); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_post_post_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*PostData); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_post_post_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*PostContent); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_post_post_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*PostConditionA); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_post_post_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*PostConditionB); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_post_post_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*M); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
file_post_post_proto_msgTypes[0].OneofWrappers = []interface{}{
(*GetPostRequest_A)(nil),
(*GetPostRequest_B)(nil),
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_post_post_proto_rawDesc,
NumEnums: 2,
NumMessages: 9,
NumExtensions: 0,
NumServices: 1,
},
GoTypes: file_post_post_proto_goTypes,
DependencyIndexes: file_post_post_proto_depIdxs,
EnumInfos: file_post_post_proto_enumTypes,
MessageInfos: file_post_post_proto_msgTypes,
}.Build()
File_post_post_proto = out.File
file_post_post_proto_rawDesc = nil
file_post_post_proto_goTypes = nil
file_post_post_proto_depIdxs = nil
}
================================================
FILE: _examples/06_alias/post/post_grpc.pb.go
================================================
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.3.0
// - protoc (unknown)
// source: post/post.proto
package post
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 (
PostService_GetPost_FullMethodName = "/org.post.PostService/GetPost"
)
// PostServiceClient is the client API for PostService 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 PostServiceClient interface {
GetPost(ctx context.Context, in *GetPostRequest, opts ...grpc.CallOption) (*GetPostResponse, error)
}
type postServiceClient struct {
cc grpc.ClientConnInterface
}
func NewPostServiceClient(cc grpc.ClientConnInterface) PostServiceClient {
return &postServiceClient{cc}
}
func (c *postServiceClient) GetPost(ctx context.Context, in *GetPostRequest, opts ...grpc.CallOption) (*GetPostResponse, error) {
out := new(GetPostResponse)
err := c.cc.Invoke(ctx, PostService_GetPost_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// PostServiceServer is the server API for PostService service.
// All implementations must embed UnimplementedPostServiceServer
// for forward compatibility
type PostServiceServer interface {
GetPost(context.Context, *GetPostRequest) (*GetPostResponse, error)
mustEmbedUnimplementedPostServiceServer()
}
// UnimplementedPostServiceServer must be embedded to have forward compatible implementations.
type UnimplementedPostServiceServer struct {
}
func (UnimplementedPostServiceServer) GetPost(context.Context, *GetPostRequest) (*GetPostResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetPost not implemented")
}
func (UnimplementedPostServiceServer) mustEmbedUnimplementedPostServiceServer() {}
// UnsafePostServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to PostServiceServer will
// result in compilation errors.
type UnsafePostServiceServer interface {
mustEmbedUnimplementedPostServiceServer()
}
func RegisterPostServiceServer(s grpc.ServiceRegistrar, srv PostServiceServer) {
s.RegisterService(&PostService_ServiceDesc, srv)
}
func _PostService_GetPost_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetPostRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(PostServiceServer).GetPost(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: PostService_GetPost_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(PostServiceServer).GetPost(ctx, req.(*GetPostRequest))
}
return interceptor(ctx, in, info, handler)
}
// PostService_ServiceDesc is the grpc.ServiceDesc for PostService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var PostService_ServiceDesc = grpc.ServiceDesc{
ServiceName: "org.post.PostService",
HandlerType: (*PostServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "GetPost",
Handler: _PostService_GetPost_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "post/post.proto",
}
================================================
FILE: _examples/06_alias/post/v2/extra.pb.go
================================================
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.33.0
// protoc (unknown)
// source: post/v2/extra.proto
package post
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
// A second proto file in the v2 package, exercising the case where
// multiple proto files share the same go_package.
type ExtraType int32
const (
ExtraType_EXTRA_TYPE_UNKNOWN ExtraType = 0
ExtraType_EXTRA_TYPE_A ExtraType = 1
ExtraType_EXTRA_TYPE_B ExtraType = 2
)
// Enum value maps for ExtraType.
var (
ExtraType_name = map[int32]string{
0: "EXTRA_TYPE_UNKNOWN",
1: "EXTRA_TYPE_A",
2: "EXTRA_TYPE_B",
}
ExtraType_value = map[string]int32{
"EXTRA_TYPE_UNKNOWN": 0,
"EXTRA_TYPE_A": 1,
"EXTRA_TYPE_B": 2,
}
)
func (x ExtraType) Enum() *ExtraType {
p := new(ExtraType)
*p = x
return p
}
func (x ExtraType) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (ExtraType) Descriptor() protoreflect.EnumDescriptor {
return file_post_v2_extra_proto_enumTypes[0].Descriptor()
}
func (ExtraType) Type() protoreflect.EnumType {
return &file_post_v2_extra_proto_enumTypes[0]
}
func (x ExtraType) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use ExtraType.Descriptor instead.
func (ExtraType) EnumDescriptor() ([]byte, []int) {
return file_post_v2_extra_proto_rawDescGZIP(), []int{0}
}
var File_post_v2_extra_proto protoreflect.FileDescriptor
var file_post_v2_extra_proto_rawDesc = []byte{
0x0a, 0x13, 0x70, 0x6f, 0x73, 0x74, 0x2f, 0x76, 0x32, 0x2f, 0x65, 0x78, 0x74, 0x72, 0x61, 0x2e,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0b, 0x6f, 0x72, 0x67, 0x2e, 0x70, 0x6f, 0x73, 0x74, 0x2e,
0x76, 0x32, 0x2a, 0x47, 0x0a, 0x09, 0x45, 0x78, 0x74, 0x72, 0x61, 0x54, 0x79, 0x70, 0x65, 0x12,
0x16, 0x0a, 0x12, 0x45, 0x58, 0x54, 0x52, 0x41, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e,
0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x10, 0x0a, 0x0c, 0x45, 0x58, 0x54, 0x52, 0x41,
0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x41, 0x10, 0x01, 0x12, 0x10, 0x0a, 0x0c, 0x45, 0x58, 0x54,
0x52, 0x41, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x42, 0x10, 0x02, 0x42, 0x81, 0x01, 0x0a, 0x0f,
0x63, 0x6f, 0x6d, 0x2e, 0x6f, 0x72, 0x67, 0x2e, 0x70, 0x6f, 0x73, 0x74, 0x2e, 0x76, 0x32, 0x42,
0x0a, 0x45, 0x78, 0x74, 0x72, 0x61, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x14, 0x65,
0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2f, 0x70, 0x6f, 0x73, 0x74, 0x2f, 0x76, 0x32, 0x3b, 0x70,
0x6f, 0x73, 0x74, 0xa2, 0x02, 0x03, 0x4f, 0x50, 0x58, 0xaa, 0x02, 0x0b, 0x4f, 0x72, 0x67, 0x2e,
0x50, 0x6f, 0x73, 0x74, 0x2e, 0x56, 0x32, 0xca, 0x02, 0x0b, 0x4f, 0x72, 0x67, 0x5c, 0x50, 0x6f,
0x73, 0x74, 0x5c, 0x56, 0x32, 0xe2, 0x02, 0x17, 0x4f, 0x72, 0x67, 0x5c, 0x50, 0x6f, 0x73, 0x74,
0x5c, 0x56, 0x32, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea,
0x02, 0x0d, 0x4f, 0x72, 0x67, 0x3a, 0x3a, 0x50, 0x6f, 0x73, 0x74, 0x3a, 0x3a, 0x56, 0x32, 0x62,
0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_post_v2_extra_proto_rawDescOnce sync.Once
file_post_v2_extra_proto_rawDescData = file_post_v2_extra_proto_rawDesc
)
func file_post_v2_extra_proto_rawDescGZIP() []byte {
file_post_v2_extra_proto_rawDescOnce.Do(func() {
file_post_v2_extra_proto_rawDescData = protoimpl.X.CompressGZIP(file_post_v2_extra_proto_rawDescData)
})
return file_post_v2_extra_proto_rawDescData
}
var file_post_v2_extra_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
var file_post_v2_extra_proto_goTypes = []interface{}{
(ExtraType)(0), // 0: org.post.v2.ExtraType
}
var file_post_v2_extra_proto_depIdxs = []int32{
0, // [0:0] is the sub-list for method output_type
0, // [0:0] is the sub-list for method input_type
0, // [0:0] is the sub-list for extension type_name
0, // [0:0] is the sub-list for extension extendee
0, // [0:0] is the sub-list for field type_name
}
func init() { file_post_v2_extra_proto_init() }
func file_post_v2_extra_proto_init() {
if File_post_v2_extra_proto != nil {
return
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_post_v2_extra_proto_rawDesc,
NumEnums: 1,
NumMessages: 0,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_post_v2_extra_proto_goTypes,
DependencyIndexes: file_post_v2_extra_proto_depIdxs,
EnumInfos: file_post_v2_extra_proto_enumTypes,
}.Build()
File_post_v2_extra_proto = out.File
file_post_v2_extra_proto_rawDesc = nil
file_post_v2_extra_proto_goTypes = nil
file_post_v2_extra_proto_depIdxs = nil
}
================================================
FILE: _examples/06_alias/post/v2/post.pb.go
================================================
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.33.0
// protoc (unknown)
// source: post/v2/post.proto
package post
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
type PostDataType int32
const (
PostDataType_POST_TYPE_A PostDataType = 0
PostDataType_POST_V2_TYPE_B PostDataType = 1
PostDataType_POST_V2_TYPE_C PostDataType = 2
PostDataType_POST_V2_TYPE_D PostDataType = 3
)
// Enum value maps for PostDataType.
var (
PostDataType_name = map[int32]string{
0: "POST_TYPE_A",
1: "POST_V2_TYPE_B",
2: "POST_V2_TYPE_C",
3: "POST_V2_TYPE_D",
}
PostDataType_value = map[string]int32{
"POST_TYPE_A": 0,
"POST_V2_TYPE_B": 1,
"POST_V2_TYPE_C": 2,
"POST_V2_TYPE_D": 3,
}
)
func (x PostDataType) Enum() *PostDataType {
p := new(PostDataType)
*p = x
return p
}
func (x PostDataType) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (PostDataType) Descriptor() protoreflect.EnumDescriptor {
return file_post_v2_post_proto_enumTypes[0].Descriptor()
}
func (PostDataType) Type() protoreflect.EnumType {
return &file_post_v2_post_proto_enumTypes[0]
}
func (x PostDataType) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use PostDataType.Descriptor instead.
func (PostDataType) EnumDescriptor() ([]byte, []int) {
return file_post_v2_post_proto_rawDescGZIP(), []int{0}
}
type PostContent_Category int32
const (
PostContent_CATEGORY_A PostContent_Category = 0
PostContent_CATEGORY_B PostContent_Category = 1
)
// Enum value maps for PostContent_Category.
var (
PostContent_Category_name = map[int32]string{
0: "CATEGORY_A",
1: "CATEGORY_B",
}
PostContent_Category_value = map[string]int32{
"CATEGORY_A": 0,
"CATEGORY_B": 1,
}
)
func (x PostContent_Category) Enum() *PostContent_Category {
p := new(PostContent_Category)
*p = x
return p
}
func (x PostContent_Category) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (PostContent_Category) Descriptor() protoreflect.EnumDescriptor {
return file_post_v2_post_proto_enumTypes[1].Descriptor()
}
func (PostContent_Category) Type() protoreflect.EnumType {
return &file_post_v2_post_proto_enumTypes[1]
}
func (x PostContent_Category) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use PostContent_Category.Descriptor instead.
func (PostContent_Category) EnumDescriptor() ([]byte, []int) {
return file_post_v2_post_proto_rawDescGZIP(), []int{4, 0}
}
type GetPostRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
}
func (x *GetPostRequest) Reset() {
*x = GetPostRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_post_v2_post_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GetPostRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetPostRequest) ProtoMessage() {}
func (x *GetPostRequest) ProtoReflect() protoreflect.Message {
mi := &file_post_v2_post_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GetPostRequest.ProtoReflect.Descriptor instead.
func (*GetPostRequest) Descriptor() ([]byte, []int) {
return file_post_v2_post_proto_rawDescGZIP(), []int{0}
}
func (x *GetPostRequest) GetId() string {
if x != nil {
return x.Id
}
return ""
}
type GetPostResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Post *Post `protobuf:"bytes,1,opt,name=post,proto3" json:"post,omitempty"`
}
func (x *GetPostResponse) Reset() {
*x = GetPostResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_post_v2_post_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GetPostResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetPostResponse) ProtoMessage() {}
func (x *GetPostResponse) ProtoReflect() protoreflect.Message {
mi := &file_post_v2_post_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GetPostResponse.ProtoReflect.Descriptor instead.
func (*GetPostResponse) Descriptor() ([]byte, []int) {
return file_post_v2_post_proto_rawDescGZIP(), []int{1}
}
func (x *GetPostResponse) GetPost() *Post {
if x != nil {
return x.Post
}
return nil
}
type Post struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
Data *PostData `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"`
}
func (x *Post) Reset() {
*x = Post{}
if protoimpl.UnsafeEnabled {
mi := &file_post_v2_post_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Post) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Post) ProtoMessage() {}
func (x *Post) ProtoReflect() protoreflect.Message {
mi := &file_post_v2_post_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Post.ProtoReflect.Descriptor instead.
func (*Post) Descriptor() ([]byte, []int) {
return file_post_v2_post_proto_rawDescGZIP(), []int{2}
}
func (x *Post) GetId() string {
if x != nil {
return x.Id
}
return ""
}
func (x *Post) GetData() *PostData {
if x != nil {
return x.Data
}
return nil
}
type PostData struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Type PostDataType `protobuf:"varint,1,opt,name=type,proto3,enum=org.post.v2.PostDataType" json:"type,omitempty"`
Title string `protobuf:"bytes,2,opt,name=title,proto3" json:"title,omitempty"`
Content *PostContent `protobuf:"bytes,3,opt,name=content,proto3" json:"content,omitempty"`
V2Data string `protobuf:"bytes,4,opt,name=v2_data,json=v2Data,proto3" json:"v2_data,omitempty"`
}
func (x *PostData) Reset() {
*x = PostData{}
if protoimpl.UnsafeEnabled {
mi := &file_post_v2_post_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *PostData) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*PostData) ProtoMessage() {}
func (x *PostData) ProtoReflect() protoreflect.Message {
mi := &file_post_v2_post_proto_msgTypes[3]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use PostData.ProtoReflect.Descriptor instead.
func (*PostData) Descriptor() ([]byte, []int) {
return file_post_v2_post_proto_rawDescGZIP(), []int{3}
}
func (x *PostData) GetType() PostDataType {
if x != nil {
return x.Type
}
return PostDataType_POST_TYPE_A
}
func (x *PostData) GetTitle() string {
if x != nil {
return x.Title
}
return ""
}
func (x *PostData) GetContent() *PostContent {
if x != nil {
return x.Content
}
return nil
}
func (x *PostData) GetV2Data() string {
if x != nil {
return x.V2Data
}
return ""
}
type PostContent struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Category PostContent_Category `protobuf:"varint,1,opt,name=category,proto3,enum=org.post.v2.PostContent_Category" json:"category,omitempty"`
Head string `protobuf:"bytes,2,opt,name=head,proto3" json:"head,omitempty"`
Body string `protobuf:"bytes,3,opt,name=body,proto3" json:"body,omitempty"`
Counts map[int32]int32 `protobuf:"bytes,4,rep,name=counts,proto3" json:"counts,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"`
}
func (x *PostContent) Reset() {
*x = PostContent{}
if protoimpl.UnsafeEnabled {
mi := &file_post_v2_post_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *PostContent) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*PostContent) ProtoMessage() {}
func (x *PostContent) ProtoReflect() protoreflect.Message {
mi := &file_post_v2_post_proto_msgTypes[4]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use PostContent.ProtoReflect.Descriptor instead.
func (*PostContent) Descriptor() ([]byte, []int) {
return file_post_v2_post_proto_rawDescGZIP(), []int{4}
}
func (x *PostContent) GetCategory() PostContent_Category {
if x != nil {
return x.Category
}
return PostContent_CATEGORY_A
}
func (x *PostContent) GetHead() string {
if x != nil {
return x.Head
}
return ""
}
func (x *PostContent) GetBody() string {
if x != nil {
return x.Body
}
return ""
}
func (x *PostContent) GetCounts() map[int32]int32 {
if x != nil {
return x.Counts
}
return nil
}
var File_post_v2_post_proto protoreflect.FileDescriptor
var file_post_v2_post_proto_rawDesc = []byte{
0x0a, 0x12, 0x70, 0x6f, 0x73, 0x74, 0x2f, 0x76, 0x32, 0x2f, 0x70, 0x6f, 0x73, 0x74, 0x2e, 0x70,
0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0b, 0x6f, 0x72, 0x67, 0x2e, 0x70, 0x6f, 0x73, 0x74, 0x2e, 0x76,
0x32, 0x22, 0x20, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x50, 0x6f, 0x73, 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, 0x38, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x50, 0x6f, 0x73, 0x74, 0x52, 0x65,
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x25, 0x0a, 0x04, 0x70, 0x6f, 0x73, 0x74, 0x18, 0x01,
0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x6f, 0x72, 0x67, 0x2e, 0x70, 0x6f, 0x73, 0x74, 0x2e,
0x76, 0x32, 0x2e, 0x50, 0x6f, 0x73, 0x74, 0x52, 0x04, 0x70, 0x6f, 0x73, 0x74, 0x22, 0x41, 0x0a,
0x04, 0x50, 0x6f, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28,
0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x29, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20,
0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x6f, 0x72, 0x67, 0x2e, 0x70, 0x6f, 0x73, 0x74, 0x2e, 0x76,
0x32, 0x2e, 0x50, 0x6f, 0x73, 0x74, 0x44, 0x61, 0x74, 0x61, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61,
0x22, 0x9c, 0x01, 0x0a, 0x08, 0x50, 0x6f, 0x73, 0x74, 0x44, 0x61, 0x74, 0x61, 0x12, 0x2d, 0x0a,
0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x19, 0x2e, 0x6f, 0x72,
0x67, 0x2e, 0x70, 0x6f, 0x73, 0x74, 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x6f, 0x73, 0x74, 0x44, 0x61,
0x74, 0x61, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x05,
0x74, 0x69, 0x74, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x69, 0x74,
0x6c, 0x65, 0x12, 0x32, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x03, 0x20,
0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x6f, 0x72, 0x67, 0x2e, 0x70, 0x6f, 0x73, 0x74, 0x2e, 0x76,
0x32, 0x2e, 0x50, 0x6f, 0x73, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x52, 0x07, 0x63,
0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, 0x17, 0x0a, 0x07, 0x76, 0x32, 0x5f, 0x64, 0x61, 0x74,
0x61, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x76, 0x32, 0x44, 0x61, 0x74, 0x61, 0x22,
0x99, 0x02, 0x0a, 0x0b, 0x50, 0x6f, 0x73, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12,
0x3d, 0x0a, 0x08, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28,
0x0e, 0x32, 0x21, 0x2e, 0x6f, 0x72, 0x67, 0x2e, 0x70, 0x6f, 0x73, 0x74, 0x2e, 0x76, 0x32, 0x2e,
0x50, 0x6f, 0x73, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2e, 0x43, 0x61, 0x74, 0x65,
0x67, 0x6f, 0x72, 0x79, 0x52, 0x08, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x12, 0x12,
0x0a, 0x04, 0x68, 0x65, 0x61, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x68, 0x65,
0x61, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09,
0x52, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x12, 0x3c, 0x0a, 0x06, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73,
0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x6f, 0x72, 0x67, 0x2e, 0x70, 0x6f, 0x73,
0x74, 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x6f, 0x73, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74,
0x2e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x06, 0x63, 0x6f,
0x75, 0x6e, 0x74, 0x73, 0x1a, 0x39, 0x0a, 0x0b, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x45, 0x6e,
0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05,
0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02,
0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22,
0x2a, 0x0a, 0x08, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x12, 0x0e, 0x0a, 0x0a, 0x43,
0x41, 0x54, 0x45, 0x47, 0x4f, 0x52, 0x59, 0x5f, 0x41, 0x10, 0x00, 0x12, 0x0e, 0x0a, 0x0a, 0x43,
0x41, 0x54, 0x45, 0x47, 0x4f, 0x52, 0x59, 0x5f, 0x42, 0x10, 0x01, 0x2a, 0x5b, 0x0a, 0x0c, 0x50,
0x6f, 0x73, 0x74, 0x44, 0x61, 0x74, 0x61, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0f, 0x0a, 0x0b, 0x50,
0x4f, 0x53, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x41, 0x10, 0x00, 0x12, 0x12, 0x0a, 0x0e,
0x50, 0x4f, 0x53, 0x54, 0x5f, 0x56, 0x32, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x42, 0x10, 0x01,
0x12, 0x12, 0x0a, 0x0e, 0x50, 0x4f, 0x53, 0x54, 0x5f, 0x56, 0x32, 0x5f, 0x54, 0x59, 0x50, 0x45,
0x5f, 0x43, 0x10, 0x02, 0x12, 0x12, 0x0a, 0x0e, 0x50, 0x4f, 0x53, 0x54, 0x5f, 0x56, 0x32, 0x5f,
0x54, 0x59, 0x50, 0x45, 0x5f, 0x44, 0x10, 0x03, 0x32, 0x55, 0x0a, 0x0b, 0x50, 0x6f, 0x73, 0x74,
0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x46, 0x0a, 0x07, 0x47, 0x65, 0x74, 0x50, 0x6f,
0x73, 0x74, 0x12, 0x1b, 0x2e, 0x6f, 0x72, 0x67, 0x2e, 0x70, 0x6f, 0x73, 0x74, 0x2e, 0x76, 0x32,
0x2e, 0x47, 0x65, 0x74, 0x50, 0x6f, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,
0x1c, 0x2e, 0x6f, 0x72, 0x67, 0x2e, 0x70, 0x6f, 0x73, 0x74, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x65,
0x74, 0x50, 0x6f, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42,
0x80, 0x01, 0x0a, 0x0f, 0x63, 0x6f, 0x6d, 0x2e, 0x6f, 0x72, 0x67, 0x2e, 0x70, 0x6f, 0x73, 0x74,
0x2e, 0x76, 0x32, 0x42, 0x09, 0x50, 0x6f, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01,
0x5a, 0x14, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2f, 0x70, 0x6f, 0x73, 0x74, 0x2f, 0x76,
0x32, 0x3b, 0x70, 0x6f, 0x73, 0x74, 0xa2, 0x02, 0x03, 0x4f, 0x50, 0x58, 0xaa, 0x02, 0x0b, 0x4f,
0x72, 0x67, 0x2e, 0x50, 0x6f, 0x73, 0x74, 0x2e, 0x56, 0x32, 0xca, 0x02, 0x0b, 0x4f, 0x72, 0x67,
0x5c, 0x50, 0x6f, 0x73, 0x74, 0x5c, 0x56, 0x32, 0xe2, 0x02, 0x17, 0x4f, 0x72, 0x67, 0x5c, 0x50,
0x6f, 0x73, 0x74, 0x5c, 0x56, 0x32, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61,
0x74, 0x61, 0xea, 0x02, 0x0d, 0x4f, 0x72, 0x67, 0x3a, 0x3a, 0x50, 0x6f, 0x73, 0x74, 0x3a, 0x3a,
0x56, 0x32, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_post_v2_post_proto_rawDescOnce sync.Once
file_post_v2_post_proto_rawDescData = file_post_v2_post_proto_rawDesc
)
func file_post_v2_post_proto_rawDescGZIP() []byte {
file_post_v2_post_proto_rawDescOnce.Do(func() {
file_post_v2_post_proto_rawDescData = protoimpl.X.CompressGZIP(file_post_v2_post_proto_rawDescData)
})
return file_post_v2_post_proto_rawDescData
}
var file_post_v2_post_proto_enumTypes = make([]protoimpl.EnumInfo, 2)
var file_post_v2_post_proto_msgTypes = make([]protoimpl.MessageInfo, 6)
var file_post_v2_post_proto_goTypes = []interface{}{
(PostDataType)(0), // 0: org.post.v2.PostDataType
(PostContent_Category)(0), // 1: org.post.v2.PostContent.Category
(*GetPostRequest)(nil), // 2: org.post.v2.GetPostRequest
(*GetPostResponse)(nil), // 3: org.post.v2.GetPostResponse
(*Post)(nil), // 4: org.post.v2.Post
(*PostData)(nil), // 5: org.post.v2.PostData
(*PostContent)(nil), // 6: org.post.v2.PostContent
nil, // 7: org.post.v2.PostContent.CountsEntry
}
var file_post_v2_post_proto_depIdxs = []int32{
4, // 0: org.post.v2.GetPostResponse.post:type_name -> org.post.v2.Post
5, // 1: org.post.v2.Post.data:type_name -> org.post.v2.PostData
0, // 2: org.post.v2.PostData.type:type_name -> org.post.v2.PostDataType
6, // 3: org.post.v2.PostData.content:type_name -> org.post.v2.PostContent
1, // 4: org.post.v2.PostContent.category:type_name -> org.post.v2.PostContent.Category
7, // 5: org.post.v2.PostContent.counts:type_name -> org.post.v2.PostContent.CountsEntry
2, // 6: org.post.v2.PostService.GetPost:input_type -> org.post.v2.GetPostRequest
3, // 7: org.post.v2.PostService.GetPost:output_type -> org.post.v2.GetPostResponse
7, // [7:8] is the sub-list for method output_type
6, // [6:7] is the sub-list for method input_type
6, // [6:6] is the sub-list for extension type_name
6, // [6:6] is the sub-list for extension extendee
0, // [0:6] is the sub-list for field type_name
}
func init() { file_post_v2_post_proto_init() }
func file_post_v2_post_proto_init() {
if File_post_v2_post_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_post_v2_post_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetPostRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_post_v2_post_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetPostResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_post_v2_post_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Post); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_post_v2_post_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*PostData); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_post_v2_post_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*PostContent); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_post_v2_post_proto_rawDesc,
NumEnums: 2,
NumMessages: 6,
NumExtensions: 0,
NumServices: 1,
},
GoTypes: file_post_v2_post_proto_goTypes,
DependencyIndexes: file_post_v2_post_proto_depIdxs,
EnumInfos: file_post_v2_post_proto_enumTypes,
MessageInfos: file_post_v2_post_proto_msgTypes,
}.Build()
File_post_v2_post_proto = out.File
file_post_v2_post_proto_rawDesc = nil
file_post_v2_post_proto_goTypes = nil
file_post_v2_post_proto_depIdxs = nil
}
================================================
FILE: _examples/06_alias/post/v2/post_grpc.pb.go
================================================
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.3.0
// - protoc (unknown)
// source: post/v2/post.proto
package post
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 (
PostService_GetPost_FullMethodName = "/org.post.v2.PostService/GetPost"
)
// PostServiceClient is the client API for PostService 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 PostServiceClient interface {
GetPost(ctx context.Context, in *GetPostRequest, opts ...grpc.CallOption) (*GetPostResponse, error)
}
type postServiceClient struct {
cc grpc.ClientConnInterface
}
func NewPostServiceClient(cc grpc.ClientConnInterface) PostServiceClient {
return &postServiceClient{cc}
}
func (c *postServiceClient) GetPost(ctx context.Context, in *GetPostRequest, opts ...grpc.CallOption) (*GetPostResponse, error) {
out := new(GetPostResponse)
err := c.cc.Invoke(ctx, PostService_GetPost_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// PostServiceServer is the server API for PostService service.
// All implementations must embed UnimplementedPostServiceServer
// for forward compatibility
type PostServiceServer interface {
GetPost(context.Context, *GetPostRequest) (*GetPostResponse, error)
mustEmbedUnimplementedPostServiceServer()
}
// UnimplementedPostServiceServer must be embedded to have forward compatible implementations.
type UnimplementedPostServiceServer struct {
}
func (UnimplementedPostServiceServer) GetPost(context.Context, *GetPostRequest) (*GetPostResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetPost not implemented")
}
func (UnimplementedPostServiceServer) mustEmbedUnimplementedPostServiceServer() {}
// UnsafePostServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to PostServiceServer will
// result in compilation errors.
type UnsafePostServiceServer interface {
mustEmbedUnimplementedPostServiceServer()
}
func RegisterPostServiceServer(s grpc.ServiceRegistrar, srv PostServiceServer) {
s.RegisterService(&PostService_ServiceDesc, srv)
}
func _PostService_GetPost_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetPostRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(PostServiceServer).GetPost(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: PostService_GetPost_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(PostServiceServer).GetPost(ctx, req.(*GetPostRequest))
}
return interceptor(ctx, in, info, handler)
}
// PostService_ServiceDesc is the grpc.ServiceDesc for PostService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var PostService_ServiceDesc = grpc.ServiceDesc{
ServiceName: "org.post.v2.PostService",
HandlerType: (*PostServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "GetPost",
Handler: _PostService_GetPost_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "post/v2/post.proto",
}
================================================
FILE: _examples/06_alias/proto/buf.yaml
================================================
version: v1
breaking:
use:
- FILE
lint:
use:
- DEFAULT
================================================
FILE: _examples/06_alias/proto/federation/federation.proto
================================================
syntax = "proto3";
package org.federation;
import "grpc/federation/federation.proto";
import "post/post.proto";
option go_package = "example/federation;federation";
option (grpc.federation.file)= {
import: ["post/v2/post.proto", "post/v2/extra.proto"]
};
service FederationService {
option (grpc.federation.service) = {};
rpc GetPost(GetPostRequest) returns (GetPostResponse) {};
}
message GetPostRequest {
string id = 1;
message ConditionA {
option (grpc.federation.message).alias = "org.post.PostConditionA";
string prop = 1;
}
message ConditionB {
option (grpc.federation.message).alias = "org.post.PostConditionB";
}
oneof condition {
ConditionA a = 2;
ConditionB condition_b = 3;
}
}
message GetPostResponse {
option (grpc.federation.message) = {
def [
{
name: "post"
message {
name: "Post"
args [
{ name: "id", by: "$.id" },
{ name: "a", by: "$.a" },
{ name: "b", by: "$.condition_b" }
]
}
}
]
};
Post post = 1 [(grpc.federation.field).by = "post"];
}
message Post {
option (grpc.federation.message) = {
def {
name: "res"
call {
method: "org.post.PostService/GetPost"
request [
{ field: "id", by: "$.id" },
{ field: "a", by: "$.a", if : "$.a != null" },
{ field: "b", by: "$.b", if : "$.b != null" }
]
}
}
def { name: "post", by: "res.post", autobind: true }
def {
name: "res2"
call {
method: "org.post.v2.PostService/GetPost"
request { field: "id", by: "$.id" }
}
}
def { name: "data2", by: "res2.post.data" }
def { name: "data_type" by: "grpc.federation.enum.select(true, org.post.PostDataType.from(org.post.PostDataType.POST_TYPE_B), org.post.v2.PostDataType.value('POST_V2_TYPE_B'))" }
def { name: "data_type2" by: "grpc.federation.enum.select(true, data_type, org.post.v2.PostDataType.value('POST_V2_TYPE_C'))" }
def { name: "type_fed" enum { name: "PostType" by: "data_type2" }}
def { name: "type_fed2" enum { name: "PostType" by: "org.post.PostDataType.value('POST_TYPE_A')" } }
};
string id = 1;
PostData data = 2;
PostData data2 = 3 [(grpc.federation.field).by = "data2"];
PostType type = 4 [(grpc.federation.field).by = "data_type2"];
PostType type2 = 5 [(grpc.federation.field).by = "type_fed"];
PostType type3 = 6 [(grpc.federation.field).by = "org.post.v2.PostDataType.value('POST_V2_TYPE_C')"];
PostType type4 = 7 [(grpc.federation.field).by = "type_fed2"];
org.post.M m = 8 [(grpc.federation.field).by = "M{x: 'xxx'}"];
}
enum PostType {
option (grpc.federation.enum) = {
alias: [ "org.post.PostDataType", "org.post.v2.PostDataType" ]
};
POST_TYPE_UNKNOWN = 0 [(grpc.federation.enum_value).default = true];
POST_TYPE_FOO = 1 [(grpc.federation.enum_value) = { alias: ["POST_TYPE_A"] }];
POST_TYPE_BAR = 2 [(grpc.federation.enum_value) = {
alias: [
"org.post.PostDataType.POST_TYPE_B",
"org.post.PostDataType.POST_TYPE_C",
"org.post.v2.PostDataType.POST_V2_TYPE_B",
"org.post.v2.PostDataType.POST_V2_TYPE_C"
]
}];
POST_TYPE_BAZ = 3 [(grpc.federation.enum_value).noalias = true];
}
message PostData {
option (grpc.federation.message) = {
alias: [ "org.post.PostData", "org.post.v2.PostData" ]
};
PostType type = 1;
string title = 2;
PostContent content = 3;
}
message PostContent {
option (grpc.federation.message) = {
alias: [ "org.post.PostContent", "org.post.v2.PostContent" ]
};
enum Category {
option (grpc.federation.enum) = {
alias: [ "org.post.PostContent.Category", "org.post.v2.PostContent.Category" ]
};
CATEGORY_A = 0;
CATEGORY_B = 1;
CATEGORY_C = 2 [(grpc.federation.enum_value).noalias = true];
};
Category category = 1;
string head = 2;
string body = 3;
string dup_body = 4 [(grpc.federation.field).alias = "body"];
map counts = 5;
}
message M {
option (grpc.federation.message).alias = "org.post.M";
string x = 1;
}
================================================
FILE: _examples/06_alias/proto/post/post.proto
================================================
syntax = "proto3";
package org.post;
option go_package = "example/post;post";
service PostService {
rpc GetPost(GetPostRequest) returns (GetPostResponse) {};
}
message GetPostRequest {
string id = 1;
oneof condition {
PostConditionA a = 2;
PostConditionB b = 3;
}
}
message GetPostResponse {
Post post = 1;
}
message Post {
string id = 1;
PostData data = 2;
}
enum PostDataType {
POST_TYPE_A = 0;
POST_TYPE_B = 1;
POST_TYPE_C = 2;
POST_TYPE_D = 3;
}
message PostData {
PostDataType type = 1;
string title = 2;
PostContent content = 3;
string data = 4;
}
message PostContent {
enum Category {
CATEGORY_A = 0;
CATEGORY_B = 1;
}
Category category = 1;
string head = 2;
string body = 3;
map counts = 4;
}
message PostConditionA {
string prop = 1;
}
message PostConditionB {}
message M {
string x = 1;
}
================================================
FILE: _examples/06_alias/proto/post/v2/extra.proto
================================================
syntax = "proto3";
package org.post.v2;
option go_package = "example/post/v2;post";
// A second proto file in the v2 package, exercising the case where
// multiple proto files share the same go_package.
enum ExtraType {
EXTRA_TYPE_UNKNOWN = 0;
EXTRA_TYPE_A = 1;
EXTRA_TYPE_B = 2;
}
================================================
FILE: _examples/06_alias/proto/post/v2/post.proto
================================================
syntax = "proto3";
package org.post.v2;
option go_package = "example/post/v2;post";
service PostService {
rpc GetPost(GetPostRequest) returns (GetPostResponse) {};
}
message GetPostRequest {
string id = 1;
}
message GetPostResponse {
Post post = 1;
}
message Post {
string id = 1;
PostData data = 2;
}
enum PostDataType {
POST_TYPE_A = 0;
POST_V2_TYPE_B = 1;
POST_V2_TYPE_C = 2;
POST_V2_TYPE_D = 3;
}
message PostData {
PostDataType type = 1;
string title = 2;
PostContent content = 3;
string v2_data = 4;
}
message PostContent {
enum Category {
CATEGORY_A = 0;
CATEGORY_B = 1;
}
Category category = 1;
string head = 2;
string body = 3;
map counts = 4;
}
================================================
FILE: _examples/07_autobind/.gitignore
================================================
grpc/federation
================================================
FILE: _examples/07_autobind/.vscode/settings.json
================================================
{
"protoc": {
"options": [
"--proto_path=proto",
"--proto_path=proto_deps"
]
},
"grpc-federation": {
"path": "../../bin/grpc-federation-language-server",
"import-paths": [
"proto",
"proto_deps"
]
}
}
================================================
FILE: _examples/07_autobind/Makefile
================================================
MAKEFILE_DIR := $(dir $(lastword $(MAKEFILE_LIST)))
GOBIN := $(MAKEFILE_DIR)/../../bin
PATH := $(GOBIN):$(PATH)
JAEGER_IMAGE := jaegertracing/all-in-one:latest
.PHONY: generate
generate:
$(GOBIN)/buf generate
.PHONY: lint
lint:
@$(GOBIN)/grpc-federation-linter -Iproto -Iproto_deps ./proto/federation/federation.proto
.PHONY: test
test:
go test -race ./ -count=1
.PHONY: grpc-federation/generate
grpc-federation/generate:
@$(GOBIN)/grpc-federation-generator ./proto/federation/federation.proto
.PHONY: grpc-federation/watch
grpc-federation/watch:
@$(GOBIN)/grpc-federation-generator -w
.PHONY: jaeger/start
jaeger/start:
@docker run \
-e COLLECTOR_OTLP_ENABLED=true \
-p 16686:16686 \
-p 4317:4317 \
-p 4318:4318 \
-d \
$(JAEGER_IMAGE)
.PHONY: jaeger/stop
jaeger/stop:
@docker stop $(shell docker ps -q --filter ancestor=$(JAEGER_IMAGE))
================================================
FILE: _examples/07_autobind/buf.gen.yaml
================================================
version: v1
managed:
enabled: true
plugins:
- plugin: go
out: .
opt: paths=source_relative
- plugin: go-grpc
out: .
opt: paths=source_relative
- plugin: grpc-federation
out: .
opt:
- paths=source_relative
- import_paths=proto
================================================
FILE: _examples/07_autobind/buf.work.yaml
================================================
version: v1
directories:
- proto
- proto_deps
================================================
FILE: _examples/07_autobind/federation/federation.pb.go
================================================
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.33.0
// protoc (unknown)
// source: federation/federation.proto
package federation
import (
_ "github.com/mercari/grpc-federation/grpc/federation"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
_ "google.golang.org/protobuf/types/known/anypb"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
type GetPostRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
}
func (x *GetPostRequest) Reset() {
*x = GetPostRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_federation_federation_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GetPostRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetPostRequest) ProtoMessage() {}
func (x *GetPostRequest) ProtoReflect() protoreflect.Message {
mi := &file_federation_federation_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GetPostRequest.ProtoReflect.Descriptor instead.
func (*GetPostRequest) Descriptor() ([]byte, []int) {
return file_federation_federation_proto_rawDescGZIP(), []int{0}
}
func (x *GetPostRequest) GetId() string {
if x != nil {
return x.Id
}
return ""
}
type GetPostResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
Title string `protobuf:"bytes,2,opt,name=title,proto3" json:"title,omitempty"`
Content string `protobuf:"bytes,3,opt,name=content,proto3" json:"content,omitempty"`
Uid string `protobuf:"bytes,4,opt,name=uid,proto3" json:"uid,omitempty"`
}
func (x *GetPostResponse) Reset() {
*x = GetPostResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_federation_federation_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GetPostResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetPostResponse) ProtoMessage() {}
func (x *GetPostResponse) ProtoReflect() protoreflect.Message {
mi := &file_federation_federation_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GetPostResponse.ProtoReflect.Descriptor instead.
func (*GetPostResponse) Descriptor() ([]byte, []int) {
return file_federation_federation_proto_rawDescGZIP(), []int{1}
}
func (x *GetPostResponse) GetId() string {
if x != nil {
return x.Id
}
return ""
}
func (x *GetPostResponse) GetTitle() string {
if x != nil {
return x.Title
}
return ""
}
func (x *GetPostResponse) GetContent() string {
if x != nil {
return x.Content
}
return ""
}
func (x *GetPostResponse) GetUid() string {
if x != nil {
return x.Uid
}
return ""
}
type Post struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
Title string `protobuf:"bytes,2,opt,name=title,proto3" json:"title,omitempty"`
Content string `protobuf:"bytes,3,opt,name=content,proto3" json:"content,omitempty"`
Uid string `protobuf:"bytes,4,opt,name=uid,proto3" json:"uid,omitempty"`
}
func (x *Post) Reset() {
*x = Post{}
if protoimpl.UnsafeEnabled {
mi := &file_federation_federation_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Post) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Post) ProtoMessage() {}
func (x *Post) ProtoReflect() protoreflect.Message {
mi := &file_federation_federation_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Post.ProtoReflect.Descriptor instead.
func (*Post) Descriptor() ([]byte, []int) {
return file_federation_federation_proto_rawDescGZIP(), []int{2}
}
func (x *Post) GetId() string {
if x != nil {
return x.Id
}
return ""
}
func (x *Post) GetTitle() string {
if x != nil {
return x.Title
}
return ""
}
func (x *Post) GetContent() string {
if x != nil {
return x.Content
}
return ""
}
func (x *Post) GetUid() string {
if x != nil {
return x.Uid
}
return ""
}
type User struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Uid string `protobuf:"bytes,1,opt,name=uid,proto3" json:"uid,omitempty"`
}
func (x *User) Reset() {
*x = User{}
if protoimpl.UnsafeEnabled {
mi := &file_federation_federation_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *User) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*User) ProtoMessage() {}
func (x *User) ProtoReflect() protoreflect.Message {
mi := &file_federation_federation_proto_msgTypes[3]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use User.ProtoReflect.Descriptor instead.
func (*User) Descriptor() ([]byte, []int) {
return file_federation_federation_proto_rawDescGZIP(), []int{3}
}
func (x *User) GetUid() string {
if x != nil {
return x.Uid
}
return ""
}
var File_federation_federation_proto protoreflect.FileDescriptor
var file_federation_federation_proto_rawDesc = []byte{
0x0a, 0x1b, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x66, 0x65, 0x64,
0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0e, 0x6f,
0x72, 0x67, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x19, 0x67,
0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x61,
0x6e, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x20, 0x67, 0x72, 0x70, 0x63, 0x2f, 0x66,
0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61,
0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x20, 0x0a, 0x0e, 0x47, 0x65,
0x74, 0x50, 0x6f, 0x73, 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, 0x80, 0x01, 0x0a,
0x0f, 0x47, 0x65, 0x74, 0x50, 0x6f, 0x73, 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,
0x12, 0x14, 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52,
0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e,
0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74,
0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75,
0x69, 0x64, 0x3a, 0x1b, 0x9a, 0x4a, 0x18, 0x0a, 0x16, 0x18, 0x01, 0x6a, 0x12, 0x0a, 0x04, 0x50,
0x6f, 0x73, 0x74, 0x12, 0x0a, 0x0a, 0x02, 0x69, 0x64, 0x12, 0x04, 0x24, 0x2e, 0x69, 0x64, 0x22,
0xb8, 0x01, 0x0a, 0x04, 0x50, 0x6f, 0x73, 0x74, 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, 0x18,
0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52,
0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18,
0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x3a, 0x5e, 0x9a, 0x4a, 0x5b, 0x0a,
0x2d, 0x0a, 0x03, 0x72, 0x65, 0x73, 0x72, 0x26, 0x0a, 0x18, 0x70, 0x6f, 0x73, 0x74, 0x2e, 0x50,
0x6f, 0x73, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x47, 0x65, 0x74, 0x50, 0x6f,
0x73, 0x74, 0x12, 0x0a, 0x0a, 0x02, 0x69, 0x64, 0x12, 0x04, 0x24, 0x2e, 0x69, 0x64, 0x0a, 0x0c,
0x18, 0x01, 0x5a, 0x08, 0x72, 0x65, 0x73, 0x2e, 0x70, 0x6f, 0x73, 0x74, 0x0a, 0x1c, 0x18, 0x01,
0x6a, 0x18, 0x0a, 0x04, 0x55, 0x73, 0x65, 0x72, 0x12, 0x10, 0x0a, 0x07, 0x75, 0x73, 0x65, 0x72,
0x5f, 0x69, 0x64, 0x12, 0x05, 0x27, 0x66, 0x6f, 0x6f, 0x27, 0x22, 0x28, 0x0a, 0x04, 0x55, 0x73,
0x65, 0x72, 0x12, 0x20, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42,
0x0e, 0x9a, 0x4a, 0x0b, 0x12, 0x09, 0x24, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x52,
0x03, 0x75, 0x69, 0x64, 0x32, 0x66, 0x0a, 0x11, 0x46, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69,
0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x4c, 0x0a, 0x07, 0x47, 0x65, 0x74,
0x50, 0x6f, 0x73, 0x74, 0x12, 0x1e, 0x2e, 0x6f, 0x72, 0x67, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72,
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x6f, 0x73, 0x74, 0x52, 0x65, 0x71,
0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x6f, 0x72, 0x67, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72,
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x6f, 0x73, 0x74, 0x52, 0x65, 0x73,
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x1a, 0x03, 0x9a, 0x4a, 0x00, 0x42, 0xb1, 0x01, 0x9a,
0x4a, 0x11, 0x12, 0x0f, 0x70, 0x6f, 0x73, 0x74, 0x2f, 0x70, 0x6f, 0x73, 0x74, 0x2e, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x0a, 0x12, 0x63, 0x6f, 0x6d, 0x2e, 0x6f, 0x72, 0x67, 0x2e, 0x66, 0x65, 0x64,
0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x0f, 0x46, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74,
0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x1d, 0x65, 0x78, 0x61, 0x6d,
0x70, 0x6c, 0x65, 0x2f, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x3b, 0x66,
0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0xa2, 0x02, 0x03, 0x4f, 0x46, 0x58, 0xaa,
0x02, 0x0e, 0x4f, 0x72, 0x67, 0x2e, 0x46, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e,
0xca, 0x02, 0x0e, 0x4f, 0x72, 0x67, 0x5c, 0x46, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f,
0x6e, 0xe2, 0x02, 0x1a, 0x4f, 0x72, 0x67, 0x5c, 0x46, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69,
0x6f, 0x6e, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02,
0x0f, 0x4f, 0x72, 0x67, 0x3a, 0x3a, 0x46, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e,
0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_federation_federation_proto_rawDescOnce sync.Once
file_federation_federation_proto_rawDescData = file_federation_federation_proto_rawDesc
)
func file_federation_federation_proto_rawDescGZIP() []byte {
file_federation_federation_proto_rawDescOnce.Do(func() {
file_federation_federation_proto_rawDescData = protoimpl.X.CompressGZIP(file_federation_federation_proto_rawDescData)
})
return file_federation_federation_proto_rawDescData
}
var file_federation_federation_proto_msgTypes = make([]protoimpl.MessageInfo, 4)
var file_federation_federation_proto_goTypes = []interface{}{
(*GetPostRequest)(nil), // 0: org.federation.GetPostRequest
(*GetPostResponse)(nil), // 1: org.federation.GetPostResponse
(*Post)(nil), // 2: org.federation.Post
(*User)(nil), // 3: org.federation.User
}
var file_federation_federation_proto_depIdxs = []int32{
0, // 0: org.federation.FederationService.GetPost:input_type -> org.federation.GetPostRequest
1, // 1: org.federation.FederationService.GetPost:output_type -> org.federation.GetPostResponse
1, // [1:2] is the sub-list for method output_type
0, // [0:1] is the sub-list for method input_type
0, // [0:0] is the sub-list for extension type_name
0, // [0:0] is the sub-list for extension extendee
0, // [0:0] is the sub-list for field type_name
}
func init() { file_federation_federation_proto_init() }
func file_federation_federation_proto_init() {
if File_federation_federation_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_federation_federation_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetPostRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_federation_federation_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetPostResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_federation_federation_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Post); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_federation_federation_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*User); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_federation_federation_proto_rawDesc,
NumEnums: 0,
NumMessages: 4,
NumExtensions: 0,
NumServices: 1,
},
GoTypes: file_federation_federation_proto_goTypes,
DependencyIndexes: file_federation_federation_proto_depIdxs,
MessageInfos: file_federation_federation_proto_msgTypes,
}.Build()
File_federation_federation_proto = out.File
file_federation_federation_proto_rawDesc = nil
file_federation_federation_proto_goTypes = nil
file_federation_federation_proto_depIdxs = nil
}
================================================
FILE: _examples/07_autobind/federation/federation_grpc.pb.go
================================================
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.3.0
// - protoc (unknown)
// source: federation/federation.proto
package federation
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 (
FederationService_GetPost_FullMethodName = "/org.federation.FederationService/GetPost"
)
// FederationServiceClient is the client API for FederationService 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 FederationServiceClient interface {
GetPost(ctx context.Context, in *GetPostRequest, opts ...grpc.CallOption) (*GetPostResponse, error)
}
type federationServiceClient struct {
cc grpc.ClientConnInterface
}
func NewFederationServiceClient(cc grpc.ClientConnInterface) FederationServiceClient {
return &federationServiceClient{cc}
}
func (c *federationServiceClient) GetPost(ctx context.Context, in *GetPostRequest, opts ...grpc.CallOption) (*GetPostResponse, error) {
out := new(GetPostResponse)
err := c.cc.Invoke(ctx, FederationService_GetPost_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// FederationServiceServer is the server API for FederationService service.
// All implementations must embed UnimplementedFederationServiceServer
// for forward compatibility
type FederationServiceServer interface {
GetPost(context.Context, *GetPostRequest) (*GetPostResponse, error)
mustEmbedUnimplementedFederationServiceServer()
}
// UnimplementedFederationServiceServer must be embedded to have forward compatible implementations.
type UnimplementedFederationServiceServer struct {
}
func (UnimplementedFederationServiceServer) GetPost(context.Context, *GetPostRequest) (*GetPostResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetPost not implemented")
}
func (UnimplementedFederationServiceServer) mustEmbedUnimplementedFederationServiceServer() {}
// UnsafeFederationServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to FederationServiceServer will
// result in compilation errors.
type UnsafeFederationServiceServer interface {
mustEmbedUnimplementedFederationServiceServer()
}
func RegisterFederationServiceServer(s grpc.ServiceRegistrar, srv FederationServiceServer) {
s.RegisterService(&FederationService_ServiceDesc, srv)
}
func _FederationService_GetPost_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetPostRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(FederationServiceServer).GetPost(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: FederationService_GetPost_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(FederationServiceServer).GetPost(ctx, req.(*GetPostRequest))
}
return interceptor(ctx, in, info, handler)
}
// FederationService_ServiceDesc is the grpc.ServiceDesc for FederationService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var FederationService_ServiceDesc = grpc.ServiceDesc{
ServiceName: "org.federation.FederationService",
HandlerType: (*FederationServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "GetPost",
Handler: _FederationService_GetPost_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "federation/federation.proto",
}
================================================
FILE: _examples/07_autobind/federation/federation_grpc_federation.pb.go
================================================
// Code generated by protoc-gen-grpc-federation. DO NOT EDIT!
// versions:
//
// protoc-gen-grpc-federation: (devel)
//
// source: federation/federation.proto
package federation
import (
"context"
"io"
"log/slog"
"reflect"
grpcfed "github.com/mercari/grpc-federation/grpc/federation"
grpcfedcel "github.com/mercari/grpc-federation/grpc/federation/cel"
"go.opentelemetry.io/otel"
"go.opentelemetry.io/otel/trace"
post "example/post"
)
var (
_ = reflect.Invalid // to avoid "imported and not used error"
)
// Org_Federation_GetPostResponseVariable represents variable definitions in "org.federation.GetPostResponse".
type FederationService_Org_Federation_GetPostResponseVariable struct {
XDef0 *Post
}
// Org_Federation_GetPostResponseArgument is argument for "org.federation.GetPostResponse" message.
type FederationService_Org_Federation_GetPostResponseArgument struct {
Id string
FederationService_Org_Federation_GetPostResponseVariable
}
// Org_Federation_PostVariable represents variable definitions in "org.federation.Post".
type FederationService_Org_Federation_PostVariable struct {
Res *post.GetPostResponse
XDef1 *post.Post
XDef2 *User
}
// Org_Federation_PostArgument is argument for "org.federation.Post" message.
type FederationService_Org_Federation_PostArgument struct {
Id string
FederationService_Org_Federation_PostVariable
}
// Org_Federation_UserVariable represents variable definitions in "org.federation.User".
type FederationService_Org_Federation_UserVariable struct {
}
// Org_Federation_UserArgument is argument for "org.federation.User" message.
type FederationService_Org_Federation_UserArgument struct {
UserId string
FederationService_Org_Federation_UserVariable
}
// FederationServiceConfig configuration required to initialize the service that use GRPC Federation.
type FederationServiceConfig struct {
// Client provides a factory that creates the gRPC Client needed to invoke methods of the gRPC Service on which the Federation Service depends.
// If this interface is not provided, an error is returned during initialization.
Client FederationServiceClientFactory // required
// ErrorHandler Federation Service often needs to convert errors received from downstream services.
// If an error occurs during method execution in the Federation Service, this error handler is called and the returned error is treated as a final error.
ErrorHandler grpcfed.ErrorHandler
// Logger sets the logger used to output Debug/Info/Error information.
Logger *slog.Logger
}
// FederationServiceClientFactory provides a factory that creates the gRPC Client needed to invoke methods of the gRPC Service on which the Federation Service depends.
type FederationServiceClientFactory interface {
// Post_PostServiceClient create a gRPC Client to be used to call methods in post.PostService.
Post_PostServiceClient(FederationServiceClientConfig) (post.PostServiceClient, error)
}
// FederationServiceClientConfig helper to create gRPC client.
// Hints for creating a gRPC Client.
type FederationServiceClientConfig struct {
// Service FQDN ( `.` ) of the service on Protocol Buffers.
Service string
}
// FederationServiceDependentClientSet has a gRPC client for all services on which the federation service depends.
// This is provided as an argument when implementing the custom resolver.
type FederationServiceDependentClientSet struct {
Post_PostServiceClient post.PostServiceClient
}
// FederationServiceResolver provides an interface to directly implement message resolver and field resolver not defined in Protocol Buffers.
type FederationServiceResolver interface {
}
// FederationServiceCELPluginWasmConfig type alias for grpcfedcel.WasmConfig.
type FederationServiceCELPluginWasmConfig = grpcfedcel.WasmConfig
// FederationServiceCELPluginConfig hints for loading a WebAssembly based plugin.
type FederationServiceCELPluginConfig struct {
CacheDir string
}
// FederationServiceUnimplementedResolver a structure implemented to satisfy the Resolver interface.
// An Unimplemented error is always returned.
// This is intended for use when there are many Resolver interfaces that do not need to be implemented,
// by embedding them in a resolver structure that you have created.
type FederationServiceUnimplementedResolver struct{}
const (
FederationService_DependentMethod_Post_PostService_GetPost = "/post.PostService/GetPost"
)
// FederationService represents Federation Service.
type FederationService struct {
UnimplementedFederationServiceServer
cfg FederationServiceConfig
logger *slog.Logger
isLogLevelDebug bool
errorHandler grpcfed.ErrorHandler
celCacheMap *grpcfed.CELCacheMap
tracer trace.Tracer
celTypeHelper *grpcfed.CELTypeHelper
celEnvOpts []grpcfed.CELEnvOption
celPlugins []*grpcfedcel.CELPlugin
client *FederationServiceDependentClientSet
}
// NewFederationService creates FederationService instance by FederationServiceConfig.
func NewFederationService(cfg FederationServiceConfig) (*FederationService, error) {
if cfg.Client == nil {
return nil, grpcfed.ErrClientConfig
}
Post_PostServiceClient, err := cfg.Client.Post_PostServiceClient(FederationServiceClientConfig{
Service: "post.PostService",
})
if err != nil {
return nil, err
}
logger := cfg.Logger
if logger == nil {
logger = slog.New(slog.NewJSONHandler(io.Discard, nil))
}
tracer := otel.Tracer("org.federation.FederationService")
ctx := grpcfed.WithLogger(context.Background(), logger)
ctx = grpcfed.WithTracer(ctx, tracer)
errorHandler := cfg.ErrorHandler
if errorHandler == nil {
errorHandler = func(ctx context.Context, methodName string, err error) error { return err }
}
celTypeHelperFieldMap := grpcfed.CELTypeHelperFieldMap{
"grpc.federation.private.org.federation.GetPostResponseArgument": {
"id": grpcfed.NewCELFieldType(grpcfed.CELStringType, "Id"),
},
"grpc.federation.private.org.federation.PostArgument": {
"id": grpcfed.NewCELFieldType(grpcfed.CELStringType, "Id"),
},
"grpc.federation.private.org.federation.UserArgument": {
"user_id": grpcfed.NewCELFieldType(grpcfed.CELStringType, "UserId"),
},
}
celTypeHelper := grpcfed.NewCELTypeHelper("org.federation", celTypeHelperFieldMap)
var celEnvOpts []grpcfed.CELEnvOption
celEnvOpts = append(celEnvOpts, grpcfed.NewDefaultEnvOptions(celTypeHelper)...)
celEnvOpts = append(celEnvOpts, grpcfed.GRPCErrorAccessorOptions(celTypeHelper, "post.GetPostResponse")...)
svc := &FederationService{
cfg: cfg,
logger: logger,
isLogLevelDebug: logger.Enabled(context.Background(), slog.LevelDebug),
errorHandler: errorHandler,
celEnvOpts: celEnvOpts,
celTypeHelper: celTypeHelper,
celCacheMap: grpcfed.NewCELCacheMap(),
tracer: tracer,
client: &FederationServiceDependentClientSet{
Post_PostServiceClient: Post_PostServiceClient,
},
}
return svc, nil
}
// CleanupFederationService cleanup all resources to prevent goroutine leaks.
func CleanupFederationService(ctx context.Context, svc *FederationService) {
svc.cleanup(ctx)
}
func (s *FederationService) cleanup(ctx context.Context) {
for _, plugin := range s.celPlugins {
plugin.Close()
}
}
// GetPost implements "org.federation.FederationService/GetPost" method.
func (s *FederationService) GetPost(ctx context.Context, req *GetPostRequest) (res *GetPostResponse, e error) {
ctx, span := s.tracer.Start(ctx, "org.federation.FederationService/GetPost")
defer span.End()
ctx = grpcfed.WithLogger(ctx, s.logger)
ctx = grpcfed.WithCELCacheMap(ctx, s.celCacheMap)
defer func() {
if r := recover(); r != nil {
e = grpcfed.RecoverError(r, grpcfed.StackTrace())
grpcfed.OutputErrorLog(ctx, e)
}
}()
defer func() {
for _, celPlugin := range s.celPlugins {
celPlugin.Cleanup()
}
}()
res, err := s.resolve_Org_Federation_GetPostResponse(ctx, &FederationService_Org_Federation_GetPostResponseArgument{
Id: req.GetId(),
})
if err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
grpcfed.OutputErrorLog(ctx, err)
return nil, err
}
return res, nil
}
// resolve_Org_Federation_GetPostResponse resolve "org.federation.GetPostResponse" message.
func (s *FederationService) resolve_Org_Federation_GetPostResponse(ctx context.Context, req *FederationService_Org_Federation_GetPostResponseArgument) (*GetPostResponse, error) {
ctx, span := s.tracer.Start(ctx, "org.federation.GetPostResponse")
defer span.End()
ctx = grpcfed.WithLogger(ctx, grpcfed.Logger(ctx), grpcfed.LogAttrs(ctx)...)
grpcfed.Logger(ctx).DebugContext(ctx, "resolve org.federation.GetPostResponse", slog.Any("message_args", s.logvalue_Org_Federation_GetPostResponseArgument(req)))
type localValueType struct {
*grpcfed.LocalValue
vars struct {
XDef0 *Post
}
}
value := &localValueType{LocalValue: grpcfed.NewLocalValue(ctx, s.celEnvOpts, "grpc.federation.private.org.federation.GetPostResponseArgument", req)}
ctx = grpcfed.WithLocalValue(ctx, value.LocalValue)
/*
def {
name: "_def0"
autobind: true
message {
name: "Post"
args { name: "id", by: "$.id" }
}
}
*/
def__def0 := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[*Post, *localValueType]{
Name: `_def0`,
Type: grpcfed.CELObjectType("org.federation.Post"),
Setter: func(value *localValueType, v *Post) error {
value.vars.XDef0 = v
return nil
},
Message: func(ctx context.Context, value *localValueType) (any, error) {
args := &FederationService_Org_Federation_PostArgument{}
// { name: "id", by: "$.id" }
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[string]{
Value: value,
Expr: `$.id`,
CacheIndex: 1,
Setter: func(v string) error {
args.Id = v
return nil
},
}); err != nil {
return nil, err
}
ret, err := s.resolve_Org_Federation_Post(ctx, args)
if err != nil {
return nil, err
}
return ret, nil
},
})
}
if err := def__def0(ctx); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
// assign named parameters to message arguments to pass to the custom resolver.
req.FederationService_Org_Federation_GetPostResponseVariable.XDef0 = value.vars.XDef0
// create a message value to be returned.
ret := &GetPostResponse{}
// field binding section.
ret.Id = value.vars.XDef0.GetId() // { name: "_def0", autobind: true }
ret.Title = value.vars.XDef0.GetTitle() // { name: "_def0", autobind: true }
ret.Content = value.vars.XDef0.GetContent() // { name: "_def0", autobind: true }
ret.Uid = value.vars.XDef0.GetUid() // { name: "_def0", autobind: true }
grpcfed.Logger(ctx).DebugContext(ctx, "resolved org.federation.GetPostResponse", slog.Any("org.federation.GetPostResponse", s.logvalue_Org_Federation_GetPostResponse(ret)))
return ret, nil
}
// resolve_Org_Federation_Post resolve "org.federation.Post" message.
func (s *FederationService) resolve_Org_Federation_Post(ctx context.Context, req *FederationService_Org_Federation_PostArgument) (*Post, error) {
ctx, span := s.tracer.Start(ctx, "org.federation.Post")
defer span.End()
ctx = grpcfed.WithLogger(ctx, grpcfed.Logger(ctx), grpcfed.LogAttrs(ctx)...)
grpcfed.Logger(ctx).DebugContext(ctx, "resolve org.federation.Post", slog.Any("message_args", s.logvalue_Org_Federation_PostArgument(req)))
type localValueType struct {
*grpcfed.LocalValue
vars struct {
Res *post.GetPostResponse
XDef1 *post.Post
XDef2 *User
}
}
value := &localValueType{LocalValue: grpcfed.NewLocalValue(ctx, s.celEnvOpts, "grpc.federation.private.org.federation.PostArgument", req)}
ctx = grpcfed.WithLocalValue(ctx, value.LocalValue)
/*
def {
name: "res"
call {
method: "post.PostService/GetPost"
request { field: "id", by: "$.id" }
}
}
*/
def_res := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[*post.GetPostResponse, *localValueType]{
Name: `res`,
Type: grpcfed.CELObjectType("post.GetPostResponse"),
Setter: func(value *localValueType, v *post.GetPostResponse) error {
value.vars.Res = v
return nil
},
Message: func(ctx context.Context, value *localValueType) (any, error) {
args := &post.GetPostRequest{}
// { field: "id", by: "$.id" }
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[string]{
Value: value,
Expr: `$.id`,
CacheIndex: 2,
Setter: func(v string) error {
args.Id = v
return nil
},
}); err != nil {
return nil, err
}
grpcfed.Logger(ctx).DebugContext(ctx, "call post.PostService/GetPost", slog.Any("post.GetPostRequest", s.logvalue_Post_GetPostRequest(args)))
ret, err := s.client.Post_PostServiceClient.GetPost(ctx, args)
if err != nil {
if err := s.errorHandler(ctx, FederationService_DependentMethod_Post_PostService_GetPost, err); err != nil {
return nil, grpcfed.NewErrorWithLogAttrs(err, slog.LevelError, grpcfed.LogAttrs(ctx))
}
}
return ret, nil
},
})
}
/*
def {
name: "_def1"
autobind: true
by: "res.post"
}
*/
def__def1 := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[*post.Post, *localValueType]{
Name: `_def1`,
Type: grpcfed.CELObjectType("post.Post"),
Setter: func(value *localValueType, v *post.Post) error {
value.vars.XDef1 = v
return nil
},
By: `res.post`,
ByCacheIndex: 3,
})
}
/*
def {
name: "_def2"
autobind: true
message {
name: "User"
args { name: "user_id", by: "'foo'" }
}
}
*/
def__def2 := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[*User, *localValueType]{
Name: `_def2`,
Type: grpcfed.CELObjectType("org.federation.User"),
Setter: func(value *localValueType, v *User) error {
value.vars.XDef2 = v
return nil
},
Message: func(ctx context.Context, value *localValueType) (any, error) {
args := &FederationService_Org_Federation_UserArgument{}
// { name: "user_id", by: "'foo'" }
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[string]{
Value: value,
Expr: `'foo'`,
CacheIndex: 4,
Setter: func(v string) error {
args.UserId = v
return nil
},
}); err != nil {
return nil, err
}
ret, err := s.resolve_Org_Federation_User(ctx, args)
if err != nil {
return nil, err
}
return ret, nil
},
})
}
// A tree view of message dependencies is shown below.
/*
res ─┐
_def1 ─┐
_def2 ─┤
*/
eg, ctx1 := grpcfed.ErrorGroupWithContext(ctx)
grpcfed.GoWithRecover(eg, func() (any, error) {
if err := def_res(ctx1); err != nil {
grpcfed.RecordErrorToSpan(ctx1, err)
return nil, err
}
if err := def__def1(ctx1); err != nil {
grpcfed.RecordErrorToSpan(ctx1, err)
return nil, err
}
return nil, nil
})
grpcfed.GoWithRecover(eg, func() (any, error) {
if err := def__def2(ctx1); err != nil {
grpcfed.RecordErrorToSpan(ctx1, err)
return nil, err
}
return nil, nil
})
if err := eg.Wait(); err != nil {
return nil, err
}
// assign named parameters to message arguments to pass to the custom resolver.
req.FederationService_Org_Federation_PostVariable.Res = value.vars.Res
req.FederationService_Org_Federation_PostVariable.XDef1 = value.vars.XDef1
req.FederationService_Org_Federation_PostVariable.XDef2 = value.vars.XDef2
// create a message value to be returned.
ret := &Post{}
// field binding section.
ret.Id = value.vars.XDef1.GetId() // { name: "_def1", autobind: true }
ret.Title = value.vars.XDef1.GetTitle() // { name: "_def1", autobind: true }
ret.Content = value.vars.XDef1.GetContent() // { name: "_def1", autobind: true }
ret.Uid = value.vars.XDef2.GetUid() // { name: "_def2", autobind: true }
grpcfed.Logger(ctx).DebugContext(ctx, "resolved org.federation.Post", slog.Any("org.federation.Post", s.logvalue_Org_Federation_Post(ret)))
return ret, nil
}
// resolve_Org_Federation_User resolve "org.federation.User" message.
func (s *FederationService) resolve_Org_Federation_User(ctx context.Context, req *FederationService_Org_Federation_UserArgument) (*User, error) {
ctx, span := s.tracer.Start(ctx, "org.federation.User")
defer span.End()
ctx = grpcfed.WithLogger(ctx, grpcfed.Logger(ctx), grpcfed.LogAttrs(ctx)...)
grpcfed.Logger(ctx).DebugContext(ctx, "resolve org.federation.User", slog.Any("message_args", s.logvalue_Org_Federation_UserArgument(req)))
type localValueType struct {
*grpcfed.LocalValue
vars struct {
}
}
value := &localValueType{LocalValue: grpcfed.NewLocalValue(ctx, s.celEnvOpts, "grpc.federation.private.org.federation.UserArgument", req)}
ctx = grpcfed.WithLocalValue(ctx, value.LocalValue)
// create a message value to be returned.
ret := &User{}
// field binding section.
// (grpc.federation.field).by = "$.user_id"
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[string]{
Value: value,
Expr: `$.user_id`,
CacheIndex: 5,
Setter: func(v string) error {
ret.Uid = v
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
grpcfed.Logger(ctx).DebugContext(ctx, "resolved org.federation.User", slog.Any("org.federation.User", s.logvalue_Org_Federation_User(ret)))
return ret, nil
}
func (s *FederationService) logvalue_Org_Federation_GetPostResponse(v *GetPostResponse) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.String("id", v.GetId()),
slog.String("title", v.GetTitle()),
slog.String("content", v.GetContent()),
slog.String("uid", v.GetUid()),
)
}
func (s *FederationService) logvalue_Org_Federation_GetPostResponseArgument(v *FederationService_Org_Federation_GetPostResponseArgument) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.String("id", v.Id),
)
}
func (s *FederationService) logvalue_Org_Federation_Post(v *Post) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.String("id", v.GetId()),
slog.String("title", v.GetTitle()),
slog.String("content", v.GetContent()),
slog.String("uid", v.GetUid()),
)
}
func (s *FederationService) logvalue_Org_Federation_PostArgument(v *FederationService_Org_Federation_PostArgument) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.String("id", v.Id),
)
}
func (s *FederationService) logvalue_Org_Federation_User(v *User) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.String("uid", v.GetUid()),
)
}
func (s *FederationService) logvalue_Org_Federation_UserArgument(v *FederationService_Org_Federation_UserArgument) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.String("user_id", v.UserId),
)
}
func (s *FederationService) logvalue_Post_GetPostRequest(v *post.GetPostRequest) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.String("id", v.GetId()),
)
}
================================================
FILE: _examples/07_autobind/go.mod
================================================
module example
go 1.24.0
replace github.com/mercari/grpc-federation => ../../
require (
github.com/google/go-cmp v0.7.0
github.com/mercari/grpc-federation v0.0.0-00010101000000-000000000000
go.opentelemetry.io/otel v1.24.0
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.21.0
go.opentelemetry.io/otel/sdk v1.24.0
go.opentelemetry.io/otel/trace v1.24.0
go.uber.org/goleak v1.3.0
google.golang.org/genproto/googleapis/rpc v0.0.0-20240826202546-f6391c0de4c7
google.golang.org/grpc v1.65.0
google.golang.org/protobuf v1.34.2
)
require (
cel.dev/expr v0.19.1 // indirect
github.com/antlr4-go/antlr/v4 v4.13.0 // indirect
github.com/cenkalti/backoff/v4 v4.2.1 // indirect
github.com/go-logr/logr v1.4.1 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
github.com/goccy/wasi-go v0.3.2 // indirect
github.com/google/cel-go v0.23.1 // indirect
github.com/google/uuid v1.6.0 // indirect
github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0 // indirect
github.com/kelseyhightower/envconfig v1.4.0 // indirect
github.com/stealthrocket/wazergo v0.19.1 // indirect
github.com/stoewer/go-strcase v1.3.0 // indirect
github.com/tetratelabs/wazero v1.10.1 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.21.0 // indirect
go.opentelemetry.io/otel/metric v1.24.0 // indirect
go.opentelemetry.io/proto/otlp v1.0.0 // indirect
golang.org/x/exp v0.0.0-20250506013437-ce4c2cf36ca6 // indirect
golang.org/x/net v0.38.0 // indirect
golang.org/x/sync v0.14.0 // indirect
golang.org/x/sys v0.37.0 // indirect
golang.org/x/text v0.23.0 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20240826202546-f6391c0de4c7 // indirect
)
================================================
FILE: _examples/07_autobind/go.sum
================================================
cel.dev/expr v0.19.1 h1:NciYrtDRIR0lNCnH1LFJegdjspNx9fI59O7TWcua/W4=
cel.dev/expr v0.19.1/go.mod h1:MrpN08Q+lEBs+bGYdLxxHkZoUSsCp0nSKTs0nTymJgw=
github.com/antlr4-go/antlr/v4 v4.13.0 h1:lxCg3LAv+EUK6t1i0y1V6/SLeUi0eKEKdhQAlS8TVTI=
github.com/antlr4-go/antlr/v4 v4.13.0/go.mod h1:pfChB/xh/Unjila75QW7+VU4TSnWnnk9UTnmpPaOR2g=
github.com/cenkalti/backoff/v4 v4.2.1 h1:y4OZtCnogmCPw98Zjyt5a6+QwPLGkiQsYW5oUqylYbM=
github.com/cenkalti/backoff/v4 v4.2.1/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A=
github.com/go-logr/logr v1.4.1 h1:pKouT5E8xu9zeFC39JXRDukb6JFQPXM5p5I91188VAQ=
github.com/go-logr/logr v1.4.1/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY=
github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag=
github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE=
github.com/goccy/wasi-go v0.3.2 h1:wAvGXmqCkfcp0B0AwIp5Ya53hzDwkKm9W8iuT3nCCz0=
github.com/goccy/wasi-go v0.3.2/go.mod h1:nIKD204n9xa4Z20UV+XA483kIr9TAl2vXr+X5qVAO5M=
github.com/golang/glog v1.2.1 h1:OptwRhECazUx5ix5TTWC3EZhsZEHWcYWY4FQHTIubm4=
github.com/golang/glog v1.2.1/go.mod h1:6AhwSGph0fcJtXVM/PEHPqZlFeoLxhs7/t5UDAwmO+w=
github.com/google/cel-go v0.23.1 h1:91ThhEZlBcE5rB2adBVXqvDoqdL8BG2oyhd0bK1I/r4=
github.com/google/cel-go v0.23.1/go.mod h1:52Pb6QsDbC5kvgxvZhiL9QX1oZEkcUF/ZqaPx1J5Wwo=
github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8=
github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU=
github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0 h1:YBftPWNWd4WwGqtY2yeZL2ef8rHAxPBD8KFhJpmcqms=
github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0/go.mod h1:YN5jB8ie0yfIUg6VvR9Kz84aCaG7AsGZnLjhHbUqwPg=
github.com/kelseyhightower/envconfig v1.4.0 h1:Im6hONhd3pLkfDFsbRgu68RDNkGF1r3dvMUtDTo2cv8=
github.com/kelseyhightower/envconfig v1.4.0/go.mod h1:cccZRl6mQpaq41TPp5QxidR+Sa3axMbJDNb//FQX6Gg=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/stealthrocket/wazergo v0.19.1 h1:BPrITETPgSFwiytwmToO0MbUC/+RGC39JScz1JmmG6c=
github.com/stealthrocket/wazergo v0.19.1/go.mod h1:riI0hxw4ndZA5e6z7PesHg2BtTftcZaMxRcoiGGipTs=
github.com/stoewer/go-strcase v1.3.0 h1:g0eASXYtp+yvN9fK8sH94oCIk0fau9uV1/ZdJ0AVEzs=
github.com/stoewer/go-strcase v1.3.0/go.mod h1:fAH5hQ5pehh+j3nZfvwdk2RgEgQjAoM8wodgtPmh1xo=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=
github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo=
github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk=
github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
github.com/tetratelabs/wazero v1.10.1 h1:2DugeJf6VVk58KTPszlNfeeN8AhhpwcZqkJj2wwFuH8=
github.com/tetratelabs/wazero v1.10.1/go.mod h1:DRm5twOQ5Gr1AoEdSi0CLjDQF1J9ZAuyqFIjl1KKfQU=
go.opentelemetry.io/otel v1.24.0 h1:0LAOdjNmQeSTzGBzduGe/rU4tZhMwL5rWgtp9Ku5Jfo=
go.opentelemetry.io/otel v1.24.0/go.mod h1:W7b9Ozg4nkF5tWI5zsXkaKKDjdVjpD4oAt9Qi/MArHo=
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.21.0 h1:cl5P5/GIfFh4t6xyruOgJP5QiA1pw4fYYdv6nc6CBWw=
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.21.0/go.mod h1:zgBdWWAu7oEEMC06MMKc5NLbA/1YDXV1sMpSqEeLQLg=
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.21.0 h1:tIqheXEFWAZ7O8A7m+J0aPTmpJN3YQ7qetUAdkkkKpk=
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.21.0/go.mod h1:nUeKExfxAQVbiVFn32YXpXZZHZ61Cc3s3Rn1pDBGAb0=
go.opentelemetry.io/otel/metric v1.24.0 h1:6EhoGWWK28x1fbpA4tYTOWBkPefTDQnb8WSGXlc88kI=
go.opentelemetry.io/otel/metric v1.24.0/go.mod h1:VYhLe1rFfxuTXLgj4CBiyz+9WYBA8pNGJgDcSFRKBco=
go.opentelemetry.io/otel/sdk v1.24.0 h1:YMPPDNymmQN3ZgczicBY3B6sf9n62Dlj9pWD3ucgoDw=
go.opentelemetry.io/otel/sdk v1.24.0/go.mod h1:KVrIYw6tEubO9E96HQpcmpTKDVn9gdv35HoYiQWGDFg=
go.opentelemetry.io/otel/trace v1.24.0 h1:CsKnnL4dUAr/0llH9FKuc698G04IrpWV0MQA/Y1YELI=
go.opentelemetry.io/otel/trace v1.24.0/go.mod h1:HPc3Xr/cOApsBI154IU0OI0HJexz+aw5uPdbs3UCjNU=
go.opentelemetry.io/proto/otlp v1.0.0 h1:T0TX0tmXU8a3CbNXzEKGeU5mIVOdf0oykP+u2lIVU/I=
go.opentelemetry.io/proto/otlp v1.0.0/go.mod h1:Sy6pihPLfYHkr3NkUbEhGHFhINUSI/v80hjKIs5JXpM=
go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto=
go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE=
golang.org/x/exp v0.0.0-20250506013437-ce4c2cf36ca6 h1:y5zboxd6LQAqYIhHnB48p0ByQ/GnQx2BE33L8BOHQkI=
golang.org/x/exp v0.0.0-20250506013437-ce4c2cf36ca6/go.mod h1:U6Lno4MTRCDY+Ba7aCcauB9T60gsv5s4ralQzP72ZoQ=
golang.org/x/net v0.38.0 h1:vRMAPTMaeGqVhG5QyLJHqNDwecKTomGeqbnfZyKlBI8=
golang.org/x/net v0.38.0/go.mod h1:ivrbrMbzFq5J41QOQh0siUuly180yBYtLp+CKbEaFx8=
golang.org/x/sync v0.14.0 h1:woo0S4Yywslg6hp4eUFjTVOyKt0RookbpAHG4c1HmhQ=
golang.org/x/sync v0.14.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA=
golang.org/x/sys v0.37.0 h1:fdNQudmxPjkdUTPnLn5mdQv7Zwvbvpaxqs831goi9kQ=
golang.org/x/sys v0.37.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks=
golang.org/x/text v0.23.0 h1:D71I7dUrlY+VX0gQShAThNGHFxZ13dGLBHQLVl1mJlY=
golang.org/x/text v0.23.0/go.mod h1:/BLNzu4aZCJ1+kcD0DNRotWKage4q2rGVAg4o22unh4=
google.golang.org/genproto/googleapis/api v0.0.0-20240826202546-f6391c0de4c7 h1:YcyjlL1PRr2Q17/I0dPk2JmYS5CDXfcdb2Z3YRioEbw=
google.golang.org/genproto/googleapis/api v0.0.0-20240826202546-f6391c0de4c7/go.mod h1:OCdP9MfskevB/rbYvHTsXTtKC+3bHWajPdoKgjcYkfo=
google.golang.org/genproto/googleapis/rpc v0.0.0-20240826202546-f6391c0de4c7 h1:2035KHhUv+EpyB+hWgJnaWKJOdX1E95w2S8Rr4uWKTs=
google.golang.org/genproto/googleapis/rpc v0.0.0-20240826202546-f6391c0de4c7/go.mod h1:UqMtugtsSgubUsoxbuAoiCXvqvErP7Gf0so0mK9tHxU=
google.golang.org/grpc v1.65.0 h1:bs/cUb4lp1G5iImFFd3u5ixQzweKizoZJAwBNLR42lc=
google.golang.org/grpc v1.65.0/go.mod h1:WgYC2ypjlB0EiQi6wdKixMqukr6lBc0Vo+oOgjrM5ZQ=
google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg=
google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
================================================
FILE: _examples/07_autobind/main_test.go
================================================
package main_test
import (
"context"
"fmt"
"log/slog"
"net"
"os"
"testing"
"github.com/google/go-cmp/cmp"
"github.com/google/go-cmp/cmp/cmpopts"
"go.opentelemetry.io/otel"
"go.opentelemetry.io/otel/attribute"
"go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc"
"go.opentelemetry.io/otel/propagation"
"go.opentelemetry.io/otel/sdk/resource"
sdktrace "go.opentelemetry.io/otel/sdk/trace"
semconv "go.opentelemetry.io/otel/semconv/v1.4.0"
"go.uber.org/goleak"
"google.golang.org/grpc"
"google.golang.org/grpc/test/bufconn"
"example/federation"
"example/post"
)
const bufSize = 1024
var (
listener *bufconn.Listener
postClient post.PostServiceClient
)
type clientConfig struct{}
func (c *clientConfig) Post_PostServiceClient(cfg federation.FederationServiceClientConfig) (post.PostServiceClient, error) {
return postClient, nil
}
type PostServer struct {
*post.UnimplementedPostServiceServer
}
func (s *PostServer) GetPost(ctx context.Context, req *post.GetPostRequest) (*post.GetPostResponse, error) {
return &post.GetPostResponse{
Post: &post.Post{
Id: req.Id,
Title: "foo",
Content: "bar",
UserId: fmt.Sprintf("user:%s", req.Id),
},
}, nil
}
func dialer(ctx context.Context, address string) (net.Conn, error) {
return listener.Dial()
}
func TestFederation(t *testing.T) {
defer goleak.VerifyNone(t)
ctx := context.Background()
listener = bufconn.Listen(bufSize)
if os.Getenv("ENABLE_JAEGER") != "" {
exporter, err := otlptracegrpc.New(ctx, otlptracegrpc.WithInsecure())
if err != nil {
t.Fatal(err)
}
tp := sdktrace.NewTracerProvider(
sdktrace.WithBatcher(exporter),
sdktrace.WithResource(
resource.NewWithAttributes(
semconv.SchemaURL,
semconv.ServiceNameKey.String("example07/autobind"),
semconv.ServiceVersionKey.String("1.0.0"),
attribute.String("environment", "dev"),
),
),
sdktrace.WithSampler(sdktrace.AlwaysSample()),
)
defer tp.Shutdown(ctx)
otel.SetTextMapPropagator(propagation.TraceContext{})
otel.SetTracerProvider(tp)
}
conn, err := grpc.DialContext(ctx, "", grpc.WithContextDialer(dialer), grpc.WithInsecure())
if err != nil {
t.Fatal(err)
}
defer conn.Close()
postClient = post.NewPostServiceClient(conn)
grpcServer := grpc.NewServer()
defer grpcServer.Stop()
logger := slog.New(slog.NewJSONHandler(os.Stdout, &slog.HandlerOptions{
Level: slog.LevelDebug,
}))
federationServer, err := federation.NewFederationService(federation.FederationServiceConfig{
Client: new(clientConfig),
Logger: logger,
})
if err != nil {
t.Fatal(err)
}
defer federation.CleanupFederationService(ctx, federationServer)
post.RegisterPostServiceServer(grpcServer, &PostServer{})
federation.RegisterFederationServiceServer(grpcServer, federationServer)
go func() {
if err := grpcServer.Serve(listener); err != nil {
t.Fatal(err)
}
}()
client := federation.NewFederationServiceClient(conn)
res, err := client.GetPost(ctx, &federation.GetPostRequest{
Id: "foo",
})
if err != nil {
t.Fatal(err)
}
if diff := cmp.Diff(res, &federation.GetPostResponse{
Id: "foo",
Title: "foo",
Content: "bar",
Uid: "foo",
}, cmpopts.IgnoreUnexported(
federation.GetPostResponse{},
federation.Post{},
federation.User{},
)); diff != "" {
t.Errorf("(-got, +want)\n%s", diff)
}
}
================================================
FILE: _examples/07_autobind/post/post.pb.go
================================================
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.33.0
// protoc (unknown)
// source: post/post.proto
package post
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
type GetPostRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
}
func (x *GetPostRequest) Reset() {
*x = GetPostRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_post_post_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GetPostRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetPostRequest) ProtoMessage() {}
func (x *GetPostRequest) ProtoReflect() protoreflect.Message {
mi := &file_post_post_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GetPostRequest.ProtoReflect.Descriptor instead.
func (*GetPostRequest) Descriptor() ([]byte, []int) {
return file_post_post_proto_rawDescGZIP(), []int{0}
}
func (x *GetPostRequest) GetId() string {
if x != nil {
return x.Id
}
return ""
}
type GetPostResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Post *Post `protobuf:"bytes,1,opt,name=post,proto3" json:"post,omitempty"`
}
func (x *GetPostResponse) Reset() {
*x = GetPostResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_post_post_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GetPostResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetPostResponse) ProtoMessage() {}
func (x *GetPostResponse) ProtoReflect() protoreflect.Message {
mi := &file_post_post_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GetPostResponse.ProtoReflect.Descriptor instead.
func (*GetPostResponse) Descriptor() ([]byte, []int) {
return file_post_post_proto_rawDescGZIP(), []int{1}
}
func (x *GetPostResponse) GetPost() *Post {
if x != nil {
return x.Post
}
return nil
}
type Post struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
Title string `protobuf:"bytes,2,opt,name=title,proto3" json:"title,omitempty"`
Content string `protobuf:"bytes,3,opt,name=content,proto3" json:"content,omitempty"`
UserId string `protobuf:"bytes,4,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
}
func (x *Post) Reset() {
*x = Post{}
if protoimpl.UnsafeEnabled {
mi := &file_post_post_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Post) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Post) ProtoMessage() {}
func (x *Post) ProtoReflect() protoreflect.Message {
mi := &file_post_post_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Post.ProtoReflect.Descriptor instead.
func (*Post) Descriptor() ([]byte, []int) {
return file_post_post_proto_rawDescGZIP(), []int{2}
}
func (x *Post) GetId() string {
if x != nil {
return x.Id
}
return ""
}
func (x *Post) GetTitle() string {
if x != nil {
return x.Title
}
return ""
}
func (x *Post) GetContent() string {
if x != nil {
return x.Content
}
return ""
}
func (x *Post) GetUserId() string {
if x != nil {
return x.UserId
}
return ""
}
var File_post_post_proto protoreflect.FileDescriptor
var file_post_post_proto_rawDesc = []byte{
0x0a, 0x0f, 0x70, 0x6f, 0x73, 0x74, 0x2f, 0x70, 0x6f, 0x73, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x12, 0x04, 0x70, 0x6f, 0x73, 0x74, 0x22, 0x20, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x50, 0x6f,
0x73, 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, 0x31, 0x0a, 0x0f, 0x47, 0x65, 0x74,
0x50, 0x6f, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1e, 0x0a, 0x04,
0x70, 0x6f, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x70, 0x6f, 0x73,
0x74, 0x2e, 0x50, 0x6f, 0x73, 0x74, 0x52, 0x04, 0x70, 0x6f, 0x73, 0x74, 0x22, 0x5f, 0x0a, 0x04,
0x50, 0x6f, 0x73, 0x74, 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, 0x18, 0x0a, 0x07, 0x63, 0x6f,
0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6e,
0x74, 0x65, 0x6e, 0x74, 0x12, 0x17, 0x0a, 0x07, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18,
0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x32, 0x47, 0x0a,
0x0b, 0x50, 0x6f, 0x73, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x38, 0x0a, 0x07,
0x47, 0x65, 0x74, 0x50, 0x6f, 0x73, 0x74, 0x12, 0x14, 0x2e, 0x70, 0x6f, 0x73, 0x74, 0x2e, 0x47,
0x65, 0x74, 0x50, 0x6f, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e,
0x70, 0x6f, 0x73, 0x74, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x6f, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70,
0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x58, 0x0a, 0x08, 0x63, 0x6f, 0x6d, 0x2e, 0x70, 0x6f,
0x73, 0x74, 0x42, 0x09, 0x50, 0x6f, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a,
0x11, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2f, 0x70, 0x6f, 0x73, 0x74, 0x3b, 0x70, 0x6f,
0x73, 0x74, 0xa2, 0x02, 0x03, 0x50, 0x58, 0x58, 0xaa, 0x02, 0x04, 0x50, 0x6f, 0x73, 0x74, 0xca,
0x02, 0x04, 0x50, 0x6f, 0x73, 0x74, 0xe2, 0x02, 0x10, 0x50, 0x6f, 0x73, 0x74, 0x5c, 0x47, 0x50,
0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x04, 0x50, 0x6f, 0x73, 0x74,
0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_post_post_proto_rawDescOnce sync.Once
file_post_post_proto_rawDescData = file_post_post_proto_rawDesc
)
func file_post_post_proto_rawDescGZIP() []byte {
file_post_post_proto_rawDescOnce.Do(func() {
file_post_post_proto_rawDescData = protoimpl.X.CompressGZIP(file_post_post_proto_rawDescData)
})
return file_post_post_proto_rawDescData
}
var file_post_post_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
var file_post_post_proto_goTypes = []interface{}{
(*GetPostRequest)(nil), // 0: post.GetPostRequest
(*GetPostResponse)(nil), // 1: post.GetPostResponse
(*Post)(nil), // 2: post.Post
}
var file_post_post_proto_depIdxs = []int32{
2, // 0: post.GetPostResponse.post:type_name -> post.Post
0, // 1: post.PostService.GetPost:input_type -> post.GetPostRequest
1, // 2: post.PostService.GetPost:output_type -> post.GetPostResponse
2, // [2:3] is the sub-list for method output_type
1, // [1:2] is the sub-list for method input_type
1, // [1:1] is the sub-list for extension type_name
1, // [1:1] is the sub-list for extension extendee
0, // [0:1] is the sub-list for field type_name
}
func init() { file_post_post_proto_init() }
func file_post_post_proto_init() {
if File_post_post_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_post_post_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetPostRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_post_post_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetPostResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_post_post_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Post); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_post_post_proto_rawDesc,
NumEnums: 0,
NumMessages: 3,
NumExtensions: 0,
NumServices: 1,
},
GoTypes: file_post_post_proto_goTypes,
DependencyIndexes: file_post_post_proto_depIdxs,
MessageInfos: file_post_post_proto_msgTypes,
}.Build()
File_post_post_proto = out.File
file_post_post_proto_rawDesc = nil
file_post_post_proto_goTypes = nil
file_post_post_proto_depIdxs = nil
}
================================================
FILE: _examples/07_autobind/post/post_grpc.pb.go
================================================
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.3.0
// - protoc (unknown)
// source: post/post.proto
package post
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 (
PostService_GetPost_FullMethodName = "/post.PostService/GetPost"
)
// PostServiceClient is the client API for PostService 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 PostServiceClient interface {
GetPost(ctx context.Context, in *GetPostRequest, opts ...grpc.CallOption) (*GetPostResponse, error)
}
type postServiceClient struct {
cc grpc.ClientConnInterface
}
func NewPostServiceClient(cc grpc.ClientConnInterface) PostServiceClient {
return &postServiceClient{cc}
}
func (c *postServiceClient) GetPost(ctx context.Context, in *GetPostRequest, opts ...grpc.CallOption) (*GetPostResponse, error) {
out := new(GetPostResponse)
err := c.cc.Invoke(ctx, PostService_GetPost_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// PostServiceServer is the server API for PostService service.
// All implementations must embed UnimplementedPostServiceServer
// for forward compatibility
type PostServiceServer interface {
GetPost(context.Context, *GetPostRequest) (*GetPostResponse, error)
mustEmbedUnimplementedPostServiceServer()
}
// UnimplementedPostServiceServer must be embedded to have forward compatible implementations.
type UnimplementedPostServiceServer struct {
}
func (UnimplementedPostServiceServer) GetPost(context.Context, *GetPostRequest) (*GetPostResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetPost not implemented")
}
func (UnimplementedPostServiceServer) mustEmbedUnimplementedPostServiceServer() {}
// UnsafePostServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to PostServiceServer will
// result in compilation errors.
type UnsafePostServiceServer interface {
mustEmbedUnimplementedPostServiceServer()
}
func RegisterPostServiceServer(s grpc.ServiceRegistrar, srv PostServiceServer) {
s.RegisterService(&PostService_ServiceDesc, srv)
}
func _PostService_GetPost_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetPostRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(PostServiceServer).GetPost(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: PostService_GetPost_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(PostServiceServer).GetPost(ctx, req.(*GetPostRequest))
}
return interceptor(ctx, in, info, handler)
}
// PostService_ServiceDesc is the grpc.ServiceDesc for PostService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var PostService_ServiceDesc = grpc.ServiceDesc{
ServiceName: "post.PostService",
HandlerType: (*PostServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "GetPost",
Handler: _PostService_GetPost_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "post/post.proto",
}
================================================
FILE: _examples/07_autobind/proto/buf.yaml
================================================
version: v1
breaking:
use:
- FILE
lint:
use:
- DEFAULT
================================================
FILE: _examples/07_autobind/proto/federation/federation.proto
================================================
syntax = "proto3";
package org.federation;
import "google/protobuf/any.proto";
import "grpc/federation/federation.proto";
option go_package = "example/federation;federation";
option (grpc.federation.file)= {
import: ["post/post.proto"]
};
service FederationService {
option (grpc.federation.service) = {};
rpc GetPost(GetPostRequest) returns (GetPostResponse) {};
}
message GetPostRequest {
string id = 1;
}
message GetPostResponse {
option (grpc.federation.message) = {
def {
message {
name: "Post"
args { name: "id", by: "$.id" }
}
autobind: true
}
};
string id = 1;
string title = 2;
string content = 3;
string uid = 4;
}
message Post {
option (grpc.federation.message) = {
def [
{
name: "res"
call {
method: "post.PostService/GetPost"
request { field: "id", by: "$.id" }
}
},
{ by: "res.post", autobind: true },
{
message {
name: "User"
args { name: "user_id", by: "'foo'" }
}
autobind: true
}
]
};
string id = 1;
string title = 2;
string content = 3;
string uid = 4;
}
message User {
string uid = 1 [(grpc.federation.field).by = "$.user_id"];
}
================================================
FILE: _examples/07_autobind/proto/post/post.proto
================================================
syntax = "proto3";
package post;
option go_package = "example/post;post";
service PostService {
rpc GetPost(GetPostRequest) returns (GetPostResponse) {};
}
message GetPostRequest {
string id = 1;
}
message GetPostResponse {
Post post = 1;
}
message Post {
string id = 1;
string title = 2;
string content = 3;
string user_id = 4;
}
================================================
FILE: _examples/08_literal/.gitignore
================================================
grpc/federation
================================================
FILE: _examples/08_literal/.vscode/settings.json
================================================
{
"protoc": {
"options": [
"--proto_path=proto",
"--proto_path=proto_deps"
]
},
"grpc-federation": {
"path": "../../bin/grpc-federation-language-server",
"import-paths": [
"proto",
"proto_deps"
]
}
}
================================================
FILE: _examples/08_literal/Makefile
================================================
MAKEFILE_DIR := $(dir $(lastword $(MAKEFILE_LIST)))
GOBIN := $(MAKEFILE_DIR)/../../bin
PATH := $(GOBIN):$(PATH)
JAEGER_IMAGE := jaegertracing/all-in-one:latest
.PHONY: generate
generate:
$(GOBIN)/buf generate
.PHONY: lint
lint:
@$(GOBIN)/grpc-federation-linter -Iproto -Iproto_deps ./proto/federation/federation.proto
.PHONY: test
test:
go test -race ./ -count=1
.PHONY: grpc-federation/generate
grpc-federation/generate:
@$(GOBIN)/grpc-federation-generator ./proto/federation/federation.proto
.PHONY: grpc-federation/watch
grpc-federation/watch:
@$(GOBIN)/grpc-federation-generator -w
.PHONY: jaeger/start
jaeger/start:
@docker run \
-e COLLECTOR_OTLP_ENABLED=true \
-p 16686:16686 \
-p 4317:4317 \
-p 4318:4318 \
-d \
$(JAEGER_IMAGE)
.PHONY: jaeger/stop
jaeger/stop:
@docker stop $(shell docker ps -q --filter ancestor=$(JAEGER_IMAGE))
================================================
FILE: _examples/08_literal/buf.gen.yaml
================================================
version: v1
managed:
enabled: true
plugins:
- plugin: go
out: .
opt: paths=source_relative
- plugin: go-grpc
out: .
opt: paths=source_relative
- plugin: grpc-federation
out: .
opt:
- paths=source_relative
- import_paths=proto
================================================
FILE: _examples/08_literal/buf.work.yaml
================================================
version: v1
directories:
- proto
- proto_deps
================================================
FILE: _examples/08_literal/content/content.pb.go
================================================
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.33.0
// protoc (unknown)
// source: content/content.proto
package content
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
type ContentType int32
const (
ContentType_CONTENT_TYPE_1 ContentType = 0
ContentType_CONTENT_TYPE_2 ContentType = 1
ContentType_CONTENT_TYPE_3 ContentType = 2
)
// Enum value maps for ContentType.
var (
ContentType_name = map[int32]string{
0: "CONTENT_TYPE_1",
1: "CONTENT_TYPE_2",
2: "CONTENT_TYPE_3",
}
ContentType_value = map[string]int32{
"CONTENT_TYPE_1": 0,
"CONTENT_TYPE_2": 1,
"CONTENT_TYPE_3": 2,
}
)
func (x ContentType) Enum() *ContentType {
p := new(ContentType)
*p = x
return p
}
func (x ContentType) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (ContentType) Descriptor() protoreflect.EnumDescriptor {
return file_content_content_proto_enumTypes[0].Descriptor()
}
func (ContentType) Type() protoreflect.EnumType {
return &file_content_content_proto_enumTypes[0]
}
func (x ContentType) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use ContentType.Descriptor instead.
func (ContentType) EnumDescriptor() ([]byte, []int) {
return file_content_content_proto_rawDescGZIP(), []int{0}
}
type GetContentRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
ByField string `protobuf:"bytes,1,opt,name=by_field,json=byField,proto3" json:"by_field,omitempty"`
DoubleField float64 `protobuf:"fixed64,2,opt,name=double_field,json=doubleField,proto3" json:"double_field,omitempty"`
DoublesField []float64 `protobuf:"fixed64,3,rep,packed,name=doubles_field,json=doublesField,proto3" json:"doubles_field,omitempty"`
FloatField float32 `protobuf:"fixed32,4,opt,name=float_field,json=floatField,proto3" json:"float_field,omitempty"`
FloatsField []float32 `protobuf:"fixed32,5,rep,packed,name=floats_field,json=floatsField,proto3" json:"floats_field,omitempty"`
Int32Field int32 `protobuf:"varint,6,opt,name=int32_field,json=int32Field,proto3" json:"int32_field,omitempty"`
Int32SField []int32 `protobuf:"varint,7,rep,packed,name=int32s_field,json=int32sField,proto3" json:"int32s_field,omitempty"`
Int64Field int64 `protobuf:"varint,8,opt,name=int64_field,json=int64Field,proto3" json:"int64_field,omitempty"`
Int64SField []int64 `protobuf:"varint,9,rep,packed,name=int64s_field,json=int64sField,proto3" json:"int64s_field,omitempty"`
Uint32Field uint32 `protobuf:"varint,10,opt,name=uint32_field,json=uint32Field,proto3" json:"uint32_field,omitempty"`
Uint32SField []uint32 `protobuf:"varint,11,rep,packed,name=uint32s_field,json=uint32sField,proto3" json:"uint32s_field,omitempty"`
Uint64Field uint64 `protobuf:"varint,12,opt,name=uint64_field,json=uint64Field,proto3" json:"uint64_field,omitempty"`
Uint64SField []uint64 `protobuf:"varint,13,rep,packed,name=uint64s_field,json=uint64sField,proto3" json:"uint64s_field,omitempty"`
Sint32Field int32 `protobuf:"zigzag32,14,opt,name=sint32_field,json=sint32Field,proto3" json:"sint32_field,omitempty"`
Sint32SField []int32 `protobuf:"zigzag32,15,rep,packed,name=sint32s_field,json=sint32sField,proto3" json:"sint32s_field,omitempty"`
Sint64Field int64 `protobuf:"zigzag64,16,opt,name=sint64_field,json=sint64Field,proto3" json:"sint64_field,omitempty"`
Sint64SField []int64 `protobuf:"zigzag64,17,rep,packed,name=sint64s_field,json=sint64sField,proto3" json:"sint64s_field,omitempty"`
Fixed32Field uint32 `protobuf:"fixed32,18,opt,name=fixed32_field,json=fixed32Field,proto3" json:"fixed32_field,omitempty"`
Fixed32SField []uint32 `protobuf:"fixed32,19,rep,packed,name=fixed32s_field,json=fixed32sField,proto3" json:"fixed32s_field,omitempty"`
Fixed64Field uint64 `protobuf:"fixed64,20,opt,name=fixed64_field,json=fixed64Field,proto3" json:"fixed64_field,omitempty"`
Fixed64SField []uint64 `protobuf:"fixed64,21,rep,packed,name=fixed64s_field,json=fixed64sField,proto3" json:"fixed64s_field,omitempty"`
Sfixed32Field int32 `protobuf:"fixed32,22,opt,name=sfixed32_field,json=sfixed32Field,proto3" json:"sfixed32_field,omitempty"`
Sfixed32SField []int32 `protobuf:"fixed32,23,rep,packed,name=sfixed32s_field,json=sfixed32sField,proto3" json:"sfixed32s_field,omitempty"`
Sfixed64Field int64 `protobuf:"fixed64,24,opt,name=sfixed64_field,json=sfixed64Field,proto3" json:"sfixed64_field,omitempty"`
Sfixed64SField []int64 `protobuf:"fixed64,25,rep,packed,name=sfixed64s_field,json=sfixed64sField,proto3" json:"sfixed64s_field,omitempty"`
BoolField bool `protobuf:"varint,26,opt,name=bool_field,json=boolField,proto3" json:"bool_field,omitempty"`
BoolsField []bool `protobuf:"varint,27,rep,packed,name=bools_field,json=boolsField,proto3" json:"bools_field,omitempty"`
StringField string `protobuf:"bytes,28,opt,name=string_field,json=stringField,proto3" json:"string_field,omitempty"`
StringsField []string `protobuf:"bytes,29,rep,name=strings_field,json=stringsField,proto3" json:"strings_field,omitempty"`
ByteStringField []byte `protobuf:"bytes,30,opt,name=byte_string_field,json=byteStringField,proto3" json:"byte_string_field,omitempty"`
ByteStringsField [][]byte `protobuf:"bytes,31,rep,name=byte_strings_field,json=byteStringsField,proto3" json:"byte_strings_field,omitempty"`
EnumField ContentType `protobuf:"varint,32,opt,name=enum_field,json=enumField,proto3,enum=content.ContentType" json:"enum_field,omitempty"`
EnumsField []ContentType `protobuf:"varint,33,rep,packed,name=enums_field,json=enumsField,proto3,enum=content.ContentType" json:"enums_field,omitempty"`
EnvField string `protobuf:"bytes,34,opt,name=env_field,json=envField,proto3" json:"env_field,omitempty"`
EnvsField []string `protobuf:"bytes,35,rep,name=envs_field,json=envsField,proto3" json:"envs_field,omitempty"`
MessageField *Content `protobuf:"bytes,36,opt,name=message_field,json=messageField,proto3" json:"message_field,omitempty"`
MessagesField []*Content `protobuf:"bytes,37,rep,name=messages_field,json=messagesField,proto3" json:"messages_field,omitempty"`
}
func (x *GetContentRequest) Reset() {
*x = GetContentRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_content_content_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GetContentRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetContentRequest) ProtoMessage() {}
func (x *GetContentRequest) ProtoReflect() protoreflect.Message {
mi := &file_content_content_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GetContentRequest.ProtoReflect.Descriptor instead.
func (*GetContentRequest) Descriptor() ([]byte, []int) {
return file_content_content_proto_rawDescGZIP(), []int{0}
}
func (x *GetContentRequest) GetByField() string {
if x != nil {
return x.ByField
}
return ""
}
func (x *GetContentRequest) GetDoubleField() float64 {
if x != nil {
return x.DoubleField
}
return 0
}
func (x *GetContentRequest) GetDoublesField() []float64 {
if x != nil {
return x.DoublesField
}
return nil
}
func (x *GetContentRequest) GetFloatField() float32 {
if x != nil {
return x.FloatField
}
return 0
}
func (x *GetContentRequest) GetFloatsField() []float32 {
if x != nil {
return x.FloatsField
}
return nil
}
func (x *GetContentRequest) GetInt32Field() int32 {
if x != nil {
return x.Int32Field
}
return 0
}
func (x *GetContentRequest) GetInt32SField() []int32 {
if x != nil {
return x.Int32SField
}
return nil
}
func (x *GetContentRequest) GetInt64Field() int64 {
if x != nil {
return x.Int64Field
}
return 0
}
func (x *GetContentRequest) GetInt64SField() []int64 {
if x != nil {
return x.Int64SField
}
return nil
}
func (x *GetContentRequest) GetUint32Field() uint32 {
if x != nil {
return x.Uint32Field
}
return 0
}
func (x *GetContentRequest) GetUint32SField() []uint32 {
if x != nil {
return x.Uint32SField
}
return nil
}
func (x *GetContentRequest) GetUint64Field() uint64 {
if x != nil {
return x.Uint64Field
}
return 0
}
func (x *GetContentRequest) GetUint64SField() []uint64 {
if x != nil {
return x.Uint64SField
}
return nil
}
func (x *GetContentRequest) GetSint32Field() int32 {
if x != nil {
return x.Sint32Field
}
return 0
}
func (x *GetContentRequest) GetSint32SField() []int32 {
if x != nil {
return x.Sint32SField
}
return nil
}
func (x *GetContentRequest) GetSint64Field() int64 {
if x != nil {
return x.Sint64Field
}
return 0
}
func (x *GetContentRequest) GetSint64SField() []int64 {
if x != nil {
return x.Sint64SField
}
return nil
}
func (x *GetContentRequest) GetFixed32Field() uint32 {
if x != nil {
return x.Fixed32Field
}
return 0
}
func (x *GetContentRequest) GetFixed32SField() []uint32 {
if x != nil {
return x.Fixed32SField
}
return nil
}
func (x *GetContentRequest) GetFixed64Field() uint64 {
if x != nil {
return x.Fixed64Field
}
return 0
}
func (x *GetContentRequest) GetFixed64SField() []uint64 {
if x != nil {
return x.Fixed64SField
}
return nil
}
func (x *GetContentRequest) GetSfixed32Field() int32 {
if x != nil {
return x.Sfixed32Field
}
return 0
}
func (x *GetContentRequest) GetSfixed32SField() []int32 {
if x != nil {
return x.Sfixed32SField
}
return nil
}
func (x *GetContentRequest) GetSfixed64Field() int64 {
if x != nil {
return x.Sfixed64Field
}
return 0
}
func (x *GetContentRequest) GetSfixed64SField() []int64 {
if x != nil {
return x.Sfixed64SField
}
return nil
}
func (x *GetContentRequest) GetBoolField() bool {
if x != nil {
return x.BoolField
}
return false
}
func (x *GetContentRequest) GetBoolsField() []bool {
if x != nil {
return x.BoolsField
}
return nil
}
func (x *GetContentRequest) GetStringField() string {
if x != nil {
return x.StringField
}
return ""
}
func (x *GetContentRequest) GetStringsField() []string {
if x != nil {
return x.StringsField
}
return nil
}
func (x *GetContentRequest) GetByteStringField() []byte {
if x != nil {
return x.ByteStringField
}
return nil
}
func (x *GetContentRequest) GetByteStringsField() [][]byte {
if x != nil {
return x.ByteStringsField
}
return nil
}
func (x *GetContentRequest) GetEnumField() ContentType {
if x != nil {
return x.EnumField
}
return ContentType_CONTENT_TYPE_1
}
func (x *GetContentRequest) GetEnumsField() []ContentType {
if x != nil {
return x.EnumsField
}
return nil
}
func (x *GetContentRequest) GetEnvField() string {
if x != nil {
return x.EnvField
}
return ""
}
func (x *GetContentRequest) GetEnvsField() []string {
if x != nil {
return x.EnvsField
}
return nil
}
func (x *GetContentRequest) GetMessageField() *Content {
if x != nil {
return x.MessageField
}
return nil
}
func (x *GetContentRequest) GetMessagesField() []*Content {
if x != nil {
return x.MessagesField
}
return nil
}
type GetContentResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Content *Content `protobuf:"bytes,1,opt,name=content,proto3" json:"content,omitempty"`
}
func (x *GetContentResponse) Reset() {
*x = GetContentResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_content_content_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GetContentResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetContentResponse) ProtoMessage() {}
func (x *GetContentResponse) ProtoReflect() protoreflect.Message {
mi := &file_content_content_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GetContentResponse.ProtoReflect.Descriptor instead.
func (*GetContentResponse) Descriptor() ([]byte, []int) {
return file_content_content_proto_rawDescGZIP(), []int{1}
}
func (x *GetContentResponse) GetContent() *Content {
if x != nil {
return x.Content
}
return nil
}
type Content struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
ByField string `protobuf:"bytes,1,opt,name=by_field,json=byField,proto3" json:"by_field,omitempty"`
DoubleField float64 `protobuf:"fixed64,2,opt,name=double_field,json=doubleField,proto3" json:"double_field,omitempty"`
DoublesField []float64 `protobuf:"fixed64,3,rep,packed,name=doubles_field,json=doublesField,proto3" json:"doubles_field,omitempty"`
FloatField float32 `protobuf:"fixed32,4,opt,name=float_field,json=floatField,proto3" json:"float_field,omitempty"`
FloatsField []float32 `protobuf:"fixed32,5,rep,packed,name=floats_field,json=floatsField,proto3" json:"floats_field,omitempty"`
Int32Field int32 `protobuf:"varint,6,opt,name=int32_field,json=int32Field,proto3" json:"int32_field,omitempty"`
Int32SField []int32 `protobuf:"varint,7,rep,packed,name=int32s_field,json=int32sField,proto3" json:"int32s_field,omitempty"`
Int64Field int64 `protobuf:"varint,8,opt,name=int64_field,json=int64Field,proto3" json:"int64_field,omitempty"`
Int64SField []int64 `protobuf:"varint,9,rep,packed,name=int64s_field,json=int64sField,proto3" json:"int64s_field,omitempty"`
Uint32Field uint32 `protobuf:"varint,10,opt,name=uint32_field,json=uint32Field,proto3" json:"uint32_field,omitempty"`
Uint32SField []uint32 `protobuf:"varint,11,rep,packed,name=uint32s_field,json=uint32sField,proto3" json:"uint32s_field,omitempty"`
Uint64Field uint64 `protobuf:"varint,12,opt,name=uint64_field,json=uint64Field,proto3" json:"uint64_field,omitempty"`
Uint64SField []uint64 `protobuf:"varint,13,rep,packed,name=uint64s_field,json=uint64sField,proto3" json:"uint64s_field,omitempty"`
Sint32Field int32 `protobuf:"zigzag32,14,opt,name=sint32_field,json=sint32Field,proto3" json:"sint32_field,omitempty"`
Sint32SField []int32 `protobuf:"zigzag32,15,rep,packed,name=sint32s_field,json=sint32sField,proto3" json:"sint32s_field,omitempty"`
Sint64Field int64 `protobuf:"zigzag64,16,opt,name=sint64_field,json=sint64Field,proto3" json:"sint64_field,omitempty"`
Sint64SField []int64 `protobuf:"zigzag64,17,rep,packed,name=sint64s_field,json=sint64sField,proto3" json:"sint64s_field,omitempty"`
Fixed32Field uint32 `protobuf:"fixed32,18,opt,name=fixed32_field,json=fixed32Field,proto3" json:"fixed32_field,omitempty"`
Fixed32SField []uint32 `protobuf:"fixed32,19,rep,packed,name=fixed32s_field,json=fixed32sField,proto3" json:"fixed32s_field,omitempty"`
Fixed64Field uint64 `protobuf:"fixed64,20,opt,name=fixed64_field,json=fixed64Field,proto3" json:"fixed64_field,omitempty"`
Fixed64SField []uint64 `protobuf:"fixed64,21,rep,packed,name=fixed64s_field,json=fixed64sField,proto3" json:"fixed64s_field,omitempty"`
Sfixed32Field int32 `protobuf:"fixed32,22,opt,name=sfixed32_field,json=sfixed32Field,proto3" json:"sfixed32_field,omitempty"`
Sfixed32SField []int32 `protobuf:"fixed32,23,rep,packed,name=sfixed32s_field,json=sfixed32sField,proto3" json:"sfixed32s_field,omitempty"`
Sfixed64Field int64 `protobuf:"fixed64,24,opt,name=sfixed64_field,json=sfixed64Field,proto3" json:"sfixed64_field,omitempty"`
Sfixed64SField []int64 `protobuf:"fixed64,25,rep,packed,name=sfixed64s_field,json=sfixed64sField,proto3" json:"sfixed64s_field,omitempty"`
BoolField bool `protobuf:"varint,26,opt,name=bool_field,json=boolField,proto3" json:"bool_field,omitempty"`
BoolsField []bool `protobuf:"varint,27,rep,packed,name=bools_field,json=boolsField,proto3" json:"bools_field,omitempty"`
StringField string `protobuf:"bytes,28,opt,name=string_field,json=stringField,proto3" json:"string_field,omitempty"`
StringsField []string `protobuf:"bytes,29,rep,name=strings_field,json=stringsField,proto3" json:"strings_field,omitempty"`
ByteStringField []byte `protobuf:"bytes,30,opt,name=byte_string_field,json=byteStringField,proto3" json:"byte_string_field,omitempty"`
ByteStringsField [][]byte `protobuf:"bytes,31,rep,name=byte_strings_field,json=byteStringsField,proto3" json:"byte_strings_field,omitempty"`
EnumField ContentType `protobuf:"varint,32,opt,name=enum_field,json=enumField,proto3,enum=content.ContentType" json:"enum_field,omitempty"`
EnumsField []ContentType `protobuf:"varint,33,rep,packed,name=enums_field,json=enumsField,proto3,enum=content.ContentType" json:"enums_field,omitempty"`
EnvField string `protobuf:"bytes,34,opt,name=env_field,json=envField,proto3" json:"env_field,omitempty"`
EnvsField []string `protobuf:"bytes,35,rep,name=envs_field,json=envsField,proto3" json:"envs_field,omitempty"`
MessageField *Content `protobuf:"bytes,36,opt,name=message_field,json=messageField,proto3" json:"message_field,omitempty"`
MessagesField []*Content `protobuf:"bytes,37,rep,name=messages_field,json=messagesField,proto3" json:"messages_field,omitempty"`
}
func (x *Content) Reset() {
*x = Content{}
if protoimpl.UnsafeEnabled {
mi := &file_content_content_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Content) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Content) ProtoMessage() {}
func (x *Content) ProtoReflect() protoreflect.Message {
mi := &file_content_content_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Content.ProtoReflect.Descriptor instead.
func (*Content) Descriptor() ([]byte, []int) {
return file_content_content_proto_rawDescGZIP(), []int{2}
}
func (x *Content) GetByField() string {
if x != nil {
return x.ByField
}
return ""
}
func (x *Content) GetDoubleField() float64 {
if x != nil {
return x.DoubleField
}
return 0
}
func (x *Content) GetDoublesField() []float64 {
if x != nil {
return x.DoublesField
}
return nil
}
func (x *Content) GetFloatField() float32 {
if x != nil {
return x.FloatField
}
return 0
}
func (x *Content) GetFloatsField() []float32 {
if x != nil {
return x.FloatsField
}
return nil
}
func (x *Content) GetInt32Field() int32 {
if x != nil {
return x.Int32Field
}
return 0
}
func (x *Content) GetInt32SField() []int32 {
if x != nil {
return x.Int32SField
}
return nil
}
func (x *Content) GetInt64Field() int64 {
if x != nil {
return x.Int64Field
}
return 0
}
func (x *Content) GetInt64SField() []int64 {
if x != nil {
return x.Int64SField
}
return nil
}
func (x *Content) GetUint32Field() uint32 {
if x != nil {
return x.Uint32Field
}
return 0
}
func (x *Content) GetUint32SField() []uint32 {
if x != nil {
return x.Uint32SField
}
return nil
}
func (x *Content) GetUint64Field() uint64 {
if x != nil {
return x.Uint64Field
}
return 0
}
func (x *Content) GetUint64SField() []uint64 {
if x != nil {
return x.Uint64SField
}
return nil
}
func (x *Content) GetSint32Field() int32 {
if x != nil {
return x.Sint32Field
}
return 0
}
func (x *Content) GetSint32SField() []int32 {
if x != nil {
return x.Sint32SField
}
return nil
}
func (x *Content) GetSint64Field() int64 {
if x != nil {
return x.Sint64Field
}
return 0
}
func (x *Content) GetSint64SField() []int64 {
if x != nil {
return x.Sint64SField
}
return nil
}
func (x *Content) GetFixed32Field() uint32 {
if x != nil {
return x.Fixed32Field
}
return 0
}
func (x *Content) GetFixed32SField() []uint32 {
if x != nil {
return x.Fixed32SField
}
return nil
}
func (x *Content) GetFixed64Field() uint64 {
if x != nil {
return x.Fixed64Field
}
return 0
}
func (x *Content) GetFixed64SField() []uint64 {
if x != nil {
return x.Fixed64SField
}
return nil
}
func (x *Content) GetSfixed32Field() int32 {
if x != nil {
return x.Sfixed32Field
}
return 0
}
func (x *Content) GetSfixed32SField() []int32 {
if x != nil {
return x.Sfixed32SField
}
return nil
}
func (x *Content) GetSfixed64Field() int64 {
if x != nil {
return x.Sfixed64Field
}
return 0
}
func (x *Content) GetSfixed64SField() []int64 {
if x != nil {
return x.Sfixed64SField
}
return nil
}
func (x *Content) GetBoolField() bool {
if x != nil {
return x.BoolField
}
return false
}
func (x *Content) GetBoolsField() []bool {
if x != nil {
return x.BoolsField
}
return nil
}
func (x *Content) GetStringField() string {
if x != nil {
return x.StringField
}
return ""
}
func (x *Content) GetStringsField() []string {
if x != nil {
return x.StringsField
}
return nil
}
func (x *Content) GetByteStringField() []byte {
if x != nil {
return x.ByteStringField
}
return nil
}
func (x *Content) GetByteStringsField() [][]byte {
if x != nil {
return x.ByteStringsField
}
return nil
}
func (x *Content) GetEnumField() ContentType {
if x != nil {
return x.EnumField
}
return ContentType_CONTENT_TYPE_1
}
func (x *Content) GetEnumsField() []ContentType {
if x != nil {
return x.EnumsField
}
return nil
}
func (x *Content) GetEnvField() string {
if x != nil {
return x.EnvField
}
return ""
}
func (x *Content) GetEnvsField() []string {
if x != nil {
return x.EnvsField
}
return nil
}
func (x *Content) GetMessageField() *Content {
if x != nil {
return x.MessageField
}
return nil
}
func (x *Content) GetMessagesField() []*Content {
if x != nil {
return x.MessagesField
}
return nil
}
var File_content_content_proto protoreflect.FileDescriptor
var file_content_content_proto_rawDesc = []byte{
0x0a, 0x15, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e,
0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74,
0x22, 0x94, 0x0b, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x52,
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x62, 0x79, 0x5f, 0x66, 0x69, 0x65,
0x6c, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x62, 0x79, 0x46, 0x69, 0x65, 0x6c,
0x64, 0x12, 0x21, 0x0a, 0x0c, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x5f, 0x66, 0x69, 0x65, 0x6c,
0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x01, 0x52, 0x0b, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x46,
0x69, 0x65, 0x6c, 0x64, 0x12, 0x23, 0x0a, 0x0d, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x73, 0x5f,
0x66, 0x69, 0x65, 0x6c, 0x64, 0x18, 0x03, 0x20, 0x03, 0x28, 0x01, 0x52, 0x0c, 0x64, 0x6f, 0x75,
0x62, 0x6c, 0x65, 0x73, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x66, 0x6c, 0x6f,
0x61, 0x74, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x02, 0x52, 0x0a,
0x66, 0x6c, 0x6f, 0x61, 0x74, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x66, 0x6c,
0x6f, 0x61, 0x74, 0x73, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x18, 0x05, 0x20, 0x03, 0x28, 0x02,
0x52, 0x0b, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x73, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x1f, 0x0a,
0x0b, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x18, 0x06, 0x20, 0x01,
0x28, 0x05, 0x52, 0x0a, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x21,
0x0a, 0x0c, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x73, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x18, 0x07,
0x20, 0x03, 0x28, 0x05, 0x52, 0x0b, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x73, 0x46, 0x69, 0x65, 0x6c,
0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64,
0x18, 0x08, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x46, 0x69, 0x65,
0x6c, 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x73, 0x5f, 0x66, 0x69, 0x65,
0x6c, 0x64, 0x18, 0x09, 0x20, 0x03, 0x28, 0x03, 0x52, 0x0b, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x73,
0x46, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x75, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x5f,
0x66, 0x69, 0x65, 0x6c, 0x64, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0b, 0x75, 0x69, 0x6e,
0x74, 0x33, 0x32, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x23, 0x0a, 0x0d, 0x75, 0x69, 0x6e, 0x74,
0x33, 0x32, 0x73, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x18, 0x0b, 0x20, 0x03, 0x28, 0x0d, 0x52,
0x0c, 0x75, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x73, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x21, 0x0a,
0x0c, 0x75, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x18, 0x0c, 0x20,
0x01, 0x28, 0x04, 0x52, 0x0b, 0x75, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x46, 0x69, 0x65, 0x6c, 0x64,
0x12, 0x23, 0x0a, 0x0d, 0x75, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x73, 0x5f, 0x66, 0x69, 0x65, 0x6c,
0x64, 0x18, 0x0d, 0x20, 0x03, 0x28, 0x04, 0x52, 0x0c, 0x75, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x73,
0x46, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x5f,
0x66, 0x69, 0x65, 0x6c, 0x64, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x11, 0x52, 0x0b, 0x73, 0x69, 0x6e,
0x74, 0x33, 0x32, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x23, 0x0a, 0x0d, 0x73, 0x69, 0x6e, 0x74,
0x33, 0x32, 0x73, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x18, 0x0f, 0x20, 0x03, 0x28, 0x11, 0x52,
0x0c, 0x73, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x73, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x21, 0x0a,
0x0c, 0x73, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x18, 0x10, 0x20,
0x01, 0x28, 0x12, 0x52, 0x0b, 0x73, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x46, 0x69, 0x65, 0x6c, 0x64,
0x12, 0x23, 0x0a, 0x0d, 0x73, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x73, 0x5f, 0x66, 0x69, 0x65, 0x6c,
0x64, 0x18, 0x11, 0x20, 0x03, 0x28, 0x12, 0x52, 0x0c, 0x73, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x73,
0x46, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x23, 0x0a, 0x0d, 0x66, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32,
0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x18, 0x12, 0x20, 0x01, 0x28, 0x07, 0x52, 0x0c, 0x66, 0x69,
0x78, 0x65, 0x64, 0x33, 0x32, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x25, 0x0a, 0x0e, 0x66, 0x69,
0x78, 0x65, 0x64, 0x33, 0x32, 0x73, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x18, 0x13, 0x20, 0x03,
0x28, 0x07, 0x52, 0x0d, 0x66, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x73, 0x46, 0x69, 0x65, 0x6c,
0x64, 0x12, 0x23, 0x0a, 0x0d, 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x5f, 0x66, 0x69, 0x65,
0x6c, 0x64, 0x18, 0x14, 0x20, 0x01, 0x28, 0x06, 0x52, 0x0c, 0x66, 0x69, 0x78, 0x65, 0x64, 0x36,
0x34, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x25, 0x0a, 0x0e, 0x66, 0x69, 0x78, 0x65, 0x64, 0x36,
0x34, 0x73, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x18, 0x15, 0x20, 0x03, 0x28, 0x06, 0x52, 0x0d,
0x66, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x73, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x25, 0x0a,
0x0e, 0x73, 0x66, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x18,
0x16, 0x20, 0x01, 0x28, 0x0f, 0x52, 0x0d, 0x73, 0x66, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x46,
0x69, 0x65, 0x6c, 0x64, 0x12, 0x27, 0x0a, 0x0f, 0x73, 0x66, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32,
0x73, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x18, 0x17, 0x20, 0x03, 0x28, 0x0f, 0x52, 0x0e, 0x73,
0x66, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x73, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x25, 0x0a,
0x0e, 0x73, 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x18,
0x18, 0x20, 0x01, 0x28, 0x10, 0x52, 0x0d, 0x73, 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x46,
0x69, 0x65, 0x6c, 0x64, 0x12, 0x27, 0x0a, 0x0f, 0x73, 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34,
0x73, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x18, 0x19, 0x20, 0x03, 0x28, 0x10, 0x52, 0x0e, 0x73,
0x66, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x73, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x1d, 0x0a,
0x0a, 0x62, 0x6f, 0x6f, 0x6c, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x18, 0x1a, 0x20, 0x01, 0x28,
0x08, 0x52, 0x09, 0x62, 0x6f, 0x6f, 0x6c, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x1f, 0x0a, 0x0b,
0x62, 0x6f, 0x6f, 0x6c, 0x73, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x18, 0x1b, 0x20, 0x03, 0x28,
0x08, 0x52, 0x0a, 0x62, 0x6f, 0x6f, 0x6c, 0x73, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x21, 0x0a,
0x0c, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x18, 0x1c, 0x20,
0x01, 0x28, 0x09, 0x52, 0x0b, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x46, 0x69, 0x65, 0x6c, 0x64,
0x12, 0x23, 0x0a, 0x0d, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x73, 0x5f, 0x66, 0x69, 0x65, 0x6c,
0x64, 0x18, 0x1d, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0c, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x73,
0x46, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x2a, 0x0a, 0x11, 0x62, 0x79, 0x74, 0x65, 0x5f, 0x73, 0x74,
0x72, 0x69, 0x6e, 0x67, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x18, 0x1e, 0x20, 0x01, 0x28, 0x0c,
0x52, 0x0f, 0x62, 0x79, 0x74, 0x65, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x46, 0x69, 0x65, 0x6c,
0x64, 0x12, 0x2c, 0x0a, 0x12, 0x62, 0x79, 0x74, 0x65, 0x5f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67,
0x73, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x18, 0x1f, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x10, 0x62,
0x79, 0x74, 0x65, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x73, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x12,
0x33, 0x0a, 0x0a, 0x65, 0x6e, 0x75, 0x6d, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x18, 0x20, 0x20,
0x01, 0x28, 0x0e, 0x32, 0x14, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2e, 0x43, 0x6f,
0x6e, 0x74, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x09, 0x65, 0x6e, 0x75, 0x6d, 0x46,
0x69, 0x65, 0x6c, 0x64, 0x12, 0x35, 0x0a, 0x0b, 0x65, 0x6e, 0x75, 0x6d, 0x73, 0x5f, 0x66, 0x69,
0x65, 0x6c, 0x64, 0x18, 0x21, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x14, 0x2e, 0x63, 0x6f, 0x6e, 0x74,
0x65, 0x6e, 0x74, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52,
0x0a, 0x65, 0x6e, 0x75, 0x6d, 0x73, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x65,
0x6e, 0x76, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x18, 0x22, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08,
0x65, 0x6e, 0x76, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x65, 0x6e, 0x76, 0x73,
0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x18, 0x23, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x65, 0x6e,
0x76, 0x73, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x35, 0x0a, 0x0d, 0x6d, 0x65, 0x73, 0x73, 0x61,
0x67, 0x65, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x18, 0x24, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10,
0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74,
0x52, 0x0c, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x37,
0x0a, 0x0e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64,
0x18, 0x25, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74,
0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x52, 0x0d, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67,
0x65, 0x73, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x22, 0x40, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x43, 0x6f,
0x6e, 0x74, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2a, 0x0a,
0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10,
0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74,
0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x22, 0x8a, 0x0b, 0x0a, 0x07, 0x43, 0x6f,
0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x62, 0x79, 0x5f, 0x66, 0x69, 0x65, 0x6c,
0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x62, 0x79, 0x46, 0x69, 0x65, 0x6c, 0x64,
0x12, 0x21, 0x0a, 0x0c, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64,
0x18, 0x02, 0x20, 0x01, 0x28, 0x01, 0x52, 0x0b, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x46, 0x69,
0x65, 0x6c, 0x64, 0x12, 0x23, 0x0a, 0x0d, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x73, 0x5f, 0x66,
0x69, 0x65, 0x6c, 0x64, 0x18, 0x03, 0x20, 0x03, 0x28, 0x01, 0x52, 0x0c, 0x64, 0x6f, 0x75, 0x62,
0x6c, 0x65, 0x73, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x66, 0x6c, 0x6f, 0x61,
0x74, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x02, 0x52, 0x0a, 0x66,
0x6c, 0x6f, 0x61, 0x74, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x66, 0x6c, 0x6f,
0x61, 0x74, 0x73, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x18, 0x05, 0x20, 0x03, 0x28, 0x02, 0x52,
0x0b, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x73, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x1f, 0x0a, 0x0b,
0x69, 0x6e, 0x74, 0x33, 0x32, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28,
0x05, 0x52, 0x0a, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x21, 0x0a,
0x0c, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x73, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x18, 0x07, 0x20,
0x03, 0x28, 0x05, 0x52, 0x0b, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x73, 0x46, 0x69, 0x65, 0x6c, 0x64,
0x12, 0x1f, 0x0a, 0x0b, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x18,
0x08, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x46, 0x69, 0x65, 0x6c,
0x64, 0x12, 0x21, 0x0a, 0x0c, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x73, 0x5f, 0x66, 0x69, 0x65, 0x6c,
0x64, 0x18, 0x09, 0x20, 0x03, 0x28, 0x03, 0x52, 0x0b, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x73, 0x46,
0x69, 0x65, 0x6c, 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x75, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x5f, 0x66,
0x69, 0x65, 0x6c, 0x64, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0b, 0x75, 0x69, 0x6e, 0x74,
0x33, 0x32, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x23, 0x0a, 0x0d, 0x75, 0x69, 0x6e, 0x74, 0x33,
0x32, 0x73, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x18, 0x0b, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x0c,
0x75, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x73, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x21, 0x0a, 0x0c,
0x75, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x18, 0x0c, 0x20, 0x01,
0x28, 0x04, 0x52, 0x0b, 0x75, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x12,
0x23, 0x0a, 0x0d, 0x75, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x73, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64,
0x18, 0x0d, 0x20, 0x03, 0x28, 0x04, 0x52, 0x0c, 0x75, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x73, 0x46,
0x69, 0x65, 0x6c, 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x5f, 0x66,
0x69, 0x65, 0x6c, 0x64, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x11, 0x52, 0x0b, 0x73, 0x69, 0x6e, 0x74,
0x33, 0x32, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x23, 0x0a, 0x0d, 0x73, 0x69, 0x6e, 0x74, 0x33,
0x32, 0x73, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x18, 0x0f, 0x20, 0x03, 0x28, 0x11, 0x52, 0x0c,
0x73, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x73, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x21, 0x0a, 0x0c,
0x73, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x18, 0x10, 0x20, 0x01,
0x28, 0x12, 0x52, 0x0b, 0x73, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x12,
0x23, 0x0a, 0x0d, 0x73, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x73, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64,
0x18, 0x11, 0x20, 0x03, 0x28, 0x12, 0x52, 0x0c, 0x73, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x73, 0x46,
0x69, 0x65, 0x6c, 0x64, 0x12, 0x23, 0x0a, 0x0d, 0x66, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x5f,
0x66, 0x69, 0x65, 0x6c, 0x64, 0x18, 0x12, 0x20, 0x01, 0x28, 0x07, 0x52, 0x0c, 0x66, 0x69, 0x78,
0x65, 0x64, 0x33, 0x32, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x25, 0x0a, 0x0e, 0x66, 0x69, 0x78,
0x65, 0x64, 0x33, 0x32, 0x73, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x18, 0x13, 0x20, 0x03, 0x28,
0x07, 0x52, 0x0d, 0x66, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x73, 0x46, 0x69, 0x65, 0x6c, 0x64,
0x12, 0x23, 0x0a, 0x0d, 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x5f, 0x66, 0x69, 0x65, 0x6c,
0x64, 0x18, 0x14, 0x20, 0x01, 0x28, 0x06, 0x52, 0x0c, 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34,
0x46, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x25, 0x0a, 0x0e, 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34,
0x73, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x18, 0x15, 0x20, 0x03, 0x28, 0x06, 0x52, 0x0d, 0x66,
0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x73, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x25, 0x0a, 0x0e,
0x73, 0x66, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x18, 0x16,
0x20, 0x01, 0x28, 0x0f, 0x52, 0x0d, 0x73, 0x66, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x46, 0x69,
0x65, 0x6c, 0x64, 0x12, 0x27, 0x0a, 0x0f, 0x73, 0x66, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x73,
0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x18, 0x17, 0x20, 0x03, 0x28, 0x0f, 0x52, 0x0e, 0x73, 0x66,
0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x73, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x25, 0x0a, 0x0e,
0x73, 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x18, 0x18,
0x20, 0x01, 0x28, 0x10, 0x52, 0x0d, 0x73, 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x46, 0x69,
0x65, 0x6c, 0x64, 0x12, 0x27, 0x0a, 0x0f, 0x73, 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x73,
0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x18, 0x19, 0x20, 0x03, 0x28, 0x10, 0x52, 0x0e, 0x73, 0x66,
0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x73, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x1d, 0x0a, 0x0a,
0x62, 0x6f, 0x6f, 0x6c, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x18, 0x1a, 0x20, 0x01, 0x28, 0x08,
0x52, 0x09, 0x62, 0x6f, 0x6f, 0x6c, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x62,
0x6f, 0x6f, 0x6c, 0x73, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x18, 0x1b, 0x20, 0x03, 0x28, 0x08,
0x52, 0x0a, 0x62, 0x6f, 0x6f, 0x6c, 0x73, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x21, 0x0a, 0x0c,
0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x18, 0x1c, 0x20, 0x01,
0x28, 0x09, 0x52, 0x0b, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x12,
0x23, 0x0a, 0x0d, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x73, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64,
0x18, 0x1d, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0c, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x73, 0x46,
0x69, 0x65, 0x6c, 0x64, 0x12, 0x2a, 0x0a, 0x11, 0x62, 0x79, 0x74, 0x65, 0x5f, 0x73, 0x74, 0x72,
0x69, 0x6e, 0x67, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x18, 0x1e, 0x20, 0x01, 0x28, 0x0c, 0x52,
0x0f, 0x62, 0x79, 0x74, 0x65, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x46, 0x69, 0x65, 0x6c, 0x64,
0x12, 0x2c, 0x0a, 0x12, 0x62, 0x79, 0x74, 0x65, 0x5f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x73,
0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x18, 0x1f, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x10, 0x62, 0x79,
0x74, 0x65, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x73, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x33,
0x0a, 0x0a, 0x65, 0x6e, 0x75, 0x6d, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x18, 0x20, 0x20, 0x01,
0x28, 0x0e, 0x32, 0x14, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2e, 0x43, 0x6f, 0x6e,
0x74, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x09, 0x65, 0x6e, 0x75, 0x6d, 0x46, 0x69,
0x65, 0x6c, 0x64, 0x12, 0x35, 0x0a, 0x0b, 0x65, 0x6e, 0x75, 0x6d, 0x73, 0x5f, 0x66, 0x69, 0x65,
0x6c, 0x64, 0x18, 0x21, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x14, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x65,
0x6e, 0x74, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0a,
0x65, 0x6e, 0x75, 0x6d, 0x73, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x65, 0x6e,
0x76, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x18, 0x22, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x65,
0x6e, 0x76, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x65, 0x6e, 0x76, 0x73, 0x5f,
0x66, 0x69, 0x65, 0x6c, 0x64, 0x18, 0x23, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x65, 0x6e, 0x76,
0x73, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x35, 0x0a, 0x0d, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67,
0x65, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x18, 0x24, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e,
0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x52,
0x0c, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x37, 0x0a,
0x0e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x18,
0x25, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2e,
0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x52, 0x0d, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65,
0x73, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x2a, 0x49, 0x0a, 0x0b, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e,
0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x12, 0x0a, 0x0e, 0x43, 0x4f, 0x4e, 0x54, 0x45, 0x4e, 0x54,
0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x31, 0x10, 0x00, 0x12, 0x12, 0x0a, 0x0e, 0x43, 0x4f, 0x4e,
0x54, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x32, 0x10, 0x01, 0x12, 0x12, 0x0a,
0x0e, 0x43, 0x4f, 0x4e, 0x54, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x33, 0x10,
0x02, 0x32, 0x59, 0x0a, 0x0e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x53, 0x65, 0x72, 0x76,
0x69, 0x63, 0x65, 0x12, 0x47, 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e,
0x74, 0x12, 0x1a, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2e, 0x47, 0x65, 0x74, 0x43,
0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e,
0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x65,
0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x70, 0x0a, 0x0b,
0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x42, 0x0c, 0x43, 0x6f, 0x6e,
0x74, 0x65, 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x17, 0x65, 0x78, 0x61,
0x6d, 0x70, 0x6c, 0x65, 0x2f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x3b, 0x63, 0x6f, 0x6e,
0x74, 0x65, 0x6e, 0x74, 0xa2, 0x02, 0x03, 0x43, 0x58, 0x58, 0xaa, 0x02, 0x07, 0x43, 0x6f, 0x6e,
0x74, 0x65, 0x6e, 0x74, 0xca, 0x02, 0x07, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0xe2, 0x02,
0x13, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61,
0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x07, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x62, 0x06,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_content_content_proto_rawDescOnce sync.Once
file_content_content_proto_rawDescData = file_content_content_proto_rawDesc
)
func file_content_content_proto_rawDescGZIP() []byte {
file_content_content_proto_rawDescOnce.Do(func() {
file_content_content_proto_rawDescData = protoimpl.X.CompressGZIP(file_content_content_proto_rawDescData)
})
return file_content_content_proto_rawDescData
}
var file_content_content_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
var file_content_content_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
var file_content_content_proto_goTypes = []interface{}{
(ContentType)(0), // 0: content.ContentType
(*GetContentRequest)(nil), // 1: content.GetContentRequest
(*GetContentResponse)(nil), // 2: content.GetContentResponse
(*Content)(nil), // 3: content.Content
}
var file_content_content_proto_depIdxs = []int32{
0, // 0: content.GetContentRequest.enum_field:type_name -> content.ContentType
0, // 1: content.GetContentRequest.enums_field:type_name -> content.ContentType
3, // 2: content.GetContentRequest.message_field:type_name -> content.Content
3, // 3: content.GetContentRequest.messages_field:type_name -> content.Content
3, // 4: content.GetContentResponse.content:type_name -> content.Content
0, // 5: content.Content.enum_field:type_name -> content.ContentType
0, // 6: content.Content.enums_field:type_name -> content.ContentType
3, // 7: content.Content.message_field:type_name -> content.Content
3, // 8: content.Content.messages_field:type_name -> content.Content
1, // 9: content.ContentService.GetContent:input_type -> content.GetContentRequest
2, // 10: content.ContentService.GetContent:output_type -> content.GetContentResponse
10, // [10:11] is the sub-list for method output_type
9, // [9:10] is the sub-list for method input_type
9, // [9:9] is the sub-list for extension type_name
9, // [9:9] is the sub-list for extension extendee
0, // [0:9] is the sub-list for field type_name
}
func init() { file_content_content_proto_init() }
func file_content_content_proto_init() {
if File_content_content_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_content_content_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetContentRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_content_content_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetContentResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_content_content_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Content); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_content_content_proto_rawDesc,
NumEnums: 1,
NumMessages: 3,
NumExtensions: 0,
NumServices: 1,
},
GoTypes: file_content_content_proto_goTypes,
DependencyIndexes: file_content_content_proto_depIdxs,
EnumInfos: file_content_content_proto_enumTypes,
MessageInfos: file_content_content_proto_msgTypes,
}.Build()
File_content_content_proto = out.File
file_content_content_proto_rawDesc = nil
file_content_content_proto_goTypes = nil
file_content_content_proto_depIdxs = nil
}
================================================
FILE: _examples/08_literal/content/content_grpc.pb.go
================================================
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.3.0
// - protoc (unknown)
// source: content/content.proto
package content
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 (
ContentService_GetContent_FullMethodName = "/content.ContentService/GetContent"
)
// ContentServiceClient is the client API for ContentService 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 ContentServiceClient interface {
GetContent(ctx context.Context, in *GetContentRequest, opts ...grpc.CallOption) (*GetContentResponse, error)
}
type contentServiceClient struct {
cc grpc.ClientConnInterface
}
func NewContentServiceClient(cc grpc.ClientConnInterface) ContentServiceClient {
return &contentServiceClient{cc}
}
func (c *contentServiceClient) GetContent(ctx context.Context, in *GetContentRequest, opts ...grpc.CallOption) (*GetContentResponse, error) {
out := new(GetContentResponse)
err := c.cc.Invoke(ctx, ContentService_GetContent_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// ContentServiceServer is the server API for ContentService service.
// All implementations must embed UnimplementedContentServiceServer
// for forward compatibility
type ContentServiceServer interface {
GetContent(context.Context, *GetContentRequest) (*GetContentResponse, error)
mustEmbedUnimplementedContentServiceServer()
}
// UnimplementedContentServiceServer must be embedded to have forward compatible implementations.
type UnimplementedContentServiceServer struct {
}
func (UnimplementedContentServiceServer) GetContent(context.Context, *GetContentRequest) (*GetContentResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetContent not implemented")
}
func (UnimplementedContentServiceServer) mustEmbedUnimplementedContentServiceServer() {}
// UnsafeContentServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to ContentServiceServer will
// result in compilation errors.
type UnsafeContentServiceServer interface {
mustEmbedUnimplementedContentServiceServer()
}
func RegisterContentServiceServer(s grpc.ServiceRegistrar, srv ContentServiceServer) {
s.RegisterService(&ContentService_ServiceDesc, srv)
}
func _ContentService_GetContent_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetContentRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ContentServiceServer).GetContent(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: ContentService_GetContent_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ContentServiceServer).GetContent(ctx, req.(*GetContentRequest))
}
return interceptor(ctx, in, info, handler)
}
// ContentService_ServiceDesc is the grpc.ServiceDesc for ContentService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var ContentService_ServiceDesc = grpc.ServiceDesc{
ServiceName: "content.ContentService",
HandlerType: (*ContentServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "GetContent",
Handler: _ContentService_GetContent_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "content/content.proto",
}
================================================
FILE: _examples/08_literal/federation/federation.pb.go
================================================
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.33.0
// protoc (unknown)
// source: federation/federation.proto
package federation
import (
_ "github.com/mercari/grpc-federation/grpc/federation"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
type ContentType int32
const (
ContentType_CONTENT_TYPE_1 ContentType = 0
ContentType_CONTENT_TYPE_2 ContentType = 1
ContentType_CONTENT_TYPE_3 ContentType = 2
)
// Enum value maps for ContentType.
var (
ContentType_name = map[int32]string{
0: "CONTENT_TYPE_1",
1: "CONTENT_TYPE_2",
2: "CONTENT_TYPE_3",
}
ContentType_value = map[string]int32{
"CONTENT_TYPE_1": 0,
"CONTENT_TYPE_2": 1,
"CONTENT_TYPE_3": 2,
}
)
func (x ContentType) Enum() *ContentType {
p := new(ContentType)
*p = x
return p
}
func (x ContentType) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (ContentType) Descriptor() protoreflect.EnumDescriptor {
return file_federation_federation_proto_enumTypes[0].Descriptor()
}
func (ContentType) Type() protoreflect.EnumType {
return &file_federation_federation_proto_enumTypes[0]
}
func (x ContentType) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use ContentType.Descriptor instead.
func (ContentType) EnumDescriptor() ([]byte, []int) {
return file_federation_federation_proto_rawDescGZIP(), []int{0}
}
type GetRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
}
func (x *GetRequest) Reset() {
*x = GetRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_federation_federation_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GetRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetRequest) ProtoMessage() {}
func (x *GetRequest) ProtoReflect() protoreflect.Message {
mi := &file_federation_federation_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GetRequest.ProtoReflect.Descriptor instead.
func (*GetRequest) Descriptor() ([]byte, []int) {
return file_federation_federation_proto_rawDescGZIP(), []int{0}
}
func (x *GetRequest) GetId() string {
if x != nil {
return x.Id
}
return ""
}
type GetResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Content *Content `protobuf:"bytes,1,opt,name=content,proto3" json:"content,omitempty"`
CelExpr int64 `protobuf:"varint,2,opt,name=cel_expr,json=celExpr,proto3" json:"cel_expr,omitempty"`
}
func (x *GetResponse) Reset() {
*x = GetResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_federation_federation_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GetResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetResponse) ProtoMessage() {}
func (x *GetResponse) ProtoReflect() protoreflect.Message {
mi := &file_federation_federation_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GetResponse.ProtoReflect.Descriptor instead.
func (*GetResponse) Descriptor() ([]byte, []int) {
return file_federation_federation_proto_rawDescGZIP(), []int{1}
}
func (x *GetResponse) GetContent() *Content {
if x != nil {
return x.Content
}
return nil
}
func (x *GetResponse) GetCelExpr() int64 {
if x != nil {
return x.CelExpr
}
return 0
}
type Content struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
ByField string `protobuf:"bytes,1,opt,name=by_field,json=byField,proto3" json:"by_field,omitempty"`
DoubleField float64 `protobuf:"fixed64,2,opt,name=double_field,json=doubleField,proto3" json:"double_field,omitempty"`
DoublesField []float64 `protobuf:"fixed64,3,rep,packed,name=doubles_field,json=doublesField,proto3" json:"doubles_field,omitempty"`
FloatField float32 `protobuf:"fixed32,4,opt,name=float_field,json=floatField,proto3" json:"float_field,omitempty"`
FloatsField []float32 `protobuf:"fixed32,5,rep,packed,name=floats_field,json=floatsField,proto3" json:"floats_field,omitempty"`
Int32Field int32 `protobuf:"varint,6,opt,name=int32_field,json=int32Field,proto3" json:"int32_field,omitempty"`
Int32SField []int32 `protobuf:"varint,7,rep,packed,name=int32s_field,json=int32sField,proto3" json:"int32s_field,omitempty"`
Int64Field int64 `protobuf:"varint,8,opt,name=int64_field,json=int64Field,proto3" json:"int64_field,omitempty"`
Int64SField []int64 `protobuf:"varint,9,rep,packed,name=int64s_field,json=int64sField,proto3" json:"int64s_field,omitempty"`
Uint32Field uint32 `protobuf:"varint,10,opt,name=uint32_field,json=uint32Field,proto3" json:"uint32_field,omitempty"`
Uint32SField []uint32 `protobuf:"varint,11,rep,packed,name=uint32s_field,json=uint32sField,proto3" json:"uint32s_field,omitempty"`
Uint64Field uint64 `protobuf:"varint,12,opt,name=uint64_field,json=uint64Field,proto3" json:"uint64_field,omitempty"`
Uint64SField []uint64 `protobuf:"varint,13,rep,packed,name=uint64s_field,json=uint64sField,proto3" json:"uint64s_field,omitempty"`
Sint32Field int32 `protobuf:"zigzag32,14,opt,name=sint32_field,json=sint32Field,proto3" json:"sint32_field,omitempty"`
Sint32SField []int32 `protobuf:"zigzag32,15,rep,packed,name=sint32s_field,json=sint32sField,proto3" json:"sint32s_field,omitempty"`
Sint64Field int64 `protobuf:"zigzag64,16,opt,name=sint64_field,json=sint64Field,proto3" json:"sint64_field,omitempty"`
Sint64SField []int64 `protobuf:"zigzag64,17,rep,packed,name=sint64s_field,json=sint64sField,proto3" json:"sint64s_field,omitempty"`
Fixed32Field uint32 `protobuf:"fixed32,18,opt,name=fixed32_field,json=fixed32Field,proto3" json:"fixed32_field,omitempty"`
Fixed32SField []uint32 `protobuf:"fixed32,19,rep,packed,name=fixed32s_field,json=fixed32sField,proto3" json:"fixed32s_field,omitempty"`
Fixed64Field uint64 `protobuf:"fixed64,20,opt,name=fixed64_field,json=fixed64Field,proto3" json:"fixed64_field,omitempty"`
Fixed64SField []uint64 `protobuf:"fixed64,21,rep,packed,name=fixed64s_field,json=fixed64sField,proto3" json:"fixed64s_field,omitempty"`
Sfixed32Field int32 `protobuf:"fixed32,22,opt,name=sfixed32_field,json=sfixed32Field,proto3" json:"sfixed32_field,omitempty"`
Sfixed32SField []int32 `protobuf:"fixed32,23,rep,packed,name=sfixed32s_field,json=sfixed32sField,proto3" json:"sfixed32s_field,omitempty"`
Sfixed64Field int64 `protobuf:"fixed64,24,opt,name=sfixed64_field,json=sfixed64Field,proto3" json:"sfixed64_field,omitempty"`
Sfixed64SField []int64 `protobuf:"fixed64,25,rep,packed,name=sfixed64s_field,json=sfixed64sField,proto3" json:"sfixed64s_field,omitempty"`
BoolField bool `protobuf:"varint,26,opt,name=bool_field,json=boolField,proto3" json:"bool_field,omitempty"`
BoolsField []bool `protobuf:"varint,27,rep,packed,name=bools_field,json=boolsField,proto3" json:"bools_field,omitempty"`
StringField string `protobuf:"bytes,28,opt,name=string_field,json=stringField,proto3" json:"string_field,omitempty"`
StringsField []string `protobuf:"bytes,29,rep,name=strings_field,json=stringsField,proto3" json:"strings_field,omitempty"`
ByteStringField []byte `protobuf:"bytes,30,opt,name=byte_string_field,json=byteStringField,proto3" json:"byte_string_field,omitempty"`
ByteStringsField [][]byte `protobuf:"bytes,31,rep,name=byte_strings_field,json=byteStringsField,proto3" json:"byte_strings_field,omitempty"`
EnumField ContentType `protobuf:"varint,32,opt,name=enum_field,json=enumField,proto3,enum=org.federation.ContentType" json:"enum_field,omitempty"`
EnumsField []ContentType `protobuf:"varint,33,rep,packed,name=enums_field,json=enumsField,proto3,enum=org.federation.ContentType" json:"enums_field,omitempty"`
EnvField string `protobuf:"bytes,34,opt,name=env_field,json=envField,proto3" json:"env_field,omitempty"`
EnvsField []string `protobuf:"bytes,35,rep,name=envs_field,json=envsField,proto3" json:"envs_field,omitempty"`
MessageField *Content `protobuf:"bytes,36,opt,name=message_field,json=messageField,proto3" json:"message_field,omitempty"`
MessagesField []*Content `protobuf:"bytes,37,rep,name=messages_field,json=messagesField,proto3" json:"messages_field,omitempty"`
}
func (x *Content) Reset() {
*x = Content{}
if protoimpl.UnsafeEnabled {
mi := &file_federation_federation_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Content) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Content) ProtoMessage() {}
func (x *Content) ProtoReflect() protoreflect.Message {
mi := &file_federation_federation_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Content.ProtoReflect.Descriptor instead.
func (*Content) Descriptor() ([]byte, []int) {
return file_federation_federation_proto_rawDescGZIP(), []int{2}
}
func (x *Content) GetByField() string {
if x != nil {
return x.ByField
}
return ""
}
func (x *Content) GetDoubleField() float64 {
if x != nil {
return x.DoubleField
}
return 0
}
func (x *Content) GetDoublesField() []float64 {
if x != nil {
return x.DoublesField
}
return nil
}
func (x *Content) GetFloatField() float32 {
if x != nil {
return x.FloatField
}
return 0
}
func (x *Content) GetFloatsField() []float32 {
if x != nil {
return x.FloatsField
}
return nil
}
func (x *Content) GetInt32Field() int32 {
if x != nil {
return x.Int32Field
}
return 0
}
func (x *Content) GetInt32SField() []int32 {
if x != nil {
return x.Int32SField
}
return nil
}
func (x *Content) GetInt64Field() int64 {
if x != nil {
return x.Int64Field
}
return 0
}
func (x *Content) GetInt64SField() []int64 {
if x != nil {
return x.Int64SField
}
return nil
}
func (x *Content) GetUint32Field() uint32 {
if x != nil {
return x.Uint32Field
}
return 0
}
func (x *Content) GetUint32SField() []uint32 {
if x != nil {
return x.Uint32SField
}
return nil
}
func (x *Content) GetUint64Field() uint64 {
if x != nil {
return x.Uint64Field
}
return 0
}
func (x *Content) GetUint64SField() []uint64 {
if x != nil {
return x.Uint64SField
}
return nil
}
func (x *Content) GetSint32Field() int32 {
if x != nil {
return x.Sint32Field
}
return 0
}
func (x *Content) GetSint32SField() []int32 {
if x != nil {
return x.Sint32SField
}
return nil
}
func (x *Content) GetSint64Field() int64 {
if x != nil {
return x.Sint64Field
}
return 0
}
func (x *Content) GetSint64SField() []int64 {
if x != nil {
return x.Sint64SField
}
return nil
}
func (x *Content) GetFixed32Field() uint32 {
if x != nil {
return x.Fixed32Field
}
return 0
}
func (x *Content) GetFixed32SField() []uint32 {
if x != nil {
return x.Fixed32SField
}
return nil
}
func (x *Content) GetFixed64Field() uint64 {
if x != nil {
return x.Fixed64Field
}
return 0
}
func (x *Content) GetFixed64SField() []uint64 {
if x != nil {
return x.Fixed64SField
}
return nil
}
func (x *Content) GetSfixed32Field() int32 {
if x != nil {
return x.Sfixed32Field
}
return 0
}
func (x *Content) GetSfixed32SField() []int32 {
if x != nil {
return x.Sfixed32SField
}
return nil
}
func (x *Content) GetSfixed64Field() int64 {
if x != nil {
return x.Sfixed64Field
}
return 0
}
func (x *Content) GetSfixed64SField() []int64 {
if x != nil {
return x.Sfixed64SField
}
return nil
}
func (x *Content) GetBoolField() bool {
if x != nil {
return x.BoolField
}
return false
}
func (x *Content) GetBoolsField() []bool {
if x != nil {
return x.BoolsField
}
return nil
}
func (x *Content) GetStringField() string {
if x != nil {
return x.StringField
}
return ""
}
func (x *Content) GetStringsField() []string {
if x != nil {
return x.StringsField
}
return nil
}
func (x *Content) GetByteStringField() []byte {
if x != nil {
return x.ByteStringField
}
return nil
}
func (x *Content) GetByteStringsField() [][]byte {
if x != nil {
return x.ByteStringsField
}
return nil
}
func (x *Content) GetEnumField() ContentType {
if x != nil {
return x.EnumField
}
return ContentType_CONTENT_TYPE_1
}
func (x *Content) GetEnumsField() []ContentType {
if x != nil {
return x.EnumsField
}
return nil
}
func (x *Content) GetEnvField() string {
if x != nil {
return x.EnvField
}
return ""
}
func (x *Content) GetEnvsField() []string {
if x != nil {
return x.EnvsField
}
return nil
}
func (x *Content) GetMessageField() *Content {
if x != nil {
return x.MessageField
}
return nil
}
func (x *Content) GetMessagesField() []*Content {
if x != nil {
return x.MessagesField
}
return nil
}
var File_federation_federation_proto protoreflect.FileDescriptor
var file_federation_federation_proto_rawDesc = []byte{
0x0a, 0x1b, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x66, 0x65, 0x64,
0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0e, 0x6f,
0x72, 0x67, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x20, 0x67,
0x72, 0x70, 0x63, 0x2f, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x66,
0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22,
0x1c, 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a,
0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x99, 0x0a,
0x0a, 0x0b, 0x47, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3f, 0x0a,
0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17,
0x2e, 0x6f, 0x72, 0x67, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e,
0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x42, 0x0c, 0x9a, 0x4a, 0x09, 0x12, 0x07, 0x63, 0x6f,
0x6e, 0x74, 0x65, 0x6e, 0x74, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, 0x4a,
0x0a, 0x08, 0x63, 0x65, 0x6c, 0x5f, 0x65, 0x78, 0x70, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03,
0x42, 0x2f, 0x9a, 0x4a, 0x2c, 0x12, 0x2a, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2e, 0x69,
0x6e, 0x74, 0x33, 0x32, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x20, 0x2b, 0x20, 0x63, 0x6f, 0x6e,
0x74, 0x65, 0x6e, 0x74, 0x2e, 0x73, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x5f, 0x66, 0x69, 0x65, 0x6c,
0x64, 0x52, 0x07, 0x63, 0x65, 0x6c, 0x45, 0x78, 0x70, 0x72, 0x3a, 0xfc, 0x08, 0x9a, 0x4a, 0xf8,
0x08, 0x0a, 0xdd, 0x08, 0x0a, 0x03, 0x72, 0x65, 0x73, 0x72, 0xd5, 0x08, 0x0a, 0x21, 0x63, 0x6f,
0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x53, 0x65, 0x72,
0x76, 0x69, 0x63, 0x65, 0x2f, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12,
0x10, 0x0a, 0x08, 0x62, 0x79, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x04, 0x24, 0x2e, 0x69,
0x64, 0x12, 0x14, 0x0a, 0x0c, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x5f, 0x66, 0x69, 0x65, 0x6c,
0x64, 0x12, 0x04, 0x31, 0x2e, 0x32, 0x33, 0x12, 0x1d, 0x0a, 0x0d, 0x64, 0x6f, 0x75, 0x62, 0x6c,
0x65, 0x73, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x0c, 0x5b, 0x34, 0x2e, 0x35, 0x36, 0x2c,
0x20, 0x37, 0x2e, 0x38, 0x39, 0x5d, 0x12, 0x13, 0x0a, 0x0b, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x5f,
0x66, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x04, 0x34, 0x2e, 0x35, 0x36, 0x12, 0x1c, 0x0a, 0x0c, 0x66,
0x6c, 0x6f, 0x61, 0x74, 0x73, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x0c, 0x5b, 0x37, 0x2e,
0x38, 0x39, 0x2c, 0x20, 0x31, 0x2e, 0x32, 0x33, 0x5d, 0x12, 0x11, 0x0a, 0x0b, 0x69, 0x6e, 0x74,
0x33, 0x32, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x02, 0x2d, 0x31, 0x12, 0x18, 0x0a, 0x0c,
0x69, 0x6e, 0x74, 0x33, 0x32, 0x73, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x08, 0x5b, 0x2d,
0x32, 0x2c, 0x20, 0x2d, 0x33, 0x5d, 0x12, 0x11, 0x0a, 0x0b, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x5f,
0x66, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x02, 0x2d, 0x34, 0x12, 0x18, 0x0a, 0x0c, 0x69, 0x6e, 0x74,
0x36, 0x34, 0x73, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x08, 0x5b, 0x2d, 0x35, 0x2c, 0x20,
0x2d, 0x36, 0x5d, 0x12, 0x12, 0x0a, 0x0c, 0x75, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x5f, 0x66, 0x69,
0x65, 0x6c, 0x64, 0x12, 0x02, 0x31, 0x75, 0x12, 0x19, 0x0a, 0x0d, 0x75, 0x69, 0x6e, 0x74, 0x33,
0x32, 0x73, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x08, 0x5b, 0x32, 0x75, 0x2c, 0x20, 0x33,
0x75, 0x5d, 0x12, 0x12, 0x0a, 0x0c, 0x75, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x5f, 0x66, 0x69, 0x65,
0x6c, 0x64, 0x12, 0x02, 0x34, 0x75, 0x12, 0x19, 0x0a, 0x0d, 0x75, 0x69, 0x6e, 0x74, 0x36, 0x34,
0x73, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x08, 0x5b, 0x35, 0x75, 0x2c, 0x20, 0x36, 0x75,
0x5d, 0x12, 0x12, 0x0a, 0x0c, 0x73, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x5f, 0x66, 0x69, 0x65, 0x6c,
0x64, 0x12, 0x02, 0x2d, 0x37, 0x12, 0x19, 0x0a, 0x0d, 0x73, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x73,
0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x08, 0x5b, 0x2d, 0x38, 0x2c, 0x20, 0x2d, 0x39, 0x5d,
0x12, 0x13, 0x0a, 0x0c, 0x73, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64,
0x12, 0x03, 0x2d, 0x31, 0x30, 0x12, 0x1b, 0x0a, 0x0d, 0x73, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x73,
0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x0a, 0x5b, 0x2d, 0x31, 0x31, 0x2c, 0x20, 0x2d, 0x31,
0x32, 0x5d, 0x12, 0x14, 0x0a, 0x0d, 0x66, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x5f, 0x66, 0x69,
0x65, 0x6c, 0x64, 0x12, 0x03, 0x31, 0x30, 0x75, 0x12, 0x1c, 0x0a, 0x0e, 0x66, 0x69, 0x78, 0x65,
0x64, 0x33, 0x32, 0x73, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x0a, 0x5b, 0x31, 0x31, 0x75,
0x2c, 0x20, 0x31, 0x32, 0x75, 0x5d, 0x12, 0x14, 0x0a, 0x0d, 0x66, 0x69, 0x78, 0x65, 0x64, 0x36,
0x34, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x03, 0x31, 0x33, 0x75, 0x12, 0x1c, 0x0a, 0x0e,
0x66, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x73, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x0a,
0x5b, 0x31, 0x34, 0x75, 0x2c, 0x20, 0x31, 0x35, 0x75, 0x5d, 0x12, 0x15, 0x0a, 0x0e, 0x73, 0x66,
0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x03, 0x2d, 0x31,
0x34, 0x12, 0x1d, 0x0a, 0x0f, 0x73, 0x66, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x73, 0x5f, 0x66,
0x69, 0x65, 0x6c, 0x64, 0x12, 0x0a, 0x5b, 0x2d, 0x31, 0x35, 0x2c, 0x20, 0x2d, 0x31, 0x36, 0x5d,
0x12, 0x15, 0x0a, 0x0e, 0x73, 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x5f, 0x66, 0x69, 0x65,
0x6c, 0x64, 0x12, 0x03, 0x2d, 0x31, 0x37, 0x12, 0x1d, 0x0a, 0x0f, 0x73, 0x66, 0x69, 0x78, 0x65,
0x64, 0x36, 0x34, 0x73, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x0a, 0x5b, 0x2d, 0x31, 0x38,
0x2c, 0x20, 0x2d, 0x31, 0x39, 0x5d, 0x12, 0x12, 0x0a, 0x0a, 0x62, 0x6f, 0x6f, 0x6c, 0x5f, 0x66,
0x69, 0x65, 0x6c, 0x64, 0x12, 0x04, 0x74, 0x72, 0x75, 0x65, 0x12, 0x1c, 0x0a, 0x0b, 0x62, 0x6f,
0x6f, 0x6c, 0x73, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x0d, 0x5b, 0x74, 0x72, 0x75, 0x65,
0x2c, 0x20, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x5d, 0x12, 0x15, 0x0a, 0x0c, 0x73, 0x74, 0x72, 0x69,
0x6e, 0x67, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x05, 0x27, 0x66, 0x6f, 0x6f, 0x27, 0x12,
0x23, 0x0a, 0x0d, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x73, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64,
0x12, 0x12, 0x5b, 0x27, 0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x27, 0x2c, 0x20, 0x27, 0x77, 0x6f, 0x72,
0x6c, 0x64, 0x27, 0x5d, 0x12, 0x1b, 0x0a, 0x11, 0x62, 0x79, 0x74, 0x65, 0x5f, 0x73, 0x74, 0x72,
0x69, 0x6e, 0x67, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x06, 0x62, 0x27, 0x66, 0x6f, 0x6f,
0x27, 0x12, 0x26, 0x0a, 0x12, 0x62, 0x79, 0x74, 0x65, 0x5f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67,
0x73, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x10, 0x5b, 0x62, 0x27, 0x66, 0x6f, 0x6f, 0x27,
0x2c, 0x20, 0x62, 0x27, 0x62, 0x61, 0x72, 0x27, 0x5d, 0x12, 0x30, 0x0a, 0x0a, 0x65, 0x6e, 0x75,
0x6d, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x22, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74,
0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x2e, 0x43, 0x4f, 0x4e,
0x54, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x31, 0x12, 0x57, 0x0a, 0x0b, 0x65,
0x6e, 0x75, 0x6d, 0x73, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x48, 0x5b, 0x63, 0x6f, 0x6e,
0x74, 0x65, 0x6e, 0x74, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65,
0x2e, 0x43, 0x4f, 0x4e, 0x54, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x32, 0x2c,
0x20, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74,
0x54, 0x79, 0x70, 0x65, 0x2e, 0x43, 0x4f, 0x4e, 0x54, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50,
0x45, 0x5f, 0x33, 0x5d, 0x12, 0x51, 0x0a, 0x0d, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f,
0x66, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x40, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2e, 0x43,
0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x7b, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x5f, 0x66, 0x69,
0x65, 0x6c, 0x64, 0x3a, 0x20, 0x31, 0x2e, 0x32, 0x33, 0x2c, 0x20, 0x64, 0x6f, 0x75, 0x62, 0x6c,
0x65, 0x73, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x3a, 0x20, 0x5b, 0x34, 0x2e, 0x35, 0x36, 0x2c,
0x20, 0x37, 0x2e, 0x38, 0x39, 0x5d, 0x7d, 0x12, 0x38, 0x0a, 0x0e, 0x6d, 0x65, 0x73, 0x73, 0x61,
0x67, 0x65, 0x73, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x26, 0x5b, 0x63, 0x6f, 0x6e, 0x74,
0x65, 0x6e, 0x74, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x7b, 0x7d, 0x2c, 0x20, 0x63,
0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x7b, 0x7d,
0x5d, 0x0a, 0x16, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x5a, 0x0b, 0x72, 0x65,
0x73, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x22, 0xbc, 0x0b, 0x0a, 0x07, 0x43, 0x6f,
0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x62, 0x79, 0x5f, 0x66, 0x69, 0x65, 0x6c,
0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x62, 0x79, 0x46, 0x69, 0x65, 0x6c, 0x64,
0x12, 0x21, 0x0a, 0x0c, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64,
0x18, 0x02, 0x20, 0x01, 0x28, 0x01, 0x52, 0x0b, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x46, 0x69,
0x65, 0x6c, 0x64, 0x12, 0x23, 0x0a, 0x0d, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x73, 0x5f, 0x66,
0x69, 0x65, 0x6c, 0x64, 0x18, 0x03, 0x20, 0x03, 0x28, 0x01, 0x52, 0x0c, 0x64, 0x6f, 0x75, 0x62,
0x6c, 0x65, 0x73, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x66, 0x6c, 0x6f, 0x61,
0x74, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x02, 0x52, 0x0a, 0x66,
0x6c, 0x6f, 0x61, 0x74, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x66, 0x6c, 0x6f,
0x61, 0x74, 0x73, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x18, 0x05, 0x20, 0x03, 0x28, 0x02, 0x52,
0x0b, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x73, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x1f, 0x0a, 0x0b,
0x69, 0x6e, 0x74, 0x33, 0x32, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28,
0x05, 0x52, 0x0a, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x21, 0x0a,
0x0c, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x73, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x18, 0x07, 0x20,
0x03, 0x28, 0x05, 0x52, 0x0b, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x73, 0x46, 0x69, 0x65, 0x6c, 0x64,
0x12, 0x1f, 0x0a, 0x0b, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x18,
0x08, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x46, 0x69, 0x65, 0x6c,
0x64, 0x12, 0x21, 0x0a, 0x0c, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x73, 0x5f, 0x66, 0x69, 0x65, 0x6c,
0x64, 0x18, 0x09, 0x20, 0x03, 0x28, 0x03, 0x52, 0x0b, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x73, 0x46,
0x69, 0x65, 0x6c, 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x75, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x5f, 0x66,
0x69, 0x65, 0x6c, 0x64, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0b, 0x75, 0x69, 0x6e, 0x74,
0x33, 0x32, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x23, 0x0a, 0x0d, 0x75, 0x69, 0x6e, 0x74, 0x33,
0x32, 0x73, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x18, 0x0b, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x0c,
0x75, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x73, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x21, 0x0a, 0x0c,
0x75, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x18, 0x0c, 0x20, 0x01,
0x28, 0x04, 0x52, 0x0b, 0x75, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x12,
0x23, 0x0a, 0x0d, 0x75, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x73, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64,
0x18, 0x0d, 0x20, 0x03, 0x28, 0x04, 0x52, 0x0c, 0x75, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x73, 0x46,
0x69, 0x65, 0x6c, 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x5f, 0x66,
0x69, 0x65, 0x6c, 0x64, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x11, 0x52, 0x0b, 0x73, 0x69, 0x6e, 0x74,
0x33, 0x32, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x23, 0x0a, 0x0d, 0x73, 0x69, 0x6e, 0x74, 0x33,
0x32, 0x73, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x18, 0x0f, 0x20, 0x03, 0x28, 0x11, 0x52, 0x0c,
0x73, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x73, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x21, 0x0a, 0x0c,
0x73, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x18, 0x10, 0x20, 0x01,
0x28, 0x12, 0x52, 0x0b, 0x73, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x12,
0x23, 0x0a, 0x0d, 0x73, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x73, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64,
0x18, 0x11, 0x20, 0x03, 0x28, 0x12, 0x52, 0x0c, 0x73, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x73, 0x46,
0x69, 0x65, 0x6c, 0x64, 0x12, 0x23, 0x0a, 0x0d, 0x66, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x5f,
0x66, 0x69, 0x65, 0x6c, 0x64, 0x18, 0x12, 0x20, 0x01, 0x28, 0x07, 0x52, 0x0c, 0x66, 0x69, 0x78,
0x65, 0x64, 0x33, 0x32, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x25, 0x0a, 0x0e, 0x66, 0x69, 0x78,
0x65, 0x64, 0x33, 0x32, 0x73, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x18, 0x13, 0x20, 0x03, 0x28,
0x07, 0x52, 0x0d, 0x66, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x73, 0x46, 0x69, 0x65, 0x6c, 0x64,
0x12, 0x23, 0x0a, 0x0d, 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x5f, 0x66, 0x69, 0x65, 0x6c,
0x64, 0x18, 0x14, 0x20, 0x01, 0x28, 0x06, 0x52, 0x0c, 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34,
0x46, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x25, 0x0a, 0x0e, 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34,
0x73, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x18, 0x15, 0x20, 0x03, 0x28, 0x06, 0x52, 0x0d, 0x66,
0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x73, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x25, 0x0a, 0x0e,
0x73, 0x66, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x18, 0x16,
0x20, 0x01, 0x28, 0x0f, 0x52, 0x0d, 0x73, 0x66, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x46, 0x69,
0x65, 0x6c, 0x64, 0x12, 0x27, 0x0a, 0x0f, 0x73, 0x66, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x73,
0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x18, 0x17, 0x20, 0x03, 0x28, 0x0f, 0x52, 0x0e, 0x73, 0x66,
0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x73, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x25, 0x0a, 0x0e,
0x73, 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x18, 0x18,
0x20, 0x01, 0x28, 0x10, 0x52, 0x0d, 0x73, 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x46, 0x69,
0x65, 0x6c, 0x64, 0x12, 0x27, 0x0a, 0x0f, 0x73, 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x73,
0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x18, 0x19, 0x20, 0x03, 0x28, 0x10, 0x52, 0x0e, 0x73, 0x66,
0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x73, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x1d, 0x0a, 0x0a,
0x62, 0x6f, 0x6f, 0x6c, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x18, 0x1a, 0x20, 0x01, 0x28, 0x08,
0x52, 0x09, 0x62, 0x6f, 0x6f, 0x6c, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x62,
0x6f, 0x6f, 0x6c, 0x73, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x18, 0x1b, 0x20, 0x03, 0x28, 0x08,
0x52, 0x0a, 0x62, 0x6f, 0x6f, 0x6c, 0x73, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x21, 0x0a, 0x0c,
0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x18, 0x1c, 0x20, 0x01,
0x28, 0x09, 0x52, 0x0b, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x12,
0x23, 0x0a, 0x0d, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x73, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64,
0x18, 0x1d, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0c, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x73, 0x46,
0x69, 0x65, 0x6c, 0x64, 0x12, 0x2a, 0x0a, 0x11, 0x62, 0x79, 0x74, 0x65, 0x5f, 0x73, 0x74, 0x72,
0x69, 0x6e, 0x67, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x18, 0x1e, 0x20, 0x01, 0x28, 0x0c, 0x52,
0x0f, 0x62, 0x79, 0x74, 0x65, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x46, 0x69, 0x65, 0x6c, 0x64,
0x12, 0x2c, 0x0a, 0x12, 0x62, 0x79, 0x74, 0x65, 0x5f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x73,
0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x18, 0x1f, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x10, 0x62, 0x79,
0x74, 0x65, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x73, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x3a,
0x0a, 0x0a, 0x65, 0x6e, 0x75, 0x6d, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x18, 0x20, 0x20, 0x01,
0x28, 0x0e, 0x32, 0x1b, 0x2e, 0x6f, 0x72, 0x67, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74,
0x69, 0x6f, 0x6e, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52,
0x09, 0x65, 0x6e, 0x75, 0x6d, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x3c, 0x0a, 0x0b, 0x65, 0x6e,
0x75, 0x6d, 0x73, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x18, 0x21, 0x20, 0x03, 0x28, 0x0e, 0x32,
0x1b, 0x2e, 0x6f, 0x72, 0x67, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e,
0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0a, 0x65, 0x6e,
0x75, 0x6d, 0x73, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x65, 0x6e, 0x76, 0x5f,
0x66, 0x69, 0x65, 0x6c, 0x64, 0x18, 0x22, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x65, 0x6e, 0x76,
0x46, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x65, 0x6e, 0x76, 0x73, 0x5f, 0x66, 0x69,
0x65, 0x6c, 0x64, 0x18, 0x23, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x65, 0x6e, 0x76, 0x73, 0x46,
0x69, 0x65, 0x6c, 0x64, 0x12, 0x3c, 0x0a, 0x0d, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f,
0x66, 0x69, 0x65, 0x6c, 0x64, 0x18, 0x24, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x6f, 0x72,
0x67, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x43, 0x6f, 0x6e,
0x74, 0x65, 0x6e, 0x74, 0x52, 0x0c, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x46, 0x69, 0x65,
0x6c, 0x64, 0x12, 0x3e, 0x0a, 0x0e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x5f, 0x66,
0x69, 0x65, 0x6c, 0x64, 0x18, 0x25, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x6f, 0x72, 0x67,
0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x43, 0x6f, 0x6e, 0x74,
0x65, 0x6e, 0x74, 0x52, 0x0d, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x46, 0x69, 0x65,
0x6c, 0x64, 0x3a, 0x14, 0x9a, 0x4a, 0x11, 0x1a, 0x0f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74,
0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2a, 0x63, 0x0a, 0x0b, 0x43, 0x6f, 0x6e, 0x74,
0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x12, 0x0a, 0x0e, 0x43, 0x4f, 0x4e, 0x54, 0x45,
0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x31, 0x10, 0x00, 0x12, 0x12, 0x0a, 0x0e, 0x43,
0x4f, 0x4e, 0x54, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x32, 0x10, 0x01, 0x12,
0x12, 0x0a, 0x0e, 0x43, 0x4f, 0x4e, 0x54, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f,
0x33, 0x10, 0x02, 0x1a, 0x18, 0x9a, 0x4a, 0x15, 0x0a, 0x13, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e,
0x74, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x32, 0x5a, 0x0a,
0x11, 0x46, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69,
0x63, 0x65, 0x12, 0x40, 0x0a, 0x03, 0x47, 0x65, 0x74, 0x12, 0x1a, 0x2e, 0x6f, 0x72, 0x67, 0x2e,
0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x65,
0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x6f, 0x72, 0x67, 0x2e, 0x66, 0x65, 0x64, 0x65,
0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
0x73, 0x65, 0x22, 0x00, 0x1a, 0x03, 0x9a, 0x4a, 0x00, 0x42, 0xb7, 0x01, 0x9a, 0x4a, 0x17, 0x12,
0x15, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74,
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x0a, 0x12, 0x63, 0x6f, 0x6d, 0x2e, 0x6f, 0x72, 0x67, 0x2e,
0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x0f, 0x46, 0x65, 0x64, 0x65,
0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x1d, 0x65,
0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2f, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f,
0x6e, 0x3b, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0xa2, 0x02, 0x03, 0x4f,
0x46, 0x58, 0xaa, 0x02, 0x0e, 0x4f, 0x72, 0x67, 0x2e, 0x46, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74,
0x69, 0x6f, 0x6e, 0xca, 0x02, 0x0e, 0x4f, 0x72, 0x67, 0x5c, 0x46, 0x65, 0x64, 0x65, 0x72, 0x61,
0x74, 0x69, 0x6f, 0x6e, 0xe2, 0x02, 0x1a, 0x4f, 0x72, 0x67, 0x5c, 0x46, 0x65, 0x64, 0x65, 0x72,
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74,
0x61, 0xea, 0x02, 0x0f, 0x4f, 0x72, 0x67, 0x3a, 0x3a, 0x46, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74,
0x69, 0x6f, 0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_federation_federation_proto_rawDescOnce sync.Once
file_federation_federation_proto_rawDescData = file_federation_federation_proto_rawDesc
)
func file_federation_federation_proto_rawDescGZIP() []byte {
file_federation_federation_proto_rawDescOnce.Do(func() {
file_federation_federation_proto_rawDescData = protoimpl.X.CompressGZIP(file_federation_federation_proto_rawDescData)
})
return file_federation_federation_proto_rawDescData
}
var file_federation_federation_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
var file_federation_federation_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
var file_federation_federation_proto_goTypes = []interface{}{
(ContentType)(0), // 0: org.federation.ContentType
(*GetRequest)(nil), // 1: org.federation.GetRequest
(*GetResponse)(nil), // 2: org.federation.GetResponse
(*Content)(nil), // 3: org.federation.Content
}
var file_federation_federation_proto_depIdxs = []int32{
3, // 0: org.federation.GetResponse.content:type_name -> org.federation.Content
0, // 1: org.federation.Content.enum_field:type_name -> org.federation.ContentType
0, // 2: org.federation.Content.enums_field:type_name -> org.federation.ContentType
3, // 3: org.federation.Content.message_field:type_name -> org.federation.Content
3, // 4: org.federation.Content.messages_field:type_name -> org.federation.Content
1, // 5: org.federation.FederationService.Get:input_type -> org.federation.GetRequest
2, // 6: org.federation.FederationService.Get:output_type -> org.federation.GetResponse
6, // [6:7] is the sub-list for method output_type
5, // [5:6] is the sub-list for method input_type
5, // [5:5] is the sub-list for extension type_name
5, // [5:5] is the sub-list for extension extendee
0, // [0:5] is the sub-list for field type_name
}
func init() { file_federation_federation_proto_init() }
func file_federation_federation_proto_init() {
if File_federation_federation_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_federation_federation_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_federation_federation_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_federation_federation_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Content); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_federation_federation_proto_rawDesc,
NumEnums: 1,
NumMessages: 3,
NumExtensions: 0,
NumServices: 1,
},
GoTypes: file_federation_federation_proto_goTypes,
DependencyIndexes: file_federation_federation_proto_depIdxs,
EnumInfos: file_federation_federation_proto_enumTypes,
MessageInfos: file_federation_federation_proto_msgTypes,
}.Build()
File_federation_federation_proto = out.File
file_federation_federation_proto_rawDesc = nil
file_federation_federation_proto_goTypes = nil
file_federation_federation_proto_depIdxs = nil
}
================================================
FILE: _examples/08_literal/federation/federation_grpc.pb.go
================================================
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.3.0
// - protoc (unknown)
// source: federation/federation.proto
package federation
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 (
FederationService_Get_FullMethodName = "/org.federation.FederationService/Get"
)
// FederationServiceClient is the client API for FederationService 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 FederationServiceClient interface {
Get(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*GetResponse, error)
}
type federationServiceClient struct {
cc grpc.ClientConnInterface
}
func NewFederationServiceClient(cc grpc.ClientConnInterface) FederationServiceClient {
return &federationServiceClient{cc}
}
func (c *federationServiceClient) Get(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*GetResponse, error) {
out := new(GetResponse)
err := c.cc.Invoke(ctx, FederationService_Get_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// FederationServiceServer is the server API for FederationService service.
// All implementations must embed UnimplementedFederationServiceServer
// for forward compatibility
type FederationServiceServer interface {
Get(context.Context, *GetRequest) (*GetResponse, error)
mustEmbedUnimplementedFederationServiceServer()
}
// UnimplementedFederationServiceServer must be embedded to have forward compatible implementations.
type UnimplementedFederationServiceServer struct {
}
func (UnimplementedFederationServiceServer) Get(context.Context, *GetRequest) (*GetResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method Get not implemented")
}
func (UnimplementedFederationServiceServer) mustEmbedUnimplementedFederationServiceServer() {}
// UnsafeFederationServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to FederationServiceServer will
// result in compilation errors.
type UnsafeFederationServiceServer interface {
mustEmbedUnimplementedFederationServiceServer()
}
func RegisterFederationServiceServer(s grpc.ServiceRegistrar, srv FederationServiceServer) {
s.RegisterService(&FederationService_ServiceDesc, srv)
}
func _FederationService_Get_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(FederationServiceServer).Get(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: FederationService_Get_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(FederationServiceServer).Get(ctx, req.(*GetRequest))
}
return interceptor(ctx, in, info, handler)
}
// FederationService_ServiceDesc is the grpc.ServiceDesc for FederationService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var FederationService_ServiceDesc = grpc.ServiceDesc{
ServiceName: "org.federation.FederationService",
HandlerType: (*FederationServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "Get",
Handler: _FederationService_Get_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "federation/federation.proto",
}
================================================
FILE: _examples/08_literal/federation/federation_grpc_federation.pb.go
================================================
// Code generated by protoc-gen-grpc-federation. DO NOT EDIT!
// versions:
//
// protoc-gen-grpc-federation: (devel)
//
// source: federation/federation.proto
package federation
import (
"context"
"io"
"log/slog"
"reflect"
grpcfed "github.com/mercari/grpc-federation/grpc/federation"
grpcfedcel "github.com/mercari/grpc-federation/grpc/federation/cel"
"go.opentelemetry.io/otel"
"go.opentelemetry.io/otel/trace"
content "example/content"
)
var (
_ = reflect.Invalid // to avoid "imported and not used error"
)
// Org_Federation_GetResponseVariable represents variable definitions in "org.federation.GetResponse".
type FederationService_Org_Federation_GetResponseVariable struct {
Content *content.Content
Res *content.GetContentResponse
}
// Org_Federation_GetResponseArgument is argument for "org.federation.GetResponse" message.
type FederationService_Org_Federation_GetResponseArgument struct {
Id string
FederationService_Org_Federation_GetResponseVariable
}
// FederationServiceConfig configuration required to initialize the service that use GRPC Federation.
type FederationServiceConfig struct {
// Client provides a factory that creates the gRPC Client needed to invoke methods of the gRPC Service on which the Federation Service depends.
// If this interface is not provided, an error is returned during initialization.
Client FederationServiceClientFactory // required
// ErrorHandler Federation Service often needs to convert errors received from downstream services.
// If an error occurs during method execution in the Federation Service, this error handler is called and the returned error is treated as a final error.
ErrorHandler grpcfed.ErrorHandler
// Logger sets the logger used to output Debug/Info/Error information.
Logger *slog.Logger
}
// FederationServiceClientFactory provides a factory that creates the gRPC Client needed to invoke methods of the gRPC Service on which the Federation Service depends.
type FederationServiceClientFactory interface {
// Content_ContentServiceClient create a gRPC Client to be used to call methods in content.ContentService.
Content_ContentServiceClient(FederationServiceClientConfig) (content.ContentServiceClient, error)
}
// FederationServiceClientConfig helper to create gRPC client.
// Hints for creating a gRPC Client.
type FederationServiceClientConfig struct {
// Service FQDN ( `.` ) of the service on Protocol Buffers.
Service string
}
// FederationServiceDependentClientSet has a gRPC client for all services on which the federation service depends.
// This is provided as an argument when implementing the custom resolver.
type FederationServiceDependentClientSet struct {
Content_ContentServiceClient content.ContentServiceClient
}
// FederationServiceResolver provides an interface to directly implement message resolver and field resolver not defined in Protocol Buffers.
type FederationServiceResolver interface {
}
// FederationServiceCELPluginWasmConfig type alias for grpcfedcel.WasmConfig.
type FederationServiceCELPluginWasmConfig = grpcfedcel.WasmConfig
// FederationServiceCELPluginConfig hints for loading a WebAssembly based plugin.
type FederationServiceCELPluginConfig struct {
CacheDir string
}
// FederationServiceUnimplementedResolver a structure implemented to satisfy the Resolver interface.
// An Unimplemented error is always returned.
// This is intended for use when there are many Resolver interfaces that do not need to be implemented,
// by embedding them in a resolver structure that you have created.
type FederationServiceUnimplementedResolver struct{}
const (
FederationService_DependentMethod_Content_ContentService_GetContent = "/content.ContentService/GetContent"
)
// FederationService represents Federation Service.
type FederationService struct {
UnimplementedFederationServiceServer
cfg FederationServiceConfig
logger *slog.Logger
isLogLevelDebug bool
errorHandler grpcfed.ErrorHandler
celCacheMap *grpcfed.CELCacheMap
tracer trace.Tracer
celTypeHelper *grpcfed.CELTypeHelper
celEnvOpts []grpcfed.CELEnvOption
celPlugins []*grpcfedcel.CELPlugin
client *FederationServiceDependentClientSet
}
// NewFederationService creates FederationService instance by FederationServiceConfig.
func NewFederationService(cfg FederationServiceConfig) (*FederationService, error) {
if cfg.Client == nil {
return nil, grpcfed.ErrClientConfig
}
Content_ContentServiceClient, err := cfg.Client.Content_ContentServiceClient(FederationServiceClientConfig{
Service: "content.ContentService",
})
if err != nil {
return nil, err
}
logger := cfg.Logger
if logger == nil {
logger = slog.New(slog.NewJSONHandler(io.Discard, nil))
}
tracer := otel.Tracer("org.federation.FederationService")
ctx := grpcfed.WithLogger(context.Background(), logger)
ctx = grpcfed.WithTracer(ctx, tracer)
errorHandler := cfg.ErrorHandler
if errorHandler == nil {
errorHandler = func(ctx context.Context, methodName string, err error) error { return err }
}
celTypeHelperFieldMap := grpcfed.CELTypeHelperFieldMap{
"grpc.federation.private.org.federation.GetResponseArgument": {
"id": grpcfed.NewCELFieldType(grpcfed.CELStringType, "Id"),
},
}
celTypeHelper := grpcfed.NewCELTypeHelper("org.federation", celTypeHelperFieldMap)
var celEnvOpts []grpcfed.CELEnvOption
celEnvOpts = append(celEnvOpts, grpcfed.NewDefaultEnvOptions(celTypeHelper)...)
celEnvOpts = append(celEnvOpts, grpcfed.GRPCErrorAccessorOptions(celTypeHelper, "content.GetContentResponse")...)
celEnvOpts = append(celEnvOpts, grpcfed.EnumAccessorOptions("content.ContentType", content.ContentType_value, content.ContentType_name)...)
celEnvOpts = append(celEnvOpts, grpcfed.EnumAccessorOptions("org.federation.ContentType", ContentType_value, ContentType_name)...)
svc := &FederationService{
cfg: cfg,
logger: logger,
isLogLevelDebug: logger.Enabled(context.Background(), slog.LevelDebug),
errorHandler: errorHandler,
celEnvOpts: celEnvOpts,
celTypeHelper: celTypeHelper,
celCacheMap: grpcfed.NewCELCacheMap(),
tracer: tracer,
client: &FederationServiceDependentClientSet{
Content_ContentServiceClient: Content_ContentServiceClient,
},
}
return svc, nil
}
// CleanupFederationService cleanup all resources to prevent goroutine leaks.
func CleanupFederationService(ctx context.Context, svc *FederationService) {
svc.cleanup(ctx)
}
func (s *FederationService) cleanup(ctx context.Context) {
for _, plugin := range s.celPlugins {
plugin.Close()
}
}
// Get implements "org.federation.FederationService/Get" method.
func (s *FederationService) Get(ctx context.Context, req *GetRequest) (res *GetResponse, e error) {
ctx, span := s.tracer.Start(ctx, "org.federation.FederationService/Get")
defer span.End()
ctx = grpcfed.WithLogger(ctx, s.logger)
ctx = grpcfed.WithCELCacheMap(ctx, s.celCacheMap)
defer func() {
if r := recover(); r != nil {
e = grpcfed.RecoverError(r, grpcfed.StackTrace())
grpcfed.OutputErrorLog(ctx, e)
}
}()
defer func() {
for _, celPlugin := range s.celPlugins {
celPlugin.Cleanup()
}
}()
res, err := s.resolve_Org_Federation_GetResponse(ctx, &FederationService_Org_Federation_GetResponseArgument{
Id: req.GetId(),
})
if err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
grpcfed.OutputErrorLog(ctx, err)
return nil, err
}
return res, nil
}
// resolve_Org_Federation_GetResponse resolve "org.federation.GetResponse" message.
func (s *FederationService) resolve_Org_Federation_GetResponse(ctx context.Context, req *FederationService_Org_Federation_GetResponseArgument) (*GetResponse, error) {
ctx, span := s.tracer.Start(ctx, "org.federation.GetResponse")
defer span.End()
ctx = grpcfed.WithLogger(ctx, grpcfed.Logger(ctx), grpcfed.LogAttrs(ctx)...)
grpcfed.Logger(ctx).DebugContext(ctx, "resolve org.federation.GetResponse", slog.Any("message_args", s.logvalue_Org_Federation_GetResponseArgument(req)))
type localValueType struct {
*grpcfed.LocalValue
vars struct {
Content *content.Content
Res *content.GetContentResponse
}
}
value := &localValueType{LocalValue: grpcfed.NewLocalValue(ctx, s.celEnvOpts, "grpc.federation.private.org.federation.GetResponseArgument", req)}
ctx = grpcfed.WithLocalValue(ctx, value.LocalValue)
/*
def {
name: "res"
call {
method: "content.ContentService/GetContent"
request: [
{ field: "by_field", by: "$.id" },
{ field: "double_field", by: "1.23" },
{ field: "doubles_field", by: "[4.56, 7.89]" },
{ field: "float_field", by: "4.56" },
{ field: "floats_field", by: "[7.89, 1.23]" },
{ field: "int32_field", by: "-1" },
{ field: "int32s_field", by: "[-2, -3]" },
{ field: "int64_field", by: "-4" },
{ field: "int64s_field", by: "[-5, -6]" },
{ field: "uint32_field", by: "1u" },
{ field: "uint32s_field", by: "[2u, 3u]" },
{ field: "uint64_field", by: "4u" },
{ field: "uint64s_field", by: "[5u, 6u]" },
{ field: "sint32_field", by: "-7" },
{ field: "sint32s_field", by: "[-8, -9]" },
{ field: "sint64_field", by: "-10" },
{ field: "sint64s_field", by: "[-11, -12]" },
{ field: "fixed32_field", by: "10u" },
{ field: "fixed32s_field", by: "[11u, 12u]" },
{ field: "fixed64_field", by: "13u" },
{ field: "fixed64s_field", by: "[14u, 15u]" },
{ field: "sfixed32_field", by: "-14" },
{ field: "sfixed32s_field", by: "[-15, -16]" },
{ field: "sfixed64_field", by: "-17" },
{ field: "sfixed64s_field", by: "[-18, -19]" },
{ field: "bool_field", by: "true" },
{ field: "bools_field", by: "[true, false]" },
{ field: "string_field", by: "'foo'" },
{ field: "strings_field", by: "['hello', 'world']" },
{ field: "byte_string_field", by: "b'foo'" },
{ field: "byte_strings_field", by: "[b'foo', b'bar']" },
{ field: "enum_field", by: "content.ContentType.CONTENT_TYPE_1" },
{ field: "enums_field", by: "[content.ContentType.CONTENT_TYPE_2, content.ContentType.CONTENT_TYPE_3]" },
{ field: "message_field", by: "content.Content{double_field: 1.23, doubles_field: [4.56, 7.89]}" },
{ field: "messages_field", by: "[content.Content{}, content.Content{}]" }
]
}
}
*/
def_res := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[*content.GetContentResponse, *localValueType]{
Name: `res`,
Type: grpcfed.CELObjectType("content.GetContentResponse"),
Setter: func(value *localValueType, v *content.GetContentResponse) error {
value.vars.Res = v
return nil
},
Message: func(ctx context.Context, value *localValueType) (any, error) {
args := &content.GetContentRequest{}
// { field: "by_field", by: "$.id" }
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[string]{
Value: value,
Expr: `$.id`,
CacheIndex: 1,
Setter: func(v string) error {
args.ByField = v
return nil
},
}); err != nil {
return nil, err
}
// { field: "double_field", by: "1.23" }
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[float64]{
Value: value,
Expr: `1.23`,
CacheIndex: 2,
Setter: func(v float64) error {
args.DoubleField = v
return nil
},
}); err != nil {
return nil, err
}
// { field: "doubles_field", by: "[4.56, 7.89]" }
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[[]float64]{
Value: value,
Expr: `[4.56, 7.89]`,
CacheIndex: 3,
Setter: func(v []float64) error {
args.DoublesField = v
return nil
},
}); err != nil {
return nil, err
}
// { field: "float_field", by: "4.56" }
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[float32]{
Value: value,
Expr: `4.56`,
CacheIndex: 4,
Setter: func(v float32) error {
args.FloatField = v
return nil
},
}); err != nil {
return nil, err
}
// { field: "floats_field", by: "[7.89, 1.23]" }
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[[]float32]{
Value: value,
Expr: `[7.89, 1.23]`,
CacheIndex: 5,
Setter: func(v []float32) error {
args.FloatsField = v
return nil
},
}); err != nil {
return nil, err
}
// { field: "int32_field", by: "-1" }
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[int32]{
Value: value,
Expr: `-1`,
CacheIndex: 6,
Setter: func(v int32) error {
args.Int32Field = v
return nil
},
}); err != nil {
return nil, err
}
// { field: "int32s_field", by: "[-2, -3]" }
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[[]int32]{
Value: value,
Expr: `[-2, -3]`,
CacheIndex: 7,
Setter: func(v []int32) error {
args.Int32SField = v
return nil
},
}); err != nil {
return nil, err
}
// { field: "int64_field", by: "-4" }
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[int64]{
Value: value,
Expr: `-4`,
CacheIndex: 8,
Setter: func(v int64) error {
args.Int64Field = v
return nil
},
}); err != nil {
return nil, err
}
// { field: "int64s_field", by: "[-5, -6]" }
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[[]int64]{
Value: value,
Expr: `[-5, -6]`,
CacheIndex: 9,
Setter: func(v []int64) error {
args.Int64SField = v
return nil
},
}); err != nil {
return nil, err
}
// { field: "uint32_field", by: "1u" }
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[uint32]{
Value: value,
Expr: `1u`,
CacheIndex: 10,
Setter: func(v uint32) error {
args.Uint32Field = v
return nil
},
}); err != nil {
return nil, err
}
// { field: "uint32s_field", by: "[2u, 3u]" }
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[[]uint32]{
Value: value,
Expr: `[2u, 3u]`,
CacheIndex: 11,
Setter: func(v []uint32) error {
args.Uint32SField = v
return nil
},
}); err != nil {
return nil, err
}
// { field: "uint64_field", by: "4u" }
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[uint64]{
Value: value,
Expr: `4u`,
CacheIndex: 12,
Setter: func(v uint64) error {
args.Uint64Field = v
return nil
},
}); err != nil {
return nil, err
}
// { field: "uint64s_field", by: "[5u, 6u]" }
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[[]uint64]{
Value: value,
Expr: `[5u, 6u]`,
CacheIndex: 13,
Setter: func(v []uint64) error {
args.Uint64SField = v
return nil
},
}); err != nil {
return nil, err
}
// { field: "sint32_field", by: "-7" }
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[int32]{
Value: value,
Expr: `-7`,
CacheIndex: 14,
Setter: func(v int32) error {
args.Sint32Field = v
return nil
},
}); err != nil {
return nil, err
}
// { field: "sint32s_field", by: "[-8, -9]" }
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[[]int32]{
Value: value,
Expr: `[-8, -9]`,
CacheIndex: 15,
Setter: func(v []int32) error {
args.Sint32SField = v
return nil
},
}); err != nil {
return nil, err
}
// { field: "sint64_field", by: "-10" }
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[int64]{
Value: value,
Expr: `-10`,
CacheIndex: 16,
Setter: func(v int64) error {
args.Sint64Field = v
return nil
},
}); err != nil {
return nil, err
}
// { field: "sint64s_field", by: "[-11, -12]" }
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[[]int64]{
Value: value,
Expr: `[-11, -12]`,
CacheIndex: 17,
Setter: func(v []int64) error {
args.Sint64SField = v
return nil
},
}); err != nil {
return nil, err
}
// { field: "fixed32_field", by: "10u" }
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[uint32]{
Value: value,
Expr: `10u`,
CacheIndex: 18,
Setter: func(v uint32) error {
args.Fixed32Field = v
return nil
},
}); err != nil {
return nil, err
}
// { field: "fixed32s_field", by: "[11u, 12u]" }
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[[]uint32]{
Value: value,
Expr: `[11u, 12u]`,
CacheIndex: 19,
Setter: func(v []uint32) error {
args.Fixed32SField = v
return nil
},
}); err != nil {
return nil, err
}
// { field: "fixed64_field", by: "13u" }
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[uint64]{
Value: value,
Expr: `13u`,
CacheIndex: 20,
Setter: func(v uint64) error {
args.Fixed64Field = v
return nil
},
}); err != nil {
return nil, err
}
// { field: "fixed64s_field", by: "[14u, 15u]" }
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[[]uint64]{
Value: value,
Expr: `[14u, 15u]`,
CacheIndex: 21,
Setter: func(v []uint64) error {
args.Fixed64SField = v
return nil
},
}); err != nil {
return nil, err
}
// { field: "sfixed32_field", by: "-14" }
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[int32]{
Value: value,
Expr: `-14`,
CacheIndex: 22,
Setter: func(v int32) error {
args.Sfixed32Field = v
return nil
},
}); err != nil {
return nil, err
}
// { field: "sfixed32s_field", by: "[-15, -16]" }
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[[]int32]{
Value: value,
Expr: `[-15, -16]`,
CacheIndex: 23,
Setter: func(v []int32) error {
args.Sfixed32SField = v
return nil
},
}); err != nil {
return nil, err
}
// { field: "sfixed64_field", by: "-17" }
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[int64]{
Value: value,
Expr: `-17`,
CacheIndex: 24,
Setter: func(v int64) error {
args.Sfixed64Field = v
return nil
},
}); err != nil {
return nil, err
}
// { field: "sfixed64s_field", by: "[-18, -19]" }
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[[]int64]{
Value: value,
Expr: `[-18, -19]`,
CacheIndex: 25,
Setter: func(v []int64) error {
args.Sfixed64SField = v
return nil
},
}); err != nil {
return nil, err
}
// { field: "bool_field", by: "true" }
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[bool]{
Value: value,
Expr: `true`,
CacheIndex: 26,
Setter: func(v bool) error {
args.BoolField = v
return nil
},
}); err != nil {
return nil, err
}
// { field: "bools_field", by: "[true, false]" }
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[[]bool]{
Value: value,
Expr: `[true, false]`,
CacheIndex: 27,
Setter: func(v []bool) error {
args.BoolsField = v
return nil
},
}); err != nil {
return nil, err
}
// { field: "string_field", by: "'foo'" }
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[string]{
Value: value,
Expr: `'foo'`,
CacheIndex: 28,
Setter: func(v string) error {
args.StringField = v
return nil
},
}); err != nil {
return nil, err
}
// { field: "strings_field", by: "['hello', 'world']" }
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[[]string]{
Value: value,
Expr: `['hello', 'world']`,
CacheIndex: 29,
Setter: func(v []string) error {
args.StringsField = v
return nil
},
}); err != nil {
return nil, err
}
// { field: "byte_string_field", by: "b'foo'" }
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[[]byte]{
Value: value,
Expr: `b'foo'`,
CacheIndex: 30,
Setter: func(v []byte) error {
args.ByteStringField = v
return nil
},
}); err != nil {
return nil, err
}
// { field: "byte_strings_field", by: "[b'foo', b'bar']" }
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[[][]byte]{
Value: value,
Expr: `[b'foo', b'bar']`,
CacheIndex: 31,
Setter: func(v [][]byte) error {
args.ByteStringsField = v
return nil
},
}); err != nil {
return nil, err
}
// { field: "enum_field", by: "content.ContentType.CONTENT_TYPE_1" }
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[content.ContentType]{
Value: value,
Expr: `content.ContentType.CONTENT_TYPE_1`,
CacheIndex: 32,
Setter: func(v content.ContentType) error {
args.EnumField = v
return nil
},
}); err != nil {
return nil, err
}
// { field: "enums_field", by: "[content.ContentType.CONTENT_TYPE_2, content.ContentType.CONTENT_TYPE_3]" }
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[[]content.ContentType]{
Value: value,
Expr: `[content.ContentType.CONTENT_TYPE_2, content.ContentType.CONTENT_TYPE_3]`,
CacheIndex: 33,
Setter: func(v []content.ContentType) error {
args.EnumsField = v
return nil
},
}); err != nil {
return nil, err
}
// { field: "message_field", by: "content.Content{double_field: 1.23, doubles_field: [4.56, 7.89]}" }
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[*content.Content]{
Value: value,
Expr: `content.Content{double_field: 1.23, doubles_field: [4.56, 7.89]}`,
CacheIndex: 34,
Setter: func(v *content.Content) error {
args.MessageField = v
return nil
},
}); err != nil {
return nil, err
}
// { field: "messages_field", by: "[content.Content{}, content.Content{}]" }
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[[]*content.Content]{
Value: value,
Expr: `[content.Content{}, content.Content{}]`,
CacheIndex: 35,
Setter: func(v []*content.Content) error {
args.MessagesField = v
return nil
},
}); err != nil {
return nil, err
}
grpcfed.Logger(ctx).DebugContext(ctx, "call content.ContentService/GetContent", slog.Any("content.GetContentRequest", s.logvalue_Content_GetContentRequest(args)))
ret, err := s.client.Content_ContentServiceClient.GetContent(ctx, args)
if err != nil {
if err := s.errorHandler(ctx, FederationService_DependentMethod_Content_ContentService_GetContent, err); err != nil {
return nil, grpcfed.NewErrorWithLogAttrs(err, slog.LevelError, grpcfed.LogAttrs(ctx))
}
}
return ret, nil
},
})
}
/*
def {
name: "content"
by: "res.content"
}
*/
def_content := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[*content.Content, *localValueType]{
Name: `content`,
Type: grpcfed.CELObjectType("content.Content"),
Setter: func(value *localValueType, v *content.Content) error {
value.vars.Content = v
return nil
},
By: `res.content`,
ByCacheIndex: 36,
})
}
if err := def_res(ctx); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
if err := def_content(ctx); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
// assign named parameters to message arguments to pass to the custom resolver.
req.FederationService_Org_Federation_GetResponseVariable.Content = value.vars.Content
req.FederationService_Org_Federation_GetResponseVariable.Res = value.vars.Res
// create a message value to be returned.
ret := &GetResponse{}
// field binding section.
// (grpc.federation.field).by = "content"
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[*content.Content]{
Value: value,
Expr: `content`,
CacheIndex: 37,
Setter: func(v *content.Content) error {
contentValue, err := s.cast_Content_Content__to__Org_Federation_Content(v)
if err != nil {
return err
}
ret.Content = contentValue
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
// (grpc.federation.field).by = "content.int32_field + content.sint32_field"
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[int64]{
Value: value,
Expr: `content.int32_field + content.sint32_field`,
CacheIndex: 38,
Setter: func(v int64) error {
ret.CelExpr = v
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
grpcfed.Logger(ctx).DebugContext(ctx, "resolved org.federation.GetResponse", slog.Any("org.federation.GetResponse", s.logvalue_Org_Federation_GetResponse(ret)))
return ret, nil
}
// cast_Content_ContentType__to__Org_Federation_ContentType cast from "content.ContentType" to "org.federation.ContentType".
func (s *FederationService) cast_Content_ContentType__to__Org_Federation_ContentType(from content.ContentType) (ContentType, error) {
var ret ContentType
switch from {
case content.ContentType_CONTENT_TYPE_1:
ret = ContentType_CONTENT_TYPE_1
case content.ContentType_CONTENT_TYPE_2:
ret = ContentType_CONTENT_TYPE_2
case content.ContentType_CONTENT_TYPE_3:
ret = ContentType_CONTENT_TYPE_3
default:
ret = 0
}
return ret, nil
}
// cast_Content_Content__to__Org_Federation_Content cast from "content.Content" to "org.federation.Content".
func (s *FederationService) cast_Content_Content__to__Org_Federation_Content(from *content.Content) (*Content, error) {
if from == nil {
return nil, nil
}
byFieldValue := from.GetByField()
doubleFieldValue := from.GetDoubleField()
doublesFieldValue := from.GetDoublesField()
floatFieldValue := from.GetFloatField()
floatsFieldValue := from.GetFloatsField()
int32FieldValue := from.GetInt32Field()
int32SFieldValue := from.GetInt32SField()
int64FieldValue := from.GetInt64Field()
int64SFieldValue := from.GetInt64SField()
uint32FieldValue := from.GetUint32Field()
uint32SFieldValue := from.GetUint32SField()
uint64FieldValue := from.GetUint64Field()
uint64SFieldValue := from.GetUint64SField()
sint32FieldValue := from.GetSint32Field()
sint32SFieldValue := from.GetSint32SField()
sint64FieldValue := from.GetSint64Field()
sint64SFieldValue := from.GetSint64SField()
fixed32FieldValue := from.GetFixed32Field()
fixed32SFieldValue := from.GetFixed32SField()
fixed64FieldValue := from.GetFixed64Field()
fixed64SFieldValue := from.GetFixed64SField()
sfixed32FieldValue := from.GetSfixed32Field()
sfixed32SFieldValue := from.GetSfixed32SField()
sfixed64FieldValue := from.GetSfixed64Field()
sfixed64SFieldValue := from.GetSfixed64SField()
boolFieldValue := from.GetBoolField()
boolsFieldValue := from.GetBoolsField()
stringFieldValue := from.GetStringField()
stringsFieldValue := from.GetStringsField()
byteStringFieldValue := from.GetByteStringField()
byteStringsFieldValue := from.GetByteStringsField()
enumFieldValue, err := s.cast_Content_ContentType__to__Org_Federation_ContentType(from.GetEnumField())
if err != nil {
return nil, err
}
enumsFieldValue, err := s.cast_repeated_Content_ContentType__to__repeated_Org_Federation_ContentType(from.GetEnumsField())
if err != nil {
return nil, err
}
envFieldValue := from.GetEnvField()
envsFieldValue := from.GetEnvsField()
messageFieldValue, err := s.cast_Content_Content__to__Org_Federation_Content(from.GetMessageField())
if err != nil {
return nil, err
}
messagesFieldValue, err := s.cast_repeated_Content_Content__to__repeated_Org_Federation_Content(from.GetMessagesField())
if err != nil {
return nil, err
}
ret := &Content{
ByField: byFieldValue,
DoubleField: doubleFieldValue,
DoublesField: doublesFieldValue,
FloatField: floatFieldValue,
FloatsField: floatsFieldValue,
Int32Field: int32FieldValue,
Int32SField: int32SFieldValue,
Int64Field: int64FieldValue,
Int64SField: int64SFieldValue,
Uint32Field: uint32FieldValue,
Uint32SField: uint32SFieldValue,
Uint64Field: uint64FieldValue,
Uint64SField: uint64SFieldValue,
Sint32Field: sint32FieldValue,
Sint32SField: sint32SFieldValue,
Sint64Field: sint64FieldValue,
Sint64SField: sint64SFieldValue,
Fixed32Field: fixed32FieldValue,
Fixed32SField: fixed32SFieldValue,
Fixed64Field: fixed64FieldValue,
Fixed64SField: fixed64SFieldValue,
Sfixed32Field: sfixed32FieldValue,
Sfixed32SField: sfixed32SFieldValue,
Sfixed64Field: sfixed64FieldValue,
Sfixed64SField: sfixed64SFieldValue,
BoolField: boolFieldValue,
BoolsField: boolsFieldValue,
StringField: stringFieldValue,
StringsField: stringsFieldValue,
ByteStringField: byteStringFieldValue,
ByteStringsField: byteStringsFieldValue,
EnumField: enumFieldValue,
EnumsField: enumsFieldValue,
EnvField: envFieldValue,
EnvsField: envsFieldValue,
MessageField: messageFieldValue,
MessagesField: messagesFieldValue,
}
return ret, nil
}
// cast_float64__to__float32 cast from "double" to "float".
func (s *FederationService) cast_float64__to__float32(from float64) (float32, error) {
return float32(from), nil
}
// cast_int64__to__Content_ContentType cast from "int64" to "content.ContentType".
func (s *FederationService) cast_int64__to__Content_ContentType(from int64) (content.ContentType, error) {
return content.ContentType(from), nil
}
// cast_int64__to__int32 cast from "int64" to "sint32".
func (s *FederationService) cast_int64__to__int32(from int64) (int32, error) {
return int32(from), nil
}
// cast_int64__to__int64 cast from "int64" to "sint64".
func (s *FederationService) cast_int64__to__int64(from int64) (int64, error) {
return int64(from), nil
}
// cast_repeated_Content_ContentType__to__repeated_Org_Federation_ContentType cast from "repeated content.ContentType" to "repeated org.federation.ContentType".
func (s *FederationService) cast_repeated_Content_ContentType__to__repeated_Org_Federation_ContentType(from []content.ContentType) ([]ContentType, error) {
ret := make([]ContentType, 0, len(from))
for _, v := range from {
casted, err := s.cast_Content_ContentType__to__Org_Federation_ContentType(v)
if err != nil {
return nil, err
}
ret = append(ret, casted)
}
return ret, nil
}
// cast_repeated_Content_Content__to__repeated_Org_Federation_Content cast from "repeated content.Content" to "repeated org.federation.Content".
func (s *FederationService) cast_repeated_Content_Content__to__repeated_Org_Federation_Content(from []*content.Content) ([]*Content, error) {
ret := make([]*Content, 0, len(from))
for _, v := range from {
casted, err := s.cast_Content_Content__to__Org_Federation_Content(v)
if err != nil {
return nil, err
}
ret = append(ret, casted)
}
return ret, nil
}
// cast_repeated_float64__to__repeated_float32 cast from "repeated double" to "repeated float".
func (s *FederationService) cast_repeated_float64__to__repeated_float32(from []float64) ([]float32, error) {
ret := make([]float32, 0, len(from))
for _, v := range from {
casted, err := s.cast_float64__to__float32(v)
if err != nil {
return nil, err
}
ret = append(ret, casted)
}
return ret, nil
}
// cast_repeated_int64__to__repeated_Content_ContentType cast from "repeated int64" to "repeated content.ContentType".
func (s *FederationService) cast_repeated_int64__to__repeated_Content_ContentType(from []int64) ([]content.ContentType, error) {
ret := make([]content.ContentType, 0, len(from))
for _, v := range from {
casted, err := s.cast_int64__to__Content_ContentType(v)
if err != nil {
return nil, err
}
ret = append(ret, casted)
}
return ret, nil
}
// cast_repeated_int64__to__repeated_int32 cast from "repeated int64" to "repeated sint32".
func (s *FederationService) cast_repeated_int64__to__repeated_int32(from []int64) ([]int32, error) {
ret := make([]int32, 0, len(from))
for _, v := range from {
casted, err := s.cast_int64__to__int32(v)
if err != nil {
return nil, err
}
ret = append(ret, casted)
}
return ret, nil
}
// cast_repeated_int64__to__repeated_int64 cast from "repeated int64" to "repeated sint64".
func (s *FederationService) cast_repeated_int64__to__repeated_int64(from []int64) ([]int64, error) {
ret := make([]int64, 0, len(from))
for _, v := range from {
casted, err := s.cast_int64__to__int64(v)
if err != nil {
return nil, err
}
ret = append(ret, casted)
}
return ret, nil
}
// cast_repeated_uint64__to__repeated_uint32 cast from "repeated uint64" to "repeated uint32".
func (s *FederationService) cast_repeated_uint64__to__repeated_uint32(from []uint64) ([]uint32, error) {
ret := make([]uint32, 0, len(from))
for _, v := range from {
casted, err := s.cast_uint64__to__uint32(v)
if err != nil {
return nil, err
}
ret = append(ret, casted)
}
return ret, nil
}
// cast_repeated_uint64__to__repeated_uint64 cast from "repeated uint64" to "repeated fixed64".
func (s *FederationService) cast_repeated_uint64__to__repeated_uint64(from []uint64) ([]uint64, error) {
ret := make([]uint64, 0, len(from))
for _, v := range from {
casted, err := s.cast_uint64__to__uint64(v)
if err != nil {
return nil, err
}
ret = append(ret, casted)
}
return ret, nil
}
// cast_uint64__to__uint32 cast from "uint64" to "uint32".
func (s *FederationService) cast_uint64__to__uint32(from uint64) (uint32, error) {
ret, err := grpcfed.Uint64ToUint32(from)
if err != nil {
return ret, err
}
return ret, nil
}
// cast_uint64__to__uint64 cast from "uint64" to "fixed64".
func (s *FederationService) cast_uint64__to__uint64(from uint64) (uint64, error) {
return uint64(from), nil
}
func (s *FederationService) logvalue_Content_Content(v *content.Content) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.String("by_field", v.GetByField()),
slog.Float64("double_field", v.GetDoubleField()),
slog.Any("doubles_field", v.GetDoublesField()),
slog.Float64("float_field", float64(v.GetFloatField())),
slog.Any("floats_field", v.GetFloatsField()),
slog.Int64("int32_field", int64(v.GetInt32Field())),
slog.Any("int32s_field", v.GetInt32SField()),
slog.Int64("int64_field", v.GetInt64Field()),
slog.Any("int64s_field", v.GetInt64SField()),
slog.Uint64("uint32_field", uint64(v.GetUint32Field())),
slog.Any("uint32s_field", v.GetUint32SField()),
slog.Uint64("uint64_field", v.GetUint64Field()),
slog.Any("uint64s_field", v.GetUint64SField()),
slog.Int64("sint32_field", int64(v.GetSint32Field())),
slog.Any("sint32s_field", v.GetSint32SField()),
slog.Int64("sint64_field", v.GetSint64Field()),
slog.Any("sint64s_field", v.GetSint64SField()),
slog.Uint64("fixed32_field", uint64(v.GetFixed32Field())),
slog.Any("fixed32s_field", v.GetFixed32SField()),
slog.Uint64("fixed64_field", v.GetFixed64Field()),
slog.Any("fixed64s_field", v.GetFixed64SField()),
slog.Int64("sfixed32_field", int64(v.GetSfixed32Field())),
slog.Any("sfixed32s_field", v.GetSfixed32SField()),
slog.Int64("sfixed64_field", v.GetSfixed64Field()),
slog.Any("sfixed64s_field", v.GetSfixed64SField()),
slog.Bool("bool_field", v.GetBoolField()),
slog.Any("bools_field", v.GetBoolsField()),
slog.String("string_field", v.GetStringField()),
slog.Any("strings_field", v.GetStringsField()),
slog.String("byte_string_field", string(v.GetByteStringField())),
slog.Any("byte_strings_field", v.GetByteStringsField()),
slog.String("enum_field", s.logvalue_Content_ContentType(v.GetEnumField()).String()),
slog.Any("enums_field", s.logvalue_repeated_Content_ContentType(v.GetEnumsField())),
slog.String("env_field", v.GetEnvField()),
slog.Any("envs_field", v.GetEnvsField()),
slog.Any("message_field", s.logvalue_Content_Content(v.GetMessageField())),
slog.Any("messages_field", s.logvalue_repeated_Content_Content(v.GetMessagesField())),
)
}
func (s *FederationService) logvalue_Content_ContentType(v content.ContentType) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
switch v {
case content.ContentType_CONTENT_TYPE_1:
return slog.StringValue("CONTENT_TYPE_1")
case content.ContentType_CONTENT_TYPE_2:
return slog.StringValue("CONTENT_TYPE_2")
case content.ContentType_CONTENT_TYPE_3:
return slog.StringValue("CONTENT_TYPE_3")
}
return slog.StringValue("")
}
func (s *FederationService) logvalue_Content_GetContentRequest(v *content.GetContentRequest) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.String("by_field", v.GetByField()),
slog.Float64("double_field", v.GetDoubleField()),
slog.Any("doubles_field", v.GetDoublesField()),
slog.Float64("float_field", float64(v.GetFloatField())),
slog.Any("floats_field", v.GetFloatsField()),
slog.Int64("int32_field", int64(v.GetInt32Field())),
slog.Any("int32s_field", v.GetInt32SField()),
slog.Int64("int64_field", v.GetInt64Field()),
slog.Any("int64s_field", v.GetInt64SField()),
slog.Uint64("uint32_field", uint64(v.GetUint32Field())),
slog.Any("uint32s_field", v.GetUint32SField()),
slog.Uint64("uint64_field", v.GetUint64Field()),
slog.Any("uint64s_field", v.GetUint64SField()),
slog.Int64("sint32_field", int64(v.GetSint32Field())),
slog.Any("sint32s_field", v.GetSint32SField()),
slog.Int64("sint64_field", v.GetSint64Field()),
slog.Any("sint64s_field", v.GetSint64SField()),
slog.Uint64("fixed32_field", uint64(v.GetFixed32Field())),
slog.Any("fixed32s_field", v.GetFixed32SField()),
slog.Uint64("fixed64_field", v.GetFixed64Field()),
slog.Any("fixed64s_field", v.GetFixed64SField()),
slog.Int64("sfixed32_field", int64(v.GetSfixed32Field())),
slog.Any("sfixed32s_field", v.GetSfixed32SField()),
slog.Int64("sfixed64_field", v.GetSfixed64Field()),
slog.Any("sfixed64s_field", v.GetSfixed64SField()),
slog.Bool("bool_field", v.GetBoolField()),
slog.Any("bools_field", v.GetBoolsField()),
slog.String("string_field", v.GetStringField()),
slog.Any("strings_field", v.GetStringsField()),
slog.String("byte_string_field", string(v.GetByteStringField())),
slog.Any("byte_strings_field", v.GetByteStringsField()),
slog.String("enum_field", s.logvalue_Content_ContentType(v.GetEnumField()).String()),
slog.Any("enums_field", s.logvalue_repeated_Content_ContentType(v.GetEnumsField())),
slog.String("env_field", v.GetEnvField()),
slog.Any("envs_field", v.GetEnvsField()),
slog.Any("message_field", s.logvalue_Content_Content(v.GetMessageField())),
slog.Any("messages_field", s.logvalue_repeated_Content_Content(v.GetMessagesField())),
)
}
func (s *FederationService) logvalue_Org_Federation_Content(v *Content) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.String("by_field", v.GetByField()),
slog.Float64("double_field", v.GetDoubleField()),
slog.Any("doubles_field", v.GetDoublesField()),
slog.Float64("float_field", float64(v.GetFloatField())),
slog.Any("floats_field", v.GetFloatsField()),
slog.Int64("int32_field", int64(v.GetInt32Field())),
slog.Any("int32s_field", v.GetInt32SField()),
slog.Int64("int64_field", v.GetInt64Field()),
slog.Any("int64s_field", v.GetInt64SField()),
slog.Uint64("uint32_field", uint64(v.GetUint32Field())),
slog.Any("uint32s_field", v.GetUint32SField()),
slog.Uint64("uint64_field", v.GetUint64Field()),
slog.Any("uint64s_field", v.GetUint64SField()),
slog.Int64("sint32_field", int64(v.GetSint32Field())),
slog.Any("sint32s_field", v.GetSint32SField()),
slog.Int64("sint64_field", v.GetSint64Field()),
slog.Any("sint64s_field", v.GetSint64SField()),
slog.Uint64("fixed32_field", uint64(v.GetFixed32Field())),
slog.Any("fixed32s_field", v.GetFixed32SField()),
slog.Uint64("fixed64_field", v.GetFixed64Field()),
slog.Any("fixed64s_field", v.GetFixed64SField()),
slog.Int64("sfixed32_field", int64(v.GetSfixed32Field())),
slog.Any("sfixed32s_field", v.GetSfixed32SField()),
slog.Int64("sfixed64_field", v.GetSfixed64Field()),
slog.Any("sfixed64s_field", v.GetSfixed64SField()),
slog.Bool("bool_field", v.GetBoolField()),
slog.Any("bools_field", v.GetBoolsField()),
slog.String("string_field", v.GetStringField()),
slog.Any("strings_field", v.GetStringsField()),
slog.String("byte_string_field", string(v.GetByteStringField())),
slog.Any("byte_strings_field", v.GetByteStringsField()),
slog.String("enum_field", s.logvalue_Org_Federation_ContentType(v.GetEnumField()).String()),
slog.Any("enums_field", s.logvalue_repeated_Org_Federation_ContentType(v.GetEnumsField())),
slog.String("env_field", v.GetEnvField()),
slog.Any("envs_field", v.GetEnvsField()),
slog.Any("message_field", s.logvalue_Org_Federation_Content(v.GetMessageField())),
slog.Any("messages_field", s.logvalue_repeated_Org_Federation_Content(v.GetMessagesField())),
)
}
func (s *FederationService) logvalue_Org_Federation_ContentType(v ContentType) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
switch v {
case ContentType_CONTENT_TYPE_1:
return slog.StringValue("CONTENT_TYPE_1")
case ContentType_CONTENT_TYPE_2:
return slog.StringValue("CONTENT_TYPE_2")
case ContentType_CONTENT_TYPE_3:
return slog.StringValue("CONTENT_TYPE_3")
}
return slog.StringValue("")
}
func (s *FederationService) logvalue_Org_Federation_GetResponse(v *GetResponse) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.Any("content", s.logvalue_Org_Federation_Content(v.GetContent())),
slog.Int64("cel_expr", v.GetCelExpr()),
)
}
func (s *FederationService) logvalue_Org_Federation_GetResponseArgument(v *FederationService_Org_Federation_GetResponseArgument) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.String("id", v.Id),
)
}
func (s *FederationService) logvalue_repeated_Content_Content(v []*content.Content) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
attrs := make([]slog.Attr, 0, len(v))
for idx, vv := range v {
attrs = append(attrs, slog.Attr{
Key: grpcfed.ToLogAttrKey(idx),
Value: s.logvalue_Content_Content(vv),
})
}
return slog.GroupValue(attrs...)
}
func (s *FederationService) logvalue_repeated_Content_ContentType(v []content.ContentType) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
attrs := make([]slog.Attr, 0, len(v))
for idx, vv := range v {
attrs = append(attrs, slog.Attr{
Key: grpcfed.ToLogAttrKey(idx),
Value: s.logvalue_Content_ContentType(vv),
})
}
return slog.GroupValue(attrs...)
}
func (s *FederationService) logvalue_repeated_Org_Federation_Content(v []*Content) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
attrs := make([]slog.Attr, 0, len(v))
for idx, vv := range v {
attrs = append(attrs, slog.Attr{
Key: grpcfed.ToLogAttrKey(idx),
Value: s.logvalue_Org_Federation_Content(vv),
})
}
return slog.GroupValue(attrs...)
}
func (s *FederationService) logvalue_repeated_Org_Federation_ContentType(v []ContentType) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
attrs := make([]slog.Attr, 0, len(v))
for idx, vv := range v {
attrs = append(attrs, slog.Attr{
Key: grpcfed.ToLogAttrKey(idx),
Value: s.logvalue_Org_Federation_ContentType(vv),
})
}
return slog.GroupValue(attrs...)
}
================================================
FILE: _examples/08_literal/go.mod
================================================
module example
go 1.24.0
replace github.com/mercari/grpc-federation => ../../
require (
github.com/google/go-cmp v0.7.0
github.com/mercari/grpc-federation v0.0.0-00010101000000-000000000000
go.opentelemetry.io/otel v1.24.0
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.21.0
go.opentelemetry.io/otel/sdk v1.24.0
go.opentelemetry.io/otel/trace v1.24.0
go.uber.org/goleak v1.3.0
google.golang.org/genproto/googleapis/rpc v0.0.0-20240826202546-f6391c0de4c7
google.golang.org/grpc v1.65.0
google.golang.org/protobuf v1.34.2
)
require (
cel.dev/expr v0.19.1 // indirect
github.com/antlr4-go/antlr/v4 v4.13.0 // indirect
github.com/cenkalti/backoff/v4 v4.2.1 // indirect
github.com/go-logr/logr v1.4.1 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
github.com/goccy/wasi-go v0.3.2 // indirect
github.com/google/cel-go v0.23.1 // indirect
github.com/google/uuid v1.6.0 // indirect
github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0 // indirect
github.com/kelseyhightower/envconfig v1.4.0 // indirect
github.com/stealthrocket/wazergo v0.19.1 // indirect
github.com/stoewer/go-strcase v1.3.0 // indirect
github.com/tetratelabs/wazero v1.10.1 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.21.0 // indirect
go.opentelemetry.io/otel/metric v1.24.0 // indirect
go.opentelemetry.io/proto/otlp v1.0.0 // indirect
golang.org/x/exp v0.0.0-20250506013437-ce4c2cf36ca6 // indirect
golang.org/x/net v0.38.0 // indirect
golang.org/x/sync v0.14.0 // indirect
golang.org/x/sys v0.37.0 // indirect
golang.org/x/text v0.23.0 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20240826202546-f6391c0de4c7 // indirect
)
================================================
FILE: _examples/08_literal/go.sum
================================================
cel.dev/expr v0.19.1 h1:NciYrtDRIR0lNCnH1LFJegdjspNx9fI59O7TWcua/W4=
cel.dev/expr v0.19.1/go.mod h1:MrpN08Q+lEBs+bGYdLxxHkZoUSsCp0nSKTs0nTymJgw=
github.com/antlr4-go/antlr/v4 v4.13.0 h1:lxCg3LAv+EUK6t1i0y1V6/SLeUi0eKEKdhQAlS8TVTI=
github.com/antlr4-go/antlr/v4 v4.13.0/go.mod h1:pfChB/xh/Unjila75QW7+VU4TSnWnnk9UTnmpPaOR2g=
github.com/cenkalti/backoff/v4 v4.2.1 h1:y4OZtCnogmCPw98Zjyt5a6+QwPLGkiQsYW5oUqylYbM=
github.com/cenkalti/backoff/v4 v4.2.1/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A=
github.com/go-logr/logr v1.4.1 h1:pKouT5E8xu9zeFC39JXRDukb6JFQPXM5p5I91188VAQ=
github.com/go-logr/logr v1.4.1/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY=
github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag=
github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE=
github.com/goccy/wasi-go v0.3.2 h1:wAvGXmqCkfcp0B0AwIp5Ya53hzDwkKm9W8iuT3nCCz0=
github.com/goccy/wasi-go v0.3.2/go.mod h1:nIKD204n9xa4Z20UV+XA483kIr9TAl2vXr+X5qVAO5M=
github.com/golang/glog v1.2.1 h1:OptwRhECazUx5ix5TTWC3EZhsZEHWcYWY4FQHTIubm4=
github.com/golang/glog v1.2.1/go.mod h1:6AhwSGph0fcJtXVM/PEHPqZlFeoLxhs7/t5UDAwmO+w=
github.com/google/cel-go v0.23.1 h1:91ThhEZlBcE5rB2adBVXqvDoqdL8BG2oyhd0bK1I/r4=
github.com/google/cel-go v0.23.1/go.mod h1:52Pb6QsDbC5kvgxvZhiL9QX1oZEkcUF/ZqaPx1J5Wwo=
github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8=
github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU=
github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0 h1:YBftPWNWd4WwGqtY2yeZL2ef8rHAxPBD8KFhJpmcqms=
github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0/go.mod h1:YN5jB8ie0yfIUg6VvR9Kz84aCaG7AsGZnLjhHbUqwPg=
github.com/kelseyhightower/envconfig v1.4.0 h1:Im6hONhd3pLkfDFsbRgu68RDNkGF1r3dvMUtDTo2cv8=
github.com/kelseyhightower/envconfig v1.4.0/go.mod h1:cccZRl6mQpaq41TPp5QxidR+Sa3axMbJDNb//FQX6Gg=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/stealthrocket/wazergo v0.19.1 h1:BPrITETPgSFwiytwmToO0MbUC/+RGC39JScz1JmmG6c=
github.com/stealthrocket/wazergo v0.19.1/go.mod h1:riI0hxw4ndZA5e6z7PesHg2BtTftcZaMxRcoiGGipTs=
github.com/stoewer/go-strcase v1.3.0 h1:g0eASXYtp+yvN9fK8sH94oCIk0fau9uV1/ZdJ0AVEzs=
github.com/stoewer/go-strcase v1.3.0/go.mod h1:fAH5hQ5pehh+j3nZfvwdk2RgEgQjAoM8wodgtPmh1xo=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=
github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo=
github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk=
github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
github.com/tetratelabs/wazero v1.10.1 h1:2DugeJf6VVk58KTPszlNfeeN8AhhpwcZqkJj2wwFuH8=
github.com/tetratelabs/wazero v1.10.1/go.mod h1:DRm5twOQ5Gr1AoEdSi0CLjDQF1J9ZAuyqFIjl1KKfQU=
go.opentelemetry.io/otel v1.24.0 h1:0LAOdjNmQeSTzGBzduGe/rU4tZhMwL5rWgtp9Ku5Jfo=
go.opentelemetry.io/otel v1.24.0/go.mod h1:W7b9Ozg4nkF5tWI5zsXkaKKDjdVjpD4oAt9Qi/MArHo=
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.21.0 h1:cl5P5/GIfFh4t6xyruOgJP5QiA1pw4fYYdv6nc6CBWw=
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.21.0/go.mod h1:zgBdWWAu7oEEMC06MMKc5NLbA/1YDXV1sMpSqEeLQLg=
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.21.0 h1:tIqheXEFWAZ7O8A7m+J0aPTmpJN3YQ7qetUAdkkkKpk=
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.21.0/go.mod h1:nUeKExfxAQVbiVFn32YXpXZZHZ61Cc3s3Rn1pDBGAb0=
go.opentelemetry.io/otel/metric v1.24.0 h1:6EhoGWWK28x1fbpA4tYTOWBkPefTDQnb8WSGXlc88kI=
go.opentelemetry.io/otel/metric v1.24.0/go.mod h1:VYhLe1rFfxuTXLgj4CBiyz+9WYBA8pNGJgDcSFRKBco=
go.opentelemetry.io/otel/sdk v1.24.0 h1:YMPPDNymmQN3ZgczicBY3B6sf9n62Dlj9pWD3ucgoDw=
go.opentelemetry.io/otel/sdk v1.24.0/go.mod h1:KVrIYw6tEubO9E96HQpcmpTKDVn9gdv35HoYiQWGDFg=
go.opentelemetry.io/otel/trace v1.24.0 h1:CsKnnL4dUAr/0llH9FKuc698G04IrpWV0MQA/Y1YELI=
go.opentelemetry.io/otel/trace v1.24.0/go.mod h1:HPc3Xr/cOApsBI154IU0OI0HJexz+aw5uPdbs3UCjNU=
go.opentelemetry.io/proto/otlp v1.0.0 h1:T0TX0tmXU8a3CbNXzEKGeU5mIVOdf0oykP+u2lIVU/I=
go.opentelemetry.io/proto/otlp v1.0.0/go.mod h1:Sy6pihPLfYHkr3NkUbEhGHFhINUSI/v80hjKIs5JXpM=
go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto=
go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE=
golang.org/x/exp v0.0.0-20250506013437-ce4c2cf36ca6 h1:y5zboxd6LQAqYIhHnB48p0ByQ/GnQx2BE33L8BOHQkI=
golang.org/x/exp v0.0.0-20250506013437-ce4c2cf36ca6/go.mod h1:U6Lno4MTRCDY+Ba7aCcauB9T60gsv5s4ralQzP72ZoQ=
golang.org/x/net v0.38.0 h1:vRMAPTMaeGqVhG5QyLJHqNDwecKTomGeqbnfZyKlBI8=
golang.org/x/net v0.38.0/go.mod h1:ivrbrMbzFq5J41QOQh0siUuly180yBYtLp+CKbEaFx8=
golang.org/x/sync v0.14.0 h1:woo0S4Yywslg6hp4eUFjTVOyKt0RookbpAHG4c1HmhQ=
golang.org/x/sync v0.14.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA=
golang.org/x/sys v0.37.0 h1:fdNQudmxPjkdUTPnLn5mdQv7Zwvbvpaxqs831goi9kQ=
golang.org/x/sys v0.37.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks=
golang.org/x/text v0.23.0 h1:D71I7dUrlY+VX0gQShAThNGHFxZ13dGLBHQLVl1mJlY=
golang.org/x/text v0.23.0/go.mod h1:/BLNzu4aZCJ1+kcD0DNRotWKage4q2rGVAg4o22unh4=
google.golang.org/genproto/googleapis/api v0.0.0-20240826202546-f6391c0de4c7 h1:YcyjlL1PRr2Q17/I0dPk2JmYS5CDXfcdb2Z3YRioEbw=
google.golang.org/genproto/googleapis/api v0.0.0-20240826202546-f6391c0de4c7/go.mod h1:OCdP9MfskevB/rbYvHTsXTtKC+3bHWajPdoKgjcYkfo=
google.golang.org/genproto/googleapis/rpc v0.0.0-20240826202546-f6391c0de4c7 h1:2035KHhUv+EpyB+hWgJnaWKJOdX1E95w2S8Rr4uWKTs=
google.golang.org/genproto/googleapis/rpc v0.0.0-20240826202546-f6391c0de4c7/go.mod h1:UqMtugtsSgubUsoxbuAoiCXvqvErP7Gf0so0mK9tHxU=
google.golang.org/grpc v1.65.0 h1:bs/cUb4lp1G5iImFFd3u5ixQzweKizoZJAwBNLR42lc=
google.golang.org/grpc v1.65.0/go.mod h1:WgYC2ypjlB0EiQi6wdKixMqukr6lBc0Vo+oOgjrM5ZQ=
google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg=
google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
================================================
FILE: _examples/08_literal/main_test.go
================================================
package main_test
import (
"context"
"log/slog"
"net"
"os"
"testing"
"github.com/google/go-cmp/cmp"
"github.com/google/go-cmp/cmp/cmpopts"
"go.opentelemetry.io/otel"
"go.opentelemetry.io/otel/attribute"
"go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc"
"go.opentelemetry.io/otel/propagation"
"go.opentelemetry.io/otel/sdk/resource"
sdktrace "go.opentelemetry.io/otel/sdk/trace"
semconv "go.opentelemetry.io/otel/semconv/v1.4.0"
"go.uber.org/goleak"
"google.golang.org/grpc"
"google.golang.org/grpc/test/bufconn"
"example/content"
"example/federation"
)
const bufSize = 1024
var (
listener *bufconn.Listener
contentClient content.ContentServiceClient
)
type clientConfig struct{}
func (c *clientConfig) Content_ContentServiceClient(cfg federation.FederationServiceClientConfig) (content.ContentServiceClient, error) {
return contentClient, nil
}
type ContentServer struct {
*content.UnimplementedContentServiceServer
}
func (s *ContentServer) GetContent(ctx context.Context, req *content.GetContentRequest) (*content.GetContentResponse, error) {
return &content.GetContentResponse{
Content: &content.Content{
ByField: req.GetByField(),
DoubleField: req.GetDoubleField(),
DoublesField: req.GetDoublesField(),
FloatField: req.GetFloatField(),
FloatsField: req.GetFloatsField(),
Int32Field: req.GetInt32Field(),
Int32SField: req.GetInt32SField(),
Int64Field: req.GetInt64Field(),
Int64SField: req.GetInt64SField(),
Uint32Field: req.GetUint32Field(),
Uint32SField: req.GetUint32SField(),
Uint64Field: req.GetUint64Field(),
Uint64SField: req.GetUint64SField(),
Sint32Field: req.GetSint32Field(),
Sint32SField: req.GetSint32SField(),
Sint64Field: req.GetSint64Field(),
Sint64SField: req.GetSint64SField(),
Fixed32Field: req.GetFixed32Field(),
Fixed32SField: req.GetFixed32SField(),
Fixed64Field: req.GetFixed64Field(),
Fixed64SField: req.GetFixed64SField(),
Sfixed32Field: req.GetSfixed32Field(),
Sfixed32SField: req.GetSfixed32SField(),
Sfixed64Field: req.GetSfixed64Field(),
Sfixed64SField: req.GetSfixed64SField(),
BoolField: req.GetBoolField(),
BoolsField: req.GetBoolsField(),
StringField: req.GetStringField(),
StringsField: req.GetStringsField(),
ByteStringField: req.GetByteStringField(),
ByteStringsField: req.GetByteStringsField(),
EnumField: req.GetEnumField(),
EnumsField: req.GetEnumsField(),
EnvField: req.GetEnvField(),
EnvsField: req.GetEnvsField(),
MessageField: req.GetMessageField(),
MessagesField: req.GetMessagesField(),
},
}, nil
}
func dialer(ctx context.Context, address string) (net.Conn, error) {
return listener.Dial()
}
func TestFederation(t *testing.T) {
defer goleak.VerifyNone(t)
ctx := context.Background()
listener = bufconn.Listen(bufSize)
if os.Getenv("ENABLE_JAEGER") != "" {
exporter, err := otlptracegrpc.New(ctx, otlptracegrpc.WithInsecure())
if err != nil {
t.Fatal(err)
}
tp := sdktrace.NewTracerProvider(
sdktrace.WithBatcher(exporter),
sdktrace.WithResource(
resource.NewWithAttributes(
semconv.SchemaURL,
semconv.ServiceNameKey.String("example08/literal"),
semconv.ServiceVersionKey.String("1.0.0"),
attribute.String("environment", "dev"),
),
),
sdktrace.WithSampler(sdktrace.AlwaysSample()),
)
defer tp.Shutdown(ctx)
otel.SetTextMapPropagator(propagation.TraceContext{})
otel.SetTracerProvider(tp)
}
conn, err := grpc.DialContext(ctx, "", grpc.WithContextDialer(dialer), grpc.WithInsecure())
if err != nil {
t.Fatal(err)
}
defer conn.Close()
contentClient = content.NewContentServiceClient(conn)
grpcServer := grpc.NewServer()
defer grpcServer.Stop()
logger := slog.New(slog.NewJSONHandler(os.Stdout, &slog.HandlerOptions{
Level: slog.LevelDebug,
}))
federationServer, err := federation.NewFederationService(federation.FederationServiceConfig{
Client: new(clientConfig),
Logger: logger,
})
if err != nil {
t.Fatal(err)
}
defer federation.CleanupFederationService(ctx, federationServer)
content.RegisterContentServiceServer(grpcServer, &ContentServer{})
federation.RegisterFederationServiceServer(grpcServer, federationServer)
go func() {
if err := grpcServer.Serve(listener); err != nil {
t.Fatal(err)
}
}()
t.Setenv("foo", "foo-value")
t.Setenv("bar", "bar-value")
client := federation.NewFederationServiceClient(conn)
res, err := client.Get(ctx, &federation.GetRequest{
Id: "foo",
})
if err != nil {
t.Fatal(err)
}
if diff := cmp.Diff(res, &federation.GetResponse{
Content: &federation.Content{
ByField: "foo",
DoubleField: 1.23,
DoublesField: []float64{4.56, 7.89},
FloatField: 4.56,
FloatsField: []float32{7.89, 1.23},
Int32Field: -1,
Int32SField: []int32{-2, -3},
Int64Field: -4,
Int64SField: []int64{-5, -6},
Uint32Field: 1,
Uint32SField: []uint32{2, 3},
Uint64Field: 4,
Uint64SField: []uint64{5, 6},
Sint32Field: -7,
Sint32SField: []int32{-8, -9},
Sint64Field: -10,
Sint64SField: []int64{-11, -12},
Fixed32Field: 10,
Fixed32SField: []uint32{11, 12},
Fixed64Field: 13,
Fixed64SField: []uint64{14, 15},
Sfixed32Field: -14,
Sfixed32SField: []int32{-15, -16},
Sfixed64Field: -17,
Sfixed64SField: []int64{-18, -19},
BoolField: true,
BoolsField: []bool{true, false},
StringField: "foo",
StringsField: []string{"hello", "world"},
ByteStringField: []byte("foo"),
ByteStringsField: [][]byte{[]byte("foo"), []byte("bar")},
EnumField: federation.ContentType_CONTENT_TYPE_1,
EnumsField: []federation.ContentType{federation.ContentType_CONTENT_TYPE_2, federation.ContentType_CONTENT_TYPE_3},
MessageField: &federation.Content{
DoubleField: 1.23,
DoublesField: []float64{4.56, 7.89},
},
MessagesField: []*federation.Content{{}, {}},
},
CelExpr: -8,
}, cmpopts.IgnoreUnexported(
federation.GetResponse{},
federation.Content{},
)); diff != "" {
t.Errorf("(-got, +want)\n%s", diff)
}
}
================================================
FILE: _examples/08_literal/proto/buf.yaml
================================================
version: v1
breaking:
use:
- FILE
lint:
use:
- DEFAULT
================================================
FILE: _examples/08_literal/proto/content/content.proto
================================================
syntax = "proto3";
package content;
option go_package = "example/content;content";
service ContentService {
rpc GetContent(GetContentRequest) returns (GetContentResponse) {};
}
message GetContentRequest {
string by_field = 1;
double double_field = 2;
repeated double doubles_field = 3;
float float_field = 4;
repeated float floats_field = 5;
int32 int32_field = 6;
repeated int32 int32s_field = 7;
int64 int64_field = 8;
repeated int64 int64s_field = 9;
uint32 uint32_field = 10;
repeated uint32 uint32s_field = 11;
uint64 uint64_field = 12;
repeated uint64 uint64s_field = 13;
sint32 sint32_field = 14;
repeated sint32 sint32s_field = 15;
sint64 sint64_field = 16;
repeated sint64 sint64s_field = 17;
fixed32 fixed32_field = 18;
repeated fixed32 fixed32s_field = 19;
fixed64 fixed64_field = 20;
repeated fixed64 fixed64s_field = 21;
sfixed32 sfixed32_field = 22;
repeated sfixed32 sfixed32s_field = 23;
sfixed64 sfixed64_field = 24;
repeated sfixed64 sfixed64s_field = 25;
bool bool_field = 26;
repeated bool bools_field = 27;
string string_field = 28;
repeated string strings_field = 29;
bytes byte_string_field = 30;
repeated bytes byte_strings_field = 31;
ContentType enum_field = 32;
repeated ContentType enums_field = 33;
string env_field = 34;
repeated string envs_field = 35;
Content message_field = 36;
repeated Content messages_field = 37;
}
message GetContentResponse {
Content content = 1;
}
enum ContentType {
CONTENT_TYPE_1 = 0;
CONTENT_TYPE_2 = 1;
CONTENT_TYPE_3 = 2;
}
message Content {
string by_field = 1;
double double_field = 2;
repeated double doubles_field = 3;
float float_field = 4;
repeated float floats_field = 5;
int32 int32_field = 6;
repeated int32 int32s_field = 7;
int64 int64_field = 8;
repeated int64 int64s_field = 9;
uint32 uint32_field = 10;
repeated uint32 uint32s_field = 11;
uint64 uint64_field = 12;
repeated uint64 uint64s_field = 13;
sint32 sint32_field = 14;
repeated sint32 sint32s_field = 15;
sint64 sint64_field = 16;
repeated sint64 sint64s_field = 17;
fixed32 fixed32_field = 18;
repeated fixed32 fixed32s_field = 19;
fixed64 fixed64_field = 20;
repeated fixed64 fixed64s_field = 21;
sfixed32 sfixed32_field = 22;
repeated sfixed32 sfixed32s_field = 23;
sfixed64 sfixed64_field = 24;
repeated sfixed64 sfixed64s_field = 25;
bool bool_field = 26;
repeated bool bools_field = 27;
string string_field = 28;
repeated string strings_field = 29;
bytes byte_string_field = 30;
repeated bytes byte_strings_field = 31;
ContentType enum_field = 32;
repeated ContentType enums_field = 33;
string env_field = 34;
repeated string envs_field = 35;
Content message_field = 36;
repeated Content messages_field = 37;
}
================================================
FILE: _examples/08_literal/proto/federation/federation.proto
================================================
syntax = "proto3";
package org.federation;
import "grpc/federation/federation.proto";
option go_package = "example/federation;federation";
option (grpc.federation.file)= {
import: ["content/content.proto"]
};
service FederationService {
option (grpc.federation.service) = {};
rpc Get(GetRequest) returns (GetResponse) {};
}
message GetRequest {
string id = 1;
}
message GetResponse {
option (grpc.federation.message) = {
def {
name: "res"
call {
method: "content.ContentService/GetContent"
request: [
{ field: "by_field", by: "$.id" },
{ field: "double_field", by: "1.23" },
{ field: "doubles_field", by: "[4.56, 7.89]"},
{ field: "float_field", by: "4.56" },
{ field: "floats_field", by: "[7.89, 1.23]"},
{ field: "int32_field", by: "-1" },
{ field: "int32s_field", by: "[-2, -3]"},
{ field: "int64_field", by: "-4"},
{ field: "int64s_field", by: "[-5, -6]"},
{ field: "uint32_field", by: "1u" },
{ field: "uint32s_field", by: "[2u, 3u]"},
{ field: "uint64_field", by: "4u" },
{ field: "uint64s_field", by: "[5u, 6u]"},
{ field: "sint32_field", by: "-7" },
{ field: "sint32s_field", by: "[-8, -9]"},
{ field: "sint64_field", by: "-10" },
{ field: "sint64s_field", by: "[-11, -12]"},
{ field: "fixed32_field", by: "10u" },
{ field: "fixed32s_field", by: "[11u, 12u]"},
{ field: "fixed64_field", by: "13u" },
{ field: "fixed64s_field", by: "[14u, 15u]"},
{ field: "sfixed32_field", by: "-14" },
{ field: "sfixed32s_field", by: "[-15, -16]"},
{ field: "sfixed64_field", by: "-17" },
{ field: "sfixed64s_field", by: "[-18, -19]"},
{ field: "bool_field", by: "true" },
{ field: "bools_field", by: "[true, false]"},
{ field: "string_field", by: "'foo'" },
{ field: "strings_field", by: "['hello', 'world']"},
{ field: "byte_string_field", by: "b'foo'" },
{ field: "byte_strings_field", by: "[b'foo', b'bar']"},
{ field: "enum_field", by: "content.ContentType.CONTENT_TYPE_1" },
{ field: "enums_field", by: "[content.ContentType.CONTENT_TYPE_2, content.ContentType.CONTENT_TYPE_3]"},
{ field: "message_field", by: "content.Content{double_field: 1.23, doubles_field: [4.56, 7.89]}"},
{ field: "messages_field", by: "[content.Content{}, content.Content{}]"}
]
}
}
def { name: "content", by: "res.content" }
};
Content content = 1 [(grpc.federation.field).by = "content"];
int64 cel_expr = 2 [(grpc.federation.field).by = "content.int32_field + content.sint32_field"];
}
enum ContentType {
option (grpc.federation.enum).alias = "content.ContentType";
CONTENT_TYPE_1 = 0;
CONTENT_TYPE_2 = 1;
CONTENT_TYPE_3 = 2;
}
message Content {
option (grpc.federation.message).alias = "content.Content";
string by_field = 1;
double double_field = 2;
repeated double doubles_field = 3;
float float_field = 4;
repeated float floats_field = 5;
int32 int32_field = 6;
repeated int32 int32s_field = 7;
int64 int64_field = 8;
repeated int64 int64s_field = 9;
uint32 uint32_field = 10;
repeated uint32 uint32s_field = 11;
uint64 uint64_field = 12;
repeated uint64 uint64s_field = 13;
sint32 sint32_field = 14;
repeated sint32 sint32s_field = 15;
sint64 sint64_field = 16;
repeated sint64 sint64s_field = 17;
fixed32 fixed32_field = 18;
repeated fixed32 fixed32s_field = 19;
fixed64 fixed64_field = 20;
repeated fixed64 fixed64s_field = 21;
sfixed32 sfixed32_field = 22;
repeated sfixed32 sfixed32s_field = 23;
sfixed64 sfixed64_field = 24;
repeated sfixed64 sfixed64s_field = 25;
bool bool_field = 26;
repeated bool bools_field = 27;
string string_field = 28;
repeated string strings_field = 29;
bytes byte_string_field = 30;
repeated bytes byte_strings_field = 31;
ContentType enum_field = 32;
repeated ContentType enums_field = 33;
string env_field = 34;
repeated string envs_field = 35;
Content message_field = 36;
repeated Content messages_field = 37;
}
================================================
FILE: _examples/09_multi_user/.gitignore
================================================
grpc/federation
================================================
FILE: _examples/09_multi_user/Makefile
================================================
MAKEFILE_DIR := $(dir $(lastword $(MAKEFILE_LIST)))
GOBIN := $(MAKEFILE_DIR)/../../bin
PATH := $(GOBIN):$(PATH)
JAEGER_IMAGE := jaegertracing/all-in-one:latest
.PHONY: generate
generate:
$(GOBIN)/buf generate
.PHONY: lint
lint:
@$(GOBIN)/grpc-federation-linter -Iproto -Iproto_deps ./proto/federation/federation.proto
.PHONY: test
test:
go test -race ./ -count=1
.PHONY: grpc-federation/generate
grpc-federation/generate:
@$(GOBIN)/grpc-federation-generator ./proto/federation/federation.proto
.PHONY: grpc-federation/watch
grpc-federation/watch:
@$(GOBIN)/grpc-federation-generator -w
.PHONY: jaeger/start
jaeger/start:
@docker run \
-e COLLECTOR_OTLP_ENABLED=true \
-p 16686:16686 \
-p 4317:4317 \
-p 4318:4318 \
-d \
$(JAEGER_IMAGE)
.PHONY: jaeger/stop
jaeger/stop:
@docker stop $(shell docker ps -q --filter ancestor=$(JAEGER_IMAGE))
================================================
FILE: _examples/09_multi_user/buf.gen.yaml
================================================
version: v1
managed:
enabled: true
plugins:
- plugin: go
out: .
opt: paths=source_relative
- plugin: go-grpc
out: .
opt: paths=source_relative
- plugin: grpc-federation
out: .
opt:
- paths=source_relative
- import_paths=proto
================================================
FILE: _examples/09_multi_user/buf.work.yaml
================================================
version: v1
directories:
- proto
- proto_deps
================================================
FILE: _examples/09_multi_user/federation/federation.pb.go
================================================
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.33.0
// protoc (unknown)
// source: federation/federation.proto
package federation
import (
_ "github.com/mercari/grpc-federation/grpc/federation"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
type GetRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
}
func (x *GetRequest) Reset() {
*x = GetRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_federation_federation_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GetRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetRequest) ProtoMessage() {}
func (x *GetRequest) ProtoReflect() protoreflect.Message {
mi := &file_federation_federation_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GetRequest.ProtoReflect.Descriptor instead.
func (*GetRequest) Descriptor() ([]byte, []int) {
return file_federation_federation_proto_rawDescGZIP(), []int{0}
}
type GetResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
User *User `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"`
User2 *User `protobuf:"bytes,2,opt,name=user2,proto3" json:"user2,omitempty"`
}
func (x *GetResponse) Reset() {
*x = GetResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_federation_federation_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GetResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetResponse) ProtoMessage() {}
func (x *GetResponse) ProtoReflect() protoreflect.Message {
mi := &file_federation_federation_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GetResponse.ProtoReflect.Descriptor instead.
func (*GetResponse) Descriptor() ([]byte, []int) {
return file_federation_federation_proto_rawDescGZIP(), []int{1}
}
func (x *GetResponse) GetUser() *User {
if x != nil {
return x.User
}
return nil
}
func (x *GetResponse) GetUser2() *User {
if x != nil {
return x.User2
}
return nil
}
type User struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"`
}
func (x *User) Reset() {
*x = User{}
if protoimpl.UnsafeEnabled {
mi := &file_federation_federation_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *User) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*User) ProtoMessage() {}
func (x *User) ProtoReflect() protoreflect.Message {
mi := &file_federation_federation_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use User.ProtoReflect.Descriptor instead.
func (*User) Descriptor() ([]byte, []int) {
return file_federation_federation_proto_rawDescGZIP(), []int{2}
}
func (x *User) GetId() string {
if x != nil {
return x.Id
}
return ""
}
func (x *User) GetName() string {
if x != nil {
return x.Name
}
return ""
}
type UserID struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Value string `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"`
}
func (x *UserID) Reset() {
*x = UserID{}
if protoimpl.UnsafeEnabled {
mi := &file_federation_federation_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *UserID) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*UserID) ProtoMessage() {}
func (x *UserID) ProtoReflect() protoreflect.Message {
mi := &file_federation_federation_proto_msgTypes[3]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use UserID.ProtoReflect.Descriptor instead.
func (*UserID) Descriptor() ([]byte, []int) {
return file_federation_federation_proto_rawDescGZIP(), []int{3}
}
func (x *UserID) GetValue() string {
if x != nil {
return x.Value
}
return ""
}
type Sub struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
}
func (x *Sub) Reset() {
*x = Sub{}
if protoimpl.UnsafeEnabled {
mi := &file_federation_federation_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Sub) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Sub) ProtoMessage() {}
func (x *Sub) ProtoReflect() protoreflect.Message {
mi := &file_federation_federation_proto_msgTypes[4]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Sub.ProtoReflect.Descriptor instead.
func (*Sub) Descriptor() ([]byte, []int) {
return file_federation_federation_proto_rawDescGZIP(), []int{4}
}
var File_federation_federation_proto protoreflect.FileDescriptor
var file_federation_federation_proto_rawDesc = []byte{
0x0a, 0x1b, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x66, 0x65, 0x64,
0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0e, 0x6f,
0x72, 0x67, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x20, 0x67,
0x72, 0x70, 0x63, 0x2f, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x66,
0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22,
0x0c, 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0xdd, 0x01,
0x0a, 0x0b, 0x47, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x33, 0x0a,
0x04, 0x75, 0x73, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6f, 0x72,
0x67, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x55, 0x73, 0x65,
0x72, 0x42, 0x09, 0x9a, 0x4a, 0x06, 0x12, 0x04, 0x75, 0x73, 0x65, 0x72, 0x52, 0x04, 0x75, 0x73,
0x65, 0x72, 0x12, 0x36, 0x0a, 0x05, 0x75, 0x73, 0x65, 0x72, 0x32, 0x18, 0x02, 0x20, 0x01, 0x28,
0x0b, 0x32, 0x14, 0x2e, 0x6f, 0x72, 0x67, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69,
0x6f, 0x6e, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x42, 0x0a, 0x9a, 0x4a, 0x07, 0x12, 0x05, 0x75, 0x73,
0x65, 0x72, 0x32, 0x52, 0x05, 0x75, 0x73, 0x65, 0x72, 0x32, 0x3a, 0x61, 0x9a, 0x4a, 0x5e, 0x0a,
0x0f, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x6a, 0x08, 0x0a, 0x06, 0x55, 0x73, 0x65, 0x72, 0x49, 0x44,
0x0a, 0x24, 0x0a, 0x04, 0x75, 0x73, 0x65, 0x72, 0x6a, 0x1c, 0x0a, 0x04, 0x55, 0x73, 0x65, 0x72,
0x12, 0x14, 0x0a, 0x07, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x12, 0x09, 0x75, 0x69, 0x64,
0x2e, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x0a, 0x25, 0x0a, 0x05, 0x75, 0x73, 0x65, 0x72, 0x32, 0x6a,
0x1c, 0x0a, 0x04, 0x55, 0x73, 0x65, 0x72, 0x12, 0x14, 0x0a, 0x07, 0x75, 0x73, 0x65, 0x72, 0x5f,
0x69, 0x64, 0x12, 0x09, 0x75, 0x69, 0x64, 0x2e, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x87, 0x01,
0x0a, 0x04, 0x55, 0x73, 0x65, 0x72, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01,
0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x19, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03,
0x20, 0x01, 0x28, 0x09, 0x42, 0x05, 0x9a, 0x4a, 0x02, 0x08, 0x01, 0x52, 0x04, 0x6e, 0x61, 0x6d,
0x65, 0x3a, 0x54, 0x9a, 0x4a, 0x51, 0x0a, 0x32, 0x0a, 0x03, 0x72, 0x65, 0x73, 0x72, 0x2b, 0x0a,
0x18, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63,
0x65, 0x2f, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x12, 0x0f, 0x0a, 0x02, 0x69, 0x64, 0x12,
0x09, 0x24, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x0a, 0x12, 0x0a, 0x04, 0x75, 0x73,
0x65, 0x72, 0x18, 0x01, 0x5a, 0x08, 0x72, 0x65, 0x73, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x0a, 0x07,
0x6a, 0x05, 0x0a, 0x03, 0x53, 0x75, 0x62, 0x22, 0x38, 0x0a, 0x06, 0x55, 0x73, 0x65, 0x72, 0x49,
0x44, 0x12, 0x20, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
0x42, 0x0a, 0x9a, 0x4a, 0x07, 0x12, 0x05, 0x27, 0x78, 0x78, 0x78, 0x27, 0x52, 0x05, 0x76, 0x61,
0x6c, 0x75, 0x65, 0x3a, 0x0c, 0x9a, 0x4a, 0x09, 0x0a, 0x07, 0x6a, 0x05, 0x0a, 0x03, 0x53, 0x75,
0x62, 0x22, 0x0c, 0x0a, 0x03, 0x53, 0x75, 0x62, 0x3a, 0x05, 0x9a, 0x4a, 0x02, 0x10, 0x01, 0x32,
0x5a, 0x0a, 0x11, 0x46, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x72,
0x76, 0x69, 0x63, 0x65, 0x12, 0x40, 0x0a, 0x03, 0x47, 0x65, 0x74, 0x12, 0x1a, 0x2e, 0x6f, 0x72,
0x67, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x47, 0x65, 0x74,
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x6f, 0x72, 0x67, 0x2e, 0x66, 0x65,
0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70,
0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x1a, 0x03, 0x9a, 0x4a, 0x00, 0x42, 0xb1, 0x01, 0x9a, 0x4a,
0x11, 0x12, 0x0f, 0x75, 0x73, 0x65, 0x72, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f,
0x74, 0x6f, 0x0a, 0x12, 0x63, 0x6f, 0x6d, 0x2e, 0x6f, 0x72, 0x67, 0x2e, 0x66, 0x65, 0x64, 0x65,
0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x0f, 0x46, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69,
0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x1d, 0x65, 0x78, 0x61, 0x6d, 0x70,
0x6c, 0x65, 0x2f, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x3b, 0x66, 0x65,
0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0xa2, 0x02, 0x03, 0x4f, 0x46, 0x58, 0xaa, 0x02,
0x0e, 0x4f, 0x72, 0x67, 0x2e, 0x46, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0xca,
0x02, 0x0e, 0x4f, 0x72, 0x67, 0x5c, 0x46, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e,
0xe2, 0x02, 0x1a, 0x4f, 0x72, 0x67, 0x5c, 0x46, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f,
0x6e, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0f,
0x4f, 0x72, 0x67, 0x3a, 0x3a, 0x46, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x62,
0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_federation_federation_proto_rawDescOnce sync.Once
file_federation_federation_proto_rawDescData = file_federation_federation_proto_rawDesc
)
func file_federation_federation_proto_rawDescGZIP() []byte {
file_federation_federation_proto_rawDescOnce.Do(func() {
file_federation_federation_proto_rawDescData = protoimpl.X.CompressGZIP(file_federation_federation_proto_rawDescData)
})
return file_federation_federation_proto_rawDescData
}
var file_federation_federation_proto_msgTypes = make([]protoimpl.MessageInfo, 5)
var file_federation_federation_proto_goTypes = []interface{}{
(*GetRequest)(nil), // 0: org.federation.GetRequest
(*GetResponse)(nil), // 1: org.federation.GetResponse
(*User)(nil), // 2: org.federation.User
(*UserID)(nil), // 3: org.federation.UserID
(*Sub)(nil), // 4: org.federation.Sub
}
var file_federation_federation_proto_depIdxs = []int32{
2, // 0: org.federation.GetResponse.user:type_name -> org.federation.User
2, // 1: org.federation.GetResponse.user2:type_name -> org.federation.User
0, // 2: org.federation.FederationService.Get:input_type -> org.federation.GetRequest
1, // 3: org.federation.FederationService.Get:output_type -> org.federation.GetResponse
3, // [3:4] is the sub-list for method output_type
2, // [2:3] is the sub-list for method input_type
2, // [2:2] is the sub-list for extension type_name
2, // [2:2] is the sub-list for extension extendee
0, // [0:2] is the sub-list for field type_name
}
func init() { file_federation_federation_proto_init() }
func file_federation_federation_proto_init() {
if File_federation_federation_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_federation_federation_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_federation_federation_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_federation_federation_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*User); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_federation_federation_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*UserID); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_federation_federation_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Sub); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_federation_federation_proto_rawDesc,
NumEnums: 0,
NumMessages: 5,
NumExtensions: 0,
NumServices: 1,
},
GoTypes: file_federation_federation_proto_goTypes,
DependencyIndexes: file_federation_federation_proto_depIdxs,
MessageInfos: file_federation_federation_proto_msgTypes,
}.Build()
File_federation_federation_proto = out.File
file_federation_federation_proto_rawDesc = nil
file_federation_federation_proto_goTypes = nil
file_federation_federation_proto_depIdxs = nil
}
================================================
FILE: _examples/09_multi_user/federation/federation_grpc.pb.go
================================================
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.3.0
// - protoc (unknown)
// source: federation/federation.proto
package federation
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 (
FederationService_Get_FullMethodName = "/org.federation.FederationService/Get"
)
// FederationServiceClient is the client API for FederationService 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 FederationServiceClient interface {
Get(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*GetResponse, error)
}
type federationServiceClient struct {
cc grpc.ClientConnInterface
}
func NewFederationServiceClient(cc grpc.ClientConnInterface) FederationServiceClient {
return &federationServiceClient{cc}
}
func (c *federationServiceClient) Get(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*GetResponse, error) {
out := new(GetResponse)
err := c.cc.Invoke(ctx, FederationService_Get_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// FederationServiceServer is the server API for FederationService service.
// All implementations must embed UnimplementedFederationServiceServer
// for forward compatibility
type FederationServiceServer interface {
Get(context.Context, *GetRequest) (*GetResponse, error)
mustEmbedUnimplementedFederationServiceServer()
}
// UnimplementedFederationServiceServer must be embedded to have forward compatible implementations.
type UnimplementedFederationServiceServer struct {
}
func (UnimplementedFederationServiceServer) Get(context.Context, *GetRequest) (*GetResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method Get not implemented")
}
func (UnimplementedFederationServiceServer) mustEmbedUnimplementedFederationServiceServer() {}
// UnsafeFederationServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to FederationServiceServer will
// result in compilation errors.
type UnsafeFederationServiceServer interface {
mustEmbedUnimplementedFederationServiceServer()
}
func RegisterFederationServiceServer(s grpc.ServiceRegistrar, srv FederationServiceServer) {
s.RegisterService(&FederationService_ServiceDesc, srv)
}
func _FederationService_Get_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(FederationServiceServer).Get(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: FederationService_Get_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(FederationServiceServer).Get(ctx, req.(*GetRequest))
}
return interceptor(ctx, in, info, handler)
}
// FederationService_ServiceDesc is the grpc.ServiceDesc for FederationService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var FederationService_ServiceDesc = grpc.ServiceDesc{
ServiceName: "org.federation.FederationService",
HandlerType: (*FederationServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "Get",
Handler: _FederationService_Get_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "federation/federation.proto",
}
================================================
FILE: _examples/09_multi_user/federation/federation_grpc_federation.pb.go
================================================
// Code generated by protoc-gen-grpc-federation. DO NOT EDIT!
// versions:
//
// protoc-gen-grpc-federation: (devel)
//
// source: federation/federation.proto
package federation
import (
"context"
"io"
"log/slog"
"reflect"
grpcfed "github.com/mercari/grpc-federation/grpc/federation"
grpcfedcel "github.com/mercari/grpc-federation/grpc/federation/cel"
"go.opentelemetry.io/otel"
"go.opentelemetry.io/otel/trace"
user "example/user"
)
var (
_ = reflect.Invalid // to avoid "imported and not used error"
)
// Org_Federation_GetResponseVariable represents variable definitions in "org.federation.GetResponse".
type FederationService_Org_Federation_GetResponseVariable struct {
Uid *UserID
User *User
User2 *User
}
// Org_Federation_GetResponseArgument is argument for "org.federation.GetResponse" message.
type FederationService_Org_Federation_GetResponseArgument struct {
FederationService_Org_Federation_GetResponseVariable
}
// Org_Federation_SubVariable represents variable definitions in "org.federation.Sub".
type FederationService_Org_Federation_SubVariable struct {
}
// Org_Federation_SubArgument is argument for "org.federation.Sub" message.
type FederationService_Org_Federation_SubArgument struct {
FederationService_Org_Federation_SubVariable
}
// Org_Federation_UserVariable represents variable definitions in "org.federation.User".
type FederationService_Org_Federation_UserVariable struct {
Res *user.GetUserResponse
User *user.User
XDef2 *Sub
}
// Org_Federation_UserArgument is argument for "org.federation.User" message.
type FederationService_Org_Federation_UserArgument struct {
UserId string
FederationService_Org_Federation_UserVariable
}
// Org_Federation_UserIDVariable represents variable definitions in "org.federation.UserID".
type FederationService_Org_Federation_UserIDVariable struct {
}
// Org_Federation_UserIDArgument is argument for "org.federation.UserID" message.
type FederationService_Org_Federation_UserIDArgument struct {
FederationService_Org_Federation_UserIDVariable
}
// Org_Federation_User_NameArgument is custom resolver's argument for "name" field of "org.federation.User" message.
type FederationService_Org_Federation_User_NameArgument struct {
*FederationService_Org_Federation_UserArgument
}
// FederationServiceConfig configuration required to initialize the service that use GRPC Federation.
type FederationServiceConfig struct {
// Client provides a factory that creates the gRPC Client needed to invoke methods of the gRPC Service on which the Federation Service depends.
// If this interface is not provided, an error is returned during initialization.
Client FederationServiceClientFactory // required
// Resolver provides an interface to directly implement message resolver and field resolver not defined in Protocol Buffers.
// If this interface is not provided, an error is returned during initialization.
Resolver FederationServiceResolver // required
// ErrorHandler Federation Service often needs to convert errors received from downstream services.
// If an error occurs during method execution in the Federation Service, this error handler is called and the returned error is treated as a final error.
ErrorHandler grpcfed.ErrorHandler
// Logger sets the logger used to output Debug/Info/Error information.
Logger *slog.Logger
}
// FederationServiceClientFactory provides a factory that creates the gRPC Client needed to invoke methods of the gRPC Service on which the Federation Service depends.
type FederationServiceClientFactory interface {
// User_UserServiceClient create a gRPC Client to be used to call methods in user.UserService.
User_UserServiceClient(FederationServiceClientConfig) (user.UserServiceClient, error)
}
// FederationServiceClientConfig helper to create gRPC client.
// Hints for creating a gRPC Client.
type FederationServiceClientConfig struct {
// Service FQDN ( `.` ) of the service on Protocol Buffers.
Service string
}
// FederationServiceDependentClientSet has a gRPC client for all services on which the federation service depends.
// This is provided as an argument when implementing the custom resolver.
type FederationServiceDependentClientSet struct {
User_UserServiceClient user.UserServiceClient
}
// FederationServiceResolver provides an interface to directly implement message resolver and field resolver not defined in Protocol Buffers.
type FederationServiceResolver interface {
// Resolve_Org_Federation_Sub implements resolver for "org.federation.Sub".
Resolve_Org_Federation_Sub(context.Context, *FederationService_Org_Federation_SubArgument) (*Sub, error)
// Resolve_Org_Federation_User_Name implements resolver for "org.federation.User.name".
Resolve_Org_Federation_User_Name(context.Context, *FederationService_Org_Federation_User_NameArgument) (string, error)
}
// FederationServiceCELPluginWasmConfig type alias for grpcfedcel.WasmConfig.
type FederationServiceCELPluginWasmConfig = grpcfedcel.WasmConfig
// FederationServiceCELPluginConfig hints for loading a WebAssembly based plugin.
type FederationServiceCELPluginConfig struct {
CacheDir string
}
// FederationServiceUnimplementedResolver a structure implemented to satisfy the Resolver interface.
// An Unimplemented error is always returned.
// This is intended for use when there are many Resolver interfaces that do not need to be implemented,
// by embedding them in a resolver structure that you have created.
type FederationServiceUnimplementedResolver struct{}
// Resolve_Org_Federation_Sub resolve "org.federation.Sub".
// This method always returns Unimplemented error.
func (FederationServiceUnimplementedResolver) Resolve_Org_Federation_Sub(context.Context, *FederationService_Org_Federation_SubArgument) (ret *Sub, e error) {
e = grpcfed.GRPCErrorf(grpcfed.UnimplementedCode, "method Resolve_Org_Federation_Sub not implemented")
return
}
// Resolve_Org_Federation_User_Name resolve "org.federation.User.name".
// This method always returns Unimplemented error.
func (FederationServiceUnimplementedResolver) Resolve_Org_Federation_User_Name(context.Context, *FederationService_Org_Federation_User_NameArgument) (ret string, e error) {
e = grpcfed.GRPCErrorf(grpcfed.UnimplementedCode, "method Resolve_Org_Federation_User_Name not implemented")
return
}
const (
FederationService_DependentMethod_User_UserService_GetUser = "/user.UserService/GetUser"
)
// FederationService represents Federation Service.
type FederationService struct {
UnimplementedFederationServiceServer
cfg FederationServiceConfig
logger *slog.Logger
isLogLevelDebug bool
errorHandler grpcfed.ErrorHandler
celCacheMap *grpcfed.CELCacheMap
tracer trace.Tracer
resolver FederationServiceResolver
celTypeHelper *grpcfed.CELTypeHelper
celEnvOpts []grpcfed.CELEnvOption
celPlugins []*grpcfedcel.CELPlugin
client *FederationServiceDependentClientSet
}
// NewFederationService creates FederationService instance by FederationServiceConfig.
func NewFederationService(cfg FederationServiceConfig) (*FederationService, error) {
if cfg.Client == nil {
return nil, grpcfed.ErrClientConfig
}
if cfg.Resolver == nil {
return nil, grpcfed.ErrResolverConfig
}
User_UserServiceClient, err := cfg.Client.User_UserServiceClient(FederationServiceClientConfig{
Service: "user.UserService",
})
if err != nil {
return nil, err
}
logger := cfg.Logger
if logger == nil {
logger = slog.New(slog.NewJSONHandler(io.Discard, nil))
}
tracer := otel.Tracer("org.federation.FederationService")
ctx := grpcfed.WithLogger(context.Background(), logger)
ctx = grpcfed.WithTracer(ctx, tracer)
errorHandler := cfg.ErrorHandler
if errorHandler == nil {
errorHandler = func(ctx context.Context, methodName string, err error) error { return err }
}
celTypeHelperFieldMap := grpcfed.CELTypeHelperFieldMap{
"grpc.federation.private.org.federation.GetResponseArgument": {},
"grpc.federation.private.org.federation.SubArgument": {},
"grpc.federation.private.org.federation.UserArgument": {
"user_id": grpcfed.NewCELFieldType(grpcfed.CELStringType, "UserId"),
},
"grpc.federation.private.org.federation.UserIDArgument": {},
}
celTypeHelper := grpcfed.NewCELTypeHelper("org.federation", celTypeHelperFieldMap)
var celEnvOpts []grpcfed.CELEnvOption
celEnvOpts = append(celEnvOpts, grpcfed.NewDefaultEnvOptions(celTypeHelper)...)
celEnvOpts = append(celEnvOpts, grpcfed.GRPCErrorAccessorOptions(celTypeHelper, "user.GetUserResponse")...)
svc := &FederationService{
cfg: cfg,
logger: logger,
isLogLevelDebug: logger.Enabled(context.Background(), slog.LevelDebug),
errorHandler: errorHandler,
celEnvOpts: celEnvOpts,
celTypeHelper: celTypeHelper,
celCacheMap: grpcfed.NewCELCacheMap(),
tracer: tracer,
resolver: cfg.Resolver,
client: &FederationServiceDependentClientSet{
User_UserServiceClient: User_UserServiceClient,
},
}
if resolver, ok := cfg.Resolver.(grpcfed.CustomResolverInitializer); ok {
ctx := context.Background()
if err := resolver.Init(ctx); err != nil {
return nil, err
}
}
return svc, nil
}
// CleanupFederationService cleanup all resources to prevent goroutine leaks.
func CleanupFederationService(ctx context.Context, svc *FederationService) {
svc.cleanup(ctx)
}
func (s *FederationService) cleanup(ctx context.Context) {
for _, plugin := range s.celPlugins {
plugin.Close()
}
}
// Get implements "org.federation.FederationService/Get" method.
func (s *FederationService) Get(ctx context.Context, req *GetRequest) (res *GetResponse, e error) {
ctx, span := s.tracer.Start(ctx, "org.federation.FederationService/Get")
defer span.End()
ctx = grpcfed.WithLogger(ctx, s.logger)
ctx = grpcfed.WithCELCacheMap(ctx, s.celCacheMap)
defer func() {
if r := recover(); r != nil {
e = grpcfed.RecoverError(r, grpcfed.StackTrace())
grpcfed.OutputErrorLog(ctx, e)
}
}()
defer func() {
for _, celPlugin := range s.celPlugins {
celPlugin.Cleanup()
}
}()
res, err := s.resolve_Org_Federation_GetResponse(ctx, &FederationService_Org_Federation_GetResponseArgument{})
if err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
grpcfed.OutputErrorLog(ctx, err)
return nil, err
}
return res, nil
}
// resolve_Org_Federation_GetResponse resolve "org.federation.GetResponse" message.
func (s *FederationService) resolve_Org_Federation_GetResponse(ctx context.Context, req *FederationService_Org_Federation_GetResponseArgument) (*GetResponse, error) {
ctx, span := s.tracer.Start(ctx, "org.federation.GetResponse")
defer span.End()
ctx = grpcfed.WithLogger(ctx, grpcfed.Logger(ctx), grpcfed.LogAttrs(ctx)...)
grpcfed.Logger(ctx).DebugContext(ctx, "resolve org.federation.GetResponse", slog.Any("message_args", s.logvalue_Org_Federation_GetResponseArgument(req)))
type localValueType struct {
*grpcfed.LocalValue
vars struct {
Uid *UserID
User *User
User2 *User
}
}
value := &localValueType{LocalValue: grpcfed.NewLocalValue(ctx, s.celEnvOpts, "grpc.federation.private.org.federation.GetResponseArgument", req)}
ctx = grpcfed.WithLocalValue(ctx, value.LocalValue)
/*
def {
name: "uid"
message {
name: "UserID"
}
}
*/
def_uid := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[*UserID, *localValueType]{
Name: `uid`,
Type: grpcfed.CELObjectType("org.federation.UserID"),
Setter: func(value *localValueType, v *UserID) error {
value.vars.Uid = v
return nil
},
Message: func(ctx context.Context, value *localValueType) (any, error) {
args := &FederationService_Org_Federation_UserIDArgument{}
ret, err := s.resolve_Org_Federation_UserID(ctx, args)
if err != nil {
return nil, err
}
return ret, nil
},
})
}
/*
def {
name: "user"
message {
name: "User"
args { name: "user_id", by: "uid.value" }
}
}
*/
def_user := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[*User, *localValueType]{
Name: `user`,
Type: grpcfed.CELObjectType("org.federation.User"),
Setter: func(value *localValueType, v *User) error {
value.vars.User = v
return nil
},
Message: func(ctx context.Context, value *localValueType) (any, error) {
args := &FederationService_Org_Federation_UserArgument{}
// { name: "user_id", by: "uid.value" }
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[string]{
Value: value,
Expr: `uid.value`,
CacheIndex: 1,
Setter: func(v string) error {
args.UserId = v
return nil
},
}); err != nil {
return nil, err
}
ret, err := s.resolve_Org_Federation_User(ctx, args)
if err != nil {
return nil, err
}
return ret, nil
},
})
}
/*
def {
name: "user2"
message {
name: "User"
args { name: "user_id", by: "uid.value" }
}
}
*/
def_user2 := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[*User, *localValueType]{
Name: `user2`,
Type: grpcfed.CELObjectType("org.federation.User"),
Setter: func(value *localValueType, v *User) error {
value.vars.User2 = v
return nil
},
Message: func(ctx context.Context, value *localValueType) (any, error) {
args := &FederationService_Org_Federation_UserArgument{}
// { name: "user_id", by: "uid.value" }
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[string]{
Value: value,
Expr: `uid.value`,
CacheIndex: 2,
Setter: func(v string) error {
args.UserId = v
return nil
},
}); err != nil {
return nil, err
}
ret, err := s.resolve_Org_Federation_User(ctx, args)
if err != nil {
return nil, err
}
return ret, nil
},
})
}
// A tree view of message dependencies is shown below.
/*
uid ─┐
user ─┐
uid ─┐ │
user2 ─┤
*/
eg, ctx1 := grpcfed.ErrorGroupWithContext(ctx)
grpcfed.GoWithRecover(eg, func() (any, error) {
if err := def_uid(ctx1); err != nil {
grpcfed.RecordErrorToSpan(ctx1, err)
return nil, err
}
if err := def_user(ctx1); err != nil {
grpcfed.RecordErrorToSpan(ctx1, err)
return nil, err
}
return nil, nil
})
grpcfed.GoWithRecover(eg, func() (any, error) {
if err := def_uid(ctx1); err != nil {
grpcfed.RecordErrorToSpan(ctx1, err)
return nil, err
}
if err := def_user2(ctx1); err != nil {
grpcfed.RecordErrorToSpan(ctx1, err)
return nil, err
}
return nil, nil
})
if err := eg.Wait(); err != nil {
return nil, err
}
// assign named parameters to message arguments to pass to the custom resolver.
req.FederationService_Org_Federation_GetResponseVariable.Uid = value.vars.Uid
req.FederationService_Org_Federation_GetResponseVariable.User = value.vars.User
req.FederationService_Org_Federation_GetResponseVariable.User2 = value.vars.User2
// create a message value to be returned.
ret := &GetResponse{}
// field binding section.
// (grpc.federation.field).by = "user"
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[*User]{
Value: value,
Expr: `user`,
CacheIndex: 3,
Setter: func(v *User) error {
ret.User = v
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
// (grpc.federation.field).by = "user2"
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[*User]{
Value: value,
Expr: `user2`,
CacheIndex: 4,
Setter: func(v *User) error {
ret.User2 = v
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
grpcfed.Logger(ctx).DebugContext(ctx, "resolved org.federation.GetResponse", slog.Any("org.federation.GetResponse", s.logvalue_Org_Federation_GetResponse(ret)))
return ret, nil
}
// resolve_Org_Federation_Sub resolve "org.federation.Sub" message.
func (s *FederationService) resolve_Org_Federation_Sub(ctx context.Context, req *FederationService_Org_Federation_SubArgument) (*Sub, error) {
ctx, span := s.tracer.Start(ctx, "org.federation.Sub")
defer span.End()
ctx = grpcfed.WithLogger(ctx, grpcfed.Logger(ctx), grpcfed.LogAttrs(ctx)...)
grpcfed.Logger(ctx).DebugContext(ctx, "resolve org.federation.Sub", slog.Any("message_args", s.logvalue_Org_Federation_SubArgument(req)))
// create a message value to be returned.
// `custom_resolver = true` in "grpc.federation.message" option.
ctx = grpcfed.WithLogger(ctx, grpcfed.Logger(ctx)) // create a new reference to logger.
ret, err := s.resolver.Resolve_Org_Federation_Sub(ctx, req)
if err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
grpcfed.Logger(ctx).DebugContext(ctx, "resolved org.federation.Sub", slog.Any("org.federation.Sub", s.logvalue_Org_Federation_Sub(ret)))
return ret, nil
}
// resolve_Org_Federation_User resolve "org.federation.User" message.
func (s *FederationService) resolve_Org_Federation_User(ctx context.Context, req *FederationService_Org_Federation_UserArgument) (*User, error) {
ctx, span := s.tracer.Start(ctx, "org.federation.User")
defer span.End()
ctx = grpcfed.WithLogger(ctx, grpcfed.Logger(ctx), grpcfed.LogAttrs(ctx)...)
grpcfed.Logger(ctx).DebugContext(ctx, "resolve org.federation.User", slog.Any("message_args", s.logvalue_Org_Federation_UserArgument(req)))
type localValueType struct {
*grpcfed.LocalValue
vars struct {
Res *user.GetUserResponse
User *user.User
XDef2 *Sub
}
}
value := &localValueType{LocalValue: grpcfed.NewLocalValue(ctx, s.celEnvOpts, "grpc.federation.private.org.federation.UserArgument", req)}
ctx = grpcfed.WithLocalValue(ctx, value.LocalValue)
/*
def {
name: "res"
call {
method: "user.UserService/GetUser"
request { field: "id", by: "$.user_id" }
}
}
*/
def_res := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[*user.GetUserResponse, *localValueType]{
Name: `res`,
Type: grpcfed.CELObjectType("user.GetUserResponse"),
Setter: func(value *localValueType, v *user.GetUserResponse) error {
value.vars.Res = v
return nil
},
Message: func(ctx context.Context, value *localValueType) (any, error) {
args := &user.GetUserRequest{}
// { field: "id", by: "$.user_id" }
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[string]{
Value: value,
Expr: `$.user_id`,
CacheIndex: 5,
Setter: func(v string) error {
args.Id = v
return nil
},
}); err != nil {
return nil, err
}
grpcfed.Logger(ctx).DebugContext(ctx, "call user.UserService/GetUser", slog.Any("user.GetUserRequest", s.logvalue_User_GetUserRequest(args)))
ret, err := s.client.User_UserServiceClient.GetUser(ctx, args)
if err != nil {
if err := s.errorHandler(ctx, FederationService_DependentMethod_User_UserService_GetUser, err); err != nil {
return nil, grpcfed.NewErrorWithLogAttrs(err, slog.LevelError, grpcfed.LogAttrs(ctx))
}
}
return ret, nil
},
})
}
/*
def {
name: "user"
autobind: true
by: "res.user"
}
*/
def_user := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[*user.User, *localValueType]{
Name: `user`,
Type: grpcfed.CELObjectType("user.User"),
Setter: func(value *localValueType, v *user.User) error {
value.vars.User = v
return nil
},
By: `res.user`,
ByCacheIndex: 6,
})
}
/*
def {
name: "_def2"
message {
name: "Sub"
}
}
*/
def__def2 := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[*Sub, *localValueType]{
Name: `_def2`,
Type: grpcfed.CELObjectType("org.federation.Sub"),
Setter: func(value *localValueType, v *Sub) error {
value.vars.XDef2 = v
return nil
},
Message: func(ctx context.Context, value *localValueType) (any, error) {
args := &FederationService_Org_Federation_SubArgument{}
ret, err := s.resolve_Org_Federation_Sub(ctx, args)
if err != nil {
return nil, err
}
return ret, nil
},
})
}
// A tree view of message dependencies is shown below.
/*
_def2 ─┐
res ─┐ │
user ─┤
*/
eg, ctx1 := grpcfed.ErrorGroupWithContext(ctx)
grpcfed.GoWithRecover(eg, func() (any, error) {
if err := def__def2(ctx1); err != nil {
grpcfed.RecordErrorToSpan(ctx1, err)
return nil, err
}
return nil, nil
})
grpcfed.GoWithRecover(eg, func() (any, error) {
if err := def_res(ctx1); err != nil {
grpcfed.RecordErrorToSpan(ctx1, err)
return nil, err
}
if err := def_user(ctx1); err != nil {
grpcfed.RecordErrorToSpan(ctx1, err)
return nil, err
}
return nil, nil
})
if err := eg.Wait(); err != nil {
return nil, err
}
// assign named parameters to message arguments to pass to the custom resolver.
req.FederationService_Org_Federation_UserVariable.Res = value.vars.Res
req.FederationService_Org_Federation_UserVariable.User = value.vars.User
req.FederationService_Org_Federation_UserVariable.XDef2 = value.vars.XDef2
// create a message value to be returned.
ret := &User{}
// field binding section.
ret.Id = value.vars.User.GetId() // { name: "user", autobind: true }
{
// (grpc.federation.field).custom_resolver = true
ctx = grpcfed.WithLogger(ctx, grpcfed.Logger(ctx)) // create a new reference to logger.
var err error
ret.Name, err = s.resolver.Resolve_Org_Federation_User_Name(ctx, &FederationService_Org_Federation_User_NameArgument{
FederationService_Org_Federation_UserArgument: req,
})
if err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
}
grpcfed.Logger(ctx).DebugContext(ctx, "resolved org.federation.User", slog.Any("org.federation.User", s.logvalue_Org_Federation_User(ret)))
return ret, nil
}
// resolve_Org_Federation_UserID resolve "org.federation.UserID" message.
func (s *FederationService) resolve_Org_Federation_UserID(ctx context.Context, req *FederationService_Org_Federation_UserIDArgument) (*UserID, error) {
ctx, span := s.tracer.Start(ctx, "org.federation.UserID")
defer span.End()
ctx = grpcfed.WithLogger(ctx, grpcfed.Logger(ctx), grpcfed.LogAttrs(ctx)...)
grpcfed.Logger(ctx).DebugContext(ctx, "resolve org.federation.UserID", slog.Any("message_args", s.logvalue_Org_Federation_UserIDArgument(req)))
type localValueType struct {
*grpcfed.LocalValue
vars struct {
XDef0 *Sub
}
}
value := &localValueType{LocalValue: grpcfed.NewLocalValue(ctx, s.celEnvOpts, "grpc.federation.private.org.federation.UserIDArgument", req)}
ctx = grpcfed.WithLocalValue(ctx, value.LocalValue)
/*
def {
name: "_def0"
message {
name: "Sub"
}
}
*/
def__def0 := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[*Sub, *localValueType]{
Name: `_def0`,
Type: grpcfed.CELObjectType("org.federation.Sub"),
Setter: func(value *localValueType, v *Sub) error {
value.vars.XDef0 = v
return nil
},
Message: func(ctx context.Context, value *localValueType) (any, error) {
args := &FederationService_Org_Federation_SubArgument{}
ret, err := s.resolve_Org_Federation_Sub(ctx, args)
if err != nil {
return nil, err
}
return ret, nil
},
})
}
if err := def__def0(ctx); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
// create a message value to be returned.
ret := &UserID{}
// field binding section.
// (grpc.federation.field).by = "'xxx'"
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[string]{
Value: value,
Expr: `'xxx'`,
CacheIndex: 7,
Setter: func(v string) error {
ret.Value = v
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
grpcfed.Logger(ctx).DebugContext(ctx, "resolved org.federation.UserID", slog.Any("org.federation.UserID", s.logvalue_Org_Federation_UserID(ret)))
return ret, nil
}
func (s *FederationService) logvalue_Org_Federation_GetResponse(v *GetResponse) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.Any("user", s.logvalue_Org_Federation_User(v.GetUser())),
slog.Any("user2", s.logvalue_Org_Federation_User(v.GetUser2())),
)
}
func (s *FederationService) logvalue_Org_Federation_GetResponseArgument(v *FederationService_Org_Federation_GetResponseArgument) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue()
}
func (s *FederationService) logvalue_Org_Federation_Sub(v *Sub) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue()
}
func (s *FederationService) logvalue_Org_Federation_SubArgument(v *FederationService_Org_Federation_SubArgument) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue()
}
func (s *FederationService) logvalue_Org_Federation_User(v *User) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.String("id", v.GetId()),
slog.String("name", v.GetName()),
)
}
func (s *FederationService) logvalue_Org_Federation_UserArgument(v *FederationService_Org_Federation_UserArgument) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.String("user_id", v.UserId),
)
}
func (s *FederationService) logvalue_Org_Federation_UserID(v *UserID) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.String("value", v.GetValue()),
)
}
func (s *FederationService) logvalue_Org_Federation_UserIDArgument(v *FederationService_Org_Federation_UserIDArgument) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue()
}
func (s *FederationService) logvalue_User_GetUserRequest(v *user.GetUserRequest) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.String("id", v.GetId()),
)
}
================================================
FILE: _examples/09_multi_user/go.mod
================================================
module example
go 1.24.0
replace github.com/mercari/grpc-federation => ../../
require (
github.com/google/go-cmp v0.7.0
github.com/mercari/grpc-federation v0.0.0-00010101000000-000000000000
go.opentelemetry.io/otel v1.24.0
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.21.0
go.opentelemetry.io/otel/sdk v1.24.0
go.opentelemetry.io/otel/trace v1.24.0
go.uber.org/goleak v1.3.0
google.golang.org/genproto/googleapis/rpc v0.0.0-20240826202546-f6391c0de4c7
google.golang.org/grpc v1.65.0
google.golang.org/protobuf v1.34.2
)
require (
cel.dev/expr v0.19.1 // indirect
github.com/antlr4-go/antlr/v4 v4.13.0 // indirect
github.com/cenkalti/backoff/v4 v4.2.1 // indirect
github.com/go-logr/logr v1.4.1 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
github.com/goccy/wasi-go v0.3.2 // indirect
github.com/google/cel-go v0.23.1 // indirect
github.com/google/uuid v1.6.0 // indirect
github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0 // indirect
github.com/kelseyhightower/envconfig v1.4.0 // indirect
github.com/stealthrocket/wazergo v0.19.1 // indirect
github.com/stoewer/go-strcase v1.3.0 // indirect
github.com/tetratelabs/wazero v1.10.1 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.21.0 // indirect
go.opentelemetry.io/otel/metric v1.24.0 // indirect
go.opentelemetry.io/proto/otlp v1.0.0 // indirect
golang.org/x/exp v0.0.0-20250506013437-ce4c2cf36ca6 // indirect
golang.org/x/net v0.38.0 // indirect
golang.org/x/sync v0.14.0 // indirect
golang.org/x/sys v0.37.0 // indirect
golang.org/x/text v0.23.0 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20240826202546-f6391c0de4c7 // indirect
)
================================================
FILE: _examples/09_multi_user/go.sum
================================================
cel.dev/expr v0.19.1 h1:NciYrtDRIR0lNCnH1LFJegdjspNx9fI59O7TWcua/W4=
cel.dev/expr v0.19.1/go.mod h1:MrpN08Q+lEBs+bGYdLxxHkZoUSsCp0nSKTs0nTymJgw=
github.com/antlr4-go/antlr/v4 v4.13.0 h1:lxCg3LAv+EUK6t1i0y1V6/SLeUi0eKEKdhQAlS8TVTI=
github.com/antlr4-go/antlr/v4 v4.13.0/go.mod h1:pfChB/xh/Unjila75QW7+VU4TSnWnnk9UTnmpPaOR2g=
github.com/cenkalti/backoff/v4 v4.2.1 h1:y4OZtCnogmCPw98Zjyt5a6+QwPLGkiQsYW5oUqylYbM=
github.com/cenkalti/backoff/v4 v4.2.1/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A=
github.com/go-logr/logr v1.4.1 h1:pKouT5E8xu9zeFC39JXRDukb6JFQPXM5p5I91188VAQ=
github.com/go-logr/logr v1.4.1/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY=
github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag=
github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE=
github.com/goccy/wasi-go v0.3.2 h1:wAvGXmqCkfcp0B0AwIp5Ya53hzDwkKm9W8iuT3nCCz0=
github.com/goccy/wasi-go v0.3.2/go.mod h1:nIKD204n9xa4Z20UV+XA483kIr9TAl2vXr+X5qVAO5M=
github.com/golang/glog v1.2.1 h1:OptwRhECazUx5ix5TTWC3EZhsZEHWcYWY4FQHTIubm4=
github.com/golang/glog v1.2.1/go.mod h1:6AhwSGph0fcJtXVM/PEHPqZlFeoLxhs7/t5UDAwmO+w=
github.com/google/cel-go v0.23.1 h1:91ThhEZlBcE5rB2adBVXqvDoqdL8BG2oyhd0bK1I/r4=
github.com/google/cel-go v0.23.1/go.mod h1:52Pb6QsDbC5kvgxvZhiL9QX1oZEkcUF/ZqaPx1J5Wwo=
github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8=
github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU=
github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0 h1:YBftPWNWd4WwGqtY2yeZL2ef8rHAxPBD8KFhJpmcqms=
github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0/go.mod h1:YN5jB8ie0yfIUg6VvR9Kz84aCaG7AsGZnLjhHbUqwPg=
github.com/kelseyhightower/envconfig v1.4.0 h1:Im6hONhd3pLkfDFsbRgu68RDNkGF1r3dvMUtDTo2cv8=
github.com/kelseyhightower/envconfig v1.4.0/go.mod h1:cccZRl6mQpaq41TPp5QxidR+Sa3axMbJDNb//FQX6Gg=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/stealthrocket/wazergo v0.19.1 h1:BPrITETPgSFwiytwmToO0MbUC/+RGC39JScz1JmmG6c=
github.com/stealthrocket/wazergo v0.19.1/go.mod h1:riI0hxw4ndZA5e6z7PesHg2BtTftcZaMxRcoiGGipTs=
github.com/stoewer/go-strcase v1.3.0 h1:g0eASXYtp+yvN9fK8sH94oCIk0fau9uV1/ZdJ0AVEzs=
github.com/stoewer/go-strcase v1.3.0/go.mod h1:fAH5hQ5pehh+j3nZfvwdk2RgEgQjAoM8wodgtPmh1xo=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=
github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo=
github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk=
github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
github.com/tetratelabs/wazero v1.10.1 h1:2DugeJf6VVk58KTPszlNfeeN8AhhpwcZqkJj2wwFuH8=
github.com/tetratelabs/wazero v1.10.1/go.mod h1:DRm5twOQ5Gr1AoEdSi0CLjDQF1J9ZAuyqFIjl1KKfQU=
go.opentelemetry.io/otel v1.24.0 h1:0LAOdjNmQeSTzGBzduGe/rU4tZhMwL5rWgtp9Ku5Jfo=
go.opentelemetry.io/otel v1.24.0/go.mod h1:W7b9Ozg4nkF5tWI5zsXkaKKDjdVjpD4oAt9Qi/MArHo=
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.21.0 h1:cl5P5/GIfFh4t6xyruOgJP5QiA1pw4fYYdv6nc6CBWw=
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.21.0/go.mod h1:zgBdWWAu7oEEMC06MMKc5NLbA/1YDXV1sMpSqEeLQLg=
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.21.0 h1:tIqheXEFWAZ7O8A7m+J0aPTmpJN3YQ7qetUAdkkkKpk=
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.21.0/go.mod h1:nUeKExfxAQVbiVFn32YXpXZZHZ61Cc3s3Rn1pDBGAb0=
go.opentelemetry.io/otel/metric v1.24.0 h1:6EhoGWWK28x1fbpA4tYTOWBkPefTDQnb8WSGXlc88kI=
go.opentelemetry.io/otel/metric v1.24.0/go.mod h1:VYhLe1rFfxuTXLgj4CBiyz+9WYBA8pNGJgDcSFRKBco=
go.opentelemetry.io/otel/sdk v1.24.0 h1:YMPPDNymmQN3ZgczicBY3B6sf9n62Dlj9pWD3ucgoDw=
go.opentelemetry.io/otel/sdk v1.24.0/go.mod h1:KVrIYw6tEubO9E96HQpcmpTKDVn9gdv35HoYiQWGDFg=
go.opentelemetry.io/otel/trace v1.24.0 h1:CsKnnL4dUAr/0llH9FKuc698G04IrpWV0MQA/Y1YELI=
go.opentelemetry.io/otel/trace v1.24.0/go.mod h1:HPc3Xr/cOApsBI154IU0OI0HJexz+aw5uPdbs3UCjNU=
go.opentelemetry.io/proto/otlp v1.0.0 h1:T0TX0tmXU8a3CbNXzEKGeU5mIVOdf0oykP+u2lIVU/I=
go.opentelemetry.io/proto/otlp v1.0.0/go.mod h1:Sy6pihPLfYHkr3NkUbEhGHFhINUSI/v80hjKIs5JXpM=
go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto=
go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE=
golang.org/x/exp v0.0.0-20250506013437-ce4c2cf36ca6 h1:y5zboxd6LQAqYIhHnB48p0ByQ/GnQx2BE33L8BOHQkI=
golang.org/x/exp v0.0.0-20250506013437-ce4c2cf36ca6/go.mod h1:U6Lno4MTRCDY+Ba7aCcauB9T60gsv5s4ralQzP72ZoQ=
golang.org/x/net v0.38.0 h1:vRMAPTMaeGqVhG5QyLJHqNDwecKTomGeqbnfZyKlBI8=
golang.org/x/net v0.38.0/go.mod h1:ivrbrMbzFq5J41QOQh0siUuly180yBYtLp+CKbEaFx8=
golang.org/x/sync v0.14.0 h1:woo0S4Yywslg6hp4eUFjTVOyKt0RookbpAHG4c1HmhQ=
golang.org/x/sync v0.14.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA=
golang.org/x/sys v0.37.0 h1:fdNQudmxPjkdUTPnLn5mdQv7Zwvbvpaxqs831goi9kQ=
golang.org/x/sys v0.37.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks=
golang.org/x/text v0.23.0 h1:D71I7dUrlY+VX0gQShAThNGHFxZ13dGLBHQLVl1mJlY=
golang.org/x/text v0.23.0/go.mod h1:/BLNzu4aZCJ1+kcD0DNRotWKage4q2rGVAg4o22unh4=
google.golang.org/genproto/googleapis/api v0.0.0-20240826202546-f6391c0de4c7 h1:YcyjlL1PRr2Q17/I0dPk2JmYS5CDXfcdb2Z3YRioEbw=
google.golang.org/genproto/googleapis/api v0.0.0-20240826202546-f6391c0de4c7/go.mod h1:OCdP9MfskevB/rbYvHTsXTtKC+3bHWajPdoKgjcYkfo=
google.golang.org/genproto/googleapis/rpc v0.0.0-20240826202546-f6391c0de4c7 h1:2035KHhUv+EpyB+hWgJnaWKJOdX1E95w2S8Rr4uWKTs=
google.golang.org/genproto/googleapis/rpc v0.0.0-20240826202546-f6391c0de4c7/go.mod h1:UqMtugtsSgubUsoxbuAoiCXvqvErP7Gf0so0mK9tHxU=
google.golang.org/grpc v1.65.0 h1:bs/cUb4lp1G5iImFFd3u5ixQzweKizoZJAwBNLR42lc=
google.golang.org/grpc v1.65.0/go.mod h1:WgYC2ypjlB0EiQi6wdKixMqukr6lBc0Vo+oOgjrM5ZQ=
google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg=
google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
================================================
FILE: _examples/09_multi_user/grpc/federation/federation.pb.go
================================================
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.33.0
// protoc (unknown)
// source: grpc/federation/federation.proto
package federation
import (
_ "github.com/mercari/grpc-federation/grpc/federation/cel"
code "google.golang.org/genproto/googleapis/rpc/code"
errdetails "google.golang.org/genproto/googleapis/rpc/errdetails"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
descriptorpb "google.golang.org/protobuf/types/descriptorpb"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
// TypeKind is primitive kind list.
type TypeKind int32
const (
// UNKNOWN represents unexpected value.
TypeKind_UNKNOWN TypeKind = 0
// STRING is used to convert the input value to `string` type.
TypeKind_STRING TypeKind = 1
// BOOL is used to convert the input value to `bool` type.
TypeKind_BOOL TypeKind = 2
// INT64 is used to convert the input value to `int64` type.
TypeKind_INT64 TypeKind = 3
// UINT64 is used to convert the input value to `uint64` type.
TypeKind_UINT64 TypeKind = 4
// DOUBLE is used to convert the input value to `double` type.
TypeKind_DOUBLE TypeKind = 5
// DURATION is used to convert the input value to the `google.protobuf.Duration` type.
TypeKind_DURATION TypeKind = 6
)
// Enum value maps for TypeKind.
var (
TypeKind_name = map[int32]string{
0: "UNKNOWN",
1: "STRING",
2: "BOOL",
3: "INT64",
4: "UINT64",
5: "DOUBLE",
6: "DURATION",
}
TypeKind_value = map[string]int32{
"UNKNOWN": 0,
"STRING": 1,
"BOOL": 2,
"INT64": 3,
"UINT64": 4,
"DOUBLE": 5,
"DURATION": 6,
}
)
func (x TypeKind) Enum() *TypeKind {
p := new(TypeKind)
*p = x
return p
}
func (x TypeKind) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (TypeKind) Descriptor() protoreflect.EnumDescriptor {
return file_grpc_federation_federation_proto_enumTypes[0].Descriptor()
}
func (TypeKind) Type() protoreflect.EnumType {
return &file_grpc_federation_federation_proto_enumTypes[0]
}
func (x TypeKind) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use TypeKind.Descriptor instead.
func (TypeKind) EnumDescriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{0}
}
// LogLevel is the importance or severity of a log event.
type GRPCError_LogLevel int32
const (
// UNKNOWN represents unexpected value.
GRPCError_UNKNOWN GRPCError_LogLevel = 0
// DEBUG is used for detailed information that is useful during development and debugging.
GRPCError_DEBUG GRPCError_LogLevel = 1
// INFO logs are used to provide information about the normal functioning of the application.
GRPCError_INFO GRPCError_LogLevel = 2
// WARN signifies a potential problem or warning that does not necessarily stop the program from working but may lead to issues in the future.
GRPCError_WARN GRPCError_LogLevel = 3
// ERROR indicates a serious issue that has caused a failure in the application.
GRPCError_ERROR GRPCError_LogLevel = 4
)
// Enum value maps for GRPCError_LogLevel.
var (
GRPCError_LogLevel_name = map[int32]string{
0: "UNKNOWN",
1: "DEBUG",
2: "INFO",
3: "WARN",
4: "ERROR",
}
GRPCError_LogLevel_value = map[string]int32{
"UNKNOWN": 0,
"DEBUG": 1,
"INFO": 2,
"WARN": 3,
"ERROR": 4,
}
)
func (x GRPCError_LogLevel) Enum() *GRPCError_LogLevel {
p := new(GRPCError_LogLevel)
*p = x
return p
}
func (x GRPCError_LogLevel) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (GRPCError_LogLevel) Descriptor() protoreflect.EnumDescriptor {
return file_grpc_federation_federation_proto_enumTypes[1].Descriptor()
}
func (GRPCError_LogLevel) Type() protoreflect.EnumType {
return &file_grpc_federation_federation_proto_enumTypes[1]
}
func (x GRPCError_LogLevel) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use GRPCError_LogLevel.Descriptor instead.
func (GRPCError_LogLevel) EnumDescriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{24, 0}
}
type FileRule struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Plugin *CELPlugin `protobuf:"bytes,1,opt,name=plugin,proto3" json:"plugin,omitempty"`
// import can be used to resolve methods, messages, etc. that are referenced in gRPC Federation rules.
Import []string `protobuf:"bytes,2,rep,name=import,proto3" json:"import,omitempty"`
}
func (x *FileRule) Reset() {
*x = FileRule{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *FileRule) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*FileRule) ProtoMessage() {}
func (x *FileRule) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use FileRule.ProtoReflect.Descriptor instead.
func (*FileRule) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{0}
}
func (x *FileRule) GetPlugin() *CELPlugin {
if x != nil {
return x.Plugin
}
return nil
}
func (x *FileRule) GetImport() []string {
if x != nil {
return x.Import
}
return nil
}
type EnumRule struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// alias mapping between enums defined in other packages and enums defined on the federation service side.
// The alias is the FQDN ( . ) to the enum.
// If this definition exists, type conversion is automatically performed before the enum value assignment operation.
// If a enum with this option has a value that is not present in the enum specified by alias, and the alias option is not specified for that value, an error is occurred.
// You can specify multiple aliases. In that case, only values common to all aliases will be considered.
// Specifying a value that is not included in either alias will result in an error.
Alias []string `protobuf:"bytes,1,rep,name=alias,proto3" json:"alias,omitempty"`
}
func (x *EnumRule) Reset() {
*x = EnumRule{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *EnumRule) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*EnumRule) ProtoMessage() {}
func (x *EnumRule) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use EnumRule.ProtoReflect.Descriptor instead.
func (*EnumRule) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{1}
}
func (x *EnumRule) GetAlias() []string {
if x != nil {
return x.Alias
}
return nil
}
type EnumValueRule struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// specifies the default value of the enum.
// All values other than those specified in alias will be default values.
Default *bool `protobuf:"varint,1,opt,name=default,proto3,oneof" json:"default,omitempty"`
// alias can be used when alias is specified in grpc.federation.enum option,
// and specifies the value name to be referenced among the enums specified in alias of enum option.
// multiple value names can be specified for alias.
Alias []string `protobuf:"bytes,2,rep,name=alias,proto3" json:"alias,omitempty"`
// attr is used to hold multiple name-value pairs corresponding to an enum value.
// The values specified by the name must be consistently specified for all enum values.
// The values stored using this feature can be retrieved using the `attr()` method of the enum API.
Attr []*EnumValueAttribute `protobuf:"bytes,3,rep,name=attr,proto3" json:"attr,omitempty"`
// noalias exclude from the target of alias.
// This option cannot be specified simultaneously with `default` or `alias`.
Noalias *bool `protobuf:"varint,4,opt,name=noalias,proto3,oneof" json:"noalias,omitempty"`
}
func (x *EnumValueRule) Reset() {
*x = EnumValueRule{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *EnumValueRule) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*EnumValueRule) ProtoMessage() {}
func (x *EnumValueRule) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use EnumValueRule.ProtoReflect.Descriptor instead.
func (*EnumValueRule) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{2}
}
func (x *EnumValueRule) GetDefault() bool {
if x != nil && x.Default != nil {
return *x.Default
}
return false
}
func (x *EnumValueRule) GetAlias() []string {
if x != nil {
return x.Alias
}
return nil
}
func (x *EnumValueRule) GetAttr() []*EnumValueAttribute {
if x != nil {
return x.Attr
}
return nil
}
func (x *EnumValueRule) GetNoalias() bool {
if x != nil && x.Noalias != nil {
return *x.Noalias
}
return false
}
type EnumValueAttribute struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// name is the attribute key.
// This value is used to search for values using the `attr()` method.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// value represents the value corresponding to `name`.
Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
}
func (x *EnumValueAttribute) Reset() {
*x = EnumValueAttribute{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *EnumValueAttribute) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*EnumValueAttribute) ProtoMessage() {}
func (x *EnumValueAttribute) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[3]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use EnumValueAttribute.ProtoReflect.Descriptor instead.
func (*EnumValueAttribute) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{3}
}
func (x *EnumValueAttribute) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *EnumValueAttribute) GetValue() string {
if x != nil {
return x.Value
}
return ""
}
type OneofRule struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
}
func (x *OneofRule) Reset() {
*x = OneofRule{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *OneofRule) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*OneofRule) ProtoMessage() {}
func (x *OneofRule) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[4]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use OneofRule.ProtoReflect.Descriptor instead.
func (*OneofRule) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{4}
}
// ServiceRule define gRPC Federation rules for the service.
type ServiceRule struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// env defines the environment variable.
Env *Env `protobuf:"bytes,1,opt,name=env,proto3" json:"env,omitempty"`
// var defines the service-level variables.
Var []*ServiceVariable `protobuf:"bytes,2,rep,name=var,proto3" json:"var,omitempty"`
}
func (x *ServiceRule) Reset() {
*x = ServiceRule{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[5]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ServiceRule) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ServiceRule) ProtoMessage() {}
func (x *ServiceRule) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[5]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ServiceRule.ProtoReflect.Descriptor instead.
func (*ServiceRule) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{5}
}
func (x *ServiceRule) GetEnv() *Env {
if x != nil {
return x.Env
}
return nil
}
func (x *ServiceRule) GetVar() []*ServiceVariable {
if x != nil {
return x.Var
}
return nil
}
// Env is used when setting environment variables.
// There are two ways to configure it.
type Env struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// var is used to directly list environment variables.
Var []*EnvVar `protobuf:"bytes,1,rep,name=var,proto3" json:"var,omitempty"`
// message is used to reference an already defined Protocol Buffers' message for defining environment variables.
// If you want to set detailed options for the fields of the message, use the `env` option in FieldRule.
Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
}
func (x *Env) Reset() {
*x = Env{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[6]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Env) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Env) ProtoMessage() {}
func (x *Env) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[6]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Env.ProtoReflect.Descriptor instead.
func (*Env) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{6}
}
func (x *Env) GetVar() []*EnvVar {
if x != nil {
return x.Var
}
return nil
}
func (x *Env) GetMessage() string {
if x != nil {
return x.Message
}
return ""
}
// ServiceVariable define variables at the service level.
// This definition is executed at server startup, after the initialization of Env.
// The defined variables can be used across all messages that the service depends on.
type ServiceVariable struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// name is a variable name.
// This name can be referenced in all CELs related to the service by using `grpc.federation.var.` prefix.
Name *string `protobuf:"bytes,1,opt,name=name,proto3,oneof" json:"name,omitempty"`
// if specify the condition for evaluating expr.
// this value evaluated by CEL and it must return a boolean value.
// If the result of evaluation is `false`, the value assigned to name is the default value of the result of evaluation of `expr`.
If *string `protobuf:"bytes,2,opt,name=if,proto3,oneof" json:"if,omitempty"`
// expr specify the value to be assigned to name.
//
// Types that are assignable to Expr:
//
// *ServiceVariable_By
// *ServiceVariable_Map
// *ServiceVariable_Message
// *ServiceVariable_Validation
// *ServiceVariable_Enum
// *ServiceVariable_Switch
Expr isServiceVariable_Expr `protobuf_oneof:"expr"`
}
func (x *ServiceVariable) Reset() {
*x = ServiceVariable{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[7]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ServiceVariable) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ServiceVariable) ProtoMessage() {}
func (x *ServiceVariable) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[7]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ServiceVariable.ProtoReflect.Descriptor instead.
func (*ServiceVariable) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{7}
}
func (x *ServiceVariable) GetName() string {
if x != nil && x.Name != nil {
return *x.Name
}
return ""
}
func (x *ServiceVariable) GetIf() string {
if x != nil && x.If != nil {
return *x.If
}
return ""
}
func (m *ServiceVariable) GetExpr() isServiceVariable_Expr {
if m != nil {
return m.Expr
}
return nil
}
func (x *ServiceVariable) GetBy() string {
if x, ok := x.GetExpr().(*ServiceVariable_By); ok {
return x.By
}
return ""
}
func (x *ServiceVariable) GetMap() *MapExpr {
if x, ok := x.GetExpr().(*ServiceVariable_Map); ok {
return x.Map
}
return nil
}
func (x *ServiceVariable) GetMessage() *MessageExpr {
if x, ok := x.GetExpr().(*ServiceVariable_Message); ok {
return x.Message
}
return nil
}
func (x *ServiceVariable) GetValidation() *ServiceVariableValidationExpr {
if x, ok := x.GetExpr().(*ServiceVariable_Validation); ok {
return x.Validation
}
return nil
}
func (x *ServiceVariable) GetEnum() *EnumExpr {
if x, ok := x.GetExpr().(*ServiceVariable_Enum); ok {
return x.Enum
}
return nil
}
func (x *ServiceVariable) GetSwitch() *SwitchExpr {
if x, ok := x.GetExpr().(*ServiceVariable_Switch); ok {
return x.Switch
}
return nil
}
type isServiceVariable_Expr interface {
isServiceVariable_Expr()
}
type ServiceVariable_By struct {
// `by` evaluates with CEL.
By string `protobuf:"bytes,11,opt,name=by,proto3,oneof"`
}
type ServiceVariable_Map struct {
// map apply map operation for the specified repeated type.
Map *MapExpr `protobuf:"bytes,12,opt,name=map,proto3,oneof"`
}
type ServiceVariable_Message struct {
// message gets with message arguments.
Message *MessageExpr `protobuf:"bytes,13,opt,name=message,proto3,oneof"`
}
type ServiceVariable_Validation struct {
// validation defines the validation rule and message.
Validation *ServiceVariableValidationExpr `protobuf:"bytes,14,opt,name=validation,proto3,oneof"`
}
type ServiceVariable_Enum struct {
// enum gets with cel value.
Enum *EnumExpr `protobuf:"bytes,15,opt,name=enum,proto3,oneof"`
}
type ServiceVariable_Switch struct {
// switch provides conditional evaluation with multiple branches.
Switch *SwitchExpr `protobuf:"bytes,16,opt,name=switch,proto3,oneof"`
}
func (*ServiceVariable_By) isServiceVariable_Expr() {}
func (*ServiceVariable_Map) isServiceVariable_Expr() {}
func (*ServiceVariable_Message) isServiceVariable_Expr() {}
func (*ServiceVariable_Validation) isServiceVariable_Expr() {}
func (*ServiceVariable_Enum) isServiceVariable_Expr() {}
func (*ServiceVariable_Switch) isServiceVariable_Expr() {}
// ServiceVariableValidationExpr represents validation rule and error message.
type ServiceVariableValidationExpr struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// if specifies condition in CEL. If the condition is true, it returns error.
// The return value must always be of type boolean.
If string `protobuf:"bytes,1,opt,name=if,proto3" json:"if,omitempty"`
// message is a error message in CEL.
Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
}
func (x *ServiceVariableValidationExpr) Reset() {
*x = ServiceVariableValidationExpr{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[8]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ServiceVariableValidationExpr) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ServiceVariableValidationExpr) ProtoMessage() {}
func (x *ServiceVariableValidationExpr) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[8]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ServiceVariableValidationExpr.ProtoReflect.Descriptor instead.
func (*ServiceVariableValidationExpr) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{8}
}
func (x *ServiceVariableValidationExpr) GetIf() string {
if x != nil {
return x.If
}
return ""
}
func (x *ServiceVariableValidationExpr) GetMessage() string {
if x != nil {
return x.Message
}
return ""
}
// EnvVar represents an environment variable.
type EnvVar struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// name is an environment variable name.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// type is an environment variable type.
Type *EnvType `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"`
// option is an additional option for parsing environment variable.
Option *EnvVarOption `protobuf:"bytes,3,opt,name=option,proto3,oneof" json:"option,omitempty"`
}
func (x *EnvVar) Reset() {
*x = EnvVar{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[9]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *EnvVar) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*EnvVar) ProtoMessage() {}
func (x *EnvVar) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[9]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use EnvVar.ProtoReflect.Descriptor instead.
func (*EnvVar) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{9}
}
func (x *EnvVar) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *EnvVar) GetType() *EnvType {
if x != nil {
return x.Type
}
return nil
}
func (x *EnvVar) GetOption() *EnvVarOption {
if x != nil {
return x.Option
}
return nil
}
// EnvType represents type information for environment variable.
type EnvType struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Types that are assignable to Type:
//
// *EnvType_Kind
// *EnvType_Repeated
// *EnvType_Map
Type isEnvType_Type `protobuf_oneof:"type"`
}
func (x *EnvType) Reset() {
*x = EnvType{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[10]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *EnvType) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*EnvType) ProtoMessage() {}
func (x *EnvType) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[10]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use EnvType.ProtoReflect.Descriptor instead.
func (*EnvType) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{10}
}
func (m *EnvType) GetType() isEnvType_Type {
if m != nil {
return m.Type
}
return nil
}
func (x *EnvType) GetKind() TypeKind {
if x, ok := x.GetType().(*EnvType_Kind); ok {
return x.Kind
}
return TypeKind_UNKNOWN
}
func (x *EnvType) GetRepeated() *EnvType {
if x, ok := x.GetType().(*EnvType_Repeated); ok {
return x.Repeated
}
return nil
}
func (x *EnvType) GetMap() *EnvMapType {
if x, ok := x.GetType().(*EnvType_Map); ok {
return x.Map
}
return nil
}
type isEnvType_Type interface {
isEnvType_Type()
}
type EnvType_Kind struct {
// kind is used when the type is a primitive type.
Kind TypeKind `protobuf:"varint,1,opt,name=kind,proto3,enum=grpc.federation.TypeKind,oneof"`
}
type EnvType_Repeated struct {
// repeated is used when the type is a repeated type.
Repeated *EnvType `protobuf:"bytes,2,opt,name=repeated,proto3,oneof"`
}
type EnvType_Map struct {
// map is used when the type is a map type.
Map *EnvMapType `protobuf:"bytes,3,opt,name=map,proto3,oneof"`
}
func (*EnvType_Kind) isEnvType_Type() {}
func (*EnvType_Repeated) isEnvType_Type() {}
func (*EnvType_Map) isEnvType_Type() {}
// EnvMapType represents map type.
type EnvMapType struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// key represents map's key type.
Key *EnvType `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
// value represents map's value type.
Value *EnvType `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
}
func (x *EnvMapType) Reset() {
*x = EnvMapType{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[11]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *EnvMapType) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*EnvMapType) ProtoMessage() {}
func (x *EnvMapType) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[11]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use EnvMapType.ProtoReflect.Descriptor instead.
func (*EnvMapType) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{11}
}
func (x *EnvMapType) GetKey() *EnvType {
if x != nil {
return x.Key
}
return nil
}
func (x *EnvMapType) GetValue() *EnvType {
if x != nil {
return x.Value
}
return nil
}
// EnvVarOption represents additional option for environment variable.
// The option work with the `envconfig` library in Go language.
// For detailed specifications, please refer to the library's documentation ( https://pkg.go.dev/github.com/kelseyhightower/envconfig#section-readme ).
type EnvVarOption struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// alternate use this option if you want to use an environment variable with a different name than the value specified in `EnvVar.name`.
Alternate *string `protobuf:"bytes,1,opt,name=alternate,proto3,oneof" json:"alternate,omitempty"`
// default specify the value to use as a fallback if the specified environment variable is not found.
Default *string `protobuf:"bytes,2,opt,name=default,proto3,oneof" json:"default,omitempty"`
// required require the environment variable to exist.
// If it does not exist, an error will occur at startup.
Required *bool `protobuf:"varint,3,opt,name=required,proto3,oneof" json:"required,omitempty"`
// ignored if ignored is true, it does nothing even if the environment variable exists.
Ignored *bool `protobuf:"varint,4,opt,name=ignored,proto3,oneof" json:"ignored,omitempty"`
}
func (x *EnvVarOption) Reset() {
*x = EnvVarOption{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[12]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *EnvVarOption) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*EnvVarOption) ProtoMessage() {}
func (x *EnvVarOption) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[12]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use EnvVarOption.ProtoReflect.Descriptor instead.
func (*EnvVarOption) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{12}
}
func (x *EnvVarOption) GetAlternate() string {
if x != nil && x.Alternate != nil {
return *x.Alternate
}
return ""
}
func (x *EnvVarOption) GetDefault() string {
if x != nil && x.Default != nil {
return *x.Default
}
return ""
}
func (x *EnvVarOption) GetRequired() bool {
if x != nil && x.Required != nil {
return *x.Required
}
return false
}
func (x *EnvVarOption) GetIgnored() bool {
if x != nil && x.Ignored != nil {
return *x.Ignored
}
return false
}
type MethodRule struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// the time to timeout. If the specified time period elapses, DEADLINE_EXCEEDED status is returned.
// If you want to handle this error, you need to implement a custom error handler in Go.
// The format is the same as Go's time.Duration format. See https://pkg.go.dev/time#ParseDuration.
Timeout *string `protobuf:"bytes,1,opt,name=timeout,proto3,oneof" json:"timeout,omitempty"`
// response specify the name of the message you want to use to create the response value.
// If you specify a reserved type like `google.protobuf.Empty` as the response, you cannot define gRPC Federation options.
// In such cases, you can specify a separate message to create the response value.
// The specified response message must contain fields with the same names and types as all the fields in the original response.
Response *string `protobuf:"bytes,2,opt,name=response,proto3,oneof" json:"response,omitempty"`
}
func (x *MethodRule) Reset() {
*x = MethodRule{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[13]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *MethodRule) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*MethodRule) ProtoMessage() {}
func (x *MethodRule) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[13]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use MethodRule.ProtoReflect.Descriptor instead.
func (*MethodRule) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{13}
}
func (x *MethodRule) GetTimeout() string {
if x != nil && x.Timeout != nil {
return *x.Timeout
}
return ""
}
func (x *MethodRule) GetResponse() string {
if x != nil && x.Response != nil {
return *x.Response
}
return ""
}
// MessageRule define gRPC Federation rules for the message.
type MessageRule struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// def specify variables to be used in field binding by `grpc.federation.field` option.
Def []*VariableDefinition `protobuf:"bytes,1,rep,name=def,proto3" json:"def,omitempty"`
// if custom_resolver is true, the resolver for this message is implemented by Go.
// If there are any values retrieved by resolver or messages, they are passed as arguments for custom resolver.
// Each field of the message returned by the custom resolver is automatically bound.
// If you want to change the binding process for a particular field, set `custom_resolver=true` option for that field.
CustomResolver *bool `protobuf:"varint,2,opt,name=custom_resolver,json=customResolver,proto3,oneof" json:"custom_resolver,omitempty"`
// alias mapping between messages defined in other packages and messages defined on the federation service side.
// The alias is the FQDN ( . ) to the message.
// If this definition exists, type conversion is automatically performed before the field assignment operation.
// If a message with this option has a field that is not present in the message specified by alias, and the alias option is not specified for that field, an error is occurred.
// You can specify multiple aliases. In that case, only fields common to all aliases will be considered.
// Specifying a field that is not included in either alias will result in an error.
Alias []string `protobuf:"bytes,3,rep,name=alias,proto3" json:"alias,omitempty"`
}
func (x *MessageRule) Reset() {
*x = MessageRule{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[14]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *MessageRule) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*MessageRule) ProtoMessage() {}
func (x *MessageRule) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[14]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use MessageRule.ProtoReflect.Descriptor instead.
func (*MessageRule) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{14}
}
func (x *MessageRule) GetDef() []*VariableDefinition {
if x != nil {
return x.Def
}
return nil
}
func (x *MessageRule) GetCustomResolver() bool {
if x != nil && x.CustomResolver != nil {
return *x.CustomResolver
}
return false
}
func (x *MessageRule) GetAlias() []string {
if x != nil {
return x.Alias
}
return nil
}
// VariableDefinition represents variable definition.
type VariableDefinition struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// name is a variable name.
// This name can be referenced in all CELs defined after itself in the same message.
// It can also be referenced in `grpc.federation.field` option.
Name *string `protobuf:"bytes,1,opt,name=name,proto3,oneof" json:"name,omitempty"`
// if specify the condition for evaluating expr.
// this value evaluated by CEL and it must return a boolean value.
// If the result of evaluation is `false`, the value assigned to name is the default value of the result of evaluation of `expr`.
If *string `protobuf:"bytes,2,opt,name=if,proto3,oneof" json:"if,omitempty"`
// autobind if the result value of `expr` is a message type,
// the value of a field with the same name and type as the field name of its own message is automatically assigned to the value of the field in the message.
// If multiple autobinds are used at the same message,
// you must explicitly use the `grpc.federation.field` option to do the binding yourself, since duplicate field names cannot be correctly determined as one.
Autobind *bool `protobuf:"varint,3,opt,name=autobind,proto3,oneof" json:"autobind,omitempty"`
// expr specify the value to be assigned to name.
//
// Types that are assignable to Expr:
//
// *VariableDefinition_By
// *VariableDefinition_Map
// *VariableDefinition_Message
// *VariableDefinition_Call
// *VariableDefinition_Validation
// *VariableDefinition_Enum
// *VariableDefinition_Switch
Expr isVariableDefinition_Expr `protobuf_oneof:"expr"`
}
func (x *VariableDefinition) Reset() {
*x = VariableDefinition{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[15]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *VariableDefinition) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*VariableDefinition) ProtoMessage() {}
func (x *VariableDefinition) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[15]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use VariableDefinition.ProtoReflect.Descriptor instead.
func (*VariableDefinition) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{15}
}
func (x *VariableDefinition) GetName() string {
if x != nil && x.Name != nil {
return *x.Name
}
return ""
}
func (x *VariableDefinition) GetIf() string {
if x != nil && x.If != nil {
return *x.If
}
return ""
}
func (x *VariableDefinition) GetAutobind() bool {
if x != nil && x.Autobind != nil {
return *x.Autobind
}
return false
}
func (m *VariableDefinition) GetExpr() isVariableDefinition_Expr {
if m != nil {
return m.Expr
}
return nil
}
func (x *VariableDefinition) GetBy() string {
if x, ok := x.GetExpr().(*VariableDefinition_By); ok {
return x.By
}
return ""
}
func (x *VariableDefinition) GetMap() *MapExpr {
if x, ok := x.GetExpr().(*VariableDefinition_Map); ok {
return x.Map
}
return nil
}
func (x *VariableDefinition) GetMessage() *MessageExpr {
if x, ok := x.GetExpr().(*VariableDefinition_Message); ok {
return x.Message
}
return nil
}
func (x *VariableDefinition) GetCall() *CallExpr {
if x, ok := x.GetExpr().(*VariableDefinition_Call); ok {
return x.Call
}
return nil
}
func (x *VariableDefinition) GetValidation() *ValidationExpr {
if x, ok := x.GetExpr().(*VariableDefinition_Validation); ok {
return x.Validation
}
return nil
}
func (x *VariableDefinition) GetEnum() *EnumExpr {
if x, ok := x.GetExpr().(*VariableDefinition_Enum); ok {
return x.Enum
}
return nil
}
func (x *VariableDefinition) GetSwitch() *SwitchExpr {
if x, ok := x.GetExpr().(*VariableDefinition_Switch); ok {
return x.Switch
}
return nil
}
type isVariableDefinition_Expr interface {
isVariableDefinition_Expr()
}
type VariableDefinition_By struct {
// `by` evaluates with CEL.
By string `protobuf:"bytes,11,opt,name=by,proto3,oneof"`
}
type VariableDefinition_Map struct {
// map apply map operation for the specified repeated type.
Map *MapExpr `protobuf:"bytes,12,opt,name=map,proto3,oneof"`
}
type VariableDefinition_Message struct {
// message gets with message arguments.
Message *MessageExpr `protobuf:"bytes,13,opt,name=message,proto3,oneof"`
}
type VariableDefinition_Call struct {
// call specifies how to call gRPC method.
Call *CallExpr `protobuf:"bytes,14,opt,name=call,proto3,oneof"`
}
type VariableDefinition_Validation struct {
// validation defines the validation rule and error.
Validation *ValidationExpr `protobuf:"bytes,15,opt,name=validation,proto3,oneof"`
}
type VariableDefinition_Enum struct {
// enum gets with cel value.
Enum *EnumExpr `protobuf:"bytes,16,opt,name=enum,proto3,oneof"`
}
type VariableDefinition_Switch struct {
// switch provides conditional evaluation with multiple branches.
Switch *SwitchExpr `protobuf:"bytes,17,opt,name=switch,proto3,oneof"`
}
func (*VariableDefinition_By) isVariableDefinition_Expr() {}
func (*VariableDefinition_Map) isVariableDefinition_Expr() {}
func (*VariableDefinition_Message) isVariableDefinition_Expr() {}
func (*VariableDefinition_Call) isVariableDefinition_Expr() {}
func (*VariableDefinition_Validation) isVariableDefinition_Expr() {}
func (*VariableDefinition_Enum) isVariableDefinition_Expr() {}
func (*VariableDefinition_Switch) isVariableDefinition_Expr() {}
// MapExpr apply map operation for the specified repeated type.
type MapExpr struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// iterator define iterator variable.
// When evaluating CEL in `expr`, we can refer to the name defined in iterator.
Iterator *Iterator `protobuf:"bytes,1,opt,name=iterator,proto3" json:"iterator,omitempty"`
// expr creates map elements using iterator variable.
//
// Types that are assignable to Expr:
//
// *MapExpr_By
// *MapExpr_Message
// *MapExpr_Enum
Expr isMapExpr_Expr `protobuf_oneof:"expr"`
}
func (x *MapExpr) Reset() {
*x = MapExpr{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[16]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *MapExpr) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*MapExpr) ProtoMessage() {}
func (x *MapExpr) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[16]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use MapExpr.ProtoReflect.Descriptor instead.
func (*MapExpr) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{16}
}
func (x *MapExpr) GetIterator() *Iterator {
if x != nil {
return x.Iterator
}
return nil
}
func (m *MapExpr) GetExpr() isMapExpr_Expr {
if m != nil {
return m.Expr
}
return nil
}
func (x *MapExpr) GetBy() string {
if x, ok := x.GetExpr().(*MapExpr_By); ok {
return x.By
}
return ""
}
func (x *MapExpr) GetMessage() *MessageExpr {
if x, ok := x.GetExpr().(*MapExpr_Message); ok {
return x.Message
}
return nil
}
func (x *MapExpr) GetEnum() *EnumExpr {
if x, ok := x.GetExpr().(*MapExpr_Enum); ok {
return x.Enum
}
return nil
}
type isMapExpr_Expr interface {
isMapExpr_Expr()
}
type MapExpr_By struct {
// `by` evaluates with CEL.
// this can refer to the variable declared by `iterator`.
By string `protobuf:"bytes,11,opt,name=by,proto3,oneof"`
}
type MapExpr_Message struct {
// message gets with message arguments, and it is made an element of the map.
// The result type of MapExpr is the repeated type of the specified message.
Message *MessageExpr `protobuf:"bytes,12,opt,name=message,proto3,oneof"`
}
type MapExpr_Enum struct {
// enum creates enum value for each element of the map.
// The result type of MapExpr is the repeated type of the specified enum.
Enum *EnumExpr `protobuf:"bytes,13,opt,name=enum,proto3,oneof"`
}
func (*MapExpr_By) isMapExpr_Expr() {}
func (*MapExpr_Message) isMapExpr_Expr() {}
func (*MapExpr_Enum) isMapExpr_Expr() {}
// Iterator represents iterator variable.
type Iterator struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// variable name.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// src the value that will be the source for creating the iterator.
// src must be a repeated type.
Src string `protobuf:"bytes,2,opt,name=src,proto3" json:"src,omitempty"`
}
func (x *Iterator) Reset() {
*x = Iterator{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[17]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Iterator) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Iterator) ProtoMessage() {}
func (x *Iterator) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[17]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Iterator.ProtoReflect.Descriptor instead.
func (*Iterator) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{17}
}
func (x *Iterator) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *Iterator) GetSrc() string {
if x != nil {
return x.Src
}
return ""
}
// MessageExpr represents dependent message.
type MessageExpr struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// name specify the message name by FQDN. format is `.`.
// can be omitted when referring to messages in the same package.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// args specify the parameters needed to get the message. This is called the "message arguments".
Args []*Argument `protobuf:"bytes,2,rep,name=args,proto3" json:"args,omitempty"`
}
func (x *MessageExpr) Reset() {
*x = MessageExpr{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[18]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *MessageExpr) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*MessageExpr) ProtoMessage() {}
func (x *MessageExpr) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[18]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use MessageExpr.ProtoReflect.Descriptor instead.
func (*MessageExpr) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{18}
}
func (x *MessageExpr) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *MessageExpr) GetArgs() []*Argument {
if x != nil {
return x.Args
}
return nil
}
// EnumExpr represents dependent enum.
type EnumExpr struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// name specify the enum name by FQDN. format is `.`.
// can be omitted when referring to enum in the same package.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// `by` evaluates with CEL.
By string `protobuf:"bytes,2,opt,name=by,proto3" json:"by,omitempty"`
}
func (x *EnumExpr) Reset() {
*x = EnumExpr{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[19]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *EnumExpr) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*EnumExpr) ProtoMessage() {}
func (x *EnumExpr) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[19]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use EnumExpr.ProtoReflect.Descriptor instead.
func (*EnumExpr) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{19}
}
func (x *EnumExpr) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *EnumExpr) GetBy() string {
if x != nil {
return x.By
}
return ""
}
// CallExpr represents how to call gRPC method.
type CallExpr struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// method specify the FQDN for the gRPC method. format is `./`.
Method string `protobuf:"bytes,1,opt,name=method,proto3" json:"method,omitempty"`
// request specify request parameters for the gRPC method.
Request []*MethodRequest `protobuf:"bytes,2,rep,name=request,proto3" json:"request,omitempty"`
// the time to timeout. If the specified time period elapses, DEADLINE_EXCEEDED status is returned.
// If you want to handle this error, you need to implement a custom error handler in Go.
// The format is the same as Go's time.Duration format. See https://pkg.go.dev/time#ParseDuration.
Timeout *string `protobuf:"bytes,3,opt,name=timeout,proto3,oneof" json:"timeout,omitempty"`
// retry specifies the retry policy if the method call fails.
Retry *RetryPolicy `protobuf:"bytes,4,opt,name=retry,proto3,oneof" json:"retry,omitempty"`
// error evaluated when an error occurs during a method call.
// Multiple errors can be defined and are evaluated in the order in which they are described.
// If an error occurs while creating an gRPC status error, original error will be returned.
Error []*GRPCError `protobuf:"bytes,5,rep,name=error,proto3" json:"error,omitempty"`
// option is the gRPC's call option (https://pkg.go.dev/google.golang.org/grpc#CallOption).
Option *GRPCCallOption `protobuf:"bytes,6,opt,name=option,proto3,oneof" json:"option,omitempty"`
// metadata specify outgoing metadata with CEL value.
// The specified type must always be of type map.
Metadata *string `protobuf:"bytes,7,opt,name=metadata,proto3,oneof" json:"metadata,omitempty"`
}
func (x *CallExpr) Reset() {
*x = CallExpr{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[20]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *CallExpr) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CallExpr) ProtoMessage() {}
func (x *CallExpr) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[20]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use CallExpr.ProtoReflect.Descriptor instead.
func (*CallExpr) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{20}
}
func (x *CallExpr) GetMethod() string {
if x != nil {
return x.Method
}
return ""
}
func (x *CallExpr) GetRequest() []*MethodRequest {
if x != nil {
return x.Request
}
return nil
}
func (x *CallExpr) GetTimeout() string {
if x != nil && x.Timeout != nil {
return *x.Timeout
}
return ""
}
func (x *CallExpr) GetRetry() *RetryPolicy {
if x != nil {
return x.Retry
}
return nil
}
func (x *CallExpr) GetError() []*GRPCError {
if x != nil {
return x.Error
}
return nil
}
func (x *CallExpr) GetOption() *GRPCCallOption {
if x != nil {
return x.Option
}
return nil
}
func (x *CallExpr) GetMetadata() string {
if x != nil && x.Metadata != nil {
return *x.Metadata
}
return ""
}
// SwitchExpr represents a switch statement. At least one "case", and "default", must be defined. All
// case.if expressions must evaluate to a boolean value. All case.by expressions, and default.by, must
// evaluate to the same type (the return type of the switch).
//
// When executed, the case.if expressions are evaluated in order, and, for the first case whose
// case.if expression evaluates to true, its case.by is evaluated to make the return value of the
// SwitchExpr.
// If no case.if evaluates to true, default.by is evaluated to make the return value.
type SwitchExpr struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Cases for the switch expression.
Case []*SwitchCaseExpr `protobuf:"bytes,1,rep,name=case,proto3" json:"case,omitempty"`
// The default case, if none of the "case.if" expressions evaluate to true.
Default *SwitchDefaultExpr `protobuf:"bytes,2,opt,name=default,proto3" json:"default,omitempty"`
}
func (x *SwitchExpr) Reset() {
*x = SwitchExpr{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[21]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *SwitchExpr) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*SwitchExpr) ProtoMessage() {}
func (x *SwitchExpr) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[21]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use SwitchExpr.ProtoReflect.Descriptor instead.
func (*SwitchExpr) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{21}
}
func (x *SwitchExpr) GetCase() []*SwitchCaseExpr {
if x != nil {
return x.Case
}
return nil
}
func (x *SwitchExpr) GetDefault() *SwitchDefaultExpr {
if x != nil {
return x.Default
}
return nil
}
// SwitchCaseExpr represents a single case for a switch expression.
type SwitchCaseExpr struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// if specify the condition for evaluating expr.
// this value evaluated by CEL and it must return a boolean value.
If string `protobuf:"bytes,1,opt,name=if,proto3" json:"if,omitempty"`
// def define variables in current scope.
Def []*VariableDefinition `protobuf:"bytes,2,rep,name=def,proto3" json:"def,omitempty"`
// expr specify the value to return for the case.
//
// Types that are assignable to Expr:
//
// *SwitchCaseExpr_By
Expr isSwitchCaseExpr_Expr `protobuf_oneof:"expr"`
}
func (x *SwitchCaseExpr) Reset() {
*x = SwitchCaseExpr{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[22]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *SwitchCaseExpr) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*SwitchCaseExpr) ProtoMessage() {}
func (x *SwitchCaseExpr) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[22]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use SwitchCaseExpr.ProtoReflect.Descriptor instead.
func (*SwitchCaseExpr) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{22}
}
func (x *SwitchCaseExpr) GetIf() string {
if x != nil {
return x.If
}
return ""
}
func (x *SwitchCaseExpr) GetDef() []*VariableDefinition {
if x != nil {
return x.Def
}
return nil
}
func (m *SwitchCaseExpr) GetExpr() isSwitchCaseExpr_Expr {
if m != nil {
return m.Expr
}
return nil
}
func (x *SwitchCaseExpr) GetBy() string {
if x, ok := x.GetExpr().(*SwitchCaseExpr_By); ok {
return x.By
}
return ""
}
type isSwitchCaseExpr_Expr interface {
isSwitchCaseExpr_Expr()
}
type SwitchCaseExpr_By struct {
// `by` evaluates with CEL.
By string `protobuf:"bytes,11,opt,name=by,proto3,oneof"`
}
func (*SwitchCaseExpr_By) isSwitchCaseExpr_Expr() {}
// SwitchDefaultExpr represents the default case for a switch expression.
type SwitchDefaultExpr struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// def define variables in current scope.
Def []*VariableDefinition `protobuf:"bytes,1,rep,name=def,proto3" json:"def,omitempty"`
// expr specify the value to return for the default case.
//
// Types that are assignable to Expr:
//
// *SwitchDefaultExpr_By
Expr isSwitchDefaultExpr_Expr `protobuf_oneof:"expr"`
}
func (x *SwitchDefaultExpr) Reset() {
*x = SwitchDefaultExpr{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[23]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *SwitchDefaultExpr) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*SwitchDefaultExpr) ProtoMessage() {}
func (x *SwitchDefaultExpr) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[23]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use SwitchDefaultExpr.ProtoReflect.Descriptor instead.
func (*SwitchDefaultExpr) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{23}
}
func (x *SwitchDefaultExpr) GetDef() []*VariableDefinition {
if x != nil {
return x.Def
}
return nil
}
func (m *SwitchDefaultExpr) GetExpr() isSwitchDefaultExpr_Expr {
if m != nil {
return m.Expr
}
return nil
}
func (x *SwitchDefaultExpr) GetBy() string {
if x, ok := x.GetExpr().(*SwitchDefaultExpr_By); ok {
return x.By
}
return ""
}
type isSwitchDefaultExpr_Expr interface {
isSwitchDefaultExpr_Expr()
}
type SwitchDefaultExpr_By struct {
// `by` evaluates with CEL.
By string `protobuf:"bytes,11,opt,name=by,proto3,oneof"`
}
func (*SwitchDefaultExpr_By) isSwitchDefaultExpr_Expr() {}
// GRPCError create gRPC status value.
type GRPCError struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// def define variables in current scope.
Def []*VariableDefinition `protobuf:"bytes,1,rep,name=def,proto3" json:"def,omitempty"`
// if specifies condition in CEL. If the condition is true, it returns defined error information.
// If this field is omitted, it is always treated as 'true' and returns defined error information.
// The return value must always be of type boolean.
If *string `protobuf:"bytes,2,opt,name=if,proto3,oneof" json:"if,omitempty"`
// code is a gRPC status code.
Code *code.Code `protobuf:"varint,3,opt,name=code,proto3,enum=google.rpc.Code,oneof" json:"code,omitempty"`
// message is a gRPC status message.
// If omitted, the message will be auto-generated from the configurations.
Message *string `protobuf:"bytes,4,opt,name=message,proto3,oneof" json:"message,omitempty"`
// details is a list of error details.
// If returns error, the corresponding error details are set.
Details []*GRPCErrorDetail `protobuf:"bytes,5,rep,name=details,proto3" json:"details,omitempty"`
// ignore ignore the error if the condition in the "if" field is true and "ignore" field is set to true.
// When an error is ignored, the returned response is always null value.
// If you want to return a response that is not null, please use `ignore_and_response` feature.
// Therefore, `ignore` and `ignore_and_response` cannot be specified same.
Ignore *bool `protobuf:"varint,6,opt,name=ignore,proto3,oneof" json:"ignore,omitempty"`
// ignore_and_response ignore the error if the condition in the "if" field is true and it returns response specified in CEL.
// The evaluation value of CEL must always be the same as the response message type.
// `ignore` and `ignore_and_response` cannot be specified same.
IgnoreAndResponse *string `protobuf:"bytes,7,opt,name=ignore_and_response,json=ignoreAndResponse,proto3,oneof" json:"ignore_and_response,omitempty"`
// log_level can be configured to output logs as any log level.
// If DEBUG is specified for the log_level, logs are output as debug logs.
// default value is ERROR.
LogLevel *GRPCError_LogLevel `protobuf:"varint,8,opt,name=log_level,json=logLevel,proto3,enum=grpc.federation.GRPCError_LogLevel,oneof" json:"log_level,omitempty"`
}
func (x *GRPCError) Reset() {
*x = GRPCError{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[24]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GRPCError) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GRPCError) ProtoMessage() {}
func (x *GRPCError) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[24]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GRPCError.ProtoReflect.Descriptor instead.
func (*GRPCError) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{24}
}
func (x *GRPCError) GetDef() []*VariableDefinition {
if x != nil {
return x.Def
}
return nil
}
func (x *GRPCError) GetIf() string {
if x != nil && x.If != nil {
return *x.If
}
return ""
}
func (x *GRPCError) GetCode() code.Code {
if x != nil && x.Code != nil {
return *x.Code
}
return code.Code(0)
}
func (x *GRPCError) GetMessage() string {
if x != nil && x.Message != nil {
return *x.Message
}
return ""
}
func (x *GRPCError) GetDetails() []*GRPCErrorDetail {
if x != nil {
return x.Details
}
return nil
}
func (x *GRPCError) GetIgnore() bool {
if x != nil && x.Ignore != nil {
return *x.Ignore
}
return false
}
func (x *GRPCError) GetIgnoreAndResponse() string {
if x != nil && x.IgnoreAndResponse != nil {
return *x.IgnoreAndResponse
}
return ""
}
func (x *GRPCError) GetLogLevel() GRPCError_LogLevel {
if x != nil && x.LogLevel != nil {
return *x.LogLevel
}
return GRPCError_UNKNOWN
}
type GRPCErrorDetail struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// if specifies condition rule in CEL. If the condition is true, gRPC error detail is added to the error.
If string `protobuf:"bytes,1,opt,name=if,proto3" json:"if,omitempty"`
// def define variables in current scope.
Def []*VariableDefinition `protobuf:"bytes,2,rep,name=def,proto3" json:"def,omitempty"`
// message represents arbitrary messages to describe the detail of the error.
Message []*MessageExpr `protobuf:"bytes,3,rep,name=message,proto3" json:"message,omitempty"`
// error_info describes the cause of the error with structured details.
ErrorInfo []*errdetails.ErrorInfo `protobuf:"bytes,4,rep,name=error_info,json=errorInfo,proto3" json:"error_info,omitempty"`
// retry_info describes when the clients can retry a failed request.
RetryInfo []*errdetails.RetryInfo `protobuf:"bytes,5,rep,name=retry_info,json=retryInfo,proto3" json:"retry_info,omitempty"`
// debug_info describes additional debugging info.
DebugInfo []*errdetails.DebugInfo `protobuf:"bytes,6,rep,name=debug_info,json=debugInfo,proto3" json:"debug_info,omitempty"`
// quota_failure describes how a quota check failed.
QuotaFailure []*errdetails.QuotaFailure `protobuf:"bytes,7,rep,name=quota_failure,json=quotaFailure,proto3" json:"quota_failure,omitempty"`
// precondition_failure describes what preconditions have failed.
PreconditionFailure []*errdetails.PreconditionFailure `protobuf:"bytes,8,rep,name=precondition_failure,json=preconditionFailure,proto3" json:"precondition_failure,omitempty"`
// bad_request describes violations in a client request.
BadRequest []*errdetails.BadRequest `protobuf:"bytes,9,rep,name=bad_request,json=badRequest,proto3" json:"bad_request,omitempty"`
// request_info contains metadata about the request that clients can attach.
RequestInfo []*errdetails.RequestInfo `protobuf:"bytes,10,rep,name=request_info,json=requestInfo,proto3" json:"request_info,omitempty"`
// resource_info describes the resource that is being accessed.
ResourceInfo []*errdetails.ResourceInfo `protobuf:"bytes,11,rep,name=resource_info,json=resourceInfo,proto3" json:"resource_info,omitempty"`
// help provides links to documentation or for performing an out of band action.
Help []*errdetails.Help `protobuf:"bytes,12,rep,name=help,proto3" json:"help,omitempty"`
// localized_message provides a localized error message that is safe to return to the user.
LocalizedMessage []*errdetails.LocalizedMessage `protobuf:"bytes,13,rep,name=localized_message,json=localizedMessage,proto3" json:"localized_message,omitempty"`
// by specify a message in CEL to express the details of the error.
By []string `protobuf:"bytes,14,rep,name=by,proto3" json:"by,omitempty"`
}
func (x *GRPCErrorDetail) Reset() {
*x = GRPCErrorDetail{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[25]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GRPCErrorDetail) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GRPCErrorDetail) ProtoMessage() {}
func (x *GRPCErrorDetail) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[25]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GRPCErrorDetail.ProtoReflect.Descriptor instead.
func (*GRPCErrorDetail) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{25}
}
func (x *GRPCErrorDetail) GetIf() string {
if x != nil {
return x.If
}
return ""
}
func (x *GRPCErrorDetail) GetDef() []*VariableDefinition {
if x != nil {
return x.Def
}
return nil
}
func (x *GRPCErrorDetail) GetMessage() []*MessageExpr {
if x != nil {
return x.Message
}
return nil
}
func (x *GRPCErrorDetail) GetErrorInfo() []*errdetails.ErrorInfo {
if x != nil {
return x.ErrorInfo
}
return nil
}
func (x *GRPCErrorDetail) GetRetryInfo() []*errdetails.RetryInfo {
if x != nil {
return x.RetryInfo
}
return nil
}
func (x *GRPCErrorDetail) GetDebugInfo() []*errdetails.DebugInfo {
if x != nil {
return x.DebugInfo
}
return nil
}
func (x *GRPCErrorDetail) GetQuotaFailure() []*errdetails.QuotaFailure {
if x != nil {
return x.QuotaFailure
}
return nil
}
func (x *GRPCErrorDetail) GetPreconditionFailure() []*errdetails.PreconditionFailure {
if x != nil {
return x.PreconditionFailure
}
return nil
}
func (x *GRPCErrorDetail) GetBadRequest() []*errdetails.BadRequest {
if x != nil {
return x.BadRequest
}
return nil
}
func (x *GRPCErrorDetail) GetRequestInfo() []*errdetails.RequestInfo {
if x != nil {
return x.RequestInfo
}
return nil
}
func (x *GRPCErrorDetail) GetResourceInfo() []*errdetails.ResourceInfo {
if x != nil {
return x.ResourceInfo
}
return nil
}
func (x *GRPCErrorDetail) GetHelp() []*errdetails.Help {
if x != nil {
return x.Help
}
return nil
}
func (x *GRPCErrorDetail) GetLocalizedMessage() []*errdetails.LocalizedMessage {
if x != nil {
return x.LocalizedMessage
}
return nil
}
func (x *GRPCErrorDetail) GetBy() []string {
if x != nil {
return x.By
}
return nil
}
// GRPCCallOption configures a gRPC Call before it starts or extracts information from a gRPC Call after it completes.
type GRPCCallOption struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// set the content-subtype. For example, if content-subtype is "json", the Content-Type over the wire will be "application/grpc+json".
// The content-subtype is converted to lowercase before being included in Content-Type.
// See Content-Type on https://github.com/grpc/grpc/blob/master/doc/PROTOCOL-HTTP2.md#requests for more details.
// If no such codec is found, the call will result in an error with code INTERNAL.
ContentSubtype *string `protobuf:"bytes,1,opt,name=content_subtype,json=contentSubtype,proto3,oneof" json:"content_subtype,omitempty"`
// header retrieves the header metadata for a unary RPC.
// In order to obtain the metadata, you must specify a variable of type map in the header.
// e.g.)
// def [
//
// { name: "hdr" by: "grpc.federation.metadata.new()" }
// { call { method: "pkg.Method" option { header: "hdr" } } }
//
// ]
Header *string `protobuf:"bytes,2,opt,name=header,proto3,oneof" json:"header,omitempty"`
// max_call_recv_msg_size sets the maximum message size in bytes the client can receive.
// If this is not set, gRPC uses the default 4MB.
MaxCallRecvMsgSize *int64 `protobuf:"varint,3,opt,name=max_call_recv_msg_size,json=maxCallRecvMsgSize,proto3,oneof" json:"max_call_recv_msg_size,omitempty"`
// max_call_send_msg_size sets the maximum message size in bytes the client can send.
// If this is not set, gRPC uses the default maximum number of int32 range.
MaxCallSendMsgSize *int64 `protobuf:"varint,4,opt,name=max_call_send_msg_size,json=maxCallSendMsgSize,proto3,oneof" json:"max_call_send_msg_size,omitempty"`
// static_method specifies that a call is being made to a method that is static,
// which means the method is known at compile time and doesn't change at runtime.
// This can be used as a signal to stats plugins that this method is safe to include as a key to a measurement.
StaticMethod *bool `protobuf:"varint,5,opt,name=static_method,json=staticMethod,proto3,oneof" json:"static_method,omitempty"`
// trailer retrieves the trailer metadata for a unary RPC.
// In order to obtain the metadata, you must specify a variable of type map in the trailer.
// e.g.)
// def [
//
// { name: "trl" by: "grpc.federation.metadata.new()" }
// { call { method: "pkg.Method" option { trailer: "trl" } } }
//
// ]
Trailer *string `protobuf:"bytes,6,opt,name=trailer,proto3,oneof" json:"trailer,omitempty"`
// wait_for_ready configures the RPC's behavior when the client is in TRANSIENT_FAILURE,
// which occurs when all addresses fail to connect.
// If wait_for_ready is false, the RPC will fail immediately.
// Otherwise, the client will wait until a connection becomes available or the RPC's deadline is reached.
// By default, RPCs do not "wait for ready".
WaitForReady *bool `protobuf:"varint,7,opt,name=wait_for_ready,json=waitForReady,proto3,oneof" json:"wait_for_ready,omitempty"`
}
func (x *GRPCCallOption) Reset() {
*x = GRPCCallOption{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[26]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GRPCCallOption) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GRPCCallOption) ProtoMessage() {}
func (x *GRPCCallOption) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[26]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GRPCCallOption.ProtoReflect.Descriptor instead.
func (*GRPCCallOption) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{26}
}
func (x *GRPCCallOption) GetContentSubtype() string {
if x != nil && x.ContentSubtype != nil {
return *x.ContentSubtype
}
return ""
}
func (x *GRPCCallOption) GetHeader() string {
if x != nil && x.Header != nil {
return *x.Header
}
return ""
}
func (x *GRPCCallOption) GetMaxCallRecvMsgSize() int64 {
if x != nil && x.MaxCallRecvMsgSize != nil {
return *x.MaxCallRecvMsgSize
}
return 0
}
func (x *GRPCCallOption) GetMaxCallSendMsgSize() int64 {
if x != nil && x.MaxCallSendMsgSize != nil {
return *x.MaxCallSendMsgSize
}
return 0
}
func (x *GRPCCallOption) GetStaticMethod() bool {
if x != nil && x.StaticMethod != nil {
return *x.StaticMethod
}
return false
}
func (x *GRPCCallOption) GetTrailer() string {
if x != nil && x.Trailer != nil {
return *x.Trailer
}
return ""
}
func (x *GRPCCallOption) GetWaitForReady() bool {
if x != nil && x.WaitForReady != nil {
return *x.WaitForReady
}
return false
}
// Validation represents a validation rule against variables defined within the current scope.
type ValidationExpr struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// name is a unique name for the validation.
// If set, the validation error type will be Error.
// If omitted, the validation error type will be ValidationError.
Name *string `protobuf:"bytes,1,opt,name=name,proto3,oneof" json:"name,omitempty"`
// error defines the actual validation rules and an error to returned if the validation fails.
Error *GRPCError `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"`
}
func (x *ValidationExpr) Reset() {
*x = ValidationExpr{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[27]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ValidationExpr) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ValidationExpr) ProtoMessage() {}
func (x *ValidationExpr) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[27]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ValidationExpr.ProtoReflect.Descriptor instead.
func (*ValidationExpr) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{27}
}
func (x *ValidationExpr) GetName() string {
if x != nil && x.Name != nil {
return *x.Name
}
return ""
}
func (x *ValidationExpr) GetError() *GRPCError {
if x != nil {
return x.Error
}
return nil
}
// RetryPolicy define the retry policy if the method call fails.
type RetryPolicy struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Types that are assignable to Policy:
//
// *RetryPolicy_Constant
// *RetryPolicy_Exponential
Policy isRetryPolicy_Policy `protobuf_oneof:"policy"`
// if specifies condition in CEL. If the condition is true, run the retry process according to the policy.
// If this field is omitted, it is always treated as 'true' and run the retry process.
// The return value must always be of type boolean.
If string `protobuf:"bytes,3,opt,name=if,proto3" json:"if,omitempty"`
}
func (x *RetryPolicy) Reset() {
*x = RetryPolicy{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[28]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *RetryPolicy) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*RetryPolicy) ProtoMessage() {}
func (x *RetryPolicy) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[28]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use RetryPolicy.ProtoReflect.Descriptor instead.
func (*RetryPolicy) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{28}
}
func (m *RetryPolicy) GetPolicy() isRetryPolicy_Policy {
if m != nil {
return m.Policy
}
return nil
}
func (x *RetryPolicy) GetConstant() *RetryPolicyConstant {
if x, ok := x.GetPolicy().(*RetryPolicy_Constant); ok {
return x.Constant
}
return nil
}
func (x *RetryPolicy) GetExponential() *RetryPolicyExponential {
if x, ok := x.GetPolicy().(*RetryPolicy_Exponential); ok {
return x.Exponential
}
return nil
}
func (x *RetryPolicy) GetIf() string {
if x != nil {
return x.If
}
return ""
}
type isRetryPolicy_Policy interface {
isRetryPolicy_Policy()
}
type RetryPolicy_Constant struct {
// retry according to the "constant" policy.
Constant *RetryPolicyConstant `protobuf:"bytes,1,opt,name=constant,proto3,oneof"`
}
type RetryPolicy_Exponential struct {
// retry according to the "exponential backoff" policy.
// The following Go library is used in the implementation,
// so please refer to the library documentation for how to specify each parameter.
// https://pkg.go.dev/github.com/cenkalti/backoff/v4#section-readme.
Exponential *RetryPolicyExponential `protobuf:"bytes,2,opt,name=exponential,proto3,oneof"`
}
func (*RetryPolicy_Constant) isRetryPolicy_Policy() {}
func (*RetryPolicy_Exponential) isRetryPolicy_Policy() {}
// RetryPolicyConstant define "constant" based retry policy.
type RetryPolicyConstant struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// interval value. ( default value is 1s ).
Interval *string `protobuf:"bytes,1,opt,name=interval,proto3,oneof" json:"interval,omitempty"`
// max retry count. ( default value is 5. If zero is specified, it never stops )
MaxRetries *uint64 `protobuf:"varint,2,opt,name=max_retries,json=maxRetries,proto3,oneof" json:"max_retries,omitempty"`
}
func (x *RetryPolicyConstant) Reset() {
*x = RetryPolicyConstant{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[29]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *RetryPolicyConstant) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*RetryPolicyConstant) ProtoMessage() {}
func (x *RetryPolicyConstant) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[29]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use RetryPolicyConstant.ProtoReflect.Descriptor instead.
func (*RetryPolicyConstant) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{29}
}
func (x *RetryPolicyConstant) GetInterval() string {
if x != nil && x.Interval != nil {
return *x.Interval
}
return ""
}
func (x *RetryPolicyConstant) GetMaxRetries() uint64 {
if x != nil && x.MaxRetries != nil {
return *x.MaxRetries
}
return 0
}
// RetryPolicyExponential define "exponential backoff" based retry policy.
type RetryPolicyExponential struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// initial interval value. ( default value is "500ms" ).
InitialInterval *string `protobuf:"bytes,1,opt,name=initial_interval,json=initialInterval,proto3,oneof" json:"initial_interval,omitempty"`
// randomization factor value. ( default value is 0.5 ).
RandomizationFactor *float64 `protobuf:"fixed64,2,opt,name=randomization_factor,json=randomizationFactor,proto3,oneof" json:"randomization_factor,omitempty"`
// multiplier. ( default value is 1.5 ).
Multiplier *float64 `protobuf:"fixed64,3,opt,name=multiplier,proto3,oneof" json:"multiplier,omitempty"`
// max interval value. ( default value is "60s" ).
MaxInterval *string `protobuf:"bytes,4,opt,name=max_interval,json=maxInterval,proto3,oneof" json:"max_interval,omitempty"`
// max retry count. ( default value is 5. If zero is specified, it never stops ).
MaxRetries *uint64 `protobuf:"varint,5,opt,name=max_retries,json=maxRetries,proto3,oneof" json:"max_retries,omitempty"`
}
func (x *RetryPolicyExponential) Reset() {
*x = RetryPolicyExponential{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[30]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *RetryPolicyExponential) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*RetryPolicyExponential) ProtoMessage() {}
func (x *RetryPolicyExponential) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[30]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use RetryPolicyExponential.ProtoReflect.Descriptor instead.
func (*RetryPolicyExponential) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{30}
}
func (x *RetryPolicyExponential) GetInitialInterval() string {
if x != nil && x.InitialInterval != nil {
return *x.InitialInterval
}
return ""
}
func (x *RetryPolicyExponential) GetRandomizationFactor() float64 {
if x != nil && x.RandomizationFactor != nil {
return *x.RandomizationFactor
}
return 0
}
func (x *RetryPolicyExponential) GetMultiplier() float64 {
if x != nil && x.Multiplier != nil {
return *x.Multiplier
}
return 0
}
func (x *RetryPolicyExponential) GetMaxInterval() string {
if x != nil && x.MaxInterval != nil {
return *x.MaxInterval
}
return ""
}
func (x *RetryPolicyExponential) GetMaxRetries() uint64 {
if x != nil && x.MaxRetries != nil {
return *x.MaxRetries
}
return 0
}
// MethodRequest define parameters to be used for gRPC method request.
type MethodRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// field name of the request message.
Field string `protobuf:"bytes,1,opt,name=field,proto3" json:"field,omitempty"`
// by used to refer to a name or message argument defined in a MessageRule, use `$.` to refer to the message argument.
// Use CEL (https://github.com/google/cel-spec) to evaluate the expression.
// Variables are already defined in MessageRule can be used.
By *string `protobuf:"bytes,2,opt,name=by,proto3,oneof" json:"by,omitempty"`
// if describes the condition to be assigned to field.
// The return value must be of type bool.
// Use CEL (https://github.com/google/cel-spec) to evaluate the expression.
// Variables are already defined in MessageRule can be used.
// If the field is a 'oneof' field, it must be specified.
If *string `protobuf:"bytes,3,opt,name=if,proto3,oneof" json:"if,omitempty"`
}
func (x *MethodRequest) Reset() {
*x = MethodRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[31]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *MethodRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*MethodRequest) ProtoMessage() {}
func (x *MethodRequest) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[31]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use MethodRequest.ProtoReflect.Descriptor instead.
func (*MethodRequest) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{31}
}
func (x *MethodRequest) GetField() string {
if x != nil {
return x.Field
}
return ""
}
func (x *MethodRequest) GetBy() string {
if x != nil && x.By != nil {
return *x.By
}
return ""
}
func (x *MethodRequest) GetIf() string {
if x != nil && x.If != nil {
return *x.If
}
return ""
}
// MethodResponse define which value of the method response is referenced.
type MethodResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// name specify the unique name that can be used in a `MessageRule` / `FieldRule` for the same message for a specific field in the response.
Name *string `protobuf:"bytes,1,opt,name=name,proto3,oneof" json:"name,omitempty"`
// field name in response message.
Field *string `protobuf:"bytes,2,opt,name=field,proto3,oneof" json:"field,omitempty"`
// autobind if the value referenced by `field` is a message type,
// the value of a field with the same name and type as the field name of its own message is automatically assigned to the value of the field in the message.
// If multiple autobinds are used at the same message,
// you must explicitly use the `grpc.federation.field` option to do the binding yourself, since duplicate field names cannot be correctly determined as one.
Autobind *bool `protobuf:"varint,3,opt,name=autobind,proto3,oneof" json:"autobind,omitempty"`
}
func (x *MethodResponse) Reset() {
*x = MethodResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[32]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *MethodResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*MethodResponse) ProtoMessage() {}
func (x *MethodResponse) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[32]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use MethodResponse.ProtoReflect.Descriptor instead.
func (*MethodResponse) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{32}
}
func (x *MethodResponse) GetName() string {
if x != nil && x.Name != nil {
return *x.Name
}
return ""
}
func (x *MethodResponse) GetField() string {
if x != nil && x.Field != nil {
return *x.Field
}
return ""
}
func (x *MethodResponse) GetAutobind() bool {
if x != nil && x.Autobind != nil {
return *x.Autobind
}
return false
}
// Argument define message argument.
type Argument struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// name of the message argument.
// Use this name to refer to the message argument.
// For example, if `foo` is specified as the name, it is referenced by `$.foo`.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// by used to refer to a name or message argument defined in a MessageRule, use `$.` to refer to the message argument.
// Use CEL (https://github.com/google/cel-spec) to evaluate the expression.
// Variables are already defined in MessageRule can be used.
By *string `protobuf:"bytes,2,opt,name=by,proto3,oneof" json:"by,omitempty"`
// inline like by, it refers to the specified value and expands all fields beyond it.
// For this reason, the referenced value must always be of message type.
Inline *string `protobuf:"bytes,3,opt,name=inline,proto3,oneof" json:"inline,omitempty"`
}
func (x *Argument) Reset() {
*x = Argument{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[33]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Argument) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Argument) ProtoMessage() {}
func (x *Argument) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[33]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Argument.ProtoReflect.Descriptor instead.
func (*Argument) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{33}
}
func (x *Argument) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *Argument) GetBy() string {
if x != nil && x.By != nil {
return *x.By
}
return ""
}
func (x *Argument) GetInline() string {
if x != nil && x.Inline != nil {
return *x.Inline
}
return ""
}
// FieldRule define gRPC Federation rules for the field of message.
type FieldRule struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// If custom_resolver is true, the field binding process is to be implemented in Go.
// If there are any values retrieved by grpc.federation.message option, they are passed as arguments for custom resolver.
CustomResolver *bool `protobuf:"varint,1,opt,name=custom_resolver,json=customResolver,proto3,oneof" json:"custom_resolver,omitempty"`
// by used to refer to a name or message argument defined in a MessageRule, use `$.` to refer to the message argument.
// Use CEL (https://github.com/google/cel-spec) to evaluate the expression.
// Variables are already defined in MessageRule can be used.
By *string `protobuf:"bytes,2,opt,name=by,proto3,oneof" json:"by,omitempty"`
// alias can be used when alias is specified in grpc.federation.message option,
// and specifies the field name to be referenced among the messages specified in alias of message option.
// If the specified field has the same type or can be converted automatically, its value is assigned.
Alias *string `protobuf:"bytes,3,opt,name=alias,proto3,oneof" json:"alias,omitempty"`
// use to evaluate any one of fields. this field only available in oneof.
Oneof *FieldOneof `protobuf:"bytes,4,opt,name=oneof,proto3" json:"oneof,omitempty"`
// when defining an environment variable, use it for fields where you want to set additional options.
Env *EnvVarOption `protobuf:"bytes,5,opt,name=env,proto3" json:"env,omitempty"`
}
func (x *FieldRule) Reset() {
*x = FieldRule{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[34]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *FieldRule) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*FieldRule) ProtoMessage() {}
func (x *FieldRule) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[34]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use FieldRule.ProtoReflect.Descriptor instead.
func (*FieldRule) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{34}
}
func (x *FieldRule) GetCustomResolver() bool {
if x != nil && x.CustomResolver != nil {
return *x.CustomResolver
}
return false
}
func (x *FieldRule) GetBy() string {
if x != nil && x.By != nil {
return *x.By
}
return ""
}
func (x *FieldRule) GetAlias() string {
if x != nil && x.Alias != nil {
return *x.Alias
}
return ""
}
func (x *FieldRule) GetOneof() *FieldOneof {
if x != nil {
return x.Oneof
}
return nil
}
func (x *FieldRule) GetEnv() *EnvVarOption {
if x != nil {
return x.Env
}
return nil
}
// FieldOneof evaluate "messages" or other field only if expr is true and assign to the oneof field.
// This feature only available in oneof.
type FieldOneof struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// cond specify either `expr` or `default`. Only one `default` can be set per oneof.
//
// Types that are assignable to Cond:
//
// *FieldOneof_If
// *FieldOneof_Default
Cond isFieldOneof_Cond `protobuf_oneof:"cond"`
// def specify variables to be used in current oneof field's scope for field binding.
Def []*VariableDefinition `protobuf:"bytes,3,rep,name=def,proto3" json:"def,omitempty"`
// by used to refer to a name or message argument defined in a MessageRule, use `$.` to refer to the message argument.
// Use CEL (https://github.com/google/cel-spec) to evaluate the expression.
// Variables are already defined in MessageRule and FieldOneOf can be used.
By string `protobuf:"bytes,4,opt,name=by,proto3" json:"by,omitempty"`
}
func (x *FieldOneof) Reset() {
*x = FieldOneof{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[35]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *FieldOneof) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*FieldOneof) ProtoMessage() {}
func (x *FieldOneof) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[35]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use FieldOneof.ProtoReflect.Descriptor instead.
func (*FieldOneof) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{35}
}
func (m *FieldOneof) GetCond() isFieldOneof_Cond {
if m != nil {
return m.Cond
}
return nil
}
func (x *FieldOneof) GetIf() string {
if x, ok := x.GetCond().(*FieldOneof_If); ok {
return x.If
}
return ""
}
func (x *FieldOneof) GetDefault() bool {
if x, ok := x.GetCond().(*FieldOneof_Default); ok {
return x.Default
}
return false
}
func (x *FieldOneof) GetDef() []*VariableDefinition {
if x != nil {
return x.Def
}
return nil
}
func (x *FieldOneof) GetBy() string {
if x != nil {
return x.By
}
return ""
}
type isFieldOneof_Cond interface {
isFieldOneof_Cond()
}
type FieldOneof_If struct {
// if describes the condition to be assigned to field.
// The return value must be of type bool.
// Use CEL (https://github.com/google/cel-spec) to evaluate the expression.
// Variables are already defined in MessageRule can be used.
If string `protobuf:"bytes,1,opt,name=if,proto3,oneof"`
}
type FieldOneof_Default struct {
// default used to assign a value when none of the other fields match any of the specified expressions.
// Only one value can be defined per oneof.
Default bool `protobuf:"varint,2,opt,name=default,proto3,oneof"`
}
func (*FieldOneof_If) isFieldOneof_Cond() {}
func (*FieldOneof_Default) isFieldOneof_Cond() {}
// CELPlugin define schema of CEL plugin.
type CELPlugin struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Export []*CELPluginExport `protobuf:"bytes,1,rep,name=export,proto3" json:"export,omitempty"`
}
func (x *CELPlugin) Reset() {
*x = CELPlugin{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[36]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *CELPlugin) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CELPlugin) ProtoMessage() {}
func (x *CELPlugin) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[36]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use CELPlugin.ProtoReflect.Descriptor instead.
func (*CELPlugin) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{36}
}
func (x *CELPlugin) GetExport() []*CELPluginExport {
if x != nil {
return x.Export
}
return nil
}
// CELPluginExport describe the schema to be exposed as a CEL plugin.
type CELPluginExport struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// name is the plugin name.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// desc is the description of plugin.
// This description is used as documentation at code generation.
Desc string `protobuf:"bytes,2,opt,name=desc,proto3" json:"desc,omitempty"`
// types describe the message type you want to expose.
Types []*CELReceiverType `protobuf:"bytes,3,rep,name=types,proto3" json:"types,omitempty"`
// functions describe the definition of the function you want to expose.
Functions []*CELFunction `protobuf:"bytes,4,rep,name=functions,proto3" json:"functions,omitempty"`
// variables describe the definition of the variable you want to expose.
Variables []*CELVariable `protobuf:"bytes,5,rep,name=variables,proto3" json:"variables,omitempty"`
Capability *CELPluginCapability `protobuf:"bytes,6,opt,name=capability,proto3" json:"capability,omitempty"`
}
func (x *CELPluginExport) Reset() {
*x = CELPluginExport{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[37]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *CELPluginExport) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CELPluginExport) ProtoMessage() {}
func (x *CELPluginExport) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[37]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use CELPluginExport.ProtoReflect.Descriptor instead.
func (*CELPluginExport) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{37}
}
func (x *CELPluginExport) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *CELPluginExport) GetDesc() string {
if x != nil {
return x.Desc
}
return ""
}
func (x *CELPluginExport) GetTypes() []*CELReceiverType {
if x != nil {
return x.Types
}
return nil
}
func (x *CELPluginExport) GetFunctions() []*CELFunction {
if x != nil {
return x.Functions
}
return nil
}
func (x *CELPluginExport) GetVariables() []*CELVariable {
if x != nil {
return x.Variables
}
return nil
}
func (x *CELPluginExport) GetCapability() *CELPluginCapability {
if x != nil {
return x.Capability
}
return nil
}
// CELPluginCapability controls the permissions granted to the WebAssembly plugin.
type CELPluginCapability struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// env is the capability for environment variable.
Env *CELPluginEnvCapability `protobuf:"bytes,1,opt,name=env,proto3,oneof" json:"env,omitempty"`
// file_system is the capability for file system.
FileSystem *CELPluginFileSystemCapability `protobuf:"bytes,2,opt,name=file_system,json=fileSystem,proto3,oneof" json:"file_system,omitempty"`
// network is the capability for network.
Network *CELPluginNetworkCapability `protobuf:"bytes,3,opt,name=network,proto3,oneof" json:"network,omitempty"`
}
func (x *CELPluginCapability) Reset() {
*x = CELPluginCapability{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[38]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *CELPluginCapability) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CELPluginCapability) ProtoMessage() {}
func (x *CELPluginCapability) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[38]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use CELPluginCapability.ProtoReflect.Descriptor instead.
func (*CELPluginCapability) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{38}
}
func (x *CELPluginCapability) GetEnv() *CELPluginEnvCapability {
if x != nil {
return x.Env
}
return nil
}
func (x *CELPluginCapability) GetFileSystem() *CELPluginFileSystemCapability {
if x != nil {
return x.FileSystem
}
return nil
}
func (x *CELPluginCapability) GetNetwork() *CELPluginNetworkCapability {
if x != nil {
return x.Network
}
return nil
}
// CELPluginEnvCapability controls access to the environment variable.
type CELPluginEnvCapability struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// all allows access to all environment variables.
All bool `protobuf:"varint,1,opt,name=all,proto3" json:"all,omitempty"`
// specifies accessible names. If "all" is true, it takes precedence.
Names []string `protobuf:"bytes,2,rep,name=names,proto3" json:"names,omitempty"`
}
func (x *CELPluginEnvCapability) Reset() {
*x = CELPluginEnvCapability{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[39]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *CELPluginEnvCapability) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CELPluginEnvCapability) ProtoMessage() {}
func (x *CELPluginEnvCapability) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[39]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use CELPluginEnvCapability.ProtoReflect.Descriptor instead.
func (*CELPluginEnvCapability) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{39}
}
func (x *CELPluginEnvCapability) GetAll() bool {
if x != nil {
return x.All
}
return false
}
func (x *CELPluginEnvCapability) GetNames() []string {
if x != nil {
return x.Names
}
return nil
}
// CELPluginFileSystemCapability controls access to the file system.
type CELPluginFileSystemCapability struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// mount_path specifies the file path of the host to mount.
// If not specified, the root directory will be used.
MountPath string `protobuf:"bytes,1,opt,name=mount_path,json=mountPath,proto3" json:"mount_path,omitempty"`
}
func (x *CELPluginFileSystemCapability) Reset() {
*x = CELPluginFileSystemCapability{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[40]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *CELPluginFileSystemCapability) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CELPluginFileSystemCapability) ProtoMessage() {}
func (x *CELPluginFileSystemCapability) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[40]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use CELPluginFileSystemCapability.ProtoReflect.Descriptor instead.
func (*CELPluginFileSystemCapability) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{40}
}
func (x *CELPluginFileSystemCapability) GetMountPath() string {
if x != nil {
return x.MountPath
}
return ""
}
// CELPluginNetworkCapability sets permissions related to network access.
// This is an experimental feature.
type CELPluginNetworkCapability struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
}
func (x *CELPluginNetworkCapability) Reset() {
*x = CELPluginNetworkCapability{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[41]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *CELPluginNetworkCapability) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CELPluginNetworkCapability) ProtoMessage() {}
func (x *CELPluginNetworkCapability) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[41]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use CELPluginNetworkCapability.ProtoReflect.Descriptor instead.
func (*CELPluginNetworkCapability) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{41}
}
// CELFunction represents the CEL function definition.
type CELFunction struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// name is the function name.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// desc is the description of function.
// This description is used as documentation at code generation.
Desc string `protobuf:"bytes,2,opt,name=desc,proto3" json:"desc,omitempty"`
// args describe the definition of the function argument.
Args []*CELFunctionArgument `protobuf:"bytes,3,rep,name=args,proto3" json:"args,omitempty"`
// return describe the definition of return type of function.
Return *CELType `protobuf:"bytes,4,opt,name=return,proto3" json:"return,omitempty"`
}
func (x *CELFunction) Reset() {
*x = CELFunction{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[42]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *CELFunction) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CELFunction) ProtoMessage() {}
func (x *CELFunction) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[42]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use CELFunction.ProtoReflect.Descriptor instead.
func (*CELFunction) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{42}
}
func (x *CELFunction) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *CELFunction) GetDesc() string {
if x != nil {
return x.Desc
}
return ""
}
func (x *CELFunction) GetArgs() []*CELFunctionArgument {
if x != nil {
return x.Args
}
return nil
}
func (x *CELFunction) GetReturn() *CELType {
if x != nil {
return x.Return
}
return nil
}
// CELReceiverType represents methods tied to the message.
type CELReceiverType struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// name is the message name.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// desc is the description of plugin.
// This description is used as documentation at code generation.
Desc string `protobuf:"bytes,2,opt,name=desc,proto3" json:"desc,omitempty"`
// methods describe the definition of the method for the message.
Methods []*CELFunction `protobuf:"bytes,3,rep,name=methods,proto3" json:"methods,omitempty"`
}
func (x *CELReceiverType) Reset() {
*x = CELReceiverType{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[43]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *CELReceiverType) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CELReceiverType) ProtoMessage() {}
func (x *CELReceiverType) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[43]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use CELReceiverType.ProtoReflect.Descriptor instead.
func (*CELReceiverType) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{43}
}
func (x *CELReceiverType) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *CELReceiverType) GetDesc() string {
if x != nil {
return x.Desc
}
return ""
}
func (x *CELReceiverType) GetMethods() []*CELFunction {
if x != nil {
return x.Methods
}
return nil
}
// CELFunctionArgument represents the function argument.
type CELFunctionArgument struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// name is the argument value name.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// desc is the description of plugin.
// This description is used as documentation at code generation.
Desc string `protobuf:"bytes,2,opt,name=desc,proto3" json:"desc,omitempty"`
// type is the argument type.
Type *CELType `protobuf:"bytes,3,opt,name=type,proto3" json:"type,omitempty"`
}
func (x *CELFunctionArgument) Reset() {
*x = CELFunctionArgument{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[44]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *CELFunctionArgument) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CELFunctionArgument) ProtoMessage() {}
func (x *CELFunctionArgument) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[44]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use CELFunctionArgument.ProtoReflect.Descriptor instead.
func (*CELFunctionArgument) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{44}
}
func (x *CELFunctionArgument) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *CELFunctionArgument) GetDesc() string {
if x != nil {
return x.Desc
}
return ""
}
func (x *CELFunctionArgument) GetType() *CELType {
if x != nil {
return x.Type
}
return nil
}
// CELType represents type information for CEL plugin interface.
type CELType struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Types that are assignable to Type:
//
// *CELType_Kind
// *CELType_Repeated
// *CELType_Map
// *CELType_Message
// *CELType_Enum
Type isCELType_Type `protobuf_oneof:"type"`
}
func (x *CELType) Reset() {
*x = CELType{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[45]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *CELType) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CELType) ProtoMessage() {}
func (x *CELType) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[45]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use CELType.ProtoReflect.Descriptor instead.
func (*CELType) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{45}
}
func (m *CELType) GetType() isCELType_Type {
if m != nil {
return m.Type
}
return nil
}
func (x *CELType) GetKind() TypeKind {
if x, ok := x.GetType().(*CELType_Kind); ok {
return x.Kind
}
return TypeKind_UNKNOWN
}
func (x *CELType) GetRepeated() *CELType {
if x, ok := x.GetType().(*CELType_Repeated); ok {
return x.Repeated
}
return nil
}
func (x *CELType) GetMap() *CELMapType {
if x, ok := x.GetType().(*CELType_Map); ok {
return x.Map
}
return nil
}
func (x *CELType) GetMessage() string {
if x, ok := x.GetType().(*CELType_Message); ok {
return x.Message
}
return ""
}
func (x *CELType) GetEnum() string {
if x, ok := x.GetType().(*CELType_Enum); ok {
return x.Enum
}
return ""
}
type isCELType_Type interface {
isCELType_Type()
}
type CELType_Kind struct {
// kind is used when the type is a primitive type.
Kind TypeKind `protobuf:"varint,1,opt,name=kind,proto3,enum=grpc.federation.TypeKind,oneof"`
}
type CELType_Repeated struct {
// repeated is used when the type is a repeated type.
Repeated *CELType `protobuf:"bytes,2,opt,name=repeated,proto3,oneof"`
}
type CELType_Map struct {
// map is used when the type is a map type.
Map *CELMapType `protobuf:"bytes,3,opt,name=map,proto3,oneof"`
}
type CELType_Message struct {
// message is a fqdn to the message type.
Message string `protobuf:"bytes,4,opt,name=message,proto3,oneof"`
}
type CELType_Enum struct {
// enum is a fqdn to the enum type.
Enum string `protobuf:"bytes,5,opt,name=enum,proto3,oneof"`
}
func (*CELType_Kind) isCELType_Type() {}
func (*CELType_Repeated) isCELType_Type() {}
func (*CELType_Map) isCELType_Type() {}
func (*CELType_Message) isCELType_Type() {}
func (*CELType_Enum) isCELType_Type() {}
// CELMapType represents map type.
type CELMapType struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// key represents map's key type.
Key *CELType `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
// value represents map's value type.
Value *CELType `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
}
func (x *CELMapType) Reset() {
*x = CELMapType{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[46]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *CELMapType) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CELMapType) ProtoMessage() {}
func (x *CELMapType) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[46]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use CELMapType.ProtoReflect.Descriptor instead.
func (*CELMapType) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{46}
}
func (x *CELMapType) GetKey() *CELType {
if x != nil {
return x.Key
}
return nil
}
func (x *CELMapType) GetValue() *CELType {
if x != nil {
return x.Value
}
return nil
}
// CELVariable represents CEL variable.
type CELVariable struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// name is the variable name.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// desc is the description of plugin.
// This description is used as documentation at code generation.
Desc string `protobuf:"bytes,2,opt,name=desc,proto3" json:"desc,omitempty"`
// type is the variable type.
Type *CELType `protobuf:"bytes,3,opt,name=type,proto3" json:"type,omitempty"`
}
func (x *CELVariable) Reset() {
*x = CELVariable{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[47]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *CELVariable) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CELVariable) ProtoMessage() {}
func (x *CELVariable) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[47]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use CELVariable.ProtoReflect.Descriptor instead.
func (*CELVariable) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{47}
}
func (x *CELVariable) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *CELVariable) GetDesc() string {
if x != nil {
return x.Desc
}
return ""
}
func (x *CELVariable) GetType() *CELType {
if x != nil {
return x.Type
}
return nil
}
var file_grpc_federation_federation_proto_extTypes = []protoimpl.ExtensionInfo{
{
ExtendedType: (*descriptorpb.FileOptions)(nil),
ExtensionType: (*FileRule)(nil),
Field: 1187,
Name: "grpc.federation.file",
Tag: "bytes,1187,opt,name=file",
Filename: "grpc/federation/federation.proto",
},
{
ExtendedType: (*descriptorpb.ServiceOptions)(nil),
ExtensionType: (*ServiceRule)(nil),
Field: 1187,
Name: "grpc.federation.service",
Tag: "bytes,1187,opt,name=service",
Filename: "grpc/federation/federation.proto",
},
{
ExtendedType: (*descriptorpb.MethodOptions)(nil),
ExtensionType: (*MethodRule)(nil),
Field: 1187,
Name: "grpc.federation.method",
Tag: "bytes,1187,opt,name=method",
Filename: "grpc/federation/federation.proto",
},
{
ExtendedType: (*descriptorpb.MessageOptions)(nil),
ExtensionType: (*MessageRule)(nil),
Field: 1187,
Name: "grpc.federation.message",
Tag: "bytes,1187,opt,name=message",
Filename: "grpc/federation/federation.proto",
},
{
ExtendedType: (*descriptorpb.FieldOptions)(nil),
ExtensionType: (*FieldRule)(nil),
Field: 1187,
Name: "grpc.federation.field",
Tag: "bytes,1187,opt,name=field",
Filename: "grpc/federation/federation.proto",
},
{
ExtendedType: (*descriptorpb.EnumOptions)(nil),
ExtensionType: (*EnumRule)(nil),
Field: 1187,
Name: "grpc.federation.enum",
Tag: "bytes,1187,opt,name=enum",
Filename: "grpc/federation/federation.proto",
},
{
ExtendedType: (*descriptorpb.EnumValueOptions)(nil),
ExtensionType: (*EnumValueRule)(nil),
Field: 1187,
Name: "grpc.federation.enum_value",
Tag: "bytes,1187,opt,name=enum_value",
Filename: "grpc/federation/federation.proto",
},
{
ExtendedType: (*descriptorpb.OneofOptions)(nil),
ExtensionType: (*OneofRule)(nil),
Field: 1187,
Name: "grpc.federation.oneof",
Tag: "bytes,1187,opt,name=oneof",
Filename: "grpc/federation/federation.proto",
},
}
// Extension fields to descriptorpb.FileOptions.
var (
// optional grpc.federation.FileRule file = 1187;
E_File = &file_grpc_federation_federation_proto_extTypes[0]
)
// Extension fields to descriptorpb.ServiceOptions.
var (
// optional grpc.federation.ServiceRule service = 1187;
E_Service = &file_grpc_federation_federation_proto_extTypes[1]
)
// Extension fields to descriptorpb.MethodOptions.
var (
// optional grpc.federation.MethodRule method = 1187;
E_Method = &file_grpc_federation_federation_proto_extTypes[2]
)
// Extension fields to descriptorpb.MessageOptions.
var (
// optional grpc.federation.MessageRule message = 1187;
E_Message = &file_grpc_federation_federation_proto_extTypes[3]
)
// Extension fields to descriptorpb.FieldOptions.
var (
// optional grpc.federation.FieldRule field = 1187;
E_Field = &file_grpc_federation_federation_proto_extTypes[4]
)
// Extension fields to descriptorpb.EnumOptions.
var (
// optional grpc.federation.EnumRule enum = 1187;
E_Enum = &file_grpc_federation_federation_proto_extTypes[5]
)
// Extension fields to descriptorpb.EnumValueOptions.
var (
// optional grpc.federation.EnumValueRule enum_value = 1187;
E_EnumValue = &file_grpc_federation_federation_proto_extTypes[6]
)
// Extension fields to descriptorpb.OneofOptions.
var (
// optional grpc.federation.OneofRule oneof = 1187;
E_Oneof = &file_grpc_federation_federation_proto_extTypes[7]
)
var File_grpc_federation_federation_proto protoreflect.FileDescriptor
var file_grpc_federation_federation_proto_rawDesc = []byte{
0x0a, 0x20, 0x67, 0x72, 0x70, 0x63, 0x2f, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f,
0x6e, 0x2f, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f,
0x74, 0x6f, 0x12, 0x0f, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74,
0x69, 0x6f, 0x6e, 0x1a, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x2e,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x15, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x72, 0x70,
0x63, 0x2f, 0x63, 0x6f, 0x64, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f,
0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x72, 0x70, 0x63, 0x2f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x64,
0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x67, 0x72,
0x70, 0x63, 0x2f, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x70, 0x72,
0x69, 0x76, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1a, 0x67, 0x72, 0x70,
0x63, 0x2f, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x74, 0x69, 0x6d,
0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x56, 0x0a, 0x08, 0x46, 0x69, 0x6c, 0x65, 0x52,
0x75, 0x6c, 0x65, 0x12, 0x32, 0x0a, 0x06, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x18, 0x01, 0x20,
0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72,
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x43, 0x45, 0x4c, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x52,
0x06, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x69, 0x6d, 0x70, 0x6f, 0x72,
0x74, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x69, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x22,
0x20, 0x0a, 0x08, 0x45, 0x6e, 0x75, 0x6d, 0x52, 0x75, 0x6c, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x61,
0x6c, 0x69, 0x61, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x61, 0x6c, 0x69, 0x61,
0x73, 0x22, 0xb4, 0x01, 0x0a, 0x0d, 0x45, 0x6e, 0x75, 0x6d, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52,
0x75, 0x6c, 0x65, 0x12, 0x1d, 0x0a, 0x07, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x18, 0x01,
0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x07, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x88,
0x01, 0x01, 0x12, 0x14, 0x0a, 0x05, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28,
0x09, 0x52, 0x05, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x12, 0x37, 0x0a, 0x04, 0x61, 0x74, 0x74, 0x72,
0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65,
0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x56, 0x61, 0x6c,
0x75, 0x65, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x52, 0x04, 0x61, 0x74, 0x74,
0x72, 0x12, 0x1d, 0x0a, 0x07, 0x6e, 0x6f, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x18, 0x04, 0x20, 0x01,
0x28, 0x08, 0x48, 0x01, 0x52, 0x07, 0x6e, 0x6f, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x88, 0x01, 0x01,
0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x42, 0x0a, 0x0a, 0x08,
0x5f, 0x6e, 0x6f, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x22, 0x3e, 0x0a, 0x12, 0x45, 0x6e, 0x75, 0x6d,
0x56, 0x61, 0x6c, 0x75, 0x65, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 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, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28,
0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x0b, 0x0a, 0x09, 0x4f, 0x6e, 0x65, 0x6f,
0x66, 0x52, 0x75, 0x6c, 0x65, 0x22, 0x69, 0x0a, 0x0b, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65,
0x52, 0x75, 0x6c, 0x65, 0x12, 0x26, 0x0a, 0x03, 0x65, 0x6e, 0x76, 0x18, 0x01, 0x20, 0x01, 0x28,
0x0b, 0x32, 0x14, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74,
0x69, 0x6f, 0x6e, 0x2e, 0x45, 0x6e, 0x76, 0x52, 0x03, 0x65, 0x6e, 0x76, 0x12, 0x32, 0x0a, 0x03,
0x76, 0x61, 0x72, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x67, 0x72, 0x70, 0x63,
0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x53, 0x65, 0x72, 0x76,
0x69, 0x63, 0x65, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x03, 0x76, 0x61, 0x72,
0x22, 0x4a, 0x0a, 0x03, 0x45, 0x6e, 0x76, 0x12, 0x29, 0x0a, 0x03, 0x76, 0x61, 0x72, 0x18, 0x01,
0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65,
0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x45, 0x6e, 0x76, 0x56, 0x61, 0x72, 0x52, 0x03, 0x76,
0x61, 0x72, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20,
0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x8b, 0x03, 0x0a,
0x0f, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65,
0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01,
0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x13, 0x0a, 0x02, 0x69, 0x66, 0x18,
0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x02, 0x52, 0x02, 0x69, 0x66, 0x88, 0x01, 0x01, 0x12, 0x10,
0x0a, 0x02, 0x62, 0x79, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x02, 0x62, 0x79,
0x12, 0x2c, 0x0a, 0x03, 0x6d, 0x61, 0x70, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e,
0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e,
0x4d, 0x61, 0x70, 0x45, 0x78, 0x70, 0x72, 0x48, 0x00, 0x52, 0x03, 0x6d, 0x61, 0x70, 0x12, 0x38,
0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32,
0x1c, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f,
0x6e, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x45, 0x78, 0x70, 0x72, 0x48, 0x00, 0x52,
0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x50, 0x0a, 0x0a, 0x76, 0x61, 0x6c, 0x69,
0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x67,
0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x53,
0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x56, 0x61,
0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x78, 0x70, 0x72, 0x48, 0x00, 0x52, 0x0a,
0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2f, 0x0a, 0x04, 0x65, 0x6e,
0x75, 0x6d, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e,
0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x45,
0x78, 0x70, 0x72, 0x48, 0x00, 0x52, 0x04, 0x65, 0x6e, 0x75, 0x6d, 0x12, 0x35, 0x0a, 0x06, 0x73,
0x77, 0x69, 0x74, 0x63, 0x68, 0x18, 0x10, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x72,
0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x53, 0x77,
0x69, 0x74, 0x63, 0x68, 0x45, 0x78, 0x70, 0x72, 0x48, 0x00, 0x52, 0x06, 0x73, 0x77, 0x69, 0x74,
0x63, 0x68, 0x42, 0x06, 0x0a, 0x04, 0x65, 0x78, 0x70, 0x72, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e,
0x61, 0x6d, 0x65, 0x42, 0x05, 0x0a, 0x03, 0x5f, 0x69, 0x66, 0x22, 0x49, 0x0a, 0x1d, 0x53, 0x65,
0x72, 0x76, 0x69, 0x63, 0x65, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x56, 0x61, 0x6c,
0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x78, 0x70, 0x72, 0x12, 0x0e, 0x0a, 0x02, 0x69,
0x66, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x66, 0x12, 0x18, 0x0a, 0x07, 0x6d,
0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65,
0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x91, 0x01, 0x0a, 0x06, 0x45, 0x6e, 0x76, 0x56, 0x61, 0x72,
0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04,
0x6e, 0x61, 0x6d, 0x65, 0x12, 0x2c, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01,
0x28, 0x0b, 0x32, 0x18, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61,
0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x45, 0x6e, 0x76, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79,
0x70, 0x65, 0x12, 0x3a, 0x0a, 0x06, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01,
0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61,
0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x45, 0x6e, 0x76, 0x56, 0x61, 0x72, 0x4f, 0x70, 0x74, 0x69, 0x6f,
0x6e, 0x48, 0x00, 0x52, 0x06, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x88, 0x01, 0x01, 0x42, 0x09,
0x0a, 0x07, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xab, 0x01, 0x0a, 0x07, 0x45, 0x6e,
0x76, 0x54, 0x79, 0x70, 0x65, 0x12, 0x2f, 0x0a, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x18, 0x01, 0x20,
0x01, 0x28, 0x0e, 0x32, 0x19, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72,
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x4b, 0x69, 0x6e, 0x64, 0x48, 0x00,
0x52, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x12, 0x36, 0x0a, 0x08, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74,
0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e,
0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x45, 0x6e, 0x76, 0x54, 0x79,
0x70, 0x65, 0x48, 0x00, 0x52, 0x08, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x12, 0x2f,
0x0a, 0x03, 0x6d, 0x61, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x72,
0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x45, 0x6e,
0x76, 0x4d, 0x61, 0x70, 0x54, 0x79, 0x70, 0x65, 0x48, 0x00, 0x52, 0x03, 0x6d, 0x61, 0x70, 0x42,
0x06, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x22, 0x68, 0x0a, 0x0a, 0x45, 0x6e, 0x76, 0x4d, 0x61,
0x70, 0x54, 0x79, 0x70, 0x65, 0x12, 0x2a, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01,
0x28, 0x0b, 0x32, 0x18, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61,
0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x45, 0x6e, 0x76, 0x54, 0x79, 0x70, 0x65, 0x52, 0x03, 0x6b, 0x65,
0x79, 0x12, 0x2e, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b,
0x32, 0x18, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69,
0x6f, 0x6e, 0x2e, 0x45, 0x6e, 0x76, 0x54, 0x79, 0x70, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75,
0x65, 0x22, 0xc3, 0x01, 0x0a, 0x0c, 0x45, 0x6e, 0x76, 0x56, 0x61, 0x72, 0x4f, 0x70, 0x74, 0x69,
0x6f, 0x6e, 0x12, 0x21, 0x0a, 0x09, 0x61, 0x6c, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x74, 0x65, 0x18,
0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x09, 0x61, 0x6c, 0x74, 0x65, 0x72, 0x6e, 0x61,
0x74, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1d, 0x0a, 0x07, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74,
0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x07, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c,
0x74, 0x88, 0x01, 0x01, 0x12, 0x1f, 0x0a, 0x08, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64,
0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x48, 0x02, 0x52, 0x08, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72,
0x65, 0x64, 0x88, 0x01, 0x01, 0x12, 0x1d, 0x0a, 0x07, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x64,
0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x48, 0x03, 0x52, 0x07, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65,
0x64, 0x88, 0x01, 0x01, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x61, 0x6c, 0x74, 0x65, 0x72, 0x6e, 0x61,
0x74, 0x65, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x42, 0x0b,
0x0a, 0x09, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x42, 0x0a, 0x0a, 0x08, 0x5f,
0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x64, 0x22, 0x65, 0x0a, 0x0a, 0x4d, 0x65, 0x74, 0x68, 0x6f,
0x64, 0x52, 0x75, 0x6c, 0x65, 0x12, 0x1d, 0x0a, 0x07, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74,
0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x07, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75,
0x74, 0x88, 0x01, 0x01, 0x12, 0x1f, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e,
0x73, 0x65, 0x88, 0x01, 0x01, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75,
0x74, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x9c,
0x01, 0x0a, 0x0b, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x75, 0x6c, 0x65, 0x12, 0x35,
0x0a, 0x03, 0x64, 0x65, 0x66, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x67, 0x72,
0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x56, 0x61,
0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e,
0x52, 0x03, 0x64, 0x65, 0x66, 0x12, 0x2c, 0x0a, 0x0f, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x5f,
0x72, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00,
0x52, 0x0e, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x52, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x72,
0x88, 0x01, 0x01, 0x12, 0x14, 0x0a, 0x05, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x18, 0x03, 0x20, 0x03,
0x28, 0x09, 0x52, 0x05, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x42, 0x12, 0x0a, 0x10, 0x5f, 0x63, 0x75,
0x73, 0x74, 0x6f, 0x6d, 0x5f, 0x72, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x72, 0x22, 0xde, 0x03,
0x0a, 0x12, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69,
0x74, 0x69, 0x6f, 0x6e, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01,
0x28, 0x09, 0x48, 0x01, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x13, 0x0a,
0x02, 0x69, 0x66, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x02, 0x52, 0x02, 0x69, 0x66, 0x88,
0x01, 0x01, 0x12, 0x1f, 0x0a, 0x08, 0x61, 0x75, 0x74, 0x6f, 0x62, 0x69, 0x6e, 0x64, 0x18, 0x03,
0x20, 0x01, 0x28, 0x08, 0x48, 0x03, 0x52, 0x08, 0x61, 0x75, 0x74, 0x6f, 0x62, 0x69, 0x6e, 0x64,
0x88, 0x01, 0x01, 0x12, 0x10, 0x0a, 0x02, 0x62, 0x79, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x48,
0x00, 0x52, 0x02, 0x62, 0x79, 0x12, 0x2c, 0x0a, 0x03, 0x6d, 0x61, 0x70, 0x18, 0x0c, 0x20, 0x01,
0x28, 0x0b, 0x32, 0x18, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61,
0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x4d, 0x61, 0x70, 0x45, 0x78, 0x70, 0x72, 0x48, 0x00, 0x52, 0x03,
0x6d, 0x61, 0x70, 0x12, 0x38, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x0d,
0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65,
0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x45, 0x78,
0x70, 0x72, 0x48, 0x00, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x2f, 0x0a,
0x04, 0x63, 0x61, 0x6c, 0x6c, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x72,
0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x43, 0x61,
0x6c, 0x6c, 0x45, 0x78, 0x70, 0x72, 0x48, 0x00, 0x52, 0x04, 0x63, 0x61, 0x6c, 0x6c, 0x12, 0x41,
0x0a, 0x0a, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x0f, 0x20, 0x01,
0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61,
0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45,
0x78, 0x70, 0x72, 0x48, 0x00, 0x52, 0x0a, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f,
0x6e, 0x12, 0x2f, 0x0a, 0x04, 0x65, 0x6e, 0x75, 0x6d, 0x18, 0x10, 0x20, 0x01, 0x28, 0x0b, 0x32,
0x19, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f,
0x6e, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x45, 0x78, 0x70, 0x72, 0x48, 0x00, 0x52, 0x04, 0x65, 0x6e,
0x75, 0x6d, 0x12, 0x35, 0x0a, 0x06, 0x73, 0x77, 0x69, 0x74, 0x63, 0x68, 0x18, 0x11, 0x20, 0x01,
0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61,
0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x53, 0x77, 0x69, 0x74, 0x63, 0x68, 0x45, 0x78, 0x70, 0x72, 0x48,
0x00, 0x52, 0x06, 0x73, 0x77, 0x69, 0x74, 0x63, 0x68, 0x42, 0x06, 0x0a, 0x04, 0x65, 0x78, 0x70,
0x72, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x05, 0x0a, 0x03, 0x5f, 0x69,
0x66, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x61, 0x75, 0x74, 0x6f, 0x62, 0x69, 0x6e, 0x64, 0x22, 0xc5,
0x01, 0x0a, 0x07, 0x4d, 0x61, 0x70, 0x45, 0x78, 0x70, 0x72, 0x12, 0x35, 0x0a, 0x08, 0x69, 0x74,
0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67,
0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x49,
0x74, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x08, 0x69, 0x74, 0x65, 0x72, 0x61, 0x74, 0x6f,
0x72, 0x12, 0x10, 0x0a, 0x02, 0x62, 0x79, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52,
0x02, 0x62, 0x79, 0x12, 0x38, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x0c,
0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65,
0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x45, 0x78,
0x70, 0x72, 0x48, 0x00, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x2f, 0x0a,
0x04, 0x65, 0x6e, 0x75, 0x6d, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x72,
0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x45, 0x6e,
0x75, 0x6d, 0x45, 0x78, 0x70, 0x72, 0x48, 0x00, 0x52, 0x04, 0x65, 0x6e, 0x75, 0x6d, 0x42, 0x06,
0x0a, 0x04, 0x65, 0x78, 0x70, 0x72, 0x22, 0x30, 0x0a, 0x08, 0x49, 0x74, 0x65, 0x72, 0x61, 0x74,
0x6f, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x73, 0x72, 0x63, 0x18, 0x02, 0x20,
0x01, 0x28, 0x09, 0x52, 0x03, 0x73, 0x72, 0x63, 0x22, 0x50, 0x0a, 0x0b, 0x4d, 0x65, 0x73, 0x73,
0x61, 0x67, 0x65, 0x45, 0x78, 0x70, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18,
0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x2d, 0x0a, 0x04, 0x61,
0x72, 0x67, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x72, 0x70, 0x63,
0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x41, 0x72, 0x67, 0x75,
0x6d, 0x65, 0x6e, 0x74, 0x52, 0x04, 0x61, 0x72, 0x67, 0x73, 0x22, 0x2e, 0x0a, 0x08, 0x45, 0x6e,
0x75, 0x6d, 0x45, 0x78, 0x70, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01,
0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x62, 0x79,
0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x62, 0x79, 0x22, 0xf3, 0x02, 0x0a, 0x08, 0x43,
0x61, 0x6c, 0x6c, 0x45, 0x78, 0x70, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f,
0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12,
0x38, 0x0a, 0x07, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b,
0x32, 0x1e, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69,
0x6f, 0x6e, 0x2e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
0x52, 0x07, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x07, 0x74, 0x69, 0x6d,
0x65, 0x6f, 0x75, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x07, 0x74, 0x69,
0x6d, 0x65, 0x6f, 0x75, 0x74, 0x88, 0x01, 0x01, 0x12, 0x37, 0x0a, 0x05, 0x72, 0x65, 0x74, 0x72,
0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66,
0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x52, 0x65, 0x74, 0x72, 0x79, 0x50,
0x6f, 0x6c, 0x69, 0x63, 0x79, 0x48, 0x01, 0x52, 0x05, 0x72, 0x65, 0x74, 0x72, 0x79, 0x88, 0x01,
0x01, 0x12, 0x30, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b,
0x32, 0x1a, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69,
0x6f, 0x6e, 0x2e, 0x47, 0x52, 0x50, 0x43, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x05, 0x65, 0x72,
0x72, 0x6f, 0x72, 0x12, 0x3c, 0x0a, 0x06, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x06, 0x20,
0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72,
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x47, 0x52, 0x50, 0x43, 0x43, 0x61, 0x6c, 0x6c, 0x4f, 0x70,
0x74, 0x69, 0x6f, 0x6e, 0x48, 0x02, 0x52, 0x06, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x88, 0x01,
0x01, 0x12, 0x1f, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x07, 0x20,
0x01, 0x28, 0x09, 0x48, 0x03, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x88,
0x01, 0x01, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x42, 0x08,
0x0a, 0x06, 0x5f, 0x72, 0x65, 0x74, 0x72, 0x79, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6f, 0x70, 0x74,
0x69, 0x6f, 0x6e, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61,
0x22, 0x7f, 0x0a, 0x0a, 0x53, 0x77, 0x69, 0x74, 0x63, 0x68, 0x45, 0x78, 0x70, 0x72, 0x12, 0x33,
0x0a, 0x04, 0x63, 0x61, 0x73, 0x65, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x67,
0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x53,
0x77, 0x69, 0x74, 0x63, 0x68, 0x43, 0x61, 0x73, 0x65, 0x45, 0x78, 0x70, 0x72, 0x52, 0x04, 0x63,
0x61, 0x73, 0x65, 0x12, 0x3c, 0x0a, 0x07, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x18, 0x02,
0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65,
0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x53, 0x77, 0x69, 0x74, 0x63, 0x68, 0x44, 0x65, 0x66,
0x61, 0x75, 0x6c, 0x74, 0x45, 0x78, 0x70, 0x72, 0x52, 0x07, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c,
0x74, 0x22, 0x71, 0x0a, 0x0e, 0x53, 0x77, 0x69, 0x74, 0x63, 0x68, 0x43, 0x61, 0x73, 0x65, 0x45,
0x78, 0x70, 0x72, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x66, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
0x02, 0x69, 0x66, 0x12, 0x35, 0x0a, 0x03, 0x64, 0x65, 0x66, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b,
0x32, 0x23, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69,
0x6f, 0x6e, 0x2e, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x44, 0x65, 0x66, 0x69, 0x6e,
0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x03, 0x64, 0x65, 0x66, 0x12, 0x10, 0x0a, 0x02, 0x62, 0x79,
0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x02, 0x62, 0x79, 0x42, 0x06, 0x0a, 0x04,
0x65, 0x78, 0x70, 0x72, 0x22, 0x64, 0x0a, 0x11, 0x53, 0x77, 0x69, 0x74, 0x63, 0x68, 0x44, 0x65,
0x66, 0x61, 0x75, 0x6c, 0x74, 0x45, 0x78, 0x70, 0x72, 0x12, 0x35, 0x0a, 0x03, 0x64, 0x65, 0x66,
0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65,
0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c,
0x65, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x03, 0x64, 0x65, 0x66,
0x12, 0x10, 0x0a, 0x02, 0x62, 0x79, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x02,
0x62, 0x79, 0x42, 0x06, 0x0a, 0x04, 0x65, 0x78, 0x70, 0x72, 0x22, 0x86, 0x04, 0x0a, 0x09, 0x47,
0x52, 0x50, 0x43, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x35, 0x0a, 0x03, 0x64, 0x65, 0x66, 0x18,
0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64,
0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65,
0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x03, 0x64, 0x65, 0x66, 0x12,
0x13, 0x0a, 0x02, 0x69, 0x66, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x02, 0x69,
0x66, 0x88, 0x01, 0x01, 0x12, 0x29, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x03, 0x20, 0x01,
0x28, 0x0e, 0x32, 0x10, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x72, 0x70, 0x63, 0x2e,
0x43, 0x6f, 0x64, 0x65, 0x48, 0x01, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x88, 0x01, 0x01, 0x12,
0x1d, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09,
0x48, 0x02, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x88, 0x01, 0x01, 0x12, 0x3a,
0x0a, 0x07, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32,
0x20, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f,
0x6e, 0x2e, 0x47, 0x52, 0x50, 0x43, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x44, 0x65, 0x74, 0x61, 0x69,
0x6c, 0x52, 0x07, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x12, 0x1b, 0x0a, 0x06, 0x69, 0x67,
0x6e, 0x6f, 0x72, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x48, 0x03, 0x52, 0x06, 0x69, 0x67,
0x6e, 0x6f, 0x72, 0x65, 0x88, 0x01, 0x01, 0x12, 0x33, 0x0a, 0x13, 0x69, 0x67, 0x6e, 0x6f, 0x72,
0x65, 0x5f, 0x61, 0x6e, 0x64, 0x5f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x07,
0x20, 0x01, 0x28, 0x09, 0x48, 0x04, 0x52, 0x11, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x41, 0x6e,
0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x88, 0x01, 0x01, 0x12, 0x45, 0x0a, 0x09,
0x6c, 0x6f, 0x67, 0x5f, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0e, 0x32,
0x23, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f,
0x6e, 0x2e, 0x47, 0x52, 0x50, 0x43, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x2e, 0x4c, 0x6f, 0x67, 0x4c,
0x65, 0x76, 0x65, 0x6c, 0x48, 0x05, 0x52, 0x08, 0x6c, 0x6f, 0x67, 0x4c, 0x65, 0x76, 0x65, 0x6c,
0x88, 0x01, 0x01, 0x22, 0x41, 0x0a, 0x08, 0x4c, 0x6f, 0x67, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x12,
0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05,
0x44, 0x45, 0x42, 0x55, 0x47, 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, 0x49, 0x4e, 0x46, 0x4f, 0x10,
0x02, 0x12, 0x08, 0x0a, 0x04, 0x57, 0x41, 0x52, 0x4e, 0x10, 0x03, 0x12, 0x09, 0x0a, 0x05, 0x45,
0x52, 0x52, 0x4f, 0x52, 0x10, 0x04, 0x42, 0x05, 0x0a, 0x03, 0x5f, 0x69, 0x66, 0x42, 0x07, 0x0a,
0x05, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61,
0x67, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x42, 0x16, 0x0a,
0x14, 0x5f, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x5f, 0x61, 0x6e, 0x64, 0x5f, 0x72, 0x65, 0x73,
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x6c, 0x6f, 0x67, 0x5f, 0x6c, 0x65,
0x76, 0x65, 0x6c, 0x22, 0xfa, 0x05, 0x0a, 0x0f, 0x47, 0x52, 0x50, 0x43, 0x45, 0x72, 0x72, 0x6f,
0x72, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x66, 0x18, 0x01, 0x20,
0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x66, 0x12, 0x35, 0x0a, 0x03, 0x64, 0x65, 0x66, 0x18, 0x02,
0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65,
0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x44,
0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x03, 0x64, 0x65, 0x66, 0x12, 0x36,
0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32,
0x1c, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f,
0x6e, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x45, 0x78, 0x70, 0x72, 0x52, 0x07, 0x6d,
0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x34, 0x0a, 0x0a, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f,
0x69, 0x6e, 0x66, 0x6f, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x67, 0x6f, 0x6f,
0x67, 0x6c, 0x65, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x49, 0x6e, 0x66,
0x6f, 0x52, 0x09, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x34, 0x0a, 0x0a,
0x72, 0x65, 0x74, 0x72, 0x79, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b,
0x32, 0x15, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x52, 0x65,
0x74, 0x72, 0x79, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x09, 0x72, 0x65, 0x74, 0x72, 0x79, 0x49, 0x6e,
0x66, 0x6f, 0x12, 0x34, 0x0a, 0x0a, 0x64, 0x65, 0x62, 0x75, 0x67, 0x5f, 0x69, 0x6e, 0x66, 0x6f,
0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e,
0x72, 0x70, 0x63, 0x2e, 0x44, 0x65, 0x62, 0x75, 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x09, 0x64,
0x65, 0x62, 0x75, 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x3d, 0x0a, 0x0d, 0x71, 0x75, 0x6f, 0x74,
0x61, 0x5f, 0x66, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32,
0x18, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x51, 0x75, 0x6f,
0x74, 0x61, 0x46, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x52, 0x0c, 0x71, 0x75, 0x6f, 0x74, 0x61,
0x46, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x12, 0x52, 0x0a, 0x14, 0x70, 0x72, 0x65, 0x63, 0x6f,
0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x66, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x18,
0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x72,
0x70, 0x63, 0x2e, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x46,
0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x52, 0x13, 0x70, 0x72, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x69,
0x74, 0x69, 0x6f, 0x6e, 0x46, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x12, 0x37, 0x0a, 0x0b, 0x62,
0x61, 0x64, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b,
0x32, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x42, 0x61,
0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x0a, 0x62, 0x61, 0x64, 0x52, 0x65, 0x71,
0x75, 0x65, 0x73, 0x74, 0x12, 0x3a, 0x0a, 0x0c, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f,
0x69, 0x6e, 0x66, 0x6f, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f,
0x67, 0x6c, 0x65, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x49,
0x6e, 0x66, 0x6f, 0x52, 0x0b, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, 0x6e, 0x66, 0x6f,
0x12, 0x3d, 0x0a, 0x0d, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x69, 0x6e, 0x66,
0x6f, 0x18, 0x0b, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,
0x2e, 0x72, 0x70, 0x63, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x6e, 0x66,
0x6f, 0x52, 0x0c, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12,
0x24, 0x0a, 0x04, 0x68, 0x65, 0x6c, 0x70, 0x18, 0x0c, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e,
0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x48, 0x65, 0x6c, 0x70, 0x52,
0x04, 0x68, 0x65, 0x6c, 0x70, 0x12, 0x49, 0x0a, 0x11, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x69, 0x7a,
0x65, 0x64, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x0d, 0x20, 0x03, 0x28, 0x0b,
0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x6f,
0x63, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x10,
0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65,
0x12, 0x0e, 0x0a, 0x02, 0x62, 0x79, 0x18, 0x0e, 0x20, 0x03, 0x28, 0x09, 0x52, 0x02, 0x62, 0x79,
0x22, 0xc7, 0x03, 0x0a, 0x0e, 0x47, 0x52, 0x50, 0x43, 0x43, 0x61, 0x6c, 0x6c, 0x4f, 0x70, 0x74,
0x69, 0x6f, 0x6e, 0x12, 0x2c, 0x0a, 0x0f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x5f, 0x73,
0x75, 0x62, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0e,
0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x53, 0x75, 0x62, 0x74, 0x79, 0x70, 0x65, 0x88, 0x01,
0x01, 0x12, 0x1b, 0x0a, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28,
0x09, 0x48, 0x01, 0x52, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x88, 0x01, 0x01, 0x12, 0x37,
0x0a, 0x16, 0x6d, 0x61, 0x78, 0x5f, 0x63, 0x61, 0x6c, 0x6c, 0x5f, 0x72, 0x65, 0x63, 0x76, 0x5f,
0x6d, 0x73, 0x67, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x48, 0x02,
0x52, 0x12, 0x6d, 0x61, 0x78, 0x43, 0x61, 0x6c, 0x6c, 0x52, 0x65, 0x63, 0x76, 0x4d, 0x73, 0x67,
0x53, 0x69, 0x7a, 0x65, 0x88, 0x01, 0x01, 0x12, 0x37, 0x0a, 0x16, 0x6d, 0x61, 0x78, 0x5f, 0x63,
0x61, 0x6c, 0x6c, 0x5f, 0x73, 0x65, 0x6e, 0x64, 0x5f, 0x6d, 0x73, 0x67, 0x5f, 0x73, 0x69, 0x7a,
0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x48, 0x03, 0x52, 0x12, 0x6d, 0x61, 0x78, 0x43, 0x61,
0x6c, 0x6c, 0x53, 0x65, 0x6e, 0x64, 0x4d, 0x73, 0x67, 0x53, 0x69, 0x7a, 0x65, 0x88, 0x01, 0x01,
0x12, 0x28, 0x0a, 0x0d, 0x73, 0x74, 0x61, 0x74, 0x69, 0x63, 0x5f, 0x6d, 0x65, 0x74, 0x68, 0x6f,
0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x48, 0x04, 0x52, 0x0c, 0x73, 0x74, 0x61, 0x74, 0x69,
0x63, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x88, 0x01, 0x01, 0x12, 0x1d, 0x0a, 0x07, 0x74, 0x72,
0x61, 0x69, 0x6c, 0x65, 0x72, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x48, 0x05, 0x52, 0x07, 0x74,
0x72, 0x61, 0x69, 0x6c, 0x65, 0x72, 0x88, 0x01, 0x01, 0x12, 0x29, 0x0a, 0x0e, 0x77, 0x61, 0x69,
0x74, 0x5f, 0x66, 0x6f, 0x72, 0x5f, 0x72, 0x65, 0x61, 0x64, 0x79, 0x18, 0x07, 0x20, 0x01, 0x28,
0x08, 0x48, 0x06, 0x52, 0x0c, 0x77, 0x61, 0x69, 0x74, 0x46, 0x6f, 0x72, 0x52, 0x65, 0x61, 0x64,
0x79, 0x88, 0x01, 0x01, 0x42, 0x12, 0x0a, 0x10, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74,
0x5f, 0x73, 0x75, 0x62, 0x74, 0x79, 0x70, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x68, 0x65, 0x61,
0x64, 0x65, 0x72, 0x42, 0x19, 0x0a, 0x17, 0x5f, 0x6d, 0x61, 0x78, 0x5f, 0x63, 0x61, 0x6c, 0x6c,
0x5f, 0x72, 0x65, 0x63, 0x76, 0x5f, 0x6d, 0x73, 0x67, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x42, 0x19,
0x0a, 0x17, 0x5f, 0x6d, 0x61, 0x78, 0x5f, 0x63, 0x61, 0x6c, 0x6c, 0x5f, 0x73, 0x65, 0x6e, 0x64,
0x5f, 0x6d, 0x73, 0x67, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x42, 0x10, 0x0a, 0x0e, 0x5f, 0x73, 0x74,
0x61, 0x74, 0x69, 0x63, 0x5f, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x42, 0x0a, 0x0a, 0x08, 0x5f,
0x74, 0x72, 0x61, 0x69, 0x6c, 0x65, 0x72, 0x42, 0x11, 0x0a, 0x0f, 0x5f, 0x77, 0x61, 0x69, 0x74,
0x5f, 0x66, 0x6f, 0x72, 0x5f, 0x72, 0x65, 0x61, 0x64, 0x79, 0x22, 0x64, 0x0a, 0x0e, 0x56, 0x61,
0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x78, 0x70, 0x72, 0x12, 0x17, 0x0a, 0x04,
0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61,
0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x30, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x02,
0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65,
0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x47, 0x52, 0x50, 0x43, 0x45, 0x72, 0x72, 0x6f, 0x72,
0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65,
0x22, 0xb8, 0x01, 0x0a, 0x0b, 0x52, 0x65, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79,
0x12, 0x42, 0x0a, 0x08, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01,
0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61,
0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x52, 0x65, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79,
0x43, 0x6f, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x08, 0x63, 0x6f, 0x6e, 0x73,
0x74, 0x61, 0x6e, 0x74, 0x12, 0x4b, 0x0a, 0x0b, 0x65, 0x78, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74,
0x69, 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x67, 0x72, 0x70, 0x63,
0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x52, 0x65, 0x74, 0x72,
0x79, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x45, 0x78, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x69,
0x61, 0x6c, 0x48, 0x00, 0x52, 0x0b, 0x65, 0x78, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x69, 0x61,
0x6c, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x66, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69,
0x66, 0x42, 0x08, 0x0a, 0x06, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x22, 0x79, 0x0a, 0x13, 0x52,
0x65, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x61,
0x6e, 0x74, 0x12, 0x1f, 0x0a, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x01,
0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c,
0x88, 0x01, 0x01, 0x12, 0x24, 0x0a, 0x0b, 0x6d, 0x61, 0x78, 0x5f, 0x72, 0x65, 0x74, 0x72, 0x69,
0x65, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x48, 0x01, 0x52, 0x0a, 0x6d, 0x61, 0x78, 0x52,
0x65, 0x74, 0x72, 0x69, 0x65, 0x73, 0x88, 0x01, 0x01, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x69, 0x6e,
0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x6d, 0x61, 0x78, 0x5f, 0x72,
0x65, 0x74, 0x72, 0x69, 0x65, 0x73, 0x22, 0xd1, 0x02, 0x0a, 0x16, 0x52, 0x65, 0x74, 0x72, 0x79,
0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x45, 0x78, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x69, 0x61,
0x6c, 0x12, 0x2e, 0x0a, 0x10, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x5f, 0x69, 0x6e, 0x74,
0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0f, 0x69,
0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x88, 0x01,
0x01, 0x12, 0x36, 0x0a, 0x14, 0x72, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x69, 0x7a, 0x61, 0x74, 0x69,
0x6f, 0x6e, 0x5f, 0x66, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x01, 0x48,
0x01, 0x52, 0x13, 0x72, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e,
0x46, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x88, 0x01, 0x01, 0x12, 0x23, 0x0a, 0x0a, 0x6d, 0x75, 0x6c,
0x74, 0x69, 0x70, 0x6c, 0x69, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x01, 0x48, 0x02, 0x52,
0x0a, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x69, 0x65, 0x72, 0x88, 0x01, 0x01, 0x12, 0x26,
0x0a, 0x0c, 0x6d, 0x61, 0x78, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x04,
0x20, 0x01, 0x28, 0x09, 0x48, 0x03, 0x52, 0x0b, 0x6d, 0x61, 0x78, 0x49, 0x6e, 0x74, 0x65, 0x72,
0x76, 0x61, 0x6c, 0x88, 0x01, 0x01, 0x12, 0x24, 0x0a, 0x0b, 0x6d, 0x61, 0x78, 0x5f, 0x72, 0x65,
0x74, 0x72, 0x69, 0x65, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x48, 0x04, 0x52, 0x0a, 0x6d,
0x61, 0x78, 0x52, 0x65, 0x74, 0x72, 0x69, 0x65, 0x73, 0x88, 0x01, 0x01, 0x42, 0x13, 0x0a, 0x11,
0x5f, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61,
0x6c, 0x42, 0x17, 0x0a, 0x15, 0x5f, 0x72, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x69, 0x7a, 0x61, 0x74,
0x69, 0x6f, 0x6e, 0x5f, 0x66, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x6d,
0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x69, 0x65, 0x72, 0x42, 0x0f, 0x0a, 0x0d, 0x5f, 0x6d, 0x61,
0x78, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x6d,
0x61, 0x78, 0x5f, 0x72, 0x65, 0x74, 0x72, 0x69, 0x65, 0x73, 0x22, 0x5d, 0x0a, 0x0d, 0x4d, 0x65,
0x74, 0x68, 0x6f, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x66,
0x69, 0x65, 0x6c, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x66, 0x69, 0x65, 0x6c,
0x64, 0x12, 0x13, 0x0a, 0x02, 0x62, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52,
0x02, 0x62, 0x79, 0x88, 0x01, 0x01, 0x12, 0x13, 0x0a, 0x02, 0x69, 0x66, 0x18, 0x03, 0x20, 0x01,
0x28, 0x09, 0x48, 0x01, 0x52, 0x02, 0x69, 0x66, 0x88, 0x01, 0x01, 0x42, 0x05, 0x0a, 0x03, 0x5f,
0x62, 0x79, 0x42, 0x05, 0x0a, 0x03, 0x5f, 0x69, 0x66, 0x22, 0x85, 0x01, 0x0a, 0x0e, 0x4d, 0x65,
0x74, 0x68, 0x6f, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x17, 0x0a, 0x04,
0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61,
0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x18, 0x02,
0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x05, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x88, 0x01, 0x01,
0x12, 0x1f, 0x0a, 0x08, 0x61, 0x75, 0x74, 0x6f, 0x62, 0x69, 0x6e, 0x64, 0x18, 0x03, 0x20, 0x01,
0x28, 0x08, 0x48, 0x02, 0x52, 0x08, 0x61, 0x75, 0x74, 0x6f, 0x62, 0x69, 0x6e, 0x64, 0x88, 0x01,
0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x66,
0x69, 0x65, 0x6c, 0x64, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x61, 0x75, 0x74, 0x6f, 0x62, 0x69, 0x6e,
0x64, 0x22, 0x62, 0x0a, 0x08, 0x41, 0x72, 0x67, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x12, 0x0a,
0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d,
0x65, 0x12, 0x13, 0x0a, 0x02, 0x62, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52,
0x02, 0x62, 0x79, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x69, 0x6e, 0x6c, 0x69, 0x6e, 0x65,
0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x06, 0x69, 0x6e, 0x6c, 0x69, 0x6e, 0x65,
0x88, 0x01, 0x01, 0x42, 0x05, 0x0a, 0x03, 0x5f, 0x62, 0x79, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x69,
0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x22, 0xf2, 0x01, 0x0a, 0x09, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x52,
0x75, 0x6c, 0x65, 0x12, 0x2c, 0x0a, 0x0f, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x5f, 0x72, 0x65,
0x73, 0x6f, 0x6c, 0x76, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x0e,
0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x52, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x72, 0x88, 0x01,
0x01, 0x12, 0x13, 0x0a, 0x02, 0x62, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52,
0x02, 0x62, 0x79, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x18,
0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x02, 0x52, 0x05, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x88, 0x01,
0x01, 0x12, 0x31, 0x0a, 0x05, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b,
0x32, 0x1b, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69,
0x6f, 0x6e, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x6e, 0x65, 0x6f, 0x66, 0x52, 0x05, 0x6f,
0x6e, 0x65, 0x6f, 0x66, 0x12, 0x2f, 0x0a, 0x03, 0x65, 0x6e, 0x76, 0x18, 0x05, 0x20, 0x01, 0x28,
0x0b, 0x32, 0x1d, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74,
0x69, 0x6f, 0x6e, 0x2e, 0x45, 0x6e, 0x76, 0x56, 0x61, 0x72, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e,
0x52, 0x03, 0x65, 0x6e, 0x76, 0x42, 0x12, 0x0a, 0x10, 0x5f, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d,
0x5f, 0x72, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x72, 0x42, 0x05, 0x0a, 0x03, 0x5f, 0x62, 0x79,
0x42, 0x08, 0x0a, 0x06, 0x5f, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x22, 0x89, 0x01, 0x0a, 0x0a, 0x46,
0x69, 0x65, 0x6c, 0x64, 0x4f, 0x6e, 0x65, 0x6f, 0x66, 0x12, 0x10, 0x0a, 0x02, 0x69, 0x66, 0x18,
0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x02, 0x69, 0x66, 0x12, 0x1a, 0x0a, 0x07, 0x64,
0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x07,
0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x12, 0x35, 0x0a, 0x03, 0x64, 0x65, 0x66, 0x18, 0x03,
0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65,
0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x44,
0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x03, 0x64, 0x65, 0x66, 0x12, 0x0e,
0x0a, 0x02, 0x62, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x62, 0x79, 0x42, 0x06,
0x0a, 0x04, 0x63, 0x6f, 0x6e, 0x64, 0x22, 0x45, 0x0a, 0x09, 0x43, 0x45, 0x4c, 0x50, 0x6c, 0x75,
0x67, 0x69, 0x6e, 0x12, 0x38, 0x0a, 0x06, 0x65, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x01, 0x20,
0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72,
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x43, 0x45, 0x4c, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x45,
0x78, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x06, 0x65, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x22, 0xaf, 0x02,
0x0a, 0x0f, 0x43, 0x45, 0x4c, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x45, 0x78, 0x70, 0x6f, 0x72,
0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x65, 0x73, 0x63, 0x18, 0x02, 0x20,
0x01, 0x28, 0x09, 0x52, 0x04, 0x64, 0x65, 0x73, 0x63, 0x12, 0x36, 0x0a, 0x05, 0x74, 0x79, 0x70,
0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e,
0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x43, 0x45, 0x4c, 0x52, 0x65,
0x63, 0x65, 0x69, 0x76, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x52, 0x05, 0x74, 0x79, 0x70, 0x65,
0x73, 0x12, 0x3a, 0x0a, 0x09, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x04,
0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65,
0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x43, 0x45, 0x4c, 0x46, 0x75, 0x6e, 0x63, 0x74, 0x69,
0x6f, 0x6e, 0x52, 0x09, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x3a, 0x0a,
0x09, 0x76, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b,
0x32, 0x1c, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69,
0x6f, 0x6e, 0x2e, 0x43, 0x45, 0x4c, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x09,
0x76, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x12, 0x44, 0x0a, 0x0a, 0x63, 0x61, 0x70,
0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e,
0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e,
0x43, 0x45, 0x4c, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c,
0x69, 0x74, 0x79, 0x52, 0x0a, 0x63, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x22,
0x9b, 0x02, 0x0a, 0x13, 0x43, 0x45, 0x4c, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x43, 0x61, 0x70,
0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x12, 0x3e, 0x0a, 0x03, 0x65, 0x6e, 0x76, 0x18, 0x01,
0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65,
0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x43, 0x45, 0x4c, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e,
0x45, 0x6e, 0x76, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x48, 0x00, 0x52,
0x03, 0x65, 0x6e, 0x76, 0x88, 0x01, 0x01, 0x12, 0x54, 0x0a, 0x0b, 0x66, 0x69, 0x6c, 0x65, 0x5f,
0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x67,
0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x43,
0x45, 0x4c, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x46, 0x69, 0x6c, 0x65, 0x53, 0x79, 0x73, 0x74,
0x65, 0x6d, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x48, 0x01, 0x52, 0x0a,
0x66, 0x69, 0x6c, 0x65, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x88, 0x01, 0x01, 0x12, 0x4a, 0x0a,
0x07, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b,
0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e,
0x2e, 0x43, 0x45, 0x4c, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72,
0x6b, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x48, 0x02, 0x52, 0x07, 0x6e,
0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x88, 0x01, 0x01, 0x42, 0x06, 0x0a, 0x04, 0x5f, 0x65, 0x6e,
0x76, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x73, 0x79, 0x73, 0x74, 0x65,
0x6d, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x22, 0x40, 0x0a,
0x16, 0x43, 0x45, 0x4c, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x45, 0x6e, 0x76, 0x43, 0x61, 0x70,
0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x61, 0x6c, 0x6c, 0x18, 0x01,
0x20, 0x01, 0x28, 0x08, 0x52, 0x03, 0x61, 0x6c, 0x6c, 0x12, 0x14, 0x0a, 0x05, 0x6e, 0x61, 0x6d,
0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x22,
0x3e, 0x0a, 0x1d, 0x43, 0x45, 0x4c, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x46, 0x69, 0x6c, 0x65,
0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79,
0x12, 0x1d, 0x0a, 0x0a, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01,
0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x50, 0x61, 0x74, 0x68, 0x22,
0x1c, 0x0a, 0x1a, 0x43, 0x45, 0x4c, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x4e, 0x65, 0x74, 0x77,
0x6f, 0x72, 0x6b, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x22, 0xa1, 0x01,
0x0a, 0x0b, 0x43, 0x45, 0x4c, 0x46, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a,
0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d,
0x65, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x65, 0x73, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52,
0x04, 0x64, 0x65, 0x73, 0x63, 0x12, 0x38, 0x0a, 0x04, 0x61, 0x72, 0x67, 0x73, 0x18, 0x03, 0x20,
0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72,
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x43, 0x45, 0x4c, 0x46, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f,
0x6e, 0x41, 0x72, 0x67, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x04, 0x61, 0x72, 0x67, 0x73, 0x12,
0x30, 0x0a, 0x06, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32,
0x18, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f,
0x6e, 0x2e, 0x43, 0x45, 0x4c, 0x54, 0x79, 0x70, 0x65, 0x52, 0x06, 0x72, 0x65, 0x74, 0x75, 0x72,
0x6e, 0x22, 0x71, 0x0a, 0x0f, 0x43, 0x45, 0x4c, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x72,
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, 0x12, 0x0a, 0x04, 0x64, 0x65, 0x73, 0x63,
0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x64, 0x65, 0x73, 0x63, 0x12, 0x36, 0x0a, 0x07,
0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e,
0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e,
0x43, 0x45, 0x4c, 0x46, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x6d, 0x65, 0x74,
0x68, 0x6f, 0x64, 0x73, 0x22, 0x6b, 0x0a, 0x13, 0x43, 0x45, 0x4c, 0x46, 0x75, 0x6e, 0x63, 0x74,
0x69, 0x6f, 0x6e, 0x41, 0x72, 0x67, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e,
0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12,
0x12, 0x0a, 0x04, 0x64, 0x65, 0x73, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x64,
0x65, 0x73, 0x63, 0x12, 0x2c, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28,
0x0b, 0x32, 0x18, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74,
0x69, 0x6f, 0x6e, 0x2e, 0x43, 0x45, 0x4c, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70,
0x65, 0x22, 0xdd, 0x01, 0x0a, 0x07, 0x43, 0x45, 0x4c, 0x54, 0x79, 0x70, 0x65, 0x12, 0x2f, 0x0a,
0x04, 0x6b, 0x69, 0x6e, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x19, 0x2e, 0x67, 0x72,
0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x54, 0x79,
0x70, 0x65, 0x4b, 0x69, 0x6e, 0x64, 0x48, 0x00, 0x52, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x12, 0x36,
0x0a, 0x08, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b,
0x32, 0x18, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69,
0x6f, 0x6e, 0x2e, 0x43, 0x45, 0x4c, 0x54, 0x79, 0x70, 0x65, 0x48, 0x00, 0x52, 0x08, 0x72, 0x65,
0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x12, 0x2f, 0x0a, 0x03, 0x6d, 0x61, 0x70, 0x18, 0x03, 0x20,
0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72,
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x43, 0x45, 0x4c, 0x4d, 0x61, 0x70, 0x54, 0x79, 0x70, 0x65,
0x48, 0x00, 0x52, 0x03, 0x6d, 0x61, 0x70, 0x12, 0x1a, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61,
0x67, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73,
0x61, 0x67, 0x65, 0x12, 0x14, 0x0a, 0x04, 0x65, 0x6e, 0x75, 0x6d, 0x18, 0x05, 0x20, 0x01, 0x28,
0x09, 0x48, 0x00, 0x52, 0x04, 0x65, 0x6e, 0x75, 0x6d, 0x42, 0x06, 0x0a, 0x04, 0x74, 0x79, 0x70,
0x65, 0x22, 0x68, 0x0a, 0x0a, 0x43, 0x45, 0x4c, 0x4d, 0x61, 0x70, 0x54, 0x79, 0x70, 0x65, 0x12,
0x2a, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x67,
0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x43,
0x45, 0x4c, 0x54, 0x79, 0x70, 0x65, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x2e, 0x0a, 0x05, 0x76,
0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x67, 0x72, 0x70,
0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x43, 0x45, 0x4c,
0x54, 0x79, 0x70, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x63, 0x0a, 0x0b, 0x43,
0x45, 0x4c, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61,
0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x12,
0x0a, 0x04, 0x64, 0x65, 0x73, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x64, 0x65,
0x73, 0x63, 0x12, 0x2c, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b,
0x32, 0x18, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69,
0x6f, 0x6e, 0x2e, 0x43, 0x45, 0x4c, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65,
0x2a, 0x5e, 0x0a, 0x08, 0x54, 0x79, 0x70, 0x65, 0x4b, 0x69, 0x6e, 0x64, 0x12, 0x0b, 0x0a, 0x07,
0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x53, 0x54, 0x52,
0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, 0x42, 0x4f, 0x4f, 0x4c, 0x10, 0x02, 0x12,
0x09, 0x0a, 0x05, 0x49, 0x4e, 0x54, 0x36, 0x34, 0x10, 0x03, 0x12, 0x0a, 0x0a, 0x06, 0x55, 0x49,
0x4e, 0x54, 0x36, 0x34, 0x10, 0x04, 0x12, 0x0a, 0x0a, 0x06, 0x44, 0x4f, 0x55, 0x42, 0x4c, 0x45,
0x10, 0x05, 0x12, 0x0c, 0x0a, 0x08, 0x44, 0x55, 0x52, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x06,
0x3a, 0x4c, 0x0a, 0x04, 0x66, 0x69, 0x6c, 0x65, 0x12, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c,
0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x4f,
0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xa3, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e,
0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e,
0x46, 0x69, 0x6c, 0x65, 0x52, 0x75, 0x6c, 0x65, 0x52, 0x04, 0x66, 0x69, 0x6c, 0x65, 0x3a, 0x58,
0x0a, 0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x1f, 0x2e, 0x67, 0x6f, 0x6f, 0x67,
0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x65, 0x72, 0x76,
0x69, 0x63, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xa3, 0x09, 0x20, 0x01, 0x28,
0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74,
0x69, 0x6f, 0x6e, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x75, 0x6c, 0x65, 0x52,
0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x3a, 0x54, 0x0a, 0x06, 0x6d, 0x65, 0x74, 0x68,
0x6f, 0x64, 0x12, 0x1e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f,
0x6e, 0x73, 0x18, 0xa3, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x72, 0x70, 0x63,
0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x4d, 0x65, 0x74, 0x68,
0x6f, 0x64, 0x52, 0x75, 0x6c, 0x65, 0x52, 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x3a, 0x58,
0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x1f, 0x2e, 0x67, 0x6f, 0x6f, 0x67,
0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4d, 0x65, 0x73, 0x73,
0x61, 0x67, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xa3, 0x09, 0x20, 0x01, 0x28,
0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74,
0x69, 0x6f, 0x6e, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x75, 0x6c, 0x65, 0x52,
0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x3a, 0x50, 0x0a, 0x05, 0x66, 0x69, 0x65, 0x6c,
0x64, 0x12, 0x1d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73,
0x18, 0xa3, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66,
0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x52,
0x75, 0x6c, 0x65, 0x52, 0x05, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x3a, 0x4c, 0x0a, 0x04, 0x65, 0x6e,
0x75, 0x6d, 0x12, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73,
0x18, 0xa3, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66,
0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x52, 0x75,
0x6c, 0x65, 0x52, 0x04, 0x65, 0x6e, 0x75, 0x6d, 0x3a, 0x61, 0x0a, 0x0a, 0x65, 0x6e, 0x75, 0x6d,
0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x21, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x56, 0x61, 0x6c,
0x75, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xa3, 0x09, 0x20, 0x01, 0x28, 0x0b,
0x32, 0x1e, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69,
0x6f, 0x6e, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x75, 0x6c, 0x65,
0x52, 0x09, 0x65, 0x6e, 0x75, 0x6d, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x50, 0x0a, 0x05, 0x6f,
0x6e, 0x65, 0x6f, 0x66, 0x12, 0x1d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4f, 0x6e, 0x65, 0x6f, 0x66, 0x4f, 0x70, 0x74, 0x69,
0x6f, 0x6e, 0x73, 0x18, 0xa3, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x72, 0x70,
0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x4f, 0x6e, 0x65,
0x6f, 0x66, 0x52, 0x75, 0x6c, 0x65, 0x52, 0x05, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x42, 0xc2, 0x01,
0x0a, 0x13, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72,
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x0f, 0x46, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f,
0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3d, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62,
0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6d, 0x65, 0x72, 0x63, 0x61, 0x72, 0x69, 0x2f, 0x67, 0x72, 0x70,
0x63, 0x2d, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x67, 0x72, 0x70,
0x63, 0x2f, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x3b, 0x66, 0x65, 0x64,
0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0xa2, 0x02, 0x03, 0x47, 0x46, 0x58, 0xaa, 0x02, 0x0f,
0x47, 0x72, 0x70, 0x63, 0x2e, 0x46, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0xca,
0x02, 0x0f, 0x47, 0x72, 0x70, 0x63, 0x5c, 0x46, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f,
0x6e, 0xe2, 0x02, 0x1b, 0x47, 0x72, 0x70, 0x63, 0x5c, 0x46, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74,
0x69, 0x6f, 0x6e, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea,
0x02, 0x10, 0x47, 0x72, 0x70, 0x63, 0x3a, 0x3a, 0x46, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69,
0x6f, 0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_grpc_federation_federation_proto_rawDescOnce sync.Once
file_grpc_federation_federation_proto_rawDescData = file_grpc_federation_federation_proto_rawDesc
)
func file_grpc_federation_federation_proto_rawDescGZIP() []byte {
file_grpc_federation_federation_proto_rawDescOnce.Do(func() {
file_grpc_federation_federation_proto_rawDescData = protoimpl.X.CompressGZIP(file_grpc_federation_federation_proto_rawDescData)
})
return file_grpc_federation_federation_proto_rawDescData
}
var file_grpc_federation_federation_proto_enumTypes = make([]protoimpl.EnumInfo, 2)
var file_grpc_federation_federation_proto_msgTypes = make([]protoimpl.MessageInfo, 48)
var file_grpc_federation_federation_proto_goTypes = []interface{}{
(TypeKind)(0), // 0: grpc.federation.TypeKind
(GRPCError_LogLevel)(0), // 1: grpc.federation.GRPCError.LogLevel
(*FileRule)(nil), // 2: grpc.federation.FileRule
(*EnumRule)(nil), // 3: grpc.federation.EnumRule
(*EnumValueRule)(nil), // 4: grpc.federation.EnumValueRule
(*EnumValueAttribute)(nil), // 5: grpc.federation.EnumValueAttribute
(*OneofRule)(nil), // 6: grpc.federation.OneofRule
(*ServiceRule)(nil), // 7: grpc.federation.ServiceRule
(*Env)(nil), // 8: grpc.federation.Env
(*ServiceVariable)(nil), // 9: grpc.federation.ServiceVariable
(*ServiceVariableValidationExpr)(nil), // 10: grpc.federation.ServiceVariableValidationExpr
(*EnvVar)(nil), // 11: grpc.federation.EnvVar
(*EnvType)(nil), // 12: grpc.federation.EnvType
(*EnvMapType)(nil), // 13: grpc.federation.EnvMapType
(*EnvVarOption)(nil), // 14: grpc.federation.EnvVarOption
(*MethodRule)(nil), // 15: grpc.federation.MethodRule
(*MessageRule)(nil), // 16: grpc.federation.MessageRule
(*VariableDefinition)(nil), // 17: grpc.federation.VariableDefinition
(*MapExpr)(nil), // 18: grpc.federation.MapExpr
(*Iterator)(nil), // 19: grpc.federation.Iterator
(*MessageExpr)(nil), // 20: grpc.federation.MessageExpr
(*EnumExpr)(nil), // 21: grpc.federation.EnumExpr
(*CallExpr)(nil), // 22: grpc.federation.CallExpr
(*SwitchExpr)(nil), // 23: grpc.federation.SwitchExpr
(*SwitchCaseExpr)(nil), // 24: grpc.federation.SwitchCaseExpr
(*SwitchDefaultExpr)(nil), // 25: grpc.federation.SwitchDefaultExpr
(*GRPCError)(nil), // 26: grpc.federation.GRPCError
(*GRPCErrorDetail)(nil), // 27: grpc.federation.GRPCErrorDetail
(*GRPCCallOption)(nil), // 28: grpc.federation.GRPCCallOption
(*ValidationExpr)(nil), // 29: grpc.federation.ValidationExpr
(*RetryPolicy)(nil), // 30: grpc.federation.RetryPolicy
(*RetryPolicyConstant)(nil), // 31: grpc.federation.RetryPolicyConstant
(*RetryPolicyExponential)(nil), // 32: grpc.federation.RetryPolicyExponential
(*MethodRequest)(nil), // 33: grpc.federation.MethodRequest
(*MethodResponse)(nil), // 34: grpc.federation.MethodResponse
(*Argument)(nil), // 35: grpc.federation.Argument
(*FieldRule)(nil), // 36: grpc.federation.FieldRule
(*FieldOneof)(nil), // 37: grpc.federation.FieldOneof
(*CELPlugin)(nil), // 38: grpc.federation.CELPlugin
(*CELPluginExport)(nil), // 39: grpc.federation.CELPluginExport
(*CELPluginCapability)(nil), // 40: grpc.federation.CELPluginCapability
(*CELPluginEnvCapability)(nil), // 41: grpc.federation.CELPluginEnvCapability
(*CELPluginFileSystemCapability)(nil), // 42: grpc.federation.CELPluginFileSystemCapability
(*CELPluginNetworkCapability)(nil), // 43: grpc.federation.CELPluginNetworkCapability
(*CELFunction)(nil), // 44: grpc.federation.CELFunction
(*CELReceiverType)(nil), // 45: grpc.federation.CELReceiverType
(*CELFunctionArgument)(nil), // 46: grpc.federation.CELFunctionArgument
(*CELType)(nil), // 47: grpc.federation.CELType
(*CELMapType)(nil), // 48: grpc.federation.CELMapType
(*CELVariable)(nil), // 49: grpc.federation.CELVariable
(code.Code)(0), // 50: google.rpc.Code
(*errdetails.ErrorInfo)(nil), // 51: google.rpc.ErrorInfo
(*errdetails.RetryInfo)(nil), // 52: google.rpc.RetryInfo
(*errdetails.DebugInfo)(nil), // 53: google.rpc.DebugInfo
(*errdetails.QuotaFailure)(nil), // 54: google.rpc.QuotaFailure
(*errdetails.PreconditionFailure)(nil), // 55: google.rpc.PreconditionFailure
(*errdetails.BadRequest)(nil), // 56: google.rpc.BadRequest
(*errdetails.RequestInfo)(nil), // 57: google.rpc.RequestInfo
(*errdetails.ResourceInfo)(nil), // 58: google.rpc.ResourceInfo
(*errdetails.Help)(nil), // 59: google.rpc.Help
(*errdetails.LocalizedMessage)(nil), // 60: google.rpc.LocalizedMessage
(*descriptorpb.FileOptions)(nil), // 61: google.protobuf.FileOptions
(*descriptorpb.ServiceOptions)(nil), // 62: google.protobuf.ServiceOptions
(*descriptorpb.MethodOptions)(nil), // 63: google.protobuf.MethodOptions
(*descriptorpb.MessageOptions)(nil), // 64: google.protobuf.MessageOptions
(*descriptorpb.FieldOptions)(nil), // 65: google.protobuf.FieldOptions
(*descriptorpb.EnumOptions)(nil), // 66: google.protobuf.EnumOptions
(*descriptorpb.EnumValueOptions)(nil), // 67: google.protobuf.EnumValueOptions
(*descriptorpb.OneofOptions)(nil), // 68: google.protobuf.OneofOptions
}
var file_grpc_federation_federation_proto_depIdxs = []int32{
38, // 0: grpc.federation.FileRule.plugin:type_name -> grpc.federation.CELPlugin
5, // 1: grpc.federation.EnumValueRule.attr:type_name -> grpc.federation.EnumValueAttribute
8, // 2: grpc.federation.ServiceRule.env:type_name -> grpc.federation.Env
9, // 3: grpc.federation.ServiceRule.var:type_name -> grpc.federation.ServiceVariable
11, // 4: grpc.federation.Env.var:type_name -> grpc.federation.EnvVar
18, // 5: grpc.federation.ServiceVariable.map:type_name -> grpc.federation.MapExpr
20, // 6: grpc.federation.ServiceVariable.message:type_name -> grpc.federation.MessageExpr
10, // 7: grpc.federation.ServiceVariable.validation:type_name -> grpc.federation.ServiceVariableValidationExpr
21, // 8: grpc.federation.ServiceVariable.enum:type_name -> grpc.federation.EnumExpr
23, // 9: grpc.federation.ServiceVariable.switch:type_name -> grpc.federation.SwitchExpr
12, // 10: grpc.federation.EnvVar.type:type_name -> grpc.federation.EnvType
14, // 11: grpc.federation.EnvVar.option:type_name -> grpc.federation.EnvVarOption
0, // 12: grpc.federation.EnvType.kind:type_name -> grpc.federation.TypeKind
12, // 13: grpc.federation.EnvType.repeated:type_name -> grpc.federation.EnvType
13, // 14: grpc.federation.EnvType.map:type_name -> grpc.federation.EnvMapType
12, // 15: grpc.federation.EnvMapType.key:type_name -> grpc.federation.EnvType
12, // 16: grpc.federation.EnvMapType.value:type_name -> grpc.federation.EnvType
17, // 17: grpc.federation.MessageRule.def:type_name -> grpc.federation.VariableDefinition
18, // 18: grpc.federation.VariableDefinition.map:type_name -> grpc.federation.MapExpr
20, // 19: grpc.federation.VariableDefinition.message:type_name -> grpc.federation.MessageExpr
22, // 20: grpc.federation.VariableDefinition.call:type_name -> grpc.federation.CallExpr
29, // 21: grpc.federation.VariableDefinition.validation:type_name -> grpc.federation.ValidationExpr
21, // 22: grpc.federation.VariableDefinition.enum:type_name -> grpc.federation.EnumExpr
23, // 23: grpc.federation.VariableDefinition.switch:type_name -> grpc.federation.SwitchExpr
19, // 24: grpc.federation.MapExpr.iterator:type_name -> grpc.federation.Iterator
20, // 25: grpc.federation.MapExpr.message:type_name -> grpc.federation.MessageExpr
21, // 26: grpc.federation.MapExpr.enum:type_name -> grpc.federation.EnumExpr
35, // 27: grpc.federation.MessageExpr.args:type_name -> grpc.federation.Argument
33, // 28: grpc.federation.CallExpr.request:type_name -> grpc.federation.MethodRequest
30, // 29: grpc.federation.CallExpr.retry:type_name -> grpc.federation.RetryPolicy
26, // 30: grpc.federation.CallExpr.error:type_name -> grpc.federation.GRPCError
28, // 31: grpc.federation.CallExpr.option:type_name -> grpc.federation.GRPCCallOption
24, // 32: grpc.federation.SwitchExpr.case:type_name -> grpc.federation.SwitchCaseExpr
25, // 33: grpc.federation.SwitchExpr.default:type_name -> grpc.federation.SwitchDefaultExpr
17, // 34: grpc.federation.SwitchCaseExpr.def:type_name -> grpc.federation.VariableDefinition
17, // 35: grpc.federation.SwitchDefaultExpr.def:type_name -> grpc.federation.VariableDefinition
17, // 36: grpc.federation.GRPCError.def:type_name -> grpc.federation.VariableDefinition
50, // 37: grpc.federation.GRPCError.code:type_name -> google.rpc.Code
27, // 38: grpc.federation.GRPCError.details:type_name -> grpc.federation.GRPCErrorDetail
1, // 39: grpc.federation.GRPCError.log_level:type_name -> grpc.federation.GRPCError.LogLevel
17, // 40: grpc.federation.GRPCErrorDetail.def:type_name -> grpc.federation.VariableDefinition
20, // 41: grpc.federation.GRPCErrorDetail.message:type_name -> grpc.federation.MessageExpr
51, // 42: grpc.federation.GRPCErrorDetail.error_info:type_name -> google.rpc.ErrorInfo
52, // 43: grpc.federation.GRPCErrorDetail.retry_info:type_name -> google.rpc.RetryInfo
53, // 44: grpc.federation.GRPCErrorDetail.debug_info:type_name -> google.rpc.DebugInfo
54, // 45: grpc.federation.GRPCErrorDetail.quota_failure:type_name -> google.rpc.QuotaFailure
55, // 46: grpc.federation.GRPCErrorDetail.precondition_failure:type_name -> google.rpc.PreconditionFailure
56, // 47: grpc.federation.GRPCErrorDetail.bad_request:type_name -> google.rpc.BadRequest
57, // 48: grpc.federation.GRPCErrorDetail.request_info:type_name -> google.rpc.RequestInfo
58, // 49: grpc.federation.GRPCErrorDetail.resource_info:type_name -> google.rpc.ResourceInfo
59, // 50: grpc.federation.GRPCErrorDetail.help:type_name -> google.rpc.Help
60, // 51: grpc.federation.GRPCErrorDetail.localized_message:type_name -> google.rpc.LocalizedMessage
26, // 52: grpc.federation.ValidationExpr.error:type_name -> grpc.federation.GRPCError
31, // 53: grpc.federation.RetryPolicy.constant:type_name -> grpc.federation.RetryPolicyConstant
32, // 54: grpc.federation.RetryPolicy.exponential:type_name -> grpc.federation.RetryPolicyExponential
37, // 55: grpc.federation.FieldRule.oneof:type_name -> grpc.federation.FieldOneof
14, // 56: grpc.federation.FieldRule.env:type_name -> grpc.federation.EnvVarOption
17, // 57: grpc.federation.FieldOneof.def:type_name -> grpc.federation.VariableDefinition
39, // 58: grpc.federation.CELPlugin.export:type_name -> grpc.federation.CELPluginExport
45, // 59: grpc.federation.CELPluginExport.types:type_name -> grpc.federation.CELReceiverType
44, // 60: grpc.federation.CELPluginExport.functions:type_name -> grpc.federation.CELFunction
49, // 61: grpc.federation.CELPluginExport.variables:type_name -> grpc.federation.CELVariable
40, // 62: grpc.federation.CELPluginExport.capability:type_name -> grpc.federation.CELPluginCapability
41, // 63: grpc.federation.CELPluginCapability.env:type_name -> grpc.federation.CELPluginEnvCapability
42, // 64: grpc.federation.CELPluginCapability.file_system:type_name -> grpc.federation.CELPluginFileSystemCapability
43, // 65: grpc.federation.CELPluginCapability.network:type_name -> grpc.federation.CELPluginNetworkCapability
46, // 66: grpc.federation.CELFunction.args:type_name -> grpc.federation.CELFunctionArgument
47, // 67: grpc.federation.CELFunction.return:type_name -> grpc.federation.CELType
44, // 68: grpc.federation.CELReceiverType.methods:type_name -> grpc.federation.CELFunction
47, // 69: grpc.federation.CELFunctionArgument.type:type_name -> grpc.federation.CELType
0, // 70: grpc.federation.CELType.kind:type_name -> grpc.federation.TypeKind
47, // 71: grpc.federation.CELType.repeated:type_name -> grpc.federation.CELType
48, // 72: grpc.federation.CELType.map:type_name -> grpc.federation.CELMapType
47, // 73: grpc.federation.CELMapType.key:type_name -> grpc.federation.CELType
47, // 74: grpc.federation.CELMapType.value:type_name -> grpc.federation.CELType
47, // 75: grpc.federation.CELVariable.type:type_name -> grpc.federation.CELType
61, // 76: grpc.federation.file:extendee -> google.protobuf.FileOptions
62, // 77: grpc.federation.service:extendee -> google.protobuf.ServiceOptions
63, // 78: grpc.federation.method:extendee -> google.protobuf.MethodOptions
64, // 79: grpc.federation.message:extendee -> google.protobuf.MessageOptions
65, // 80: grpc.federation.field:extendee -> google.protobuf.FieldOptions
66, // 81: grpc.federation.enum:extendee -> google.protobuf.EnumOptions
67, // 82: grpc.federation.enum_value:extendee -> google.protobuf.EnumValueOptions
68, // 83: grpc.federation.oneof:extendee -> google.protobuf.OneofOptions
2, // 84: grpc.federation.file:type_name -> grpc.federation.FileRule
7, // 85: grpc.federation.service:type_name -> grpc.federation.ServiceRule
15, // 86: grpc.federation.method:type_name -> grpc.federation.MethodRule
16, // 87: grpc.federation.message:type_name -> grpc.federation.MessageRule
36, // 88: grpc.federation.field:type_name -> grpc.federation.FieldRule
3, // 89: grpc.federation.enum:type_name -> grpc.federation.EnumRule
4, // 90: grpc.federation.enum_value:type_name -> grpc.federation.EnumValueRule
6, // 91: grpc.federation.oneof:type_name -> grpc.federation.OneofRule
92, // [92:92] is the sub-list for method output_type
92, // [92:92] is the sub-list for method input_type
84, // [84:92] is the sub-list for extension type_name
76, // [76:84] is the sub-list for extension extendee
0, // [0:76] is the sub-list for field type_name
}
func init() { file_grpc_federation_federation_proto_init() }
func file_grpc_federation_federation_proto_init() {
if File_grpc_federation_federation_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_grpc_federation_federation_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*FileRule); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*EnumRule); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*EnumValueRule); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*EnumValueAttribute); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*OneofRule); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ServiceRule); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Env); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ServiceVariable); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ServiceVariableValidationExpr); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*EnvVar); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*EnvType); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*EnvMapType); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*EnvVarOption); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*MethodRule); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*MessageRule); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*VariableDefinition); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*MapExpr); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Iterator); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*MessageExpr); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*EnumExpr); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CallExpr); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*SwitchExpr); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*SwitchCaseExpr); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*SwitchDefaultExpr); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GRPCError); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GRPCErrorDetail); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GRPCCallOption); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ValidationExpr); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[28].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*RetryPolicy); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[29].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*RetryPolicyConstant); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[30].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*RetryPolicyExponential); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[31].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*MethodRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[32].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*MethodResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[33].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Argument); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[34].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*FieldRule); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[35].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*FieldOneof); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[36].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CELPlugin); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[37].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CELPluginExport); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[38].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CELPluginCapability); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[39].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CELPluginEnvCapability); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[40].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CELPluginFileSystemCapability); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[41].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CELPluginNetworkCapability); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[42].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CELFunction); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[43].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CELReceiverType); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[44].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CELFunctionArgument); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[45].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CELType); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[46].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CELMapType); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[47].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CELVariable); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
file_grpc_federation_federation_proto_msgTypes[2].OneofWrappers = []interface{}{}
file_grpc_federation_federation_proto_msgTypes[7].OneofWrappers = []interface{}{
(*ServiceVariable_By)(nil),
(*ServiceVariable_Map)(nil),
(*ServiceVariable_Message)(nil),
(*ServiceVariable_Validation)(nil),
(*ServiceVariable_Enum)(nil),
(*ServiceVariable_Switch)(nil),
}
file_grpc_federation_federation_proto_msgTypes[9].OneofWrappers = []interface{}{}
file_grpc_federation_federation_proto_msgTypes[10].OneofWrappers = []interface{}{
(*EnvType_Kind)(nil),
(*EnvType_Repeated)(nil),
(*EnvType_Map)(nil),
}
file_grpc_federation_federation_proto_msgTypes[12].OneofWrappers = []interface{}{}
file_grpc_federation_federation_proto_msgTypes[13].OneofWrappers = []interface{}{}
file_grpc_federation_federation_proto_msgTypes[14].OneofWrappers = []interface{}{}
file_grpc_federation_federation_proto_msgTypes[15].OneofWrappers = []interface{}{
(*VariableDefinition_By)(nil),
(*VariableDefinition_Map)(nil),
(*VariableDefinition_Message)(nil),
(*VariableDefinition_Call)(nil),
(*VariableDefinition_Validation)(nil),
(*VariableDefinition_Enum)(nil),
(*VariableDefinition_Switch)(nil),
}
file_grpc_federation_federation_proto_msgTypes[16].OneofWrappers = []interface{}{
(*MapExpr_By)(nil),
(*MapExpr_Message)(nil),
(*MapExpr_Enum)(nil),
}
file_grpc_federation_federation_proto_msgTypes[20].OneofWrappers = []interface{}{}
file_grpc_federation_federation_proto_msgTypes[22].OneofWrappers = []interface{}{
(*SwitchCaseExpr_By)(nil),
}
file_grpc_federation_federation_proto_msgTypes[23].OneofWrappers = []interface{}{
(*SwitchDefaultExpr_By)(nil),
}
file_grpc_federation_federation_proto_msgTypes[24].OneofWrappers = []interface{}{}
file_grpc_federation_federation_proto_msgTypes[26].OneofWrappers = []interface{}{}
file_grpc_federation_federation_proto_msgTypes[27].OneofWrappers = []interface{}{}
file_grpc_federation_federation_proto_msgTypes[28].OneofWrappers = []interface{}{
(*RetryPolicy_Constant)(nil),
(*RetryPolicy_Exponential)(nil),
}
file_grpc_federation_federation_proto_msgTypes[29].OneofWrappers = []interface{}{}
file_grpc_federation_federation_proto_msgTypes[30].OneofWrappers = []interface{}{}
file_grpc_federation_federation_proto_msgTypes[31].OneofWrappers = []interface{}{}
file_grpc_federation_federation_proto_msgTypes[32].OneofWrappers = []interface{}{}
file_grpc_federation_federation_proto_msgTypes[33].OneofWrappers = []interface{}{}
file_grpc_federation_federation_proto_msgTypes[34].OneofWrappers = []interface{}{}
file_grpc_federation_federation_proto_msgTypes[35].OneofWrappers = []interface{}{
(*FieldOneof_If)(nil),
(*FieldOneof_Default)(nil),
}
file_grpc_federation_federation_proto_msgTypes[38].OneofWrappers = []interface{}{}
file_grpc_federation_federation_proto_msgTypes[45].OneofWrappers = []interface{}{
(*CELType_Kind)(nil),
(*CELType_Repeated)(nil),
(*CELType_Map)(nil),
(*CELType_Message)(nil),
(*CELType_Enum)(nil),
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_grpc_federation_federation_proto_rawDesc,
NumEnums: 2,
NumMessages: 48,
NumExtensions: 8,
NumServices: 0,
},
GoTypes: file_grpc_federation_federation_proto_goTypes,
DependencyIndexes: file_grpc_federation_federation_proto_depIdxs,
EnumInfos: file_grpc_federation_federation_proto_enumTypes,
MessageInfos: file_grpc_federation_federation_proto_msgTypes,
ExtensionInfos: file_grpc_federation_federation_proto_extTypes,
}.Build()
File_grpc_federation_federation_proto = out.File
file_grpc_federation_federation_proto_rawDesc = nil
file_grpc_federation_federation_proto_goTypes = nil
file_grpc_federation_federation_proto_depIdxs = nil
}
================================================
FILE: _examples/09_multi_user/main_test.go
================================================
package main_test
import (
"context"
"log/slog"
"net"
"os"
"testing"
"github.com/google/go-cmp/cmp"
"github.com/google/go-cmp/cmp/cmpopts"
"go.opentelemetry.io/otel"
"go.opentelemetry.io/otel/attribute"
"go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc"
"go.opentelemetry.io/otel/propagation"
"go.opentelemetry.io/otel/sdk/resource"
sdktrace "go.opentelemetry.io/otel/sdk/trace"
semconv "go.opentelemetry.io/otel/semconv/v1.4.0"
"go.uber.org/goleak"
"google.golang.org/grpc"
"google.golang.org/grpc/test/bufconn"
"example/federation"
"example/user"
)
const bufSize = 1024
var (
listener *bufconn.Listener
userClient user.UserServiceClient
)
type clientConfig struct{}
func (c *clientConfig) User_UserServiceClient(cfg federation.FederationServiceClientConfig) (user.UserServiceClient, error) {
return userClient, nil
}
type UserServer struct {
*user.UnimplementedUserServiceServer
}
var nameMap = map[string]string{
"xxx": "foo",
}
func (s *UserServer) GetUser(ctx context.Context, req *user.GetUserRequest) (*user.GetUserResponse, error) {
return &user.GetUserResponse{
User: &user.User{
Id: req.Id,
Name: nameMap[req.Id],
},
}, nil
}
type resolver struct{}
func (r *resolver) Resolve_Org_Federation_Sub(_ context.Context, _ *federation.FederationService_Org_Federation_SubArgument) (*federation.Sub, error) {
return &federation.Sub{}, nil
}
func (r *resolver) Resolve_Org_Federation_User_Name(_ context.Context, arg *federation.FederationService_Org_Federation_User_NameArgument) (string, error) {
return arg.User.Name, nil
}
func dialer(ctx context.Context, address string) (net.Conn, error) {
return listener.Dial()
}
func TestFederation(t *testing.T) {
defer goleak.VerifyNone(t)
ctx := context.Background()
listener = bufconn.Listen(bufSize)
if os.Getenv("ENABLE_JAEGER") != "" {
exporter, err := otlptracegrpc.New(ctx, otlptracegrpc.WithInsecure())
if err != nil {
t.Fatal(err)
}
tp := sdktrace.NewTracerProvider(
sdktrace.WithBatcher(exporter),
sdktrace.WithResource(
resource.NewWithAttributes(
semconv.SchemaURL,
semconv.ServiceNameKey.String("example09/multi_user"),
semconv.ServiceVersionKey.String("1.0.0"),
attribute.String("environment", "dev"),
),
),
sdktrace.WithSampler(sdktrace.AlwaysSample()),
)
defer tp.Shutdown(ctx)
otel.SetTextMapPropagator(propagation.TraceContext{})
otel.SetTracerProvider(tp)
}
conn, err := grpc.DialContext(ctx, "", grpc.WithContextDialer(dialer), grpc.WithInsecure())
if err != nil {
t.Fatal(err)
}
defer conn.Close()
userClient = user.NewUserServiceClient(conn)
grpcServer := grpc.NewServer()
defer grpcServer.Stop()
logger := slog.New(slog.NewJSONHandler(os.Stdout, &slog.HandlerOptions{
Level: slog.LevelDebug,
}))
federationServer, err := federation.NewFederationService(federation.FederationServiceConfig{
Client: new(clientConfig),
Logger: logger,
Resolver: new(resolver),
})
if err != nil {
t.Fatal(err)
}
defer federation.CleanupFederationService(ctx, federationServer)
user.RegisterUserServiceServer(grpcServer, &UserServer{})
federation.RegisterFederationServiceServer(grpcServer, federationServer)
go func() {
if err := grpcServer.Serve(listener); err != nil {
t.Fatal(err)
}
}()
client := federation.NewFederationServiceClient(conn)
res, err := client.Get(ctx, &federation.GetRequest{})
if err != nil {
t.Fatal(err)
}
if diff := cmp.Diff(res, &federation.GetResponse{
User: &federation.User{
Id: "xxx",
Name: "foo",
},
User2: &federation.User{
Id: "xxx",
Name: "foo",
},
}, cmpopts.IgnoreUnexported(
federation.GetResponse{},
federation.User{},
)); diff != "" {
t.Errorf("(-got, +want)\n%s", diff)
}
}
================================================
FILE: _examples/09_multi_user/proto/buf.yaml
================================================
version: v1
breaking:
use:
- FILE
lint:
use:
- DEFAULT
================================================
FILE: _examples/09_multi_user/proto/federation/federation.proto
================================================
syntax = "proto3";
package org.federation;
import "grpc/federation/federation.proto";
option go_package = "example/federation;federation";
option (grpc.federation.file)= {
import: ["user/user.proto"]
};
service FederationService {
option (grpc.federation.service) = {};
rpc Get(GetRequest) returns (GetResponse) {};
}
message GetRequest {}
message GetResponse {
option (grpc.federation.message) = {
def { name: "uid", message { name: "UserID" } }
def { name: "user", message { name: "User", args { name: "user_id", by: "uid.value" } } }
def { name: "user2", message { name: "User", args { name: "user_id", by: "uid.value" } } }
};
User user = 1 [(grpc.federation.field).by = "user"];
User user2 = 2 [(grpc.federation.field).by = "user2"];
}
message User {
option (grpc.federation.message) = {
def {
name: "res"
call {
method: "user.UserService/GetUser"
request { field: "id", by: "$.user_id" }
}
}
def { name: "user", by: "res.user", autobind: true }
def { message { name: "Sub" } }
};
string id = 1;
string name = 3 [(grpc.federation.field).custom_resolver = true];
}
message UserID {
option (grpc.federation.message) = {
def { message { name: "Sub" } }
};
string value = 1 [(grpc.federation.field).by = "'xxx'"];
}
message Sub {
option (grpc.federation.message).custom_resolver = true;
}
================================================
FILE: _examples/09_multi_user/proto/user/user.proto
================================================
syntax = "proto3";
package user;
option go_package = "example/user;user";
service UserService {
rpc GetUser(GetUserRequest) returns (GetUserResponse) {};
}
message GetUserRequest {
string id = 1;
}
message GetUserResponse {
User user = 1;
}
message User {
string id = 1;
string name = 2;
}
================================================
FILE: _examples/09_multi_user/user/user.pb.go
================================================
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.33.0
// protoc (unknown)
// source: user/user.proto
package user
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
type GetUserRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
}
func (x *GetUserRequest) Reset() {
*x = GetUserRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_user_user_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GetUserRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetUserRequest) ProtoMessage() {}
func (x *GetUserRequest) ProtoReflect() protoreflect.Message {
mi := &file_user_user_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GetUserRequest.ProtoReflect.Descriptor instead.
func (*GetUserRequest) Descriptor() ([]byte, []int) {
return file_user_user_proto_rawDescGZIP(), []int{0}
}
func (x *GetUserRequest) GetId() string {
if x != nil {
return x.Id
}
return ""
}
type GetUserResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
User *User `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"`
}
func (x *GetUserResponse) Reset() {
*x = GetUserResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_user_user_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GetUserResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetUserResponse) ProtoMessage() {}
func (x *GetUserResponse) ProtoReflect() protoreflect.Message {
mi := &file_user_user_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GetUserResponse.ProtoReflect.Descriptor instead.
func (*GetUserResponse) Descriptor() ([]byte, []int) {
return file_user_user_proto_rawDescGZIP(), []int{1}
}
func (x *GetUserResponse) GetUser() *User {
if x != nil {
return x.User
}
return nil
}
type User struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
}
func (x *User) Reset() {
*x = User{}
if protoimpl.UnsafeEnabled {
mi := &file_user_user_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *User) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*User) ProtoMessage() {}
func (x *User) ProtoReflect() protoreflect.Message {
mi := &file_user_user_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use User.ProtoReflect.Descriptor instead.
func (*User) Descriptor() ([]byte, []int) {
return file_user_user_proto_rawDescGZIP(), []int{2}
}
func (x *User) GetId() string {
if x != nil {
return x.Id
}
return ""
}
func (x *User) GetName() string {
if x != nil {
return x.Name
}
return ""
}
var File_user_user_proto protoreflect.FileDescriptor
var file_user_user_proto_rawDesc = []byte{
0x0a, 0x0f, 0x75, 0x73, 0x65, 0x72, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x12, 0x04, 0x75, 0x73, 0x65, 0x72, 0x22, 0x20, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x55, 0x73,
0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18,
0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x31, 0x0a, 0x0f, 0x47, 0x65, 0x74,
0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1e, 0x0a, 0x04,
0x75, 0x73, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x75, 0x73, 0x65,
0x72, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x04, 0x75, 0x73, 0x65, 0x72, 0x22, 0x2a, 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, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01,
0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x32, 0x47, 0x0a, 0x0b, 0x55, 0x73, 0x65, 0x72,
0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x38, 0x0a, 0x07, 0x47, 0x65, 0x74, 0x55, 0x73,
0x65, 0x72, 0x12, 0x14, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65,
0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e,
0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22,
0x00, 0x42, 0x58, 0x0a, 0x08, 0x63, 0x6f, 0x6d, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x42, 0x09, 0x55,
0x73, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x11, 0x65, 0x78, 0x61, 0x6d,
0x70, 0x6c, 0x65, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x3b, 0x75, 0x73, 0x65, 0x72, 0xa2, 0x02, 0x03,
0x55, 0x58, 0x58, 0xaa, 0x02, 0x04, 0x55, 0x73, 0x65, 0x72, 0xca, 0x02, 0x04, 0x55, 0x73, 0x65,
0x72, 0xe2, 0x02, 0x10, 0x55, 0x73, 0x65, 0x72, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61,
0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x04, 0x55, 0x73, 0x65, 0x72, 0x62, 0x06, 0x70, 0x72, 0x6f,
0x74, 0x6f, 0x33,
}
var (
file_user_user_proto_rawDescOnce sync.Once
file_user_user_proto_rawDescData = file_user_user_proto_rawDesc
)
func file_user_user_proto_rawDescGZIP() []byte {
file_user_user_proto_rawDescOnce.Do(func() {
file_user_user_proto_rawDescData = protoimpl.X.CompressGZIP(file_user_user_proto_rawDescData)
})
return file_user_user_proto_rawDescData
}
var file_user_user_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
var file_user_user_proto_goTypes = []interface{}{
(*GetUserRequest)(nil), // 0: user.GetUserRequest
(*GetUserResponse)(nil), // 1: user.GetUserResponse
(*User)(nil), // 2: user.User
}
var file_user_user_proto_depIdxs = []int32{
2, // 0: user.GetUserResponse.user:type_name -> user.User
0, // 1: user.UserService.GetUser:input_type -> user.GetUserRequest
1, // 2: user.UserService.GetUser:output_type -> user.GetUserResponse
2, // [2:3] is the sub-list for method output_type
1, // [1:2] is the sub-list for method input_type
1, // [1:1] is the sub-list for extension type_name
1, // [1:1] is the sub-list for extension extendee
0, // [0:1] is the sub-list for field type_name
}
func init() { file_user_user_proto_init() }
func file_user_user_proto_init() {
if File_user_user_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_user_user_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetUserRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_user_user_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetUserResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_user_user_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*User); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_user_user_proto_rawDesc,
NumEnums: 0,
NumMessages: 3,
NumExtensions: 0,
NumServices: 1,
},
GoTypes: file_user_user_proto_goTypes,
DependencyIndexes: file_user_user_proto_depIdxs,
MessageInfos: file_user_user_proto_msgTypes,
}.Build()
File_user_user_proto = out.File
file_user_user_proto_rawDesc = nil
file_user_user_proto_goTypes = nil
file_user_user_proto_depIdxs = nil
}
================================================
FILE: _examples/09_multi_user/user/user_grpc.pb.go
================================================
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.3.0
// - protoc (unknown)
// source: user/user.proto
package user
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 (
UserService_GetUser_FullMethodName = "/user.UserService/GetUser"
)
// UserServiceClient is the client API for UserService 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 UserServiceClient interface {
GetUser(ctx context.Context, in *GetUserRequest, opts ...grpc.CallOption) (*GetUserResponse, error)
}
type userServiceClient struct {
cc grpc.ClientConnInterface
}
func NewUserServiceClient(cc grpc.ClientConnInterface) UserServiceClient {
return &userServiceClient{cc}
}
func (c *userServiceClient) GetUser(ctx context.Context, in *GetUserRequest, opts ...grpc.CallOption) (*GetUserResponse, error) {
out := new(GetUserResponse)
err := c.cc.Invoke(ctx, UserService_GetUser_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// UserServiceServer is the server API for UserService service.
// All implementations must embed UnimplementedUserServiceServer
// for forward compatibility
type UserServiceServer interface {
GetUser(context.Context, *GetUserRequest) (*GetUserResponse, error)
mustEmbedUnimplementedUserServiceServer()
}
// UnimplementedUserServiceServer must be embedded to have forward compatible implementations.
type UnimplementedUserServiceServer struct {
}
func (UnimplementedUserServiceServer) GetUser(context.Context, *GetUserRequest) (*GetUserResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetUser not implemented")
}
func (UnimplementedUserServiceServer) mustEmbedUnimplementedUserServiceServer() {}
// UnsafeUserServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to UserServiceServer will
// result in compilation errors.
type UnsafeUserServiceServer interface {
mustEmbedUnimplementedUserServiceServer()
}
func RegisterUserServiceServer(s grpc.ServiceRegistrar, srv UserServiceServer) {
s.RegisterService(&UserService_ServiceDesc, srv)
}
func _UserService_GetUser_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetUserRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(UserServiceServer).GetUser(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: UserService_GetUser_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(UserServiceServer).GetUser(ctx, req.(*GetUserRequest))
}
return interceptor(ctx, in, info, handler)
}
// UserService_ServiceDesc is the grpc.ServiceDesc for UserService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var UserService_ServiceDesc = grpc.ServiceDesc{
ServiceName: "user.UserService",
HandlerType: (*UserServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "GetUser",
Handler: _UserService_GetUser_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "user/user.proto",
}
================================================
FILE: _examples/10_oneof/.gitignore
================================================
grpc/federation
================================================
FILE: _examples/10_oneof/Makefile
================================================
MAKEFILE_DIR := $(dir $(lastword $(MAKEFILE_LIST)))
GOBIN := $(MAKEFILE_DIR)/../../bin
PATH := $(GOBIN):$(PATH)
JAEGER_IMAGE := jaegertracing/all-in-one:latest
.PHONY: generate
generate:
$(GOBIN)/buf generate
.PHONY: lint
lint:
@$(GOBIN)/grpc-federation-linter -Iproto -Iproto_deps ./proto/federation/federation.proto
.PHONY: test
test:
go test -race ./ -count=1
.PHONY: grpc-federation/generate
grpc-federation/generate:
@$(GOBIN)/grpc-federation-generator ./proto/federation/federation.proto
.PHONY: grpc-federation/watch
grpc-federation/watch:
@$(GOBIN)/grpc-federation-generator -w
.PHONY: jaeger/start
jaeger/start:
@docker run \
-e COLLECTOR_OTLP_ENABLED=true \
-p 16686:16686 \
-p 4317:4317 \
-p 4318:4318 \
-d \
$(JAEGER_IMAGE)
.PHONY: jaeger/stop
jaeger/stop:
@docker stop $(shell docker ps -q --filter ancestor=$(JAEGER_IMAGE))
================================================
FILE: _examples/10_oneof/buf.gen.yaml
================================================
version: v1
managed:
enabled: true
plugins:
- plugin: go
out: .
opt: paths=source_relative
- plugin: go-grpc
out: .
opt: paths=source_relative
- plugin: grpc-federation
out: .
opt:
- paths=source_relative
- import_paths=proto
================================================
FILE: _examples/10_oneof/buf.work.yaml
================================================
version: v1
directories:
- proto
- proto_deps
================================================
FILE: _examples/10_oneof/federation/federation.pb.go
================================================
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.33.0
// protoc (unknown)
// source: federation/federation.proto
package federation
import (
_ "github.com/mercari/grpc-federation/grpc/federation"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
type UserType int32
const (
UserType_USER_TYPE_UNSPECIFIED UserType = 0
UserType_USER_TYPE_ANONYMOUS UserType = 1
)
// Enum value maps for UserType.
var (
UserType_name = map[int32]string{
0: "USER_TYPE_UNSPECIFIED",
1: "USER_TYPE_ANONYMOUS",
}
UserType_value = map[string]int32{
"USER_TYPE_UNSPECIFIED": 0,
"USER_TYPE_ANONYMOUS": 1,
}
)
func (x UserType) Enum() *UserType {
p := new(UserType)
*p = x
return p
}
func (x UserType) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (UserType) Descriptor() protoreflect.EnumDescriptor {
return file_federation_federation_proto_enumTypes[0].Descriptor()
}
func (UserType) Type() protoreflect.EnumType {
return &file_federation_federation_proto_enumTypes[0]
}
func (x UserType) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use UserType.Descriptor instead.
func (UserType) EnumDescriptor() ([]byte, []int) {
return file_federation_federation_proto_rawDescGZIP(), []int{0}
}
type GetRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
}
func (x *GetRequest) Reset() {
*x = GetRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_federation_federation_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GetRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetRequest) ProtoMessage() {}
func (x *GetRequest) ProtoReflect() protoreflect.Message {
mi := &file_federation_federation_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GetRequest.ProtoReflect.Descriptor instead.
func (*GetRequest) Descriptor() ([]byte, []int) {
return file_federation_federation_proto_rawDescGZIP(), []int{0}
}
type GetResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
User *User `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"`
Msg string `protobuf:"bytes,2,opt,name=msg,proto3" json:"msg,omitempty"`
NestedMsg *NestedMessageSelection_Nest `protobuf:"bytes,3,opt,name=nested_msg,json=nestedMsg,proto3" json:"nested_msg,omitempty"`
CastOneof *CastOneof `protobuf:"bytes,4,opt,name=cast_oneof,json=castOneof,proto3" json:"cast_oneof,omitempty"`
}
func (x *GetResponse) Reset() {
*x = GetResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_federation_federation_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GetResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetResponse) ProtoMessage() {}
func (x *GetResponse) ProtoReflect() protoreflect.Message {
mi := &file_federation_federation_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GetResponse.ProtoReflect.Descriptor instead.
func (*GetResponse) Descriptor() ([]byte, []int) {
return file_federation_federation_proto_rawDescGZIP(), []int{1}
}
func (x *GetResponse) GetUser() *User {
if x != nil {
return x.User
}
return nil
}
func (x *GetResponse) GetMsg() string {
if x != nil {
return x.Msg
}
return ""
}
func (x *GetResponse) GetNestedMsg() *NestedMessageSelection_Nest {
if x != nil {
return x.NestedMsg
}
return nil
}
func (x *GetResponse) GetCastOneof() *CastOneof {
if x != nil {
return x.CastOneof
}
return nil
}
type GetNoValueRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
}
func (x *GetNoValueRequest) Reset() {
*x = GetNoValueRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_federation_federation_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GetNoValueRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetNoValueRequest) ProtoMessage() {}
func (x *GetNoValueRequest) ProtoReflect() protoreflect.Message {
mi := &file_federation_federation_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GetNoValueRequest.ProtoReflect.Descriptor instead.
func (*GetNoValueRequest) Descriptor() ([]byte, []int) {
return file_federation_federation_proto_rawDescGZIP(), []int{2}
}
type GetNoValueResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
NoValue *M `protobuf:"bytes,1,opt,name=no_value,json=noValue,proto3" json:"no_value,omitempty"`
}
func (x *GetNoValueResponse) Reset() {
*x = GetNoValueResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_federation_federation_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GetNoValueResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetNoValueResponse) ProtoMessage() {}
func (x *GetNoValueResponse) ProtoReflect() protoreflect.Message {
mi := &file_federation_federation_proto_msgTypes[3]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GetNoValueResponse.ProtoReflect.Descriptor instead.
func (*GetNoValueResponse) Descriptor() ([]byte, []int) {
return file_federation_federation_proto_rawDescGZIP(), []int{3}
}
func (x *GetNoValueResponse) GetNoValue() *M {
if x != nil {
return x.NoValue
}
return nil
}
type UserSelection struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Types that are assignable to User:
//
// *UserSelection_UserA
// *UserSelection_UserB
// *UserSelection_UserC
User isUserSelection_User `protobuf_oneof:"user"`
}
func (x *UserSelection) Reset() {
*x = UserSelection{}
if protoimpl.UnsafeEnabled {
mi := &file_federation_federation_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *UserSelection) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*UserSelection) ProtoMessage() {}
func (x *UserSelection) ProtoReflect() protoreflect.Message {
mi := &file_federation_federation_proto_msgTypes[4]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use UserSelection.ProtoReflect.Descriptor instead.
func (*UserSelection) Descriptor() ([]byte, []int) {
return file_federation_federation_proto_rawDescGZIP(), []int{4}
}
func (m *UserSelection) GetUser() isUserSelection_User {
if m != nil {
return m.User
}
return nil
}
func (x *UserSelection) GetUserA() *User {
if x, ok := x.GetUser().(*UserSelection_UserA); ok {
return x.UserA
}
return nil
}
func (x *UserSelection) GetUserB() *User {
if x, ok := x.GetUser().(*UserSelection_UserB); ok {
return x.UserB
}
return nil
}
func (x *UserSelection) GetUserC() *User {
if x, ok := x.GetUser().(*UserSelection_UserC); ok {
return x.UserC
}
return nil
}
type isUserSelection_User interface {
isUserSelection_User()
}
type UserSelection_UserA struct {
UserA *User `protobuf:"bytes,1,opt,name=user_a,json=userA,proto3,oneof"`
}
type UserSelection_UserB struct {
UserB *User `protobuf:"bytes,2,opt,name=user_b,json=userB,proto3,oneof"`
}
type UserSelection_UserC struct {
UserC *User `protobuf:"bytes,3,opt,name=user_c,json=userC,proto3,oneof"`
}
func (*UserSelection_UserA) isUserSelection_User() {}
func (*UserSelection_UserB) isUserSelection_User() {}
func (*UserSelection_UserC) isUserSelection_User() {}
type MessageSelection struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Types that are assignable to Message:
//
// *MessageSelection_MsgA
// *MessageSelection_MsgB
// *MessageSelection_MsgC
Message isMessageSelection_Message `protobuf_oneof:"message"`
}
func (x *MessageSelection) Reset() {
*x = MessageSelection{}
if protoimpl.UnsafeEnabled {
mi := &file_federation_federation_proto_msgTypes[5]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *MessageSelection) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*MessageSelection) ProtoMessage() {}
func (x *MessageSelection) ProtoReflect() protoreflect.Message {
mi := &file_federation_federation_proto_msgTypes[5]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use MessageSelection.ProtoReflect.Descriptor instead.
func (*MessageSelection) Descriptor() ([]byte, []int) {
return file_federation_federation_proto_rawDescGZIP(), []int{5}
}
func (m *MessageSelection) GetMessage() isMessageSelection_Message {
if m != nil {
return m.Message
}
return nil
}
func (x *MessageSelection) GetMsgA() string {
if x, ok := x.GetMessage().(*MessageSelection_MsgA); ok {
return x.MsgA
}
return ""
}
func (x *MessageSelection) GetMsgB() string {
if x, ok := x.GetMessage().(*MessageSelection_MsgB); ok {
return x.MsgB
}
return ""
}
func (x *MessageSelection) GetMsgC() string {
if x, ok := x.GetMessage().(*MessageSelection_MsgC); ok {
return x.MsgC
}
return ""
}
type isMessageSelection_Message interface {
isMessageSelection_Message()
}
type MessageSelection_MsgA struct {
MsgA string `protobuf:"bytes,1,opt,name=msg_a,json=msgA,proto3,oneof"`
}
type MessageSelection_MsgB struct {
MsgB string `protobuf:"bytes,2,opt,name=msg_b,json=msgB,proto3,oneof"`
}
type MessageSelection_MsgC struct {
MsgC string `protobuf:"bytes,3,opt,name=msg_c,json=msgC,proto3,oneof"`
}
func (*MessageSelection_MsgA) isMessageSelection_Message() {}
func (*MessageSelection_MsgB) isMessageSelection_Message() {}
func (*MessageSelection_MsgC) isMessageSelection_Message() {}
type NoValueSelection struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Types that are assignable to NoValue:
//
// *NoValueSelection_MA
// *NoValueSelection_MB
NoValue isNoValueSelection_NoValue `protobuf_oneof:"no_value"`
}
func (x *NoValueSelection) Reset() {
*x = NoValueSelection{}
if protoimpl.UnsafeEnabled {
mi := &file_federation_federation_proto_msgTypes[6]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *NoValueSelection) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*NoValueSelection) ProtoMessage() {}
func (x *NoValueSelection) ProtoReflect() protoreflect.Message {
mi := &file_federation_federation_proto_msgTypes[6]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use NoValueSelection.ProtoReflect.Descriptor instead.
func (*NoValueSelection) Descriptor() ([]byte, []int) {
return file_federation_federation_proto_rawDescGZIP(), []int{6}
}
func (m *NoValueSelection) GetNoValue() isNoValueSelection_NoValue {
if m != nil {
return m.NoValue
}
return nil
}
func (x *NoValueSelection) GetMA() *M {
if x, ok := x.GetNoValue().(*NoValueSelection_MA); ok {
return x.MA
}
return nil
}
func (x *NoValueSelection) GetMB() *M {
if x, ok := x.GetNoValue().(*NoValueSelection_MB); ok {
return x.MB
}
return nil
}
type isNoValueSelection_NoValue interface {
isNoValueSelection_NoValue()
}
type NoValueSelection_MA struct {
MA *M `protobuf:"bytes,1,opt,name=m_a,json=mA,proto3,oneof"`
}
type NoValueSelection_MB struct {
MB *M `protobuf:"bytes,2,opt,name=m_b,json=mB,proto3,oneof"`
}
func (*NoValueSelection_MA) isNoValueSelection_NoValue() {}
func (*NoValueSelection_MB) isNoValueSelection_NoValue() {}
type NestedMessageSelection struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
}
func (x *NestedMessageSelection) Reset() {
*x = NestedMessageSelection{}
if protoimpl.UnsafeEnabled {
mi := &file_federation_federation_proto_msgTypes[7]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *NestedMessageSelection) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*NestedMessageSelection) ProtoMessage() {}
func (x *NestedMessageSelection) ProtoReflect() protoreflect.Message {
mi := &file_federation_federation_proto_msgTypes[7]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use NestedMessageSelection.ProtoReflect.Descriptor instead.
func (*NestedMessageSelection) Descriptor() ([]byte, []int) {
return file_federation_federation_proto_rawDescGZIP(), []int{7}
}
type CastOneof struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Types that are assignable to CastOneof:
//
// *CastOneof_Num
// *CastOneof_User
// *CastOneof_Type
CastOneof isCastOneof_CastOneof `protobuf_oneof:"cast_oneof"`
}
func (x *CastOneof) Reset() {
*x = CastOneof{}
if protoimpl.UnsafeEnabled {
mi := &file_federation_federation_proto_msgTypes[8]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *CastOneof) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CastOneof) ProtoMessage() {}
func (x *CastOneof) ProtoReflect() protoreflect.Message {
mi := &file_federation_federation_proto_msgTypes[8]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use CastOneof.ProtoReflect.Descriptor instead.
func (*CastOneof) Descriptor() ([]byte, []int) {
return file_federation_federation_proto_rawDescGZIP(), []int{8}
}
func (m *CastOneof) GetCastOneof() isCastOneof_CastOneof {
if m != nil {
return m.CastOneof
}
return nil
}
func (x *CastOneof) GetNum() int64 {
if x, ok := x.GetCastOneof().(*CastOneof_Num); ok {
return x.Num
}
return 0
}
func (x *CastOneof) GetUser() *User {
if x, ok := x.GetCastOneof().(*CastOneof_User); ok {
return x.User
}
return nil
}
func (x *CastOneof) GetType() UserType {
if x, ok := x.GetCastOneof().(*CastOneof_Type); ok {
return x.Type
}
return UserType_USER_TYPE_UNSPECIFIED
}
type isCastOneof_CastOneof interface {
isCastOneof_CastOneof()
}
type CastOneof_Num struct {
Num int64 `protobuf:"varint,1,opt,name=num,proto3,oneof"`
}
type CastOneof_User struct {
User *User `protobuf:"bytes,2,opt,name=user,proto3,oneof"`
}
type CastOneof_Type struct {
Type UserType `protobuf:"varint,3,opt,name=type,proto3,enum=org.federation.UserType,oneof"`
}
func (*CastOneof_Num) isCastOneof_CastOneof() {}
func (*CastOneof_User) isCastOneof_CastOneof() {}
func (*CastOneof_Type) isCastOneof_CastOneof() {}
type M struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Value string `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"`
}
func (x *M) Reset() {
*x = M{}
if protoimpl.UnsafeEnabled {
mi := &file_federation_federation_proto_msgTypes[9]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *M) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*M) ProtoMessage() {}
func (x *M) ProtoReflect() protoreflect.Message {
mi := &file_federation_federation_proto_msgTypes[9]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use M.ProtoReflect.Descriptor instead.
func (*M) Descriptor() ([]byte, []int) {
return file_federation_federation_proto_rawDescGZIP(), []int{9}
}
func (x *M) GetValue() string {
if x != nil {
return x.Value
}
return ""
}
type User struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
}
func (x *User) Reset() {
*x = User{}
if protoimpl.UnsafeEnabled {
mi := &file_federation_federation_proto_msgTypes[10]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *User) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*User) ProtoMessage() {}
func (x *User) ProtoReflect() protoreflect.Message {
mi := &file_federation_federation_proto_msgTypes[10]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use User.ProtoReflect.Descriptor instead.
func (*User) Descriptor() ([]byte, []int) {
return file_federation_federation_proto_rawDescGZIP(), []int{10}
}
func (x *User) GetId() string {
if x != nil {
return x.Id
}
return ""
}
type NestedMessageSelection_Nest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Types that are assignable to Value:
//
// *NestedMessageSelection_Nest_Int
// *NestedMessageSelection_Nest_Text
Value isNestedMessageSelection_Nest_Value `protobuf_oneof:"value"`
}
func (x *NestedMessageSelection_Nest) Reset() {
*x = NestedMessageSelection_Nest{}
if protoimpl.UnsafeEnabled {
mi := &file_federation_federation_proto_msgTypes[11]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *NestedMessageSelection_Nest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*NestedMessageSelection_Nest) ProtoMessage() {}
func (x *NestedMessageSelection_Nest) ProtoReflect() protoreflect.Message {
mi := &file_federation_federation_proto_msgTypes[11]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use NestedMessageSelection_Nest.ProtoReflect.Descriptor instead.
func (*NestedMessageSelection_Nest) Descriptor() ([]byte, []int) {
return file_federation_federation_proto_rawDescGZIP(), []int{7, 0}
}
func (m *NestedMessageSelection_Nest) GetValue() isNestedMessageSelection_Nest_Value {
if m != nil {
return m.Value
}
return nil
}
func (x *NestedMessageSelection_Nest) GetInt() int64 {
if x, ok := x.GetValue().(*NestedMessageSelection_Nest_Int); ok {
return x.Int
}
return 0
}
func (x *NestedMessageSelection_Nest) GetText() string {
if x, ok := x.GetValue().(*NestedMessageSelection_Nest_Text); ok {
return x.Text
}
return ""
}
type isNestedMessageSelection_Nest_Value interface {
isNestedMessageSelection_Nest_Value()
}
type NestedMessageSelection_Nest_Int struct {
Int int64 `protobuf:"varint,1,opt,name=int,proto3,oneof"`
}
type NestedMessageSelection_Nest_Text struct {
Text string `protobuf:"bytes,2,opt,name=text,proto3,oneof"`
}
func (*NestedMessageSelection_Nest_Int) isNestedMessageSelection_Nest_Value() {}
func (*NestedMessageSelection_Nest_Text) isNestedMessageSelection_Nest_Value() {}
var File_federation_federation_proto protoreflect.FileDescriptor
var file_federation_federation_proto_rawDesc = []byte{
0x0a, 0x1b, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x66, 0x65, 0x64,
0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0e, 0x6f,
0x72, 0x67, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x20, 0x67,
0x72, 0x70, 0x63, 0x2f, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x66,
0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22,
0x0c, 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0xac, 0x03,
0x0a, 0x0b, 0x47, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x37, 0x0a,
0x04, 0x75, 0x73, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6f, 0x72,
0x67, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x55, 0x73, 0x65,
0x72, 0x42, 0x0d, 0x9a, 0x4a, 0x0a, 0x12, 0x08, 0x73, 0x65, 0x6c, 0x2e, 0x75, 0x73, 0x65, 0x72,
0x52, 0x04, 0x75, 0x73, 0x65, 0x72, 0x12, 0x26, 0x0a, 0x03, 0x6d, 0x73, 0x67, 0x18, 0x02, 0x20,
0x01, 0x28, 0x09, 0x42, 0x14, 0x9a, 0x4a, 0x11, 0x12, 0x0f, 0x6d, 0x73, 0x67, 0x5f, 0x73, 0x65,
0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x03, 0x6d, 0x73, 0x67, 0x12, 0x5b,
0x0a, 0x0a, 0x6e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x5f, 0x6d, 0x73, 0x67, 0x18, 0x03, 0x20, 0x01,
0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x6f, 0x72, 0x67, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74,
0x69, 0x6f, 0x6e, 0x2e, 0x4e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67,
0x65, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x4e, 0x65, 0x73, 0x74, 0x42,
0x0f, 0x9a, 0x4a, 0x0c, 0x12, 0x0a, 0x6e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x5f, 0x6d, 0x73, 0x67,
0x52, 0x09, 0x6e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x4d, 0x73, 0x67, 0x12, 0x49, 0x0a, 0x0a, 0x63,
0x61, 0x73, 0x74, 0x5f, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32,
0x19, 0x2e, 0x6f, 0x72, 0x67, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e,
0x2e, 0x43, 0x61, 0x73, 0x74, 0x4f, 0x6e, 0x65, 0x6f, 0x66, 0x42, 0x0f, 0x9a, 0x4a, 0x0c, 0x12,
0x0a, 0x63, 0x61, 0x73, 0x74, 0x5f, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x52, 0x09, 0x63, 0x61, 0x73,
0x74, 0x4f, 0x6e, 0x65, 0x6f, 0x66, 0x3a, 0x93, 0x01, 0x9a, 0x4a, 0x8f, 0x01, 0x0a, 0x26, 0x0a,
0x03, 0x73, 0x65, 0x6c, 0x6a, 0x1f, 0x0a, 0x0d, 0x55, 0x73, 0x65, 0x72, 0x53, 0x65, 0x6c, 0x65,
0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x0e, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x05,
0x27, 0x66, 0x6f, 0x6f, 0x27, 0x0a, 0x1d, 0x0a, 0x07, 0x6d, 0x73, 0x67, 0x5f, 0x73, 0x65, 0x6c,
0x6a, 0x12, 0x0a, 0x10, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x53, 0x65, 0x6c, 0x65, 0x63,
0x74, 0x69, 0x6f, 0x6e, 0x0a, 0x2b, 0x0a, 0x0a, 0x6e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x5f, 0x6d,
0x73, 0x67, 0x6a, 0x1d, 0x0a, 0x1b, 0x4e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x4d, 0x65, 0x73, 0x73,
0x61, 0x67, 0x65, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x4e, 0x65, 0x73,
0x74, 0x0a, 0x19, 0x0a, 0x0a, 0x63, 0x61, 0x73, 0x74, 0x5f, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x6a,
0x0b, 0x0a, 0x09, 0x43, 0x61, 0x73, 0x74, 0x4f, 0x6e, 0x65, 0x6f, 0x66, 0x22, 0x13, 0x0a, 0x11,
0x47, 0x65, 0x74, 0x4e, 0x6f, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
0x74, 0x22, 0x87, 0x01, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x4e, 0x6f, 0x56, 0x61, 0x6c, 0x75, 0x65,
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x48, 0x0a, 0x08, 0x6e, 0x6f, 0x5f, 0x76,
0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x6f, 0x72, 0x67,
0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x4d, 0x42, 0x1a, 0x9a,
0x4a, 0x17, 0x12, 0x15, 0x6e, 0x6f, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x5f, 0x73, 0x65, 0x6c,
0x2e, 0x6e, 0x6f, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x07, 0x6e, 0x6f, 0x56, 0x61, 0x6c,
0x75, 0x65, 0x3a, 0x27, 0x9a, 0x4a, 0x24, 0x0a, 0x22, 0x0a, 0x0c, 0x6e, 0x6f, 0x5f, 0x76, 0x61,
0x6c, 0x75, 0x65, 0x5f, 0x73, 0x65, 0x6c, 0x6a, 0x12, 0x0a, 0x10, 0x4e, 0x6f, 0x56, 0x61, 0x6c,
0x75, 0x65, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x80, 0x03, 0x0a, 0x0d,
0x55, 0x73, 0x65, 0x72, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x77, 0x0a,
0x06, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e,
0x6f, 0x72, 0x67, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x55,
0x73, 0x65, 0x72, 0x42, 0x48, 0x9a, 0x4a, 0x45, 0x22, 0x43, 0x1a, 0x36, 0x0a, 0x02, 0x75, 0x61,
0x6a, 0x30, 0x0a, 0x04, 0x55, 0x73, 0x65, 0x72, 0x12, 0x0e, 0x0a, 0x07, 0x75, 0x73, 0x65, 0x72,
0x5f, 0x69, 0x64, 0x12, 0x03, 0x27, 0x61, 0x27, 0x12, 0x08, 0x0a, 0x03, 0x66, 0x6f, 0x6f, 0x12,
0x01, 0x30, 0x12, 0x0e, 0x0a, 0x03, 0x62, 0x61, 0x72, 0x12, 0x07, 0x27, 0x68, 0x65, 0x6c, 0x6c,
0x6f, 0x27, 0x22, 0x02, 0x75, 0x61, 0x0a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x48, 0x00, 0x52,
0x05, 0x75, 0x73, 0x65, 0x72, 0x41, 0x12, 0x76, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x62,
0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6f, 0x72, 0x67, 0x2e, 0x66, 0x65, 0x64,
0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x42, 0x47, 0x9a, 0x4a,
0x44, 0x22, 0x42, 0x1a, 0x36, 0x0a, 0x02, 0x75, 0x62, 0x6a, 0x30, 0x0a, 0x04, 0x55, 0x73, 0x65,
0x72, 0x12, 0x0e, 0x0a, 0x07, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x12, 0x03, 0x27, 0x62,
0x27, 0x12, 0x08, 0x0a, 0x03, 0x66, 0x6f, 0x6f, 0x12, 0x01, 0x30, 0x12, 0x0e, 0x0a, 0x03, 0x62,
0x61, 0x72, 0x12, 0x07, 0x27, 0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x27, 0x22, 0x02, 0x75, 0x62, 0x0a,
0x04, 0x74, 0x72, 0x75, 0x65, 0x48, 0x00, 0x52, 0x05, 0x75, 0x73, 0x65, 0x72, 0x42, 0x12, 0x76,
0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x63, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14,
0x2e, 0x6f, 0x72, 0x67, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e,
0x55, 0x73, 0x65, 0x72, 0x42, 0x47, 0x9a, 0x4a, 0x44, 0x22, 0x42, 0x1a, 0x3a, 0x0a, 0x02, 0x75,
0x63, 0x6a, 0x34, 0x0a, 0x04, 0x55, 0x73, 0x65, 0x72, 0x12, 0x12, 0x0a, 0x07, 0x75, 0x73, 0x65,
0x72, 0x5f, 0x69, 0x64, 0x12, 0x07, 0x24, 0x2e, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x08, 0x0a,
0x03, 0x66, 0x6f, 0x6f, 0x12, 0x01, 0x30, 0x12, 0x0e, 0x0a, 0x03, 0x62, 0x61, 0x72, 0x12, 0x07,
0x27, 0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x27, 0x22, 0x02, 0x75, 0x63, 0x10, 0x01, 0x48, 0x00, 0x52,
0x05, 0x75, 0x73, 0x65, 0x72, 0x43, 0x42, 0x06, 0x0a, 0x04, 0x75, 0x73, 0x65, 0x72, 0x22, 0x9b,
0x01, 0x0a, 0x10, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74,
0x69, 0x6f, 0x6e, 0x12, 0x2a, 0x0a, 0x05, 0x6d, 0x73, 0x67, 0x5f, 0x61, 0x18, 0x01, 0x20, 0x01,
0x28, 0x09, 0x42, 0x13, 0x9a, 0x4a, 0x10, 0x22, 0x0e, 0x22, 0x05, 0x27, 0x61, 0x61, 0x61, 0x27,
0x0a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x48, 0x00, 0x52, 0x04, 0x6d, 0x73, 0x67, 0x41, 0x12,
0x29, 0x0a, 0x05, 0x6d, 0x73, 0x67, 0x5f, 0x62, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x12,
0x9a, 0x4a, 0x0f, 0x22, 0x0d, 0x22, 0x05, 0x27, 0x62, 0x62, 0x62, 0x27, 0x0a, 0x04, 0x74, 0x72,
0x75, 0x65, 0x48, 0x00, 0x52, 0x04, 0x6d, 0x73, 0x67, 0x42, 0x12, 0x25, 0x0a, 0x05, 0x6d, 0x73,
0x67, 0x5f, 0x63, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0e, 0x9a, 0x4a, 0x0b, 0x22, 0x09,
0x22, 0x05, 0x27, 0x63, 0x63, 0x63, 0x27, 0x10, 0x01, 0x48, 0x00, 0x52, 0x04, 0x6d, 0x73, 0x67,
0x43, 0x42, 0x09, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0xa4, 0x01, 0x0a,
0x10, 0x4e, 0x6f, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f,
0x6e, 0x12, 0x41, 0x0a, 0x03, 0x6d, 0x5f, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11,
0x2e, 0x6f, 0x72, 0x67, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e,
0x4d, 0x42, 0x1b, 0x9a, 0x4a, 0x18, 0x22, 0x16, 0x22, 0x0d, 0x4d, 0x7b, 0x76, 0x61, 0x6c, 0x75,
0x65, 0x3a, 0x20, 0x27, 0x61, 0x27, 0x7d, 0x0a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x48, 0x00,
0x52, 0x02, 0x6d, 0x41, 0x12, 0x41, 0x0a, 0x03, 0x6d, 0x5f, 0x62, 0x18, 0x02, 0x20, 0x01, 0x28,
0x0b, 0x32, 0x11, 0x2e, 0x6f, 0x72, 0x67, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69,
0x6f, 0x6e, 0x2e, 0x4d, 0x42, 0x1b, 0x9a, 0x4a, 0x18, 0x22, 0x16, 0x22, 0x0d, 0x4d, 0x7b, 0x76,
0x61, 0x6c, 0x75, 0x65, 0x3a, 0x20, 0x27, 0x62, 0x27, 0x7d, 0x0a, 0x05, 0x66, 0x61, 0x6c, 0x73,
0x65, 0x48, 0x00, 0x52, 0x02, 0x6d, 0x42, 0x42, 0x0a, 0x0a, 0x08, 0x6e, 0x6f, 0x5f, 0x76, 0x61,
0x6c, 0x75, 0x65, 0x22, 0x78, 0x0a, 0x16, 0x4e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x4d, 0x65, 0x73,
0x73, 0x61, 0x67, 0x65, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x5e, 0x0a,
0x04, 0x4e, 0x65, 0x73, 0x74, 0x12, 0x22, 0x0a, 0x03, 0x69, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01,
0x28, 0x03, 0x42, 0x0e, 0x9a, 0x4a, 0x0b, 0x22, 0x09, 0x22, 0x01, 0x31, 0x0a, 0x04, 0x74, 0x72,
0x75, 0x65, 0x48, 0x00, 0x52, 0x03, 0x69, 0x6e, 0x74, 0x12, 0x29, 0x0a, 0x04, 0x74, 0x65, 0x78,
0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x13, 0x9a, 0x4a, 0x10, 0x22, 0x0e, 0x22, 0x05,
0x27, 0x66, 0x6f, 0x6f, 0x27, 0x0a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x48, 0x00, 0x52, 0x04,
0x74, 0x65, 0x78, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0xfd, 0x01,
0x0a, 0x09, 0x43, 0x61, 0x73, 0x74, 0x4f, 0x6e, 0x65, 0x6f, 0x66, 0x12, 0x29, 0x0a, 0x03, 0x6e,
0x75, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x42, 0x15, 0x9a, 0x4a, 0x12, 0x22, 0x10, 0x22,
0x07, 0x75, 0x69, 0x6e, 0x74, 0x28, 0x31, 0x29, 0x0a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x48,
0x00, 0x52, 0x03, 0x6e, 0x75, 0x6d, 0x12, 0x4e, 0x0a, 0x04, 0x75, 0x73, 0x65, 0x72, 0x18, 0x02,
0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6f, 0x72, 0x67, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72,
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x42, 0x22, 0x9a, 0x4a, 0x1f, 0x22,
0x1d, 0x22, 0x14, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x7b, 0x69, 0x64, 0x3a,
0x20, 0x27, 0x66, 0x6f, 0x6f, 0x27, 0x7d, 0x0a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x48, 0x00,
0x52, 0x04, 0x75, 0x73, 0x65, 0x72, 0x12, 0x67, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03,
0x20, 0x01, 0x28, 0x0e, 0x32, 0x18, 0x2e, 0x6f, 0x72, 0x67, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72,
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x42, 0x37,
0x9a, 0x4a, 0x34, 0x22, 0x32, 0x22, 0x2a, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x55, 0x73, 0x65, 0x72,
0x54, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x28, 0x27, 0x55, 0x53, 0x45, 0x52,
0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x41, 0x4e, 0x4f, 0x4e, 0x59, 0x4d, 0x4f, 0x55, 0x53, 0x27,
0x29, 0x0a, 0x04, 0x74, 0x72, 0x75, 0x65, 0x48, 0x00, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x42,
0x0c, 0x0a, 0x0a, 0x63, 0x61, 0x73, 0x74, 0x5f, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x22, 0x25, 0x0a,
0x01, 0x4d, 0x12, 0x20, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28,
0x09, 0x42, 0x0a, 0x9a, 0x4a, 0x07, 0x12, 0x05, 0x27, 0x66, 0x6f, 0x6f, 0x27, 0x52, 0x05, 0x76,
0x61, 0x6c, 0x75, 0x65, 0x22, 0x9a, 0x01, 0x0a, 0x04, 0x55, 0x73, 0x65, 0x72, 0x12, 0x1e, 0x0a,
0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0e, 0x9a, 0x4a, 0x0b, 0x12, 0x09,
0x24, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x52, 0x02, 0x69, 0x64, 0x3a, 0x72, 0x9a,
0x4a, 0x6f, 0x0a, 0x62, 0x72, 0x60, 0x0a, 0x18, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x55, 0x73, 0x65,
0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72,
0x12, 0x0f, 0x0a, 0x02, 0x69, 0x64, 0x12, 0x09, 0x24, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69,
0x64, 0x12, 0x18, 0x0a, 0x03, 0x66, 0x6f, 0x6f, 0x12, 0x05, 0x24, 0x2e, 0x66, 0x6f, 0x6f, 0x1a,
0x0a, 0x24, 0x2e, 0x66, 0x6f, 0x6f, 0x20, 0x21, 0x3d, 0x20, 0x30, 0x12, 0x19, 0x0a, 0x03, 0x62,
0x61, 0x72, 0x12, 0x05, 0x24, 0x2e, 0x62, 0x61, 0x72, 0x1a, 0x0b, 0x24, 0x2e, 0x62, 0x61, 0x72,
0x20, 0x21, 0x3d, 0x20, 0x27, 0x27, 0x1a, 0x09, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x55, 0x73, 0x65,
0x72, 0x2a, 0x52, 0x0a, 0x08, 0x55, 0x73, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x12, 0x19, 0x0a,
0x15, 0x55, 0x53, 0x45, 0x52, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45,
0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x17, 0x0a, 0x13, 0x55, 0x53, 0x45, 0x52,
0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x41, 0x4e, 0x4f, 0x4e, 0x59, 0x4d, 0x4f, 0x55, 0x53, 0x10,
0x01, 0x1a, 0x12, 0x9a, 0x4a, 0x0f, 0x0a, 0x0d, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x55, 0x73, 0x65,
0x72, 0x54, 0x79, 0x70, 0x65, 0x32, 0xb1, 0x01, 0x0a, 0x11, 0x46, 0x65, 0x64, 0x65, 0x72, 0x61,
0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x40, 0x0a, 0x03, 0x47,
0x65, 0x74, 0x12, 0x1a, 0x2e, 0x6f, 0x72, 0x67, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74,
0x69, 0x6f, 0x6e, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b,
0x2e, 0x6f, 0x72, 0x67, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e,
0x47, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x55, 0x0a,
0x0a, 0x47, 0x65, 0x74, 0x4e, 0x6f, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x21, 0x2e, 0x6f, 0x72,
0x67, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x47, 0x65, 0x74,
0x4e, 0x6f, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22,
0x2e, 0x6f, 0x72, 0x67, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e,
0x47, 0x65, 0x74, 0x4e, 0x6f, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
0x73, 0x65, 0x22, 0x00, 0x1a, 0x03, 0x9a, 0x4a, 0x00, 0x42, 0xb1, 0x01, 0x9a, 0x4a, 0x11, 0x12,
0x0f, 0x75, 0x73, 0x65, 0x72, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
0x0a, 0x12, 0x63, 0x6f, 0x6d, 0x2e, 0x6f, 0x72, 0x67, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61,
0x74, 0x69, 0x6f, 0x6e, 0x42, 0x0f, 0x46, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e,
0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x1d, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65,
0x2f, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x3b, 0x66, 0x65, 0x64, 0x65,
0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0xa2, 0x02, 0x03, 0x4f, 0x46, 0x58, 0xaa, 0x02, 0x0e, 0x4f,
0x72, 0x67, 0x2e, 0x46, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0xca, 0x02, 0x0e,
0x4f, 0x72, 0x67, 0x5c, 0x46, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0xe2, 0x02,
0x1a, 0x4f, 0x72, 0x67, 0x5c, 0x46, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5c,
0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0f, 0x4f, 0x72,
0x67, 0x3a, 0x3a, 0x46, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x62, 0x06, 0x70,
0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_federation_federation_proto_rawDescOnce sync.Once
file_federation_federation_proto_rawDescData = file_federation_federation_proto_rawDesc
)
func file_federation_federation_proto_rawDescGZIP() []byte {
file_federation_federation_proto_rawDescOnce.Do(func() {
file_federation_federation_proto_rawDescData = protoimpl.X.CompressGZIP(file_federation_federation_proto_rawDescData)
})
return file_federation_federation_proto_rawDescData
}
var file_federation_federation_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
var file_federation_federation_proto_msgTypes = make([]protoimpl.MessageInfo, 12)
var file_federation_federation_proto_goTypes = []interface{}{
(UserType)(0), // 0: org.federation.UserType
(*GetRequest)(nil), // 1: org.federation.GetRequest
(*GetResponse)(nil), // 2: org.federation.GetResponse
(*GetNoValueRequest)(nil), // 3: org.federation.GetNoValueRequest
(*GetNoValueResponse)(nil), // 4: org.federation.GetNoValueResponse
(*UserSelection)(nil), // 5: org.federation.UserSelection
(*MessageSelection)(nil), // 6: org.federation.MessageSelection
(*NoValueSelection)(nil), // 7: org.federation.NoValueSelection
(*NestedMessageSelection)(nil), // 8: org.federation.NestedMessageSelection
(*CastOneof)(nil), // 9: org.federation.CastOneof
(*M)(nil), // 10: org.federation.M
(*User)(nil), // 11: org.federation.User
(*NestedMessageSelection_Nest)(nil), // 12: org.federation.NestedMessageSelection.Nest
}
var file_federation_federation_proto_depIdxs = []int32{
11, // 0: org.federation.GetResponse.user:type_name -> org.federation.User
12, // 1: org.federation.GetResponse.nested_msg:type_name -> org.federation.NestedMessageSelection.Nest
9, // 2: org.federation.GetResponse.cast_oneof:type_name -> org.federation.CastOneof
10, // 3: org.federation.GetNoValueResponse.no_value:type_name -> org.federation.M
11, // 4: org.federation.UserSelection.user_a:type_name -> org.federation.User
11, // 5: org.federation.UserSelection.user_b:type_name -> org.federation.User
11, // 6: org.federation.UserSelection.user_c:type_name -> org.federation.User
10, // 7: org.federation.NoValueSelection.m_a:type_name -> org.federation.M
10, // 8: org.federation.NoValueSelection.m_b:type_name -> org.federation.M
11, // 9: org.federation.CastOneof.user:type_name -> org.federation.User
0, // 10: org.federation.CastOneof.type:type_name -> org.federation.UserType
1, // 11: org.federation.FederationService.Get:input_type -> org.federation.GetRequest
3, // 12: org.federation.FederationService.GetNoValue:input_type -> org.federation.GetNoValueRequest
2, // 13: org.federation.FederationService.Get:output_type -> org.federation.GetResponse
4, // 14: org.federation.FederationService.GetNoValue:output_type -> org.federation.GetNoValueResponse
13, // [13:15] is the sub-list for method output_type
11, // [11:13] is the sub-list for method input_type
11, // [11:11] is the sub-list for extension type_name
11, // [11:11] is the sub-list for extension extendee
0, // [0:11] is the sub-list for field type_name
}
func init() { file_federation_federation_proto_init() }
func file_federation_federation_proto_init() {
if File_federation_federation_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_federation_federation_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_federation_federation_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_federation_federation_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetNoValueRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_federation_federation_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetNoValueResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_federation_federation_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*UserSelection); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_federation_federation_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*MessageSelection); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_federation_federation_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*NoValueSelection); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_federation_federation_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*NestedMessageSelection); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_federation_federation_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CastOneof); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_federation_federation_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*M); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_federation_federation_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*User); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_federation_federation_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*NestedMessageSelection_Nest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
file_federation_federation_proto_msgTypes[4].OneofWrappers = []interface{}{
(*UserSelection_UserA)(nil),
(*UserSelection_UserB)(nil),
(*UserSelection_UserC)(nil),
}
file_federation_federation_proto_msgTypes[5].OneofWrappers = []interface{}{
(*MessageSelection_MsgA)(nil),
(*MessageSelection_MsgB)(nil),
(*MessageSelection_MsgC)(nil),
}
file_federation_federation_proto_msgTypes[6].OneofWrappers = []interface{}{
(*NoValueSelection_MA)(nil),
(*NoValueSelection_MB)(nil),
}
file_federation_federation_proto_msgTypes[8].OneofWrappers = []interface{}{
(*CastOneof_Num)(nil),
(*CastOneof_User)(nil),
(*CastOneof_Type)(nil),
}
file_federation_federation_proto_msgTypes[11].OneofWrappers = []interface{}{
(*NestedMessageSelection_Nest_Int)(nil),
(*NestedMessageSelection_Nest_Text)(nil),
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_federation_federation_proto_rawDesc,
NumEnums: 1,
NumMessages: 12,
NumExtensions: 0,
NumServices: 1,
},
GoTypes: file_federation_federation_proto_goTypes,
DependencyIndexes: file_federation_federation_proto_depIdxs,
EnumInfos: file_federation_federation_proto_enumTypes,
MessageInfos: file_federation_federation_proto_msgTypes,
}.Build()
File_federation_federation_proto = out.File
file_federation_federation_proto_rawDesc = nil
file_federation_federation_proto_goTypes = nil
file_federation_federation_proto_depIdxs = nil
}
================================================
FILE: _examples/10_oneof/federation/federation_grpc.pb.go
================================================
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.3.0
// - protoc (unknown)
// source: federation/federation.proto
package federation
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 (
FederationService_Get_FullMethodName = "/org.federation.FederationService/Get"
FederationService_GetNoValue_FullMethodName = "/org.federation.FederationService/GetNoValue"
)
// FederationServiceClient is the client API for FederationService 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 FederationServiceClient interface {
Get(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*GetResponse, error)
GetNoValue(ctx context.Context, in *GetNoValueRequest, opts ...grpc.CallOption) (*GetNoValueResponse, error)
}
type federationServiceClient struct {
cc grpc.ClientConnInterface
}
func NewFederationServiceClient(cc grpc.ClientConnInterface) FederationServiceClient {
return &federationServiceClient{cc}
}
func (c *federationServiceClient) Get(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*GetResponse, error) {
out := new(GetResponse)
err := c.cc.Invoke(ctx, FederationService_Get_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *federationServiceClient) GetNoValue(ctx context.Context, in *GetNoValueRequest, opts ...grpc.CallOption) (*GetNoValueResponse, error) {
out := new(GetNoValueResponse)
err := c.cc.Invoke(ctx, FederationService_GetNoValue_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// FederationServiceServer is the server API for FederationService service.
// All implementations must embed UnimplementedFederationServiceServer
// for forward compatibility
type FederationServiceServer interface {
Get(context.Context, *GetRequest) (*GetResponse, error)
GetNoValue(context.Context, *GetNoValueRequest) (*GetNoValueResponse, error)
mustEmbedUnimplementedFederationServiceServer()
}
// UnimplementedFederationServiceServer must be embedded to have forward compatible implementations.
type UnimplementedFederationServiceServer struct {
}
func (UnimplementedFederationServiceServer) Get(context.Context, *GetRequest) (*GetResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method Get not implemented")
}
func (UnimplementedFederationServiceServer) GetNoValue(context.Context, *GetNoValueRequest) (*GetNoValueResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetNoValue not implemented")
}
func (UnimplementedFederationServiceServer) mustEmbedUnimplementedFederationServiceServer() {}
// UnsafeFederationServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to FederationServiceServer will
// result in compilation errors.
type UnsafeFederationServiceServer interface {
mustEmbedUnimplementedFederationServiceServer()
}
func RegisterFederationServiceServer(s grpc.ServiceRegistrar, srv FederationServiceServer) {
s.RegisterService(&FederationService_ServiceDesc, srv)
}
func _FederationService_Get_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(FederationServiceServer).Get(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: FederationService_Get_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(FederationServiceServer).Get(ctx, req.(*GetRequest))
}
return interceptor(ctx, in, info, handler)
}
func _FederationService_GetNoValue_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetNoValueRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(FederationServiceServer).GetNoValue(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: FederationService_GetNoValue_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(FederationServiceServer).GetNoValue(ctx, req.(*GetNoValueRequest))
}
return interceptor(ctx, in, info, handler)
}
// FederationService_ServiceDesc is the grpc.ServiceDesc for FederationService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var FederationService_ServiceDesc = grpc.ServiceDesc{
ServiceName: "org.federation.FederationService",
HandlerType: (*FederationServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "Get",
Handler: _FederationService_Get_Handler,
},
{
MethodName: "GetNoValue",
Handler: _FederationService_GetNoValue_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "federation/federation.proto",
}
================================================
FILE: _examples/10_oneof/federation/federation_grpc_federation.pb.go
================================================
// Code generated by protoc-gen-grpc-federation. DO NOT EDIT!
// versions:
//
// protoc-gen-grpc-federation: (devel)
//
// source: federation/federation.proto
package federation
import (
"context"
"io"
"log/slog"
"reflect"
grpcfed "github.com/mercari/grpc-federation/grpc/federation"
grpcfedcel "github.com/mercari/grpc-federation/grpc/federation/cel"
"go.opentelemetry.io/otel"
"go.opentelemetry.io/otel/trace"
user "example/user"
)
var (
_ = reflect.Invalid // to avoid "imported and not used error"
)
// Org_Federation_CastOneofVariable represents variable definitions in "org.federation.CastOneof".
type FederationService_Org_Federation_CastOneofVariable struct {
}
// Org_Federation_CastOneofArgument is argument for "org.federation.CastOneof" message.
type FederationService_Org_Federation_CastOneofArgument struct {
FederationService_Org_Federation_CastOneofVariable
}
// Org_Federation_GetNoValueResponseVariable represents variable definitions in "org.federation.GetNoValueResponse".
type FederationService_Org_Federation_GetNoValueResponseVariable struct {
NoValueSel *NoValueSelection
}
// Org_Federation_GetNoValueResponseArgument is argument for "org.federation.GetNoValueResponse" message.
type FederationService_Org_Federation_GetNoValueResponseArgument struct {
FederationService_Org_Federation_GetNoValueResponseVariable
}
// Org_Federation_GetResponseVariable represents variable definitions in "org.federation.GetResponse".
type FederationService_Org_Federation_GetResponseVariable struct {
CastOneof *CastOneof
MsgSel *MessageSelection
NestedMsg *NestedMessageSelection_Nest
Sel *UserSelection
}
// Org_Federation_GetResponseArgument is argument for "org.federation.GetResponse" message.
type FederationService_Org_Federation_GetResponseArgument struct {
FederationService_Org_Federation_GetResponseVariable
}
// Org_Federation_MessageSelectionVariable represents variable definitions in "org.federation.MessageSelection".
type FederationService_Org_Federation_MessageSelectionVariable struct {
}
// Org_Federation_MessageSelectionArgument is argument for "org.federation.MessageSelection" message.
type FederationService_Org_Federation_MessageSelectionArgument struct {
FederationService_Org_Federation_MessageSelectionVariable
}
// Org_Federation_NestedMessageSelection_NestVariable represents variable definitions in "org.federation.Nest".
type FederationService_Org_Federation_NestedMessageSelection_NestVariable struct {
}
// Org_Federation_NestedMessageSelection_NestArgument is argument for "org.federation.Nest" message.
type FederationService_Org_Federation_NestedMessageSelection_NestArgument struct {
FederationService_Org_Federation_NestedMessageSelection_NestVariable
}
// Org_Federation_NoValueSelectionVariable represents variable definitions in "org.federation.NoValueSelection".
type FederationService_Org_Federation_NoValueSelectionVariable struct {
}
// Org_Federation_NoValueSelectionArgument is argument for "org.federation.NoValueSelection" message.
type FederationService_Org_Federation_NoValueSelectionArgument struct {
FederationService_Org_Federation_NoValueSelectionVariable
}
// Org_Federation_UserVariable represents variable definitions in "org.federation.User".
type FederationService_Org_Federation_UserVariable struct {
}
// Org_Federation_UserArgument is argument for "org.federation.User" message.
type FederationService_Org_Federation_UserArgument struct {
Bar string
Foo int64
UserId string
FederationService_Org_Federation_UserVariable
}
// Org_Federation_UserSelectionVariable represents variable definitions in "org.federation.UserSelection".
type FederationService_Org_Federation_UserSelectionVariable struct {
Ua *User
Ub *User
Uc *User
}
// Org_Federation_UserSelectionArgument is argument for "org.federation.UserSelection" message.
type FederationService_Org_Federation_UserSelectionArgument struct {
Value string
FederationService_Org_Federation_UserSelectionVariable
}
// FederationServiceConfig configuration required to initialize the service that use GRPC Federation.
type FederationServiceConfig struct {
// Client provides a factory that creates the gRPC Client needed to invoke methods of the gRPC Service on which the Federation Service depends.
// If this interface is not provided, an error is returned during initialization.
Client FederationServiceClientFactory // required
// ErrorHandler Federation Service often needs to convert errors received from downstream services.
// If an error occurs during method execution in the Federation Service, this error handler is called and the returned error is treated as a final error.
ErrorHandler grpcfed.ErrorHandler
// Logger sets the logger used to output Debug/Info/Error information.
Logger *slog.Logger
}
// FederationServiceClientFactory provides a factory that creates the gRPC Client needed to invoke methods of the gRPC Service on which the Federation Service depends.
type FederationServiceClientFactory interface {
// User_UserServiceClient create a gRPC Client to be used to call methods in user.UserService.
User_UserServiceClient(FederationServiceClientConfig) (user.UserServiceClient, error)
}
// FederationServiceClientConfig helper to create gRPC client.
// Hints for creating a gRPC Client.
type FederationServiceClientConfig struct {
// Service FQDN ( `.` ) of the service on Protocol Buffers.
Service string
}
// FederationServiceDependentClientSet has a gRPC client for all services on which the federation service depends.
// This is provided as an argument when implementing the custom resolver.
type FederationServiceDependentClientSet struct {
User_UserServiceClient user.UserServiceClient
}
// FederationServiceResolver provides an interface to directly implement message resolver and field resolver not defined in Protocol Buffers.
type FederationServiceResolver interface {
}
// FederationServiceCELPluginWasmConfig type alias for grpcfedcel.WasmConfig.
type FederationServiceCELPluginWasmConfig = grpcfedcel.WasmConfig
// FederationServiceCELPluginConfig hints for loading a WebAssembly based plugin.
type FederationServiceCELPluginConfig struct {
CacheDir string
}
// FederationServiceUnimplementedResolver a structure implemented to satisfy the Resolver interface.
// An Unimplemented error is always returned.
// This is intended for use when there are many Resolver interfaces that do not need to be implemented,
// by embedding them in a resolver structure that you have created.
type FederationServiceUnimplementedResolver struct{}
const (
FederationService_DependentMethod_User_UserService_GetUser = "/user.UserService/GetUser"
)
// FederationService represents Federation Service.
type FederationService struct {
UnimplementedFederationServiceServer
cfg FederationServiceConfig
logger *slog.Logger
isLogLevelDebug bool
errorHandler grpcfed.ErrorHandler
celCacheMap *grpcfed.CELCacheMap
tracer trace.Tracer
celTypeHelper *grpcfed.CELTypeHelper
celEnvOpts []grpcfed.CELEnvOption
celPlugins []*grpcfedcel.CELPlugin
client *FederationServiceDependentClientSet
}
// NewFederationService creates FederationService instance by FederationServiceConfig.
func NewFederationService(cfg FederationServiceConfig) (*FederationService, error) {
if cfg.Client == nil {
return nil, grpcfed.ErrClientConfig
}
User_UserServiceClient, err := cfg.Client.User_UserServiceClient(FederationServiceClientConfig{
Service: "user.UserService",
})
if err != nil {
return nil, err
}
logger := cfg.Logger
if logger == nil {
logger = slog.New(slog.NewJSONHandler(io.Discard, nil))
}
tracer := otel.Tracer("org.federation.FederationService")
ctx := grpcfed.WithLogger(context.Background(), logger)
ctx = grpcfed.WithTracer(ctx, tracer)
errorHandler := cfg.ErrorHandler
if errorHandler == nil {
errorHandler = func(ctx context.Context, methodName string, err error) error { return err }
}
celTypeHelperFieldMap := grpcfed.CELTypeHelperFieldMap{
"grpc.federation.private.org.federation.CastOneofArgument": {},
"grpc.federation.private.org.federation.GetNoValueResponseArgument": {},
"grpc.federation.private.org.federation.GetResponseArgument": {},
"grpc.federation.private.org.federation.MessageSelectionArgument": {},
"grpc.federation.private.org.federation.NestedMessageSelection_NestArgument": {},
"grpc.federation.private.org.federation.NoValueSelectionArgument": {},
"grpc.federation.private.org.federation.UserArgument": {
"user_id": grpcfed.NewCELFieldType(grpcfed.CELStringType, "UserId"),
"foo": grpcfed.NewCELFieldType(grpcfed.CELIntType, "Foo"),
"bar": grpcfed.NewCELFieldType(grpcfed.CELStringType, "Bar"),
},
"grpc.federation.private.org.federation.UserSelectionArgument": {
"value": grpcfed.NewCELFieldType(grpcfed.CELStringType, "Value"),
},
"org.federation.MessageSelection": {
"message": grpcfed.NewOneofSelectorFieldType(
grpcfed.CELStringType, "Message",
[]reflect.Type{reflect.TypeOf((*MessageSelection_MsgA)(nil)), reflect.TypeOf((*MessageSelection_MsgB)(nil)), reflect.TypeOf((*MessageSelection_MsgC)(nil))},
[]string{"GetMsgA", "GetMsgB", "GetMsgC"},
reflect.Zero(reflect.TypeOf("")),
),
},
"org.federation.NoValueSelection": {
"no_value": grpcfed.NewOneofSelectorFieldType(
grpcfed.NewCELObjectType("org.federation.M"), "NoValue",
[]reflect.Type{reflect.TypeOf((*NoValueSelection_MA)(nil)), reflect.TypeOf((*NoValueSelection_MB)(nil))},
[]string{"GetMA", "GetMB"},
reflect.Zero(reflect.TypeOf((*M)(nil))),
),
},
"org.federation.UserSelection": {
"user": grpcfed.NewOneofSelectorFieldType(
grpcfed.NewCELObjectType("org.federation.User"), "User",
[]reflect.Type{reflect.TypeOf((*UserSelection_UserA)(nil)), reflect.TypeOf((*UserSelection_UserB)(nil)), reflect.TypeOf((*UserSelection_UserC)(nil))},
[]string{"GetUserA", "GetUserB", "GetUserC"},
reflect.Zero(reflect.TypeOf((*User)(nil))),
),
},
}
celTypeHelper := grpcfed.NewCELTypeHelper("org.federation", celTypeHelperFieldMap)
var celEnvOpts []grpcfed.CELEnvOption
celEnvOpts = append(celEnvOpts, grpcfed.NewDefaultEnvOptions(celTypeHelper)...)
celEnvOpts = append(celEnvOpts, grpcfed.GRPCErrorAccessorOptions(celTypeHelper, "user.GetUserResponse")...)
celEnvOpts = append(celEnvOpts, grpcfed.EnumAccessorOptions("org.federation.UserType", UserType_value, UserType_name)...)
celEnvOpts = append(celEnvOpts, grpcfed.EnumAccessorOptions("user.UserType", user.UserType_value, user.UserType_name)...)
svc := &FederationService{
cfg: cfg,
logger: logger,
isLogLevelDebug: logger.Enabled(context.Background(), slog.LevelDebug),
errorHandler: errorHandler,
celEnvOpts: celEnvOpts,
celTypeHelper: celTypeHelper,
celCacheMap: grpcfed.NewCELCacheMap(),
tracer: tracer,
client: &FederationServiceDependentClientSet{
User_UserServiceClient: User_UserServiceClient,
},
}
return svc, nil
}
// CleanupFederationService cleanup all resources to prevent goroutine leaks.
func CleanupFederationService(ctx context.Context, svc *FederationService) {
svc.cleanup(ctx)
}
func (s *FederationService) cleanup(ctx context.Context) {
for _, plugin := range s.celPlugins {
plugin.Close()
}
}
// Get implements "org.federation.FederationService/Get" method.
func (s *FederationService) Get(ctx context.Context, req *GetRequest) (res *GetResponse, e error) {
ctx, span := s.tracer.Start(ctx, "org.federation.FederationService/Get")
defer span.End()
ctx = grpcfed.WithLogger(ctx, s.logger)
ctx = grpcfed.WithCELCacheMap(ctx, s.celCacheMap)
defer func() {
if r := recover(); r != nil {
e = grpcfed.RecoverError(r, grpcfed.StackTrace())
grpcfed.OutputErrorLog(ctx, e)
}
}()
defer func() {
for _, celPlugin := range s.celPlugins {
celPlugin.Cleanup()
}
}()
res, err := s.resolve_Org_Federation_GetResponse(ctx, &FederationService_Org_Federation_GetResponseArgument{})
if err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
grpcfed.OutputErrorLog(ctx, err)
return nil, err
}
return res, nil
}
// GetNoValue implements "org.federation.FederationService/GetNoValue" method.
func (s *FederationService) GetNoValue(ctx context.Context, req *GetNoValueRequest) (res *GetNoValueResponse, e error) {
ctx, span := s.tracer.Start(ctx, "org.federation.FederationService/GetNoValue")
defer span.End()
ctx = grpcfed.WithLogger(ctx, s.logger)
ctx = grpcfed.WithCELCacheMap(ctx, s.celCacheMap)
defer func() {
if r := recover(); r != nil {
e = grpcfed.RecoverError(r, grpcfed.StackTrace())
grpcfed.OutputErrorLog(ctx, e)
}
}()
defer func() {
for _, celPlugin := range s.celPlugins {
celPlugin.Cleanup()
}
}()
res, err := s.resolve_Org_Federation_GetNoValueResponse(ctx, &FederationService_Org_Federation_GetNoValueResponseArgument{})
if err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
grpcfed.OutputErrorLog(ctx, err)
return nil, err
}
return res, nil
}
// resolve_Org_Federation_CastOneof resolve "org.federation.CastOneof" message.
func (s *FederationService) resolve_Org_Federation_CastOneof(ctx context.Context, req *FederationService_Org_Federation_CastOneofArgument) (*CastOneof, error) {
ctx, span := s.tracer.Start(ctx, "org.federation.CastOneof")
defer span.End()
ctx = grpcfed.WithLogger(ctx, grpcfed.Logger(ctx), grpcfed.LogAttrs(ctx)...)
grpcfed.Logger(ctx).DebugContext(ctx, "resolve org.federation.CastOneof", slog.Any("message_args", s.logvalue_Org_Federation_CastOneofArgument(req)))
type localValueType struct {
*grpcfed.LocalValue
vars struct {
}
}
value := &localValueType{LocalValue: grpcfed.NewLocalValue(ctx, s.celEnvOpts, "grpc.federation.private.org.federation.CastOneofArgument", req)}
ctx = grpcfed.WithLocalValue(ctx, value.LocalValue)
// create a message value to be returned.
ret := &CastOneof{}
// field binding section.
oneof_Num, err := grpcfed.EvalCEL(ctx, &grpcfed.EvalCELRequest{
Value: value,
Expr: `false`,
OutType: reflect.TypeOf(true),
CacheIndex: 1,
})
if err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
oneof_User, err := grpcfed.EvalCEL(ctx, &grpcfed.EvalCELRequest{
Value: value,
Expr: `false`,
OutType: reflect.TypeOf(true),
CacheIndex: 2,
})
if err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
oneof_Type, err := grpcfed.EvalCEL(ctx, &grpcfed.EvalCELRequest{
Value: value,
Expr: `true`,
OutType: reflect.TypeOf(true),
CacheIndex: 3,
})
if err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
if false {
// For code generation reasons, we're using a loop to generate the oneof conditional branches,
// so to avoid treating the first element specially, we always generate if branch with false condition.
} else if oneof_Num.(bool) {
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[uint64]{
Value: value,
Expr: `uint(1)`,
CacheIndex: 4,
Setter: func(v uint64) error {
castOneofValue, err := s.cast_uint64__to__Org_Federation_CastOneof_Num(v)
if err != nil {
return err
}
ret.CastOneof = castOneofValue
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
} else if oneof_User.(bool) {
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[*user.User]{
Value: value,
Expr: `user.User{id: 'foo'}`,
CacheIndex: 5,
Setter: func(v *user.User) error {
castOneofValue, err := s.cast_User_User__to__Org_Federation_CastOneof_User(v)
if err != nil {
return err
}
ret.CastOneof = castOneofValue
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
} else if oneof_Type.(bool) {
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[user.UserType]{
Value: value,
Expr: `user.UserType.value('USER_TYPE_ANONYMOUS')`,
CacheIndex: 6,
Setter: func(v user.UserType) error {
castOneofValue, err := s.cast_User_UserType__to__Org_Federation_CastOneof_Type(v)
if err != nil {
return err
}
ret.CastOneof = castOneofValue
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
}
grpcfed.Logger(ctx).DebugContext(ctx, "resolved org.federation.CastOneof", slog.Any("org.federation.CastOneof", s.logvalue_Org_Federation_CastOneof(ret)))
return ret, nil
}
// resolve_Org_Federation_GetNoValueResponse resolve "org.federation.GetNoValueResponse" message.
func (s *FederationService) resolve_Org_Federation_GetNoValueResponse(ctx context.Context, req *FederationService_Org_Federation_GetNoValueResponseArgument) (*GetNoValueResponse, error) {
ctx, span := s.tracer.Start(ctx, "org.federation.GetNoValueResponse")
defer span.End()
ctx = grpcfed.WithLogger(ctx, grpcfed.Logger(ctx), grpcfed.LogAttrs(ctx)...)
grpcfed.Logger(ctx).DebugContext(ctx, "resolve org.federation.GetNoValueResponse", slog.Any("message_args", s.logvalue_Org_Federation_GetNoValueResponseArgument(req)))
type localValueType struct {
*grpcfed.LocalValue
vars struct {
NoValueSel *NoValueSelection
}
}
value := &localValueType{LocalValue: grpcfed.NewLocalValue(ctx, s.celEnvOpts, "grpc.federation.private.org.federation.GetNoValueResponseArgument", req)}
ctx = grpcfed.WithLocalValue(ctx, value.LocalValue)
/*
def {
name: "no_value_sel"
message {
name: "NoValueSelection"
}
}
*/
def_no_value_sel := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[*NoValueSelection, *localValueType]{
Name: `no_value_sel`,
Type: grpcfed.CELObjectType("org.federation.NoValueSelection"),
Setter: func(value *localValueType, v *NoValueSelection) error {
value.vars.NoValueSel = v
return nil
},
Message: func(ctx context.Context, value *localValueType) (any, error) {
args := &FederationService_Org_Federation_NoValueSelectionArgument{}
ret, err := s.resolve_Org_Federation_NoValueSelection(ctx, args)
if err != nil {
return nil, err
}
return ret, nil
},
})
}
if err := def_no_value_sel(ctx); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
// assign named parameters to message arguments to pass to the custom resolver.
req.FederationService_Org_Federation_GetNoValueResponseVariable.NoValueSel = value.vars.NoValueSel
// create a message value to be returned.
ret := &GetNoValueResponse{}
// field binding section.
// (grpc.federation.field).by = "no_value_sel.no_value"
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[*M]{
Value: value,
Expr: `no_value_sel.no_value`,
CacheIndex: 7,
Setter: func(v *M) error {
ret.NoValue = v
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
grpcfed.Logger(ctx).DebugContext(ctx, "resolved org.federation.GetNoValueResponse", slog.Any("org.federation.GetNoValueResponse", s.logvalue_Org_Federation_GetNoValueResponse(ret)))
return ret, nil
}
// resolve_Org_Federation_GetResponse resolve "org.federation.GetResponse" message.
func (s *FederationService) resolve_Org_Federation_GetResponse(ctx context.Context, req *FederationService_Org_Federation_GetResponseArgument) (*GetResponse, error) {
ctx, span := s.tracer.Start(ctx, "org.federation.GetResponse")
defer span.End()
ctx = grpcfed.WithLogger(ctx, grpcfed.Logger(ctx), grpcfed.LogAttrs(ctx)...)
grpcfed.Logger(ctx).DebugContext(ctx, "resolve org.federation.GetResponse", slog.Any("message_args", s.logvalue_Org_Federation_GetResponseArgument(req)))
type localValueType struct {
*grpcfed.LocalValue
vars struct {
CastOneof *CastOneof
MsgSel *MessageSelection
NestedMsg *NestedMessageSelection_Nest
Sel *UserSelection
}
}
value := &localValueType{LocalValue: grpcfed.NewLocalValue(ctx, s.celEnvOpts, "grpc.federation.private.org.federation.GetResponseArgument", req)}
ctx = grpcfed.WithLocalValue(ctx, value.LocalValue)
/*
def {
name: "sel"
message {
name: "UserSelection"
args { name: "value", by: "'foo'" }
}
}
*/
def_sel := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[*UserSelection, *localValueType]{
Name: `sel`,
Type: grpcfed.CELObjectType("org.federation.UserSelection"),
Setter: func(value *localValueType, v *UserSelection) error {
value.vars.Sel = v
return nil
},
Message: func(ctx context.Context, value *localValueType) (any, error) {
args := &FederationService_Org_Federation_UserSelectionArgument{}
// { name: "value", by: "'foo'" }
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[string]{
Value: value,
Expr: `'foo'`,
CacheIndex: 8,
Setter: func(v string) error {
args.Value = v
return nil
},
}); err != nil {
return nil, err
}
ret, err := s.resolve_Org_Federation_UserSelection(ctx, args)
if err != nil {
return nil, err
}
return ret, nil
},
})
}
/*
def {
name: "msg_sel"
message {
name: "MessageSelection"
}
}
*/
def_msg_sel := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[*MessageSelection, *localValueType]{
Name: `msg_sel`,
Type: grpcfed.CELObjectType("org.federation.MessageSelection"),
Setter: func(value *localValueType, v *MessageSelection) error {
value.vars.MsgSel = v
return nil
},
Message: func(ctx context.Context, value *localValueType) (any, error) {
args := &FederationService_Org_Federation_MessageSelectionArgument{}
ret, err := s.resolve_Org_Federation_MessageSelection(ctx, args)
if err != nil {
return nil, err
}
return ret, nil
},
})
}
/*
def {
name: "nested_msg"
message {
name: "Nest"
}
}
*/
def_nested_msg := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[*NestedMessageSelection_Nest, *localValueType]{
Name: `nested_msg`,
Type: grpcfed.CELObjectType("org.federation.NestedMessageSelection.Nest"),
Setter: func(value *localValueType, v *NestedMessageSelection_Nest) error {
value.vars.NestedMsg = v
return nil
},
Message: func(ctx context.Context, value *localValueType) (any, error) {
args := &FederationService_Org_Federation_NestedMessageSelection_NestArgument{}
ret, err := s.resolve_Org_Federation_NestedMessageSelection_Nest(ctx, args)
if err != nil {
return nil, err
}
return ret, nil
},
})
}
/*
def {
name: "cast_oneof"
message {
name: "CastOneof"
}
}
*/
def_cast_oneof := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[*CastOneof, *localValueType]{
Name: `cast_oneof`,
Type: grpcfed.CELObjectType("org.federation.CastOneof"),
Setter: func(value *localValueType, v *CastOneof) error {
value.vars.CastOneof = v
return nil
},
Message: func(ctx context.Context, value *localValueType) (any, error) {
args := &FederationService_Org_Federation_CastOneofArgument{}
ret, err := s.resolve_Org_Federation_CastOneof(ctx, args)
if err != nil {
return nil, err
}
return ret, nil
},
})
}
// A tree view of message dependencies is shown below.
/*
cast_oneof ─┐
msg_sel ─┤
nested_msg ─┤
sel ─┤
*/
eg, ctx1 := grpcfed.ErrorGroupWithContext(ctx)
grpcfed.GoWithRecover(eg, func() (any, error) {
if err := def_cast_oneof(ctx1); err != nil {
grpcfed.RecordErrorToSpan(ctx1, err)
return nil, err
}
return nil, nil
})
grpcfed.GoWithRecover(eg, func() (any, error) {
if err := def_msg_sel(ctx1); err != nil {
grpcfed.RecordErrorToSpan(ctx1, err)
return nil, err
}
return nil, nil
})
grpcfed.GoWithRecover(eg, func() (any, error) {
if err := def_nested_msg(ctx1); err != nil {
grpcfed.RecordErrorToSpan(ctx1, err)
return nil, err
}
return nil, nil
})
grpcfed.GoWithRecover(eg, func() (any, error) {
if err := def_sel(ctx1); err != nil {
grpcfed.RecordErrorToSpan(ctx1, err)
return nil, err
}
return nil, nil
})
if err := eg.Wait(); err != nil {
return nil, err
}
// assign named parameters to message arguments to pass to the custom resolver.
req.FederationService_Org_Federation_GetResponseVariable.CastOneof = value.vars.CastOneof
req.FederationService_Org_Federation_GetResponseVariable.MsgSel = value.vars.MsgSel
req.FederationService_Org_Federation_GetResponseVariable.NestedMsg = value.vars.NestedMsg
req.FederationService_Org_Federation_GetResponseVariable.Sel = value.vars.Sel
// create a message value to be returned.
ret := &GetResponse{}
// field binding section.
// (grpc.federation.field).by = "sel.user"
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[*User]{
Value: value,
Expr: `sel.user`,
CacheIndex: 9,
Setter: func(v *User) error {
ret.User = v
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
// (grpc.federation.field).by = "msg_sel.message"
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[string]{
Value: value,
Expr: `msg_sel.message`,
CacheIndex: 10,
Setter: func(v string) error {
ret.Msg = v
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
// (grpc.federation.field).by = "nested_msg"
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[*NestedMessageSelection_Nest]{
Value: value,
Expr: `nested_msg`,
CacheIndex: 11,
Setter: func(v *NestedMessageSelection_Nest) error {
ret.NestedMsg = v
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
// (grpc.federation.field).by = "cast_oneof"
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[*CastOneof]{
Value: value,
Expr: `cast_oneof`,
CacheIndex: 12,
Setter: func(v *CastOneof) error {
ret.CastOneof = v
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
grpcfed.Logger(ctx).DebugContext(ctx, "resolved org.federation.GetResponse", slog.Any("org.federation.GetResponse", s.logvalue_Org_Federation_GetResponse(ret)))
return ret, nil
}
// resolve_Org_Federation_MessageSelection resolve "org.federation.MessageSelection" message.
func (s *FederationService) resolve_Org_Federation_MessageSelection(ctx context.Context, req *FederationService_Org_Federation_MessageSelectionArgument) (*MessageSelection, error) {
ctx, span := s.tracer.Start(ctx, "org.federation.MessageSelection")
defer span.End()
ctx = grpcfed.WithLogger(ctx, grpcfed.Logger(ctx), grpcfed.LogAttrs(ctx)...)
grpcfed.Logger(ctx).DebugContext(ctx, "resolve org.federation.MessageSelection", slog.Any("message_args", s.logvalue_Org_Federation_MessageSelectionArgument(req)))
type localValueType struct {
*grpcfed.LocalValue
vars struct {
}
}
value := &localValueType{LocalValue: grpcfed.NewLocalValue(ctx, s.celEnvOpts, "grpc.federation.private.org.federation.MessageSelectionArgument", req)}
ctx = grpcfed.WithLocalValue(ctx, value.LocalValue)
// create a message value to be returned.
ret := &MessageSelection{}
// field binding section.
oneof_MsgA, err := grpcfed.EvalCEL(ctx, &grpcfed.EvalCELRequest{
Value: value,
Expr: `false`,
OutType: reflect.TypeOf(true),
CacheIndex: 13,
})
if err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
oneof_MsgB, err := grpcfed.EvalCEL(ctx, &grpcfed.EvalCELRequest{
Value: value,
Expr: `true`,
OutType: reflect.TypeOf(true),
CacheIndex: 14,
})
if err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
if false {
// For code generation reasons, we're using a loop to generate the oneof conditional branches,
// so to avoid treating the first element specially, we always generate if branch with false condition.
} else if oneof_MsgA.(bool) {
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[string]{
Value: value,
Expr: `'aaa'`,
CacheIndex: 15,
Setter: func(v string) error {
messageValue, err := s.cast_string__to__Org_Federation_MessageSelection_MsgA(v)
if err != nil {
return err
}
ret.Message = messageValue
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
} else if oneof_MsgB.(bool) {
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[string]{
Value: value,
Expr: `'bbb'`,
CacheIndex: 16,
Setter: func(v string) error {
messageValue, err := s.cast_string__to__Org_Federation_MessageSelection_MsgB(v)
if err != nil {
return err
}
ret.Message = messageValue
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
} else {
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[string]{
Value: value,
Expr: `'ccc'`,
CacheIndex: 17,
Setter: func(v string) error {
messageValue, err := s.cast_string__to__Org_Federation_MessageSelection_MsgC(v)
if err != nil {
return err
}
ret.Message = messageValue
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
}
grpcfed.Logger(ctx).DebugContext(ctx, "resolved org.federation.MessageSelection", slog.Any("org.federation.MessageSelection", s.logvalue_Org_Federation_MessageSelection(ret)))
return ret, nil
}
// resolve_Org_Federation_NestedMessageSelection_Nest resolve "org.federation.NestedMessageSelection.Nest" message.
func (s *FederationService) resolve_Org_Federation_NestedMessageSelection_Nest(ctx context.Context, req *FederationService_Org_Federation_NestedMessageSelection_NestArgument) (*NestedMessageSelection_Nest, error) {
ctx, span := s.tracer.Start(ctx, "org.federation.NestedMessageSelection.Nest")
defer span.End()
ctx = grpcfed.WithLogger(ctx, grpcfed.Logger(ctx), grpcfed.LogAttrs(ctx)...)
grpcfed.Logger(ctx).DebugContext(ctx, "resolve org.federation.NestedMessageSelection.Nest", slog.Any("message_args", s.logvalue_Org_Federation_NestedMessageSelection_NestArgument(req)))
type localValueType struct {
*grpcfed.LocalValue
vars struct {
}
}
value := &localValueType{LocalValue: grpcfed.NewLocalValue(ctx, s.celEnvOpts, "grpc.federation.private.org.federation.NestedMessageSelection_NestArgument", req)}
ctx = grpcfed.WithLocalValue(ctx, value.LocalValue)
// create a message value to be returned.
ret := &NestedMessageSelection_Nest{}
// field binding section.
oneof_Int, err := grpcfed.EvalCEL(ctx, &grpcfed.EvalCELRequest{
Value: value,
Expr: `true`,
OutType: reflect.TypeOf(true),
CacheIndex: 18,
})
if err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
oneof_Text, err := grpcfed.EvalCEL(ctx, &grpcfed.EvalCELRequest{
Value: value,
Expr: `false`,
OutType: reflect.TypeOf(true),
CacheIndex: 19,
})
if err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
if false {
// For code generation reasons, we're using a loop to generate the oneof conditional branches,
// so to avoid treating the first element specially, we always generate if branch with false condition.
} else if oneof_Int.(bool) {
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[int64]{
Value: value,
Expr: `1`,
CacheIndex: 20,
Setter: func(v int64) error {
valueValue, err := s.cast_int64__to__Org_Federation_NestedMessageSelection_Nest_Int(v)
if err != nil {
return err
}
ret.Value = valueValue
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
} else if oneof_Text.(bool) {
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[string]{
Value: value,
Expr: `'foo'`,
CacheIndex: 21,
Setter: func(v string) error {
valueValue, err := s.cast_string__to__Org_Federation_NestedMessageSelection_Nest_Text(v)
if err != nil {
return err
}
ret.Value = valueValue
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
}
grpcfed.Logger(ctx).DebugContext(ctx, "resolved org.federation.NestedMessageSelection.Nest", slog.Any("org.federation.NestedMessageSelection.Nest", s.logvalue_Org_Federation_NestedMessageSelection_Nest(ret)))
return ret, nil
}
// resolve_Org_Federation_NoValueSelection resolve "org.federation.NoValueSelection" message.
func (s *FederationService) resolve_Org_Federation_NoValueSelection(ctx context.Context, req *FederationService_Org_Federation_NoValueSelectionArgument) (*NoValueSelection, error) {
ctx, span := s.tracer.Start(ctx, "org.federation.NoValueSelection")
defer span.End()
ctx = grpcfed.WithLogger(ctx, grpcfed.Logger(ctx), grpcfed.LogAttrs(ctx)...)
grpcfed.Logger(ctx).DebugContext(ctx, "resolve org.federation.NoValueSelection", slog.Any("message_args", s.logvalue_Org_Federation_NoValueSelectionArgument(req)))
type localValueType struct {
*grpcfed.LocalValue
vars struct {
}
}
value := &localValueType{LocalValue: grpcfed.NewLocalValue(ctx, s.celEnvOpts, "grpc.federation.private.org.federation.NoValueSelectionArgument", req)}
ctx = grpcfed.WithLocalValue(ctx, value.LocalValue)
// create a message value to be returned.
ret := &NoValueSelection{}
// field binding section.
oneof_MA, err := grpcfed.EvalCEL(ctx, &grpcfed.EvalCELRequest{
Value: value,
Expr: `false`,
OutType: reflect.TypeOf(true),
CacheIndex: 22,
})
if err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
oneof_MB, err := grpcfed.EvalCEL(ctx, &grpcfed.EvalCELRequest{
Value: value,
Expr: `false`,
OutType: reflect.TypeOf(true),
CacheIndex: 23,
})
if err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
if false {
// For code generation reasons, we're using a loop to generate the oneof conditional branches,
// so to avoid treating the first element specially, we always generate if branch with false condition.
} else if oneof_MA.(bool) {
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[*M]{
Value: value,
Expr: `M{value: 'a'}`,
CacheIndex: 24,
Setter: func(v *M) error {
noValueValue, err := s.cast_Org_Federation_M__to__Org_Federation_NoValueSelection_MA(v)
if err != nil {
return err
}
ret.NoValue = noValueValue
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
} else if oneof_MB.(bool) {
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[*M]{
Value: value,
Expr: `M{value: 'b'}`,
CacheIndex: 25,
Setter: func(v *M) error {
noValueValue, err := s.cast_Org_Federation_M__to__Org_Federation_NoValueSelection_MB(v)
if err != nil {
return err
}
ret.NoValue = noValueValue
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
}
grpcfed.Logger(ctx).DebugContext(ctx, "resolved org.federation.NoValueSelection", slog.Any("org.federation.NoValueSelection", s.logvalue_Org_Federation_NoValueSelection(ret)))
return ret, nil
}
// resolve_Org_Federation_User resolve "org.federation.User" message.
func (s *FederationService) resolve_Org_Federation_User(ctx context.Context, req *FederationService_Org_Federation_UserArgument) (*User, error) {
ctx, span := s.tracer.Start(ctx, "org.federation.User")
defer span.End()
ctx = grpcfed.WithLogger(ctx, grpcfed.Logger(ctx), grpcfed.LogAttrs(ctx)...)
grpcfed.Logger(ctx).DebugContext(ctx, "resolve org.federation.User", slog.Any("message_args", s.logvalue_Org_Federation_UserArgument(req)))
type localValueType struct {
*grpcfed.LocalValue
vars struct {
XDef0 *user.GetUserResponse
}
}
value := &localValueType{LocalValue: grpcfed.NewLocalValue(ctx, s.celEnvOpts, "grpc.federation.private.org.federation.UserArgument", req)}
ctx = grpcfed.WithLocalValue(ctx, value.LocalValue)
/*
def {
name: "_def0"
call {
method: "user.UserService/GetUser"
request: [
{ field: "id", by: "$.user_id" },
{ field: "foo", by: "$.foo", if: "$.foo != 0" },
{ field: "bar", by: "$.bar", if: "$.bar != ''" }
]
}
}
*/
def__def0 := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[*user.GetUserResponse, *localValueType]{
Name: `_def0`,
Type: grpcfed.CELObjectType("user.GetUserResponse"),
Setter: func(value *localValueType, v *user.GetUserResponse) error {
value.vars.XDef0 = v
return nil
},
Message: func(ctx context.Context, value *localValueType) (any, error) {
args := &user.GetUserRequest{}
// { field: "id", by: "$.user_id" }
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[string]{
Value: value,
Expr: `$.user_id`,
CacheIndex: 26,
Setter: func(v string) error {
args.Id = v
return nil
},
}); err != nil {
return nil, err
}
// { field: "foo", by: "$.foo", if: "$.foo != 0" }
if err := grpcfed.If(ctx, &grpcfed.IfParam[*localValueType]{
Value: value,
Expr: `$.foo != 0`,
CacheIndex: 27,
Body: func(value *localValueType) error {
return grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[int64]{
Value: value,
Expr: `$.foo`,
CacheIndex: 28,
Setter: func(v int64) error {
args.Foobar = &user.GetUserRequest_Foo{
Foo: v,
}
return nil
},
})
},
}); err != nil {
return nil, err
}
// { field: "bar", by: "$.bar", if: "$.bar != ”" }
if err := grpcfed.If(ctx, &grpcfed.IfParam[*localValueType]{
Value: value,
Expr: `$.bar != ''`,
CacheIndex: 29,
Body: func(value *localValueType) error {
return grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[string]{
Value: value,
Expr: `$.bar`,
CacheIndex: 30,
Setter: func(v string) error {
args.Foobar = &user.GetUserRequest_Bar{
Bar: v,
}
return nil
},
})
},
}); err != nil {
return nil, err
}
grpcfed.Logger(ctx).DebugContext(ctx, "call user.UserService/GetUser", slog.Any("user.GetUserRequest", s.logvalue_User_GetUserRequest(args)))
ret, err := s.client.User_UserServiceClient.GetUser(ctx, args)
if err != nil {
if err := s.errorHandler(ctx, FederationService_DependentMethod_User_UserService_GetUser, err); err != nil {
return nil, grpcfed.NewErrorWithLogAttrs(err, slog.LevelError, grpcfed.LogAttrs(ctx))
}
}
return ret, nil
},
})
}
if err := def__def0(ctx); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
// create a message value to be returned.
ret := &User{}
// field binding section.
// (grpc.federation.field).by = "$.user_id"
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[string]{
Value: value,
Expr: `$.user_id`,
CacheIndex: 31,
Setter: func(v string) error {
ret.Id = v
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
grpcfed.Logger(ctx).DebugContext(ctx, "resolved org.federation.User", slog.Any("org.federation.User", s.logvalue_Org_Federation_User(ret)))
return ret, nil
}
// resolve_Org_Federation_UserSelection resolve "org.federation.UserSelection" message.
func (s *FederationService) resolve_Org_Federation_UserSelection(ctx context.Context, req *FederationService_Org_Federation_UserSelectionArgument) (*UserSelection, error) {
ctx, span := s.tracer.Start(ctx, "org.federation.UserSelection")
defer span.End()
ctx = grpcfed.WithLogger(ctx, grpcfed.Logger(ctx), grpcfed.LogAttrs(ctx)...)
grpcfed.Logger(ctx).DebugContext(ctx, "resolve org.federation.UserSelection", slog.Any("message_args", s.logvalue_Org_Federation_UserSelectionArgument(req)))
type localValueType struct {
*grpcfed.LocalValue
vars struct {
Ua *User
Ub *User
Uc *User
}
}
value := &localValueType{LocalValue: grpcfed.NewLocalValue(ctx, s.celEnvOpts, "grpc.federation.private.org.federation.UserSelectionArgument", req)}
ctx = grpcfed.WithLocalValue(ctx, value.LocalValue)
// assign named parameters to message arguments to pass to the custom resolver.
req.FederationService_Org_Federation_UserSelectionVariable.Ua = value.vars.Ua
req.FederationService_Org_Federation_UserSelectionVariable.Ub = value.vars.Ub
req.FederationService_Org_Federation_UserSelectionVariable.Uc = value.vars.Uc
// create a message value to be returned.
ret := &UserSelection{}
// field binding section.
oneof_UserA, err := grpcfed.EvalCEL(ctx, &grpcfed.EvalCELRequest{
Value: value,
Expr: `false`,
OutType: reflect.TypeOf(true),
CacheIndex: 32,
})
if err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
oneof_UserB, err := grpcfed.EvalCEL(ctx, &grpcfed.EvalCELRequest{
Value: value,
Expr: `true`,
OutType: reflect.TypeOf(true),
CacheIndex: 33,
})
if err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
if false {
// For code generation reasons, we're using a loop to generate the oneof conditional branches,
// so to avoid treating the first element specially, we always generate if branch with false condition.
} else if oneof_UserA.(bool) {
/*
def {
name: "ua"
message {
name: "User"
args: [
{ name: "user_id", by: "'a'" },
{ name: "foo", by: "0" },
{ name: "bar", by: "'hello'" }
]
}
}
*/
def_ua := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[*User, *localValueType]{
Name: `ua`,
Type: grpcfed.CELObjectType("org.federation.User"),
Setter: func(value *localValueType, v *User) error {
value.vars.Ua = v
return nil
},
Message: func(ctx context.Context, value *localValueType) (any, error) {
args := &FederationService_Org_Federation_UserArgument{}
// { name: "user_id", by: "'a'" }
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[string]{
Value: value,
Expr: `'a'`,
CacheIndex: 34,
Setter: func(v string) error {
args.UserId = v
return nil
},
}); err != nil {
return nil, err
}
// { name: "foo", by: "0" }
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[int64]{
Value: value,
Expr: `0`,
CacheIndex: 35,
Setter: func(v int64) error {
args.Foo = v
return nil
},
}); err != nil {
return nil, err
}
// { name: "bar", by: "'hello'" }
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[string]{
Value: value,
Expr: `'hello'`,
CacheIndex: 36,
Setter: func(v string) error {
args.Bar = v
return nil
},
}); err != nil {
return nil, err
}
ret, err := s.resolve_Org_Federation_User(ctx, args)
if err != nil {
return nil, err
}
return ret, nil
},
})
}
if err := def_ua(ctx); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[*User]{
Value: value,
Expr: `ua`,
CacheIndex: 37,
Setter: func(v *User) error {
userValue, err := s.cast_Org_Federation_User__to__Org_Federation_UserSelection_UserA(v)
if err != nil {
return err
}
ret.User = userValue
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
} else if oneof_UserB.(bool) {
/*
def {
name: "ub"
message {
name: "User"
args: [
{ name: "user_id", by: "'b'" },
{ name: "foo", by: "0" },
{ name: "bar", by: "'hello'" }
]
}
}
*/
def_ub := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[*User, *localValueType]{
Name: `ub`,
Type: grpcfed.CELObjectType("org.federation.User"),
Setter: func(value *localValueType, v *User) error {
value.vars.Ub = v
return nil
},
Message: func(ctx context.Context, value *localValueType) (any, error) {
args := &FederationService_Org_Federation_UserArgument{}
// { name: "user_id", by: "'b'" }
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[string]{
Value: value,
Expr: `'b'`,
CacheIndex: 38,
Setter: func(v string) error {
args.UserId = v
return nil
},
}); err != nil {
return nil, err
}
// { name: "foo", by: "0" }
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[int64]{
Value: value,
Expr: `0`,
CacheIndex: 39,
Setter: func(v int64) error {
args.Foo = v
return nil
},
}); err != nil {
return nil, err
}
// { name: "bar", by: "'hello'" }
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[string]{
Value: value,
Expr: `'hello'`,
CacheIndex: 40,
Setter: func(v string) error {
args.Bar = v
return nil
},
}); err != nil {
return nil, err
}
ret, err := s.resolve_Org_Federation_User(ctx, args)
if err != nil {
return nil, err
}
return ret, nil
},
})
}
if err := def_ub(ctx); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[*User]{
Value: value,
Expr: `ub`,
CacheIndex: 41,
Setter: func(v *User) error {
userValue, err := s.cast_Org_Federation_User__to__Org_Federation_UserSelection_UserB(v)
if err != nil {
return err
}
ret.User = userValue
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
} else {
/*
def {
name: "uc"
message {
name: "User"
args: [
{ name: "user_id", by: "$.value" },
{ name: "foo", by: "0" },
{ name: "bar", by: "'hello'" }
]
}
}
*/
def_uc := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[*User, *localValueType]{
Name: `uc`,
Type: grpcfed.CELObjectType("org.federation.User"),
Setter: func(value *localValueType, v *User) error {
value.vars.Uc = v
return nil
},
Message: func(ctx context.Context, value *localValueType) (any, error) {
args := &FederationService_Org_Federation_UserArgument{}
// { name: "user_id", by: "$.value" }
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[string]{
Value: value,
Expr: `$.value`,
CacheIndex: 42,
Setter: func(v string) error {
args.UserId = v
return nil
},
}); err != nil {
return nil, err
}
// { name: "foo", by: "0" }
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[int64]{
Value: value,
Expr: `0`,
CacheIndex: 43,
Setter: func(v int64) error {
args.Foo = v
return nil
},
}); err != nil {
return nil, err
}
// { name: "bar", by: "'hello'" }
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[string]{
Value: value,
Expr: `'hello'`,
CacheIndex: 44,
Setter: func(v string) error {
args.Bar = v
return nil
},
}); err != nil {
return nil, err
}
ret, err := s.resolve_Org_Federation_User(ctx, args)
if err != nil {
return nil, err
}
return ret, nil
},
})
}
if err := def_uc(ctx); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[*User]{
Value: value,
Expr: `uc`,
CacheIndex: 45,
Setter: func(v *User) error {
userValue, err := s.cast_Org_Federation_User__to__Org_Federation_UserSelection_UserC(v)
if err != nil {
return err
}
ret.User = userValue
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
}
grpcfed.Logger(ctx).DebugContext(ctx, "resolved org.federation.UserSelection", slog.Any("org.federation.UserSelection", s.logvalue_Org_Federation_UserSelection(ret)))
return ret, nil
}
// cast_Org_Federation_M__to__Org_Federation_NoValueSelection_MA cast from "org.federation.M" to "org.federation.NoValueSelection.m_a".
func (s *FederationService) cast_Org_Federation_M__to__Org_Federation_NoValueSelection_MA(from *M) (*NoValueSelection_MA, error) {
if from == nil {
return nil, nil
}
valueValue := from.GetValue()
ret := &M{
Value: valueValue,
}
return &NoValueSelection_MA{
MA: ret,
}, nil
}
// cast_Org_Federation_M__to__Org_Federation_NoValueSelection_MB cast from "org.federation.M" to "org.federation.NoValueSelection.m_b".
func (s *FederationService) cast_Org_Federation_M__to__Org_Federation_NoValueSelection_MB(from *M) (*NoValueSelection_MB, error) {
if from == nil {
return nil, nil
}
valueValue := from.GetValue()
ret := &M{
Value: valueValue,
}
return &NoValueSelection_MB{
MB: ret,
}, nil
}
// cast_Org_Federation_User__to__Org_Federation_UserSelection_UserA cast from "org.federation.User" to "org.federation.UserSelection.user_a".
func (s *FederationService) cast_Org_Federation_User__to__Org_Federation_UserSelection_UserA(from *User) (*UserSelection_UserA, error) {
if from == nil {
return nil, nil
}
idValue := from.GetId()
ret := &User{
Id: idValue,
}
return &UserSelection_UserA{
UserA: ret,
}, nil
}
// cast_Org_Federation_User__to__Org_Federation_UserSelection_UserB cast from "org.federation.User" to "org.federation.UserSelection.user_b".
func (s *FederationService) cast_Org_Federation_User__to__Org_Federation_UserSelection_UserB(from *User) (*UserSelection_UserB, error) {
if from == nil {
return nil, nil
}
idValue := from.GetId()
ret := &User{
Id: idValue,
}
return &UserSelection_UserB{
UserB: ret,
}, nil
}
// cast_Org_Federation_User__to__Org_Federation_UserSelection_UserC cast from "org.federation.User" to "org.federation.UserSelection.user_c".
func (s *FederationService) cast_Org_Federation_User__to__Org_Federation_UserSelection_UserC(from *User) (*UserSelection_UserC, error) {
if from == nil {
return nil, nil
}
idValue := from.GetId()
ret := &User{
Id: idValue,
}
return &UserSelection_UserC{
UserC: ret,
}, nil
}
// cast_User_UserType__to__Org_Federation_CastOneof_Type cast from "user.UserType" to "org.federation.CastOneof.type".
func (s *FederationService) cast_User_UserType__to__Org_Federation_CastOneof_Type(from user.UserType) (*CastOneof_Type, error) {
var ret UserType
switch from {
case user.UserType_USER_TYPE_UNSPECIFIED:
ret = UserType_USER_TYPE_UNSPECIFIED
case user.UserType_USER_TYPE_ANONYMOUS:
ret = UserType_USER_TYPE_ANONYMOUS
default:
ret = 0
}
return &CastOneof_Type{
Type: ret,
}, nil
}
// cast_User_User__to__Org_Federation_CastOneof_User cast from "user.User" to "org.federation.CastOneof.user".
func (s *FederationService) cast_User_User__to__Org_Federation_CastOneof_User(from *user.User) (*CastOneof_User, error) {
if from == nil {
return nil, nil
}
idValue := from.GetId()
ret := &User{
Id: idValue,
}
return &CastOneof_User{
User: ret,
}, nil
}
// cast_int64__to__Org_Federation_NestedMessageSelection_Nest_Int cast from "int64" to "org.federation.NestedMessageSelection.Nest.int".
func (s *FederationService) cast_int64__to__Org_Federation_NestedMessageSelection_Nest_Int(from int64) (*NestedMessageSelection_Nest_Int, error) {
return &NestedMessageSelection_Nest_Int{
Int: int64(from),
}, nil
}
// cast_string__to__Org_Federation_MessageSelection_MsgA cast from "string" to "org.federation.MessageSelection.msg_a".
func (s *FederationService) cast_string__to__Org_Federation_MessageSelection_MsgA(from string) (*MessageSelection_MsgA, error) {
return &MessageSelection_MsgA{
MsgA: string(from),
}, nil
}
// cast_string__to__Org_Federation_MessageSelection_MsgB cast from "string" to "org.federation.MessageSelection.msg_b".
func (s *FederationService) cast_string__to__Org_Federation_MessageSelection_MsgB(from string) (*MessageSelection_MsgB, error) {
return &MessageSelection_MsgB{
MsgB: string(from),
}, nil
}
// cast_string__to__Org_Federation_MessageSelection_MsgC cast from "string" to "org.federation.MessageSelection.msg_c".
func (s *FederationService) cast_string__to__Org_Federation_MessageSelection_MsgC(from string) (*MessageSelection_MsgC, error) {
return &MessageSelection_MsgC{
MsgC: string(from),
}, nil
}
// cast_string__to__Org_Federation_NestedMessageSelection_Nest_Text cast from "string" to "org.federation.NestedMessageSelection.Nest.text".
func (s *FederationService) cast_string__to__Org_Federation_NestedMessageSelection_Nest_Text(from string) (*NestedMessageSelection_Nest_Text, error) {
return &NestedMessageSelection_Nest_Text{
Text: string(from),
}, nil
}
// cast_uint64__to__Org_Federation_CastOneof_Num cast from "uint64" to "org.federation.CastOneof.num".
func (s *FederationService) cast_uint64__to__Org_Federation_CastOneof_Num(from uint64) (*CastOneof_Num, error) {
ret, err := grpcfed.Uint64ToInt64(from)
if err != nil {
return nil, err
}
return &CastOneof_Num{
Num: ret,
}, nil
}
func (s *FederationService) logvalue_Org_Federation_CastOneof(v *CastOneof) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.Int64("num", v.GetNum()),
slog.Any("user", s.logvalue_Org_Federation_User(v.GetUser())),
slog.String("type", s.logvalue_Org_Federation_UserType(v.GetType()).String()),
)
}
func (s *FederationService) logvalue_Org_Federation_CastOneofArgument(v *FederationService_Org_Federation_CastOneofArgument) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue()
}
func (s *FederationService) logvalue_Org_Federation_GetNoValueResponse(v *GetNoValueResponse) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.Any("no_value", s.logvalue_Org_Federation_M(v.GetNoValue())),
)
}
func (s *FederationService) logvalue_Org_Federation_GetNoValueResponseArgument(v *FederationService_Org_Federation_GetNoValueResponseArgument) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue()
}
func (s *FederationService) logvalue_Org_Federation_GetResponse(v *GetResponse) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.Any("user", s.logvalue_Org_Federation_User(v.GetUser())),
slog.String("msg", v.GetMsg()),
slog.Any("nested_msg", s.logvalue_Org_Federation_NestedMessageSelection_Nest(v.GetNestedMsg())),
slog.Any("cast_oneof", s.logvalue_Org_Federation_CastOneof(v.GetCastOneof())),
)
}
func (s *FederationService) logvalue_Org_Federation_GetResponseArgument(v *FederationService_Org_Federation_GetResponseArgument) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue()
}
func (s *FederationService) logvalue_Org_Federation_M(v *M) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.String("value", v.GetValue()),
)
}
func (s *FederationService) logvalue_Org_Federation_MessageSelection(v *MessageSelection) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.String("msg_a", v.GetMsgA()),
slog.String("msg_b", v.GetMsgB()),
slog.String("msg_c", v.GetMsgC()),
)
}
func (s *FederationService) logvalue_Org_Federation_MessageSelectionArgument(v *FederationService_Org_Federation_MessageSelectionArgument) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue()
}
func (s *FederationService) logvalue_Org_Federation_NestedMessageSelection_Nest(v *NestedMessageSelection_Nest) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.Int64("int", v.GetInt()),
slog.String("text", v.GetText()),
)
}
func (s *FederationService) logvalue_Org_Federation_NestedMessageSelection_NestArgument(v *FederationService_Org_Federation_NestedMessageSelection_NestArgument) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue()
}
func (s *FederationService) logvalue_Org_Federation_NoValueSelection(v *NoValueSelection) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.Any("m_a", s.logvalue_Org_Federation_M(v.GetMA())),
slog.Any("m_b", s.logvalue_Org_Federation_M(v.GetMB())),
)
}
func (s *FederationService) logvalue_Org_Federation_NoValueSelectionArgument(v *FederationService_Org_Federation_NoValueSelectionArgument) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue()
}
func (s *FederationService) logvalue_Org_Federation_User(v *User) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.String("id", v.GetId()),
)
}
func (s *FederationService) logvalue_Org_Federation_UserArgument(v *FederationService_Org_Federation_UserArgument) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.String("user_id", v.UserId),
slog.Int64("foo", v.Foo),
slog.String("bar", v.Bar),
)
}
func (s *FederationService) logvalue_Org_Federation_UserSelection(v *UserSelection) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.Any("user_a", s.logvalue_Org_Federation_User(v.GetUserA())),
slog.Any("user_b", s.logvalue_Org_Federation_User(v.GetUserB())),
slog.Any("user_c", s.logvalue_Org_Federation_User(v.GetUserC())),
)
}
func (s *FederationService) logvalue_Org_Federation_UserSelectionArgument(v *FederationService_Org_Federation_UserSelectionArgument) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.String("value", v.Value),
)
}
func (s *FederationService) logvalue_Org_Federation_UserType(v UserType) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
switch v {
case UserType_USER_TYPE_UNSPECIFIED:
return slog.StringValue("USER_TYPE_UNSPECIFIED")
case UserType_USER_TYPE_ANONYMOUS:
return slog.StringValue("USER_TYPE_ANONYMOUS")
}
return slog.StringValue("")
}
func (s *FederationService) logvalue_User_GetUserRequest(v *user.GetUserRequest) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.String("id", v.GetId()),
slog.Int64("foo", v.GetFoo()),
slog.String("bar", v.GetBar()),
)
}
================================================
FILE: _examples/10_oneof/go.mod
================================================
module example
go 1.24.0
replace github.com/mercari/grpc-federation => ../../
require (
github.com/google/go-cmp v0.7.0
github.com/mercari/grpc-federation v0.0.0-00010101000000-000000000000
go.opentelemetry.io/otel v1.24.0
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.21.0
go.opentelemetry.io/otel/sdk v1.24.0
go.opentelemetry.io/otel/trace v1.24.0
go.uber.org/goleak v1.3.0
google.golang.org/genproto/googleapis/rpc v0.0.0-20240826202546-f6391c0de4c7
google.golang.org/grpc v1.65.0
google.golang.org/protobuf v1.34.2
)
require (
cel.dev/expr v0.19.1 // indirect
github.com/antlr4-go/antlr/v4 v4.13.0 // indirect
github.com/cenkalti/backoff/v4 v4.2.1 // indirect
github.com/go-logr/logr v1.4.1 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
github.com/goccy/wasi-go v0.3.2 // indirect
github.com/google/cel-go v0.23.1 // indirect
github.com/google/uuid v1.6.0 // indirect
github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0 // indirect
github.com/kelseyhightower/envconfig v1.4.0 // indirect
github.com/stealthrocket/wazergo v0.19.1 // indirect
github.com/stoewer/go-strcase v1.3.0 // indirect
github.com/tetratelabs/wazero v1.10.1 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.21.0 // indirect
go.opentelemetry.io/otel/metric v1.24.0 // indirect
go.opentelemetry.io/proto/otlp v1.0.0 // indirect
golang.org/x/exp v0.0.0-20250506013437-ce4c2cf36ca6 // indirect
golang.org/x/net v0.38.0 // indirect
golang.org/x/sync v0.14.0 // indirect
golang.org/x/sys v0.37.0 // indirect
golang.org/x/text v0.23.0 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20240826202546-f6391c0de4c7 // indirect
)
================================================
FILE: _examples/10_oneof/go.sum
================================================
cel.dev/expr v0.19.1 h1:NciYrtDRIR0lNCnH1LFJegdjspNx9fI59O7TWcua/W4=
cel.dev/expr v0.19.1/go.mod h1:MrpN08Q+lEBs+bGYdLxxHkZoUSsCp0nSKTs0nTymJgw=
github.com/antlr4-go/antlr/v4 v4.13.0 h1:lxCg3LAv+EUK6t1i0y1V6/SLeUi0eKEKdhQAlS8TVTI=
github.com/antlr4-go/antlr/v4 v4.13.0/go.mod h1:pfChB/xh/Unjila75QW7+VU4TSnWnnk9UTnmpPaOR2g=
github.com/cenkalti/backoff/v4 v4.2.1 h1:y4OZtCnogmCPw98Zjyt5a6+QwPLGkiQsYW5oUqylYbM=
github.com/cenkalti/backoff/v4 v4.2.1/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A=
github.com/go-logr/logr v1.4.1 h1:pKouT5E8xu9zeFC39JXRDukb6JFQPXM5p5I91188VAQ=
github.com/go-logr/logr v1.4.1/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY=
github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag=
github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE=
github.com/goccy/wasi-go v0.3.2 h1:wAvGXmqCkfcp0B0AwIp5Ya53hzDwkKm9W8iuT3nCCz0=
github.com/goccy/wasi-go v0.3.2/go.mod h1:nIKD204n9xa4Z20UV+XA483kIr9TAl2vXr+X5qVAO5M=
github.com/golang/glog v1.2.1 h1:OptwRhECazUx5ix5TTWC3EZhsZEHWcYWY4FQHTIubm4=
github.com/golang/glog v1.2.1/go.mod h1:6AhwSGph0fcJtXVM/PEHPqZlFeoLxhs7/t5UDAwmO+w=
github.com/google/cel-go v0.23.1 h1:91ThhEZlBcE5rB2adBVXqvDoqdL8BG2oyhd0bK1I/r4=
github.com/google/cel-go v0.23.1/go.mod h1:52Pb6QsDbC5kvgxvZhiL9QX1oZEkcUF/ZqaPx1J5Wwo=
github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8=
github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU=
github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0 h1:YBftPWNWd4WwGqtY2yeZL2ef8rHAxPBD8KFhJpmcqms=
github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0/go.mod h1:YN5jB8ie0yfIUg6VvR9Kz84aCaG7AsGZnLjhHbUqwPg=
github.com/kelseyhightower/envconfig v1.4.0 h1:Im6hONhd3pLkfDFsbRgu68RDNkGF1r3dvMUtDTo2cv8=
github.com/kelseyhightower/envconfig v1.4.0/go.mod h1:cccZRl6mQpaq41TPp5QxidR+Sa3axMbJDNb//FQX6Gg=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/stealthrocket/wazergo v0.19.1 h1:BPrITETPgSFwiytwmToO0MbUC/+RGC39JScz1JmmG6c=
github.com/stealthrocket/wazergo v0.19.1/go.mod h1:riI0hxw4ndZA5e6z7PesHg2BtTftcZaMxRcoiGGipTs=
github.com/stoewer/go-strcase v1.3.0 h1:g0eASXYtp+yvN9fK8sH94oCIk0fau9uV1/ZdJ0AVEzs=
github.com/stoewer/go-strcase v1.3.0/go.mod h1:fAH5hQ5pehh+j3nZfvwdk2RgEgQjAoM8wodgtPmh1xo=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=
github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo=
github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk=
github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
github.com/tetratelabs/wazero v1.10.1 h1:2DugeJf6VVk58KTPszlNfeeN8AhhpwcZqkJj2wwFuH8=
github.com/tetratelabs/wazero v1.10.1/go.mod h1:DRm5twOQ5Gr1AoEdSi0CLjDQF1J9ZAuyqFIjl1KKfQU=
go.opentelemetry.io/otel v1.24.0 h1:0LAOdjNmQeSTzGBzduGe/rU4tZhMwL5rWgtp9Ku5Jfo=
go.opentelemetry.io/otel v1.24.0/go.mod h1:W7b9Ozg4nkF5tWI5zsXkaKKDjdVjpD4oAt9Qi/MArHo=
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.21.0 h1:cl5P5/GIfFh4t6xyruOgJP5QiA1pw4fYYdv6nc6CBWw=
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.21.0/go.mod h1:zgBdWWAu7oEEMC06MMKc5NLbA/1YDXV1sMpSqEeLQLg=
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.21.0 h1:tIqheXEFWAZ7O8A7m+J0aPTmpJN3YQ7qetUAdkkkKpk=
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.21.0/go.mod h1:nUeKExfxAQVbiVFn32YXpXZZHZ61Cc3s3Rn1pDBGAb0=
go.opentelemetry.io/otel/metric v1.24.0 h1:6EhoGWWK28x1fbpA4tYTOWBkPefTDQnb8WSGXlc88kI=
go.opentelemetry.io/otel/metric v1.24.0/go.mod h1:VYhLe1rFfxuTXLgj4CBiyz+9WYBA8pNGJgDcSFRKBco=
go.opentelemetry.io/otel/sdk v1.24.0 h1:YMPPDNymmQN3ZgczicBY3B6sf9n62Dlj9pWD3ucgoDw=
go.opentelemetry.io/otel/sdk v1.24.0/go.mod h1:KVrIYw6tEubO9E96HQpcmpTKDVn9gdv35HoYiQWGDFg=
go.opentelemetry.io/otel/trace v1.24.0 h1:CsKnnL4dUAr/0llH9FKuc698G04IrpWV0MQA/Y1YELI=
go.opentelemetry.io/otel/trace v1.24.0/go.mod h1:HPc3Xr/cOApsBI154IU0OI0HJexz+aw5uPdbs3UCjNU=
go.opentelemetry.io/proto/otlp v1.0.0 h1:T0TX0tmXU8a3CbNXzEKGeU5mIVOdf0oykP+u2lIVU/I=
go.opentelemetry.io/proto/otlp v1.0.0/go.mod h1:Sy6pihPLfYHkr3NkUbEhGHFhINUSI/v80hjKIs5JXpM=
go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto=
go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE=
golang.org/x/exp v0.0.0-20250506013437-ce4c2cf36ca6 h1:y5zboxd6LQAqYIhHnB48p0ByQ/GnQx2BE33L8BOHQkI=
golang.org/x/exp v0.0.0-20250506013437-ce4c2cf36ca6/go.mod h1:U6Lno4MTRCDY+Ba7aCcauB9T60gsv5s4ralQzP72ZoQ=
golang.org/x/net v0.38.0 h1:vRMAPTMaeGqVhG5QyLJHqNDwecKTomGeqbnfZyKlBI8=
golang.org/x/net v0.38.0/go.mod h1:ivrbrMbzFq5J41QOQh0siUuly180yBYtLp+CKbEaFx8=
golang.org/x/sync v0.14.0 h1:woo0S4Yywslg6hp4eUFjTVOyKt0RookbpAHG4c1HmhQ=
golang.org/x/sync v0.14.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA=
golang.org/x/sys v0.37.0 h1:fdNQudmxPjkdUTPnLn5mdQv7Zwvbvpaxqs831goi9kQ=
golang.org/x/sys v0.37.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks=
golang.org/x/text v0.23.0 h1:D71I7dUrlY+VX0gQShAThNGHFxZ13dGLBHQLVl1mJlY=
golang.org/x/text v0.23.0/go.mod h1:/BLNzu4aZCJ1+kcD0DNRotWKage4q2rGVAg4o22unh4=
google.golang.org/genproto/googleapis/api v0.0.0-20240826202546-f6391c0de4c7 h1:YcyjlL1PRr2Q17/I0dPk2JmYS5CDXfcdb2Z3YRioEbw=
google.golang.org/genproto/googleapis/api v0.0.0-20240826202546-f6391c0de4c7/go.mod h1:OCdP9MfskevB/rbYvHTsXTtKC+3bHWajPdoKgjcYkfo=
google.golang.org/genproto/googleapis/rpc v0.0.0-20240826202546-f6391c0de4c7 h1:2035KHhUv+EpyB+hWgJnaWKJOdX1E95w2S8Rr4uWKTs=
google.golang.org/genproto/googleapis/rpc v0.0.0-20240826202546-f6391c0de4c7/go.mod h1:UqMtugtsSgubUsoxbuAoiCXvqvErP7Gf0so0mK9tHxU=
google.golang.org/grpc v1.65.0 h1:bs/cUb4lp1G5iImFFd3u5ixQzweKizoZJAwBNLR42lc=
google.golang.org/grpc v1.65.0/go.mod h1:WgYC2ypjlB0EiQi6wdKixMqukr6lBc0Vo+oOgjrM5ZQ=
google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg=
google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
================================================
FILE: _examples/10_oneof/grpc/federation/federation.pb.go
================================================
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.33.0
// protoc (unknown)
// source: grpc/federation/federation.proto
package federation
import (
_ "github.com/mercari/grpc-federation/grpc/federation/cel"
code "google.golang.org/genproto/googleapis/rpc/code"
errdetails "google.golang.org/genproto/googleapis/rpc/errdetails"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
descriptorpb "google.golang.org/protobuf/types/descriptorpb"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
// TypeKind is primitive kind list.
type TypeKind int32
const (
// UNKNOWN represents unexpected value.
TypeKind_UNKNOWN TypeKind = 0
// STRING is used to convert the input value to `string` type.
TypeKind_STRING TypeKind = 1
// BOOL is used to convert the input value to `bool` type.
TypeKind_BOOL TypeKind = 2
// INT64 is used to convert the input value to `int64` type.
TypeKind_INT64 TypeKind = 3
// UINT64 is used to convert the input value to `uint64` type.
TypeKind_UINT64 TypeKind = 4
// DOUBLE is used to convert the input value to `double` type.
TypeKind_DOUBLE TypeKind = 5
// DURATION is used to convert the input value to the `google.protobuf.Duration` type.
TypeKind_DURATION TypeKind = 6
)
// Enum value maps for TypeKind.
var (
TypeKind_name = map[int32]string{
0: "UNKNOWN",
1: "STRING",
2: "BOOL",
3: "INT64",
4: "UINT64",
5: "DOUBLE",
6: "DURATION",
}
TypeKind_value = map[string]int32{
"UNKNOWN": 0,
"STRING": 1,
"BOOL": 2,
"INT64": 3,
"UINT64": 4,
"DOUBLE": 5,
"DURATION": 6,
}
)
func (x TypeKind) Enum() *TypeKind {
p := new(TypeKind)
*p = x
return p
}
func (x TypeKind) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (TypeKind) Descriptor() protoreflect.EnumDescriptor {
return file_grpc_federation_federation_proto_enumTypes[0].Descriptor()
}
func (TypeKind) Type() protoreflect.EnumType {
return &file_grpc_federation_federation_proto_enumTypes[0]
}
func (x TypeKind) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use TypeKind.Descriptor instead.
func (TypeKind) EnumDescriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{0}
}
// LogLevel is the importance or severity of a log event.
type GRPCError_LogLevel int32
const (
// UNKNOWN represents unexpected value.
GRPCError_UNKNOWN GRPCError_LogLevel = 0
// DEBUG is used for detailed information that is useful during development and debugging.
GRPCError_DEBUG GRPCError_LogLevel = 1
// INFO logs are used to provide information about the normal functioning of the application.
GRPCError_INFO GRPCError_LogLevel = 2
// WARN signifies a potential problem or warning that does not necessarily stop the program from working but may lead to issues in the future.
GRPCError_WARN GRPCError_LogLevel = 3
// ERROR indicates a serious issue that has caused a failure in the application.
GRPCError_ERROR GRPCError_LogLevel = 4
)
// Enum value maps for GRPCError_LogLevel.
var (
GRPCError_LogLevel_name = map[int32]string{
0: "UNKNOWN",
1: "DEBUG",
2: "INFO",
3: "WARN",
4: "ERROR",
}
GRPCError_LogLevel_value = map[string]int32{
"UNKNOWN": 0,
"DEBUG": 1,
"INFO": 2,
"WARN": 3,
"ERROR": 4,
}
)
func (x GRPCError_LogLevel) Enum() *GRPCError_LogLevel {
p := new(GRPCError_LogLevel)
*p = x
return p
}
func (x GRPCError_LogLevel) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (GRPCError_LogLevel) Descriptor() protoreflect.EnumDescriptor {
return file_grpc_federation_federation_proto_enumTypes[1].Descriptor()
}
func (GRPCError_LogLevel) Type() protoreflect.EnumType {
return &file_grpc_federation_federation_proto_enumTypes[1]
}
func (x GRPCError_LogLevel) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use GRPCError_LogLevel.Descriptor instead.
func (GRPCError_LogLevel) EnumDescriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{24, 0}
}
type FileRule struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Plugin *CELPlugin `protobuf:"bytes,1,opt,name=plugin,proto3" json:"plugin,omitempty"`
// import can be used to resolve methods, messages, etc. that are referenced in gRPC Federation rules.
Import []string `protobuf:"bytes,2,rep,name=import,proto3" json:"import,omitempty"`
}
func (x *FileRule) Reset() {
*x = FileRule{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *FileRule) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*FileRule) ProtoMessage() {}
func (x *FileRule) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use FileRule.ProtoReflect.Descriptor instead.
func (*FileRule) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{0}
}
func (x *FileRule) GetPlugin() *CELPlugin {
if x != nil {
return x.Plugin
}
return nil
}
func (x *FileRule) GetImport() []string {
if x != nil {
return x.Import
}
return nil
}
type EnumRule struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// alias mapping between enums defined in other packages and enums defined on the federation service side.
// The alias is the FQDN ( . ) to the enum.
// If this definition exists, type conversion is automatically performed before the enum value assignment operation.
// If a enum with this option has a value that is not present in the enum specified by alias, and the alias option is not specified for that value, an error is occurred.
// You can specify multiple aliases. In that case, only values common to all aliases will be considered.
// Specifying a value that is not included in either alias will result in an error.
Alias []string `protobuf:"bytes,1,rep,name=alias,proto3" json:"alias,omitempty"`
}
func (x *EnumRule) Reset() {
*x = EnumRule{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *EnumRule) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*EnumRule) ProtoMessage() {}
func (x *EnumRule) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use EnumRule.ProtoReflect.Descriptor instead.
func (*EnumRule) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{1}
}
func (x *EnumRule) GetAlias() []string {
if x != nil {
return x.Alias
}
return nil
}
type EnumValueRule struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// specifies the default value of the enum.
// All values other than those specified in alias will be default values.
Default *bool `protobuf:"varint,1,opt,name=default,proto3,oneof" json:"default,omitempty"`
// alias can be used when alias is specified in grpc.federation.enum option,
// and specifies the value name to be referenced among the enums specified in alias of enum option.
// multiple value names can be specified for alias.
Alias []string `protobuf:"bytes,2,rep,name=alias,proto3" json:"alias,omitempty"`
// attr is used to hold multiple name-value pairs corresponding to an enum value.
// The values specified by the name must be consistently specified for all enum values.
// The values stored using this feature can be retrieved using the `attr()` method of the enum API.
Attr []*EnumValueAttribute `protobuf:"bytes,3,rep,name=attr,proto3" json:"attr,omitempty"`
// noalias exclude from the target of alias.
// This option cannot be specified simultaneously with `default` or `alias`.
Noalias *bool `protobuf:"varint,4,opt,name=noalias,proto3,oneof" json:"noalias,omitempty"`
}
func (x *EnumValueRule) Reset() {
*x = EnumValueRule{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *EnumValueRule) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*EnumValueRule) ProtoMessage() {}
func (x *EnumValueRule) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use EnumValueRule.ProtoReflect.Descriptor instead.
func (*EnumValueRule) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{2}
}
func (x *EnumValueRule) GetDefault() bool {
if x != nil && x.Default != nil {
return *x.Default
}
return false
}
func (x *EnumValueRule) GetAlias() []string {
if x != nil {
return x.Alias
}
return nil
}
func (x *EnumValueRule) GetAttr() []*EnumValueAttribute {
if x != nil {
return x.Attr
}
return nil
}
func (x *EnumValueRule) GetNoalias() bool {
if x != nil && x.Noalias != nil {
return *x.Noalias
}
return false
}
type EnumValueAttribute struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// name is the attribute key.
// This value is used to search for values using the `attr()` method.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// value represents the value corresponding to `name`.
Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
}
func (x *EnumValueAttribute) Reset() {
*x = EnumValueAttribute{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *EnumValueAttribute) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*EnumValueAttribute) ProtoMessage() {}
func (x *EnumValueAttribute) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[3]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use EnumValueAttribute.ProtoReflect.Descriptor instead.
func (*EnumValueAttribute) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{3}
}
func (x *EnumValueAttribute) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *EnumValueAttribute) GetValue() string {
if x != nil {
return x.Value
}
return ""
}
type OneofRule struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
}
func (x *OneofRule) Reset() {
*x = OneofRule{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *OneofRule) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*OneofRule) ProtoMessage() {}
func (x *OneofRule) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[4]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use OneofRule.ProtoReflect.Descriptor instead.
func (*OneofRule) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{4}
}
// ServiceRule define gRPC Federation rules for the service.
type ServiceRule struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// env defines the environment variable.
Env *Env `protobuf:"bytes,1,opt,name=env,proto3" json:"env,omitempty"`
// var defines the service-level variables.
Var []*ServiceVariable `protobuf:"bytes,2,rep,name=var,proto3" json:"var,omitempty"`
}
func (x *ServiceRule) Reset() {
*x = ServiceRule{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[5]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ServiceRule) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ServiceRule) ProtoMessage() {}
func (x *ServiceRule) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[5]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ServiceRule.ProtoReflect.Descriptor instead.
func (*ServiceRule) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{5}
}
func (x *ServiceRule) GetEnv() *Env {
if x != nil {
return x.Env
}
return nil
}
func (x *ServiceRule) GetVar() []*ServiceVariable {
if x != nil {
return x.Var
}
return nil
}
// Env is used when setting environment variables.
// There are two ways to configure it.
type Env struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// var is used to directly list environment variables.
Var []*EnvVar `protobuf:"bytes,1,rep,name=var,proto3" json:"var,omitempty"`
// message is used to reference an already defined Protocol Buffers' message for defining environment variables.
// If you want to set detailed options for the fields of the message, use the `env` option in FieldRule.
Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
}
func (x *Env) Reset() {
*x = Env{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[6]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Env) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Env) ProtoMessage() {}
func (x *Env) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[6]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Env.ProtoReflect.Descriptor instead.
func (*Env) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{6}
}
func (x *Env) GetVar() []*EnvVar {
if x != nil {
return x.Var
}
return nil
}
func (x *Env) GetMessage() string {
if x != nil {
return x.Message
}
return ""
}
// ServiceVariable define variables at the service level.
// This definition is executed at server startup, after the initialization of Env.
// The defined variables can be used across all messages that the service depends on.
type ServiceVariable struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// name is a variable name.
// This name can be referenced in all CELs related to the service by using `grpc.federation.var.` prefix.
Name *string `protobuf:"bytes,1,opt,name=name,proto3,oneof" json:"name,omitempty"`
// if specify the condition for evaluating expr.
// this value evaluated by CEL and it must return a boolean value.
// If the result of evaluation is `false`, the value assigned to name is the default value of the result of evaluation of `expr`.
If *string `protobuf:"bytes,2,opt,name=if,proto3,oneof" json:"if,omitempty"`
// expr specify the value to be assigned to name.
//
// Types that are assignable to Expr:
//
// *ServiceVariable_By
// *ServiceVariable_Map
// *ServiceVariable_Message
// *ServiceVariable_Validation
// *ServiceVariable_Enum
// *ServiceVariable_Switch
Expr isServiceVariable_Expr `protobuf_oneof:"expr"`
}
func (x *ServiceVariable) Reset() {
*x = ServiceVariable{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[7]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ServiceVariable) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ServiceVariable) ProtoMessage() {}
func (x *ServiceVariable) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[7]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ServiceVariable.ProtoReflect.Descriptor instead.
func (*ServiceVariable) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{7}
}
func (x *ServiceVariable) GetName() string {
if x != nil && x.Name != nil {
return *x.Name
}
return ""
}
func (x *ServiceVariable) GetIf() string {
if x != nil && x.If != nil {
return *x.If
}
return ""
}
func (m *ServiceVariable) GetExpr() isServiceVariable_Expr {
if m != nil {
return m.Expr
}
return nil
}
func (x *ServiceVariable) GetBy() string {
if x, ok := x.GetExpr().(*ServiceVariable_By); ok {
return x.By
}
return ""
}
func (x *ServiceVariable) GetMap() *MapExpr {
if x, ok := x.GetExpr().(*ServiceVariable_Map); ok {
return x.Map
}
return nil
}
func (x *ServiceVariable) GetMessage() *MessageExpr {
if x, ok := x.GetExpr().(*ServiceVariable_Message); ok {
return x.Message
}
return nil
}
func (x *ServiceVariable) GetValidation() *ServiceVariableValidationExpr {
if x, ok := x.GetExpr().(*ServiceVariable_Validation); ok {
return x.Validation
}
return nil
}
func (x *ServiceVariable) GetEnum() *EnumExpr {
if x, ok := x.GetExpr().(*ServiceVariable_Enum); ok {
return x.Enum
}
return nil
}
func (x *ServiceVariable) GetSwitch() *SwitchExpr {
if x, ok := x.GetExpr().(*ServiceVariable_Switch); ok {
return x.Switch
}
return nil
}
type isServiceVariable_Expr interface {
isServiceVariable_Expr()
}
type ServiceVariable_By struct {
// `by` evaluates with CEL.
By string `protobuf:"bytes,11,opt,name=by,proto3,oneof"`
}
type ServiceVariable_Map struct {
// map apply map operation for the specified repeated type.
Map *MapExpr `protobuf:"bytes,12,opt,name=map,proto3,oneof"`
}
type ServiceVariable_Message struct {
// message gets with message arguments.
Message *MessageExpr `protobuf:"bytes,13,opt,name=message,proto3,oneof"`
}
type ServiceVariable_Validation struct {
// validation defines the validation rule and message.
Validation *ServiceVariableValidationExpr `protobuf:"bytes,14,opt,name=validation,proto3,oneof"`
}
type ServiceVariable_Enum struct {
// enum gets with cel value.
Enum *EnumExpr `protobuf:"bytes,15,opt,name=enum,proto3,oneof"`
}
type ServiceVariable_Switch struct {
// switch provides conditional evaluation with multiple branches.
Switch *SwitchExpr `protobuf:"bytes,16,opt,name=switch,proto3,oneof"`
}
func (*ServiceVariable_By) isServiceVariable_Expr() {}
func (*ServiceVariable_Map) isServiceVariable_Expr() {}
func (*ServiceVariable_Message) isServiceVariable_Expr() {}
func (*ServiceVariable_Validation) isServiceVariable_Expr() {}
func (*ServiceVariable_Enum) isServiceVariable_Expr() {}
func (*ServiceVariable_Switch) isServiceVariable_Expr() {}
// ServiceVariableValidationExpr represents validation rule and error message.
type ServiceVariableValidationExpr struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// if specifies condition in CEL. If the condition is true, it returns error.
// The return value must always be of type boolean.
If string `protobuf:"bytes,1,opt,name=if,proto3" json:"if,omitempty"`
// message is a error message in CEL.
Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
}
func (x *ServiceVariableValidationExpr) Reset() {
*x = ServiceVariableValidationExpr{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[8]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ServiceVariableValidationExpr) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ServiceVariableValidationExpr) ProtoMessage() {}
func (x *ServiceVariableValidationExpr) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[8]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ServiceVariableValidationExpr.ProtoReflect.Descriptor instead.
func (*ServiceVariableValidationExpr) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{8}
}
func (x *ServiceVariableValidationExpr) GetIf() string {
if x != nil {
return x.If
}
return ""
}
func (x *ServiceVariableValidationExpr) GetMessage() string {
if x != nil {
return x.Message
}
return ""
}
// EnvVar represents an environment variable.
type EnvVar struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// name is an environment variable name.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// type is an environment variable type.
Type *EnvType `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"`
// option is an additional option for parsing environment variable.
Option *EnvVarOption `protobuf:"bytes,3,opt,name=option,proto3,oneof" json:"option,omitempty"`
}
func (x *EnvVar) Reset() {
*x = EnvVar{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[9]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *EnvVar) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*EnvVar) ProtoMessage() {}
func (x *EnvVar) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[9]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use EnvVar.ProtoReflect.Descriptor instead.
func (*EnvVar) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{9}
}
func (x *EnvVar) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *EnvVar) GetType() *EnvType {
if x != nil {
return x.Type
}
return nil
}
func (x *EnvVar) GetOption() *EnvVarOption {
if x != nil {
return x.Option
}
return nil
}
// EnvType represents type information for environment variable.
type EnvType struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Types that are assignable to Type:
//
// *EnvType_Kind
// *EnvType_Repeated
// *EnvType_Map
Type isEnvType_Type `protobuf_oneof:"type"`
}
func (x *EnvType) Reset() {
*x = EnvType{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[10]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *EnvType) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*EnvType) ProtoMessage() {}
func (x *EnvType) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[10]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use EnvType.ProtoReflect.Descriptor instead.
func (*EnvType) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{10}
}
func (m *EnvType) GetType() isEnvType_Type {
if m != nil {
return m.Type
}
return nil
}
func (x *EnvType) GetKind() TypeKind {
if x, ok := x.GetType().(*EnvType_Kind); ok {
return x.Kind
}
return TypeKind_UNKNOWN
}
func (x *EnvType) GetRepeated() *EnvType {
if x, ok := x.GetType().(*EnvType_Repeated); ok {
return x.Repeated
}
return nil
}
func (x *EnvType) GetMap() *EnvMapType {
if x, ok := x.GetType().(*EnvType_Map); ok {
return x.Map
}
return nil
}
type isEnvType_Type interface {
isEnvType_Type()
}
type EnvType_Kind struct {
// kind is used when the type is a primitive type.
Kind TypeKind `protobuf:"varint,1,opt,name=kind,proto3,enum=grpc.federation.TypeKind,oneof"`
}
type EnvType_Repeated struct {
// repeated is used when the type is a repeated type.
Repeated *EnvType `protobuf:"bytes,2,opt,name=repeated,proto3,oneof"`
}
type EnvType_Map struct {
// map is used when the type is a map type.
Map *EnvMapType `protobuf:"bytes,3,opt,name=map,proto3,oneof"`
}
func (*EnvType_Kind) isEnvType_Type() {}
func (*EnvType_Repeated) isEnvType_Type() {}
func (*EnvType_Map) isEnvType_Type() {}
// EnvMapType represents map type.
type EnvMapType struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// key represents map's key type.
Key *EnvType `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
// value represents map's value type.
Value *EnvType `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
}
func (x *EnvMapType) Reset() {
*x = EnvMapType{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[11]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *EnvMapType) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*EnvMapType) ProtoMessage() {}
func (x *EnvMapType) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[11]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use EnvMapType.ProtoReflect.Descriptor instead.
func (*EnvMapType) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{11}
}
func (x *EnvMapType) GetKey() *EnvType {
if x != nil {
return x.Key
}
return nil
}
func (x *EnvMapType) GetValue() *EnvType {
if x != nil {
return x.Value
}
return nil
}
// EnvVarOption represents additional option for environment variable.
// The option work with the `envconfig` library in Go language.
// For detailed specifications, please refer to the library's documentation ( https://pkg.go.dev/github.com/kelseyhightower/envconfig#section-readme ).
type EnvVarOption struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// alternate use this option if you want to use an environment variable with a different name than the value specified in `EnvVar.name`.
Alternate *string `protobuf:"bytes,1,opt,name=alternate,proto3,oneof" json:"alternate,omitempty"`
// default specify the value to use as a fallback if the specified environment variable is not found.
Default *string `protobuf:"bytes,2,opt,name=default,proto3,oneof" json:"default,omitempty"`
// required require the environment variable to exist.
// If it does not exist, an error will occur at startup.
Required *bool `protobuf:"varint,3,opt,name=required,proto3,oneof" json:"required,omitempty"`
// ignored if ignored is true, it does nothing even if the environment variable exists.
Ignored *bool `protobuf:"varint,4,opt,name=ignored,proto3,oneof" json:"ignored,omitempty"`
}
func (x *EnvVarOption) Reset() {
*x = EnvVarOption{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[12]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *EnvVarOption) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*EnvVarOption) ProtoMessage() {}
func (x *EnvVarOption) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[12]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use EnvVarOption.ProtoReflect.Descriptor instead.
func (*EnvVarOption) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{12}
}
func (x *EnvVarOption) GetAlternate() string {
if x != nil && x.Alternate != nil {
return *x.Alternate
}
return ""
}
func (x *EnvVarOption) GetDefault() string {
if x != nil && x.Default != nil {
return *x.Default
}
return ""
}
func (x *EnvVarOption) GetRequired() bool {
if x != nil && x.Required != nil {
return *x.Required
}
return false
}
func (x *EnvVarOption) GetIgnored() bool {
if x != nil && x.Ignored != nil {
return *x.Ignored
}
return false
}
type MethodRule struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// the time to timeout. If the specified time period elapses, DEADLINE_EXCEEDED status is returned.
// If you want to handle this error, you need to implement a custom error handler in Go.
// The format is the same as Go's time.Duration format. See https://pkg.go.dev/time#ParseDuration.
Timeout *string `protobuf:"bytes,1,opt,name=timeout,proto3,oneof" json:"timeout,omitempty"`
// response specify the name of the message you want to use to create the response value.
// If you specify a reserved type like `google.protobuf.Empty` as the response, you cannot define gRPC Federation options.
// In such cases, you can specify a separate message to create the response value.
// The specified response message must contain fields with the same names and types as all the fields in the original response.
Response *string `protobuf:"bytes,2,opt,name=response,proto3,oneof" json:"response,omitempty"`
}
func (x *MethodRule) Reset() {
*x = MethodRule{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[13]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *MethodRule) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*MethodRule) ProtoMessage() {}
func (x *MethodRule) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[13]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use MethodRule.ProtoReflect.Descriptor instead.
func (*MethodRule) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{13}
}
func (x *MethodRule) GetTimeout() string {
if x != nil && x.Timeout != nil {
return *x.Timeout
}
return ""
}
func (x *MethodRule) GetResponse() string {
if x != nil && x.Response != nil {
return *x.Response
}
return ""
}
// MessageRule define gRPC Federation rules for the message.
type MessageRule struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// def specify variables to be used in field binding by `grpc.federation.field` option.
Def []*VariableDefinition `protobuf:"bytes,1,rep,name=def,proto3" json:"def,omitempty"`
// if custom_resolver is true, the resolver for this message is implemented by Go.
// If there are any values retrieved by resolver or messages, they are passed as arguments for custom resolver.
// Each field of the message returned by the custom resolver is automatically bound.
// If you want to change the binding process for a particular field, set `custom_resolver=true` option for that field.
CustomResolver *bool `protobuf:"varint,2,opt,name=custom_resolver,json=customResolver,proto3,oneof" json:"custom_resolver,omitempty"`
// alias mapping between messages defined in other packages and messages defined on the federation service side.
// The alias is the FQDN ( . ) to the message.
// If this definition exists, type conversion is automatically performed before the field assignment operation.
// If a message with this option has a field that is not present in the message specified by alias, and the alias option is not specified for that field, an error is occurred.
// You can specify multiple aliases. In that case, only fields common to all aliases will be considered.
// Specifying a field that is not included in either alias will result in an error.
Alias []string `protobuf:"bytes,3,rep,name=alias,proto3" json:"alias,omitempty"`
}
func (x *MessageRule) Reset() {
*x = MessageRule{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[14]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *MessageRule) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*MessageRule) ProtoMessage() {}
func (x *MessageRule) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[14]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use MessageRule.ProtoReflect.Descriptor instead.
func (*MessageRule) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{14}
}
func (x *MessageRule) GetDef() []*VariableDefinition {
if x != nil {
return x.Def
}
return nil
}
func (x *MessageRule) GetCustomResolver() bool {
if x != nil && x.CustomResolver != nil {
return *x.CustomResolver
}
return false
}
func (x *MessageRule) GetAlias() []string {
if x != nil {
return x.Alias
}
return nil
}
// VariableDefinition represents variable definition.
type VariableDefinition struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// name is a variable name.
// This name can be referenced in all CELs defined after itself in the same message.
// It can also be referenced in `grpc.federation.field` option.
Name *string `protobuf:"bytes,1,opt,name=name,proto3,oneof" json:"name,omitempty"`
// if specify the condition for evaluating expr.
// this value evaluated by CEL and it must return a boolean value.
// If the result of evaluation is `false`, the value assigned to name is the default value of the result of evaluation of `expr`.
If *string `protobuf:"bytes,2,opt,name=if,proto3,oneof" json:"if,omitempty"`
// autobind if the result value of `expr` is a message type,
// the value of a field with the same name and type as the field name of its own message is automatically assigned to the value of the field in the message.
// If multiple autobinds are used at the same message,
// you must explicitly use the `grpc.federation.field` option to do the binding yourself, since duplicate field names cannot be correctly determined as one.
Autobind *bool `protobuf:"varint,3,opt,name=autobind,proto3,oneof" json:"autobind,omitempty"`
// expr specify the value to be assigned to name.
//
// Types that are assignable to Expr:
//
// *VariableDefinition_By
// *VariableDefinition_Map
// *VariableDefinition_Message
// *VariableDefinition_Call
// *VariableDefinition_Validation
// *VariableDefinition_Enum
// *VariableDefinition_Switch
Expr isVariableDefinition_Expr `protobuf_oneof:"expr"`
}
func (x *VariableDefinition) Reset() {
*x = VariableDefinition{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[15]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *VariableDefinition) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*VariableDefinition) ProtoMessage() {}
func (x *VariableDefinition) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[15]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use VariableDefinition.ProtoReflect.Descriptor instead.
func (*VariableDefinition) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{15}
}
func (x *VariableDefinition) GetName() string {
if x != nil && x.Name != nil {
return *x.Name
}
return ""
}
func (x *VariableDefinition) GetIf() string {
if x != nil && x.If != nil {
return *x.If
}
return ""
}
func (x *VariableDefinition) GetAutobind() bool {
if x != nil && x.Autobind != nil {
return *x.Autobind
}
return false
}
func (m *VariableDefinition) GetExpr() isVariableDefinition_Expr {
if m != nil {
return m.Expr
}
return nil
}
func (x *VariableDefinition) GetBy() string {
if x, ok := x.GetExpr().(*VariableDefinition_By); ok {
return x.By
}
return ""
}
func (x *VariableDefinition) GetMap() *MapExpr {
if x, ok := x.GetExpr().(*VariableDefinition_Map); ok {
return x.Map
}
return nil
}
func (x *VariableDefinition) GetMessage() *MessageExpr {
if x, ok := x.GetExpr().(*VariableDefinition_Message); ok {
return x.Message
}
return nil
}
func (x *VariableDefinition) GetCall() *CallExpr {
if x, ok := x.GetExpr().(*VariableDefinition_Call); ok {
return x.Call
}
return nil
}
func (x *VariableDefinition) GetValidation() *ValidationExpr {
if x, ok := x.GetExpr().(*VariableDefinition_Validation); ok {
return x.Validation
}
return nil
}
func (x *VariableDefinition) GetEnum() *EnumExpr {
if x, ok := x.GetExpr().(*VariableDefinition_Enum); ok {
return x.Enum
}
return nil
}
func (x *VariableDefinition) GetSwitch() *SwitchExpr {
if x, ok := x.GetExpr().(*VariableDefinition_Switch); ok {
return x.Switch
}
return nil
}
type isVariableDefinition_Expr interface {
isVariableDefinition_Expr()
}
type VariableDefinition_By struct {
// `by` evaluates with CEL.
By string `protobuf:"bytes,11,opt,name=by,proto3,oneof"`
}
type VariableDefinition_Map struct {
// map apply map operation for the specified repeated type.
Map *MapExpr `protobuf:"bytes,12,opt,name=map,proto3,oneof"`
}
type VariableDefinition_Message struct {
// message gets with message arguments.
Message *MessageExpr `protobuf:"bytes,13,opt,name=message,proto3,oneof"`
}
type VariableDefinition_Call struct {
// call specifies how to call gRPC method.
Call *CallExpr `protobuf:"bytes,14,opt,name=call,proto3,oneof"`
}
type VariableDefinition_Validation struct {
// validation defines the validation rule and error.
Validation *ValidationExpr `protobuf:"bytes,15,opt,name=validation,proto3,oneof"`
}
type VariableDefinition_Enum struct {
// enum gets with cel value.
Enum *EnumExpr `protobuf:"bytes,16,opt,name=enum,proto3,oneof"`
}
type VariableDefinition_Switch struct {
// switch provides conditional evaluation with multiple branches.
Switch *SwitchExpr `protobuf:"bytes,17,opt,name=switch,proto3,oneof"`
}
func (*VariableDefinition_By) isVariableDefinition_Expr() {}
func (*VariableDefinition_Map) isVariableDefinition_Expr() {}
func (*VariableDefinition_Message) isVariableDefinition_Expr() {}
func (*VariableDefinition_Call) isVariableDefinition_Expr() {}
func (*VariableDefinition_Validation) isVariableDefinition_Expr() {}
func (*VariableDefinition_Enum) isVariableDefinition_Expr() {}
func (*VariableDefinition_Switch) isVariableDefinition_Expr() {}
// MapExpr apply map operation for the specified repeated type.
type MapExpr struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// iterator define iterator variable.
// When evaluating CEL in `expr`, we can refer to the name defined in iterator.
Iterator *Iterator `protobuf:"bytes,1,opt,name=iterator,proto3" json:"iterator,omitempty"`
// expr creates map elements using iterator variable.
//
// Types that are assignable to Expr:
//
// *MapExpr_By
// *MapExpr_Message
// *MapExpr_Enum
Expr isMapExpr_Expr `protobuf_oneof:"expr"`
}
func (x *MapExpr) Reset() {
*x = MapExpr{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[16]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *MapExpr) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*MapExpr) ProtoMessage() {}
func (x *MapExpr) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[16]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use MapExpr.ProtoReflect.Descriptor instead.
func (*MapExpr) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{16}
}
func (x *MapExpr) GetIterator() *Iterator {
if x != nil {
return x.Iterator
}
return nil
}
func (m *MapExpr) GetExpr() isMapExpr_Expr {
if m != nil {
return m.Expr
}
return nil
}
func (x *MapExpr) GetBy() string {
if x, ok := x.GetExpr().(*MapExpr_By); ok {
return x.By
}
return ""
}
func (x *MapExpr) GetMessage() *MessageExpr {
if x, ok := x.GetExpr().(*MapExpr_Message); ok {
return x.Message
}
return nil
}
func (x *MapExpr) GetEnum() *EnumExpr {
if x, ok := x.GetExpr().(*MapExpr_Enum); ok {
return x.Enum
}
return nil
}
type isMapExpr_Expr interface {
isMapExpr_Expr()
}
type MapExpr_By struct {
// `by` evaluates with CEL.
// this can refer to the variable declared by `iterator`.
By string `protobuf:"bytes,11,opt,name=by,proto3,oneof"`
}
type MapExpr_Message struct {
// message gets with message arguments, and it is made an element of the map.
// The result type of MapExpr is the repeated type of the specified message.
Message *MessageExpr `protobuf:"bytes,12,opt,name=message,proto3,oneof"`
}
type MapExpr_Enum struct {
// enum creates enum value for each element of the map.
// The result type of MapExpr is the repeated type of the specified enum.
Enum *EnumExpr `protobuf:"bytes,13,opt,name=enum,proto3,oneof"`
}
func (*MapExpr_By) isMapExpr_Expr() {}
func (*MapExpr_Message) isMapExpr_Expr() {}
func (*MapExpr_Enum) isMapExpr_Expr() {}
// Iterator represents iterator variable.
type Iterator struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// variable name.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// src the value that will be the source for creating the iterator.
// src must be a repeated type.
Src string `protobuf:"bytes,2,opt,name=src,proto3" json:"src,omitempty"`
}
func (x *Iterator) Reset() {
*x = Iterator{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[17]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Iterator) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Iterator) ProtoMessage() {}
func (x *Iterator) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[17]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Iterator.ProtoReflect.Descriptor instead.
func (*Iterator) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{17}
}
func (x *Iterator) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *Iterator) GetSrc() string {
if x != nil {
return x.Src
}
return ""
}
// MessageExpr represents dependent message.
type MessageExpr struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// name specify the message name by FQDN. format is `.`.
// can be omitted when referring to messages in the same package.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// args specify the parameters needed to get the message. This is called the "message arguments".
Args []*Argument `protobuf:"bytes,2,rep,name=args,proto3" json:"args,omitempty"`
}
func (x *MessageExpr) Reset() {
*x = MessageExpr{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[18]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *MessageExpr) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*MessageExpr) ProtoMessage() {}
func (x *MessageExpr) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[18]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use MessageExpr.ProtoReflect.Descriptor instead.
func (*MessageExpr) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{18}
}
func (x *MessageExpr) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *MessageExpr) GetArgs() []*Argument {
if x != nil {
return x.Args
}
return nil
}
// EnumExpr represents dependent enum.
type EnumExpr struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// name specify the enum name by FQDN. format is `.`.
// can be omitted when referring to enum in the same package.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// `by` evaluates with CEL.
By string `protobuf:"bytes,2,opt,name=by,proto3" json:"by,omitempty"`
}
func (x *EnumExpr) Reset() {
*x = EnumExpr{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[19]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *EnumExpr) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*EnumExpr) ProtoMessage() {}
func (x *EnumExpr) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[19]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use EnumExpr.ProtoReflect.Descriptor instead.
func (*EnumExpr) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{19}
}
func (x *EnumExpr) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *EnumExpr) GetBy() string {
if x != nil {
return x.By
}
return ""
}
// CallExpr represents how to call gRPC method.
type CallExpr struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// method specify the FQDN for the gRPC method. format is `./`.
Method string `protobuf:"bytes,1,opt,name=method,proto3" json:"method,omitempty"`
// request specify request parameters for the gRPC method.
Request []*MethodRequest `protobuf:"bytes,2,rep,name=request,proto3" json:"request,omitempty"`
// the time to timeout. If the specified time period elapses, DEADLINE_EXCEEDED status is returned.
// If you want to handle this error, you need to implement a custom error handler in Go.
// The format is the same as Go's time.Duration format. See https://pkg.go.dev/time#ParseDuration.
Timeout *string `protobuf:"bytes,3,opt,name=timeout,proto3,oneof" json:"timeout,omitempty"`
// retry specifies the retry policy if the method call fails.
Retry *RetryPolicy `protobuf:"bytes,4,opt,name=retry,proto3,oneof" json:"retry,omitempty"`
// error evaluated when an error occurs during a method call.
// Multiple errors can be defined and are evaluated in the order in which they are described.
// If an error occurs while creating an gRPC status error, original error will be returned.
Error []*GRPCError `protobuf:"bytes,5,rep,name=error,proto3" json:"error,omitempty"`
// option is the gRPC's call option (https://pkg.go.dev/google.golang.org/grpc#CallOption).
Option *GRPCCallOption `protobuf:"bytes,6,opt,name=option,proto3,oneof" json:"option,omitempty"`
// metadata specify outgoing metadata with CEL value.
// The specified type must always be of type map.
Metadata *string `protobuf:"bytes,7,opt,name=metadata,proto3,oneof" json:"metadata,omitempty"`
}
func (x *CallExpr) Reset() {
*x = CallExpr{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[20]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *CallExpr) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CallExpr) ProtoMessage() {}
func (x *CallExpr) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[20]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use CallExpr.ProtoReflect.Descriptor instead.
func (*CallExpr) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{20}
}
func (x *CallExpr) GetMethod() string {
if x != nil {
return x.Method
}
return ""
}
func (x *CallExpr) GetRequest() []*MethodRequest {
if x != nil {
return x.Request
}
return nil
}
func (x *CallExpr) GetTimeout() string {
if x != nil && x.Timeout != nil {
return *x.Timeout
}
return ""
}
func (x *CallExpr) GetRetry() *RetryPolicy {
if x != nil {
return x.Retry
}
return nil
}
func (x *CallExpr) GetError() []*GRPCError {
if x != nil {
return x.Error
}
return nil
}
func (x *CallExpr) GetOption() *GRPCCallOption {
if x != nil {
return x.Option
}
return nil
}
func (x *CallExpr) GetMetadata() string {
if x != nil && x.Metadata != nil {
return *x.Metadata
}
return ""
}
// SwitchExpr represents a switch statement. At least one "case", and "default", must be defined. All
// case.if expressions must evaluate to a boolean value. All case.by expressions, and default.by, must
// evaluate to the same type (the return type of the switch).
//
// When executed, the case.if expressions are evaluated in order, and, for the first case whose
// case.if expression evaluates to true, its case.by is evaluated to make the return value of the
// SwitchExpr.
// If no case.if evaluates to true, default.by is evaluated to make the return value.
type SwitchExpr struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Cases for the switch expression.
Case []*SwitchCaseExpr `protobuf:"bytes,1,rep,name=case,proto3" json:"case,omitempty"`
// The default case, if none of the "case.if" expressions evaluate to true.
Default *SwitchDefaultExpr `protobuf:"bytes,2,opt,name=default,proto3" json:"default,omitempty"`
}
func (x *SwitchExpr) Reset() {
*x = SwitchExpr{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[21]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *SwitchExpr) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*SwitchExpr) ProtoMessage() {}
func (x *SwitchExpr) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[21]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use SwitchExpr.ProtoReflect.Descriptor instead.
func (*SwitchExpr) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{21}
}
func (x *SwitchExpr) GetCase() []*SwitchCaseExpr {
if x != nil {
return x.Case
}
return nil
}
func (x *SwitchExpr) GetDefault() *SwitchDefaultExpr {
if x != nil {
return x.Default
}
return nil
}
// SwitchCaseExpr represents a single case for a switch expression.
type SwitchCaseExpr struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// if specify the condition for evaluating expr.
// this value evaluated by CEL and it must return a boolean value.
If string `protobuf:"bytes,1,opt,name=if,proto3" json:"if,omitempty"`
// def define variables in current scope.
Def []*VariableDefinition `protobuf:"bytes,2,rep,name=def,proto3" json:"def,omitempty"`
// expr specify the value to return for the case.
//
// Types that are assignable to Expr:
//
// *SwitchCaseExpr_By
Expr isSwitchCaseExpr_Expr `protobuf_oneof:"expr"`
}
func (x *SwitchCaseExpr) Reset() {
*x = SwitchCaseExpr{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[22]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *SwitchCaseExpr) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*SwitchCaseExpr) ProtoMessage() {}
func (x *SwitchCaseExpr) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[22]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use SwitchCaseExpr.ProtoReflect.Descriptor instead.
func (*SwitchCaseExpr) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{22}
}
func (x *SwitchCaseExpr) GetIf() string {
if x != nil {
return x.If
}
return ""
}
func (x *SwitchCaseExpr) GetDef() []*VariableDefinition {
if x != nil {
return x.Def
}
return nil
}
func (m *SwitchCaseExpr) GetExpr() isSwitchCaseExpr_Expr {
if m != nil {
return m.Expr
}
return nil
}
func (x *SwitchCaseExpr) GetBy() string {
if x, ok := x.GetExpr().(*SwitchCaseExpr_By); ok {
return x.By
}
return ""
}
type isSwitchCaseExpr_Expr interface {
isSwitchCaseExpr_Expr()
}
type SwitchCaseExpr_By struct {
// `by` evaluates with CEL.
By string `protobuf:"bytes,11,opt,name=by,proto3,oneof"`
}
func (*SwitchCaseExpr_By) isSwitchCaseExpr_Expr() {}
// SwitchDefaultExpr represents the default case for a switch expression.
type SwitchDefaultExpr struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// def define variables in current scope.
Def []*VariableDefinition `protobuf:"bytes,1,rep,name=def,proto3" json:"def,omitempty"`
// expr specify the value to return for the default case.
//
// Types that are assignable to Expr:
//
// *SwitchDefaultExpr_By
Expr isSwitchDefaultExpr_Expr `protobuf_oneof:"expr"`
}
func (x *SwitchDefaultExpr) Reset() {
*x = SwitchDefaultExpr{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[23]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *SwitchDefaultExpr) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*SwitchDefaultExpr) ProtoMessage() {}
func (x *SwitchDefaultExpr) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[23]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use SwitchDefaultExpr.ProtoReflect.Descriptor instead.
func (*SwitchDefaultExpr) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{23}
}
func (x *SwitchDefaultExpr) GetDef() []*VariableDefinition {
if x != nil {
return x.Def
}
return nil
}
func (m *SwitchDefaultExpr) GetExpr() isSwitchDefaultExpr_Expr {
if m != nil {
return m.Expr
}
return nil
}
func (x *SwitchDefaultExpr) GetBy() string {
if x, ok := x.GetExpr().(*SwitchDefaultExpr_By); ok {
return x.By
}
return ""
}
type isSwitchDefaultExpr_Expr interface {
isSwitchDefaultExpr_Expr()
}
type SwitchDefaultExpr_By struct {
// `by` evaluates with CEL.
By string `protobuf:"bytes,11,opt,name=by,proto3,oneof"`
}
func (*SwitchDefaultExpr_By) isSwitchDefaultExpr_Expr() {}
// GRPCError create gRPC status value.
type GRPCError struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// def define variables in current scope.
Def []*VariableDefinition `protobuf:"bytes,1,rep,name=def,proto3" json:"def,omitempty"`
// if specifies condition in CEL. If the condition is true, it returns defined error information.
// If this field is omitted, it is always treated as 'true' and returns defined error information.
// The return value must always be of type boolean.
If *string `protobuf:"bytes,2,opt,name=if,proto3,oneof" json:"if,omitempty"`
// code is a gRPC status code.
Code *code.Code `protobuf:"varint,3,opt,name=code,proto3,enum=google.rpc.Code,oneof" json:"code,omitempty"`
// message is a gRPC status message.
// If omitted, the message will be auto-generated from the configurations.
Message *string `protobuf:"bytes,4,opt,name=message,proto3,oneof" json:"message,omitempty"`
// details is a list of error details.
// If returns error, the corresponding error details are set.
Details []*GRPCErrorDetail `protobuf:"bytes,5,rep,name=details,proto3" json:"details,omitempty"`
// ignore ignore the error if the condition in the "if" field is true and "ignore" field is set to true.
// When an error is ignored, the returned response is always null value.
// If you want to return a response that is not null, please use `ignore_and_response` feature.
// Therefore, `ignore` and `ignore_and_response` cannot be specified same.
Ignore *bool `protobuf:"varint,6,opt,name=ignore,proto3,oneof" json:"ignore,omitempty"`
// ignore_and_response ignore the error if the condition in the "if" field is true and it returns response specified in CEL.
// The evaluation value of CEL must always be the same as the response message type.
// `ignore` and `ignore_and_response` cannot be specified same.
IgnoreAndResponse *string `protobuf:"bytes,7,opt,name=ignore_and_response,json=ignoreAndResponse,proto3,oneof" json:"ignore_and_response,omitempty"`
// log_level can be configured to output logs as any log level.
// If DEBUG is specified for the log_level, logs are output as debug logs.
// default value is ERROR.
LogLevel *GRPCError_LogLevel `protobuf:"varint,8,opt,name=log_level,json=logLevel,proto3,enum=grpc.federation.GRPCError_LogLevel,oneof" json:"log_level,omitempty"`
}
func (x *GRPCError) Reset() {
*x = GRPCError{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[24]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GRPCError) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GRPCError) ProtoMessage() {}
func (x *GRPCError) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[24]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GRPCError.ProtoReflect.Descriptor instead.
func (*GRPCError) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{24}
}
func (x *GRPCError) GetDef() []*VariableDefinition {
if x != nil {
return x.Def
}
return nil
}
func (x *GRPCError) GetIf() string {
if x != nil && x.If != nil {
return *x.If
}
return ""
}
func (x *GRPCError) GetCode() code.Code {
if x != nil && x.Code != nil {
return *x.Code
}
return code.Code(0)
}
func (x *GRPCError) GetMessage() string {
if x != nil && x.Message != nil {
return *x.Message
}
return ""
}
func (x *GRPCError) GetDetails() []*GRPCErrorDetail {
if x != nil {
return x.Details
}
return nil
}
func (x *GRPCError) GetIgnore() bool {
if x != nil && x.Ignore != nil {
return *x.Ignore
}
return false
}
func (x *GRPCError) GetIgnoreAndResponse() string {
if x != nil && x.IgnoreAndResponse != nil {
return *x.IgnoreAndResponse
}
return ""
}
func (x *GRPCError) GetLogLevel() GRPCError_LogLevel {
if x != nil && x.LogLevel != nil {
return *x.LogLevel
}
return GRPCError_UNKNOWN
}
type GRPCErrorDetail struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// if specifies condition rule in CEL. If the condition is true, gRPC error detail is added to the error.
If string `protobuf:"bytes,1,opt,name=if,proto3" json:"if,omitempty"`
// def define variables in current scope.
Def []*VariableDefinition `protobuf:"bytes,2,rep,name=def,proto3" json:"def,omitempty"`
// message represents arbitrary messages to describe the detail of the error.
Message []*MessageExpr `protobuf:"bytes,3,rep,name=message,proto3" json:"message,omitempty"`
// error_info describes the cause of the error with structured details.
ErrorInfo []*errdetails.ErrorInfo `protobuf:"bytes,4,rep,name=error_info,json=errorInfo,proto3" json:"error_info,omitempty"`
// retry_info describes when the clients can retry a failed request.
RetryInfo []*errdetails.RetryInfo `protobuf:"bytes,5,rep,name=retry_info,json=retryInfo,proto3" json:"retry_info,omitempty"`
// debug_info describes additional debugging info.
DebugInfo []*errdetails.DebugInfo `protobuf:"bytes,6,rep,name=debug_info,json=debugInfo,proto3" json:"debug_info,omitempty"`
// quota_failure describes how a quota check failed.
QuotaFailure []*errdetails.QuotaFailure `protobuf:"bytes,7,rep,name=quota_failure,json=quotaFailure,proto3" json:"quota_failure,omitempty"`
// precondition_failure describes what preconditions have failed.
PreconditionFailure []*errdetails.PreconditionFailure `protobuf:"bytes,8,rep,name=precondition_failure,json=preconditionFailure,proto3" json:"precondition_failure,omitempty"`
// bad_request describes violations in a client request.
BadRequest []*errdetails.BadRequest `protobuf:"bytes,9,rep,name=bad_request,json=badRequest,proto3" json:"bad_request,omitempty"`
// request_info contains metadata about the request that clients can attach.
RequestInfo []*errdetails.RequestInfo `protobuf:"bytes,10,rep,name=request_info,json=requestInfo,proto3" json:"request_info,omitempty"`
// resource_info describes the resource that is being accessed.
ResourceInfo []*errdetails.ResourceInfo `protobuf:"bytes,11,rep,name=resource_info,json=resourceInfo,proto3" json:"resource_info,omitempty"`
// help provides links to documentation or for performing an out of band action.
Help []*errdetails.Help `protobuf:"bytes,12,rep,name=help,proto3" json:"help,omitempty"`
// localized_message provides a localized error message that is safe to return to the user.
LocalizedMessage []*errdetails.LocalizedMessage `protobuf:"bytes,13,rep,name=localized_message,json=localizedMessage,proto3" json:"localized_message,omitempty"`
// by specify a message in CEL to express the details of the error.
By []string `protobuf:"bytes,14,rep,name=by,proto3" json:"by,omitempty"`
}
func (x *GRPCErrorDetail) Reset() {
*x = GRPCErrorDetail{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[25]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GRPCErrorDetail) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GRPCErrorDetail) ProtoMessage() {}
func (x *GRPCErrorDetail) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[25]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GRPCErrorDetail.ProtoReflect.Descriptor instead.
func (*GRPCErrorDetail) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{25}
}
func (x *GRPCErrorDetail) GetIf() string {
if x != nil {
return x.If
}
return ""
}
func (x *GRPCErrorDetail) GetDef() []*VariableDefinition {
if x != nil {
return x.Def
}
return nil
}
func (x *GRPCErrorDetail) GetMessage() []*MessageExpr {
if x != nil {
return x.Message
}
return nil
}
func (x *GRPCErrorDetail) GetErrorInfo() []*errdetails.ErrorInfo {
if x != nil {
return x.ErrorInfo
}
return nil
}
func (x *GRPCErrorDetail) GetRetryInfo() []*errdetails.RetryInfo {
if x != nil {
return x.RetryInfo
}
return nil
}
func (x *GRPCErrorDetail) GetDebugInfo() []*errdetails.DebugInfo {
if x != nil {
return x.DebugInfo
}
return nil
}
func (x *GRPCErrorDetail) GetQuotaFailure() []*errdetails.QuotaFailure {
if x != nil {
return x.QuotaFailure
}
return nil
}
func (x *GRPCErrorDetail) GetPreconditionFailure() []*errdetails.PreconditionFailure {
if x != nil {
return x.PreconditionFailure
}
return nil
}
func (x *GRPCErrorDetail) GetBadRequest() []*errdetails.BadRequest {
if x != nil {
return x.BadRequest
}
return nil
}
func (x *GRPCErrorDetail) GetRequestInfo() []*errdetails.RequestInfo {
if x != nil {
return x.RequestInfo
}
return nil
}
func (x *GRPCErrorDetail) GetResourceInfo() []*errdetails.ResourceInfo {
if x != nil {
return x.ResourceInfo
}
return nil
}
func (x *GRPCErrorDetail) GetHelp() []*errdetails.Help {
if x != nil {
return x.Help
}
return nil
}
func (x *GRPCErrorDetail) GetLocalizedMessage() []*errdetails.LocalizedMessage {
if x != nil {
return x.LocalizedMessage
}
return nil
}
func (x *GRPCErrorDetail) GetBy() []string {
if x != nil {
return x.By
}
return nil
}
// GRPCCallOption configures a gRPC Call before it starts or extracts information from a gRPC Call after it completes.
type GRPCCallOption struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// set the content-subtype. For example, if content-subtype is "json", the Content-Type over the wire will be "application/grpc+json".
// The content-subtype is converted to lowercase before being included in Content-Type.
// See Content-Type on https://github.com/grpc/grpc/blob/master/doc/PROTOCOL-HTTP2.md#requests for more details.
// If no such codec is found, the call will result in an error with code INTERNAL.
ContentSubtype *string `protobuf:"bytes,1,opt,name=content_subtype,json=contentSubtype,proto3,oneof" json:"content_subtype,omitempty"`
// header retrieves the header metadata for a unary RPC.
// In order to obtain the metadata, you must specify a variable of type map in the header.
// e.g.)
// def [
//
// { name: "hdr" by: "grpc.federation.metadata.new()" }
// { call { method: "pkg.Method" option { header: "hdr" } } }
//
// ]
Header *string `protobuf:"bytes,2,opt,name=header,proto3,oneof" json:"header,omitempty"`
// max_call_recv_msg_size sets the maximum message size in bytes the client can receive.
// If this is not set, gRPC uses the default 4MB.
MaxCallRecvMsgSize *int64 `protobuf:"varint,3,opt,name=max_call_recv_msg_size,json=maxCallRecvMsgSize,proto3,oneof" json:"max_call_recv_msg_size,omitempty"`
// max_call_send_msg_size sets the maximum message size in bytes the client can send.
// If this is not set, gRPC uses the default maximum number of int32 range.
MaxCallSendMsgSize *int64 `protobuf:"varint,4,opt,name=max_call_send_msg_size,json=maxCallSendMsgSize,proto3,oneof" json:"max_call_send_msg_size,omitempty"`
// static_method specifies that a call is being made to a method that is static,
// which means the method is known at compile time and doesn't change at runtime.
// This can be used as a signal to stats plugins that this method is safe to include as a key to a measurement.
StaticMethod *bool `protobuf:"varint,5,opt,name=static_method,json=staticMethod,proto3,oneof" json:"static_method,omitempty"`
// trailer retrieves the trailer metadata for a unary RPC.
// In order to obtain the metadata, you must specify a variable of type map in the trailer.
// e.g.)
// def [
//
// { name: "trl" by: "grpc.federation.metadata.new()" }
// { call { method: "pkg.Method" option { trailer: "trl" } } }
//
// ]
Trailer *string `protobuf:"bytes,6,opt,name=trailer,proto3,oneof" json:"trailer,omitempty"`
// wait_for_ready configures the RPC's behavior when the client is in TRANSIENT_FAILURE,
// which occurs when all addresses fail to connect.
// If wait_for_ready is false, the RPC will fail immediately.
// Otherwise, the client will wait until a connection becomes available or the RPC's deadline is reached.
// By default, RPCs do not "wait for ready".
WaitForReady *bool `protobuf:"varint,7,opt,name=wait_for_ready,json=waitForReady,proto3,oneof" json:"wait_for_ready,omitempty"`
}
func (x *GRPCCallOption) Reset() {
*x = GRPCCallOption{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[26]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GRPCCallOption) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GRPCCallOption) ProtoMessage() {}
func (x *GRPCCallOption) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[26]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GRPCCallOption.ProtoReflect.Descriptor instead.
func (*GRPCCallOption) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{26}
}
func (x *GRPCCallOption) GetContentSubtype() string {
if x != nil && x.ContentSubtype != nil {
return *x.ContentSubtype
}
return ""
}
func (x *GRPCCallOption) GetHeader() string {
if x != nil && x.Header != nil {
return *x.Header
}
return ""
}
func (x *GRPCCallOption) GetMaxCallRecvMsgSize() int64 {
if x != nil && x.MaxCallRecvMsgSize != nil {
return *x.MaxCallRecvMsgSize
}
return 0
}
func (x *GRPCCallOption) GetMaxCallSendMsgSize() int64 {
if x != nil && x.MaxCallSendMsgSize != nil {
return *x.MaxCallSendMsgSize
}
return 0
}
func (x *GRPCCallOption) GetStaticMethod() bool {
if x != nil && x.StaticMethod != nil {
return *x.StaticMethod
}
return false
}
func (x *GRPCCallOption) GetTrailer() string {
if x != nil && x.Trailer != nil {
return *x.Trailer
}
return ""
}
func (x *GRPCCallOption) GetWaitForReady() bool {
if x != nil && x.WaitForReady != nil {
return *x.WaitForReady
}
return false
}
// Validation represents a validation rule against variables defined within the current scope.
type ValidationExpr struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// name is a unique name for the validation.
// If set, the validation error type will be Error.
// If omitted, the validation error type will be ValidationError.
Name *string `protobuf:"bytes,1,opt,name=name,proto3,oneof" json:"name,omitempty"`
// error defines the actual validation rules and an error to returned if the validation fails.
Error *GRPCError `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"`
}
func (x *ValidationExpr) Reset() {
*x = ValidationExpr{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[27]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ValidationExpr) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ValidationExpr) ProtoMessage() {}
func (x *ValidationExpr) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[27]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ValidationExpr.ProtoReflect.Descriptor instead.
func (*ValidationExpr) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{27}
}
func (x *ValidationExpr) GetName() string {
if x != nil && x.Name != nil {
return *x.Name
}
return ""
}
func (x *ValidationExpr) GetError() *GRPCError {
if x != nil {
return x.Error
}
return nil
}
// RetryPolicy define the retry policy if the method call fails.
type RetryPolicy struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Types that are assignable to Policy:
//
// *RetryPolicy_Constant
// *RetryPolicy_Exponential
Policy isRetryPolicy_Policy `protobuf_oneof:"policy"`
// if specifies condition in CEL. If the condition is true, run the retry process according to the policy.
// If this field is omitted, it is always treated as 'true' and run the retry process.
// The return value must always be of type boolean.
If string `protobuf:"bytes,3,opt,name=if,proto3" json:"if,omitempty"`
}
func (x *RetryPolicy) Reset() {
*x = RetryPolicy{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[28]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *RetryPolicy) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*RetryPolicy) ProtoMessage() {}
func (x *RetryPolicy) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[28]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use RetryPolicy.ProtoReflect.Descriptor instead.
func (*RetryPolicy) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{28}
}
func (m *RetryPolicy) GetPolicy() isRetryPolicy_Policy {
if m != nil {
return m.Policy
}
return nil
}
func (x *RetryPolicy) GetConstant() *RetryPolicyConstant {
if x, ok := x.GetPolicy().(*RetryPolicy_Constant); ok {
return x.Constant
}
return nil
}
func (x *RetryPolicy) GetExponential() *RetryPolicyExponential {
if x, ok := x.GetPolicy().(*RetryPolicy_Exponential); ok {
return x.Exponential
}
return nil
}
func (x *RetryPolicy) GetIf() string {
if x != nil {
return x.If
}
return ""
}
type isRetryPolicy_Policy interface {
isRetryPolicy_Policy()
}
type RetryPolicy_Constant struct {
// retry according to the "constant" policy.
Constant *RetryPolicyConstant `protobuf:"bytes,1,opt,name=constant,proto3,oneof"`
}
type RetryPolicy_Exponential struct {
// retry according to the "exponential backoff" policy.
// The following Go library is used in the implementation,
// so please refer to the library documentation for how to specify each parameter.
// https://pkg.go.dev/github.com/cenkalti/backoff/v4#section-readme.
Exponential *RetryPolicyExponential `protobuf:"bytes,2,opt,name=exponential,proto3,oneof"`
}
func (*RetryPolicy_Constant) isRetryPolicy_Policy() {}
func (*RetryPolicy_Exponential) isRetryPolicy_Policy() {}
// RetryPolicyConstant define "constant" based retry policy.
type RetryPolicyConstant struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// interval value. ( default value is 1s ).
Interval *string `protobuf:"bytes,1,opt,name=interval,proto3,oneof" json:"interval,omitempty"`
// max retry count. ( default value is 5. If zero is specified, it never stops )
MaxRetries *uint64 `protobuf:"varint,2,opt,name=max_retries,json=maxRetries,proto3,oneof" json:"max_retries,omitempty"`
}
func (x *RetryPolicyConstant) Reset() {
*x = RetryPolicyConstant{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[29]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *RetryPolicyConstant) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*RetryPolicyConstant) ProtoMessage() {}
func (x *RetryPolicyConstant) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[29]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use RetryPolicyConstant.ProtoReflect.Descriptor instead.
func (*RetryPolicyConstant) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{29}
}
func (x *RetryPolicyConstant) GetInterval() string {
if x != nil && x.Interval != nil {
return *x.Interval
}
return ""
}
func (x *RetryPolicyConstant) GetMaxRetries() uint64 {
if x != nil && x.MaxRetries != nil {
return *x.MaxRetries
}
return 0
}
// RetryPolicyExponential define "exponential backoff" based retry policy.
type RetryPolicyExponential struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// initial interval value. ( default value is "500ms" ).
InitialInterval *string `protobuf:"bytes,1,opt,name=initial_interval,json=initialInterval,proto3,oneof" json:"initial_interval,omitempty"`
// randomization factor value. ( default value is 0.5 ).
RandomizationFactor *float64 `protobuf:"fixed64,2,opt,name=randomization_factor,json=randomizationFactor,proto3,oneof" json:"randomization_factor,omitempty"`
// multiplier. ( default value is 1.5 ).
Multiplier *float64 `protobuf:"fixed64,3,opt,name=multiplier,proto3,oneof" json:"multiplier,omitempty"`
// max interval value. ( default value is "60s" ).
MaxInterval *string `protobuf:"bytes,4,opt,name=max_interval,json=maxInterval,proto3,oneof" json:"max_interval,omitempty"`
// max retry count. ( default value is 5. If zero is specified, it never stops ).
MaxRetries *uint64 `protobuf:"varint,5,opt,name=max_retries,json=maxRetries,proto3,oneof" json:"max_retries,omitempty"`
}
func (x *RetryPolicyExponential) Reset() {
*x = RetryPolicyExponential{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[30]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *RetryPolicyExponential) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*RetryPolicyExponential) ProtoMessage() {}
func (x *RetryPolicyExponential) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[30]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use RetryPolicyExponential.ProtoReflect.Descriptor instead.
func (*RetryPolicyExponential) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{30}
}
func (x *RetryPolicyExponential) GetInitialInterval() string {
if x != nil && x.InitialInterval != nil {
return *x.InitialInterval
}
return ""
}
func (x *RetryPolicyExponential) GetRandomizationFactor() float64 {
if x != nil && x.RandomizationFactor != nil {
return *x.RandomizationFactor
}
return 0
}
func (x *RetryPolicyExponential) GetMultiplier() float64 {
if x != nil && x.Multiplier != nil {
return *x.Multiplier
}
return 0
}
func (x *RetryPolicyExponential) GetMaxInterval() string {
if x != nil && x.MaxInterval != nil {
return *x.MaxInterval
}
return ""
}
func (x *RetryPolicyExponential) GetMaxRetries() uint64 {
if x != nil && x.MaxRetries != nil {
return *x.MaxRetries
}
return 0
}
// MethodRequest define parameters to be used for gRPC method request.
type MethodRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// field name of the request message.
Field string `protobuf:"bytes,1,opt,name=field,proto3" json:"field,omitempty"`
// by used to refer to a name or message argument defined in a MessageRule, use `$.` to refer to the message argument.
// Use CEL (https://github.com/google/cel-spec) to evaluate the expression.
// Variables are already defined in MessageRule can be used.
By *string `protobuf:"bytes,2,opt,name=by,proto3,oneof" json:"by,omitempty"`
// if describes the condition to be assigned to field.
// The return value must be of type bool.
// Use CEL (https://github.com/google/cel-spec) to evaluate the expression.
// Variables are already defined in MessageRule can be used.
// If the field is a 'oneof' field, it must be specified.
If *string `protobuf:"bytes,3,opt,name=if,proto3,oneof" json:"if,omitempty"`
}
func (x *MethodRequest) Reset() {
*x = MethodRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[31]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *MethodRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*MethodRequest) ProtoMessage() {}
func (x *MethodRequest) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[31]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use MethodRequest.ProtoReflect.Descriptor instead.
func (*MethodRequest) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{31}
}
func (x *MethodRequest) GetField() string {
if x != nil {
return x.Field
}
return ""
}
func (x *MethodRequest) GetBy() string {
if x != nil && x.By != nil {
return *x.By
}
return ""
}
func (x *MethodRequest) GetIf() string {
if x != nil && x.If != nil {
return *x.If
}
return ""
}
// MethodResponse define which value of the method response is referenced.
type MethodResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// name specify the unique name that can be used in a `MessageRule` / `FieldRule` for the same message for a specific field in the response.
Name *string `protobuf:"bytes,1,opt,name=name,proto3,oneof" json:"name,omitempty"`
// field name in response message.
Field *string `protobuf:"bytes,2,opt,name=field,proto3,oneof" json:"field,omitempty"`
// autobind if the value referenced by `field` is a message type,
// the value of a field with the same name and type as the field name of its own message is automatically assigned to the value of the field in the message.
// If multiple autobinds are used at the same message,
// you must explicitly use the `grpc.federation.field` option to do the binding yourself, since duplicate field names cannot be correctly determined as one.
Autobind *bool `protobuf:"varint,3,opt,name=autobind,proto3,oneof" json:"autobind,omitempty"`
}
func (x *MethodResponse) Reset() {
*x = MethodResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[32]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *MethodResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*MethodResponse) ProtoMessage() {}
func (x *MethodResponse) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[32]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use MethodResponse.ProtoReflect.Descriptor instead.
func (*MethodResponse) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{32}
}
func (x *MethodResponse) GetName() string {
if x != nil && x.Name != nil {
return *x.Name
}
return ""
}
func (x *MethodResponse) GetField() string {
if x != nil && x.Field != nil {
return *x.Field
}
return ""
}
func (x *MethodResponse) GetAutobind() bool {
if x != nil && x.Autobind != nil {
return *x.Autobind
}
return false
}
// Argument define message argument.
type Argument struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// name of the message argument.
// Use this name to refer to the message argument.
// For example, if `foo` is specified as the name, it is referenced by `$.foo`.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// by used to refer to a name or message argument defined in a MessageRule, use `$.` to refer to the message argument.
// Use CEL (https://github.com/google/cel-spec) to evaluate the expression.
// Variables are already defined in MessageRule can be used.
By *string `protobuf:"bytes,2,opt,name=by,proto3,oneof" json:"by,omitempty"`
// inline like by, it refers to the specified value and expands all fields beyond it.
// For this reason, the referenced value must always be of message type.
Inline *string `protobuf:"bytes,3,opt,name=inline,proto3,oneof" json:"inline,omitempty"`
}
func (x *Argument) Reset() {
*x = Argument{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[33]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Argument) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Argument) ProtoMessage() {}
func (x *Argument) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[33]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Argument.ProtoReflect.Descriptor instead.
func (*Argument) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{33}
}
func (x *Argument) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *Argument) GetBy() string {
if x != nil && x.By != nil {
return *x.By
}
return ""
}
func (x *Argument) GetInline() string {
if x != nil && x.Inline != nil {
return *x.Inline
}
return ""
}
// FieldRule define gRPC Federation rules for the field of message.
type FieldRule struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// If custom_resolver is true, the field binding process is to be implemented in Go.
// If there are any values retrieved by grpc.federation.message option, they are passed as arguments for custom resolver.
CustomResolver *bool `protobuf:"varint,1,opt,name=custom_resolver,json=customResolver,proto3,oneof" json:"custom_resolver,omitempty"`
// by used to refer to a name or message argument defined in a MessageRule, use `$.` to refer to the message argument.
// Use CEL (https://github.com/google/cel-spec) to evaluate the expression.
// Variables are already defined in MessageRule can be used.
By *string `protobuf:"bytes,2,opt,name=by,proto3,oneof" json:"by,omitempty"`
// alias can be used when alias is specified in grpc.federation.message option,
// and specifies the field name to be referenced among the messages specified in alias of message option.
// If the specified field has the same type or can be converted automatically, its value is assigned.
Alias *string `protobuf:"bytes,3,opt,name=alias,proto3,oneof" json:"alias,omitempty"`
// use to evaluate any one of fields. this field only available in oneof.
Oneof *FieldOneof `protobuf:"bytes,4,opt,name=oneof,proto3" json:"oneof,omitempty"`
// when defining an environment variable, use it for fields where you want to set additional options.
Env *EnvVarOption `protobuf:"bytes,5,opt,name=env,proto3" json:"env,omitempty"`
}
func (x *FieldRule) Reset() {
*x = FieldRule{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[34]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *FieldRule) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*FieldRule) ProtoMessage() {}
func (x *FieldRule) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[34]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use FieldRule.ProtoReflect.Descriptor instead.
func (*FieldRule) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{34}
}
func (x *FieldRule) GetCustomResolver() bool {
if x != nil && x.CustomResolver != nil {
return *x.CustomResolver
}
return false
}
func (x *FieldRule) GetBy() string {
if x != nil && x.By != nil {
return *x.By
}
return ""
}
func (x *FieldRule) GetAlias() string {
if x != nil && x.Alias != nil {
return *x.Alias
}
return ""
}
func (x *FieldRule) GetOneof() *FieldOneof {
if x != nil {
return x.Oneof
}
return nil
}
func (x *FieldRule) GetEnv() *EnvVarOption {
if x != nil {
return x.Env
}
return nil
}
// FieldOneof evaluate "messages" or other field only if expr is true and assign to the oneof field.
// This feature only available in oneof.
type FieldOneof struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// cond specify either `expr` or `default`. Only one `default` can be set per oneof.
//
// Types that are assignable to Cond:
//
// *FieldOneof_If
// *FieldOneof_Default
Cond isFieldOneof_Cond `protobuf_oneof:"cond"`
// def specify variables to be used in current oneof field's scope for field binding.
Def []*VariableDefinition `protobuf:"bytes,3,rep,name=def,proto3" json:"def,omitempty"`
// by used to refer to a name or message argument defined in a MessageRule, use `$.` to refer to the message argument.
// Use CEL (https://github.com/google/cel-spec) to evaluate the expression.
// Variables are already defined in MessageRule and FieldOneOf can be used.
By string `protobuf:"bytes,4,opt,name=by,proto3" json:"by,omitempty"`
}
func (x *FieldOneof) Reset() {
*x = FieldOneof{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[35]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *FieldOneof) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*FieldOneof) ProtoMessage() {}
func (x *FieldOneof) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[35]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use FieldOneof.ProtoReflect.Descriptor instead.
func (*FieldOneof) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{35}
}
func (m *FieldOneof) GetCond() isFieldOneof_Cond {
if m != nil {
return m.Cond
}
return nil
}
func (x *FieldOneof) GetIf() string {
if x, ok := x.GetCond().(*FieldOneof_If); ok {
return x.If
}
return ""
}
func (x *FieldOneof) GetDefault() bool {
if x, ok := x.GetCond().(*FieldOneof_Default); ok {
return x.Default
}
return false
}
func (x *FieldOneof) GetDef() []*VariableDefinition {
if x != nil {
return x.Def
}
return nil
}
func (x *FieldOneof) GetBy() string {
if x != nil {
return x.By
}
return ""
}
type isFieldOneof_Cond interface {
isFieldOneof_Cond()
}
type FieldOneof_If struct {
// if describes the condition to be assigned to field.
// The return value must be of type bool.
// Use CEL (https://github.com/google/cel-spec) to evaluate the expression.
// Variables are already defined in MessageRule can be used.
If string `protobuf:"bytes,1,opt,name=if,proto3,oneof"`
}
type FieldOneof_Default struct {
// default used to assign a value when none of the other fields match any of the specified expressions.
// Only one value can be defined per oneof.
Default bool `protobuf:"varint,2,opt,name=default,proto3,oneof"`
}
func (*FieldOneof_If) isFieldOneof_Cond() {}
func (*FieldOneof_Default) isFieldOneof_Cond() {}
// CELPlugin define schema of CEL plugin.
type CELPlugin struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Export []*CELPluginExport `protobuf:"bytes,1,rep,name=export,proto3" json:"export,omitempty"`
}
func (x *CELPlugin) Reset() {
*x = CELPlugin{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[36]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *CELPlugin) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CELPlugin) ProtoMessage() {}
func (x *CELPlugin) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[36]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use CELPlugin.ProtoReflect.Descriptor instead.
func (*CELPlugin) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{36}
}
func (x *CELPlugin) GetExport() []*CELPluginExport {
if x != nil {
return x.Export
}
return nil
}
// CELPluginExport describe the schema to be exposed as a CEL plugin.
type CELPluginExport struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// name is the plugin name.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// desc is the description of plugin.
// This description is used as documentation at code generation.
Desc string `protobuf:"bytes,2,opt,name=desc,proto3" json:"desc,omitempty"`
// types describe the message type you want to expose.
Types []*CELReceiverType `protobuf:"bytes,3,rep,name=types,proto3" json:"types,omitempty"`
// functions describe the definition of the function you want to expose.
Functions []*CELFunction `protobuf:"bytes,4,rep,name=functions,proto3" json:"functions,omitempty"`
// variables describe the definition of the variable you want to expose.
Variables []*CELVariable `protobuf:"bytes,5,rep,name=variables,proto3" json:"variables,omitempty"`
Capability *CELPluginCapability `protobuf:"bytes,6,opt,name=capability,proto3" json:"capability,omitempty"`
}
func (x *CELPluginExport) Reset() {
*x = CELPluginExport{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[37]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *CELPluginExport) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CELPluginExport) ProtoMessage() {}
func (x *CELPluginExport) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[37]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use CELPluginExport.ProtoReflect.Descriptor instead.
func (*CELPluginExport) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{37}
}
func (x *CELPluginExport) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *CELPluginExport) GetDesc() string {
if x != nil {
return x.Desc
}
return ""
}
func (x *CELPluginExport) GetTypes() []*CELReceiverType {
if x != nil {
return x.Types
}
return nil
}
func (x *CELPluginExport) GetFunctions() []*CELFunction {
if x != nil {
return x.Functions
}
return nil
}
func (x *CELPluginExport) GetVariables() []*CELVariable {
if x != nil {
return x.Variables
}
return nil
}
func (x *CELPluginExport) GetCapability() *CELPluginCapability {
if x != nil {
return x.Capability
}
return nil
}
// CELPluginCapability controls the permissions granted to the WebAssembly plugin.
type CELPluginCapability struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// env is the capability for environment variable.
Env *CELPluginEnvCapability `protobuf:"bytes,1,opt,name=env,proto3,oneof" json:"env,omitempty"`
// file_system is the capability for file system.
FileSystem *CELPluginFileSystemCapability `protobuf:"bytes,2,opt,name=file_system,json=fileSystem,proto3,oneof" json:"file_system,omitempty"`
// network is the capability for network.
Network *CELPluginNetworkCapability `protobuf:"bytes,3,opt,name=network,proto3,oneof" json:"network,omitempty"`
}
func (x *CELPluginCapability) Reset() {
*x = CELPluginCapability{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[38]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *CELPluginCapability) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CELPluginCapability) ProtoMessage() {}
func (x *CELPluginCapability) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[38]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use CELPluginCapability.ProtoReflect.Descriptor instead.
func (*CELPluginCapability) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{38}
}
func (x *CELPluginCapability) GetEnv() *CELPluginEnvCapability {
if x != nil {
return x.Env
}
return nil
}
func (x *CELPluginCapability) GetFileSystem() *CELPluginFileSystemCapability {
if x != nil {
return x.FileSystem
}
return nil
}
func (x *CELPluginCapability) GetNetwork() *CELPluginNetworkCapability {
if x != nil {
return x.Network
}
return nil
}
// CELPluginEnvCapability controls access to the environment variable.
type CELPluginEnvCapability struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// all allows access to all environment variables.
All bool `protobuf:"varint,1,opt,name=all,proto3" json:"all,omitempty"`
// specifies accessible names. If "all" is true, it takes precedence.
Names []string `protobuf:"bytes,2,rep,name=names,proto3" json:"names,omitempty"`
}
func (x *CELPluginEnvCapability) Reset() {
*x = CELPluginEnvCapability{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[39]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *CELPluginEnvCapability) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CELPluginEnvCapability) ProtoMessage() {}
func (x *CELPluginEnvCapability) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[39]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use CELPluginEnvCapability.ProtoReflect.Descriptor instead.
func (*CELPluginEnvCapability) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{39}
}
func (x *CELPluginEnvCapability) GetAll() bool {
if x != nil {
return x.All
}
return false
}
func (x *CELPluginEnvCapability) GetNames() []string {
if x != nil {
return x.Names
}
return nil
}
// CELPluginFileSystemCapability controls access to the file system.
type CELPluginFileSystemCapability struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// mount_path specifies the file path of the host to mount.
// If not specified, the root directory will be used.
MountPath string `protobuf:"bytes,1,opt,name=mount_path,json=mountPath,proto3" json:"mount_path,omitempty"`
}
func (x *CELPluginFileSystemCapability) Reset() {
*x = CELPluginFileSystemCapability{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[40]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *CELPluginFileSystemCapability) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CELPluginFileSystemCapability) ProtoMessage() {}
func (x *CELPluginFileSystemCapability) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[40]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use CELPluginFileSystemCapability.ProtoReflect.Descriptor instead.
func (*CELPluginFileSystemCapability) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{40}
}
func (x *CELPluginFileSystemCapability) GetMountPath() string {
if x != nil {
return x.MountPath
}
return ""
}
// CELPluginNetworkCapability sets permissions related to network access.
// This is an experimental feature.
type CELPluginNetworkCapability struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
}
func (x *CELPluginNetworkCapability) Reset() {
*x = CELPluginNetworkCapability{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[41]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *CELPluginNetworkCapability) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CELPluginNetworkCapability) ProtoMessage() {}
func (x *CELPluginNetworkCapability) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[41]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use CELPluginNetworkCapability.ProtoReflect.Descriptor instead.
func (*CELPluginNetworkCapability) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{41}
}
// CELFunction represents the CEL function definition.
type CELFunction struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// name is the function name.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// desc is the description of function.
// This description is used as documentation at code generation.
Desc string `protobuf:"bytes,2,opt,name=desc,proto3" json:"desc,omitempty"`
// args describe the definition of the function argument.
Args []*CELFunctionArgument `protobuf:"bytes,3,rep,name=args,proto3" json:"args,omitempty"`
// return describe the definition of return type of function.
Return *CELType `protobuf:"bytes,4,opt,name=return,proto3" json:"return,omitempty"`
}
func (x *CELFunction) Reset() {
*x = CELFunction{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[42]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *CELFunction) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CELFunction) ProtoMessage() {}
func (x *CELFunction) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[42]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use CELFunction.ProtoReflect.Descriptor instead.
func (*CELFunction) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{42}
}
func (x *CELFunction) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *CELFunction) GetDesc() string {
if x != nil {
return x.Desc
}
return ""
}
func (x *CELFunction) GetArgs() []*CELFunctionArgument {
if x != nil {
return x.Args
}
return nil
}
func (x *CELFunction) GetReturn() *CELType {
if x != nil {
return x.Return
}
return nil
}
// CELReceiverType represents methods tied to the message.
type CELReceiverType struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// name is the message name.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// desc is the description of plugin.
// This description is used as documentation at code generation.
Desc string `protobuf:"bytes,2,opt,name=desc,proto3" json:"desc,omitempty"`
// methods describe the definition of the method for the message.
Methods []*CELFunction `protobuf:"bytes,3,rep,name=methods,proto3" json:"methods,omitempty"`
}
func (x *CELReceiverType) Reset() {
*x = CELReceiverType{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[43]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *CELReceiverType) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CELReceiverType) ProtoMessage() {}
func (x *CELReceiverType) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[43]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use CELReceiverType.ProtoReflect.Descriptor instead.
func (*CELReceiverType) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{43}
}
func (x *CELReceiverType) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *CELReceiverType) GetDesc() string {
if x != nil {
return x.Desc
}
return ""
}
func (x *CELReceiverType) GetMethods() []*CELFunction {
if x != nil {
return x.Methods
}
return nil
}
// CELFunctionArgument represents the function argument.
type CELFunctionArgument struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// name is the argument value name.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// desc is the description of plugin.
// This description is used as documentation at code generation.
Desc string `protobuf:"bytes,2,opt,name=desc,proto3" json:"desc,omitempty"`
// type is the argument type.
Type *CELType `protobuf:"bytes,3,opt,name=type,proto3" json:"type,omitempty"`
}
func (x *CELFunctionArgument) Reset() {
*x = CELFunctionArgument{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[44]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *CELFunctionArgument) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CELFunctionArgument) ProtoMessage() {}
func (x *CELFunctionArgument) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[44]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use CELFunctionArgument.ProtoReflect.Descriptor instead.
func (*CELFunctionArgument) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{44}
}
func (x *CELFunctionArgument) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *CELFunctionArgument) GetDesc() string {
if x != nil {
return x.Desc
}
return ""
}
func (x *CELFunctionArgument) GetType() *CELType {
if x != nil {
return x.Type
}
return nil
}
// CELType represents type information for CEL plugin interface.
type CELType struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Types that are assignable to Type:
//
// *CELType_Kind
// *CELType_Repeated
// *CELType_Map
// *CELType_Message
// *CELType_Enum
Type isCELType_Type `protobuf_oneof:"type"`
}
func (x *CELType) Reset() {
*x = CELType{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[45]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *CELType) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CELType) ProtoMessage() {}
func (x *CELType) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[45]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use CELType.ProtoReflect.Descriptor instead.
func (*CELType) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{45}
}
func (m *CELType) GetType() isCELType_Type {
if m != nil {
return m.Type
}
return nil
}
func (x *CELType) GetKind() TypeKind {
if x, ok := x.GetType().(*CELType_Kind); ok {
return x.Kind
}
return TypeKind_UNKNOWN
}
func (x *CELType) GetRepeated() *CELType {
if x, ok := x.GetType().(*CELType_Repeated); ok {
return x.Repeated
}
return nil
}
func (x *CELType) GetMap() *CELMapType {
if x, ok := x.GetType().(*CELType_Map); ok {
return x.Map
}
return nil
}
func (x *CELType) GetMessage() string {
if x, ok := x.GetType().(*CELType_Message); ok {
return x.Message
}
return ""
}
func (x *CELType) GetEnum() string {
if x, ok := x.GetType().(*CELType_Enum); ok {
return x.Enum
}
return ""
}
type isCELType_Type interface {
isCELType_Type()
}
type CELType_Kind struct {
// kind is used when the type is a primitive type.
Kind TypeKind `protobuf:"varint,1,opt,name=kind,proto3,enum=grpc.federation.TypeKind,oneof"`
}
type CELType_Repeated struct {
// repeated is used when the type is a repeated type.
Repeated *CELType `protobuf:"bytes,2,opt,name=repeated,proto3,oneof"`
}
type CELType_Map struct {
// map is used when the type is a map type.
Map *CELMapType `protobuf:"bytes,3,opt,name=map,proto3,oneof"`
}
type CELType_Message struct {
// message is a fqdn to the message type.
Message string `protobuf:"bytes,4,opt,name=message,proto3,oneof"`
}
type CELType_Enum struct {
// enum is a fqdn to the enum type.
Enum string `protobuf:"bytes,5,opt,name=enum,proto3,oneof"`
}
func (*CELType_Kind) isCELType_Type() {}
func (*CELType_Repeated) isCELType_Type() {}
func (*CELType_Map) isCELType_Type() {}
func (*CELType_Message) isCELType_Type() {}
func (*CELType_Enum) isCELType_Type() {}
// CELMapType represents map type.
type CELMapType struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// key represents map's key type.
Key *CELType `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
// value represents map's value type.
Value *CELType `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
}
func (x *CELMapType) Reset() {
*x = CELMapType{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[46]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *CELMapType) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CELMapType) ProtoMessage() {}
func (x *CELMapType) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[46]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use CELMapType.ProtoReflect.Descriptor instead.
func (*CELMapType) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{46}
}
func (x *CELMapType) GetKey() *CELType {
if x != nil {
return x.Key
}
return nil
}
func (x *CELMapType) GetValue() *CELType {
if x != nil {
return x.Value
}
return nil
}
// CELVariable represents CEL variable.
type CELVariable struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// name is the variable name.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// desc is the description of plugin.
// This description is used as documentation at code generation.
Desc string `protobuf:"bytes,2,opt,name=desc,proto3" json:"desc,omitempty"`
// type is the variable type.
Type *CELType `protobuf:"bytes,3,opt,name=type,proto3" json:"type,omitempty"`
}
func (x *CELVariable) Reset() {
*x = CELVariable{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[47]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *CELVariable) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CELVariable) ProtoMessage() {}
func (x *CELVariable) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[47]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use CELVariable.ProtoReflect.Descriptor instead.
func (*CELVariable) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{47}
}
func (x *CELVariable) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *CELVariable) GetDesc() string {
if x != nil {
return x.Desc
}
return ""
}
func (x *CELVariable) GetType() *CELType {
if x != nil {
return x.Type
}
return nil
}
var file_grpc_federation_federation_proto_extTypes = []protoimpl.ExtensionInfo{
{
ExtendedType: (*descriptorpb.FileOptions)(nil),
ExtensionType: (*FileRule)(nil),
Field: 1187,
Name: "grpc.federation.file",
Tag: "bytes,1187,opt,name=file",
Filename: "grpc/federation/federation.proto",
},
{
ExtendedType: (*descriptorpb.ServiceOptions)(nil),
ExtensionType: (*ServiceRule)(nil),
Field: 1187,
Name: "grpc.federation.service",
Tag: "bytes,1187,opt,name=service",
Filename: "grpc/federation/federation.proto",
},
{
ExtendedType: (*descriptorpb.MethodOptions)(nil),
ExtensionType: (*MethodRule)(nil),
Field: 1187,
Name: "grpc.federation.method",
Tag: "bytes,1187,opt,name=method",
Filename: "grpc/federation/federation.proto",
},
{
ExtendedType: (*descriptorpb.MessageOptions)(nil),
ExtensionType: (*MessageRule)(nil),
Field: 1187,
Name: "grpc.federation.message",
Tag: "bytes,1187,opt,name=message",
Filename: "grpc/federation/federation.proto",
},
{
ExtendedType: (*descriptorpb.FieldOptions)(nil),
ExtensionType: (*FieldRule)(nil),
Field: 1187,
Name: "grpc.federation.field",
Tag: "bytes,1187,opt,name=field",
Filename: "grpc/federation/federation.proto",
},
{
ExtendedType: (*descriptorpb.EnumOptions)(nil),
ExtensionType: (*EnumRule)(nil),
Field: 1187,
Name: "grpc.federation.enum",
Tag: "bytes,1187,opt,name=enum",
Filename: "grpc/federation/federation.proto",
},
{
ExtendedType: (*descriptorpb.EnumValueOptions)(nil),
ExtensionType: (*EnumValueRule)(nil),
Field: 1187,
Name: "grpc.federation.enum_value",
Tag: "bytes,1187,opt,name=enum_value",
Filename: "grpc/federation/federation.proto",
},
{
ExtendedType: (*descriptorpb.OneofOptions)(nil),
ExtensionType: (*OneofRule)(nil),
Field: 1187,
Name: "grpc.federation.oneof",
Tag: "bytes,1187,opt,name=oneof",
Filename: "grpc/federation/federation.proto",
},
}
// Extension fields to descriptorpb.FileOptions.
var (
// optional grpc.federation.FileRule file = 1187;
E_File = &file_grpc_federation_federation_proto_extTypes[0]
)
// Extension fields to descriptorpb.ServiceOptions.
var (
// optional grpc.federation.ServiceRule service = 1187;
E_Service = &file_grpc_federation_federation_proto_extTypes[1]
)
// Extension fields to descriptorpb.MethodOptions.
var (
// optional grpc.federation.MethodRule method = 1187;
E_Method = &file_grpc_federation_federation_proto_extTypes[2]
)
// Extension fields to descriptorpb.MessageOptions.
var (
// optional grpc.federation.MessageRule message = 1187;
E_Message = &file_grpc_federation_federation_proto_extTypes[3]
)
// Extension fields to descriptorpb.FieldOptions.
var (
// optional grpc.federation.FieldRule field = 1187;
E_Field = &file_grpc_federation_federation_proto_extTypes[4]
)
// Extension fields to descriptorpb.EnumOptions.
var (
// optional grpc.federation.EnumRule enum = 1187;
E_Enum = &file_grpc_federation_federation_proto_extTypes[5]
)
// Extension fields to descriptorpb.EnumValueOptions.
var (
// optional grpc.federation.EnumValueRule enum_value = 1187;
E_EnumValue = &file_grpc_federation_federation_proto_extTypes[6]
)
// Extension fields to descriptorpb.OneofOptions.
var (
// optional grpc.federation.OneofRule oneof = 1187;
E_Oneof = &file_grpc_federation_federation_proto_extTypes[7]
)
var File_grpc_federation_federation_proto protoreflect.FileDescriptor
var file_grpc_federation_federation_proto_rawDesc = []byte{
0x0a, 0x20, 0x67, 0x72, 0x70, 0x63, 0x2f, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f,
0x6e, 0x2f, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f,
0x74, 0x6f, 0x12, 0x0f, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74,
0x69, 0x6f, 0x6e, 0x1a, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x2e,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x15, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x72, 0x70,
0x63, 0x2f, 0x63, 0x6f, 0x64, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f,
0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x72, 0x70, 0x63, 0x2f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x64,
0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x67, 0x72,
0x70, 0x63, 0x2f, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x70, 0x72,
0x69, 0x76, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1a, 0x67, 0x72, 0x70,
0x63, 0x2f, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x74, 0x69, 0x6d,
0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x56, 0x0a, 0x08, 0x46, 0x69, 0x6c, 0x65, 0x52,
0x75, 0x6c, 0x65, 0x12, 0x32, 0x0a, 0x06, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x18, 0x01, 0x20,
0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72,
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x43, 0x45, 0x4c, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x52,
0x06, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x69, 0x6d, 0x70, 0x6f, 0x72,
0x74, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x69, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x22,
0x20, 0x0a, 0x08, 0x45, 0x6e, 0x75, 0x6d, 0x52, 0x75, 0x6c, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x61,
0x6c, 0x69, 0x61, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x61, 0x6c, 0x69, 0x61,
0x73, 0x22, 0xb4, 0x01, 0x0a, 0x0d, 0x45, 0x6e, 0x75, 0x6d, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52,
0x75, 0x6c, 0x65, 0x12, 0x1d, 0x0a, 0x07, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x18, 0x01,
0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x07, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x88,
0x01, 0x01, 0x12, 0x14, 0x0a, 0x05, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28,
0x09, 0x52, 0x05, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x12, 0x37, 0x0a, 0x04, 0x61, 0x74, 0x74, 0x72,
0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65,
0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x56, 0x61, 0x6c,
0x75, 0x65, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x52, 0x04, 0x61, 0x74, 0x74,
0x72, 0x12, 0x1d, 0x0a, 0x07, 0x6e, 0x6f, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x18, 0x04, 0x20, 0x01,
0x28, 0x08, 0x48, 0x01, 0x52, 0x07, 0x6e, 0x6f, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x88, 0x01, 0x01,
0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x42, 0x0a, 0x0a, 0x08,
0x5f, 0x6e, 0x6f, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x22, 0x3e, 0x0a, 0x12, 0x45, 0x6e, 0x75, 0x6d,
0x56, 0x61, 0x6c, 0x75, 0x65, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 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, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28,
0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x0b, 0x0a, 0x09, 0x4f, 0x6e, 0x65, 0x6f,
0x66, 0x52, 0x75, 0x6c, 0x65, 0x22, 0x69, 0x0a, 0x0b, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65,
0x52, 0x75, 0x6c, 0x65, 0x12, 0x26, 0x0a, 0x03, 0x65, 0x6e, 0x76, 0x18, 0x01, 0x20, 0x01, 0x28,
0x0b, 0x32, 0x14, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74,
0x69, 0x6f, 0x6e, 0x2e, 0x45, 0x6e, 0x76, 0x52, 0x03, 0x65, 0x6e, 0x76, 0x12, 0x32, 0x0a, 0x03,
0x76, 0x61, 0x72, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x67, 0x72, 0x70, 0x63,
0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x53, 0x65, 0x72, 0x76,
0x69, 0x63, 0x65, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x03, 0x76, 0x61, 0x72,
0x22, 0x4a, 0x0a, 0x03, 0x45, 0x6e, 0x76, 0x12, 0x29, 0x0a, 0x03, 0x76, 0x61, 0x72, 0x18, 0x01,
0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65,
0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x45, 0x6e, 0x76, 0x56, 0x61, 0x72, 0x52, 0x03, 0x76,
0x61, 0x72, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20,
0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x8b, 0x03, 0x0a,
0x0f, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65,
0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01,
0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x13, 0x0a, 0x02, 0x69, 0x66, 0x18,
0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x02, 0x52, 0x02, 0x69, 0x66, 0x88, 0x01, 0x01, 0x12, 0x10,
0x0a, 0x02, 0x62, 0x79, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x02, 0x62, 0x79,
0x12, 0x2c, 0x0a, 0x03, 0x6d, 0x61, 0x70, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e,
0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e,
0x4d, 0x61, 0x70, 0x45, 0x78, 0x70, 0x72, 0x48, 0x00, 0x52, 0x03, 0x6d, 0x61, 0x70, 0x12, 0x38,
0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32,
0x1c, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f,
0x6e, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x45, 0x78, 0x70, 0x72, 0x48, 0x00, 0x52,
0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x50, 0x0a, 0x0a, 0x76, 0x61, 0x6c, 0x69,
0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x67,
0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x53,
0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x56, 0x61,
0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x78, 0x70, 0x72, 0x48, 0x00, 0x52, 0x0a,
0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2f, 0x0a, 0x04, 0x65, 0x6e,
0x75, 0x6d, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e,
0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x45,
0x78, 0x70, 0x72, 0x48, 0x00, 0x52, 0x04, 0x65, 0x6e, 0x75, 0x6d, 0x12, 0x35, 0x0a, 0x06, 0x73,
0x77, 0x69, 0x74, 0x63, 0x68, 0x18, 0x10, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x72,
0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x53, 0x77,
0x69, 0x74, 0x63, 0x68, 0x45, 0x78, 0x70, 0x72, 0x48, 0x00, 0x52, 0x06, 0x73, 0x77, 0x69, 0x74,
0x63, 0x68, 0x42, 0x06, 0x0a, 0x04, 0x65, 0x78, 0x70, 0x72, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e,
0x61, 0x6d, 0x65, 0x42, 0x05, 0x0a, 0x03, 0x5f, 0x69, 0x66, 0x22, 0x49, 0x0a, 0x1d, 0x53, 0x65,
0x72, 0x76, 0x69, 0x63, 0x65, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x56, 0x61, 0x6c,
0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x78, 0x70, 0x72, 0x12, 0x0e, 0x0a, 0x02, 0x69,
0x66, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x66, 0x12, 0x18, 0x0a, 0x07, 0x6d,
0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65,
0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x91, 0x01, 0x0a, 0x06, 0x45, 0x6e, 0x76, 0x56, 0x61, 0x72,
0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04,
0x6e, 0x61, 0x6d, 0x65, 0x12, 0x2c, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01,
0x28, 0x0b, 0x32, 0x18, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61,
0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x45, 0x6e, 0x76, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79,
0x70, 0x65, 0x12, 0x3a, 0x0a, 0x06, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01,
0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61,
0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x45, 0x6e, 0x76, 0x56, 0x61, 0x72, 0x4f, 0x70, 0x74, 0x69, 0x6f,
0x6e, 0x48, 0x00, 0x52, 0x06, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x88, 0x01, 0x01, 0x42, 0x09,
0x0a, 0x07, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xab, 0x01, 0x0a, 0x07, 0x45, 0x6e,
0x76, 0x54, 0x79, 0x70, 0x65, 0x12, 0x2f, 0x0a, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x18, 0x01, 0x20,
0x01, 0x28, 0x0e, 0x32, 0x19, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72,
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x4b, 0x69, 0x6e, 0x64, 0x48, 0x00,
0x52, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x12, 0x36, 0x0a, 0x08, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74,
0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e,
0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x45, 0x6e, 0x76, 0x54, 0x79,
0x70, 0x65, 0x48, 0x00, 0x52, 0x08, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x12, 0x2f,
0x0a, 0x03, 0x6d, 0x61, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x72,
0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x45, 0x6e,
0x76, 0x4d, 0x61, 0x70, 0x54, 0x79, 0x70, 0x65, 0x48, 0x00, 0x52, 0x03, 0x6d, 0x61, 0x70, 0x42,
0x06, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x22, 0x68, 0x0a, 0x0a, 0x45, 0x6e, 0x76, 0x4d, 0x61,
0x70, 0x54, 0x79, 0x70, 0x65, 0x12, 0x2a, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01,
0x28, 0x0b, 0x32, 0x18, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61,
0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x45, 0x6e, 0x76, 0x54, 0x79, 0x70, 0x65, 0x52, 0x03, 0x6b, 0x65,
0x79, 0x12, 0x2e, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b,
0x32, 0x18, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69,
0x6f, 0x6e, 0x2e, 0x45, 0x6e, 0x76, 0x54, 0x79, 0x70, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75,
0x65, 0x22, 0xc3, 0x01, 0x0a, 0x0c, 0x45, 0x6e, 0x76, 0x56, 0x61, 0x72, 0x4f, 0x70, 0x74, 0x69,
0x6f, 0x6e, 0x12, 0x21, 0x0a, 0x09, 0x61, 0x6c, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x74, 0x65, 0x18,
0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x09, 0x61, 0x6c, 0x74, 0x65, 0x72, 0x6e, 0x61,
0x74, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1d, 0x0a, 0x07, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74,
0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x07, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c,
0x74, 0x88, 0x01, 0x01, 0x12, 0x1f, 0x0a, 0x08, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64,
0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x48, 0x02, 0x52, 0x08, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72,
0x65, 0x64, 0x88, 0x01, 0x01, 0x12, 0x1d, 0x0a, 0x07, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x64,
0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x48, 0x03, 0x52, 0x07, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65,
0x64, 0x88, 0x01, 0x01, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x61, 0x6c, 0x74, 0x65, 0x72, 0x6e, 0x61,
0x74, 0x65, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x42, 0x0b,
0x0a, 0x09, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x42, 0x0a, 0x0a, 0x08, 0x5f,
0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x64, 0x22, 0x65, 0x0a, 0x0a, 0x4d, 0x65, 0x74, 0x68, 0x6f,
0x64, 0x52, 0x75, 0x6c, 0x65, 0x12, 0x1d, 0x0a, 0x07, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74,
0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x07, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75,
0x74, 0x88, 0x01, 0x01, 0x12, 0x1f, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e,
0x73, 0x65, 0x88, 0x01, 0x01, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75,
0x74, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x9c,
0x01, 0x0a, 0x0b, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x75, 0x6c, 0x65, 0x12, 0x35,
0x0a, 0x03, 0x64, 0x65, 0x66, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x67, 0x72,
0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x56, 0x61,
0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e,
0x52, 0x03, 0x64, 0x65, 0x66, 0x12, 0x2c, 0x0a, 0x0f, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x5f,
0x72, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00,
0x52, 0x0e, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x52, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x72,
0x88, 0x01, 0x01, 0x12, 0x14, 0x0a, 0x05, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x18, 0x03, 0x20, 0x03,
0x28, 0x09, 0x52, 0x05, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x42, 0x12, 0x0a, 0x10, 0x5f, 0x63, 0x75,
0x73, 0x74, 0x6f, 0x6d, 0x5f, 0x72, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x72, 0x22, 0xde, 0x03,
0x0a, 0x12, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69,
0x74, 0x69, 0x6f, 0x6e, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01,
0x28, 0x09, 0x48, 0x01, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x13, 0x0a,
0x02, 0x69, 0x66, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x02, 0x52, 0x02, 0x69, 0x66, 0x88,
0x01, 0x01, 0x12, 0x1f, 0x0a, 0x08, 0x61, 0x75, 0x74, 0x6f, 0x62, 0x69, 0x6e, 0x64, 0x18, 0x03,
0x20, 0x01, 0x28, 0x08, 0x48, 0x03, 0x52, 0x08, 0x61, 0x75, 0x74, 0x6f, 0x62, 0x69, 0x6e, 0x64,
0x88, 0x01, 0x01, 0x12, 0x10, 0x0a, 0x02, 0x62, 0x79, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x48,
0x00, 0x52, 0x02, 0x62, 0x79, 0x12, 0x2c, 0x0a, 0x03, 0x6d, 0x61, 0x70, 0x18, 0x0c, 0x20, 0x01,
0x28, 0x0b, 0x32, 0x18, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61,
0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x4d, 0x61, 0x70, 0x45, 0x78, 0x70, 0x72, 0x48, 0x00, 0x52, 0x03,
0x6d, 0x61, 0x70, 0x12, 0x38, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x0d,
0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65,
0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x45, 0x78,
0x70, 0x72, 0x48, 0x00, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x2f, 0x0a,
0x04, 0x63, 0x61, 0x6c, 0x6c, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x72,
0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x43, 0x61,
0x6c, 0x6c, 0x45, 0x78, 0x70, 0x72, 0x48, 0x00, 0x52, 0x04, 0x63, 0x61, 0x6c, 0x6c, 0x12, 0x41,
0x0a, 0x0a, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x0f, 0x20, 0x01,
0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61,
0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45,
0x78, 0x70, 0x72, 0x48, 0x00, 0x52, 0x0a, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f,
0x6e, 0x12, 0x2f, 0x0a, 0x04, 0x65, 0x6e, 0x75, 0x6d, 0x18, 0x10, 0x20, 0x01, 0x28, 0x0b, 0x32,
0x19, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f,
0x6e, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x45, 0x78, 0x70, 0x72, 0x48, 0x00, 0x52, 0x04, 0x65, 0x6e,
0x75, 0x6d, 0x12, 0x35, 0x0a, 0x06, 0x73, 0x77, 0x69, 0x74, 0x63, 0x68, 0x18, 0x11, 0x20, 0x01,
0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61,
0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x53, 0x77, 0x69, 0x74, 0x63, 0x68, 0x45, 0x78, 0x70, 0x72, 0x48,
0x00, 0x52, 0x06, 0x73, 0x77, 0x69, 0x74, 0x63, 0x68, 0x42, 0x06, 0x0a, 0x04, 0x65, 0x78, 0x70,
0x72, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x05, 0x0a, 0x03, 0x5f, 0x69,
0x66, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x61, 0x75, 0x74, 0x6f, 0x62, 0x69, 0x6e, 0x64, 0x22, 0xc5,
0x01, 0x0a, 0x07, 0x4d, 0x61, 0x70, 0x45, 0x78, 0x70, 0x72, 0x12, 0x35, 0x0a, 0x08, 0x69, 0x74,
0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67,
0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x49,
0x74, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x08, 0x69, 0x74, 0x65, 0x72, 0x61, 0x74, 0x6f,
0x72, 0x12, 0x10, 0x0a, 0x02, 0x62, 0x79, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52,
0x02, 0x62, 0x79, 0x12, 0x38, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x0c,
0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65,
0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x45, 0x78,
0x70, 0x72, 0x48, 0x00, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x2f, 0x0a,
0x04, 0x65, 0x6e, 0x75, 0x6d, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x72,
0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x45, 0x6e,
0x75, 0x6d, 0x45, 0x78, 0x70, 0x72, 0x48, 0x00, 0x52, 0x04, 0x65, 0x6e, 0x75, 0x6d, 0x42, 0x06,
0x0a, 0x04, 0x65, 0x78, 0x70, 0x72, 0x22, 0x30, 0x0a, 0x08, 0x49, 0x74, 0x65, 0x72, 0x61, 0x74,
0x6f, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x73, 0x72, 0x63, 0x18, 0x02, 0x20,
0x01, 0x28, 0x09, 0x52, 0x03, 0x73, 0x72, 0x63, 0x22, 0x50, 0x0a, 0x0b, 0x4d, 0x65, 0x73, 0x73,
0x61, 0x67, 0x65, 0x45, 0x78, 0x70, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18,
0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x2d, 0x0a, 0x04, 0x61,
0x72, 0x67, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x72, 0x70, 0x63,
0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x41, 0x72, 0x67, 0x75,
0x6d, 0x65, 0x6e, 0x74, 0x52, 0x04, 0x61, 0x72, 0x67, 0x73, 0x22, 0x2e, 0x0a, 0x08, 0x45, 0x6e,
0x75, 0x6d, 0x45, 0x78, 0x70, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01,
0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x62, 0x79,
0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x62, 0x79, 0x22, 0xf3, 0x02, 0x0a, 0x08, 0x43,
0x61, 0x6c, 0x6c, 0x45, 0x78, 0x70, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f,
0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12,
0x38, 0x0a, 0x07, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b,
0x32, 0x1e, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69,
0x6f, 0x6e, 0x2e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
0x52, 0x07, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x07, 0x74, 0x69, 0x6d,
0x65, 0x6f, 0x75, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x07, 0x74, 0x69,
0x6d, 0x65, 0x6f, 0x75, 0x74, 0x88, 0x01, 0x01, 0x12, 0x37, 0x0a, 0x05, 0x72, 0x65, 0x74, 0x72,
0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66,
0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x52, 0x65, 0x74, 0x72, 0x79, 0x50,
0x6f, 0x6c, 0x69, 0x63, 0x79, 0x48, 0x01, 0x52, 0x05, 0x72, 0x65, 0x74, 0x72, 0x79, 0x88, 0x01,
0x01, 0x12, 0x30, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b,
0x32, 0x1a, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69,
0x6f, 0x6e, 0x2e, 0x47, 0x52, 0x50, 0x43, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x05, 0x65, 0x72,
0x72, 0x6f, 0x72, 0x12, 0x3c, 0x0a, 0x06, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x06, 0x20,
0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72,
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x47, 0x52, 0x50, 0x43, 0x43, 0x61, 0x6c, 0x6c, 0x4f, 0x70,
0x74, 0x69, 0x6f, 0x6e, 0x48, 0x02, 0x52, 0x06, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x88, 0x01,
0x01, 0x12, 0x1f, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x07, 0x20,
0x01, 0x28, 0x09, 0x48, 0x03, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x88,
0x01, 0x01, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x42, 0x08,
0x0a, 0x06, 0x5f, 0x72, 0x65, 0x74, 0x72, 0x79, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6f, 0x70, 0x74,
0x69, 0x6f, 0x6e, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61,
0x22, 0x7f, 0x0a, 0x0a, 0x53, 0x77, 0x69, 0x74, 0x63, 0x68, 0x45, 0x78, 0x70, 0x72, 0x12, 0x33,
0x0a, 0x04, 0x63, 0x61, 0x73, 0x65, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x67,
0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x53,
0x77, 0x69, 0x74, 0x63, 0x68, 0x43, 0x61, 0x73, 0x65, 0x45, 0x78, 0x70, 0x72, 0x52, 0x04, 0x63,
0x61, 0x73, 0x65, 0x12, 0x3c, 0x0a, 0x07, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x18, 0x02,
0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65,
0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x53, 0x77, 0x69, 0x74, 0x63, 0x68, 0x44, 0x65, 0x66,
0x61, 0x75, 0x6c, 0x74, 0x45, 0x78, 0x70, 0x72, 0x52, 0x07, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c,
0x74, 0x22, 0x71, 0x0a, 0x0e, 0x53, 0x77, 0x69, 0x74, 0x63, 0x68, 0x43, 0x61, 0x73, 0x65, 0x45,
0x78, 0x70, 0x72, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x66, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
0x02, 0x69, 0x66, 0x12, 0x35, 0x0a, 0x03, 0x64, 0x65, 0x66, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b,
0x32, 0x23, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69,
0x6f, 0x6e, 0x2e, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x44, 0x65, 0x66, 0x69, 0x6e,
0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x03, 0x64, 0x65, 0x66, 0x12, 0x10, 0x0a, 0x02, 0x62, 0x79,
0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x02, 0x62, 0x79, 0x42, 0x06, 0x0a, 0x04,
0x65, 0x78, 0x70, 0x72, 0x22, 0x64, 0x0a, 0x11, 0x53, 0x77, 0x69, 0x74, 0x63, 0x68, 0x44, 0x65,
0x66, 0x61, 0x75, 0x6c, 0x74, 0x45, 0x78, 0x70, 0x72, 0x12, 0x35, 0x0a, 0x03, 0x64, 0x65, 0x66,
0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65,
0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c,
0x65, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x03, 0x64, 0x65, 0x66,
0x12, 0x10, 0x0a, 0x02, 0x62, 0x79, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x02,
0x62, 0x79, 0x42, 0x06, 0x0a, 0x04, 0x65, 0x78, 0x70, 0x72, 0x22, 0x86, 0x04, 0x0a, 0x09, 0x47,
0x52, 0x50, 0x43, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x35, 0x0a, 0x03, 0x64, 0x65, 0x66, 0x18,
0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64,
0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65,
0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x03, 0x64, 0x65, 0x66, 0x12,
0x13, 0x0a, 0x02, 0x69, 0x66, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x02, 0x69,
0x66, 0x88, 0x01, 0x01, 0x12, 0x29, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x03, 0x20, 0x01,
0x28, 0x0e, 0x32, 0x10, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x72, 0x70, 0x63, 0x2e,
0x43, 0x6f, 0x64, 0x65, 0x48, 0x01, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x88, 0x01, 0x01, 0x12,
0x1d, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09,
0x48, 0x02, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x88, 0x01, 0x01, 0x12, 0x3a,
0x0a, 0x07, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32,
0x20, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f,
0x6e, 0x2e, 0x47, 0x52, 0x50, 0x43, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x44, 0x65, 0x74, 0x61, 0x69,
0x6c, 0x52, 0x07, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x12, 0x1b, 0x0a, 0x06, 0x69, 0x67,
0x6e, 0x6f, 0x72, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x48, 0x03, 0x52, 0x06, 0x69, 0x67,
0x6e, 0x6f, 0x72, 0x65, 0x88, 0x01, 0x01, 0x12, 0x33, 0x0a, 0x13, 0x69, 0x67, 0x6e, 0x6f, 0x72,
0x65, 0x5f, 0x61, 0x6e, 0x64, 0x5f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x07,
0x20, 0x01, 0x28, 0x09, 0x48, 0x04, 0x52, 0x11, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x41, 0x6e,
0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x88, 0x01, 0x01, 0x12, 0x45, 0x0a, 0x09,
0x6c, 0x6f, 0x67, 0x5f, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0e, 0x32,
0x23, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f,
0x6e, 0x2e, 0x47, 0x52, 0x50, 0x43, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x2e, 0x4c, 0x6f, 0x67, 0x4c,
0x65, 0x76, 0x65, 0x6c, 0x48, 0x05, 0x52, 0x08, 0x6c, 0x6f, 0x67, 0x4c, 0x65, 0x76, 0x65, 0x6c,
0x88, 0x01, 0x01, 0x22, 0x41, 0x0a, 0x08, 0x4c, 0x6f, 0x67, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x12,
0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05,
0x44, 0x45, 0x42, 0x55, 0x47, 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, 0x49, 0x4e, 0x46, 0x4f, 0x10,
0x02, 0x12, 0x08, 0x0a, 0x04, 0x57, 0x41, 0x52, 0x4e, 0x10, 0x03, 0x12, 0x09, 0x0a, 0x05, 0x45,
0x52, 0x52, 0x4f, 0x52, 0x10, 0x04, 0x42, 0x05, 0x0a, 0x03, 0x5f, 0x69, 0x66, 0x42, 0x07, 0x0a,
0x05, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61,
0x67, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x42, 0x16, 0x0a,
0x14, 0x5f, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x5f, 0x61, 0x6e, 0x64, 0x5f, 0x72, 0x65, 0x73,
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x6c, 0x6f, 0x67, 0x5f, 0x6c, 0x65,
0x76, 0x65, 0x6c, 0x22, 0xfa, 0x05, 0x0a, 0x0f, 0x47, 0x52, 0x50, 0x43, 0x45, 0x72, 0x72, 0x6f,
0x72, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x66, 0x18, 0x01, 0x20,
0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x66, 0x12, 0x35, 0x0a, 0x03, 0x64, 0x65, 0x66, 0x18, 0x02,
0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65,
0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x44,
0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x03, 0x64, 0x65, 0x66, 0x12, 0x36,
0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32,
0x1c, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f,
0x6e, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x45, 0x78, 0x70, 0x72, 0x52, 0x07, 0x6d,
0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x34, 0x0a, 0x0a, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f,
0x69, 0x6e, 0x66, 0x6f, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x67, 0x6f, 0x6f,
0x67, 0x6c, 0x65, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x49, 0x6e, 0x66,
0x6f, 0x52, 0x09, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x34, 0x0a, 0x0a,
0x72, 0x65, 0x74, 0x72, 0x79, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b,
0x32, 0x15, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x52, 0x65,
0x74, 0x72, 0x79, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x09, 0x72, 0x65, 0x74, 0x72, 0x79, 0x49, 0x6e,
0x66, 0x6f, 0x12, 0x34, 0x0a, 0x0a, 0x64, 0x65, 0x62, 0x75, 0x67, 0x5f, 0x69, 0x6e, 0x66, 0x6f,
0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e,
0x72, 0x70, 0x63, 0x2e, 0x44, 0x65, 0x62, 0x75, 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x09, 0x64,
0x65, 0x62, 0x75, 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x3d, 0x0a, 0x0d, 0x71, 0x75, 0x6f, 0x74,
0x61, 0x5f, 0x66, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32,
0x18, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x51, 0x75, 0x6f,
0x74, 0x61, 0x46, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x52, 0x0c, 0x71, 0x75, 0x6f, 0x74, 0x61,
0x46, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x12, 0x52, 0x0a, 0x14, 0x70, 0x72, 0x65, 0x63, 0x6f,
0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x66, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x18,
0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x72,
0x70, 0x63, 0x2e, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x46,
0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x52, 0x13, 0x70, 0x72, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x69,
0x74, 0x69, 0x6f, 0x6e, 0x46, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x12, 0x37, 0x0a, 0x0b, 0x62,
0x61, 0x64, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b,
0x32, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x42, 0x61,
0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x0a, 0x62, 0x61, 0x64, 0x52, 0x65, 0x71,
0x75, 0x65, 0x73, 0x74, 0x12, 0x3a, 0x0a, 0x0c, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f,
0x69, 0x6e, 0x66, 0x6f, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f,
0x67, 0x6c, 0x65, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x49,
0x6e, 0x66, 0x6f, 0x52, 0x0b, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, 0x6e, 0x66, 0x6f,
0x12, 0x3d, 0x0a, 0x0d, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x69, 0x6e, 0x66,
0x6f, 0x18, 0x0b, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,
0x2e, 0x72, 0x70, 0x63, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x6e, 0x66,
0x6f, 0x52, 0x0c, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12,
0x24, 0x0a, 0x04, 0x68, 0x65, 0x6c, 0x70, 0x18, 0x0c, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e,
0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x48, 0x65, 0x6c, 0x70, 0x52,
0x04, 0x68, 0x65, 0x6c, 0x70, 0x12, 0x49, 0x0a, 0x11, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x69, 0x7a,
0x65, 0x64, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x0d, 0x20, 0x03, 0x28, 0x0b,
0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x6f,
0x63, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x10,
0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65,
0x12, 0x0e, 0x0a, 0x02, 0x62, 0x79, 0x18, 0x0e, 0x20, 0x03, 0x28, 0x09, 0x52, 0x02, 0x62, 0x79,
0x22, 0xc7, 0x03, 0x0a, 0x0e, 0x47, 0x52, 0x50, 0x43, 0x43, 0x61, 0x6c, 0x6c, 0x4f, 0x70, 0x74,
0x69, 0x6f, 0x6e, 0x12, 0x2c, 0x0a, 0x0f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x5f, 0x73,
0x75, 0x62, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0e,
0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x53, 0x75, 0x62, 0x74, 0x79, 0x70, 0x65, 0x88, 0x01,
0x01, 0x12, 0x1b, 0x0a, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28,
0x09, 0x48, 0x01, 0x52, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x88, 0x01, 0x01, 0x12, 0x37,
0x0a, 0x16, 0x6d, 0x61, 0x78, 0x5f, 0x63, 0x61, 0x6c, 0x6c, 0x5f, 0x72, 0x65, 0x63, 0x76, 0x5f,
0x6d, 0x73, 0x67, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x48, 0x02,
0x52, 0x12, 0x6d, 0x61, 0x78, 0x43, 0x61, 0x6c, 0x6c, 0x52, 0x65, 0x63, 0x76, 0x4d, 0x73, 0x67,
0x53, 0x69, 0x7a, 0x65, 0x88, 0x01, 0x01, 0x12, 0x37, 0x0a, 0x16, 0x6d, 0x61, 0x78, 0x5f, 0x63,
0x61, 0x6c, 0x6c, 0x5f, 0x73, 0x65, 0x6e, 0x64, 0x5f, 0x6d, 0x73, 0x67, 0x5f, 0x73, 0x69, 0x7a,
0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x48, 0x03, 0x52, 0x12, 0x6d, 0x61, 0x78, 0x43, 0x61,
0x6c, 0x6c, 0x53, 0x65, 0x6e, 0x64, 0x4d, 0x73, 0x67, 0x53, 0x69, 0x7a, 0x65, 0x88, 0x01, 0x01,
0x12, 0x28, 0x0a, 0x0d, 0x73, 0x74, 0x61, 0x74, 0x69, 0x63, 0x5f, 0x6d, 0x65, 0x74, 0x68, 0x6f,
0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x48, 0x04, 0x52, 0x0c, 0x73, 0x74, 0x61, 0x74, 0x69,
0x63, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x88, 0x01, 0x01, 0x12, 0x1d, 0x0a, 0x07, 0x74, 0x72,
0x61, 0x69, 0x6c, 0x65, 0x72, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x48, 0x05, 0x52, 0x07, 0x74,
0x72, 0x61, 0x69, 0x6c, 0x65, 0x72, 0x88, 0x01, 0x01, 0x12, 0x29, 0x0a, 0x0e, 0x77, 0x61, 0x69,
0x74, 0x5f, 0x66, 0x6f, 0x72, 0x5f, 0x72, 0x65, 0x61, 0x64, 0x79, 0x18, 0x07, 0x20, 0x01, 0x28,
0x08, 0x48, 0x06, 0x52, 0x0c, 0x77, 0x61, 0x69, 0x74, 0x46, 0x6f, 0x72, 0x52, 0x65, 0x61, 0x64,
0x79, 0x88, 0x01, 0x01, 0x42, 0x12, 0x0a, 0x10, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74,
0x5f, 0x73, 0x75, 0x62, 0x74, 0x79, 0x70, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x68, 0x65, 0x61,
0x64, 0x65, 0x72, 0x42, 0x19, 0x0a, 0x17, 0x5f, 0x6d, 0x61, 0x78, 0x5f, 0x63, 0x61, 0x6c, 0x6c,
0x5f, 0x72, 0x65, 0x63, 0x76, 0x5f, 0x6d, 0x73, 0x67, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x42, 0x19,
0x0a, 0x17, 0x5f, 0x6d, 0x61, 0x78, 0x5f, 0x63, 0x61, 0x6c, 0x6c, 0x5f, 0x73, 0x65, 0x6e, 0x64,
0x5f, 0x6d, 0x73, 0x67, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x42, 0x10, 0x0a, 0x0e, 0x5f, 0x73, 0x74,
0x61, 0x74, 0x69, 0x63, 0x5f, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x42, 0x0a, 0x0a, 0x08, 0x5f,
0x74, 0x72, 0x61, 0x69, 0x6c, 0x65, 0x72, 0x42, 0x11, 0x0a, 0x0f, 0x5f, 0x77, 0x61, 0x69, 0x74,
0x5f, 0x66, 0x6f, 0x72, 0x5f, 0x72, 0x65, 0x61, 0x64, 0x79, 0x22, 0x64, 0x0a, 0x0e, 0x56, 0x61,
0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x78, 0x70, 0x72, 0x12, 0x17, 0x0a, 0x04,
0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61,
0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x30, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x02,
0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65,
0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x47, 0x52, 0x50, 0x43, 0x45, 0x72, 0x72, 0x6f, 0x72,
0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65,
0x22, 0xb8, 0x01, 0x0a, 0x0b, 0x52, 0x65, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79,
0x12, 0x42, 0x0a, 0x08, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01,
0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61,
0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x52, 0x65, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79,
0x43, 0x6f, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x08, 0x63, 0x6f, 0x6e, 0x73,
0x74, 0x61, 0x6e, 0x74, 0x12, 0x4b, 0x0a, 0x0b, 0x65, 0x78, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74,
0x69, 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x67, 0x72, 0x70, 0x63,
0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x52, 0x65, 0x74, 0x72,
0x79, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x45, 0x78, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x69,
0x61, 0x6c, 0x48, 0x00, 0x52, 0x0b, 0x65, 0x78, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x69, 0x61,
0x6c, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x66, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69,
0x66, 0x42, 0x08, 0x0a, 0x06, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x22, 0x79, 0x0a, 0x13, 0x52,
0x65, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x61,
0x6e, 0x74, 0x12, 0x1f, 0x0a, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x01,
0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c,
0x88, 0x01, 0x01, 0x12, 0x24, 0x0a, 0x0b, 0x6d, 0x61, 0x78, 0x5f, 0x72, 0x65, 0x74, 0x72, 0x69,
0x65, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x48, 0x01, 0x52, 0x0a, 0x6d, 0x61, 0x78, 0x52,
0x65, 0x74, 0x72, 0x69, 0x65, 0x73, 0x88, 0x01, 0x01, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x69, 0x6e,
0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x6d, 0x61, 0x78, 0x5f, 0x72,
0x65, 0x74, 0x72, 0x69, 0x65, 0x73, 0x22, 0xd1, 0x02, 0x0a, 0x16, 0x52, 0x65, 0x74, 0x72, 0x79,
0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x45, 0x78, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x69, 0x61,
0x6c, 0x12, 0x2e, 0x0a, 0x10, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x5f, 0x69, 0x6e, 0x74,
0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0f, 0x69,
0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x88, 0x01,
0x01, 0x12, 0x36, 0x0a, 0x14, 0x72, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x69, 0x7a, 0x61, 0x74, 0x69,
0x6f, 0x6e, 0x5f, 0x66, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x01, 0x48,
0x01, 0x52, 0x13, 0x72, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e,
0x46, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x88, 0x01, 0x01, 0x12, 0x23, 0x0a, 0x0a, 0x6d, 0x75, 0x6c,
0x74, 0x69, 0x70, 0x6c, 0x69, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x01, 0x48, 0x02, 0x52,
0x0a, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x69, 0x65, 0x72, 0x88, 0x01, 0x01, 0x12, 0x26,
0x0a, 0x0c, 0x6d, 0x61, 0x78, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x04,
0x20, 0x01, 0x28, 0x09, 0x48, 0x03, 0x52, 0x0b, 0x6d, 0x61, 0x78, 0x49, 0x6e, 0x74, 0x65, 0x72,
0x76, 0x61, 0x6c, 0x88, 0x01, 0x01, 0x12, 0x24, 0x0a, 0x0b, 0x6d, 0x61, 0x78, 0x5f, 0x72, 0x65,
0x74, 0x72, 0x69, 0x65, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x48, 0x04, 0x52, 0x0a, 0x6d,
0x61, 0x78, 0x52, 0x65, 0x74, 0x72, 0x69, 0x65, 0x73, 0x88, 0x01, 0x01, 0x42, 0x13, 0x0a, 0x11,
0x5f, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61,
0x6c, 0x42, 0x17, 0x0a, 0x15, 0x5f, 0x72, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x69, 0x7a, 0x61, 0x74,
0x69, 0x6f, 0x6e, 0x5f, 0x66, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x6d,
0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x69, 0x65, 0x72, 0x42, 0x0f, 0x0a, 0x0d, 0x5f, 0x6d, 0x61,
0x78, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x6d,
0x61, 0x78, 0x5f, 0x72, 0x65, 0x74, 0x72, 0x69, 0x65, 0x73, 0x22, 0x5d, 0x0a, 0x0d, 0x4d, 0x65,
0x74, 0x68, 0x6f, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x66,
0x69, 0x65, 0x6c, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x66, 0x69, 0x65, 0x6c,
0x64, 0x12, 0x13, 0x0a, 0x02, 0x62, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52,
0x02, 0x62, 0x79, 0x88, 0x01, 0x01, 0x12, 0x13, 0x0a, 0x02, 0x69, 0x66, 0x18, 0x03, 0x20, 0x01,
0x28, 0x09, 0x48, 0x01, 0x52, 0x02, 0x69, 0x66, 0x88, 0x01, 0x01, 0x42, 0x05, 0x0a, 0x03, 0x5f,
0x62, 0x79, 0x42, 0x05, 0x0a, 0x03, 0x5f, 0x69, 0x66, 0x22, 0x85, 0x01, 0x0a, 0x0e, 0x4d, 0x65,
0x74, 0x68, 0x6f, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x17, 0x0a, 0x04,
0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61,
0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x18, 0x02,
0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x05, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x88, 0x01, 0x01,
0x12, 0x1f, 0x0a, 0x08, 0x61, 0x75, 0x74, 0x6f, 0x62, 0x69, 0x6e, 0x64, 0x18, 0x03, 0x20, 0x01,
0x28, 0x08, 0x48, 0x02, 0x52, 0x08, 0x61, 0x75, 0x74, 0x6f, 0x62, 0x69, 0x6e, 0x64, 0x88, 0x01,
0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x66,
0x69, 0x65, 0x6c, 0x64, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x61, 0x75, 0x74, 0x6f, 0x62, 0x69, 0x6e,
0x64, 0x22, 0x62, 0x0a, 0x08, 0x41, 0x72, 0x67, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x12, 0x0a,
0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d,
0x65, 0x12, 0x13, 0x0a, 0x02, 0x62, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52,
0x02, 0x62, 0x79, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x69, 0x6e, 0x6c, 0x69, 0x6e, 0x65,
0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x06, 0x69, 0x6e, 0x6c, 0x69, 0x6e, 0x65,
0x88, 0x01, 0x01, 0x42, 0x05, 0x0a, 0x03, 0x5f, 0x62, 0x79, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x69,
0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x22, 0xf2, 0x01, 0x0a, 0x09, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x52,
0x75, 0x6c, 0x65, 0x12, 0x2c, 0x0a, 0x0f, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x5f, 0x72, 0x65,
0x73, 0x6f, 0x6c, 0x76, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x0e,
0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x52, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x72, 0x88, 0x01,
0x01, 0x12, 0x13, 0x0a, 0x02, 0x62, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52,
0x02, 0x62, 0x79, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x18,
0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x02, 0x52, 0x05, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x88, 0x01,
0x01, 0x12, 0x31, 0x0a, 0x05, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b,
0x32, 0x1b, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69,
0x6f, 0x6e, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x6e, 0x65, 0x6f, 0x66, 0x52, 0x05, 0x6f,
0x6e, 0x65, 0x6f, 0x66, 0x12, 0x2f, 0x0a, 0x03, 0x65, 0x6e, 0x76, 0x18, 0x05, 0x20, 0x01, 0x28,
0x0b, 0x32, 0x1d, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74,
0x69, 0x6f, 0x6e, 0x2e, 0x45, 0x6e, 0x76, 0x56, 0x61, 0x72, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e,
0x52, 0x03, 0x65, 0x6e, 0x76, 0x42, 0x12, 0x0a, 0x10, 0x5f, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d,
0x5f, 0x72, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x72, 0x42, 0x05, 0x0a, 0x03, 0x5f, 0x62, 0x79,
0x42, 0x08, 0x0a, 0x06, 0x5f, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x22, 0x89, 0x01, 0x0a, 0x0a, 0x46,
0x69, 0x65, 0x6c, 0x64, 0x4f, 0x6e, 0x65, 0x6f, 0x66, 0x12, 0x10, 0x0a, 0x02, 0x69, 0x66, 0x18,
0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x02, 0x69, 0x66, 0x12, 0x1a, 0x0a, 0x07, 0x64,
0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x07,
0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x12, 0x35, 0x0a, 0x03, 0x64, 0x65, 0x66, 0x18, 0x03,
0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65,
0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x44,
0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x03, 0x64, 0x65, 0x66, 0x12, 0x0e,
0x0a, 0x02, 0x62, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x62, 0x79, 0x42, 0x06,
0x0a, 0x04, 0x63, 0x6f, 0x6e, 0x64, 0x22, 0x45, 0x0a, 0x09, 0x43, 0x45, 0x4c, 0x50, 0x6c, 0x75,
0x67, 0x69, 0x6e, 0x12, 0x38, 0x0a, 0x06, 0x65, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x01, 0x20,
0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72,
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x43, 0x45, 0x4c, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x45,
0x78, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x06, 0x65, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x22, 0xaf, 0x02,
0x0a, 0x0f, 0x43, 0x45, 0x4c, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x45, 0x78, 0x70, 0x6f, 0x72,
0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x65, 0x73, 0x63, 0x18, 0x02, 0x20,
0x01, 0x28, 0x09, 0x52, 0x04, 0x64, 0x65, 0x73, 0x63, 0x12, 0x36, 0x0a, 0x05, 0x74, 0x79, 0x70,
0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e,
0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x43, 0x45, 0x4c, 0x52, 0x65,
0x63, 0x65, 0x69, 0x76, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x52, 0x05, 0x74, 0x79, 0x70, 0x65,
0x73, 0x12, 0x3a, 0x0a, 0x09, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x04,
0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65,
0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x43, 0x45, 0x4c, 0x46, 0x75, 0x6e, 0x63, 0x74, 0x69,
0x6f, 0x6e, 0x52, 0x09, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x3a, 0x0a,
0x09, 0x76, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b,
0x32, 0x1c, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69,
0x6f, 0x6e, 0x2e, 0x43, 0x45, 0x4c, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x09,
0x76, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x12, 0x44, 0x0a, 0x0a, 0x63, 0x61, 0x70,
0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e,
0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e,
0x43, 0x45, 0x4c, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c,
0x69, 0x74, 0x79, 0x52, 0x0a, 0x63, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x22,
0x9b, 0x02, 0x0a, 0x13, 0x43, 0x45, 0x4c, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x43, 0x61, 0x70,
0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x12, 0x3e, 0x0a, 0x03, 0x65, 0x6e, 0x76, 0x18, 0x01,
0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65,
0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x43, 0x45, 0x4c, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e,
0x45, 0x6e, 0x76, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x48, 0x00, 0x52,
0x03, 0x65, 0x6e, 0x76, 0x88, 0x01, 0x01, 0x12, 0x54, 0x0a, 0x0b, 0x66, 0x69, 0x6c, 0x65, 0x5f,
0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x67,
0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x43,
0x45, 0x4c, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x46, 0x69, 0x6c, 0x65, 0x53, 0x79, 0x73, 0x74,
0x65, 0x6d, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x48, 0x01, 0x52, 0x0a,
0x66, 0x69, 0x6c, 0x65, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x88, 0x01, 0x01, 0x12, 0x4a, 0x0a,
0x07, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b,
0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e,
0x2e, 0x43, 0x45, 0x4c, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72,
0x6b, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x48, 0x02, 0x52, 0x07, 0x6e,
0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x88, 0x01, 0x01, 0x42, 0x06, 0x0a, 0x04, 0x5f, 0x65, 0x6e,
0x76, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x73, 0x79, 0x73, 0x74, 0x65,
0x6d, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x22, 0x40, 0x0a,
0x16, 0x43, 0x45, 0x4c, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x45, 0x6e, 0x76, 0x43, 0x61, 0x70,
0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x61, 0x6c, 0x6c, 0x18, 0x01,
0x20, 0x01, 0x28, 0x08, 0x52, 0x03, 0x61, 0x6c, 0x6c, 0x12, 0x14, 0x0a, 0x05, 0x6e, 0x61, 0x6d,
0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x22,
0x3e, 0x0a, 0x1d, 0x43, 0x45, 0x4c, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x46, 0x69, 0x6c, 0x65,
0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79,
0x12, 0x1d, 0x0a, 0x0a, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01,
0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x50, 0x61, 0x74, 0x68, 0x22,
0x1c, 0x0a, 0x1a, 0x43, 0x45, 0x4c, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x4e, 0x65, 0x74, 0x77,
0x6f, 0x72, 0x6b, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x22, 0xa1, 0x01,
0x0a, 0x0b, 0x43, 0x45, 0x4c, 0x46, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a,
0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d,
0x65, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x65, 0x73, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52,
0x04, 0x64, 0x65, 0x73, 0x63, 0x12, 0x38, 0x0a, 0x04, 0x61, 0x72, 0x67, 0x73, 0x18, 0x03, 0x20,
0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72,
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x43, 0x45, 0x4c, 0x46, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f,
0x6e, 0x41, 0x72, 0x67, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x04, 0x61, 0x72, 0x67, 0x73, 0x12,
0x30, 0x0a, 0x06, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32,
0x18, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f,
0x6e, 0x2e, 0x43, 0x45, 0x4c, 0x54, 0x79, 0x70, 0x65, 0x52, 0x06, 0x72, 0x65, 0x74, 0x75, 0x72,
0x6e, 0x22, 0x71, 0x0a, 0x0f, 0x43, 0x45, 0x4c, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x72,
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, 0x12, 0x0a, 0x04, 0x64, 0x65, 0x73, 0x63,
0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x64, 0x65, 0x73, 0x63, 0x12, 0x36, 0x0a, 0x07,
0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e,
0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e,
0x43, 0x45, 0x4c, 0x46, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x6d, 0x65, 0x74,
0x68, 0x6f, 0x64, 0x73, 0x22, 0x6b, 0x0a, 0x13, 0x43, 0x45, 0x4c, 0x46, 0x75, 0x6e, 0x63, 0x74,
0x69, 0x6f, 0x6e, 0x41, 0x72, 0x67, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e,
0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12,
0x12, 0x0a, 0x04, 0x64, 0x65, 0x73, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x64,
0x65, 0x73, 0x63, 0x12, 0x2c, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28,
0x0b, 0x32, 0x18, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74,
0x69, 0x6f, 0x6e, 0x2e, 0x43, 0x45, 0x4c, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70,
0x65, 0x22, 0xdd, 0x01, 0x0a, 0x07, 0x43, 0x45, 0x4c, 0x54, 0x79, 0x70, 0x65, 0x12, 0x2f, 0x0a,
0x04, 0x6b, 0x69, 0x6e, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x19, 0x2e, 0x67, 0x72,
0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x54, 0x79,
0x70, 0x65, 0x4b, 0x69, 0x6e, 0x64, 0x48, 0x00, 0x52, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x12, 0x36,
0x0a, 0x08, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b,
0x32, 0x18, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69,
0x6f, 0x6e, 0x2e, 0x43, 0x45, 0x4c, 0x54, 0x79, 0x70, 0x65, 0x48, 0x00, 0x52, 0x08, 0x72, 0x65,
0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x12, 0x2f, 0x0a, 0x03, 0x6d, 0x61, 0x70, 0x18, 0x03, 0x20,
0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72,
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x43, 0x45, 0x4c, 0x4d, 0x61, 0x70, 0x54, 0x79, 0x70, 0x65,
0x48, 0x00, 0x52, 0x03, 0x6d, 0x61, 0x70, 0x12, 0x1a, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61,
0x67, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73,
0x61, 0x67, 0x65, 0x12, 0x14, 0x0a, 0x04, 0x65, 0x6e, 0x75, 0x6d, 0x18, 0x05, 0x20, 0x01, 0x28,
0x09, 0x48, 0x00, 0x52, 0x04, 0x65, 0x6e, 0x75, 0x6d, 0x42, 0x06, 0x0a, 0x04, 0x74, 0x79, 0x70,
0x65, 0x22, 0x68, 0x0a, 0x0a, 0x43, 0x45, 0x4c, 0x4d, 0x61, 0x70, 0x54, 0x79, 0x70, 0x65, 0x12,
0x2a, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x67,
0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x43,
0x45, 0x4c, 0x54, 0x79, 0x70, 0x65, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x2e, 0x0a, 0x05, 0x76,
0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x67, 0x72, 0x70,
0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x43, 0x45, 0x4c,
0x54, 0x79, 0x70, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x63, 0x0a, 0x0b, 0x43,
0x45, 0x4c, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61,
0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x12,
0x0a, 0x04, 0x64, 0x65, 0x73, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x64, 0x65,
0x73, 0x63, 0x12, 0x2c, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b,
0x32, 0x18, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69,
0x6f, 0x6e, 0x2e, 0x43, 0x45, 0x4c, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65,
0x2a, 0x5e, 0x0a, 0x08, 0x54, 0x79, 0x70, 0x65, 0x4b, 0x69, 0x6e, 0x64, 0x12, 0x0b, 0x0a, 0x07,
0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x53, 0x54, 0x52,
0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, 0x42, 0x4f, 0x4f, 0x4c, 0x10, 0x02, 0x12,
0x09, 0x0a, 0x05, 0x49, 0x4e, 0x54, 0x36, 0x34, 0x10, 0x03, 0x12, 0x0a, 0x0a, 0x06, 0x55, 0x49,
0x4e, 0x54, 0x36, 0x34, 0x10, 0x04, 0x12, 0x0a, 0x0a, 0x06, 0x44, 0x4f, 0x55, 0x42, 0x4c, 0x45,
0x10, 0x05, 0x12, 0x0c, 0x0a, 0x08, 0x44, 0x55, 0x52, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x06,
0x3a, 0x4c, 0x0a, 0x04, 0x66, 0x69, 0x6c, 0x65, 0x12, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c,
0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x4f,
0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xa3, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e,
0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e,
0x46, 0x69, 0x6c, 0x65, 0x52, 0x75, 0x6c, 0x65, 0x52, 0x04, 0x66, 0x69, 0x6c, 0x65, 0x3a, 0x58,
0x0a, 0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x1f, 0x2e, 0x67, 0x6f, 0x6f, 0x67,
0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x65, 0x72, 0x76,
0x69, 0x63, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xa3, 0x09, 0x20, 0x01, 0x28,
0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74,
0x69, 0x6f, 0x6e, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x75, 0x6c, 0x65, 0x52,
0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x3a, 0x54, 0x0a, 0x06, 0x6d, 0x65, 0x74, 0x68,
0x6f, 0x64, 0x12, 0x1e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f,
0x6e, 0x73, 0x18, 0xa3, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x72, 0x70, 0x63,
0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x4d, 0x65, 0x74, 0x68,
0x6f, 0x64, 0x52, 0x75, 0x6c, 0x65, 0x52, 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x3a, 0x58,
0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x1f, 0x2e, 0x67, 0x6f, 0x6f, 0x67,
0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4d, 0x65, 0x73, 0x73,
0x61, 0x67, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xa3, 0x09, 0x20, 0x01, 0x28,
0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74,
0x69, 0x6f, 0x6e, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x75, 0x6c, 0x65, 0x52,
0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x3a, 0x50, 0x0a, 0x05, 0x66, 0x69, 0x65, 0x6c,
0x64, 0x12, 0x1d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73,
0x18, 0xa3, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66,
0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x52,
0x75, 0x6c, 0x65, 0x52, 0x05, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x3a, 0x4c, 0x0a, 0x04, 0x65, 0x6e,
0x75, 0x6d, 0x12, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73,
0x18, 0xa3, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66,
0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x52, 0x75,
0x6c, 0x65, 0x52, 0x04, 0x65, 0x6e, 0x75, 0x6d, 0x3a, 0x61, 0x0a, 0x0a, 0x65, 0x6e, 0x75, 0x6d,
0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x21, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x56, 0x61, 0x6c,
0x75, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xa3, 0x09, 0x20, 0x01, 0x28, 0x0b,
0x32, 0x1e, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69,
0x6f, 0x6e, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x75, 0x6c, 0x65,
0x52, 0x09, 0x65, 0x6e, 0x75, 0x6d, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x50, 0x0a, 0x05, 0x6f,
0x6e, 0x65, 0x6f, 0x66, 0x12, 0x1d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4f, 0x6e, 0x65, 0x6f, 0x66, 0x4f, 0x70, 0x74, 0x69,
0x6f, 0x6e, 0x73, 0x18, 0xa3, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x72, 0x70,
0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x4f, 0x6e, 0x65,
0x6f, 0x66, 0x52, 0x75, 0x6c, 0x65, 0x52, 0x05, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x42, 0xc2, 0x01,
0x0a, 0x13, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72,
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x0f, 0x46, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f,
0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3d, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62,
0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6d, 0x65, 0x72, 0x63, 0x61, 0x72, 0x69, 0x2f, 0x67, 0x72, 0x70,
0x63, 0x2d, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x67, 0x72, 0x70,
0x63, 0x2f, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x3b, 0x66, 0x65, 0x64,
0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0xa2, 0x02, 0x03, 0x47, 0x46, 0x58, 0xaa, 0x02, 0x0f,
0x47, 0x72, 0x70, 0x63, 0x2e, 0x46, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0xca,
0x02, 0x0f, 0x47, 0x72, 0x70, 0x63, 0x5c, 0x46, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f,
0x6e, 0xe2, 0x02, 0x1b, 0x47, 0x72, 0x70, 0x63, 0x5c, 0x46, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74,
0x69, 0x6f, 0x6e, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea,
0x02, 0x10, 0x47, 0x72, 0x70, 0x63, 0x3a, 0x3a, 0x46, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69,
0x6f, 0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_grpc_federation_federation_proto_rawDescOnce sync.Once
file_grpc_federation_federation_proto_rawDescData = file_grpc_federation_federation_proto_rawDesc
)
func file_grpc_federation_federation_proto_rawDescGZIP() []byte {
file_grpc_federation_federation_proto_rawDescOnce.Do(func() {
file_grpc_federation_federation_proto_rawDescData = protoimpl.X.CompressGZIP(file_grpc_federation_federation_proto_rawDescData)
})
return file_grpc_federation_federation_proto_rawDescData
}
var file_grpc_federation_federation_proto_enumTypes = make([]protoimpl.EnumInfo, 2)
var file_grpc_federation_federation_proto_msgTypes = make([]protoimpl.MessageInfo, 48)
var file_grpc_federation_federation_proto_goTypes = []interface{}{
(TypeKind)(0), // 0: grpc.federation.TypeKind
(GRPCError_LogLevel)(0), // 1: grpc.federation.GRPCError.LogLevel
(*FileRule)(nil), // 2: grpc.federation.FileRule
(*EnumRule)(nil), // 3: grpc.federation.EnumRule
(*EnumValueRule)(nil), // 4: grpc.federation.EnumValueRule
(*EnumValueAttribute)(nil), // 5: grpc.federation.EnumValueAttribute
(*OneofRule)(nil), // 6: grpc.federation.OneofRule
(*ServiceRule)(nil), // 7: grpc.federation.ServiceRule
(*Env)(nil), // 8: grpc.federation.Env
(*ServiceVariable)(nil), // 9: grpc.federation.ServiceVariable
(*ServiceVariableValidationExpr)(nil), // 10: grpc.federation.ServiceVariableValidationExpr
(*EnvVar)(nil), // 11: grpc.federation.EnvVar
(*EnvType)(nil), // 12: grpc.federation.EnvType
(*EnvMapType)(nil), // 13: grpc.federation.EnvMapType
(*EnvVarOption)(nil), // 14: grpc.federation.EnvVarOption
(*MethodRule)(nil), // 15: grpc.federation.MethodRule
(*MessageRule)(nil), // 16: grpc.federation.MessageRule
(*VariableDefinition)(nil), // 17: grpc.federation.VariableDefinition
(*MapExpr)(nil), // 18: grpc.federation.MapExpr
(*Iterator)(nil), // 19: grpc.federation.Iterator
(*MessageExpr)(nil), // 20: grpc.federation.MessageExpr
(*EnumExpr)(nil), // 21: grpc.federation.EnumExpr
(*CallExpr)(nil), // 22: grpc.federation.CallExpr
(*SwitchExpr)(nil), // 23: grpc.federation.SwitchExpr
(*SwitchCaseExpr)(nil), // 24: grpc.federation.SwitchCaseExpr
(*SwitchDefaultExpr)(nil), // 25: grpc.federation.SwitchDefaultExpr
(*GRPCError)(nil), // 26: grpc.federation.GRPCError
(*GRPCErrorDetail)(nil), // 27: grpc.federation.GRPCErrorDetail
(*GRPCCallOption)(nil), // 28: grpc.federation.GRPCCallOption
(*ValidationExpr)(nil), // 29: grpc.federation.ValidationExpr
(*RetryPolicy)(nil), // 30: grpc.federation.RetryPolicy
(*RetryPolicyConstant)(nil), // 31: grpc.federation.RetryPolicyConstant
(*RetryPolicyExponential)(nil), // 32: grpc.federation.RetryPolicyExponential
(*MethodRequest)(nil), // 33: grpc.federation.MethodRequest
(*MethodResponse)(nil), // 34: grpc.federation.MethodResponse
(*Argument)(nil), // 35: grpc.federation.Argument
(*FieldRule)(nil), // 36: grpc.federation.FieldRule
(*FieldOneof)(nil), // 37: grpc.federation.FieldOneof
(*CELPlugin)(nil), // 38: grpc.federation.CELPlugin
(*CELPluginExport)(nil), // 39: grpc.federation.CELPluginExport
(*CELPluginCapability)(nil), // 40: grpc.federation.CELPluginCapability
(*CELPluginEnvCapability)(nil), // 41: grpc.federation.CELPluginEnvCapability
(*CELPluginFileSystemCapability)(nil), // 42: grpc.federation.CELPluginFileSystemCapability
(*CELPluginNetworkCapability)(nil), // 43: grpc.federation.CELPluginNetworkCapability
(*CELFunction)(nil), // 44: grpc.federation.CELFunction
(*CELReceiverType)(nil), // 45: grpc.federation.CELReceiverType
(*CELFunctionArgument)(nil), // 46: grpc.federation.CELFunctionArgument
(*CELType)(nil), // 47: grpc.federation.CELType
(*CELMapType)(nil), // 48: grpc.federation.CELMapType
(*CELVariable)(nil), // 49: grpc.federation.CELVariable
(code.Code)(0), // 50: google.rpc.Code
(*errdetails.ErrorInfo)(nil), // 51: google.rpc.ErrorInfo
(*errdetails.RetryInfo)(nil), // 52: google.rpc.RetryInfo
(*errdetails.DebugInfo)(nil), // 53: google.rpc.DebugInfo
(*errdetails.QuotaFailure)(nil), // 54: google.rpc.QuotaFailure
(*errdetails.PreconditionFailure)(nil), // 55: google.rpc.PreconditionFailure
(*errdetails.BadRequest)(nil), // 56: google.rpc.BadRequest
(*errdetails.RequestInfo)(nil), // 57: google.rpc.RequestInfo
(*errdetails.ResourceInfo)(nil), // 58: google.rpc.ResourceInfo
(*errdetails.Help)(nil), // 59: google.rpc.Help
(*errdetails.LocalizedMessage)(nil), // 60: google.rpc.LocalizedMessage
(*descriptorpb.FileOptions)(nil), // 61: google.protobuf.FileOptions
(*descriptorpb.ServiceOptions)(nil), // 62: google.protobuf.ServiceOptions
(*descriptorpb.MethodOptions)(nil), // 63: google.protobuf.MethodOptions
(*descriptorpb.MessageOptions)(nil), // 64: google.protobuf.MessageOptions
(*descriptorpb.FieldOptions)(nil), // 65: google.protobuf.FieldOptions
(*descriptorpb.EnumOptions)(nil), // 66: google.protobuf.EnumOptions
(*descriptorpb.EnumValueOptions)(nil), // 67: google.protobuf.EnumValueOptions
(*descriptorpb.OneofOptions)(nil), // 68: google.protobuf.OneofOptions
}
var file_grpc_federation_federation_proto_depIdxs = []int32{
38, // 0: grpc.federation.FileRule.plugin:type_name -> grpc.federation.CELPlugin
5, // 1: grpc.federation.EnumValueRule.attr:type_name -> grpc.federation.EnumValueAttribute
8, // 2: grpc.federation.ServiceRule.env:type_name -> grpc.federation.Env
9, // 3: grpc.federation.ServiceRule.var:type_name -> grpc.federation.ServiceVariable
11, // 4: grpc.federation.Env.var:type_name -> grpc.federation.EnvVar
18, // 5: grpc.federation.ServiceVariable.map:type_name -> grpc.federation.MapExpr
20, // 6: grpc.federation.ServiceVariable.message:type_name -> grpc.federation.MessageExpr
10, // 7: grpc.federation.ServiceVariable.validation:type_name -> grpc.federation.ServiceVariableValidationExpr
21, // 8: grpc.federation.ServiceVariable.enum:type_name -> grpc.federation.EnumExpr
23, // 9: grpc.federation.ServiceVariable.switch:type_name -> grpc.federation.SwitchExpr
12, // 10: grpc.federation.EnvVar.type:type_name -> grpc.federation.EnvType
14, // 11: grpc.federation.EnvVar.option:type_name -> grpc.federation.EnvVarOption
0, // 12: grpc.federation.EnvType.kind:type_name -> grpc.federation.TypeKind
12, // 13: grpc.federation.EnvType.repeated:type_name -> grpc.federation.EnvType
13, // 14: grpc.federation.EnvType.map:type_name -> grpc.federation.EnvMapType
12, // 15: grpc.federation.EnvMapType.key:type_name -> grpc.federation.EnvType
12, // 16: grpc.federation.EnvMapType.value:type_name -> grpc.federation.EnvType
17, // 17: grpc.federation.MessageRule.def:type_name -> grpc.federation.VariableDefinition
18, // 18: grpc.federation.VariableDefinition.map:type_name -> grpc.federation.MapExpr
20, // 19: grpc.federation.VariableDefinition.message:type_name -> grpc.federation.MessageExpr
22, // 20: grpc.federation.VariableDefinition.call:type_name -> grpc.federation.CallExpr
29, // 21: grpc.federation.VariableDefinition.validation:type_name -> grpc.federation.ValidationExpr
21, // 22: grpc.federation.VariableDefinition.enum:type_name -> grpc.federation.EnumExpr
23, // 23: grpc.federation.VariableDefinition.switch:type_name -> grpc.federation.SwitchExpr
19, // 24: grpc.federation.MapExpr.iterator:type_name -> grpc.federation.Iterator
20, // 25: grpc.federation.MapExpr.message:type_name -> grpc.federation.MessageExpr
21, // 26: grpc.federation.MapExpr.enum:type_name -> grpc.federation.EnumExpr
35, // 27: grpc.federation.MessageExpr.args:type_name -> grpc.federation.Argument
33, // 28: grpc.federation.CallExpr.request:type_name -> grpc.federation.MethodRequest
30, // 29: grpc.federation.CallExpr.retry:type_name -> grpc.federation.RetryPolicy
26, // 30: grpc.federation.CallExpr.error:type_name -> grpc.federation.GRPCError
28, // 31: grpc.federation.CallExpr.option:type_name -> grpc.federation.GRPCCallOption
24, // 32: grpc.federation.SwitchExpr.case:type_name -> grpc.federation.SwitchCaseExpr
25, // 33: grpc.federation.SwitchExpr.default:type_name -> grpc.federation.SwitchDefaultExpr
17, // 34: grpc.federation.SwitchCaseExpr.def:type_name -> grpc.federation.VariableDefinition
17, // 35: grpc.federation.SwitchDefaultExpr.def:type_name -> grpc.federation.VariableDefinition
17, // 36: grpc.federation.GRPCError.def:type_name -> grpc.federation.VariableDefinition
50, // 37: grpc.federation.GRPCError.code:type_name -> google.rpc.Code
27, // 38: grpc.federation.GRPCError.details:type_name -> grpc.federation.GRPCErrorDetail
1, // 39: grpc.federation.GRPCError.log_level:type_name -> grpc.federation.GRPCError.LogLevel
17, // 40: grpc.federation.GRPCErrorDetail.def:type_name -> grpc.federation.VariableDefinition
20, // 41: grpc.federation.GRPCErrorDetail.message:type_name -> grpc.federation.MessageExpr
51, // 42: grpc.federation.GRPCErrorDetail.error_info:type_name -> google.rpc.ErrorInfo
52, // 43: grpc.federation.GRPCErrorDetail.retry_info:type_name -> google.rpc.RetryInfo
53, // 44: grpc.federation.GRPCErrorDetail.debug_info:type_name -> google.rpc.DebugInfo
54, // 45: grpc.federation.GRPCErrorDetail.quota_failure:type_name -> google.rpc.QuotaFailure
55, // 46: grpc.federation.GRPCErrorDetail.precondition_failure:type_name -> google.rpc.PreconditionFailure
56, // 47: grpc.federation.GRPCErrorDetail.bad_request:type_name -> google.rpc.BadRequest
57, // 48: grpc.federation.GRPCErrorDetail.request_info:type_name -> google.rpc.RequestInfo
58, // 49: grpc.federation.GRPCErrorDetail.resource_info:type_name -> google.rpc.ResourceInfo
59, // 50: grpc.federation.GRPCErrorDetail.help:type_name -> google.rpc.Help
60, // 51: grpc.federation.GRPCErrorDetail.localized_message:type_name -> google.rpc.LocalizedMessage
26, // 52: grpc.federation.ValidationExpr.error:type_name -> grpc.federation.GRPCError
31, // 53: grpc.federation.RetryPolicy.constant:type_name -> grpc.federation.RetryPolicyConstant
32, // 54: grpc.federation.RetryPolicy.exponential:type_name -> grpc.federation.RetryPolicyExponential
37, // 55: grpc.federation.FieldRule.oneof:type_name -> grpc.federation.FieldOneof
14, // 56: grpc.federation.FieldRule.env:type_name -> grpc.federation.EnvVarOption
17, // 57: grpc.federation.FieldOneof.def:type_name -> grpc.federation.VariableDefinition
39, // 58: grpc.federation.CELPlugin.export:type_name -> grpc.federation.CELPluginExport
45, // 59: grpc.federation.CELPluginExport.types:type_name -> grpc.federation.CELReceiverType
44, // 60: grpc.federation.CELPluginExport.functions:type_name -> grpc.federation.CELFunction
49, // 61: grpc.federation.CELPluginExport.variables:type_name -> grpc.federation.CELVariable
40, // 62: grpc.federation.CELPluginExport.capability:type_name -> grpc.federation.CELPluginCapability
41, // 63: grpc.federation.CELPluginCapability.env:type_name -> grpc.federation.CELPluginEnvCapability
42, // 64: grpc.federation.CELPluginCapability.file_system:type_name -> grpc.federation.CELPluginFileSystemCapability
43, // 65: grpc.federation.CELPluginCapability.network:type_name -> grpc.federation.CELPluginNetworkCapability
46, // 66: grpc.federation.CELFunction.args:type_name -> grpc.federation.CELFunctionArgument
47, // 67: grpc.federation.CELFunction.return:type_name -> grpc.federation.CELType
44, // 68: grpc.federation.CELReceiverType.methods:type_name -> grpc.federation.CELFunction
47, // 69: grpc.federation.CELFunctionArgument.type:type_name -> grpc.federation.CELType
0, // 70: grpc.federation.CELType.kind:type_name -> grpc.federation.TypeKind
47, // 71: grpc.federation.CELType.repeated:type_name -> grpc.federation.CELType
48, // 72: grpc.federation.CELType.map:type_name -> grpc.federation.CELMapType
47, // 73: grpc.federation.CELMapType.key:type_name -> grpc.federation.CELType
47, // 74: grpc.federation.CELMapType.value:type_name -> grpc.federation.CELType
47, // 75: grpc.federation.CELVariable.type:type_name -> grpc.federation.CELType
61, // 76: grpc.federation.file:extendee -> google.protobuf.FileOptions
62, // 77: grpc.federation.service:extendee -> google.protobuf.ServiceOptions
63, // 78: grpc.federation.method:extendee -> google.protobuf.MethodOptions
64, // 79: grpc.federation.message:extendee -> google.protobuf.MessageOptions
65, // 80: grpc.federation.field:extendee -> google.protobuf.FieldOptions
66, // 81: grpc.federation.enum:extendee -> google.protobuf.EnumOptions
67, // 82: grpc.federation.enum_value:extendee -> google.protobuf.EnumValueOptions
68, // 83: grpc.federation.oneof:extendee -> google.protobuf.OneofOptions
2, // 84: grpc.federation.file:type_name -> grpc.federation.FileRule
7, // 85: grpc.federation.service:type_name -> grpc.federation.ServiceRule
15, // 86: grpc.federation.method:type_name -> grpc.federation.MethodRule
16, // 87: grpc.federation.message:type_name -> grpc.federation.MessageRule
36, // 88: grpc.federation.field:type_name -> grpc.federation.FieldRule
3, // 89: grpc.federation.enum:type_name -> grpc.federation.EnumRule
4, // 90: grpc.federation.enum_value:type_name -> grpc.federation.EnumValueRule
6, // 91: grpc.federation.oneof:type_name -> grpc.federation.OneofRule
92, // [92:92] is the sub-list for method output_type
92, // [92:92] is the sub-list for method input_type
84, // [84:92] is the sub-list for extension type_name
76, // [76:84] is the sub-list for extension extendee
0, // [0:76] is the sub-list for field type_name
}
func init() { file_grpc_federation_federation_proto_init() }
func file_grpc_federation_federation_proto_init() {
if File_grpc_federation_federation_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_grpc_federation_federation_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*FileRule); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*EnumRule); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*EnumValueRule); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*EnumValueAttribute); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*OneofRule); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ServiceRule); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Env); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ServiceVariable); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ServiceVariableValidationExpr); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*EnvVar); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*EnvType); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*EnvMapType); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*EnvVarOption); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*MethodRule); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*MessageRule); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*VariableDefinition); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*MapExpr); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Iterator); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*MessageExpr); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*EnumExpr); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CallExpr); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*SwitchExpr); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*SwitchCaseExpr); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*SwitchDefaultExpr); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GRPCError); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GRPCErrorDetail); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GRPCCallOption); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ValidationExpr); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[28].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*RetryPolicy); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[29].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*RetryPolicyConstant); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[30].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*RetryPolicyExponential); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[31].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*MethodRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[32].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*MethodResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[33].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Argument); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[34].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*FieldRule); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[35].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*FieldOneof); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[36].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CELPlugin); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[37].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CELPluginExport); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[38].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CELPluginCapability); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[39].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CELPluginEnvCapability); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[40].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CELPluginFileSystemCapability); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[41].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CELPluginNetworkCapability); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[42].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CELFunction); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[43].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CELReceiverType); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[44].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CELFunctionArgument); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[45].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CELType); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[46].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CELMapType); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[47].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CELVariable); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
file_grpc_federation_federation_proto_msgTypes[2].OneofWrappers = []interface{}{}
file_grpc_federation_federation_proto_msgTypes[7].OneofWrappers = []interface{}{
(*ServiceVariable_By)(nil),
(*ServiceVariable_Map)(nil),
(*ServiceVariable_Message)(nil),
(*ServiceVariable_Validation)(nil),
(*ServiceVariable_Enum)(nil),
(*ServiceVariable_Switch)(nil),
}
file_grpc_federation_federation_proto_msgTypes[9].OneofWrappers = []interface{}{}
file_grpc_federation_federation_proto_msgTypes[10].OneofWrappers = []interface{}{
(*EnvType_Kind)(nil),
(*EnvType_Repeated)(nil),
(*EnvType_Map)(nil),
}
file_grpc_federation_federation_proto_msgTypes[12].OneofWrappers = []interface{}{}
file_grpc_federation_federation_proto_msgTypes[13].OneofWrappers = []interface{}{}
file_grpc_federation_federation_proto_msgTypes[14].OneofWrappers = []interface{}{}
file_grpc_federation_federation_proto_msgTypes[15].OneofWrappers = []interface{}{
(*VariableDefinition_By)(nil),
(*VariableDefinition_Map)(nil),
(*VariableDefinition_Message)(nil),
(*VariableDefinition_Call)(nil),
(*VariableDefinition_Validation)(nil),
(*VariableDefinition_Enum)(nil),
(*VariableDefinition_Switch)(nil),
}
file_grpc_federation_federation_proto_msgTypes[16].OneofWrappers = []interface{}{
(*MapExpr_By)(nil),
(*MapExpr_Message)(nil),
(*MapExpr_Enum)(nil),
}
file_grpc_federation_federation_proto_msgTypes[20].OneofWrappers = []interface{}{}
file_grpc_federation_federation_proto_msgTypes[22].OneofWrappers = []interface{}{
(*SwitchCaseExpr_By)(nil),
}
file_grpc_federation_federation_proto_msgTypes[23].OneofWrappers = []interface{}{
(*SwitchDefaultExpr_By)(nil),
}
file_grpc_federation_federation_proto_msgTypes[24].OneofWrappers = []interface{}{}
file_grpc_federation_federation_proto_msgTypes[26].OneofWrappers = []interface{}{}
file_grpc_federation_federation_proto_msgTypes[27].OneofWrappers = []interface{}{}
file_grpc_federation_federation_proto_msgTypes[28].OneofWrappers = []interface{}{
(*RetryPolicy_Constant)(nil),
(*RetryPolicy_Exponential)(nil),
}
file_grpc_federation_federation_proto_msgTypes[29].OneofWrappers = []interface{}{}
file_grpc_federation_federation_proto_msgTypes[30].OneofWrappers = []interface{}{}
file_grpc_federation_federation_proto_msgTypes[31].OneofWrappers = []interface{}{}
file_grpc_federation_federation_proto_msgTypes[32].OneofWrappers = []interface{}{}
file_grpc_federation_federation_proto_msgTypes[33].OneofWrappers = []interface{}{}
file_grpc_federation_federation_proto_msgTypes[34].OneofWrappers = []interface{}{}
file_grpc_federation_federation_proto_msgTypes[35].OneofWrappers = []interface{}{
(*FieldOneof_If)(nil),
(*FieldOneof_Default)(nil),
}
file_grpc_federation_federation_proto_msgTypes[38].OneofWrappers = []interface{}{}
file_grpc_federation_federation_proto_msgTypes[45].OneofWrappers = []interface{}{
(*CELType_Kind)(nil),
(*CELType_Repeated)(nil),
(*CELType_Map)(nil),
(*CELType_Message)(nil),
(*CELType_Enum)(nil),
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_grpc_federation_federation_proto_rawDesc,
NumEnums: 2,
NumMessages: 48,
NumExtensions: 8,
NumServices: 0,
},
GoTypes: file_grpc_federation_federation_proto_goTypes,
DependencyIndexes: file_grpc_federation_federation_proto_depIdxs,
EnumInfos: file_grpc_federation_federation_proto_enumTypes,
MessageInfos: file_grpc_federation_federation_proto_msgTypes,
ExtensionInfos: file_grpc_federation_federation_proto_extTypes,
}.Build()
File_grpc_federation_federation_proto = out.File
file_grpc_federation_federation_proto_rawDesc = nil
file_grpc_federation_federation_proto_goTypes = nil
file_grpc_federation_federation_proto_depIdxs = nil
}
================================================
FILE: _examples/10_oneof/main_test.go
================================================
package main_test
import (
"context"
"log/slog"
"net"
"os"
"testing"
"github.com/google/go-cmp/cmp"
"github.com/google/go-cmp/cmp/cmpopts"
"go.opentelemetry.io/otel"
"go.opentelemetry.io/otel/attribute"
"go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc"
"go.opentelemetry.io/otel/propagation"
"go.opentelemetry.io/otel/sdk/resource"
sdktrace "go.opentelemetry.io/otel/sdk/trace"
semconv "go.opentelemetry.io/otel/semconv/v1.4.0"
"go.uber.org/goleak"
"google.golang.org/grpc"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/status"
"google.golang.org/grpc/test/bufconn"
"example/federation"
user "example/user"
)
const bufSize = 1024
var (
listener *bufconn.Listener
userClient user.UserServiceClient
)
func dialer(ctx context.Context, address string) (net.Conn, error) {
return listener.Dial()
}
type clientConfig struct{}
func (c *clientConfig) User_UserServiceClient(cfg federation.FederationServiceClientConfig) (user.UserServiceClient, error) {
return userClient, nil
}
type UserServer struct {
*user.UnimplementedUserServiceServer
}
func (s *UserServer) GetUser(ctx context.Context, req *user.GetUserRequest) (*user.GetUserResponse, error) {
return &user.GetUserResponse{
User: &user.User{
Id: req.Id,
},
}, nil
}
func TestFederation(t *testing.T) {
defer goleak.VerifyNone(t)
ctx := context.Background()
listener = bufconn.Listen(bufSize)
if os.Getenv("ENABLE_JAEGER") != "" {
exporter, err := otlptracegrpc.New(ctx, otlptracegrpc.WithInsecure())
if err != nil {
t.Fatal(err)
}
tp := sdktrace.NewTracerProvider(
sdktrace.WithBatcher(exporter),
sdktrace.WithResource(
resource.NewWithAttributes(
semconv.SchemaURL,
semconv.ServiceNameKey.String("example10/oneof"),
semconv.ServiceVersionKey.String("1.0.0"),
attribute.String("environment", "dev"),
),
),
sdktrace.WithSampler(sdktrace.AlwaysSample()),
)
defer tp.Shutdown(ctx)
otel.SetTextMapPropagator(propagation.TraceContext{})
otel.SetTracerProvider(tp)
}
conn, err := grpc.DialContext(ctx, "", grpc.WithContextDialer(dialer), grpc.WithInsecure())
if err != nil {
t.Fatal(err)
}
defer conn.Close()
userClient = user.NewUserServiceClient(conn)
grpcServer := grpc.NewServer()
defer grpcServer.Stop()
logger := slog.New(slog.NewJSONHandler(os.Stdout, &slog.HandlerOptions{
Level: slog.LevelDebug,
}))
federationServer, err := federation.NewFederationService(federation.FederationServiceConfig{
Client: new(clientConfig),
Logger: logger,
})
if err != nil {
t.Fatal(err)
}
defer federation.CleanupFederationService(ctx, federationServer)
user.RegisterUserServiceServer(grpcServer, &UserServer{})
federation.RegisterFederationServiceServer(grpcServer, federationServer)
go func() {
if err := grpcServer.Serve(listener); err != nil {
t.Fatal(err)
}
}()
client := federation.NewFederationServiceClient(conn)
res, err := client.Get(ctx, &federation.GetRequest{})
if err != nil {
t.Fatal(err)
}
if diff := cmp.Diff(res, &federation.GetResponse{
User: &federation.User{
Id: "b",
},
Msg: "bbb",
NestedMsg: &federation.NestedMessageSelection_Nest{
Value: &federation.NestedMessageSelection_Nest_Int{Int: 1},
},
CastOneof: &federation.CastOneof{
CastOneof: &federation.CastOneof_Type{
Type: federation.UserType_USER_TYPE_ANONYMOUS,
},
},
}, cmpopts.IgnoreUnexported(
federation.GetResponse{},
federation.User{},
federation.NestedMessageSelection_Nest{},
federation.NestedMessageSelection_Nest_Int{},
federation.CastOneof{},
federation.CastOneof_Type{},
)); diff != "" {
t.Errorf("(-got, +want)\n%s", diff)
}
}
func TestFederation_NoValue(t *testing.T) {
defer goleak.VerifyNone(t)
ctx := context.Background()
listener = bufconn.Listen(bufSize)
if os.Getenv("ENABLE_JAEGER") != "" {
exporter, err := otlptracegrpc.New(ctx, otlptracegrpc.WithInsecure())
if err != nil {
t.Fatal(err)
}
tp := sdktrace.NewTracerProvider(
sdktrace.WithBatcher(exporter),
sdktrace.WithResource(
resource.NewWithAttributes(
semconv.SchemaURL,
semconv.ServiceNameKey.String("example10/oneof"),
semconv.ServiceVersionKey.String("1.0.0"),
attribute.String("environment", "dev"),
),
),
sdktrace.WithSampler(sdktrace.AlwaysSample()),
)
defer tp.Shutdown(ctx)
otel.SetTextMapPropagator(propagation.TraceContext{})
otel.SetTracerProvider(tp)
}
conn, err := grpc.DialContext(ctx, "", grpc.WithContextDialer(dialer), grpc.WithInsecure())
if err != nil {
t.Fatal(err)
}
defer conn.Close()
userClient = user.NewUserServiceClient(conn)
grpcServer := grpc.NewServer()
defer grpcServer.Stop()
logger := slog.New(slog.NewJSONHandler(os.Stdout, &slog.HandlerOptions{
Level: slog.LevelDebug,
}))
federationServer, err := federation.NewFederationService(federation.FederationServiceConfig{
Client: new(clientConfig),
Logger: logger,
})
if err != nil {
t.Fatal(err)
}
defer federation.CleanupFederationService(ctx, federationServer)
user.RegisterUserServiceServer(grpcServer, &UserServer{})
federation.RegisterFederationServiceServer(grpcServer, federationServer)
go func() {
if err := grpcServer.Serve(listener); err != nil {
t.Fatal(err)
}
}()
client := federation.NewFederationServiceClient(conn)
_, err = client.GetNoValue(ctx, &federation.GetNoValueRequest{})
if err == nil {
t.Fatal("unexpected error nil")
}
expectedErr := status.New(codes.Unknown, "NoValue is invalid field")
if diff := cmp.Diff(err.Error(), expectedErr.Err().Error()); diff != "" {
t.Errorf("(-got, +want)\n%s", diff)
}
}
================================================
FILE: _examples/10_oneof/proto/buf.yaml
================================================
version: v1
breaking:
use:
- FILE
lint:
use:
- DEFAULT
================================================
FILE: _examples/10_oneof/proto/federation/federation.proto
================================================
syntax = "proto3";
package org.federation;
import "grpc/federation/federation.proto";
option go_package = "example/federation;federation";
option (grpc.federation.file)= {
import: ["user/user.proto"]
};
service FederationService {
option (grpc.federation.service) = {};
rpc Get(GetRequest) returns (GetResponse) {};
rpc GetNoValue(GetNoValueRequest) returns (GetNoValueResponse) {};
}
message GetRequest {}
message GetResponse {
option (grpc.federation.message) = {
def {
name: "sel"
message {
name: "UserSelection"
args { name: "value", by: "'foo'" }
}
}
def { name: "msg_sel" message { name: "MessageSelection" } }
def { name: "nested_msg" message { name: "NestedMessageSelection.Nest" }}
def { name: "cast_oneof" message { name: "CastOneof" } }
};
User user = 1 [(grpc.federation.field).by = "sel.user"];
string msg = 2 [(grpc.federation.field).by = "msg_sel.message"];
NestedMessageSelection.Nest nested_msg = 3 [(grpc.federation.field).by = "nested_msg"];
CastOneof cast_oneof = 4 [(grpc.federation.field).by = "cast_oneof"];
}
message GetNoValueRequest {}
message GetNoValueResponse {
option (grpc.federation.message) = {
def { name: "no_value_sel" message { name: "NoValueSelection" } }
};
M no_value = 1 [(grpc.federation.field).by = "no_value_sel.no_value"];
}
message UserSelection {
oneof user {
User user_a = 1 [
(grpc.federation.field).oneof = {
if: "false"
def {
name: "ua"
message {
name: "User"
args [
{ name: "user_id", by: "'a'" },
{ name: "foo" by: "0" },
{ name: "bar" by: "'hello'"}
]
}
}
by: "ua"
}
];
User user_b = 2 [
(grpc.federation.field).oneof = {
if: "true"
def {
name: "ub"
message {
name: "User"
args [
{ name: "user_id", by: "'b'" },
{ name: "foo" by: "0" },
{ name: "bar" by: "'hello'"}
]
}
}
by: "ub"
}
];
User user_c = 3 [
(grpc.federation.field).oneof = {
default: true
def {
name: "uc"
message {
name: "User"
args [
{ name: "user_id", by: "$.value" },
{ name: "foo" by: "0" },
{ name: "bar" by: "'hello'"}
]
}
}
by: "uc"
}
];
}
}
message MessageSelection {
oneof message {
string msg_a = 1 [
(grpc.federation.field).oneof = {
if: "false"
by: "'aaa'"
}
];
string msg_b = 2 [
(grpc.federation.field).oneof = {
if: "true"
by: "'bbb'"
}
];
string msg_c = 3 [
(grpc.federation.field).oneof = {
default: true
by: "'ccc'"
}
];
}
}
message NoValueSelection {
oneof no_value {
M m_a = 1 [
(grpc.federation.field).oneof = {
if: "false"
by: "M{value: 'a'}"
}
];
M m_b = 2 [
(grpc.federation.field).oneof = {
if: "false"
by: "M{value: 'b'}"
}
];
}
}
message NestedMessageSelection {
message Nest {
oneof value {
int64 int = 1 [(grpc.federation.field).oneof = {
if: "true"
by: "1"
}];
string text = 2 [(grpc.federation.field).oneof = {
if: "false"
by: "'foo'"
}];
}
}
}
message CastOneof {
oneof cast_oneof {
int64 num = 1 [(grpc.federation.field).oneof = {
if: "false"
by: "uint(1)"
}];
User user = 2 [(grpc.federation.field).oneof = {
if: "false"
by: "user.User{id: 'foo'}"
}];
UserType type = 3 [(grpc.federation.field).oneof = {
if: "true"
by: "user.UserType.value('USER_TYPE_ANONYMOUS')"
}];
}
}
message M {
string value = 1 [(grpc.federation.field).by = "'foo'"];
}
message User {
option (grpc.federation.message) = {
alias: "user.User"
def {
call {
method: "user.UserService/GetUser"
request [
{ field: "id", by: "$.user_id" },
{ field: "foo" by: "$.foo" if: "$.foo != 0" },
{ field: "bar" by: "$.bar" if: "$.bar != ''" }
]
}
}
};
string id = 1 [(grpc.federation.field).by = "$.user_id"];
}
enum UserType {
option (grpc.federation.enum).alias = "user.UserType";
USER_TYPE_UNSPECIFIED = 0;
USER_TYPE_ANONYMOUS = 1;
}
================================================
FILE: _examples/10_oneof/proto/user/user.proto
================================================
syntax = "proto3";
package user;
option go_package = "example/user;user";
service UserService {
rpc GetUser(GetUserRequest) returns (GetUserResponse) {};
}
message GetUserRequest {
string id = 1;
oneof foobar {
int64 foo = 2;
string bar = 3;
}
}
message GetUserResponse {
User user = 1;
}
message User {
string id = 1;
string name = 2;
}
enum UserType {
USER_TYPE_UNSPECIFIED = 0;
USER_TYPE_ANONYMOUS = 1;
}
================================================
FILE: _examples/10_oneof/user/user.pb.go
================================================
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.33.0
// protoc (unknown)
// source: user/user.proto
package user
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
type UserType int32
const (
UserType_USER_TYPE_UNSPECIFIED UserType = 0
UserType_USER_TYPE_ANONYMOUS UserType = 1
)
// Enum value maps for UserType.
var (
UserType_name = map[int32]string{
0: "USER_TYPE_UNSPECIFIED",
1: "USER_TYPE_ANONYMOUS",
}
UserType_value = map[string]int32{
"USER_TYPE_UNSPECIFIED": 0,
"USER_TYPE_ANONYMOUS": 1,
}
)
func (x UserType) Enum() *UserType {
p := new(UserType)
*p = x
return p
}
func (x UserType) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (UserType) Descriptor() protoreflect.EnumDescriptor {
return file_user_user_proto_enumTypes[0].Descriptor()
}
func (UserType) Type() protoreflect.EnumType {
return &file_user_user_proto_enumTypes[0]
}
func (x UserType) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use UserType.Descriptor instead.
func (UserType) EnumDescriptor() ([]byte, []int) {
return file_user_user_proto_rawDescGZIP(), []int{0}
}
type GetUserRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
// Types that are assignable to Foobar:
//
// *GetUserRequest_Foo
// *GetUserRequest_Bar
Foobar isGetUserRequest_Foobar `protobuf_oneof:"foobar"`
}
func (x *GetUserRequest) Reset() {
*x = GetUserRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_user_user_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GetUserRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetUserRequest) ProtoMessage() {}
func (x *GetUserRequest) ProtoReflect() protoreflect.Message {
mi := &file_user_user_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GetUserRequest.ProtoReflect.Descriptor instead.
func (*GetUserRequest) Descriptor() ([]byte, []int) {
return file_user_user_proto_rawDescGZIP(), []int{0}
}
func (x *GetUserRequest) GetId() string {
if x != nil {
return x.Id
}
return ""
}
func (m *GetUserRequest) GetFoobar() isGetUserRequest_Foobar {
if m != nil {
return m.Foobar
}
return nil
}
func (x *GetUserRequest) GetFoo() int64 {
if x, ok := x.GetFoobar().(*GetUserRequest_Foo); ok {
return x.Foo
}
return 0
}
func (x *GetUserRequest) GetBar() string {
if x, ok := x.GetFoobar().(*GetUserRequest_Bar); ok {
return x.Bar
}
return ""
}
type isGetUserRequest_Foobar interface {
isGetUserRequest_Foobar()
}
type GetUserRequest_Foo struct {
Foo int64 `protobuf:"varint,2,opt,name=foo,proto3,oneof"`
}
type GetUserRequest_Bar struct {
Bar string `protobuf:"bytes,3,opt,name=bar,proto3,oneof"`
}
func (*GetUserRequest_Foo) isGetUserRequest_Foobar() {}
func (*GetUserRequest_Bar) isGetUserRequest_Foobar() {}
type GetUserResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
User *User `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"`
}
func (x *GetUserResponse) Reset() {
*x = GetUserResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_user_user_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GetUserResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetUserResponse) ProtoMessage() {}
func (x *GetUserResponse) ProtoReflect() protoreflect.Message {
mi := &file_user_user_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GetUserResponse.ProtoReflect.Descriptor instead.
func (*GetUserResponse) Descriptor() ([]byte, []int) {
return file_user_user_proto_rawDescGZIP(), []int{1}
}
func (x *GetUserResponse) GetUser() *User {
if x != nil {
return x.User
}
return nil
}
type User struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
}
func (x *User) Reset() {
*x = User{}
if protoimpl.UnsafeEnabled {
mi := &file_user_user_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *User) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*User) ProtoMessage() {}
func (x *User) ProtoReflect() protoreflect.Message {
mi := &file_user_user_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use User.ProtoReflect.Descriptor instead.
func (*User) Descriptor() ([]byte, []int) {
return file_user_user_proto_rawDescGZIP(), []int{2}
}
func (x *User) GetId() string {
if x != nil {
return x.Id
}
return ""
}
func (x *User) GetName() string {
if x != nil {
return x.Name
}
return ""
}
var File_user_user_proto protoreflect.FileDescriptor
var file_user_user_proto_rawDesc = []byte{
0x0a, 0x0f, 0x75, 0x73, 0x65, 0x72, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x12, 0x04, 0x75, 0x73, 0x65, 0x72, 0x22, 0x52, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x55, 0x73,
0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18,
0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x03, 0x66, 0x6f, 0x6f,
0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x48, 0x00, 0x52, 0x03, 0x66, 0x6f, 0x6f, 0x12, 0x12, 0x0a,
0x03, 0x62, 0x61, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x03, 0x62, 0x61,
0x72, 0x42, 0x08, 0x0a, 0x06, 0x66, 0x6f, 0x6f, 0x62, 0x61, 0x72, 0x22, 0x31, 0x0a, 0x0f, 0x47,
0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1e,
0x0a, 0x04, 0x75, 0x73, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x75,
0x73, 0x65, 0x72, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x04, 0x75, 0x73, 0x65, 0x72, 0x22, 0x2a,
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, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02,
0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x2a, 0x3e, 0x0a, 0x08, 0x55, 0x73,
0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x12, 0x19, 0x0a, 0x15, 0x55, 0x53, 0x45, 0x52, 0x5f, 0x54,
0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10,
0x00, 0x12, 0x17, 0x0a, 0x13, 0x55, 0x53, 0x45, 0x52, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x41,
0x4e, 0x4f, 0x4e, 0x59, 0x4d, 0x4f, 0x55, 0x53, 0x10, 0x01, 0x32, 0x47, 0x0a, 0x0b, 0x55, 0x73,
0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x38, 0x0a, 0x07, 0x47, 0x65, 0x74,
0x55, 0x73, 0x65, 0x72, 0x12, 0x14, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x47, 0x65, 0x74, 0x55,
0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x75, 0x73, 0x65,
0x72, 0x2e, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
0x65, 0x22, 0x00, 0x42, 0x58, 0x0a, 0x08, 0x63, 0x6f, 0x6d, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x42,
0x09, 0x55, 0x73, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x11, 0x65, 0x78,
0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x3b, 0x75, 0x73, 0x65, 0x72, 0xa2,
0x02, 0x03, 0x55, 0x58, 0x58, 0xaa, 0x02, 0x04, 0x55, 0x73, 0x65, 0x72, 0xca, 0x02, 0x04, 0x55,
0x73, 0x65, 0x72, 0xe2, 0x02, 0x10, 0x55, 0x73, 0x65, 0x72, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65,
0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x04, 0x55, 0x73, 0x65, 0x72, 0x62, 0x06, 0x70,
0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_user_user_proto_rawDescOnce sync.Once
file_user_user_proto_rawDescData = file_user_user_proto_rawDesc
)
func file_user_user_proto_rawDescGZIP() []byte {
file_user_user_proto_rawDescOnce.Do(func() {
file_user_user_proto_rawDescData = protoimpl.X.CompressGZIP(file_user_user_proto_rawDescData)
})
return file_user_user_proto_rawDescData
}
var file_user_user_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
var file_user_user_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
var file_user_user_proto_goTypes = []interface{}{
(UserType)(0), // 0: user.UserType
(*GetUserRequest)(nil), // 1: user.GetUserRequest
(*GetUserResponse)(nil), // 2: user.GetUserResponse
(*User)(nil), // 3: user.User
}
var file_user_user_proto_depIdxs = []int32{
3, // 0: user.GetUserResponse.user:type_name -> user.User
1, // 1: user.UserService.GetUser:input_type -> user.GetUserRequest
2, // 2: user.UserService.GetUser:output_type -> user.GetUserResponse
2, // [2:3] is the sub-list for method output_type
1, // [1:2] is the sub-list for method input_type
1, // [1:1] is the sub-list for extension type_name
1, // [1:1] is the sub-list for extension extendee
0, // [0:1] is the sub-list for field type_name
}
func init() { file_user_user_proto_init() }
func file_user_user_proto_init() {
if File_user_user_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_user_user_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetUserRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_user_user_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetUserResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_user_user_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*User); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
file_user_user_proto_msgTypes[0].OneofWrappers = []interface{}{
(*GetUserRequest_Foo)(nil),
(*GetUserRequest_Bar)(nil),
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_user_user_proto_rawDesc,
NumEnums: 1,
NumMessages: 3,
NumExtensions: 0,
NumServices: 1,
},
GoTypes: file_user_user_proto_goTypes,
DependencyIndexes: file_user_user_proto_depIdxs,
EnumInfos: file_user_user_proto_enumTypes,
MessageInfos: file_user_user_proto_msgTypes,
}.Build()
File_user_user_proto = out.File
file_user_user_proto_rawDesc = nil
file_user_user_proto_goTypes = nil
file_user_user_proto_depIdxs = nil
}
================================================
FILE: _examples/10_oneof/user/user_grpc.pb.go
================================================
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.3.0
// - protoc (unknown)
// source: user/user.proto
package user
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 (
UserService_GetUser_FullMethodName = "/user.UserService/GetUser"
)
// UserServiceClient is the client API for UserService 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 UserServiceClient interface {
GetUser(ctx context.Context, in *GetUserRequest, opts ...grpc.CallOption) (*GetUserResponse, error)
}
type userServiceClient struct {
cc grpc.ClientConnInterface
}
func NewUserServiceClient(cc grpc.ClientConnInterface) UserServiceClient {
return &userServiceClient{cc}
}
func (c *userServiceClient) GetUser(ctx context.Context, in *GetUserRequest, opts ...grpc.CallOption) (*GetUserResponse, error) {
out := new(GetUserResponse)
err := c.cc.Invoke(ctx, UserService_GetUser_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// UserServiceServer is the server API for UserService service.
// All implementations must embed UnimplementedUserServiceServer
// for forward compatibility
type UserServiceServer interface {
GetUser(context.Context, *GetUserRequest) (*GetUserResponse, error)
mustEmbedUnimplementedUserServiceServer()
}
// UnimplementedUserServiceServer must be embedded to have forward compatible implementations.
type UnimplementedUserServiceServer struct {
}
func (UnimplementedUserServiceServer) GetUser(context.Context, *GetUserRequest) (*GetUserResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetUser not implemented")
}
func (UnimplementedUserServiceServer) mustEmbedUnimplementedUserServiceServer() {}
// UnsafeUserServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to UserServiceServer will
// result in compilation errors.
type UnsafeUserServiceServer interface {
mustEmbedUnimplementedUserServiceServer()
}
func RegisterUserServiceServer(s grpc.ServiceRegistrar, srv UserServiceServer) {
s.RegisterService(&UserService_ServiceDesc, srv)
}
func _UserService_GetUser_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetUserRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(UserServiceServer).GetUser(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: UserService_GetUser_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(UserServiceServer).GetUser(ctx, req.(*GetUserRequest))
}
return interceptor(ctx, in, info, handler)
}
// UserService_ServiceDesc is the grpc.ServiceDesc for UserService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var UserService_ServiceDesc = grpc.ServiceDesc{
ServiceName: "user.UserService",
HandlerType: (*UserServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "GetUser",
Handler: _UserService_GetUser_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "user/user.proto",
}
================================================
FILE: _examples/11_multi_service/.gitignore
================================================
grpc/federation
================================================
FILE: _examples/11_multi_service/Makefile
================================================
MAKEFILE_DIR := $(dir $(lastword $(MAKEFILE_LIST)))
GOBIN := $(MAKEFILE_DIR)/../../bin
PATH := $(GOBIN):$(PATH)
JAEGER_IMAGE := jaegertracing/all-in-one:latest
.PHONY: generate
generate:
$(GOBIN)/buf generate
.PHONY: lint
lint:
@$(GOBIN)/grpc-federation-linter -Iproto -Iproto_deps ./proto/federation/federation.proto
.PHONY: test
test:
go test -race ./ -count=1
.PHONY: grpc-federation/generate
grpc-federation/generate:
@$(GOBIN)/grpc-federation-generator ./proto/federation/federation.proto
.PHONY: grpc-federation/watch
grpc-federation/watch:
@$(GOBIN)/grpc-federation-generator -w
.PHONY: jaeger/start
jaeger/start:
@docker run \
-e COLLECTOR_OTLP_ENABLED=true \
-p 16686:16686 \
-p 4317:4317 \
-p 4318:4318 \
-d \
$(JAEGER_IMAGE)
.PHONY: jaeger/stop
jaeger/stop:
@docker stop $(shell docker ps -q --filter ancestor=$(JAEGER_IMAGE))
================================================
FILE: _examples/11_multi_service/buf.gen.yaml
================================================
version: v1
managed:
enabled: true
plugins:
- plugin: go
out: .
opt: paths=source_relative
- plugin: go-grpc
out: .
opt: paths=source_relative
- plugin: grpc-federation
out: .
opt:
- paths=source_relative
- import_paths=proto
================================================
FILE: _examples/11_multi_service/buf.work.yaml
================================================
version: v1
directories:
- proto
- proto_deps
================================================
FILE: _examples/11_multi_service/comment/comment.pb.go
================================================
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.33.0
// protoc (unknown)
// source: comment/comment.proto
package comment
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
type CommentType int32
const (
CommentType_UNKNOWN CommentType = 0
CommentType_TYPE1 CommentType = 1
CommentType_TYPE2 CommentType = 2
)
// Enum value maps for CommentType.
var (
CommentType_name = map[int32]string{
0: "UNKNOWN",
1: "TYPE1",
2: "TYPE2",
}
CommentType_value = map[string]int32{
"UNKNOWN": 0,
"TYPE1": 1,
"TYPE2": 2,
}
)
func (x CommentType) Enum() *CommentType {
p := new(CommentType)
*p = x
return p
}
func (x CommentType) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (CommentType) Descriptor() protoreflect.EnumDescriptor {
return file_comment_comment_proto_enumTypes[0].Descriptor()
}
func (CommentType) Type() protoreflect.EnumType {
return &file_comment_comment_proto_enumTypes[0]
}
func (x CommentType) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use CommentType.Descriptor instead.
func (CommentType) EnumDescriptor() ([]byte, []int) {
return file_comment_comment_proto_rawDescGZIP(), []int{0}
}
var File_comment_comment_proto protoreflect.FileDescriptor
var file_comment_comment_proto_rawDesc = []byte{
0x0a, 0x15, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e,
0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74,
0x2a, 0x30, 0x0a, 0x0b, 0x43, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12,
0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05,
0x54, 0x59, 0x50, 0x45, 0x31, 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, 0x54, 0x59, 0x50, 0x45, 0x32,
0x10, 0x02, 0x42, 0x70, 0x0a, 0x0b, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e,
0x74, 0x42, 0x0c, 0x43, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50,
0x01, 0x5a, 0x17, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x65,
0x6e, 0x74, 0x3b, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0xa2, 0x02, 0x03, 0x43, 0x58, 0x58,
0xaa, 0x02, 0x07, 0x43, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0xca, 0x02, 0x07, 0x43, 0x6f, 0x6d,
0x6d, 0x65, 0x6e, 0x74, 0xe2, 0x02, 0x13, 0x43, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x5c, 0x47,
0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x07, 0x43, 0x6f, 0x6d,
0x6d, 0x65, 0x6e, 0x74, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_comment_comment_proto_rawDescOnce sync.Once
file_comment_comment_proto_rawDescData = file_comment_comment_proto_rawDesc
)
func file_comment_comment_proto_rawDescGZIP() []byte {
file_comment_comment_proto_rawDescOnce.Do(func() {
file_comment_comment_proto_rawDescData = protoimpl.X.CompressGZIP(file_comment_comment_proto_rawDescData)
})
return file_comment_comment_proto_rawDescData
}
var file_comment_comment_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
var file_comment_comment_proto_goTypes = []interface{}{
(CommentType)(0), // 0: comment.CommentType
}
var file_comment_comment_proto_depIdxs = []int32{
0, // [0:0] is the sub-list for method output_type
0, // [0:0] is the sub-list for method input_type
0, // [0:0] is the sub-list for extension type_name
0, // [0:0] is the sub-list for extension extendee
0, // [0:0] is the sub-list for field type_name
}
func init() { file_comment_comment_proto_init() }
func file_comment_comment_proto_init() {
if File_comment_comment_proto != nil {
return
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_comment_comment_proto_rawDesc,
NumEnums: 1,
NumMessages: 0,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_comment_comment_proto_goTypes,
DependencyIndexes: file_comment_comment_proto_depIdxs,
EnumInfos: file_comment_comment_proto_enumTypes,
}.Build()
File_comment_comment_proto = out.File
file_comment_comment_proto_rawDesc = nil
file_comment_comment_proto_goTypes = nil
file_comment_comment_proto_depIdxs = nil
}
================================================
FILE: _examples/11_multi_service/favorite/favorite.pb.go
================================================
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.33.0
// protoc (unknown)
// source: favorite/favorite.proto
package favorite
import (
_ "github.com/mercari/grpc-federation/grpc/federation"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
type FavoriteType int32
const (
FavoriteType_UNKNOWN FavoriteType = 0
FavoriteType_TYPE1 FavoriteType = 1
FavoriteType_TYPE2 FavoriteType = 2
)
// Enum value maps for FavoriteType.
var (
FavoriteType_name = map[int32]string{
0: "UNKNOWN",
1: "TYPE1",
2: "TYPE2",
}
FavoriteType_value = map[string]int32{
"UNKNOWN": 0,
"TYPE1": 1,
"TYPE2": 2,
}
)
func (x FavoriteType) Enum() *FavoriteType {
p := new(FavoriteType)
*p = x
return p
}
func (x FavoriteType) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (FavoriteType) Descriptor() protoreflect.EnumDescriptor {
return file_favorite_favorite_proto_enumTypes[0].Descriptor()
}
func (FavoriteType) Type() protoreflect.EnumType {
return &file_favorite_favorite_proto_enumTypes[0]
}
func (x FavoriteType) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use FavoriteType.Descriptor instead.
func (FavoriteType) EnumDescriptor() ([]byte, []int) {
return file_favorite_favorite_proto_rawDescGZIP(), []int{0}
}
var File_favorite_favorite_proto protoreflect.FileDescriptor
var file_favorite_favorite_proto_rawDesc = []byte{
0x0a, 0x17, 0x66, 0x61, 0x76, 0x6f, 0x72, 0x69, 0x74, 0x65, 0x2f, 0x66, 0x61, 0x76, 0x6f, 0x72,
0x69, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x08, 0x66, 0x61, 0x76, 0x6f, 0x72,
0x69, 0x74, 0x65, 0x1a, 0x20, 0x67, 0x72, 0x70, 0x63, 0x2f, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61,
0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2a, 0x4d, 0x0a, 0x0c, 0x46, 0x61, 0x76, 0x6f, 0x72, 0x69, 0x74,
0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e,
0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x54, 0x59, 0x50, 0x45, 0x31, 0x10, 0x01, 0x12, 0x09, 0x0a,
0x05, 0x54, 0x59, 0x50, 0x45, 0x32, 0x10, 0x02, 0x1a, 0x1a, 0x9a, 0x4a, 0x17, 0x0a, 0x15, 0x66,
0x61, 0x76, 0x6f, 0x72, 0x69, 0x74, 0x65, 0x2e, 0x46, 0x61, 0x76, 0x6f, 0x72, 0x69, 0x74, 0x65,
0x54, 0x79, 0x70, 0x65, 0x42, 0x78, 0x0a, 0x0c, 0x63, 0x6f, 0x6d, 0x2e, 0x66, 0x61, 0x76, 0x6f,
0x72, 0x69, 0x74, 0x65, 0x42, 0x0d, 0x46, 0x61, 0x76, 0x6f, 0x72, 0x69, 0x74, 0x65, 0x50, 0x72,
0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x19, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2f, 0x66,
0x61, 0x76, 0x6f, 0x72, 0x69, 0x74, 0x65, 0x3b, 0x66, 0x61, 0x76, 0x6f, 0x72, 0x69, 0x74, 0x65,
0xa2, 0x02, 0x03, 0x46, 0x58, 0x58, 0xaa, 0x02, 0x08, 0x46, 0x61, 0x76, 0x6f, 0x72, 0x69, 0x74,
0x65, 0xca, 0x02, 0x08, 0x46, 0x61, 0x76, 0x6f, 0x72, 0x69, 0x74, 0x65, 0xe2, 0x02, 0x14, 0x46,
0x61, 0x76, 0x6f, 0x72, 0x69, 0x74, 0x65, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64,
0x61, 0x74, 0x61, 0xea, 0x02, 0x08, 0x46, 0x61, 0x76, 0x6f, 0x72, 0x69, 0x74, 0x65, 0x62, 0x06,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_favorite_favorite_proto_rawDescOnce sync.Once
file_favorite_favorite_proto_rawDescData = file_favorite_favorite_proto_rawDesc
)
func file_favorite_favorite_proto_rawDescGZIP() []byte {
file_favorite_favorite_proto_rawDescOnce.Do(func() {
file_favorite_favorite_proto_rawDescData = protoimpl.X.CompressGZIP(file_favorite_favorite_proto_rawDescData)
})
return file_favorite_favorite_proto_rawDescData
}
var file_favorite_favorite_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
var file_favorite_favorite_proto_goTypes = []interface{}{
(FavoriteType)(0), // 0: favorite.FavoriteType
}
var file_favorite_favorite_proto_depIdxs = []int32{
0, // [0:0] is the sub-list for method output_type
0, // [0:0] is the sub-list for method input_type
0, // [0:0] is the sub-list for extension type_name
0, // [0:0] is the sub-list for extension extendee
0, // [0:0] is the sub-list for field type_name
}
func init() { file_favorite_favorite_proto_init() }
func file_favorite_favorite_proto_init() {
if File_favorite_favorite_proto != nil {
return
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_favorite_favorite_proto_rawDesc,
NumEnums: 1,
NumMessages: 0,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_favorite_favorite_proto_goTypes,
DependencyIndexes: file_favorite_favorite_proto_depIdxs,
EnumInfos: file_favorite_favorite_proto_enumTypes,
}.Build()
File_favorite_favorite_proto = out.File
file_favorite_favorite_proto_rawDesc = nil
file_favorite_favorite_proto_goTypes = nil
file_favorite_favorite_proto_depIdxs = nil
}
================================================
FILE: _examples/11_multi_service/federation/federation.pb.go
================================================
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.33.0
// protoc (unknown)
// source: federation/federation.proto
package federation
import (
_ "github.com/mercari/grpc-federation/grpc/federation"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
type MyFavoriteType int32
const (
MyFavoriteType_UNKNOWN MyFavoriteType = 0
MyFavoriteType_TYPE1 MyFavoriteType = 5000
)
// Enum value maps for MyFavoriteType.
var (
MyFavoriteType_name = map[int32]string{
0: "UNKNOWN",
5000: "TYPE1",
}
MyFavoriteType_value = map[string]int32{
"UNKNOWN": 0,
"TYPE1": 5000,
}
)
func (x MyFavoriteType) Enum() *MyFavoriteType {
p := new(MyFavoriteType)
*p = x
return p
}
func (x MyFavoriteType) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (MyFavoriteType) Descriptor() protoreflect.EnumDescriptor {
return file_federation_federation_proto_enumTypes[0].Descriptor()
}
func (MyFavoriteType) Type() protoreflect.EnumType {
return &file_federation_federation_proto_enumTypes[0]
}
func (x MyFavoriteType) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use MyFavoriteType.Descriptor instead.
func (MyFavoriteType) EnumDescriptor() ([]byte, []int) {
return file_federation_federation_proto_rawDescGZIP(), []int{0}
}
type GetPostRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
}
func (x *GetPostRequest) Reset() {
*x = GetPostRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_federation_federation_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GetPostRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetPostRequest) ProtoMessage() {}
func (x *GetPostRequest) ProtoReflect() protoreflect.Message {
mi := &file_federation_federation_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GetPostRequest.ProtoReflect.Descriptor instead.
func (*GetPostRequest) Descriptor() ([]byte, []int) {
return file_federation_federation_proto_rawDescGZIP(), []int{0}
}
func (x *GetPostRequest) GetId() string {
if x != nil {
return x.Id
}
return ""
}
type GetPostResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Post *Post `protobuf:"bytes,1,opt,name=post,proto3" json:"post,omitempty"`
UpperName string `protobuf:"bytes,2,opt,name=upper_name,json=upperName,proto3" json:"upper_name,omitempty"`
Foo *GetPostResponse_Foo `protobuf:"bytes,3,opt,name=foo,proto3" json:"foo,omitempty"`
}
func (x *GetPostResponse) Reset() {
*x = GetPostResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_federation_federation_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GetPostResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetPostResponse) ProtoMessage() {}
func (x *GetPostResponse) ProtoReflect() protoreflect.Message {
mi := &file_federation_federation_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GetPostResponse.ProtoReflect.Descriptor instead.
func (*GetPostResponse) Descriptor() ([]byte, []int) {
return file_federation_federation_proto_rawDescGZIP(), []int{1}
}
func (x *GetPostResponse) GetPost() *Post {
if x != nil {
return x.Post
}
return nil
}
func (x *GetPostResponse) GetUpperName() string {
if x != nil {
return x.UpperName
}
return ""
}
func (x *GetPostResponse) GetFoo() *GetPostResponse_Foo {
if x != nil {
return x.Foo
}
return nil
}
type Post struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
Title string `protobuf:"bytes,2,opt,name=title,proto3" json:"title,omitempty"`
Content string `protobuf:"bytes,3,opt,name=content,proto3" json:"content,omitempty"`
User *User `protobuf:"bytes,4,opt,name=user,proto3" json:"user,omitempty"`
Reaction *Reaction `protobuf:"bytes,5,opt,name=reaction,proto3" json:"reaction,omitempty"`
FavoriteValue MyFavoriteType `protobuf:"varint,6,opt,name=favorite_value,json=favoriteValue,proto3,enum=federation.MyFavoriteType" json:"favorite_value,omitempty"`
Cmp bool `protobuf:"varint,7,opt,name=cmp,proto3" json:"cmp,omitempty"`
}
func (x *Post) Reset() {
*x = Post{}
if protoimpl.UnsafeEnabled {
mi := &file_federation_federation_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Post) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Post) ProtoMessage() {}
func (x *Post) ProtoReflect() protoreflect.Message {
mi := &file_federation_federation_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Post.ProtoReflect.Descriptor instead.
func (*Post) Descriptor() ([]byte, []int) {
return file_federation_federation_proto_rawDescGZIP(), []int{2}
}
func (x *Post) GetId() string {
if x != nil {
return x.Id
}
return ""
}
func (x *Post) GetTitle() string {
if x != nil {
return x.Title
}
return ""
}
func (x *Post) GetContent() string {
if x != nil {
return x.Content
}
return ""
}
func (x *Post) GetUser() *User {
if x != nil {
return x.User
}
return nil
}
func (x *Post) GetReaction() *Reaction {
if x != nil {
return x.Reaction
}
return nil
}
func (x *Post) GetFavoriteValue() MyFavoriteType {
if x != nil {
return x.FavoriteValue
}
return MyFavoriteType_UNKNOWN
}
func (x *Post) GetCmp() bool {
if x != nil {
return x.Cmp
}
return false
}
type User struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
}
func (x *User) Reset() {
*x = User{}
if protoimpl.UnsafeEnabled {
mi := &file_federation_federation_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *User) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*User) ProtoMessage() {}
func (x *User) ProtoReflect() protoreflect.Message {
mi := &file_federation_federation_proto_msgTypes[3]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use User.ProtoReflect.Descriptor instead.
func (*User) Descriptor() ([]byte, []int) {
return file_federation_federation_proto_rawDescGZIP(), []int{3}
}
func (x *User) GetId() string {
if x != nil {
return x.Id
}
return ""
}
func (x *User) GetName() string {
if x != nil {
return x.Name
}
return ""
}
type GetNameRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
}
func (x *GetNameRequest) Reset() {
*x = GetNameRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_federation_federation_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GetNameRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetNameRequest) ProtoMessage() {}
func (x *GetNameRequest) ProtoReflect() protoreflect.Message {
mi := &file_federation_federation_proto_msgTypes[4]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GetNameRequest.ProtoReflect.Descriptor instead.
func (*GetNameRequest) Descriptor() ([]byte, []int) {
return file_federation_federation_proto_rawDescGZIP(), []int{4}
}
type GetNameResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
Foo *GetNameResponse_Foo `protobuf:"bytes,2,opt,name=foo,proto3" json:"foo,omitempty"`
}
func (x *GetNameResponse) Reset() {
*x = GetNameResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_federation_federation_proto_msgTypes[5]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GetNameResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetNameResponse) ProtoMessage() {}
func (x *GetNameResponse) ProtoReflect() protoreflect.Message {
mi := &file_federation_federation_proto_msgTypes[5]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GetNameResponse.ProtoReflect.Descriptor instead.
func (*GetNameResponse) Descriptor() ([]byte, []int) {
return file_federation_federation_proto_rawDescGZIP(), []int{5}
}
func (x *GetNameResponse) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *GetNameResponse) GetFoo() *GetNameResponse_Foo {
if x != nil {
return x.Foo
}
return nil
}
type GetStatusRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
}
func (x *GetStatusRequest) Reset() {
*x = GetStatusRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_federation_federation_proto_msgTypes[6]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GetStatusRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetStatusRequest) ProtoMessage() {}
func (x *GetStatusRequest) ProtoReflect() protoreflect.Message {
mi := &file_federation_federation_proto_msgTypes[6]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GetStatusRequest.ProtoReflect.Descriptor instead.
func (*GetStatusRequest) Descriptor() ([]byte, []int) {
return file_federation_federation_proto_rawDescGZIP(), []int{6}
}
type GetStatusResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
User *User `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"`
}
func (x *GetStatusResponse) Reset() {
*x = GetStatusResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_federation_federation_proto_msgTypes[7]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GetStatusResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetStatusResponse) ProtoMessage() {}
func (x *GetStatusResponse) ProtoReflect() protoreflect.Message {
mi := &file_federation_federation_proto_msgTypes[7]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GetStatusResponse.ProtoReflect.Descriptor instead.
func (*GetStatusResponse) Descriptor() ([]byte, []int) {
return file_federation_federation_proto_rawDescGZIP(), []int{7}
}
func (x *GetStatusResponse) GetUser() *User {
if x != nil {
return x.User
}
return nil
}
type GetPostResponse_Foo struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
X string `protobuf:"bytes,1,opt,name=x,proto3" json:"x,omitempty"`
}
func (x *GetPostResponse_Foo) Reset() {
*x = GetPostResponse_Foo{}
if protoimpl.UnsafeEnabled {
mi := &file_federation_federation_proto_msgTypes[8]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GetPostResponse_Foo) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetPostResponse_Foo) ProtoMessage() {}
func (x *GetPostResponse_Foo) ProtoReflect() protoreflect.Message {
mi := &file_federation_federation_proto_msgTypes[8]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GetPostResponse_Foo.ProtoReflect.Descriptor instead.
func (*GetPostResponse_Foo) Descriptor() ([]byte, []int) {
return file_federation_federation_proto_rawDescGZIP(), []int{1, 0}
}
func (x *GetPostResponse_Foo) GetX() string {
if x != nil {
return x.X
}
return ""
}
type GetNameResponse_Foo struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Y string `protobuf:"bytes,1,opt,name=y,proto3" json:"y,omitempty"`
}
func (x *GetNameResponse_Foo) Reset() {
*x = GetNameResponse_Foo{}
if protoimpl.UnsafeEnabled {
mi := &file_federation_federation_proto_msgTypes[9]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GetNameResponse_Foo) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetNameResponse_Foo) ProtoMessage() {}
func (x *GetNameResponse_Foo) ProtoReflect() protoreflect.Message {
mi := &file_federation_federation_proto_msgTypes[9]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GetNameResponse_Foo.ProtoReflect.Descriptor instead.
func (*GetNameResponse_Foo) Descriptor() ([]byte, []int) {
return file_federation_federation_proto_rawDescGZIP(), []int{5, 0}
}
func (x *GetNameResponse_Foo) GetY() string {
if x != nil {
return x.Y
}
return ""
}
var File_federation_federation_proto protoreflect.FileDescriptor
var file_federation_federation_proto_rawDesc = []byte{
0x0a, 0x1b, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x66, 0x65, 0x64,
0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0a, 0x66,
0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x20, 0x67, 0x72, 0x70, 0x63, 0x2f,
0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x66, 0x65, 0x64, 0x65, 0x72,
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x66, 0x65, 0x64,
0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x72, 0x65, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e,
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x20, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x50, 0x6f, 0x73,
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, 0x8f, 0x02, 0x0a, 0x0f, 0x47, 0x65, 0x74,
0x50, 0x6f, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2c, 0x0a, 0x04,
0x70, 0x6f, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x66, 0x65, 0x64,
0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x50, 0x6f, 0x73, 0x74, 0x42, 0x06, 0x9a, 0x4a,
0x03, 0x12, 0x01, 0x70, 0x52, 0x04, 0x70, 0x6f, 0x73, 0x74, 0x12, 0x42, 0x0a, 0x0a, 0x75, 0x70,
0x70, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x23,
0x9a, 0x4a, 0x20, 0x12, 0x1e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61,
0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x61, 0x72, 0x2e, 0x75, 0x70, 0x70, 0x65, 0x72, 0x5f, 0x6e,
0x61, 0x6d, 0x65, 0x52, 0x09, 0x75, 0x70, 0x70, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x3b,
0x0a, 0x03, 0x66, 0x6f, 0x6f, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x66, 0x65,
0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x6f, 0x73, 0x74,
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x46, 0x6f, 0x6f, 0x42, 0x08, 0x9a, 0x4a,
0x05, 0x12, 0x03, 0x66, 0x6f, 0x6f, 0x52, 0x03, 0x66, 0x6f, 0x6f, 0x1a, 0x1d, 0x0a, 0x03, 0x46,
0x6f, 0x6f, 0x12, 0x16, 0x0a, 0x01, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x08, 0x9a,
0x4a, 0x05, 0x12, 0x03, 0x27, 0x78, 0x27, 0x52, 0x01, 0x78, 0x3a, 0x2e, 0x9a, 0x4a, 0x2b, 0x0a,
0x0b, 0x0a, 0x01, 0x70, 0x6a, 0x06, 0x0a, 0x04, 0x50, 0x6f, 0x73, 0x74, 0x0a, 0x1c, 0x0a, 0x03,
0x66, 0x6f, 0x6f, 0x6a, 0x15, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x50, 0x6f, 0x73, 0x74, 0x52, 0x65,
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x46, 0x6f, 0x6f, 0x22, 0xa2, 0x04, 0x0a, 0x04, 0x50,
0x6f, 0x73, 0x74, 0x12, 0x1e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42,
0x0e, 0x9a, 0x4a, 0x0b, 0x12, 0x09, 0x27, 0x70, 0x6f, 0x73, 0x74, 0x2d, 0x69, 0x64, 0x27, 0x52,
0x02, 0x69, 0x64, 0x12, 0x22, 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01,
0x28, 0x09, 0x42, 0x0c, 0x9a, 0x4a, 0x09, 0x12, 0x07, 0x27, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x27,
0x52, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x12, 0x28, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65,
0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0e, 0x9a, 0x4a, 0x0b, 0x12, 0x09, 0x27,
0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x27, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e,
0x74, 0x12, 0x2c, 0x0a, 0x04, 0x75, 0x73, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32,
0x10, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x55, 0x73, 0x65,
0x72, 0x42, 0x06, 0x9a, 0x4a, 0x03, 0x12, 0x01, 0x75, 0x52, 0x04, 0x75, 0x73, 0x65, 0x72, 0x12,
0x3f, 0x0a, 0x08, 0x72, 0x65, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28,
0x0b, 0x32, 0x14, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x52,
0x65, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x0d, 0x9a, 0x4a, 0x0a, 0x12, 0x08, 0x72, 0x65,
0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x08, 0x72, 0x65, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e,
0x12, 0x56, 0x0a, 0x0e, 0x66, 0x61, 0x76, 0x6f, 0x72, 0x69, 0x74, 0x65, 0x5f, 0x76, 0x61, 0x6c,
0x75, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1a, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72,
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x4d, 0x79, 0x46, 0x61, 0x76, 0x6f, 0x72, 0x69, 0x74, 0x65,
0x54, 0x79, 0x70, 0x65, 0x42, 0x13, 0x9a, 0x4a, 0x10, 0x12, 0x0e, 0x66, 0x61, 0x76, 0x6f, 0x72,
0x69, 0x74, 0x65, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0d, 0x66, 0x61, 0x76, 0x6f, 0x72,
0x69, 0x74, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x1a, 0x0a, 0x03, 0x63, 0x6d, 0x70, 0x18,
0x07, 0x20, 0x01, 0x28, 0x08, 0x42, 0x08, 0x9a, 0x4a, 0x05, 0x12, 0x03, 0x63, 0x6d, 0x70, 0x52,
0x03, 0x63, 0x6d, 0x70, 0x3a, 0xc8, 0x01, 0x9a, 0x4a, 0xc4, 0x01, 0x0a, 0x27, 0x0a, 0x01, 0x75,
0x6a, 0x22, 0x0a, 0x04, 0x55, 0x73, 0x65, 0x72, 0x12, 0x0b, 0x0a, 0x02, 0x69, 0x64, 0x12, 0x05,
0x27, 0x66, 0x6f, 0x6f, 0x27, 0x12, 0x0d, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x05, 0x27,
0x62, 0x61, 0x72, 0x27, 0x0a, 0x36, 0x0a, 0x0e, 0x66, 0x61, 0x76, 0x6f, 0x72, 0x69, 0x74, 0x65,
0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x5a, 0x24, 0x66, 0x61, 0x76, 0x6f, 0x72, 0x69, 0x74, 0x65,
0x2e, 0x46, 0x61, 0x76, 0x6f, 0x72, 0x69, 0x74, 0x65, 0x54, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x61,
0x6c, 0x75, 0x65, 0x28, 0x27, 0x54, 0x59, 0x50, 0x45, 0x31, 0x27, 0x29, 0x0a, 0x34, 0x0a, 0x03,
0x63, 0x6d, 0x70, 0x5a, 0x2d, 0x66, 0x61, 0x76, 0x6f, 0x72, 0x69, 0x74, 0x65, 0x5f, 0x76, 0x61,
0x6c, 0x75, 0x65, 0x20, 0x3d, 0x3d, 0x20, 0x66, 0x61, 0x76, 0x6f, 0x72, 0x69, 0x74, 0x65, 0x2e,
0x46, 0x61, 0x76, 0x6f, 0x72, 0x69, 0x74, 0x65, 0x54, 0x79, 0x70, 0x65, 0x2e, 0x54, 0x59, 0x50,
0x45, 0x31, 0x0a, 0x2b, 0x0a, 0x08, 0x72, 0x65, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x6a, 0x1f,
0x0a, 0x08, 0x52, 0x65, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x13, 0x0a, 0x01, 0x76, 0x12,
0x0e, 0x66, 0x61, 0x76, 0x6f, 0x72, 0x69, 0x74, 0x65, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22,
0x42, 0x0a, 0x04, 0x55, 0x73, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20,
0x01, 0x28, 0x09, 0x42, 0x09, 0x9a, 0x4a, 0x06, 0x12, 0x04, 0x24, 0x2e, 0x69, 0x64, 0x52, 0x02,
0x69, 0x64, 0x12, 0x1f, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09,
0x42, 0x0b, 0x9a, 0x4a, 0x08, 0x12, 0x06, 0x24, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x52, 0x04, 0x6e,
0x61, 0x6d, 0x65, 0x22, 0x10, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x65,
0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0xc3, 0x01, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x4e, 0x61, 0x6d,
0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x31, 0x0a, 0x04, 0x6e, 0x61, 0x6d,
0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x1d, 0x9a, 0x4a, 0x1a, 0x12, 0x18, 0x67, 0x72,
0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x65, 0x6e,
0x76, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x3b, 0x0a, 0x03,
0x66, 0x6f, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x66, 0x65, 0x64, 0x65,
0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x47, 0x65, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x65,
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x46, 0x6f, 0x6f, 0x42, 0x08, 0x9a, 0x4a, 0x05, 0x12,
0x03, 0x66, 0x6f, 0x6f, 0x52, 0x03, 0x66, 0x6f, 0x6f, 0x1a, 0x1d, 0x0a, 0x03, 0x46, 0x6f, 0x6f,
0x12, 0x16, 0x0a, 0x01, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x08, 0x9a, 0x4a, 0x05,
0x12, 0x03, 0x27, 0x79, 0x27, 0x52, 0x01, 0x79, 0x3a, 0x21, 0x9a, 0x4a, 0x1e, 0x0a, 0x1c, 0x0a,
0x03, 0x66, 0x6f, 0x6f, 0x6a, 0x15, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x52,
0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x46, 0x6f, 0x6f, 0x22, 0x12, 0x0a, 0x10, 0x47,
0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22,
0x71, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70,
0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2c, 0x0a, 0x04, 0x75, 0x73, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01,
0x28, 0x0b, 0x32, 0x10, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e,
0x55, 0x73, 0x65, 0x72, 0x42, 0x06, 0x9a, 0x4a, 0x03, 0x12, 0x01, 0x75, 0x52, 0x04, 0x75, 0x73,
0x65, 0x72, 0x3a, 0x2e, 0x9a, 0x4a, 0x2b, 0x0a, 0x29, 0x0a, 0x01, 0x75, 0x6a, 0x24, 0x0a, 0x04,
0x55, 0x73, 0x65, 0x72, 0x12, 0x0c, 0x0a, 0x02, 0x69, 0x64, 0x12, 0x06, 0x27, 0x78, 0x78, 0x78,
0x78, 0x27, 0x12, 0x0e, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x06, 0x27, 0x79, 0x79, 0x79,
0x79, 0x27, 0x2a, 0x5f, 0x0a, 0x0e, 0x4d, 0x79, 0x46, 0x61, 0x76, 0x6f, 0x72, 0x69, 0x74, 0x65,
0x54, 0x79, 0x70, 0x65, 0x12, 0x19, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10,
0x00, 0x1a, 0x0c, 0x9a, 0x4a, 0x09, 0x12, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x12,
0x16, 0x0a, 0x05, 0x54, 0x59, 0x50, 0x45, 0x31, 0x10, 0x88, 0x27, 0x1a, 0x0a, 0x9a, 0x4a, 0x07,
0x12, 0x05, 0x54, 0x59, 0x50, 0x45, 0x31, 0x1a, 0x1a, 0x9a, 0x4a, 0x17, 0x0a, 0x15, 0x66, 0x61,
0x76, 0x6f, 0x72, 0x69, 0x74, 0x65, 0x2e, 0x46, 0x61, 0x76, 0x6f, 0x72, 0x69, 0x74, 0x65, 0x54,
0x79, 0x70, 0x65, 0x32, 0xab, 0x03, 0x0a, 0x11, 0x46, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69,
0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x44, 0x0a, 0x07, 0x47, 0x65, 0x74,
0x50, 0x6f, 0x73, 0x74, 0x12, 0x1a, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f,
0x6e, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x6f, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
0x1a, 0x1b, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x47, 0x65,
0x74, 0x50, 0x6f, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12,
0x44, 0x0a, 0x07, 0x47, 0x65, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x2e, 0x66, 0x65, 0x64,
0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x47, 0x65, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x52,
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74,
0x69, 0x6f, 0x6e, 0x2e, 0x47, 0x65, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f,
0x6e, 0x73, 0x65, 0x22, 0x00, 0x1a, 0x89, 0x02, 0x9a, 0x4a, 0x85, 0x02, 0x0a, 0x2c, 0x0a, 0x18,
0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x02, 0x08, 0x01, 0x1a, 0x0c, 0x12, 0x0a, 0x66, 0x65,
0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x0a, 0x10, 0x0a, 0x0a, 0x66, 0x65, 0x64, 0x65,
0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x02, 0x08, 0x01, 0x12, 0x47, 0x0a, 0x0a, 0x75, 0x70,
0x70, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x5a, 0x39, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66,
0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67,
0x73, 0x2e, 0x74, 0x6f, 0x55, 0x70, 0x70, 0x65, 0x72, 0x28, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66,
0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x65, 0x6e, 0x76, 0x2e, 0x6e, 0x61,
0x6d, 0x65, 0x29, 0x12, 0x20, 0x0a, 0x1b, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f,
0x6e, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x76, 0x61, 0x72, 0x69, 0x61, 0x62,
0x6c, 0x65, 0x5a, 0x01, 0x31, 0x12, 0x4e, 0x72, 0x4c, 0x0a, 0x1e, 0x67, 0x72, 0x70, 0x63, 0x2e,
0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x65, 0x6e, 0x76, 0x2e, 0x6e,
0x61, 0x6d, 0x65, 0x20, 0x3d, 0x3d, 0x20, 0x27, 0x27, 0x12, 0x2a, 0x27, 0x6e, 0x61, 0x6d, 0x65,
0x20, 0x65, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x20, 0x76, 0x61, 0x72,
0x69, 0x61, 0x62, 0x6c, 0x65, 0x20, 0x69, 0x73, 0x20, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69,
0x66, 0x69, 0x65, 0x64, 0x27, 0x12, 0x1a, 0x0a, 0x0b, 0x66, 0x6f, 0x6f, 0x5f, 0x62, 0x61, 0x72,
0x5f, 0x62, 0x61, 0x7a, 0x5a, 0x0b, 0x7b, 0x27, 0x61, 0x27, 0x3a, 0x20, 0x74, 0x72, 0x75, 0x65,
0x7d, 0x32, 0xc2, 0x04, 0x0a, 0x0e, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x53, 0x65, 0x72,
0x76, 0x69, 0x63, 0x65, 0x12, 0x44, 0x0a, 0x07, 0x47, 0x65, 0x74, 0x50, 0x6f, 0x73, 0x74, 0x12,
0x1a, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x47, 0x65, 0x74,
0x50, 0x6f, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x66, 0x65,
0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x6f, 0x73, 0x74,
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x44, 0x0a, 0x07, 0x47, 0x65,
0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69,
0x6f, 0x6e, 0x2e, 0x47, 0x65, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
0x74, 0x1a, 0x1b, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x47,
0x65, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00,
0x1a, 0xa3, 0x03, 0x9a, 0x4a, 0x9f, 0x03, 0x0a, 0x26, 0x0a, 0x15, 0x0a, 0x04, 0x6e, 0x61, 0x6d,
0x65, 0x12, 0x02, 0x08, 0x01, 0x1a, 0x09, 0x12, 0x07, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65,
0x0a, 0x0d, 0x0a, 0x07, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x12, 0x02, 0x08, 0x01, 0x12,
0x47, 0x0a, 0x0a, 0x75, 0x70, 0x70, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x5a, 0x39, 0x67,
0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x73,
0x74, 0x72, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x74, 0x6f, 0x55, 0x70, 0x70, 0x65, 0x72, 0x28, 0x67,
0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x65,
0x6e, 0x76, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x29, 0x12, 0x4f, 0x0a, 0x14, 0x70, 0x72, 0x69, 0x76,
0x61, 0x74, 0x65, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x65, 0x6e, 0x75, 0x6d,
0x7a, 0x37, 0x0a, 0x0e, 0x4d, 0x79, 0x46, 0x61, 0x76, 0x6f, 0x72, 0x69, 0x74, 0x65, 0x54, 0x79,
0x70, 0x65, 0x12, 0x25, 0x66, 0x61, 0x76, 0x6f, 0x72, 0x69, 0x74, 0x65, 0x2e, 0x46, 0x61, 0x76,
0x6f, 0x72, 0x69, 0x74, 0x65, 0x54, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x28,
0x27, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x31, 0x27, 0x29, 0x12, 0x64, 0x0a, 0x14, 0x70, 0x72, 0x69,
0x76, 0x61, 0x74, 0x65, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x75, 0x73, 0x65,
0x72, 0x6a, 0x4c, 0x0a, 0x04, 0x55, 0x73, 0x65, 0x72, 0x12, 0x1f, 0x0a, 0x02, 0x69, 0x64, 0x12,
0x19, 0x27, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63,
0x65, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x27, 0x12, 0x23, 0x0a, 0x04, 0x6e, 0x61,
0x6d, 0x65, 0x12, 0x1b, 0x27, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x5f, 0x73, 0x65, 0x72,
0x76, 0x69, 0x63, 0x65, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x27, 0x12,
0x1f, 0x0a, 0x05, 0x75, 0x73, 0x65, 0x72, 0x73, 0x5a, 0x16, 0x5b, 0x70, 0x72, 0x69, 0x76, 0x61,
0x74, 0x65, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x5d,
0x12, 0x38, 0x0a, 0x1a, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x5f, 0x73, 0x65, 0x72, 0x76,
0x69, 0x63, 0x65, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x62, 0x1a,
0x0a, 0x0d, 0x0a, 0x04, 0x69, 0x74, 0x65, 0x72, 0x12, 0x05, 0x75, 0x73, 0x65, 0x72, 0x73, 0x5a,
0x09, 0x69, 0x74, 0x65, 0x72, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x0b, 0x66, 0x6f,
0x6f, 0x5f, 0x62, 0x61, 0x72, 0x5f, 0x62, 0x61, 0x7a, 0x5a, 0x0b, 0x7b, 0x27, 0x62, 0x27, 0x3a,
0x20, 0x74, 0x72, 0x75, 0x65, 0x7d, 0x32, 0x5f, 0x0a, 0x0c, 0x44, 0x65, 0x62, 0x75, 0x67, 0x53,
0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x4a, 0x0a, 0x09, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61,
0x74, 0x75, 0x73, 0x12, 0x1c, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e,
0x2e, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
0x74, 0x1a, 0x1d, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x47,
0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
0x22, 0x00, 0x1a, 0x03, 0x9a, 0x4a, 0x00, 0x42, 0xa4, 0x01, 0x9a, 0x4a, 0x19, 0x12, 0x17, 0x66,
0x61, 0x76, 0x6f, 0x72, 0x69, 0x74, 0x65, 0x2f, 0x66, 0x61, 0x76, 0x6f, 0x72, 0x69, 0x74, 0x65,
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x0a, 0x0e, 0x63, 0x6f, 0x6d, 0x2e, 0x66, 0x65, 0x64, 0x65,
0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x0f, 0x46, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69,
0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x1d, 0x65, 0x78, 0x61, 0x6d, 0x70,
0x6c, 0x65, 0x2f, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x3b, 0x66, 0x65,
0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0xa2, 0x02, 0x03, 0x46, 0x58, 0x58, 0xaa, 0x02,
0x0a, 0x46, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0xca, 0x02, 0x0a, 0x46, 0x65,
0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0xe2, 0x02, 0x16, 0x46, 0x65, 0x64, 0x65, 0x72,
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74,
0x61, 0xea, 0x02, 0x0a, 0x46, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x62, 0x06,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_federation_federation_proto_rawDescOnce sync.Once
file_federation_federation_proto_rawDescData = file_federation_federation_proto_rawDesc
)
func file_federation_federation_proto_rawDescGZIP() []byte {
file_federation_federation_proto_rawDescOnce.Do(func() {
file_federation_federation_proto_rawDescData = protoimpl.X.CompressGZIP(file_federation_federation_proto_rawDescData)
})
return file_federation_federation_proto_rawDescData
}
var file_federation_federation_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
var file_federation_federation_proto_msgTypes = make([]protoimpl.MessageInfo, 10)
var file_federation_federation_proto_goTypes = []interface{}{
(MyFavoriteType)(0), // 0: federation.MyFavoriteType
(*GetPostRequest)(nil), // 1: federation.GetPostRequest
(*GetPostResponse)(nil), // 2: federation.GetPostResponse
(*Post)(nil), // 3: federation.Post
(*User)(nil), // 4: federation.User
(*GetNameRequest)(nil), // 5: federation.GetNameRequest
(*GetNameResponse)(nil), // 6: federation.GetNameResponse
(*GetStatusRequest)(nil), // 7: federation.GetStatusRequest
(*GetStatusResponse)(nil), // 8: federation.GetStatusResponse
(*GetPostResponse_Foo)(nil), // 9: federation.GetPostResponse.Foo
(*GetNameResponse_Foo)(nil), // 10: federation.GetNameResponse.Foo
(*Reaction)(nil), // 11: federation.Reaction
}
var file_federation_federation_proto_depIdxs = []int32{
3, // 0: federation.GetPostResponse.post:type_name -> federation.Post
9, // 1: federation.GetPostResponse.foo:type_name -> federation.GetPostResponse.Foo
4, // 2: federation.Post.user:type_name -> federation.User
11, // 3: federation.Post.reaction:type_name -> federation.Reaction
0, // 4: federation.Post.favorite_value:type_name -> federation.MyFavoriteType
10, // 5: federation.GetNameResponse.foo:type_name -> federation.GetNameResponse.Foo
4, // 6: federation.GetStatusResponse.user:type_name -> federation.User
1, // 7: federation.FederationService.GetPost:input_type -> federation.GetPostRequest
5, // 8: federation.FederationService.GetName:input_type -> federation.GetNameRequest
1, // 9: federation.PrivateService.GetPost:input_type -> federation.GetPostRequest
5, // 10: federation.PrivateService.GetName:input_type -> federation.GetNameRequest
7, // 11: federation.DebugService.GetStatus:input_type -> federation.GetStatusRequest
2, // 12: federation.FederationService.GetPost:output_type -> federation.GetPostResponse
6, // 13: federation.FederationService.GetName:output_type -> federation.GetNameResponse
2, // 14: federation.PrivateService.GetPost:output_type -> federation.GetPostResponse
6, // 15: federation.PrivateService.GetName:output_type -> federation.GetNameResponse
8, // 16: federation.DebugService.GetStatus:output_type -> federation.GetStatusResponse
12, // [12:17] is the sub-list for method output_type
7, // [7:12] is the sub-list for method input_type
7, // [7:7] is the sub-list for extension type_name
7, // [7:7] is the sub-list for extension extendee
0, // [0:7] is the sub-list for field type_name
}
func init() { file_federation_federation_proto_init() }
func file_federation_federation_proto_init() {
if File_federation_federation_proto != nil {
return
}
file_federation_reaction_proto_init()
if !protoimpl.UnsafeEnabled {
file_federation_federation_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetPostRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_federation_federation_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetPostResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_federation_federation_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Post); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_federation_federation_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*User); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_federation_federation_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetNameRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_federation_federation_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetNameResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_federation_federation_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetStatusRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_federation_federation_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetStatusResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_federation_federation_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetPostResponse_Foo); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_federation_federation_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetNameResponse_Foo); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_federation_federation_proto_rawDesc,
NumEnums: 1,
NumMessages: 10,
NumExtensions: 0,
NumServices: 3,
},
GoTypes: file_federation_federation_proto_goTypes,
DependencyIndexes: file_federation_federation_proto_depIdxs,
EnumInfos: file_federation_federation_proto_enumTypes,
MessageInfos: file_federation_federation_proto_msgTypes,
}.Build()
File_federation_federation_proto = out.File
file_federation_federation_proto_rawDesc = nil
file_federation_federation_proto_goTypes = nil
file_federation_federation_proto_depIdxs = nil
}
================================================
FILE: _examples/11_multi_service/federation/federation_grpc.pb.go
================================================
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.3.0
// - protoc (unknown)
// source: federation/federation.proto
package federation
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 (
FederationService_GetPost_FullMethodName = "/federation.FederationService/GetPost"
FederationService_GetName_FullMethodName = "/federation.FederationService/GetName"
)
// FederationServiceClient is the client API for FederationService 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 FederationServiceClient interface {
GetPost(ctx context.Context, in *GetPostRequest, opts ...grpc.CallOption) (*GetPostResponse, error)
GetName(ctx context.Context, in *GetNameRequest, opts ...grpc.CallOption) (*GetNameResponse, error)
}
type federationServiceClient struct {
cc grpc.ClientConnInterface
}
func NewFederationServiceClient(cc grpc.ClientConnInterface) FederationServiceClient {
return &federationServiceClient{cc}
}
func (c *federationServiceClient) GetPost(ctx context.Context, in *GetPostRequest, opts ...grpc.CallOption) (*GetPostResponse, error) {
out := new(GetPostResponse)
err := c.cc.Invoke(ctx, FederationService_GetPost_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *federationServiceClient) GetName(ctx context.Context, in *GetNameRequest, opts ...grpc.CallOption) (*GetNameResponse, error) {
out := new(GetNameResponse)
err := c.cc.Invoke(ctx, FederationService_GetName_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// FederationServiceServer is the server API for FederationService service.
// All implementations must embed UnimplementedFederationServiceServer
// for forward compatibility
type FederationServiceServer interface {
GetPost(context.Context, *GetPostRequest) (*GetPostResponse, error)
GetName(context.Context, *GetNameRequest) (*GetNameResponse, error)
mustEmbedUnimplementedFederationServiceServer()
}
// UnimplementedFederationServiceServer must be embedded to have forward compatible implementations.
type UnimplementedFederationServiceServer struct {
}
func (UnimplementedFederationServiceServer) GetPost(context.Context, *GetPostRequest) (*GetPostResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetPost not implemented")
}
func (UnimplementedFederationServiceServer) GetName(context.Context, *GetNameRequest) (*GetNameResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetName not implemented")
}
func (UnimplementedFederationServiceServer) mustEmbedUnimplementedFederationServiceServer() {}
// UnsafeFederationServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to FederationServiceServer will
// result in compilation errors.
type UnsafeFederationServiceServer interface {
mustEmbedUnimplementedFederationServiceServer()
}
func RegisterFederationServiceServer(s grpc.ServiceRegistrar, srv FederationServiceServer) {
s.RegisterService(&FederationService_ServiceDesc, srv)
}
func _FederationService_GetPost_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetPostRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(FederationServiceServer).GetPost(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: FederationService_GetPost_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(FederationServiceServer).GetPost(ctx, req.(*GetPostRequest))
}
return interceptor(ctx, in, info, handler)
}
func _FederationService_GetName_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetNameRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(FederationServiceServer).GetName(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: FederationService_GetName_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(FederationServiceServer).GetName(ctx, req.(*GetNameRequest))
}
return interceptor(ctx, in, info, handler)
}
// FederationService_ServiceDesc is the grpc.ServiceDesc for FederationService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var FederationService_ServiceDesc = grpc.ServiceDesc{
ServiceName: "federation.FederationService",
HandlerType: (*FederationServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "GetPost",
Handler: _FederationService_GetPost_Handler,
},
{
MethodName: "GetName",
Handler: _FederationService_GetName_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "federation/federation.proto",
}
const (
PrivateService_GetPost_FullMethodName = "/federation.PrivateService/GetPost"
PrivateService_GetName_FullMethodName = "/federation.PrivateService/GetName"
)
// PrivateServiceClient is the client API for PrivateService 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 PrivateServiceClient interface {
GetPost(ctx context.Context, in *GetPostRequest, opts ...grpc.CallOption) (*GetPostResponse, error)
GetName(ctx context.Context, in *GetNameRequest, opts ...grpc.CallOption) (*GetNameResponse, error)
}
type privateServiceClient struct {
cc grpc.ClientConnInterface
}
func NewPrivateServiceClient(cc grpc.ClientConnInterface) PrivateServiceClient {
return &privateServiceClient{cc}
}
func (c *privateServiceClient) GetPost(ctx context.Context, in *GetPostRequest, opts ...grpc.CallOption) (*GetPostResponse, error) {
out := new(GetPostResponse)
err := c.cc.Invoke(ctx, PrivateService_GetPost_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *privateServiceClient) GetName(ctx context.Context, in *GetNameRequest, opts ...grpc.CallOption) (*GetNameResponse, error) {
out := new(GetNameResponse)
err := c.cc.Invoke(ctx, PrivateService_GetName_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// PrivateServiceServer is the server API for PrivateService service.
// All implementations must embed UnimplementedPrivateServiceServer
// for forward compatibility
type PrivateServiceServer interface {
GetPost(context.Context, *GetPostRequest) (*GetPostResponse, error)
GetName(context.Context, *GetNameRequest) (*GetNameResponse, error)
mustEmbedUnimplementedPrivateServiceServer()
}
// UnimplementedPrivateServiceServer must be embedded to have forward compatible implementations.
type UnimplementedPrivateServiceServer struct {
}
func (UnimplementedPrivateServiceServer) GetPost(context.Context, *GetPostRequest) (*GetPostResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetPost not implemented")
}
func (UnimplementedPrivateServiceServer) GetName(context.Context, *GetNameRequest) (*GetNameResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetName not implemented")
}
func (UnimplementedPrivateServiceServer) mustEmbedUnimplementedPrivateServiceServer() {}
// UnsafePrivateServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to PrivateServiceServer will
// result in compilation errors.
type UnsafePrivateServiceServer interface {
mustEmbedUnimplementedPrivateServiceServer()
}
func RegisterPrivateServiceServer(s grpc.ServiceRegistrar, srv PrivateServiceServer) {
s.RegisterService(&PrivateService_ServiceDesc, srv)
}
func _PrivateService_GetPost_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetPostRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(PrivateServiceServer).GetPost(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: PrivateService_GetPost_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(PrivateServiceServer).GetPost(ctx, req.(*GetPostRequest))
}
return interceptor(ctx, in, info, handler)
}
func _PrivateService_GetName_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetNameRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(PrivateServiceServer).GetName(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: PrivateService_GetName_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(PrivateServiceServer).GetName(ctx, req.(*GetNameRequest))
}
return interceptor(ctx, in, info, handler)
}
// PrivateService_ServiceDesc is the grpc.ServiceDesc for PrivateService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var PrivateService_ServiceDesc = grpc.ServiceDesc{
ServiceName: "federation.PrivateService",
HandlerType: (*PrivateServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "GetPost",
Handler: _PrivateService_GetPost_Handler,
},
{
MethodName: "GetName",
Handler: _PrivateService_GetName_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "federation/federation.proto",
}
const (
DebugService_GetStatus_FullMethodName = "/federation.DebugService/GetStatus"
)
// DebugServiceClient is the client API for DebugService 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 DebugServiceClient interface {
GetStatus(ctx context.Context, in *GetStatusRequest, opts ...grpc.CallOption) (*GetStatusResponse, error)
}
type debugServiceClient struct {
cc grpc.ClientConnInterface
}
func NewDebugServiceClient(cc grpc.ClientConnInterface) DebugServiceClient {
return &debugServiceClient{cc}
}
func (c *debugServiceClient) GetStatus(ctx context.Context, in *GetStatusRequest, opts ...grpc.CallOption) (*GetStatusResponse, error) {
out := new(GetStatusResponse)
err := c.cc.Invoke(ctx, DebugService_GetStatus_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// DebugServiceServer is the server API for DebugService service.
// All implementations must embed UnimplementedDebugServiceServer
// for forward compatibility
type DebugServiceServer interface {
GetStatus(context.Context, *GetStatusRequest) (*GetStatusResponse, error)
mustEmbedUnimplementedDebugServiceServer()
}
// UnimplementedDebugServiceServer must be embedded to have forward compatible implementations.
type UnimplementedDebugServiceServer struct {
}
func (UnimplementedDebugServiceServer) GetStatus(context.Context, *GetStatusRequest) (*GetStatusResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetStatus not implemented")
}
func (UnimplementedDebugServiceServer) mustEmbedUnimplementedDebugServiceServer() {}
// UnsafeDebugServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to DebugServiceServer will
// result in compilation errors.
type UnsafeDebugServiceServer interface {
mustEmbedUnimplementedDebugServiceServer()
}
func RegisterDebugServiceServer(s grpc.ServiceRegistrar, srv DebugServiceServer) {
s.RegisterService(&DebugService_ServiceDesc, srv)
}
func _DebugService_GetStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetStatusRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(DebugServiceServer).GetStatus(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: DebugService_GetStatus_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(DebugServiceServer).GetStatus(ctx, req.(*GetStatusRequest))
}
return interceptor(ctx, in, info, handler)
}
// DebugService_ServiceDesc is the grpc.ServiceDesc for DebugService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var DebugService_ServiceDesc = grpc.ServiceDesc{
ServiceName: "federation.DebugService",
HandlerType: (*DebugServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "GetStatus",
Handler: _DebugService_GetStatus_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "federation/federation.proto",
}
================================================
FILE: _examples/11_multi_service/federation/federation_grpc_federation.pb.go
================================================
// Code generated by protoc-gen-grpc-federation. DO NOT EDIT!
// versions:
//
// protoc-gen-grpc-federation: (devel)
//
// source: federation/federation.proto
package federation
import (
"context"
"io"
"log/slog"
"reflect"
grpcfed "github.com/mercari/grpc-federation/grpc/federation"
grpcfedcel "github.com/mercari/grpc-federation/grpc/federation/cel"
"go.opentelemetry.io/otel"
"go.opentelemetry.io/otel/trace"
favorite "example/favorite"
)
var (
_ = reflect.Invalid // to avoid "imported and not used error"
)
// Federation_GetNameResponseVariable represents variable definitions in "federation.GetNameResponse".
type FederationService_Federation_GetNameResponseVariable struct {
Foo *GetNameResponse_Foo
}
// Federation_GetNameResponseArgument is argument for "federation.GetNameResponse" message.
type FederationService_Federation_GetNameResponseArgument struct {
FederationService_Federation_GetNameResponseVariable
}
// Federation_GetNameResponse_FooVariable represents variable definitions in "federation.Foo".
type FederationService_Federation_GetNameResponse_FooVariable struct {
}
// Federation_GetNameResponse_FooArgument is argument for "federation.Foo" message.
type FederationService_Federation_GetNameResponse_FooArgument struct {
FederationService_Federation_GetNameResponse_FooVariable
}
// Federation_GetPostResponseVariable represents variable definitions in "federation.GetPostResponse".
type FederationService_Federation_GetPostResponseVariable struct {
Foo *GetPostResponse_Foo
P *Post
}
// Federation_GetPostResponseArgument is argument for "federation.GetPostResponse" message.
type FederationService_Federation_GetPostResponseArgument struct {
Id string
FederationService_Federation_GetPostResponseVariable
}
// Federation_GetPostResponse_FooVariable represents variable definitions in "federation.Foo".
type FederationService_Federation_GetPostResponse_FooVariable struct {
}
// Federation_GetPostResponse_FooArgument is argument for "federation.Foo" message.
type FederationService_Federation_GetPostResponse_FooArgument struct {
FederationService_Federation_GetPostResponse_FooVariable
}
// Federation_PostVariable represents variable definitions in "federation.Post".
type FederationService_Federation_PostVariable struct {
Cmp bool
FavoriteValue favorite.FavoriteType
Reaction *Reaction
U *User
}
// Federation_PostArgument is argument for "federation.Post" message.
type FederationService_Federation_PostArgument struct {
FederationService_Federation_PostVariable
}
// Federation_ReactionVariable represents variable definitions in "federation.Reaction".
type FederationService_Federation_ReactionVariable struct {
Cmp bool
}
// Federation_ReactionArgument is argument for "federation.Reaction" message.
type FederationService_Federation_ReactionArgument struct {
V favorite.FavoriteType
FederationService_Federation_ReactionVariable
}
// Federation_UserVariable represents variable definitions in "federation.User".
type FederationService_Federation_UserVariable struct {
}
// Federation_UserArgument is argument for "federation.User" message.
type FederationService_Federation_UserArgument struct {
Id string
Name string
FederationService_Federation_UserVariable
}
// FederationServiceConfig configuration required to initialize the service that use GRPC Federation.
type FederationServiceConfig struct {
// ErrorHandler Federation Service often needs to convert errors received from downstream services.
// If an error occurs during method execution in the Federation Service, this error handler is called and the returned error is treated as a final error.
ErrorHandler grpcfed.ErrorHandler
// Logger sets the logger used to output Debug/Info/Error information.
Logger *slog.Logger
}
// FederationServiceClientFactory provides a factory that creates the gRPC Client needed to invoke methods of the gRPC Service on which the Federation Service depends.
type FederationServiceClientFactory interface {
}
// FederationServiceClientConfig helper to create gRPC client.
// Hints for creating a gRPC Client.
type FederationServiceClientConfig struct {
// Service FQDN ( `.` ) of the service on Protocol Buffers.
Service string
}
// FederationServiceDependentClientSet has a gRPC client for all services on which the federation service depends.
// This is provided as an argument when implementing the custom resolver.
type FederationServiceDependentClientSet struct {
}
// FederationServiceResolver provides an interface to directly implement message resolver and field resolver not defined in Protocol Buffers.
type FederationServiceResolver interface {
}
// FederationServiceCELPluginWasmConfig type alias for grpcfedcel.WasmConfig.
type FederationServiceCELPluginWasmConfig = grpcfedcel.WasmConfig
// FederationServiceCELPluginConfig hints for loading a WebAssembly based plugin.
type FederationServiceCELPluginConfig struct {
CacheDir string
}
// FederationServiceEnv keeps the values read from environment variables.
type FederationServiceEnv struct {
Name string `envconfig:"NAME" default:"federation"`
Federation string `envconfig:"FEDERATION"`
}
type keyFederationServiceEnv struct{}
// GetFederationServiceEnv gets environment variables.
func GetFederationServiceEnv(ctx context.Context) *FederationServiceEnv {
value := ctx.Value(keyFederationServiceEnv{})
if value == nil {
return nil
}
return value.(*FederationServiceEnv)
}
func withFederationServiceEnv(ctx context.Context, env *FederationServiceEnv) context.Context {
return context.WithValue(ctx, keyFederationServiceEnv{}, env)
}
// FederationServiceVariable keeps the initial values.
type FederationServiceVariable struct {
UpperName string
FederationServiceVariable int64
bool
FooBarBaz map[string]bool
}
type keyFederationServiceVariable struct{}
// GetFederationServiceVariable gets initial variables.
func GetFederationServiceVariable(ctx context.Context) *FederationServiceVariable {
value := ctx.Value(keyFederationServiceVariable{})
if value == nil {
return nil
}
return value.(*FederationServiceVariable)
}
func withFederationServiceVariable(ctx context.Context, svcVar *FederationServiceVariable) context.Context {
return context.WithValue(ctx, keyFederationServiceVariable{}, svcVar)
}
// FederationServiceUnimplementedResolver a structure implemented to satisfy the Resolver interface.
// An Unimplemented error is always returned.
// This is intended for use when there are many Resolver interfaces that do not need to be implemented,
// by embedding them in a resolver structure that you have created.
type FederationServiceUnimplementedResolver struct{}
// FederationService represents Federation Service.
type FederationService struct {
UnimplementedFederationServiceServer
cfg FederationServiceConfig
logger *slog.Logger
isLogLevelDebug bool
errorHandler grpcfed.ErrorHandler
celCacheMap *grpcfed.CELCacheMap
tracer trace.Tracer
env *FederationServiceEnv
svcVar *FederationServiceVariable
celTypeHelper *grpcfed.CELTypeHelper
celEnvOpts []grpcfed.CELEnvOption
celPlugins []*grpcfedcel.CELPlugin
client *FederationServiceDependentClientSet
}
// NewFederationService creates FederationService instance by FederationServiceConfig.
func NewFederationService(cfg FederationServiceConfig) (*FederationService, error) {
logger := cfg.Logger
if logger == nil {
logger = slog.New(slog.NewJSONHandler(io.Discard, nil))
}
tracer := otel.Tracer("federation.FederationService")
ctx := grpcfed.WithLogger(context.Background(), logger)
ctx = grpcfed.WithTracer(ctx, tracer)
errorHandler := cfg.ErrorHandler
if errorHandler == nil {
errorHandler = func(ctx context.Context, methodName string, err error) error { return err }
}
celTypeHelperFieldMap := grpcfed.CELTypeHelperFieldMap{
"grpc.federation.private.federation.GetNameResponseArgument": {},
"grpc.federation.private.federation.GetNameResponse_FooArgument": {},
"grpc.federation.private.federation.GetPostResponseArgument": {
"id": grpcfed.NewCELFieldType(grpcfed.CELStringType, "Id"),
},
"grpc.federation.private.federation.GetPostResponse_FooArgument": {},
"grpc.federation.private.federation.PostArgument": {},
"grpc.federation.private.federation.ReactionArgument": {
"v": grpcfed.NewCELFieldType(grpcfed.CELIntType, "V"),
},
"grpc.federation.private.federation.UserArgument": {
"id": grpcfed.NewCELFieldType(grpcfed.CELStringType, "Id"),
"name": grpcfed.NewCELFieldType(grpcfed.CELStringType, "Name"),
},
"grpc.federation.private.Env": {
"name": grpcfed.NewCELFieldType(grpcfed.CELStringType, "Name"),
"federation": grpcfed.NewCELFieldType(grpcfed.CELStringType, "Federation"),
},
"grpc.federation.private.ServiceVariable": {
"upper_name": grpcfed.NewCELFieldType(grpcfed.CELStringType, "UpperName"),
"federation_service_variable": grpcfed.NewCELFieldType(grpcfed.CELIntType, "FederationServiceVariable"),
"": grpcfed.NewCELFieldType(grpcfed.CELBoolType, ""),
"foo_bar_baz": grpcfed.NewCELFieldType(grpcfed.NewCELMapType(grpcfed.CELStringType, grpcfed.CELBoolType), "FooBarBaz"),
},
}
celTypeHelper := grpcfed.NewCELTypeHelper("federation", celTypeHelperFieldMap)
var celEnvOpts []grpcfed.CELEnvOption
celEnvOpts = append(celEnvOpts, grpcfed.NewDefaultEnvOptions(celTypeHelper)...)
celEnvOpts = append(celEnvOpts, grpcfed.EnumAccessorOptions("favorite.FavoriteType", favorite.FavoriteType_value, favorite.FavoriteType_name)...)
celEnvOpts = append(celEnvOpts, grpcfed.EnumAccessorOptions("federation.MyFavoriteType", MyFavoriteType_value, MyFavoriteType_name)...)
celEnvOpts = append(celEnvOpts, grpcfed.NewCELVariable("grpc.federation.env", grpcfed.CELObjectType("grpc.federation.private.Env")))
celEnvOpts = append(celEnvOpts, grpcfed.NewCELVariable("grpc.federation.var", grpcfed.CELObjectType("grpc.federation.private.ServiceVariable")))
var env FederationServiceEnv
if err := grpcfed.LoadEnv("", &env); err != nil {
return nil, err
}
svc := &FederationService{
cfg: cfg,
logger: logger,
isLogLevelDebug: logger.Enabled(context.Background(), slog.LevelDebug),
errorHandler: errorHandler,
celEnvOpts: celEnvOpts,
celTypeHelper: celTypeHelper,
celCacheMap: grpcfed.NewCELCacheMap(),
tracer: tracer,
env: &env,
svcVar: new(FederationServiceVariable),
client: &FederationServiceDependentClientSet{},
}
if err := svc.initServiceVariables(ctx); err != nil {
return nil, err
}
return svc, nil
}
// CleanupFederationService cleanup all resources to prevent goroutine leaks.
func CleanupFederationService(ctx context.Context, svc *FederationService) {
svc.cleanup(ctx)
}
func (s *FederationService) cleanup(ctx context.Context) {
for _, plugin := range s.celPlugins {
plugin.Close()
}
}
func (s *FederationService) initServiceVariables(ctx context.Context) error {
ctx = grpcfed.WithCELCacheMap(ctx, s.celCacheMap)
type localValueType struct {
*grpcfed.LocalValue
vars *FederationServiceVariable
}
value := &localValueType{
LocalValue: grpcfed.NewServiceVariableLocalValue(s.celEnvOpts),
vars: s.svcVar,
}
value.AddEnv(s.env)
value.AddServiceVariable(s.svcVar)
ctx = grpcfed.WithLocalValue(ctx, value.LocalValue)
/*
def {
name: "upper_name"
by: "grpc.federation.strings.toUpper(grpc.federation.env.name)"
}
*/
def_upper_name := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[string, *localValueType]{
Name: `upper_name`,
Type: grpcfed.CELStringType,
Setter: func(value *localValueType, v string) error {
value.vars.UpperName = v
return nil
},
By: `grpc.federation.strings.toUpper(grpc.federation.env.name)`,
ByCacheIndex: 1,
})
}
if err := def_upper_name(ctx); err != nil {
return err
}
/*
def {
name: "federation_service_variable"
by: "1"
}
*/
def_federation_service_variable := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[int64, *localValueType]{
Name: `federation_service_variable`,
Type: grpcfed.CELIntType,
Setter: func(value *localValueType, v int64) error {
value.vars.FederationServiceVariable = v
return nil
},
By: `1`,
ByCacheIndex: 2,
})
}
if err := def_federation_service_variable(ctx); err != nil {
return err
}
if err := grpcfed.If(ctx, &grpcfed.IfParam[*localValueType]{
Value: value,
Expr: `grpc.federation.env.name == ''`,
CacheIndex: 3,
Body: func(value *localValueType) error {
errmsg, err := grpcfed.EvalCEL(ctx, &grpcfed.EvalCELRequest{
Value: value,
Expr: `'name environment variable is unspecified'`,
OutType: reflect.TypeOf(""),
CacheIndex: 4,
})
if err != nil {
return err
}
return grpcfed.NewGRPCStatus(grpcfed.InternalCode, errmsg.(string)).Err()
},
}); err != nil {
return err
}
/*
def {
name: "foo_bar_baz"
by: "{'a': true}"
}
*/
def_foo_bar_baz := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[map[string]bool, *localValueType]{
Name: `foo_bar_baz`,
Type: grpcfed.NewCELMapType(grpcfed.CELStringType, grpcfed.CELBoolType),
Setter: func(value *localValueType, v map[string]bool) error {
value.vars.FooBarBaz = v
return nil
},
By: `{'a': true}`,
ByCacheIndex: 5,
})
}
if err := def_foo_bar_baz(ctx); err != nil {
return err
}
return nil
}
// GetPost implements "federation.FederationService/GetPost" method.
func (s *FederationService) GetPost(ctx context.Context, req *GetPostRequest) (res *GetPostResponse, e error) {
ctx, span := s.tracer.Start(ctx, "federation.FederationService/GetPost")
defer span.End()
ctx = withFederationServiceEnv(ctx, s.env)
ctx = withFederationServiceVariable(ctx, s.svcVar)
ctx = grpcfed.WithLogger(ctx, s.logger)
ctx = grpcfed.WithCELCacheMap(ctx, s.celCacheMap)
defer func() {
if r := recover(); r != nil {
e = grpcfed.RecoverError(r, grpcfed.StackTrace())
grpcfed.OutputErrorLog(ctx, e)
}
}()
defer func() {
for _, celPlugin := range s.celPlugins {
celPlugin.Cleanup()
}
}()
res, err := s.resolve_Federation_GetPostResponse(ctx, &FederationService_Federation_GetPostResponseArgument{
Id: req.GetId(),
})
if err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
grpcfed.OutputErrorLog(ctx, err)
return nil, err
}
return res, nil
}
// GetName implements "federation.FederationService/GetName" method.
func (s *FederationService) GetName(ctx context.Context, req *GetNameRequest) (res *GetNameResponse, e error) {
ctx, span := s.tracer.Start(ctx, "federation.FederationService/GetName")
defer span.End()
ctx = withFederationServiceEnv(ctx, s.env)
ctx = withFederationServiceVariable(ctx, s.svcVar)
ctx = grpcfed.WithLogger(ctx, s.logger)
ctx = grpcfed.WithCELCacheMap(ctx, s.celCacheMap)
defer func() {
if r := recover(); r != nil {
e = grpcfed.RecoverError(r, grpcfed.StackTrace())
grpcfed.OutputErrorLog(ctx, e)
}
}()
defer func() {
for _, celPlugin := range s.celPlugins {
celPlugin.Cleanup()
}
}()
res, err := s.resolve_Federation_GetNameResponse(ctx, &FederationService_Federation_GetNameResponseArgument{})
if err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
grpcfed.OutputErrorLog(ctx, err)
return nil, err
}
return res, nil
}
// resolve_Federation_GetNameResponse resolve "federation.GetNameResponse" message.
func (s *FederationService) resolve_Federation_GetNameResponse(ctx context.Context, req *FederationService_Federation_GetNameResponseArgument) (*GetNameResponse, error) {
ctx, span := s.tracer.Start(ctx, "federation.GetNameResponse")
defer span.End()
ctx = grpcfed.WithLogger(ctx, grpcfed.Logger(ctx), grpcfed.LogAttrs(ctx)...)
grpcfed.Logger(ctx).DebugContext(ctx, "resolve federation.GetNameResponse", slog.Any("message_args", s.logvalue_Federation_GetNameResponseArgument(req)))
type localValueType struct {
*grpcfed.LocalValue
vars struct {
Foo *GetNameResponse_Foo
}
}
value := &localValueType{LocalValue: grpcfed.NewLocalValue(ctx, s.celEnvOpts, "grpc.federation.private.federation.GetNameResponseArgument", req)}
value.AddEnv(s.env)
value.AddServiceVariable(s.svcVar)
ctx = grpcfed.WithLocalValue(ctx, value.LocalValue)
/*
def {
name: "foo"
message {
name: "Foo"
}
}
*/
def_foo := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[*GetNameResponse_Foo, *localValueType]{
Name: `foo`,
Type: grpcfed.CELObjectType("federation.GetNameResponse.Foo"),
Setter: func(value *localValueType, v *GetNameResponse_Foo) error {
value.vars.Foo = v
return nil
},
Message: func(ctx context.Context, value *localValueType) (any, error) {
args := &FederationService_Federation_GetNameResponse_FooArgument{}
ret, err := s.resolve_Federation_GetNameResponse_Foo(ctx, args)
if err != nil {
return nil, err
}
return ret, nil
},
})
}
if err := def_foo(ctx); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
// assign named parameters to message arguments to pass to the custom resolver.
req.FederationService_Federation_GetNameResponseVariable.Foo = value.vars.Foo
// create a message value to be returned.
ret := &GetNameResponse{}
// field binding section.
// (grpc.federation.field).by = "grpc.federation.env.name"
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[string]{
Value: value,
Expr: `grpc.federation.env.name`,
CacheIndex: 6,
Setter: func(v string) error {
ret.Name = v
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
// (grpc.federation.field).by = "foo"
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[*GetNameResponse_Foo]{
Value: value,
Expr: `foo`,
CacheIndex: 7,
Setter: func(v *GetNameResponse_Foo) error {
ret.Foo = v
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
grpcfed.Logger(ctx).DebugContext(ctx, "resolved federation.GetNameResponse", slog.Any("federation.GetNameResponse", s.logvalue_Federation_GetNameResponse(ret)))
return ret, nil
}
// resolve_Federation_GetNameResponse_Foo resolve "federation.GetNameResponse.Foo" message.
func (s *FederationService) resolve_Federation_GetNameResponse_Foo(ctx context.Context, req *FederationService_Federation_GetNameResponse_FooArgument) (*GetNameResponse_Foo, error) {
ctx, span := s.tracer.Start(ctx, "federation.GetNameResponse.Foo")
defer span.End()
ctx = grpcfed.WithLogger(ctx, grpcfed.Logger(ctx), grpcfed.LogAttrs(ctx)...)
grpcfed.Logger(ctx).DebugContext(ctx, "resolve federation.GetNameResponse.Foo", slog.Any("message_args", s.logvalue_Federation_GetNameResponse_FooArgument(req)))
type localValueType struct {
*grpcfed.LocalValue
vars struct {
}
}
value := &localValueType{LocalValue: grpcfed.NewLocalValue(ctx, s.celEnvOpts, "grpc.federation.private.federation.GetNameResponse_FooArgument", req)}
value.AddEnv(s.env)
value.AddServiceVariable(s.svcVar)
ctx = grpcfed.WithLocalValue(ctx, value.LocalValue)
// create a message value to be returned.
ret := &GetNameResponse_Foo{}
// field binding section.
// (grpc.federation.field).by = "'y'"
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[string]{
Value: value,
Expr: `'y'`,
CacheIndex: 8,
Setter: func(v string) error {
ret.Y = v
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
grpcfed.Logger(ctx).DebugContext(ctx, "resolved federation.GetNameResponse.Foo", slog.Any("federation.GetNameResponse.Foo", s.logvalue_Federation_GetNameResponse_Foo(ret)))
return ret, nil
}
// resolve_Federation_GetPostResponse resolve "federation.GetPostResponse" message.
func (s *FederationService) resolve_Federation_GetPostResponse(ctx context.Context, req *FederationService_Federation_GetPostResponseArgument) (*GetPostResponse, error) {
ctx, span := s.tracer.Start(ctx, "federation.GetPostResponse")
defer span.End()
ctx = grpcfed.WithLogger(ctx, grpcfed.Logger(ctx), grpcfed.LogAttrs(ctx)...)
grpcfed.Logger(ctx).DebugContext(ctx, "resolve federation.GetPostResponse", slog.Any("message_args", s.logvalue_Federation_GetPostResponseArgument(req)))
type localValueType struct {
*grpcfed.LocalValue
vars struct {
Foo *GetPostResponse_Foo
P *Post
}
}
value := &localValueType{LocalValue: grpcfed.NewLocalValue(ctx, s.celEnvOpts, "grpc.federation.private.federation.GetPostResponseArgument", req)}
value.AddEnv(s.env)
value.AddServiceVariable(s.svcVar)
ctx = grpcfed.WithLocalValue(ctx, value.LocalValue)
/*
def {
name: "p"
message {
name: "Post"
}
}
*/
def_p := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[*Post, *localValueType]{
Name: `p`,
Type: grpcfed.CELObjectType("federation.Post"),
Setter: func(value *localValueType, v *Post) error {
value.vars.P = v
return nil
},
Message: func(ctx context.Context, value *localValueType) (any, error) {
args := &FederationService_Federation_PostArgument{}
ret, err := s.resolve_Federation_Post(ctx, args)
if err != nil {
return nil, err
}
return ret, nil
},
})
}
/*
def {
name: "foo"
message {
name: "Foo"
}
}
*/
def_foo := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[*GetPostResponse_Foo, *localValueType]{
Name: `foo`,
Type: grpcfed.CELObjectType("federation.GetPostResponse.Foo"),
Setter: func(value *localValueType, v *GetPostResponse_Foo) error {
value.vars.Foo = v
return nil
},
Message: func(ctx context.Context, value *localValueType) (any, error) {
args := &FederationService_Federation_GetPostResponse_FooArgument{}
ret, err := s.resolve_Federation_GetPostResponse_Foo(ctx, args)
if err != nil {
return nil, err
}
return ret, nil
},
})
}
// A tree view of message dependencies is shown below.
/*
foo ─┐
p ─┤
*/
eg, ctx1 := grpcfed.ErrorGroupWithContext(ctx)
grpcfed.GoWithRecover(eg, func() (any, error) {
if err := def_foo(ctx1); err != nil {
grpcfed.RecordErrorToSpan(ctx1, err)
return nil, err
}
return nil, nil
})
grpcfed.GoWithRecover(eg, func() (any, error) {
if err := def_p(ctx1); err != nil {
grpcfed.RecordErrorToSpan(ctx1, err)
return nil, err
}
return nil, nil
})
if err := eg.Wait(); err != nil {
return nil, err
}
// assign named parameters to message arguments to pass to the custom resolver.
req.FederationService_Federation_GetPostResponseVariable.Foo = value.vars.Foo
req.FederationService_Federation_GetPostResponseVariable.P = value.vars.P
// create a message value to be returned.
ret := &GetPostResponse{}
// field binding section.
// (grpc.federation.field).by = "p"
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[*Post]{
Value: value,
Expr: `p`,
CacheIndex: 9,
Setter: func(v *Post) error {
ret.Post = v
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
// (grpc.federation.field).by = "grpc.federation.var.upper_name"
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[string]{
Value: value,
Expr: `grpc.federation.var.upper_name`,
CacheIndex: 10,
Setter: func(v string) error {
ret.UpperName = v
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
// (grpc.federation.field).by = "foo"
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[*GetPostResponse_Foo]{
Value: value,
Expr: `foo`,
CacheIndex: 11,
Setter: func(v *GetPostResponse_Foo) error {
ret.Foo = v
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
grpcfed.Logger(ctx).DebugContext(ctx, "resolved federation.GetPostResponse", slog.Any("federation.GetPostResponse", s.logvalue_Federation_GetPostResponse(ret)))
return ret, nil
}
// resolve_Federation_GetPostResponse_Foo resolve "federation.GetPostResponse.Foo" message.
func (s *FederationService) resolve_Federation_GetPostResponse_Foo(ctx context.Context, req *FederationService_Federation_GetPostResponse_FooArgument) (*GetPostResponse_Foo, error) {
ctx, span := s.tracer.Start(ctx, "federation.GetPostResponse.Foo")
defer span.End()
ctx = grpcfed.WithLogger(ctx, grpcfed.Logger(ctx), grpcfed.LogAttrs(ctx)...)
grpcfed.Logger(ctx).DebugContext(ctx, "resolve federation.GetPostResponse.Foo", slog.Any("message_args", s.logvalue_Federation_GetPostResponse_FooArgument(req)))
type localValueType struct {
*grpcfed.LocalValue
vars struct {
}
}
value := &localValueType{LocalValue: grpcfed.NewLocalValue(ctx, s.celEnvOpts, "grpc.federation.private.federation.GetPostResponse_FooArgument", req)}
value.AddEnv(s.env)
value.AddServiceVariable(s.svcVar)
ctx = grpcfed.WithLocalValue(ctx, value.LocalValue)
// create a message value to be returned.
ret := &GetPostResponse_Foo{}
// field binding section.
// (grpc.federation.field).by = "'x'"
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[string]{
Value: value,
Expr: `'x'`,
CacheIndex: 12,
Setter: func(v string) error {
ret.X = v
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
grpcfed.Logger(ctx).DebugContext(ctx, "resolved federation.GetPostResponse.Foo", slog.Any("federation.GetPostResponse.Foo", s.logvalue_Federation_GetPostResponse_Foo(ret)))
return ret, nil
}
// resolve_Federation_Post resolve "federation.Post" message.
func (s *FederationService) resolve_Federation_Post(ctx context.Context, req *FederationService_Federation_PostArgument) (*Post, error) {
ctx, span := s.tracer.Start(ctx, "federation.Post")
defer span.End()
ctx = grpcfed.WithLogger(ctx, grpcfed.Logger(ctx), grpcfed.LogAttrs(ctx)...)
grpcfed.Logger(ctx).DebugContext(ctx, "resolve federation.Post", slog.Any("message_args", s.logvalue_Federation_PostArgument(req)))
type localValueType struct {
*grpcfed.LocalValue
vars struct {
Cmp bool
FavoriteValue favorite.FavoriteType
Reaction *Reaction
U *User
}
}
value := &localValueType{LocalValue: grpcfed.NewLocalValue(ctx, s.celEnvOpts, "grpc.federation.private.federation.PostArgument", req)}
value.AddEnv(s.env)
value.AddServiceVariable(s.svcVar)
ctx = grpcfed.WithLocalValue(ctx, value.LocalValue)
/*
def {
name: "u"
message {
name: "User"
args: [
{ name: "id", by: "'foo'" },
{ name: "name", by: "'bar'" }
]
}
}
*/
def_u := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[*User, *localValueType]{
Name: `u`,
Type: grpcfed.CELObjectType("federation.User"),
Setter: func(value *localValueType, v *User) error {
value.vars.U = v
return nil
},
Message: func(ctx context.Context, value *localValueType) (any, error) {
args := &FederationService_Federation_UserArgument{}
// { name: "id", by: "'foo'" }
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[string]{
Value: value,
Expr: `'foo'`,
CacheIndex: 13,
Setter: func(v string) error {
args.Id = v
return nil
},
}); err != nil {
return nil, err
}
// { name: "name", by: "'bar'" }
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[string]{
Value: value,
Expr: `'bar'`,
CacheIndex: 14,
Setter: func(v string) error {
args.Name = v
return nil
},
}); err != nil {
return nil, err
}
ret, err := s.resolve_Federation_User(ctx, args)
if err != nil {
return nil, err
}
return ret, nil
},
})
}
/*
def {
name: "favorite_value"
by: "favorite.FavoriteType.value('TYPE1')"
}
*/
def_favorite_value := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[favorite.FavoriteType, *localValueType]{
Name: `favorite_value`,
Type: grpcfed.CELIntType,
Setter: func(value *localValueType, v favorite.FavoriteType) error {
value.vars.FavoriteValue = v
return nil
},
By: `favorite.FavoriteType.value('TYPE1')`,
ByCacheIndex: 15,
})
}
/*
def {
name: "cmp"
by: "favorite_value == favorite.FavoriteType.TYPE1"
}
*/
def_cmp := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[bool, *localValueType]{
Name: `cmp`,
Type: grpcfed.CELBoolType,
Setter: func(value *localValueType, v bool) error {
value.vars.Cmp = v
return nil
},
By: `favorite_value == favorite.FavoriteType.TYPE1`,
ByCacheIndex: 16,
})
}
/*
def {
name: "reaction"
message {
name: "Reaction"
args { name: "v", by: "favorite_value" }
}
}
*/
def_reaction := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[*Reaction, *localValueType]{
Name: `reaction`,
Type: grpcfed.CELObjectType("federation.Reaction"),
Setter: func(value *localValueType, v *Reaction) error {
value.vars.Reaction = v
return nil
},
Message: func(ctx context.Context, value *localValueType) (any, error) {
args := &FederationService_Federation_ReactionArgument{}
// { name: "v", by: "favorite_value" }
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[favorite.FavoriteType]{
Value: value,
Expr: `favorite_value`,
CacheIndex: 17,
Setter: func(v favorite.FavoriteType) error {
args.V = v
return nil
},
}); err != nil {
return nil, err
}
ret, err := s.resolve_Federation_Reaction(ctx, args)
if err != nil {
return nil, err
}
return ret, nil
},
})
}
// A tree view of message dependencies is shown below.
/*
favorite_value ─┐
cmp ─┐
favorite_value ─┐ │
reaction ─┤
u ─┤
*/
eg, ctx1 := grpcfed.ErrorGroupWithContext(ctx)
grpcfed.GoWithRecover(eg, func() (any, error) {
if err := def_favorite_value(ctx1); err != nil {
grpcfed.RecordErrorToSpan(ctx1, err)
return nil, err
}
if err := def_cmp(ctx1); err != nil {
grpcfed.RecordErrorToSpan(ctx1, err)
return nil, err
}
return nil, nil
})
grpcfed.GoWithRecover(eg, func() (any, error) {
if err := def_favorite_value(ctx1); err != nil {
grpcfed.RecordErrorToSpan(ctx1, err)
return nil, err
}
if err := def_reaction(ctx1); err != nil {
grpcfed.RecordErrorToSpan(ctx1, err)
return nil, err
}
return nil, nil
})
grpcfed.GoWithRecover(eg, func() (any, error) {
if err := def_u(ctx1); err != nil {
grpcfed.RecordErrorToSpan(ctx1, err)
return nil, err
}
return nil, nil
})
if err := eg.Wait(); err != nil {
return nil, err
}
// assign named parameters to message arguments to pass to the custom resolver.
req.FederationService_Federation_PostVariable.Cmp = value.vars.Cmp
req.FederationService_Federation_PostVariable.FavoriteValue = value.vars.FavoriteValue
req.FederationService_Federation_PostVariable.Reaction = value.vars.Reaction
req.FederationService_Federation_PostVariable.U = value.vars.U
// create a message value to be returned.
ret := &Post{}
// field binding section.
// (grpc.federation.field).by = "'post-id'"
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[string]{
Value: value,
Expr: `'post-id'`,
CacheIndex: 18,
Setter: func(v string) error {
ret.Id = v
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
// (grpc.federation.field).by = "'title'"
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[string]{
Value: value,
Expr: `'title'`,
CacheIndex: 19,
Setter: func(v string) error {
ret.Title = v
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
// (grpc.federation.field).by = "'content'"
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[string]{
Value: value,
Expr: `'content'`,
CacheIndex: 20,
Setter: func(v string) error {
ret.Content = v
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
// (grpc.federation.field).by = "u"
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[*User]{
Value: value,
Expr: `u`,
CacheIndex: 21,
Setter: func(v *User) error {
ret.User = v
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
// (grpc.federation.field).by = "reaction"
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[*Reaction]{
Value: value,
Expr: `reaction`,
CacheIndex: 22,
Setter: func(v *Reaction) error {
ret.Reaction = v
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
// (grpc.federation.field).by = "favorite_value"
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[favorite.FavoriteType]{
Value: value,
Expr: `favorite_value`,
CacheIndex: 23,
Setter: func(v favorite.FavoriteType) error {
favoriteValueValue, err := s.cast_Favorite_FavoriteType__to__Federation_MyFavoriteType(v)
if err != nil {
return err
}
ret.FavoriteValue = favoriteValueValue
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
// (grpc.federation.field).by = "cmp"
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[bool]{
Value: value,
Expr: `cmp`,
CacheIndex: 24,
Setter: func(v bool) error {
ret.Cmp = v
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
grpcfed.Logger(ctx).DebugContext(ctx, "resolved federation.Post", slog.Any("federation.Post", s.logvalue_Federation_Post(ret)))
return ret, nil
}
// resolve_Federation_Reaction resolve "federation.Reaction" message.
func (s *FederationService) resolve_Federation_Reaction(ctx context.Context, req *FederationService_Federation_ReactionArgument) (*Reaction, error) {
ctx, span := s.tracer.Start(ctx, "federation.Reaction")
defer span.End()
ctx = grpcfed.WithLogger(ctx, grpcfed.Logger(ctx), grpcfed.LogAttrs(ctx)...)
grpcfed.Logger(ctx).DebugContext(ctx, "resolve federation.Reaction", slog.Any("message_args", s.logvalue_Federation_ReactionArgument(req)))
type localValueType struct {
*grpcfed.LocalValue
vars struct {
Cmp bool
}
}
value := &localValueType{LocalValue: grpcfed.NewLocalValue(ctx, s.celEnvOpts, "grpc.federation.private.federation.ReactionArgument", req)}
value.AddEnv(s.env)
value.AddServiceVariable(s.svcVar)
ctx = grpcfed.WithLocalValue(ctx, value.LocalValue)
/*
def {
name: "cmp"
by: "$.v == favorite.FavoriteType.TYPE1"
}
*/
def_cmp := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[bool, *localValueType]{
Name: `cmp`,
Type: grpcfed.CELBoolType,
Setter: func(value *localValueType, v bool) error {
value.vars.Cmp = v
return nil
},
By: `$.v == favorite.FavoriteType.TYPE1`,
ByCacheIndex: 25,
})
}
if err := def_cmp(ctx); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
// assign named parameters to message arguments to pass to the custom resolver.
req.FederationService_Federation_ReactionVariable.Cmp = value.vars.Cmp
// create a message value to be returned.
ret := &Reaction{}
// field binding section.
// (grpc.federation.field).by = "favorite.FavoriteType.value('TYPE1')"
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[favorite.FavoriteType]{
Value: value,
Expr: `favorite.FavoriteType.value('TYPE1')`,
CacheIndex: 26,
Setter: func(v favorite.FavoriteType) error {
ret.FavoriteType = v
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
// (grpc.federation.field).by = "favorite.FavoriteType.name(favorite.FavoriteType.value('TYPE1'))"
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[string]{
Value: value,
Expr: `favorite.FavoriteType.name(favorite.FavoriteType.value('TYPE1'))`,
CacheIndex: 27,
Setter: func(v string) error {
ret.FavoriteTypeStr = v
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
// (grpc.federation.field).by = "cmp"
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[bool]{
Value: value,
Expr: `cmp`,
CacheIndex: 28,
Setter: func(v bool) error {
ret.Cmp = v
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
grpcfed.Logger(ctx).DebugContext(ctx, "resolved federation.Reaction", slog.Any("federation.Reaction", s.logvalue_Federation_Reaction(ret)))
return ret, nil
}
// resolve_Federation_User resolve "federation.User" message.
func (s *FederationService) resolve_Federation_User(ctx context.Context, req *FederationService_Federation_UserArgument) (*User, error) {
ctx, span := s.tracer.Start(ctx, "federation.User")
defer span.End()
ctx = grpcfed.WithLogger(ctx, grpcfed.Logger(ctx), grpcfed.LogAttrs(ctx)...)
grpcfed.Logger(ctx).DebugContext(ctx, "resolve federation.User", slog.Any("message_args", s.logvalue_Federation_UserArgument(req)))
type localValueType struct {
*grpcfed.LocalValue
vars struct {
}
}
value := &localValueType{LocalValue: grpcfed.NewLocalValue(ctx, s.celEnvOpts, "grpc.federation.private.federation.UserArgument", req)}
value.AddEnv(s.env)
value.AddServiceVariable(s.svcVar)
ctx = grpcfed.WithLocalValue(ctx, value.LocalValue)
// create a message value to be returned.
ret := &User{}
// field binding section.
// (grpc.federation.field).by = "$.id"
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[string]{
Value: value,
Expr: `$.id`,
CacheIndex: 29,
Setter: func(v string) error {
ret.Id = v
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
// (grpc.federation.field).by = "$.name"
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[string]{
Value: value,
Expr: `$.name`,
CacheIndex: 30,
Setter: func(v string) error {
ret.Name = v
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
grpcfed.Logger(ctx).DebugContext(ctx, "resolved federation.User", slog.Any("federation.User", s.logvalue_Federation_User(ret)))
return ret, nil
}
// cast_Favorite_FavoriteType__to__Federation_MyFavoriteType cast from "favorite.FavoriteType" to "federation.MyFavoriteType".
func (s *FederationService) cast_Favorite_FavoriteType__to__Federation_MyFavoriteType(from favorite.FavoriteType) (MyFavoriteType, error) {
var ret MyFavoriteType
switch from {
case favorite.FavoriteType_UNKNOWN:
ret = MyFavoriteType_UNKNOWN
case favorite.FavoriteType_TYPE1:
ret = MyFavoriteType_TYPE1
default:
ret = 0
}
return ret, nil
}
func (s *FederationService) logvalue_Favorite_FavoriteType(v favorite.FavoriteType) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
switch v {
case favorite.FavoriteType_UNKNOWN:
return slog.StringValue("UNKNOWN")
case favorite.FavoriteType_TYPE1:
return slog.StringValue("TYPE1")
case favorite.FavoriteType_TYPE2:
return slog.StringValue("TYPE2")
}
return slog.StringValue("")
}
func (s *FederationService) logvalue_Federation_GetNameResponse(v *GetNameResponse) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.String("name", v.GetName()),
slog.Any("foo", s.logvalue_Federation_GetNameResponse_Foo(v.GetFoo())),
)
}
func (s *FederationService) logvalue_Federation_GetNameResponseArgument(v *FederationService_Federation_GetNameResponseArgument) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue()
}
func (s *FederationService) logvalue_Federation_GetNameResponse_Foo(v *GetNameResponse_Foo) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.String("y", v.GetY()),
)
}
func (s *FederationService) logvalue_Federation_GetNameResponse_FooArgument(v *FederationService_Federation_GetNameResponse_FooArgument) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue()
}
func (s *FederationService) logvalue_Federation_GetPostResponse(v *GetPostResponse) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.Any("post", s.logvalue_Federation_Post(v.GetPost())),
slog.String("upper_name", v.GetUpperName()),
slog.Any("foo", s.logvalue_Federation_GetPostResponse_Foo(v.GetFoo())),
)
}
func (s *FederationService) logvalue_Federation_GetPostResponseArgument(v *FederationService_Federation_GetPostResponseArgument) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.String("id", v.Id),
)
}
func (s *FederationService) logvalue_Federation_GetPostResponse_Foo(v *GetPostResponse_Foo) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.String("x", v.GetX()),
)
}
func (s *FederationService) logvalue_Federation_GetPostResponse_FooArgument(v *FederationService_Federation_GetPostResponse_FooArgument) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue()
}
func (s *FederationService) logvalue_Federation_MyFavoriteType(v MyFavoriteType) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
switch v {
case MyFavoriteType_UNKNOWN:
return slog.StringValue("UNKNOWN")
case MyFavoriteType_TYPE1:
return slog.StringValue("TYPE1")
}
return slog.StringValue("")
}
func (s *FederationService) logvalue_Federation_Post(v *Post) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.String("id", v.GetId()),
slog.String("title", v.GetTitle()),
slog.String("content", v.GetContent()),
slog.Any("user", s.logvalue_Federation_User(v.GetUser())),
slog.Any("reaction", s.logvalue_Federation_Reaction(v.GetReaction())),
slog.String("favorite_value", s.logvalue_Federation_MyFavoriteType(v.GetFavoriteValue()).String()),
slog.Bool("cmp", v.GetCmp()),
)
}
func (s *FederationService) logvalue_Federation_PostArgument(v *FederationService_Federation_PostArgument) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue()
}
func (s *FederationService) logvalue_Federation_Reaction(v *Reaction) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.String("favorite_type", s.logvalue_Favorite_FavoriteType(v.GetFavoriteType()).String()),
slog.String("favorite_type_str", v.GetFavoriteTypeStr()),
slog.Bool("cmp", v.GetCmp()),
)
}
func (s *FederationService) logvalue_Federation_ReactionArgument(v *FederationService_Federation_ReactionArgument) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.String("v", s.logvalue_Favorite_FavoriteType(v.V).String()),
)
}
func (s *FederationService) logvalue_Federation_User(v *User) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.String("id", v.GetId()),
slog.String("name", v.GetName()),
)
}
func (s *FederationService) logvalue_Federation_UserArgument(v *FederationService_Federation_UserArgument) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.String("id", v.Id),
slog.String("name", v.Name),
)
}
// Federation_GetNameResponseVariable represents variable definitions in "federation.GetNameResponse".
type PrivateService_Federation_GetNameResponseVariable struct {
Foo *GetNameResponse_Foo
}
// Federation_GetNameResponseArgument is argument for "federation.GetNameResponse" message.
type PrivateService_Federation_GetNameResponseArgument struct {
PrivateService_Federation_GetNameResponseVariable
}
// Federation_GetNameResponse_FooVariable represents variable definitions in "federation.Foo".
type PrivateService_Federation_GetNameResponse_FooVariable struct {
}
// Federation_GetNameResponse_FooArgument is argument for "federation.Foo" message.
type PrivateService_Federation_GetNameResponse_FooArgument struct {
PrivateService_Federation_GetNameResponse_FooVariable
}
// Federation_GetPostResponseVariable represents variable definitions in "federation.GetPostResponse".
type PrivateService_Federation_GetPostResponseVariable struct {
Foo *GetPostResponse_Foo
P *Post
}
// Federation_GetPostResponseArgument is argument for "federation.GetPostResponse" message.
type PrivateService_Federation_GetPostResponseArgument struct {
Id string
PrivateService_Federation_GetPostResponseVariable
}
// Federation_GetPostResponse_FooVariable represents variable definitions in "federation.Foo".
type PrivateService_Federation_GetPostResponse_FooVariable struct {
}
// Federation_GetPostResponse_FooArgument is argument for "federation.Foo" message.
type PrivateService_Federation_GetPostResponse_FooArgument struct {
PrivateService_Federation_GetPostResponse_FooVariable
}
// Federation_PostVariable represents variable definitions in "federation.Post".
type PrivateService_Federation_PostVariable struct {
Cmp bool
FavoriteValue favorite.FavoriteType
Reaction *Reaction
U *User
}
// Federation_PostArgument is argument for "federation.Post" message.
type PrivateService_Federation_PostArgument struct {
PrivateService_Federation_PostVariable
}
// Federation_ReactionVariable represents variable definitions in "federation.Reaction".
type PrivateService_Federation_ReactionVariable struct {
Cmp bool
}
// Federation_ReactionArgument is argument for "federation.Reaction" message.
type PrivateService_Federation_ReactionArgument struct {
V favorite.FavoriteType
PrivateService_Federation_ReactionVariable
}
// Federation_UserVariable represents variable definitions in "federation.User".
type PrivateService_Federation_UserVariable struct {
}
// Federation_UserArgument is argument for "federation.User" message.
type PrivateService_Federation_UserArgument struct {
Id string
Name string
PrivateService_Federation_UserVariable
}
// PrivateServiceConfig configuration required to initialize the service that use GRPC Federation.
type PrivateServiceConfig struct {
// ErrorHandler Federation Service often needs to convert errors received from downstream services.
// If an error occurs during method execution in the Federation Service, this error handler is called and the returned error is treated as a final error.
ErrorHandler grpcfed.ErrorHandler
// Logger sets the logger used to output Debug/Info/Error information.
Logger *slog.Logger
}
// PrivateServiceClientFactory provides a factory that creates the gRPC Client needed to invoke methods of the gRPC Service on which the Federation Service depends.
type PrivateServiceClientFactory interface {
}
// PrivateServiceClientConfig helper to create gRPC client.
// Hints for creating a gRPC Client.
type PrivateServiceClientConfig struct {
// Service FQDN ( `.` ) of the service on Protocol Buffers.
Service string
}
// PrivateServiceDependentClientSet has a gRPC client for all services on which the federation service depends.
// This is provided as an argument when implementing the custom resolver.
type PrivateServiceDependentClientSet struct {
}
// PrivateServiceResolver provides an interface to directly implement message resolver and field resolver not defined in Protocol Buffers.
type PrivateServiceResolver interface {
}
// PrivateServiceCELPluginWasmConfig type alias for grpcfedcel.WasmConfig.
type PrivateServiceCELPluginWasmConfig = grpcfedcel.WasmConfig
// PrivateServiceCELPluginConfig hints for loading a WebAssembly based plugin.
type PrivateServiceCELPluginConfig struct {
CacheDir string
}
// PrivateServiceEnv keeps the values read from environment variables.
type PrivateServiceEnv struct {
Name string `envconfig:"NAME" default:"private"`
Private string `envconfig:"PRIVATE"`
}
type keyPrivateServiceEnv struct{}
// GetPrivateServiceEnv gets environment variables.
func GetPrivateServiceEnv(ctx context.Context) *PrivateServiceEnv {
value := ctx.Value(keyPrivateServiceEnv{})
if value == nil {
return nil
}
return value.(*PrivateServiceEnv)
}
func withPrivateServiceEnv(ctx context.Context, env *PrivateServiceEnv) context.Context {
return context.WithValue(ctx, keyPrivateServiceEnv{}, env)
}
// PrivateServiceVariable keeps the initial values.
type PrivateServiceVariable struct {
UpperName string
PrivateServiceEnum MyFavoriteType
PrivateServiceUser *User
Users []*User
PrivateServiceUserNames []string
FooBarBaz map[string]bool
}
type keyPrivateServiceVariable struct{}
// GetPrivateServiceVariable gets initial variables.
func GetPrivateServiceVariable(ctx context.Context) *PrivateServiceVariable {
value := ctx.Value(keyPrivateServiceVariable{})
if value == nil {
return nil
}
return value.(*PrivateServiceVariable)
}
func withPrivateServiceVariable(ctx context.Context, svcVar *PrivateServiceVariable) context.Context {
return context.WithValue(ctx, keyPrivateServiceVariable{}, svcVar)
}
// PrivateServiceUnimplementedResolver a structure implemented to satisfy the Resolver interface.
// An Unimplemented error is always returned.
// This is intended for use when there are many Resolver interfaces that do not need to be implemented,
// by embedding them in a resolver structure that you have created.
type PrivateServiceUnimplementedResolver struct{}
// PrivateService represents Federation Service.
type PrivateService struct {
UnimplementedPrivateServiceServer
cfg PrivateServiceConfig
logger *slog.Logger
isLogLevelDebug bool
errorHandler grpcfed.ErrorHandler
celCacheMap *grpcfed.CELCacheMap
tracer trace.Tracer
env *PrivateServiceEnv
svcVar *PrivateServiceVariable
celTypeHelper *grpcfed.CELTypeHelper
celEnvOpts []grpcfed.CELEnvOption
celPlugins []*grpcfedcel.CELPlugin
client *PrivateServiceDependentClientSet
}
// NewPrivateService creates PrivateService instance by PrivateServiceConfig.
func NewPrivateService(cfg PrivateServiceConfig) (*PrivateService, error) {
logger := cfg.Logger
if logger == nil {
logger = slog.New(slog.NewJSONHandler(io.Discard, nil))
}
tracer := otel.Tracer("federation.PrivateService")
ctx := grpcfed.WithLogger(context.Background(), logger)
ctx = grpcfed.WithTracer(ctx, tracer)
errorHandler := cfg.ErrorHandler
if errorHandler == nil {
errorHandler = func(ctx context.Context, methodName string, err error) error { return err }
}
celTypeHelperFieldMap := grpcfed.CELTypeHelperFieldMap{
"grpc.federation.private.federation.GetNameResponseArgument": {},
"grpc.federation.private.federation.GetNameResponse_FooArgument": {},
"grpc.federation.private.federation.GetPostResponseArgument": {
"id": grpcfed.NewCELFieldType(grpcfed.CELStringType, "Id"),
},
"grpc.federation.private.federation.GetPostResponse_FooArgument": {},
"grpc.federation.private.federation.PostArgument": {},
"grpc.federation.private.federation.ReactionArgument": {
"v": grpcfed.NewCELFieldType(grpcfed.CELIntType, "V"),
},
"grpc.federation.private.federation.UserArgument": {
"id": grpcfed.NewCELFieldType(grpcfed.CELStringType, "Id"),
"name": grpcfed.NewCELFieldType(grpcfed.CELStringType, "Name"),
},
"grpc.federation.private.Env": {
"name": grpcfed.NewCELFieldType(grpcfed.CELStringType, "Name"),
"private": grpcfed.NewCELFieldType(grpcfed.CELStringType, "Private"),
},
"grpc.federation.private.ServiceVariable": {
"upper_name": grpcfed.NewCELFieldType(grpcfed.CELStringType, "UpperName"),
"private_service_enum": grpcfed.NewCELFieldType(grpcfed.CELIntType, "PrivateServiceEnum"),
"private_service_user": grpcfed.NewCELFieldType(grpcfed.NewCELObjectType("federation.User"), "PrivateServiceUser"),
"users": grpcfed.NewCELFieldType(grpcfed.NewCELListType(grpcfed.NewCELObjectType("federation.User")), "Users"),
"private_service_user_names": grpcfed.NewCELFieldType(grpcfed.NewCELListType(grpcfed.CELStringType), "PrivateServiceUserNames"),
"foo_bar_baz": grpcfed.NewCELFieldType(grpcfed.NewCELMapType(grpcfed.CELStringType, grpcfed.CELBoolType), "FooBarBaz"),
},
}
celTypeHelper := grpcfed.NewCELTypeHelper("federation", celTypeHelperFieldMap)
var celEnvOpts []grpcfed.CELEnvOption
celEnvOpts = append(celEnvOpts, grpcfed.NewDefaultEnvOptions(celTypeHelper)...)
celEnvOpts = append(celEnvOpts, grpcfed.EnumAccessorOptions("favorite.FavoriteType", favorite.FavoriteType_value, favorite.FavoriteType_name)...)
celEnvOpts = append(celEnvOpts, grpcfed.EnumAccessorOptions("federation.MyFavoriteType", MyFavoriteType_value, MyFavoriteType_name)...)
celEnvOpts = append(celEnvOpts, grpcfed.NewCELVariable("grpc.federation.env", grpcfed.CELObjectType("grpc.federation.private.Env")))
celEnvOpts = append(celEnvOpts, grpcfed.NewCELVariable("grpc.federation.var", grpcfed.CELObjectType("grpc.federation.private.ServiceVariable")))
var env PrivateServiceEnv
if err := grpcfed.LoadEnv("", &env); err != nil {
return nil, err
}
svc := &PrivateService{
cfg: cfg,
logger: logger,
isLogLevelDebug: logger.Enabled(context.Background(), slog.LevelDebug),
errorHandler: errorHandler,
celEnvOpts: celEnvOpts,
celTypeHelper: celTypeHelper,
celCacheMap: grpcfed.NewCELCacheMap(),
tracer: tracer,
env: &env,
svcVar: new(PrivateServiceVariable),
client: &PrivateServiceDependentClientSet{},
}
if err := svc.initServiceVariables(ctx); err != nil {
return nil, err
}
return svc, nil
}
// CleanupPrivateService cleanup all resources to prevent goroutine leaks.
func CleanupPrivateService(ctx context.Context, svc *PrivateService) {
svc.cleanup(ctx)
}
func (s *PrivateService) cleanup(ctx context.Context) {
for _, plugin := range s.celPlugins {
plugin.Close()
}
}
func (s *PrivateService) initServiceVariables(ctx context.Context) error {
ctx = grpcfed.WithCELCacheMap(ctx, s.celCacheMap)
type localValueType struct {
*grpcfed.LocalValue
vars *PrivateServiceVariable
}
value := &localValueType{
LocalValue: grpcfed.NewServiceVariableLocalValue(s.celEnvOpts),
vars: s.svcVar,
}
value.AddEnv(s.env)
value.AddServiceVariable(s.svcVar)
ctx = grpcfed.WithLocalValue(ctx, value.LocalValue)
/*
def {
name: "upper_name"
by: "grpc.federation.strings.toUpper(grpc.federation.env.name)"
}
*/
def_upper_name := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[string, *localValueType]{
Name: `upper_name`,
Type: grpcfed.CELStringType,
Setter: func(value *localValueType, v string) error {
value.vars.UpperName = v
return nil
},
By: `grpc.federation.strings.toUpper(grpc.federation.env.name)`,
ByCacheIndex: 1,
})
}
if err := def_upper_name(ctx); err != nil {
return err
}
/*
def {
name: "private_service_enum"
enum {
name: "federation.MyFavoriteType"
by: "favorite.FavoriteType.value('TYPE_1')"
}
}
*/
def_private_service_enum := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[MyFavoriteType, *localValueType]{
Name: `private_service_enum`,
Type: grpcfed.CELIntType,
Setter: func(value *localValueType, v MyFavoriteType) error {
value.vars.PrivateServiceEnum = v
return nil
},
Enum: func(ctx context.Context, value *localValueType) (MyFavoriteType, error) {
src, err := grpcfed.EvalCEL(ctx, &grpcfed.EvalCELRequest{
Value: value,
Expr: `favorite.FavoriteType.value('TYPE_1')`,
OutType: reflect.TypeOf(favorite.FavoriteType(0)),
CacheIndex: 2,
})
if err != nil {
return 0, err
}
v := src.(favorite.FavoriteType)
return s.cast_Favorite_FavoriteType__to__Federation_MyFavoriteType(v)
},
})
}
if err := def_private_service_enum(ctx); err != nil {
return err
}
/*
def {
name: "private_service_user"
message {
name: "User"
args: [
{ name: "id", by: "'private_service_user_id'" },
{ name: "name", by: "'private_service_user_name'" }
]
}
}
*/
def_private_service_user := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[*User, *localValueType]{
Name: `private_service_user`,
Type: grpcfed.CELObjectType("federation.User"),
Setter: func(value *localValueType, v *User) error {
value.vars.PrivateServiceUser = v
return nil
},
Message: func(ctx context.Context, value *localValueType) (any, error) {
args := &PrivateService_Federation_UserArgument{}
// { name: "id", by: "'private_service_user_id'" }
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[string]{
Value: value,
Expr: `'private_service_user_id'`,
CacheIndex: 3,
Setter: func(v string) error {
args.Id = v
return nil
},
}); err != nil {
return nil, err
}
// { name: "name", by: "'private_service_user_name'" }
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[string]{
Value: value,
Expr: `'private_service_user_name'`,
CacheIndex: 4,
Setter: func(v string) error {
args.Name = v
return nil
},
}); err != nil {
return nil, err
}
ret, err := s.resolve_Federation_User(ctx, args)
if err != nil {
return nil, err
}
return ret, nil
},
})
}
if err := def_private_service_user(ctx); err != nil {
return err
}
/*
def {
name: "users"
by: "[private_service_user]"
}
*/
def_users := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[[]*User, *localValueType]{
Name: `users`,
Type: grpcfed.CELListType(grpcfed.CELObjectType("federation.User")),
Setter: func(value *localValueType, v []*User) error {
value.vars.Users = v
return nil
},
By: `[private_service_user]`,
ByCacheIndex: 5,
})
}
if err := def_users(ctx); err != nil {
return err
}
/*
def {
name: "private_service_user_names"
map {
iterator {
name: "iter"
src: "users"
}
by: "iter.name"
}
}
*/
def_private_service_user_names := func(ctx context.Context) error {
return grpcfed.EvalDefMap(ctx, value, grpcfed.DefMap[[]string, *User, *localValueType]{
Name: `private_service_user_names`,
Type: grpcfed.CELListType(grpcfed.CELStringType),
Setter: func(value *localValueType, v []string) error {
value.vars.PrivateServiceUserNames = v
return nil
},
IteratorName: `iter`,
IteratorType: grpcfed.CELObjectType("federation.User"),
IteratorSource: func(value *localValueType) []*User { return value.vars.Users },
Iterator: func(ctx context.Context, value *grpcfed.MapIteratorValue) (any, error) {
return grpcfed.EvalCEL(ctx, &grpcfed.EvalCELRequest{
Value: value,
Expr: `iter.name`,
OutType: reflect.TypeOf(""),
CacheIndex: 6,
})
},
})
}
if err := def_private_service_user_names(ctx); err != nil {
return err
}
/*
def {
name: "foo_bar_baz"
by: "{'b': true}"
}
*/
def_foo_bar_baz := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[map[string]bool, *localValueType]{
Name: `foo_bar_baz`,
Type: grpcfed.NewCELMapType(grpcfed.CELStringType, grpcfed.CELBoolType),
Setter: func(value *localValueType, v map[string]bool) error {
value.vars.FooBarBaz = v
return nil
},
By: `{'b': true}`,
ByCacheIndex: 7,
})
}
if err := def_foo_bar_baz(ctx); err != nil {
return err
}
return nil
}
// GetPost implements "federation.PrivateService/GetPost" method.
func (s *PrivateService) GetPost(ctx context.Context, req *GetPostRequest) (res *GetPostResponse, e error) {
ctx, span := s.tracer.Start(ctx, "federation.PrivateService/GetPost")
defer span.End()
ctx = withPrivateServiceEnv(ctx, s.env)
ctx = withPrivateServiceVariable(ctx, s.svcVar)
ctx = grpcfed.WithLogger(ctx, s.logger)
ctx = grpcfed.WithCELCacheMap(ctx, s.celCacheMap)
defer func() {
if r := recover(); r != nil {
e = grpcfed.RecoverError(r, grpcfed.StackTrace())
grpcfed.OutputErrorLog(ctx, e)
}
}()
defer func() {
for _, celPlugin := range s.celPlugins {
celPlugin.Cleanup()
}
}()
res, err := s.resolve_Federation_GetPostResponse(ctx, &PrivateService_Federation_GetPostResponseArgument{
Id: req.GetId(),
})
if err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
grpcfed.OutputErrorLog(ctx, err)
return nil, err
}
return res, nil
}
// GetName implements "federation.PrivateService/GetName" method.
func (s *PrivateService) GetName(ctx context.Context, req *GetNameRequest) (res *GetNameResponse, e error) {
ctx, span := s.tracer.Start(ctx, "federation.PrivateService/GetName")
defer span.End()
ctx = withPrivateServiceEnv(ctx, s.env)
ctx = withPrivateServiceVariable(ctx, s.svcVar)
ctx = grpcfed.WithLogger(ctx, s.logger)
ctx = grpcfed.WithCELCacheMap(ctx, s.celCacheMap)
defer func() {
if r := recover(); r != nil {
e = grpcfed.RecoverError(r, grpcfed.StackTrace())
grpcfed.OutputErrorLog(ctx, e)
}
}()
defer func() {
for _, celPlugin := range s.celPlugins {
celPlugin.Cleanup()
}
}()
res, err := s.resolve_Federation_GetNameResponse(ctx, &PrivateService_Federation_GetNameResponseArgument{})
if err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
grpcfed.OutputErrorLog(ctx, err)
return nil, err
}
return res, nil
}
// resolve_Federation_GetNameResponse resolve "federation.GetNameResponse" message.
func (s *PrivateService) resolve_Federation_GetNameResponse(ctx context.Context, req *PrivateService_Federation_GetNameResponseArgument) (*GetNameResponse, error) {
ctx, span := s.tracer.Start(ctx, "federation.GetNameResponse")
defer span.End()
ctx = grpcfed.WithLogger(ctx, grpcfed.Logger(ctx), grpcfed.LogAttrs(ctx)...)
grpcfed.Logger(ctx).DebugContext(ctx, "resolve federation.GetNameResponse", slog.Any("message_args", s.logvalue_Federation_GetNameResponseArgument(req)))
type localValueType struct {
*grpcfed.LocalValue
vars struct {
Foo *GetNameResponse_Foo
}
}
value := &localValueType{LocalValue: grpcfed.NewLocalValue(ctx, s.celEnvOpts, "grpc.federation.private.federation.GetNameResponseArgument", req)}
value.AddEnv(s.env)
value.AddServiceVariable(s.svcVar)
ctx = grpcfed.WithLocalValue(ctx, value.LocalValue)
/*
def {
name: "foo"
message {
name: "Foo"
}
}
*/
def_foo := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[*GetNameResponse_Foo, *localValueType]{
Name: `foo`,
Type: grpcfed.CELObjectType("federation.GetNameResponse.Foo"),
Setter: func(value *localValueType, v *GetNameResponse_Foo) error {
value.vars.Foo = v
return nil
},
Message: func(ctx context.Context, value *localValueType) (any, error) {
args := &PrivateService_Federation_GetNameResponse_FooArgument{}
ret, err := s.resolve_Federation_GetNameResponse_Foo(ctx, args)
if err != nil {
return nil, err
}
return ret, nil
},
})
}
if err := def_foo(ctx); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
// assign named parameters to message arguments to pass to the custom resolver.
req.PrivateService_Federation_GetNameResponseVariable.Foo = value.vars.Foo
// create a message value to be returned.
ret := &GetNameResponse{}
// field binding section.
// (grpc.federation.field).by = "grpc.federation.env.name"
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[string]{
Value: value,
Expr: `grpc.federation.env.name`,
CacheIndex: 8,
Setter: func(v string) error {
ret.Name = v
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
// (grpc.federation.field).by = "foo"
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[*GetNameResponse_Foo]{
Value: value,
Expr: `foo`,
CacheIndex: 9,
Setter: func(v *GetNameResponse_Foo) error {
ret.Foo = v
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
grpcfed.Logger(ctx).DebugContext(ctx, "resolved federation.GetNameResponse", slog.Any("federation.GetNameResponse", s.logvalue_Federation_GetNameResponse(ret)))
return ret, nil
}
// resolve_Federation_GetNameResponse_Foo resolve "federation.GetNameResponse.Foo" message.
func (s *PrivateService) resolve_Federation_GetNameResponse_Foo(ctx context.Context, req *PrivateService_Federation_GetNameResponse_FooArgument) (*GetNameResponse_Foo, error) {
ctx, span := s.tracer.Start(ctx, "federation.GetNameResponse.Foo")
defer span.End()
ctx = grpcfed.WithLogger(ctx, grpcfed.Logger(ctx), grpcfed.LogAttrs(ctx)...)
grpcfed.Logger(ctx).DebugContext(ctx, "resolve federation.GetNameResponse.Foo", slog.Any("message_args", s.logvalue_Federation_GetNameResponse_FooArgument(req)))
type localValueType struct {
*grpcfed.LocalValue
vars struct {
}
}
value := &localValueType{LocalValue: grpcfed.NewLocalValue(ctx, s.celEnvOpts, "grpc.federation.private.federation.GetNameResponse_FooArgument", req)}
value.AddEnv(s.env)
value.AddServiceVariable(s.svcVar)
ctx = grpcfed.WithLocalValue(ctx, value.LocalValue)
// create a message value to be returned.
ret := &GetNameResponse_Foo{}
// field binding section.
// (grpc.federation.field).by = "'y'"
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[string]{
Value: value,
Expr: `'y'`,
CacheIndex: 10,
Setter: func(v string) error {
ret.Y = v
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
grpcfed.Logger(ctx).DebugContext(ctx, "resolved federation.GetNameResponse.Foo", slog.Any("federation.GetNameResponse.Foo", s.logvalue_Federation_GetNameResponse_Foo(ret)))
return ret, nil
}
// resolve_Federation_GetPostResponse resolve "federation.GetPostResponse" message.
func (s *PrivateService) resolve_Federation_GetPostResponse(ctx context.Context, req *PrivateService_Federation_GetPostResponseArgument) (*GetPostResponse, error) {
ctx, span := s.tracer.Start(ctx, "federation.GetPostResponse")
defer span.End()
ctx = grpcfed.WithLogger(ctx, grpcfed.Logger(ctx), grpcfed.LogAttrs(ctx)...)
grpcfed.Logger(ctx).DebugContext(ctx, "resolve federation.GetPostResponse", slog.Any("message_args", s.logvalue_Federation_GetPostResponseArgument(req)))
type localValueType struct {
*grpcfed.LocalValue
vars struct {
Foo *GetPostResponse_Foo
P *Post
}
}
value := &localValueType{LocalValue: grpcfed.NewLocalValue(ctx, s.celEnvOpts, "grpc.federation.private.federation.GetPostResponseArgument", req)}
value.AddEnv(s.env)
value.AddServiceVariable(s.svcVar)
ctx = grpcfed.WithLocalValue(ctx, value.LocalValue)
/*
def {
name: "p"
message {
name: "Post"
}
}
*/
def_p := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[*Post, *localValueType]{
Name: `p`,
Type: grpcfed.CELObjectType("federation.Post"),
Setter: func(value *localValueType, v *Post) error {
value.vars.P = v
return nil
},
Message: func(ctx context.Context, value *localValueType) (any, error) {
args := &PrivateService_Federation_PostArgument{}
ret, err := s.resolve_Federation_Post(ctx, args)
if err != nil {
return nil, err
}
return ret, nil
},
})
}
/*
def {
name: "foo"
message {
name: "Foo"
}
}
*/
def_foo := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[*GetPostResponse_Foo, *localValueType]{
Name: `foo`,
Type: grpcfed.CELObjectType("federation.GetPostResponse.Foo"),
Setter: func(value *localValueType, v *GetPostResponse_Foo) error {
value.vars.Foo = v
return nil
},
Message: func(ctx context.Context, value *localValueType) (any, error) {
args := &PrivateService_Federation_GetPostResponse_FooArgument{}
ret, err := s.resolve_Federation_GetPostResponse_Foo(ctx, args)
if err != nil {
return nil, err
}
return ret, nil
},
})
}
// A tree view of message dependencies is shown below.
/*
foo ─┐
p ─┤
*/
eg, ctx1 := grpcfed.ErrorGroupWithContext(ctx)
grpcfed.GoWithRecover(eg, func() (any, error) {
if err := def_foo(ctx1); err != nil {
grpcfed.RecordErrorToSpan(ctx1, err)
return nil, err
}
return nil, nil
})
grpcfed.GoWithRecover(eg, func() (any, error) {
if err := def_p(ctx1); err != nil {
grpcfed.RecordErrorToSpan(ctx1, err)
return nil, err
}
return nil, nil
})
if err := eg.Wait(); err != nil {
return nil, err
}
// assign named parameters to message arguments to pass to the custom resolver.
req.PrivateService_Federation_GetPostResponseVariable.Foo = value.vars.Foo
req.PrivateService_Federation_GetPostResponseVariable.P = value.vars.P
// create a message value to be returned.
ret := &GetPostResponse{}
// field binding section.
// (grpc.federation.field).by = "p"
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[*Post]{
Value: value,
Expr: `p`,
CacheIndex: 11,
Setter: func(v *Post) error {
ret.Post = v
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
// (grpc.federation.field).by = "grpc.federation.var.upper_name"
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[string]{
Value: value,
Expr: `grpc.federation.var.upper_name`,
CacheIndex: 12,
Setter: func(v string) error {
ret.UpperName = v
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
// (grpc.federation.field).by = "foo"
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[*GetPostResponse_Foo]{
Value: value,
Expr: `foo`,
CacheIndex: 13,
Setter: func(v *GetPostResponse_Foo) error {
ret.Foo = v
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
grpcfed.Logger(ctx).DebugContext(ctx, "resolved federation.GetPostResponse", slog.Any("federation.GetPostResponse", s.logvalue_Federation_GetPostResponse(ret)))
return ret, nil
}
// resolve_Federation_GetPostResponse_Foo resolve "federation.GetPostResponse.Foo" message.
func (s *PrivateService) resolve_Federation_GetPostResponse_Foo(ctx context.Context, req *PrivateService_Federation_GetPostResponse_FooArgument) (*GetPostResponse_Foo, error) {
ctx, span := s.tracer.Start(ctx, "federation.GetPostResponse.Foo")
defer span.End()
ctx = grpcfed.WithLogger(ctx, grpcfed.Logger(ctx), grpcfed.LogAttrs(ctx)...)
grpcfed.Logger(ctx).DebugContext(ctx, "resolve federation.GetPostResponse.Foo", slog.Any("message_args", s.logvalue_Federation_GetPostResponse_FooArgument(req)))
type localValueType struct {
*grpcfed.LocalValue
vars struct {
}
}
value := &localValueType{LocalValue: grpcfed.NewLocalValue(ctx, s.celEnvOpts, "grpc.federation.private.federation.GetPostResponse_FooArgument", req)}
value.AddEnv(s.env)
value.AddServiceVariable(s.svcVar)
ctx = grpcfed.WithLocalValue(ctx, value.LocalValue)
// create a message value to be returned.
ret := &GetPostResponse_Foo{}
// field binding section.
// (grpc.federation.field).by = "'x'"
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[string]{
Value: value,
Expr: `'x'`,
CacheIndex: 14,
Setter: func(v string) error {
ret.X = v
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
grpcfed.Logger(ctx).DebugContext(ctx, "resolved federation.GetPostResponse.Foo", slog.Any("federation.GetPostResponse.Foo", s.logvalue_Federation_GetPostResponse_Foo(ret)))
return ret, nil
}
// resolve_Federation_Post resolve "federation.Post" message.
func (s *PrivateService) resolve_Federation_Post(ctx context.Context, req *PrivateService_Federation_PostArgument) (*Post, error) {
ctx, span := s.tracer.Start(ctx, "federation.Post")
defer span.End()
ctx = grpcfed.WithLogger(ctx, grpcfed.Logger(ctx), grpcfed.LogAttrs(ctx)...)
grpcfed.Logger(ctx).DebugContext(ctx, "resolve federation.Post", slog.Any("message_args", s.logvalue_Federation_PostArgument(req)))
type localValueType struct {
*grpcfed.LocalValue
vars struct {
Cmp bool
FavoriteValue favorite.FavoriteType
Reaction *Reaction
U *User
}
}
value := &localValueType{LocalValue: grpcfed.NewLocalValue(ctx, s.celEnvOpts, "grpc.federation.private.federation.PostArgument", req)}
value.AddEnv(s.env)
value.AddServiceVariable(s.svcVar)
ctx = grpcfed.WithLocalValue(ctx, value.LocalValue)
/*
def {
name: "u"
message {
name: "User"
args: [
{ name: "id", by: "'foo'" },
{ name: "name", by: "'bar'" }
]
}
}
*/
def_u := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[*User, *localValueType]{
Name: `u`,
Type: grpcfed.CELObjectType("federation.User"),
Setter: func(value *localValueType, v *User) error {
value.vars.U = v
return nil
},
Message: func(ctx context.Context, value *localValueType) (any, error) {
args := &PrivateService_Federation_UserArgument{}
// { name: "id", by: "'foo'" }
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[string]{
Value: value,
Expr: `'foo'`,
CacheIndex: 15,
Setter: func(v string) error {
args.Id = v
return nil
},
}); err != nil {
return nil, err
}
// { name: "name", by: "'bar'" }
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[string]{
Value: value,
Expr: `'bar'`,
CacheIndex: 16,
Setter: func(v string) error {
args.Name = v
return nil
},
}); err != nil {
return nil, err
}
ret, err := s.resolve_Federation_User(ctx, args)
if err != nil {
return nil, err
}
return ret, nil
},
})
}
/*
def {
name: "favorite_value"
by: "favorite.FavoriteType.value('TYPE1')"
}
*/
def_favorite_value := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[favorite.FavoriteType, *localValueType]{
Name: `favorite_value`,
Type: grpcfed.CELIntType,
Setter: func(value *localValueType, v favorite.FavoriteType) error {
value.vars.FavoriteValue = v
return nil
},
By: `favorite.FavoriteType.value('TYPE1')`,
ByCacheIndex: 17,
})
}
/*
def {
name: "cmp"
by: "favorite_value == favorite.FavoriteType.TYPE1"
}
*/
def_cmp := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[bool, *localValueType]{
Name: `cmp`,
Type: grpcfed.CELBoolType,
Setter: func(value *localValueType, v bool) error {
value.vars.Cmp = v
return nil
},
By: `favorite_value == favorite.FavoriteType.TYPE1`,
ByCacheIndex: 18,
})
}
/*
def {
name: "reaction"
message {
name: "Reaction"
args { name: "v", by: "favorite_value" }
}
}
*/
def_reaction := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[*Reaction, *localValueType]{
Name: `reaction`,
Type: grpcfed.CELObjectType("federation.Reaction"),
Setter: func(value *localValueType, v *Reaction) error {
value.vars.Reaction = v
return nil
},
Message: func(ctx context.Context, value *localValueType) (any, error) {
args := &PrivateService_Federation_ReactionArgument{}
// { name: "v", by: "favorite_value" }
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[favorite.FavoriteType]{
Value: value,
Expr: `favorite_value`,
CacheIndex: 19,
Setter: func(v favorite.FavoriteType) error {
args.V = v
return nil
},
}); err != nil {
return nil, err
}
ret, err := s.resolve_Federation_Reaction(ctx, args)
if err != nil {
return nil, err
}
return ret, nil
},
})
}
// A tree view of message dependencies is shown below.
/*
favorite_value ─┐
cmp ─┐
favorite_value ─┐ │
reaction ─┤
u ─┤
*/
eg, ctx1 := grpcfed.ErrorGroupWithContext(ctx)
grpcfed.GoWithRecover(eg, func() (any, error) {
if err := def_favorite_value(ctx1); err != nil {
grpcfed.RecordErrorToSpan(ctx1, err)
return nil, err
}
if err := def_cmp(ctx1); err != nil {
grpcfed.RecordErrorToSpan(ctx1, err)
return nil, err
}
return nil, nil
})
grpcfed.GoWithRecover(eg, func() (any, error) {
if err := def_favorite_value(ctx1); err != nil {
grpcfed.RecordErrorToSpan(ctx1, err)
return nil, err
}
if err := def_reaction(ctx1); err != nil {
grpcfed.RecordErrorToSpan(ctx1, err)
return nil, err
}
return nil, nil
})
grpcfed.GoWithRecover(eg, func() (any, error) {
if err := def_u(ctx1); err != nil {
grpcfed.RecordErrorToSpan(ctx1, err)
return nil, err
}
return nil, nil
})
if err := eg.Wait(); err != nil {
return nil, err
}
// assign named parameters to message arguments to pass to the custom resolver.
req.PrivateService_Federation_PostVariable.Cmp = value.vars.Cmp
req.PrivateService_Federation_PostVariable.FavoriteValue = value.vars.FavoriteValue
req.PrivateService_Federation_PostVariable.Reaction = value.vars.Reaction
req.PrivateService_Federation_PostVariable.U = value.vars.U
// create a message value to be returned.
ret := &Post{}
// field binding section.
// (grpc.federation.field).by = "'post-id'"
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[string]{
Value: value,
Expr: `'post-id'`,
CacheIndex: 20,
Setter: func(v string) error {
ret.Id = v
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
// (grpc.federation.field).by = "'title'"
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[string]{
Value: value,
Expr: `'title'`,
CacheIndex: 21,
Setter: func(v string) error {
ret.Title = v
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
// (grpc.federation.field).by = "'content'"
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[string]{
Value: value,
Expr: `'content'`,
CacheIndex: 22,
Setter: func(v string) error {
ret.Content = v
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
// (grpc.federation.field).by = "u"
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[*User]{
Value: value,
Expr: `u`,
CacheIndex: 23,
Setter: func(v *User) error {
ret.User = v
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
// (grpc.federation.field).by = "reaction"
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[*Reaction]{
Value: value,
Expr: `reaction`,
CacheIndex: 24,
Setter: func(v *Reaction) error {
ret.Reaction = v
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
// (grpc.federation.field).by = "favorite_value"
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[favorite.FavoriteType]{
Value: value,
Expr: `favorite_value`,
CacheIndex: 25,
Setter: func(v favorite.FavoriteType) error {
favoriteValueValue, err := s.cast_Favorite_FavoriteType__to__Federation_MyFavoriteType(v)
if err != nil {
return err
}
ret.FavoriteValue = favoriteValueValue
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
// (grpc.federation.field).by = "cmp"
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[bool]{
Value: value,
Expr: `cmp`,
CacheIndex: 26,
Setter: func(v bool) error {
ret.Cmp = v
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
grpcfed.Logger(ctx).DebugContext(ctx, "resolved federation.Post", slog.Any("federation.Post", s.logvalue_Federation_Post(ret)))
return ret, nil
}
// resolve_Federation_Reaction resolve "federation.Reaction" message.
func (s *PrivateService) resolve_Federation_Reaction(ctx context.Context, req *PrivateService_Federation_ReactionArgument) (*Reaction, error) {
ctx, span := s.tracer.Start(ctx, "federation.Reaction")
defer span.End()
ctx = grpcfed.WithLogger(ctx, grpcfed.Logger(ctx), grpcfed.LogAttrs(ctx)...)
grpcfed.Logger(ctx).DebugContext(ctx, "resolve federation.Reaction", slog.Any("message_args", s.logvalue_Federation_ReactionArgument(req)))
type localValueType struct {
*grpcfed.LocalValue
vars struct {
Cmp bool
}
}
value := &localValueType{LocalValue: grpcfed.NewLocalValue(ctx, s.celEnvOpts, "grpc.federation.private.federation.ReactionArgument", req)}
value.AddEnv(s.env)
value.AddServiceVariable(s.svcVar)
ctx = grpcfed.WithLocalValue(ctx, value.LocalValue)
/*
def {
name: "cmp"
by: "$.v == favorite.FavoriteType.TYPE1"
}
*/
def_cmp := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[bool, *localValueType]{
Name: `cmp`,
Type: grpcfed.CELBoolType,
Setter: func(value *localValueType, v bool) error {
value.vars.Cmp = v
return nil
},
By: `$.v == favorite.FavoriteType.TYPE1`,
ByCacheIndex: 27,
})
}
if err := def_cmp(ctx); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
// assign named parameters to message arguments to pass to the custom resolver.
req.PrivateService_Federation_ReactionVariable.Cmp = value.vars.Cmp
// create a message value to be returned.
ret := &Reaction{}
// field binding section.
// (grpc.federation.field).by = "favorite.FavoriteType.value('TYPE1')"
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[favorite.FavoriteType]{
Value: value,
Expr: `favorite.FavoriteType.value('TYPE1')`,
CacheIndex: 28,
Setter: func(v favorite.FavoriteType) error {
ret.FavoriteType = v
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
// (grpc.federation.field).by = "favorite.FavoriteType.name(favorite.FavoriteType.value('TYPE1'))"
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[string]{
Value: value,
Expr: `favorite.FavoriteType.name(favorite.FavoriteType.value('TYPE1'))`,
CacheIndex: 29,
Setter: func(v string) error {
ret.FavoriteTypeStr = v
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
// (grpc.federation.field).by = "cmp"
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[bool]{
Value: value,
Expr: `cmp`,
CacheIndex: 30,
Setter: func(v bool) error {
ret.Cmp = v
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
grpcfed.Logger(ctx).DebugContext(ctx, "resolved federation.Reaction", slog.Any("federation.Reaction", s.logvalue_Federation_Reaction(ret)))
return ret, nil
}
// resolve_Federation_User resolve "federation.User" message.
func (s *PrivateService) resolve_Federation_User(ctx context.Context, req *PrivateService_Federation_UserArgument) (*User, error) {
ctx, span := s.tracer.Start(ctx, "federation.User")
defer span.End()
ctx = grpcfed.WithLogger(ctx, grpcfed.Logger(ctx), grpcfed.LogAttrs(ctx)...)
grpcfed.Logger(ctx).DebugContext(ctx, "resolve federation.User", slog.Any("message_args", s.logvalue_Federation_UserArgument(req)))
type localValueType struct {
*grpcfed.LocalValue
vars struct {
}
}
value := &localValueType{LocalValue: grpcfed.NewLocalValue(ctx, s.celEnvOpts, "grpc.federation.private.federation.UserArgument", req)}
value.AddEnv(s.env)
value.AddServiceVariable(s.svcVar)
ctx = grpcfed.WithLocalValue(ctx, value.LocalValue)
// create a message value to be returned.
ret := &User{}
// field binding section.
// (grpc.federation.field).by = "$.id"
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[string]{
Value: value,
Expr: `$.id`,
CacheIndex: 31,
Setter: func(v string) error {
ret.Id = v
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
// (grpc.federation.field).by = "$.name"
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[string]{
Value: value,
Expr: `$.name`,
CacheIndex: 32,
Setter: func(v string) error {
ret.Name = v
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
grpcfed.Logger(ctx).DebugContext(ctx, "resolved federation.User", slog.Any("federation.User", s.logvalue_Federation_User(ret)))
return ret, nil
}
// cast_Favorite_FavoriteType__to__Federation_MyFavoriteType cast from "favorite.FavoriteType" to "federation.MyFavoriteType".
func (s *PrivateService) cast_Favorite_FavoriteType__to__Federation_MyFavoriteType(from favorite.FavoriteType) (MyFavoriteType, error) {
var ret MyFavoriteType
switch from {
case favorite.FavoriteType_UNKNOWN:
ret = MyFavoriteType_UNKNOWN
case favorite.FavoriteType_TYPE1:
ret = MyFavoriteType_TYPE1
default:
ret = 0
}
return ret, nil
}
func (s *PrivateService) logvalue_Favorite_FavoriteType(v favorite.FavoriteType) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
switch v {
case favorite.FavoriteType_UNKNOWN:
return slog.StringValue("UNKNOWN")
case favorite.FavoriteType_TYPE1:
return slog.StringValue("TYPE1")
case favorite.FavoriteType_TYPE2:
return slog.StringValue("TYPE2")
}
return slog.StringValue("")
}
func (s *PrivateService) logvalue_Federation_GetNameResponse(v *GetNameResponse) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.String("name", v.GetName()),
slog.Any("foo", s.logvalue_Federation_GetNameResponse_Foo(v.GetFoo())),
)
}
func (s *PrivateService) logvalue_Federation_GetNameResponseArgument(v *PrivateService_Federation_GetNameResponseArgument) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue()
}
func (s *PrivateService) logvalue_Federation_GetNameResponse_Foo(v *GetNameResponse_Foo) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.String("y", v.GetY()),
)
}
func (s *PrivateService) logvalue_Federation_GetNameResponse_FooArgument(v *PrivateService_Federation_GetNameResponse_FooArgument) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue()
}
func (s *PrivateService) logvalue_Federation_GetPostResponse(v *GetPostResponse) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.Any("post", s.logvalue_Federation_Post(v.GetPost())),
slog.String("upper_name", v.GetUpperName()),
slog.Any("foo", s.logvalue_Federation_GetPostResponse_Foo(v.GetFoo())),
)
}
func (s *PrivateService) logvalue_Federation_GetPostResponseArgument(v *PrivateService_Federation_GetPostResponseArgument) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.String("id", v.Id),
)
}
func (s *PrivateService) logvalue_Federation_GetPostResponse_Foo(v *GetPostResponse_Foo) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.String("x", v.GetX()),
)
}
func (s *PrivateService) logvalue_Federation_GetPostResponse_FooArgument(v *PrivateService_Federation_GetPostResponse_FooArgument) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue()
}
func (s *PrivateService) logvalue_Federation_MyFavoriteType(v MyFavoriteType) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
switch v {
case MyFavoriteType_UNKNOWN:
return slog.StringValue("UNKNOWN")
case MyFavoriteType_TYPE1:
return slog.StringValue("TYPE1")
}
return slog.StringValue("")
}
func (s *PrivateService) logvalue_Federation_Post(v *Post) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.String("id", v.GetId()),
slog.String("title", v.GetTitle()),
slog.String("content", v.GetContent()),
slog.Any("user", s.logvalue_Federation_User(v.GetUser())),
slog.Any("reaction", s.logvalue_Federation_Reaction(v.GetReaction())),
slog.String("favorite_value", s.logvalue_Federation_MyFavoriteType(v.GetFavoriteValue()).String()),
slog.Bool("cmp", v.GetCmp()),
)
}
func (s *PrivateService) logvalue_Federation_PostArgument(v *PrivateService_Federation_PostArgument) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue()
}
func (s *PrivateService) logvalue_Federation_Reaction(v *Reaction) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.String("favorite_type", s.logvalue_Favorite_FavoriteType(v.GetFavoriteType()).String()),
slog.String("favorite_type_str", v.GetFavoriteTypeStr()),
slog.Bool("cmp", v.GetCmp()),
)
}
func (s *PrivateService) logvalue_Federation_ReactionArgument(v *PrivateService_Federation_ReactionArgument) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.String("v", s.logvalue_Favorite_FavoriteType(v.V).String()),
)
}
func (s *PrivateService) logvalue_Federation_User(v *User) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.String("id", v.GetId()),
slog.String("name", v.GetName()),
)
}
func (s *PrivateService) logvalue_Federation_UserArgument(v *PrivateService_Federation_UserArgument) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.String("id", v.Id),
slog.String("name", v.Name),
)
}
// Federation_GetStatusResponseVariable represents variable definitions in "federation.GetStatusResponse".
type DebugService_Federation_GetStatusResponseVariable struct {
U *User
}
// Federation_GetStatusResponseArgument is argument for "federation.GetStatusResponse" message.
type DebugService_Federation_GetStatusResponseArgument struct {
DebugService_Federation_GetStatusResponseVariable
}
// Federation_UserVariable represents variable definitions in "federation.User".
type DebugService_Federation_UserVariable struct {
}
// Federation_UserArgument is argument for "federation.User" message.
type DebugService_Federation_UserArgument struct {
Id string
Name string
DebugService_Federation_UserVariable
}
// DebugServiceConfig configuration required to initialize the service that use GRPC Federation.
type DebugServiceConfig struct {
// ErrorHandler Federation Service often needs to convert errors received from downstream services.
// If an error occurs during method execution in the Federation Service, this error handler is called and the returned error is treated as a final error.
ErrorHandler grpcfed.ErrorHandler
// Logger sets the logger used to output Debug/Info/Error information.
Logger *slog.Logger
}
// DebugServiceClientFactory provides a factory that creates the gRPC Client needed to invoke methods of the gRPC Service on which the Federation Service depends.
type DebugServiceClientFactory interface {
}
// DebugServiceClientConfig helper to create gRPC client.
// Hints for creating a gRPC Client.
type DebugServiceClientConfig struct {
// Service FQDN ( `.` ) of the service on Protocol Buffers.
Service string
}
// DebugServiceDependentClientSet has a gRPC client for all services on which the federation service depends.
// This is provided as an argument when implementing the custom resolver.
type DebugServiceDependentClientSet struct {
}
// DebugServiceResolver provides an interface to directly implement message resolver and field resolver not defined in Protocol Buffers.
type DebugServiceResolver interface {
}
// DebugServiceCELPluginWasmConfig type alias for grpcfedcel.WasmConfig.
type DebugServiceCELPluginWasmConfig = grpcfedcel.WasmConfig
// DebugServiceCELPluginConfig hints for loading a WebAssembly based plugin.
type DebugServiceCELPluginConfig struct {
CacheDir string
}
// DebugServiceUnimplementedResolver a structure implemented to satisfy the Resolver interface.
// An Unimplemented error is always returned.
// This is intended for use when there are many Resolver interfaces that do not need to be implemented,
// by embedding them in a resolver structure that you have created.
type DebugServiceUnimplementedResolver struct{}
// DebugService represents Federation Service.
type DebugService struct {
UnimplementedDebugServiceServer
cfg DebugServiceConfig
logger *slog.Logger
isLogLevelDebug bool
errorHandler grpcfed.ErrorHandler
celCacheMap *grpcfed.CELCacheMap
tracer trace.Tracer
celTypeHelper *grpcfed.CELTypeHelper
celEnvOpts []grpcfed.CELEnvOption
celPlugins []*grpcfedcel.CELPlugin
client *DebugServiceDependentClientSet
}
// NewDebugService creates DebugService instance by DebugServiceConfig.
func NewDebugService(cfg DebugServiceConfig) (*DebugService, error) {
logger := cfg.Logger
if logger == nil {
logger = slog.New(slog.NewJSONHandler(io.Discard, nil))
}
tracer := otel.Tracer("federation.DebugService")
ctx := grpcfed.WithLogger(context.Background(), logger)
ctx = grpcfed.WithTracer(ctx, tracer)
errorHandler := cfg.ErrorHandler
if errorHandler == nil {
errorHandler = func(ctx context.Context, methodName string, err error) error { return err }
}
celTypeHelperFieldMap := grpcfed.CELTypeHelperFieldMap{
"grpc.federation.private.federation.GetStatusResponseArgument": {},
"grpc.federation.private.federation.UserArgument": {
"id": grpcfed.NewCELFieldType(grpcfed.CELStringType, "Id"),
"name": grpcfed.NewCELFieldType(grpcfed.CELStringType, "Name"),
},
}
celTypeHelper := grpcfed.NewCELTypeHelper("federation", celTypeHelperFieldMap)
var celEnvOpts []grpcfed.CELEnvOption
celEnvOpts = append(celEnvOpts, grpcfed.NewDefaultEnvOptions(celTypeHelper)...)
celEnvOpts = append(celEnvOpts, grpcfed.EnumAccessorOptions("favorite.FavoriteType", favorite.FavoriteType_value, favorite.FavoriteType_name)...)
celEnvOpts = append(celEnvOpts, grpcfed.EnumAccessorOptions("federation.MyFavoriteType", MyFavoriteType_value, MyFavoriteType_name)...)
svc := &DebugService{
cfg: cfg,
logger: logger,
isLogLevelDebug: logger.Enabled(context.Background(), slog.LevelDebug),
errorHandler: errorHandler,
celEnvOpts: celEnvOpts,
celTypeHelper: celTypeHelper,
celCacheMap: grpcfed.NewCELCacheMap(),
tracer: tracer,
client: &DebugServiceDependentClientSet{},
}
return svc, nil
}
// CleanupDebugService cleanup all resources to prevent goroutine leaks.
func CleanupDebugService(ctx context.Context, svc *DebugService) {
svc.cleanup(ctx)
}
func (s *DebugService) cleanup(ctx context.Context) {
for _, plugin := range s.celPlugins {
plugin.Close()
}
}
// GetStatus implements "federation.DebugService/GetStatus" method.
func (s *DebugService) GetStatus(ctx context.Context, req *GetStatusRequest) (res *GetStatusResponse, e error) {
ctx, span := s.tracer.Start(ctx, "federation.DebugService/GetStatus")
defer span.End()
ctx = grpcfed.WithLogger(ctx, s.logger)
ctx = grpcfed.WithCELCacheMap(ctx, s.celCacheMap)
defer func() {
if r := recover(); r != nil {
e = grpcfed.RecoverError(r, grpcfed.StackTrace())
grpcfed.OutputErrorLog(ctx, e)
}
}()
defer func() {
for _, celPlugin := range s.celPlugins {
celPlugin.Cleanup()
}
}()
res, err := s.resolve_Federation_GetStatusResponse(ctx, &DebugService_Federation_GetStatusResponseArgument{})
if err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
grpcfed.OutputErrorLog(ctx, err)
return nil, err
}
return res, nil
}
// resolve_Federation_GetStatusResponse resolve "federation.GetStatusResponse" message.
func (s *DebugService) resolve_Federation_GetStatusResponse(ctx context.Context, req *DebugService_Federation_GetStatusResponseArgument) (*GetStatusResponse, error) {
ctx, span := s.tracer.Start(ctx, "federation.GetStatusResponse")
defer span.End()
ctx = grpcfed.WithLogger(ctx, grpcfed.Logger(ctx), grpcfed.LogAttrs(ctx)...)
grpcfed.Logger(ctx).DebugContext(ctx, "resolve federation.GetStatusResponse", slog.Any("message_args", s.logvalue_Federation_GetStatusResponseArgument(req)))
type localValueType struct {
*grpcfed.LocalValue
vars struct {
U *User
}
}
value := &localValueType{LocalValue: grpcfed.NewLocalValue(ctx, s.celEnvOpts, "grpc.federation.private.federation.GetStatusResponseArgument", req)}
ctx = grpcfed.WithLocalValue(ctx, value.LocalValue)
/*
def {
name: "u"
message {
name: "User"
args: [
{ name: "id", by: "'xxxx'" },
{ name: "name", by: "'yyyy'" }
]
}
}
*/
def_u := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[*User, *localValueType]{
Name: `u`,
Type: grpcfed.CELObjectType("federation.User"),
Setter: func(value *localValueType, v *User) error {
value.vars.U = v
return nil
},
Message: func(ctx context.Context, value *localValueType) (any, error) {
args := &DebugService_Federation_UserArgument{}
// { name: "id", by: "'xxxx'" }
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[string]{
Value: value,
Expr: `'xxxx'`,
CacheIndex: 1,
Setter: func(v string) error {
args.Id = v
return nil
},
}); err != nil {
return nil, err
}
// { name: "name", by: "'yyyy'" }
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[string]{
Value: value,
Expr: `'yyyy'`,
CacheIndex: 2,
Setter: func(v string) error {
args.Name = v
return nil
},
}); err != nil {
return nil, err
}
ret, err := s.resolve_Federation_User(ctx, args)
if err != nil {
return nil, err
}
return ret, nil
},
})
}
if err := def_u(ctx); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
// assign named parameters to message arguments to pass to the custom resolver.
req.DebugService_Federation_GetStatusResponseVariable.U = value.vars.U
// create a message value to be returned.
ret := &GetStatusResponse{}
// field binding section.
// (grpc.federation.field).by = "u"
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[*User]{
Value: value,
Expr: `u`,
CacheIndex: 3,
Setter: func(v *User) error {
ret.User = v
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
grpcfed.Logger(ctx).DebugContext(ctx, "resolved federation.GetStatusResponse", slog.Any("federation.GetStatusResponse", s.logvalue_Federation_GetStatusResponse(ret)))
return ret, nil
}
// resolve_Federation_User resolve "federation.User" message.
func (s *DebugService) resolve_Federation_User(ctx context.Context, req *DebugService_Federation_UserArgument) (*User, error) {
ctx, span := s.tracer.Start(ctx, "federation.User")
defer span.End()
ctx = grpcfed.WithLogger(ctx, grpcfed.Logger(ctx), grpcfed.LogAttrs(ctx)...)
grpcfed.Logger(ctx).DebugContext(ctx, "resolve federation.User", slog.Any("message_args", s.logvalue_Federation_UserArgument(req)))
type localValueType struct {
*grpcfed.LocalValue
vars struct {
}
}
value := &localValueType{LocalValue: grpcfed.NewLocalValue(ctx, s.celEnvOpts, "grpc.federation.private.federation.UserArgument", req)}
ctx = grpcfed.WithLocalValue(ctx, value.LocalValue)
// create a message value to be returned.
ret := &User{}
// field binding section.
// (grpc.federation.field).by = "$.id"
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[string]{
Value: value,
Expr: `$.id`,
CacheIndex: 4,
Setter: func(v string) error {
ret.Id = v
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
// (grpc.federation.field).by = "$.name"
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[string]{
Value: value,
Expr: `$.name`,
CacheIndex: 5,
Setter: func(v string) error {
ret.Name = v
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
grpcfed.Logger(ctx).DebugContext(ctx, "resolved federation.User", slog.Any("federation.User", s.logvalue_Federation_User(ret)))
return ret, nil
}
func (s *DebugService) logvalue_Federation_GetStatusResponse(v *GetStatusResponse) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.Any("user", s.logvalue_Federation_User(v.GetUser())),
)
}
func (s *DebugService) logvalue_Federation_GetStatusResponseArgument(v *DebugService_Federation_GetStatusResponseArgument) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue()
}
func (s *DebugService) logvalue_Federation_User(v *User) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.String("id", v.GetId()),
slog.String("name", v.GetName()),
)
}
func (s *DebugService) logvalue_Federation_UserArgument(v *DebugService_Federation_UserArgument) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.String("id", v.Id),
slog.String("name", v.Name),
)
}
================================================
FILE: _examples/11_multi_service/federation/other.pb.go
================================================
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.33.0
// protoc (unknown)
// source: federation/other.proto
package federation
import (
_ "github.com/mercari/grpc-federation/grpc/federation"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
type GetRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
}
func (x *GetRequest) Reset() {
*x = GetRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_federation_other_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GetRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetRequest) ProtoMessage() {}
func (x *GetRequest) ProtoReflect() protoreflect.Message {
mi := &file_federation_other_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GetRequest.ProtoReflect.Descriptor instead.
func (*GetRequest) Descriptor() ([]byte, []int) {
return file_federation_other_proto_rawDescGZIP(), []int{0}
}
func (x *GetRequest) GetId() string {
if x != nil {
return x.Id
}
return ""
}
type GetResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Post *Post `protobuf:"bytes,1,opt,name=post,proto3" json:"post,omitempty"`
}
func (x *GetResponse) Reset() {
*x = GetResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_federation_other_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GetResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetResponse) ProtoMessage() {}
func (x *GetResponse) ProtoReflect() protoreflect.Message {
mi := &file_federation_other_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GetResponse.ProtoReflect.Descriptor instead.
func (*GetResponse) Descriptor() ([]byte, []int) {
return file_federation_other_proto_rawDescGZIP(), []int{1}
}
func (x *GetResponse) GetPost() *Post {
if x != nil {
return x.Post
}
return nil
}
var File_federation_other_proto protoreflect.FileDescriptor
var file_federation_other_proto_rawDesc = []byte{
0x0a, 0x16, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x6f, 0x74, 0x68,
0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0a, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61,
0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x20, 0x67, 0x72, 0x70, 0x63, 0x2f, 0x66, 0x65, 0x64, 0x65, 0x72,
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e,
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69,
0x6f, 0x6e, 0x2f, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x22, 0x1c, 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69,
0x64, 0x22, 0x4c, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
0x12, 0x2b, 0x0a, 0x04, 0x70, 0x6f, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10,
0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x50, 0x6f, 0x73, 0x74,
0x42, 0x05, 0x9a, 0x4a, 0x02, 0x08, 0x01, 0x52, 0x04, 0x70, 0x6f, 0x73, 0x74, 0x3a, 0x10, 0x9a,
0x4a, 0x0d, 0x0a, 0x0b, 0x0a, 0x01, 0x70, 0x6a, 0x06, 0x0a, 0x04, 0x50, 0x6f, 0x73, 0x74, 0x32,
0x4d, 0x0a, 0x0c, 0x4f, 0x74, 0x68, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12,
0x38, 0x0a, 0x03, 0x47, 0x65, 0x74, 0x12, 0x16, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74,
0x69, 0x6f, 0x6e, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17,
0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x47, 0x65, 0x74, 0x52,
0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x1a, 0x03, 0x9a, 0x4a, 0x00, 0x42, 0x83,
0x01, 0x0a, 0x0e, 0x63, 0x6f, 0x6d, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f,
0x6e, 0x42, 0x0a, 0x4f, 0x74, 0x68, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a,
0x1d, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2f, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74,
0x69, 0x6f, 0x6e, 0x3b, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0xa2, 0x02,
0x03, 0x46, 0x58, 0x58, 0xaa, 0x02, 0x0a, 0x46, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f,
0x6e, 0xca, 0x02, 0x0a, 0x46, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0xe2, 0x02,
0x16, 0x46, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5c, 0x47, 0x50, 0x42, 0x4d,
0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0a, 0x46, 0x65, 0x64, 0x65, 0x72, 0x61,
0x74, 0x69, 0x6f, 0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_federation_other_proto_rawDescOnce sync.Once
file_federation_other_proto_rawDescData = file_federation_other_proto_rawDesc
)
func file_federation_other_proto_rawDescGZIP() []byte {
file_federation_other_proto_rawDescOnce.Do(func() {
file_federation_other_proto_rawDescData = protoimpl.X.CompressGZIP(file_federation_other_proto_rawDescData)
})
return file_federation_other_proto_rawDescData
}
var file_federation_other_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
var file_federation_other_proto_goTypes = []interface{}{
(*GetRequest)(nil), // 0: federation.GetRequest
(*GetResponse)(nil), // 1: federation.GetResponse
(*Post)(nil), // 2: federation.Post
}
var file_federation_other_proto_depIdxs = []int32{
2, // 0: federation.GetResponse.post:type_name -> federation.Post
0, // 1: federation.OtherService.Get:input_type -> federation.GetRequest
1, // 2: federation.OtherService.Get:output_type -> federation.GetResponse
2, // [2:3] is the sub-list for method output_type
1, // [1:2] is the sub-list for method input_type
1, // [1:1] is the sub-list for extension type_name
1, // [1:1] is the sub-list for extension extendee
0, // [0:1] is the sub-list for field type_name
}
func init() { file_federation_other_proto_init() }
func file_federation_other_proto_init() {
if File_federation_other_proto != nil {
return
}
file_federation_federation_proto_init()
if !protoimpl.UnsafeEnabled {
file_federation_other_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_federation_other_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_federation_other_proto_rawDesc,
NumEnums: 0,
NumMessages: 2,
NumExtensions: 0,
NumServices: 1,
},
GoTypes: file_federation_other_proto_goTypes,
DependencyIndexes: file_federation_other_proto_depIdxs,
MessageInfos: file_federation_other_proto_msgTypes,
}.Build()
File_federation_other_proto = out.File
file_federation_other_proto_rawDesc = nil
file_federation_other_proto_goTypes = nil
file_federation_other_proto_depIdxs = nil
}
================================================
FILE: _examples/11_multi_service/federation/other_grpc.pb.go
================================================
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.3.0
// - protoc (unknown)
// source: federation/other.proto
package federation
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 (
OtherService_Get_FullMethodName = "/federation.OtherService/Get"
)
// OtherServiceClient is the client API for OtherService 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 OtherServiceClient interface {
Get(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*GetResponse, error)
}
type otherServiceClient struct {
cc grpc.ClientConnInterface
}
func NewOtherServiceClient(cc grpc.ClientConnInterface) OtherServiceClient {
return &otherServiceClient{cc}
}
func (c *otherServiceClient) Get(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*GetResponse, error) {
out := new(GetResponse)
err := c.cc.Invoke(ctx, OtherService_Get_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// OtherServiceServer is the server API for OtherService service.
// All implementations must embed UnimplementedOtherServiceServer
// for forward compatibility
type OtherServiceServer interface {
Get(context.Context, *GetRequest) (*GetResponse, error)
mustEmbedUnimplementedOtherServiceServer()
}
// UnimplementedOtherServiceServer must be embedded to have forward compatible implementations.
type UnimplementedOtherServiceServer struct {
}
func (UnimplementedOtherServiceServer) Get(context.Context, *GetRequest) (*GetResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method Get not implemented")
}
func (UnimplementedOtherServiceServer) mustEmbedUnimplementedOtherServiceServer() {}
// UnsafeOtherServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to OtherServiceServer will
// result in compilation errors.
type UnsafeOtherServiceServer interface {
mustEmbedUnimplementedOtherServiceServer()
}
func RegisterOtherServiceServer(s grpc.ServiceRegistrar, srv OtherServiceServer) {
s.RegisterService(&OtherService_ServiceDesc, srv)
}
func _OtherService_Get_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(OtherServiceServer).Get(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: OtherService_Get_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(OtherServiceServer).Get(ctx, req.(*GetRequest))
}
return interceptor(ctx, in, info, handler)
}
// OtherService_ServiceDesc is the grpc.ServiceDesc for OtherService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var OtherService_ServiceDesc = grpc.ServiceDesc{
ServiceName: "federation.OtherService",
HandlerType: (*OtherServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "Get",
Handler: _OtherService_Get_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "federation/other.proto",
}
================================================
FILE: _examples/11_multi_service/federation/other_grpc_federation.pb.go
================================================
// Code generated by protoc-gen-grpc-federation. DO NOT EDIT!
// versions:
//
// protoc-gen-grpc-federation: (devel)
//
// source: federation/other.proto
package federation
import (
"context"
"io"
"log/slog"
"reflect"
grpcfed "github.com/mercari/grpc-federation/grpc/federation"
grpcfedcel "github.com/mercari/grpc-federation/grpc/federation/cel"
"go.opentelemetry.io/otel"
"go.opentelemetry.io/otel/trace"
favorite "example/favorite"
)
var (
_ = reflect.Invalid // to avoid "imported and not used error"
)
// Federation_GetResponseVariable represents variable definitions in "federation.GetResponse".
type OtherService_Federation_GetResponseVariable struct {
P *Post
}
// Federation_GetResponseArgument is argument for "federation.GetResponse" message.
type OtherService_Federation_GetResponseArgument struct {
Id string
OtherService_Federation_GetResponseVariable
}
// Federation_GetResponse_PostArgument is custom resolver's argument for "post" field of "federation.GetResponse" message.
type OtherService_Federation_GetResponse_PostArgument struct {
*OtherService_Federation_GetResponseArgument
}
// Federation_PostVariable represents variable definitions in "federation.Post".
type OtherService_Federation_PostVariable struct {
Cmp bool
FavoriteValue favorite.FavoriteType
Reaction *Reaction
U *User
}
// Federation_PostArgument is argument for "federation.Post" message.
type OtherService_Federation_PostArgument struct {
OtherService_Federation_PostVariable
}
// Federation_ReactionVariable represents variable definitions in "federation.Reaction".
type OtherService_Federation_ReactionVariable struct {
Cmp bool
}
// Federation_ReactionArgument is argument for "federation.Reaction" message.
type OtherService_Federation_ReactionArgument struct {
V favorite.FavoriteType
OtherService_Federation_ReactionVariable
}
// Federation_UserVariable represents variable definitions in "federation.User".
type OtherService_Federation_UserVariable struct {
}
// Federation_UserArgument is argument for "federation.User" message.
type OtherService_Federation_UserArgument struct {
Id string
Name string
OtherService_Federation_UserVariable
}
// OtherServiceConfig configuration required to initialize the service that use GRPC Federation.
type OtherServiceConfig struct {
// Resolver provides an interface to directly implement message resolver and field resolver not defined in Protocol Buffers.
// If this interface is not provided, an error is returned during initialization.
Resolver OtherServiceResolver // required
// ErrorHandler Federation Service often needs to convert errors received from downstream services.
// If an error occurs during method execution in the Federation Service, this error handler is called and the returned error is treated as a final error.
ErrorHandler grpcfed.ErrorHandler
// Logger sets the logger used to output Debug/Info/Error information.
Logger *slog.Logger
}
// OtherServiceClientFactory provides a factory that creates the gRPC Client needed to invoke methods of the gRPC Service on which the Federation Service depends.
type OtherServiceClientFactory interface {
}
// OtherServiceClientConfig helper to create gRPC client.
// Hints for creating a gRPC Client.
type OtherServiceClientConfig struct {
// Service FQDN ( `.` ) of the service on Protocol Buffers.
Service string
}
// OtherServiceDependentClientSet has a gRPC client for all services on which the federation service depends.
// This is provided as an argument when implementing the custom resolver.
type OtherServiceDependentClientSet struct {
}
// OtherServiceResolver provides an interface to directly implement message resolver and field resolver not defined in Protocol Buffers.
type OtherServiceResolver interface {
// Resolve_Federation_GetResponse_Post implements resolver for "federation.GetResponse.post".
Resolve_Federation_GetResponse_Post(context.Context, *OtherService_Federation_GetResponse_PostArgument) (*Post, error)
}
// OtherServiceCELPluginWasmConfig type alias for grpcfedcel.WasmConfig.
type OtherServiceCELPluginWasmConfig = grpcfedcel.WasmConfig
// OtherServiceCELPluginConfig hints for loading a WebAssembly based plugin.
type OtherServiceCELPluginConfig struct {
CacheDir string
}
// OtherServiceUnimplementedResolver a structure implemented to satisfy the Resolver interface.
// An Unimplemented error is always returned.
// This is intended for use when there are many Resolver interfaces that do not need to be implemented,
// by embedding them in a resolver structure that you have created.
type OtherServiceUnimplementedResolver struct{}
// Resolve_Federation_GetResponse_Post resolve "federation.GetResponse.post".
// This method always returns Unimplemented error.
func (OtherServiceUnimplementedResolver) Resolve_Federation_GetResponse_Post(context.Context, *OtherService_Federation_GetResponse_PostArgument) (ret *Post, e error) {
e = grpcfed.GRPCErrorf(grpcfed.UnimplementedCode, "method Resolve_Federation_GetResponse_Post not implemented")
return
}
// OtherService represents Federation Service.
type OtherService struct {
UnimplementedOtherServiceServer
cfg OtherServiceConfig
logger *slog.Logger
isLogLevelDebug bool
errorHandler grpcfed.ErrorHandler
celCacheMap *grpcfed.CELCacheMap
tracer trace.Tracer
resolver OtherServiceResolver
celTypeHelper *grpcfed.CELTypeHelper
celEnvOpts []grpcfed.CELEnvOption
celPlugins []*grpcfedcel.CELPlugin
client *OtherServiceDependentClientSet
}
// NewOtherService creates OtherService instance by OtherServiceConfig.
func NewOtherService(cfg OtherServiceConfig) (*OtherService, error) {
if cfg.Resolver == nil {
return nil, grpcfed.ErrResolverConfig
}
logger := cfg.Logger
if logger == nil {
logger = slog.New(slog.NewJSONHandler(io.Discard, nil))
}
tracer := otel.Tracer("federation.OtherService")
ctx := grpcfed.WithLogger(context.Background(), logger)
ctx = grpcfed.WithTracer(ctx, tracer)
errorHandler := cfg.ErrorHandler
if errorHandler == nil {
errorHandler = func(ctx context.Context, methodName string, err error) error { return err }
}
celTypeHelperFieldMap := grpcfed.CELTypeHelperFieldMap{
"grpc.federation.private.federation.GetResponseArgument": {
"id": grpcfed.NewCELFieldType(grpcfed.CELStringType, "Id"),
},
"grpc.federation.private.federation.PostArgument": {},
"grpc.federation.private.federation.ReactionArgument": {
"v": grpcfed.NewCELFieldType(grpcfed.CELIntType, "V"),
},
"grpc.federation.private.federation.UserArgument": {
"id": grpcfed.NewCELFieldType(grpcfed.CELStringType, "Id"),
"name": grpcfed.NewCELFieldType(grpcfed.CELStringType, "Name"),
},
}
celTypeHelper := grpcfed.NewCELTypeHelper("federation", celTypeHelperFieldMap)
var celEnvOpts []grpcfed.CELEnvOption
celEnvOpts = append(celEnvOpts, grpcfed.NewDefaultEnvOptions(celTypeHelper)...)
celEnvOpts = append(celEnvOpts, grpcfed.EnumAccessorOptions("favorite.FavoriteType", favorite.FavoriteType_value, favorite.FavoriteType_name)...)
celEnvOpts = append(celEnvOpts, grpcfed.EnumAccessorOptions("federation.MyFavoriteType", MyFavoriteType_value, MyFavoriteType_name)...)
svc := &OtherService{
cfg: cfg,
logger: logger,
isLogLevelDebug: logger.Enabled(context.Background(), slog.LevelDebug),
errorHandler: errorHandler,
celEnvOpts: celEnvOpts,
celTypeHelper: celTypeHelper,
celCacheMap: grpcfed.NewCELCacheMap(),
tracer: tracer,
resolver: cfg.Resolver,
client: &OtherServiceDependentClientSet{},
}
if resolver, ok := cfg.Resolver.(grpcfed.CustomResolverInitializer); ok {
ctx := context.Background()
if err := resolver.Init(ctx); err != nil {
return nil, err
}
}
return svc, nil
}
// CleanupOtherService cleanup all resources to prevent goroutine leaks.
func CleanupOtherService(ctx context.Context, svc *OtherService) {
svc.cleanup(ctx)
}
func (s *OtherService) cleanup(ctx context.Context) {
for _, plugin := range s.celPlugins {
plugin.Close()
}
}
// Get implements "federation.OtherService/Get" method.
func (s *OtherService) Get(ctx context.Context, req *GetRequest) (res *GetResponse, e error) {
ctx, span := s.tracer.Start(ctx, "federation.OtherService/Get")
defer span.End()
ctx = grpcfed.WithLogger(ctx, s.logger)
ctx = grpcfed.WithCELCacheMap(ctx, s.celCacheMap)
defer func() {
if r := recover(); r != nil {
e = grpcfed.RecoverError(r, grpcfed.StackTrace())
grpcfed.OutputErrorLog(ctx, e)
}
}()
defer func() {
for _, celPlugin := range s.celPlugins {
celPlugin.Cleanup()
}
}()
res, err := s.resolve_Federation_GetResponse(ctx, &OtherService_Federation_GetResponseArgument{
Id: req.GetId(),
})
if err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
grpcfed.OutputErrorLog(ctx, err)
return nil, err
}
return res, nil
}
// resolve_Federation_GetResponse resolve "federation.GetResponse" message.
func (s *OtherService) resolve_Federation_GetResponse(ctx context.Context, req *OtherService_Federation_GetResponseArgument) (*GetResponse, error) {
ctx, span := s.tracer.Start(ctx, "federation.GetResponse")
defer span.End()
ctx = grpcfed.WithLogger(ctx, grpcfed.Logger(ctx), grpcfed.LogAttrs(ctx)...)
grpcfed.Logger(ctx).DebugContext(ctx, "resolve federation.GetResponse", slog.Any("message_args", s.logvalue_Federation_GetResponseArgument(req)))
type localValueType struct {
*grpcfed.LocalValue
vars struct {
P *Post
}
}
value := &localValueType{LocalValue: grpcfed.NewLocalValue(ctx, s.celEnvOpts, "grpc.federation.private.federation.GetResponseArgument", req)}
ctx = grpcfed.WithLocalValue(ctx, value.LocalValue)
/*
def {
name: "p"
message {
name: "Post"
}
}
*/
def_p := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[*Post, *localValueType]{
Name: `p`,
Type: grpcfed.CELObjectType("federation.Post"),
Setter: func(value *localValueType, v *Post) error {
value.vars.P = v
return nil
},
Message: func(ctx context.Context, value *localValueType) (any, error) {
args := &OtherService_Federation_PostArgument{}
ret, err := s.resolve_Federation_Post(ctx, args)
if err != nil {
return nil, err
}
return ret, nil
},
})
}
if err := def_p(ctx); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
// assign named parameters to message arguments to pass to the custom resolver.
req.OtherService_Federation_GetResponseVariable.P = value.vars.P
// create a message value to be returned.
ret := &GetResponse{}
// field binding section.
{
// (grpc.federation.field).custom_resolver = true
ctx = grpcfed.WithLogger(ctx, grpcfed.Logger(ctx)) // create a new reference to logger.
var err error
ret.Post, err = s.resolver.Resolve_Federation_GetResponse_Post(ctx, &OtherService_Federation_GetResponse_PostArgument{
OtherService_Federation_GetResponseArgument: req,
})
if err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
}
grpcfed.Logger(ctx).DebugContext(ctx, "resolved federation.GetResponse", slog.Any("federation.GetResponse", s.logvalue_Federation_GetResponse(ret)))
return ret, nil
}
// resolve_Federation_Post resolve "federation.Post" message.
func (s *OtherService) resolve_Federation_Post(ctx context.Context, req *OtherService_Federation_PostArgument) (*Post, error) {
ctx, span := s.tracer.Start(ctx, "federation.Post")
defer span.End()
ctx = grpcfed.WithLogger(ctx, grpcfed.Logger(ctx), grpcfed.LogAttrs(ctx)...)
grpcfed.Logger(ctx).DebugContext(ctx, "resolve federation.Post", slog.Any("message_args", s.logvalue_Federation_PostArgument(req)))
type localValueType struct {
*grpcfed.LocalValue
vars struct {
Cmp bool
FavoriteValue favorite.FavoriteType
Reaction *Reaction
U *User
}
}
value := &localValueType{LocalValue: grpcfed.NewLocalValue(ctx, s.celEnvOpts, "grpc.federation.private.federation.PostArgument", req)}
ctx = grpcfed.WithLocalValue(ctx, value.LocalValue)
/*
def {
name: "u"
message {
name: "User"
args: [
{ name: "id", by: "'foo'" },
{ name: "name", by: "'bar'" }
]
}
}
*/
def_u := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[*User, *localValueType]{
Name: `u`,
Type: grpcfed.CELObjectType("federation.User"),
Setter: func(value *localValueType, v *User) error {
value.vars.U = v
return nil
},
Message: func(ctx context.Context, value *localValueType) (any, error) {
args := &OtherService_Federation_UserArgument{}
// { name: "id", by: "'foo'" }
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[string]{
Value: value,
Expr: `'foo'`,
CacheIndex: 1,
Setter: func(v string) error {
args.Id = v
return nil
},
}); err != nil {
return nil, err
}
// { name: "name", by: "'bar'" }
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[string]{
Value: value,
Expr: `'bar'`,
CacheIndex: 2,
Setter: func(v string) error {
args.Name = v
return nil
},
}); err != nil {
return nil, err
}
ret, err := s.resolve_Federation_User(ctx, args)
if err != nil {
return nil, err
}
return ret, nil
},
})
}
/*
def {
name: "favorite_value"
by: "favorite.FavoriteType.value('TYPE1')"
}
*/
def_favorite_value := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[favorite.FavoriteType, *localValueType]{
Name: `favorite_value`,
Type: grpcfed.CELIntType,
Setter: func(value *localValueType, v favorite.FavoriteType) error {
value.vars.FavoriteValue = v
return nil
},
By: `favorite.FavoriteType.value('TYPE1')`,
ByCacheIndex: 3,
})
}
/*
def {
name: "cmp"
by: "favorite_value == favorite.FavoriteType.TYPE1"
}
*/
def_cmp := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[bool, *localValueType]{
Name: `cmp`,
Type: grpcfed.CELBoolType,
Setter: func(value *localValueType, v bool) error {
value.vars.Cmp = v
return nil
},
By: `favorite_value == favorite.FavoriteType.TYPE1`,
ByCacheIndex: 4,
})
}
/*
def {
name: "reaction"
message {
name: "Reaction"
args { name: "v", by: "favorite_value" }
}
}
*/
def_reaction := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[*Reaction, *localValueType]{
Name: `reaction`,
Type: grpcfed.CELObjectType("federation.Reaction"),
Setter: func(value *localValueType, v *Reaction) error {
value.vars.Reaction = v
return nil
},
Message: func(ctx context.Context, value *localValueType) (any, error) {
args := &OtherService_Federation_ReactionArgument{}
// { name: "v", by: "favorite_value" }
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[favorite.FavoriteType]{
Value: value,
Expr: `favorite_value`,
CacheIndex: 5,
Setter: func(v favorite.FavoriteType) error {
args.V = v
return nil
},
}); err != nil {
return nil, err
}
ret, err := s.resolve_Federation_Reaction(ctx, args)
if err != nil {
return nil, err
}
return ret, nil
},
})
}
// A tree view of message dependencies is shown below.
/*
favorite_value ─┐
cmp ─┐
favorite_value ─┐ │
reaction ─┤
u ─┤
*/
eg, ctx1 := grpcfed.ErrorGroupWithContext(ctx)
grpcfed.GoWithRecover(eg, func() (any, error) {
if err := def_favorite_value(ctx1); err != nil {
grpcfed.RecordErrorToSpan(ctx1, err)
return nil, err
}
if err := def_cmp(ctx1); err != nil {
grpcfed.RecordErrorToSpan(ctx1, err)
return nil, err
}
return nil, nil
})
grpcfed.GoWithRecover(eg, func() (any, error) {
if err := def_favorite_value(ctx1); err != nil {
grpcfed.RecordErrorToSpan(ctx1, err)
return nil, err
}
if err := def_reaction(ctx1); err != nil {
grpcfed.RecordErrorToSpan(ctx1, err)
return nil, err
}
return nil, nil
})
grpcfed.GoWithRecover(eg, func() (any, error) {
if err := def_u(ctx1); err != nil {
grpcfed.RecordErrorToSpan(ctx1, err)
return nil, err
}
return nil, nil
})
if err := eg.Wait(); err != nil {
return nil, err
}
// assign named parameters to message arguments to pass to the custom resolver.
req.OtherService_Federation_PostVariable.Cmp = value.vars.Cmp
req.OtherService_Federation_PostVariable.FavoriteValue = value.vars.FavoriteValue
req.OtherService_Federation_PostVariable.Reaction = value.vars.Reaction
req.OtherService_Federation_PostVariable.U = value.vars.U
// create a message value to be returned.
ret := &Post{}
// field binding section.
// (grpc.federation.field).by = "'post-id'"
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[string]{
Value: value,
Expr: `'post-id'`,
CacheIndex: 6,
Setter: func(v string) error {
ret.Id = v
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
// (grpc.federation.field).by = "'title'"
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[string]{
Value: value,
Expr: `'title'`,
CacheIndex: 7,
Setter: func(v string) error {
ret.Title = v
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
// (grpc.federation.field).by = "'content'"
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[string]{
Value: value,
Expr: `'content'`,
CacheIndex: 8,
Setter: func(v string) error {
ret.Content = v
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
// (grpc.federation.field).by = "u"
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[*User]{
Value: value,
Expr: `u`,
CacheIndex: 9,
Setter: func(v *User) error {
ret.User = v
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
// (grpc.federation.field).by = "reaction"
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[*Reaction]{
Value: value,
Expr: `reaction`,
CacheIndex: 10,
Setter: func(v *Reaction) error {
ret.Reaction = v
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
// (grpc.federation.field).by = "favorite_value"
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[favorite.FavoriteType]{
Value: value,
Expr: `favorite_value`,
CacheIndex: 11,
Setter: func(v favorite.FavoriteType) error {
favoriteValueValue, err := s.cast_Favorite_FavoriteType__to__Federation_MyFavoriteType(v)
if err != nil {
return err
}
ret.FavoriteValue = favoriteValueValue
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
// (grpc.federation.field).by = "cmp"
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[bool]{
Value: value,
Expr: `cmp`,
CacheIndex: 12,
Setter: func(v bool) error {
ret.Cmp = v
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
grpcfed.Logger(ctx).DebugContext(ctx, "resolved federation.Post", slog.Any("federation.Post", s.logvalue_Federation_Post(ret)))
return ret, nil
}
// resolve_Federation_Reaction resolve "federation.Reaction" message.
func (s *OtherService) resolve_Federation_Reaction(ctx context.Context, req *OtherService_Federation_ReactionArgument) (*Reaction, error) {
ctx, span := s.tracer.Start(ctx, "federation.Reaction")
defer span.End()
ctx = grpcfed.WithLogger(ctx, grpcfed.Logger(ctx), grpcfed.LogAttrs(ctx)...)
grpcfed.Logger(ctx).DebugContext(ctx, "resolve federation.Reaction", slog.Any("message_args", s.logvalue_Federation_ReactionArgument(req)))
type localValueType struct {
*grpcfed.LocalValue
vars struct {
Cmp bool
}
}
value := &localValueType{LocalValue: grpcfed.NewLocalValue(ctx, s.celEnvOpts, "grpc.federation.private.federation.ReactionArgument", req)}
ctx = grpcfed.WithLocalValue(ctx, value.LocalValue)
/*
def {
name: "cmp"
by: "$.v == favorite.FavoriteType.TYPE1"
}
*/
def_cmp := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[bool, *localValueType]{
Name: `cmp`,
Type: grpcfed.CELBoolType,
Setter: func(value *localValueType, v bool) error {
value.vars.Cmp = v
return nil
},
By: `$.v == favorite.FavoriteType.TYPE1`,
ByCacheIndex: 13,
})
}
if err := def_cmp(ctx); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
// assign named parameters to message arguments to pass to the custom resolver.
req.OtherService_Federation_ReactionVariable.Cmp = value.vars.Cmp
// create a message value to be returned.
ret := &Reaction{}
// field binding section.
// (grpc.federation.field).by = "favorite.FavoriteType.value('TYPE1')"
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[favorite.FavoriteType]{
Value: value,
Expr: `favorite.FavoriteType.value('TYPE1')`,
CacheIndex: 14,
Setter: func(v favorite.FavoriteType) error {
ret.FavoriteType = v
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
// (grpc.federation.field).by = "favorite.FavoriteType.name(favorite.FavoriteType.value('TYPE1'))"
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[string]{
Value: value,
Expr: `favorite.FavoriteType.name(favorite.FavoriteType.value('TYPE1'))`,
CacheIndex: 15,
Setter: func(v string) error {
ret.FavoriteTypeStr = v
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
// (grpc.federation.field).by = "cmp"
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[bool]{
Value: value,
Expr: `cmp`,
CacheIndex: 16,
Setter: func(v bool) error {
ret.Cmp = v
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
grpcfed.Logger(ctx).DebugContext(ctx, "resolved federation.Reaction", slog.Any("federation.Reaction", s.logvalue_Federation_Reaction(ret)))
return ret, nil
}
// resolve_Federation_User resolve "federation.User" message.
func (s *OtherService) resolve_Federation_User(ctx context.Context, req *OtherService_Federation_UserArgument) (*User, error) {
ctx, span := s.tracer.Start(ctx, "federation.User")
defer span.End()
ctx = grpcfed.WithLogger(ctx, grpcfed.Logger(ctx), grpcfed.LogAttrs(ctx)...)
grpcfed.Logger(ctx).DebugContext(ctx, "resolve federation.User", slog.Any("message_args", s.logvalue_Federation_UserArgument(req)))
type localValueType struct {
*grpcfed.LocalValue
vars struct {
}
}
value := &localValueType{LocalValue: grpcfed.NewLocalValue(ctx, s.celEnvOpts, "grpc.federation.private.federation.UserArgument", req)}
ctx = grpcfed.WithLocalValue(ctx, value.LocalValue)
// create a message value to be returned.
ret := &User{}
// field binding section.
// (grpc.federation.field).by = "$.id"
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[string]{
Value: value,
Expr: `$.id`,
CacheIndex: 17,
Setter: func(v string) error {
ret.Id = v
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
// (grpc.federation.field).by = "$.name"
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[string]{
Value: value,
Expr: `$.name`,
CacheIndex: 18,
Setter: func(v string) error {
ret.Name = v
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
grpcfed.Logger(ctx).DebugContext(ctx, "resolved federation.User", slog.Any("federation.User", s.logvalue_Federation_User(ret)))
return ret, nil
}
// cast_Favorite_FavoriteType__to__Federation_MyFavoriteType cast from "favorite.FavoriteType" to "federation.MyFavoriteType".
func (s *OtherService) cast_Favorite_FavoriteType__to__Federation_MyFavoriteType(from favorite.FavoriteType) (MyFavoriteType, error) {
var ret MyFavoriteType
switch from {
case favorite.FavoriteType_UNKNOWN:
ret = MyFavoriteType_UNKNOWN
case favorite.FavoriteType_TYPE1:
ret = MyFavoriteType_TYPE1
default:
ret = 0
}
return ret, nil
}
func (s *OtherService) logvalue_Favorite_FavoriteType(v favorite.FavoriteType) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
switch v {
case favorite.FavoriteType_UNKNOWN:
return slog.StringValue("UNKNOWN")
case favorite.FavoriteType_TYPE1:
return slog.StringValue("TYPE1")
case favorite.FavoriteType_TYPE2:
return slog.StringValue("TYPE2")
}
return slog.StringValue("")
}
func (s *OtherService) logvalue_Federation_GetResponse(v *GetResponse) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.Any("post", s.logvalue_Federation_Post(v.GetPost())),
)
}
func (s *OtherService) logvalue_Federation_GetResponseArgument(v *OtherService_Federation_GetResponseArgument) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.String("id", v.Id),
)
}
func (s *OtherService) logvalue_Federation_MyFavoriteType(v MyFavoriteType) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
switch v {
case MyFavoriteType_UNKNOWN:
return slog.StringValue("UNKNOWN")
case MyFavoriteType_TYPE1:
return slog.StringValue("TYPE1")
}
return slog.StringValue("")
}
func (s *OtherService) logvalue_Federation_Post(v *Post) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.String("id", v.GetId()),
slog.String("title", v.GetTitle()),
slog.String("content", v.GetContent()),
slog.Any("user", s.logvalue_Federation_User(v.GetUser())),
slog.Any("reaction", s.logvalue_Federation_Reaction(v.GetReaction())),
slog.String("favorite_value", s.logvalue_Federation_MyFavoriteType(v.GetFavoriteValue()).String()),
slog.Bool("cmp", v.GetCmp()),
)
}
func (s *OtherService) logvalue_Federation_PostArgument(v *OtherService_Federation_PostArgument) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue()
}
func (s *OtherService) logvalue_Federation_Reaction(v *Reaction) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.String("favorite_type", s.logvalue_Favorite_FavoriteType(v.GetFavoriteType()).String()),
slog.String("favorite_type_str", v.GetFavoriteTypeStr()),
slog.Bool("cmp", v.GetCmp()),
)
}
func (s *OtherService) logvalue_Federation_ReactionArgument(v *OtherService_Federation_ReactionArgument) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.String("v", s.logvalue_Favorite_FavoriteType(v.V).String()),
)
}
func (s *OtherService) logvalue_Federation_User(v *User) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.String("id", v.GetId()),
slog.String("name", v.GetName()),
)
}
func (s *OtherService) logvalue_Federation_UserArgument(v *OtherService_Federation_UserArgument) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.String("id", v.Id),
slog.String("name", v.Name),
)
}
================================================
FILE: _examples/11_multi_service/federation/ping.pb.go
================================================
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.33.0
// protoc (unknown)
// source: federation/ping.proto
package federation
import (
like "example/like"
_ "github.com/mercari/grpc-federation/grpc/federation"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
timestamppb "google.golang.org/protobuf/types/known/timestamppb"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
type PingRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
}
func (x *PingRequest) Reset() {
*x = PingRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_federation_ping_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *PingRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*PingRequest) ProtoMessage() {}
func (x *PingRequest) ProtoReflect() protoreflect.Message {
mi := &file_federation_ping_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use PingRequest.ProtoReflect.Descriptor instead.
func (*PingRequest) Descriptor() ([]byte, []int) {
return file_federation_ping_proto_rawDescGZIP(), []int{0}
}
type PingResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
LikeType like.LikeType `protobuf:"varint,1,opt,name=like_type,json=likeType,proto3,enum=like.LikeType" json:"like_type,omitempty"`
PingAt *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=ping_at,json=pingAt,proto3" json:"ping_at,omitempty"`
}
func (x *PingResponse) Reset() {
*x = PingResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_federation_ping_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *PingResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*PingResponse) ProtoMessage() {}
func (x *PingResponse) ProtoReflect() protoreflect.Message {
mi := &file_federation_ping_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use PingResponse.ProtoReflect.Descriptor instead.
func (*PingResponse) Descriptor() ([]byte, []int) {
return file_federation_ping_proto_rawDescGZIP(), []int{1}
}
func (x *PingResponse) GetLikeType() like.LikeType {
if x != nil {
return x.LikeType
}
return like.LikeType(0)
}
func (x *PingResponse) GetPingAt() *timestamppb.Timestamp {
if x != nil {
return x.PingAt
}
return nil
}
var File_federation_ping_proto protoreflect.FileDescriptor
var file_federation_ping_proto_rawDesc = []byte{
0x0a, 0x15, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x70, 0x69, 0x6e,
0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0a, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74,
0x69, 0x6f, 0x6e, 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, 0x20, 0x67, 0x72, 0x70, 0x63, 0x2f, 0x66, 0x65, 0x64, 0x65, 0x72,
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e,
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0f, 0x6c, 0x69, 0x6b, 0x65, 0x2f, 0x6c, 0x69, 0x6b,
0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x0d, 0x0a, 0x0b, 0x50, 0x69, 0x6e, 0x67, 0x52,
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x99, 0x01, 0x0a, 0x0c, 0x50, 0x69, 0x6e, 0x67, 0x52,
0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x33, 0x0a, 0x09, 0x6c, 0x69, 0x6b, 0x65, 0x5f,
0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0e, 0x2e, 0x6c, 0x69, 0x6b,
0x65, 0x2e, 0x4c, 0x69, 0x6b, 0x65, 0x54, 0x79, 0x70, 0x65, 0x42, 0x06, 0x9a, 0x4a, 0x03, 0x12,
0x01, 0x31, 0x52, 0x08, 0x6c, 0x69, 0x6b, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x54, 0x0a, 0x07,
0x70, 0x69, 0x6e, 0x67, 0x5f, 0x61, 0x74, 0x18, 0x02, 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, 0x42, 0x1f, 0x9a, 0x4a, 0x1c, 0x12, 0x1a,
0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e,
0x74, 0x69, 0x6d, 0x65, 0x2e, 0x6e, 0x6f, 0x77, 0x28, 0x29, 0x52, 0x06, 0x70, 0x69, 0x6e, 0x67,
0x41, 0x74, 0x42, 0x82, 0x01, 0x0a, 0x0e, 0x63, 0x6f, 0x6d, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72,
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x09, 0x50, 0x69, 0x6e, 0x67, 0x50, 0x72, 0x6f, 0x74, 0x6f,
0x50, 0x01, 0x5a, 0x1d, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2f, 0x66, 0x65, 0x64, 0x65,
0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x3b, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f,
0x6e, 0xa2, 0x02, 0x03, 0x46, 0x58, 0x58, 0xaa, 0x02, 0x0a, 0x46, 0x65, 0x64, 0x65, 0x72, 0x61,
0x74, 0x69, 0x6f, 0x6e, 0xca, 0x02, 0x0a, 0x46, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f,
0x6e, 0xe2, 0x02, 0x16, 0x46, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5c, 0x47,
0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0a, 0x46, 0x65, 0x64,
0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_federation_ping_proto_rawDescOnce sync.Once
file_federation_ping_proto_rawDescData = file_federation_ping_proto_rawDesc
)
func file_federation_ping_proto_rawDescGZIP() []byte {
file_federation_ping_proto_rawDescOnce.Do(func() {
file_federation_ping_proto_rawDescData = protoimpl.X.CompressGZIP(file_federation_ping_proto_rawDescData)
})
return file_federation_ping_proto_rawDescData
}
var file_federation_ping_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
var file_federation_ping_proto_goTypes = []interface{}{
(*PingRequest)(nil), // 0: federation.PingRequest
(*PingResponse)(nil), // 1: federation.PingResponse
(like.LikeType)(0), // 2: like.LikeType
(*timestamppb.Timestamp)(nil), // 3: google.protobuf.Timestamp
}
var file_federation_ping_proto_depIdxs = []int32{
2, // 0: federation.PingResponse.like_type:type_name -> like.LikeType
3, // 1: federation.PingResponse.ping_at:type_name -> google.protobuf.Timestamp
2, // [2:2] is the sub-list for method output_type
2, // [2:2] is the sub-list for method input_type
2, // [2:2] is the sub-list for extension type_name
2, // [2:2] is the sub-list for extension extendee
0, // [0:2] is the sub-list for field type_name
}
func init() { file_federation_ping_proto_init() }
func file_federation_ping_proto_init() {
if File_federation_ping_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_federation_ping_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*PingRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_federation_ping_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*PingResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_federation_ping_proto_rawDesc,
NumEnums: 0,
NumMessages: 2,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_federation_ping_proto_goTypes,
DependencyIndexes: file_federation_ping_proto_depIdxs,
MessageInfos: file_federation_ping_proto_msgTypes,
}.Build()
File_federation_ping_proto = out.File
file_federation_ping_proto_rawDesc = nil
file_federation_ping_proto_goTypes = nil
file_federation_ping_proto_depIdxs = nil
}
================================================
FILE: _examples/11_multi_service/federation/ping_grpc_federation.pb.go
================================================
// Code generated by protoc-gen-grpc-federation. DO NOT EDIT!
package federation
import (
"reflect"
)
var (
_ = reflect.Invalid // to avoid "imported and not used error"
)
// Federation_PingResponseArgument is argument for "federation.PingResponse" message.
type Federation_PingResponseArgument[T any] struct {
Client T
}
================================================
FILE: _examples/11_multi_service/federation/reaction.pb.go
================================================
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.33.0
// protoc (unknown)
// source: federation/reaction.proto
package federation
import (
favorite "example/favorite"
_ "github.com/mercari/grpc-federation/grpc/federation"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
type Reaction struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
FavoriteType favorite.FavoriteType `protobuf:"varint,1,opt,name=favorite_type,json=favoriteType,proto3,enum=favorite.FavoriteType" json:"favorite_type,omitempty"`
FavoriteTypeStr string `protobuf:"bytes,2,opt,name=favorite_type_str,json=favoriteTypeStr,proto3" json:"favorite_type_str,omitempty"`
Cmp bool `protobuf:"varint,3,opt,name=cmp,proto3" json:"cmp,omitempty"`
}
func (x *Reaction) Reset() {
*x = Reaction{}
if protoimpl.UnsafeEnabled {
mi := &file_federation_reaction_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Reaction) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Reaction) ProtoMessage() {}
func (x *Reaction) ProtoReflect() protoreflect.Message {
mi := &file_federation_reaction_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Reaction.ProtoReflect.Descriptor instead.
func (*Reaction) Descriptor() ([]byte, []int) {
return file_federation_reaction_proto_rawDescGZIP(), []int{0}
}
func (x *Reaction) GetFavoriteType() favorite.FavoriteType {
if x != nil {
return x.FavoriteType
}
return favorite.FavoriteType(0)
}
func (x *Reaction) GetFavoriteTypeStr() string {
if x != nil {
return x.FavoriteTypeStr
}
return ""
}
func (x *Reaction) GetCmp() bool {
if x != nil {
return x.Cmp
}
return false
}
var File_federation_reaction_proto protoreflect.FileDescriptor
var file_federation_reaction_proto_rawDesc = []byte{
0x0a, 0x19, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x72, 0x65, 0x61,
0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0a, 0x66, 0x65, 0x64,
0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x20, 0x67, 0x72, 0x70, 0x63, 0x2f, 0x66, 0x65,
0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74,
0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x66, 0x61, 0x76, 0x6f, 0x72,
0x69, 0x74, 0x65, 0x2f, 0x66, 0x61, 0x76, 0x6f, 0x72, 0x69, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f,
0x74, 0x6f, 0x22, 0xb1, 0x02, 0x0a, 0x08, 0x52, 0x65, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12,
0x66, 0x0a, 0x0d, 0x66, 0x61, 0x76, 0x6f, 0x72, 0x69, 0x74, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65,
0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x16, 0x2e, 0x66, 0x61, 0x76, 0x6f, 0x72, 0x69, 0x74,
0x65, 0x2e, 0x46, 0x61, 0x76, 0x6f, 0x72, 0x69, 0x74, 0x65, 0x54, 0x79, 0x70, 0x65, 0x42, 0x29,
0x9a, 0x4a, 0x26, 0x12, 0x24, 0x66, 0x61, 0x76, 0x6f, 0x72, 0x69, 0x74, 0x65, 0x2e, 0x46, 0x61,
0x76, 0x6f, 0x72, 0x69, 0x74, 0x65, 0x54, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x61, 0x6c, 0x75, 0x65,
0x28, 0x27, 0x54, 0x59, 0x50, 0x45, 0x31, 0x27, 0x29, 0x52, 0x0c, 0x66, 0x61, 0x76, 0x6f, 0x72,
0x69, 0x74, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x71, 0x0a, 0x11, 0x66, 0x61, 0x76, 0x6f, 0x72,
0x69, 0x74, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x73, 0x74, 0x72, 0x18, 0x02, 0x20, 0x01,
0x28, 0x09, 0x42, 0x45, 0x9a, 0x4a, 0x42, 0x12, 0x40, 0x66, 0x61, 0x76, 0x6f, 0x72, 0x69, 0x74,
0x65, 0x2e, 0x46, 0x61, 0x76, 0x6f, 0x72, 0x69, 0x74, 0x65, 0x54, 0x79, 0x70, 0x65, 0x2e, 0x6e,
0x61, 0x6d, 0x65, 0x28, 0x66, 0x61, 0x76, 0x6f, 0x72, 0x69, 0x74, 0x65, 0x2e, 0x46, 0x61, 0x76,
0x6f, 0x72, 0x69, 0x74, 0x65, 0x54, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x28,
0x27, 0x54, 0x59, 0x50, 0x45, 0x31, 0x27, 0x29, 0x29, 0x52, 0x0f, 0x66, 0x61, 0x76, 0x6f, 0x72,
0x69, 0x74, 0x65, 0x54, 0x79, 0x70, 0x65, 0x53, 0x74, 0x72, 0x12, 0x1a, 0x0a, 0x03, 0x63, 0x6d,
0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x42, 0x08, 0x9a, 0x4a, 0x05, 0x12, 0x03, 0x63, 0x6d,
0x70, 0x52, 0x03, 0x63, 0x6d, 0x70, 0x3a, 0x2e, 0x9a, 0x4a, 0x2b, 0x0a, 0x29, 0x0a, 0x03, 0x63,
0x6d, 0x70, 0x5a, 0x22, 0x24, 0x2e, 0x76, 0x20, 0x3d, 0x3d, 0x20, 0x66, 0x61, 0x76, 0x6f, 0x72,
0x69, 0x74, 0x65, 0x2e, 0x46, 0x61, 0x76, 0x6f, 0x72, 0x69, 0x74, 0x65, 0x54, 0x79, 0x70, 0x65,
0x2e, 0x54, 0x59, 0x50, 0x45, 0x31, 0x42, 0x86, 0x01, 0x0a, 0x0e, 0x63, 0x6f, 0x6d, 0x2e, 0x66,
0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x0d, 0x52, 0x65, 0x61, 0x63, 0x74,
0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x1d, 0x65, 0x78, 0x61, 0x6d,
0x70, 0x6c, 0x65, 0x2f, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x3b, 0x66,
0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0xa2, 0x02, 0x03, 0x46, 0x58, 0x58, 0xaa,
0x02, 0x0a, 0x46, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0xca, 0x02, 0x0a, 0x46,
0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0xe2, 0x02, 0x16, 0x46, 0x65, 0x64, 0x65,
0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61,
0x74, 0x61, 0xea, 0x02, 0x0a, 0x46, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x62,
0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_federation_reaction_proto_rawDescOnce sync.Once
file_federation_reaction_proto_rawDescData = file_federation_reaction_proto_rawDesc
)
func file_federation_reaction_proto_rawDescGZIP() []byte {
file_federation_reaction_proto_rawDescOnce.Do(func() {
file_federation_reaction_proto_rawDescData = protoimpl.X.CompressGZIP(file_federation_reaction_proto_rawDescData)
})
return file_federation_reaction_proto_rawDescData
}
var file_federation_reaction_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
var file_federation_reaction_proto_goTypes = []interface{}{
(*Reaction)(nil), // 0: federation.Reaction
(favorite.FavoriteType)(0), // 1: favorite.FavoriteType
}
var file_federation_reaction_proto_depIdxs = []int32{
1, // 0: federation.Reaction.favorite_type:type_name -> favorite.FavoriteType
1, // [1:1] is the sub-list for method output_type
1, // [1:1] is the sub-list for method input_type
1, // [1:1] is the sub-list for extension type_name
1, // [1:1] is the sub-list for extension extendee
0, // [0:1] is the sub-list for field type_name
}
func init() { file_federation_reaction_proto_init() }
func file_federation_reaction_proto_init() {
if File_federation_reaction_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_federation_reaction_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Reaction); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_federation_reaction_proto_rawDesc,
NumEnums: 0,
NumMessages: 1,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_federation_reaction_proto_goTypes,
DependencyIndexes: file_federation_reaction_proto_depIdxs,
MessageInfos: file_federation_reaction_proto_msgTypes,
}.Build()
File_federation_reaction_proto = out.File
file_federation_reaction_proto_rawDesc = nil
file_federation_reaction_proto_goTypes = nil
file_federation_reaction_proto_depIdxs = nil
}
================================================
FILE: _examples/11_multi_service/federation/reaction_grpc_federation.pb.go
================================================
// Code generated by protoc-gen-grpc-federation. DO NOT EDIT!
// versions:
//
// protoc-gen-grpc-federation: (devel)
//
// source: federation/reaction.proto
package federation
import (
"reflect"
)
var (
_ = reflect.Invalid // to avoid "imported and not used error"
)
================================================
FILE: _examples/11_multi_service/go.mod
================================================
module example
go 1.24.0
replace github.com/mercari/grpc-federation => ../../
require (
github.com/google/go-cmp v0.7.0
github.com/mercari/grpc-federation v0.0.0-00010101000000-000000000000
go.opentelemetry.io/otel v1.24.0
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.21.0
go.opentelemetry.io/otel/sdk v1.24.0
go.opentelemetry.io/otel/trace v1.24.0
go.uber.org/goleak v1.3.0
google.golang.org/genproto/googleapis/rpc v0.0.0-20240826202546-f6391c0de4c7
google.golang.org/grpc v1.65.0
google.golang.org/protobuf v1.34.2
)
require (
cel.dev/expr v0.19.1 // indirect
github.com/antlr4-go/antlr/v4 v4.13.0 // indirect
github.com/cenkalti/backoff/v4 v4.2.1 // indirect
github.com/go-logr/logr v1.4.1 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
github.com/goccy/wasi-go v0.3.2 // indirect
github.com/google/cel-go v0.23.1 // indirect
github.com/google/uuid v1.6.0 // indirect
github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0 // indirect
github.com/kelseyhightower/envconfig v1.4.0 // indirect
github.com/stealthrocket/wazergo v0.19.1 // indirect
github.com/stoewer/go-strcase v1.3.0 // indirect
github.com/tetratelabs/wazero v1.10.1 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.21.0 // indirect
go.opentelemetry.io/otel/metric v1.24.0 // indirect
go.opentelemetry.io/proto/otlp v1.0.0 // indirect
golang.org/x/exp v0.0.0-20250506013437-ce4c2cf36ca6 // indirect
golang.org/x/net v0.38.0 // indirect
golang.org/x/sync v0.14.0 // indirect
golang.org/x/sys v0.37.0 // indirect
golang.org/x/text v0.23.0 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20240826202546-f6391c0de4c7 // indirect
)
================================================
FILE: _examples/11_multi_service/go.sum
================================================
cel.dev/expr v0.19.1 h1:NciYrtDRIR0lNCnH1LFJegdjspNx9fI59O7TWcua/W4=
cel.dev/expr v0.19.1/go.mod h1:MrpN08Q+lEBs+bGYdLxxHkZoUSsCp0nSKTs0nTymJgw=
github.com/antlr4-go/antlr/v4 v4.13.0 h1:lxCg3LAv+EUK6t1i0y1V6/SLeUi0eKEKdhQAlS8TVTI=
github.com/antlr4-go/antlr/v4 v4.13.0/go.mod h1:pfChB/xh/Unjila75QW7+VU4TSnWnnk9UTnmpPaOR2g=
github.com/cenkalti/backoff/v4 v4.2.1 h1:y4OZtCnogmCPw98Zjyt5a6+QwPLGkiQsYW5oUqylYbM=
github.com/cenkalti/backoff/v4 v4.2.1/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A=
github.com/go-logr/logr v1.4.1 h1:pKouT5E8xu9zeFC39JXRDukb6JFQPXM5p5I91188VAQ=
github.com/go-logr/logr v1.4.1/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY=
github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag=
github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE=
github.com/goccy/wasi-go v0.3.2 h1:wAvGXmqCkfcp0B0AwIp5Ya53hzDwkKm9W8iuT3nCCz0=
github.com/goccy/wasi-go v0.3.2/go.mod h1:nIKD204n9xa4Z20UV+XA483kIr9TAl2vXr+X5qVAO5M=
github.com/golang/glog v1.2.1 h1:OptwRhECazUx5ix5TTWC3EZhsZEHWcYWY4FQHTIubm4=
github.com/golang/glog v1.2.1/go.mod h1:6AhwSGph0fcJtXVM/PEHPqZlFeoLxhs7/t5UDAwmO+w=
github.com/google/cel-go v0.23.1 h1:91ThhEZlBcE5rB2adBVXqvDoqdL8BG2oyhd0bK1I/r4=
github.com/google/cel-go v0.23.1/go.mod h1:52Pb6QsDbC5kvgxvZhiL9QX1oZEkcUF/ZqaPx1J5Wwo=
github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8=
github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU=
github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0 h1:YBftPWNWd4WwGqtY2yeZL2ef8rHAxPBD8KFhJpmcqms=
github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0/go.mod h1:YN5jB8ie0yfIUg6VvR9Kz84aCaG7AsGZnLjhHbUqwPg=
github.com/kelseyhightower/envconfig v1.4.0 h1:Im6hONhd3pLkfDFsbRgu68RDNkGF1r3dvMUtDTo2cv8=
github.com/kelseyhightower/envconfig v1.4.0/go.mod h1:cccZRl6mQpaq41TPp5QxidR+Sa3axMbJDNb//FQX6Gg=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/stealthrocket/wazergo v0.19.1 h1:BPrITETPgSFwiytwmToO0MbUC/+RGC39JScz1JmmG6c=
github.com/stealthrocket/wazergo v0.19.1/go.mod h1:riI0hxw4ndZA5e6z7PesHg2BtTftcZaMxRcoiGGipTs=
github.com/stoewer/go-strcase v1.3.0 h1:g0eASXYtp+yvN9fK8sH94oCIk0fau9uV1/ZdJ0AVEzs=
github.com/stoewer/go-strcase v1.3.0/go.mod h1:fAH5hQ5pehh+j3nZfvwdk2RgEgQjAoM8wodgtPmh1xo=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=
github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo=
github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk=
github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
github.com/tetratelabs/wazero v1.10.1 h1:2DugeJf6VVk58KTPszlNfeeN8AhhpwcZqkJj2wwFuH8=
github.com/tetratelabs/wazero v1.10.1/go.mod h1:DRm5twOQ5Gr1AoEdSi0CLjDQF1J9ZAuyqFIjl1KKfQU=
go.opentelemetry.io/otel v1.24.0 h1:0LAOdjNmQeSTzGBzduGe/rU4tZhMwL5rWgtp9Ku5Jfo=
go.opentelemetry.io/otel v1.24.0/go.mod h1:W7b9Ozg4nkF5tWI5zsXkaKKDjdVjpD4oAt9Qi/MArHo=
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.21.0 h1:cl5P5/GIfFh4t6xyruOgJP5QiA1pw4fYYdv6nc6CBWw=
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.21.0/go.mod h1:zgBdWWAu7oEEMC06MMKc5NLbA/1YDXV1sMpSqEeLQLg=
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.21.0 h1:tIqheXEFWAZ7O8A7m+J0aPTmpJN3YQ7qetUAdkkkKpk=
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.21.0/go.mod h1:nUeKExfxAQVbiVFn32YXpXZZHZ61Cc3s3Rn1pDBGAb0=
go.opentelemetry.io/otel/metric v1.24.0 h1:6EhoGWWK28x1fbpA4tYTOWBkPefTDQnb8WSGXlc88kI=
go.opentelemetry.io/otel/metric v1.24.0/go.mod h1:VYhLe1rFfxuTXLgj4CBiyz+9WYBA8pNGJgDcSFRKBco=
go.opentelemetry.io/otel/sdk v1.24.0 h1:YMPPDNymmQN3ZgczicBY3B6sf9n62Dlj9pWD3ucgoDw=
go.opentelemetry.io/otel/sdk v1.24.0/go.mod h1:KVrIYw6tEubO9E96HQpcmpTKDVn9gdv35HoYiQWGDFg=
go.opentelemetry.io/otel/trace v1.24.0 h1:CsKnnL4dUAr/0llH9FKuc698G04IrpWV0MQA/Y1YELI=
go.opentelemetry.io/otel/trace v1.24.0/go.mod h1:HPc3Xr/cOApsBI154IU0OI0HJexz+aw5uPdbs3UCjNU=
go.opentelemetry.io/proto/otlp v1.0.0 h1:T0TX0tmXU8a3CbNXzEKGeU5mIVOdf0oykP+u2lIVU/I=
go.opentelemetry.io/proto/otlp v1.0.0/go.mod h1:Sy6pihPLfYHkr3NkUbEhGHFhINUSI/v80hjKIs5JXpM=
go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto=
go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE=
golang.org/x/exp v0.0.0-20250506013437-ce4c2cf36ca6 h1:y5zboxd6LQAqYIhHnB48p0ByQ/GnQx2BE33L8BOHQkI=
golang.org/x/exp v0.0.0-20250506013437-ce4c2cf36ca6/go.mod h1:U6Lno4MTRCDY+Ba7aCcauB9T60gsv5s4ralQzP72ZoQ=
golang.org/x/net v0.38.0 h1:vRMAPTMaeGqVhG5QyLJHqNDwecKTomGeqbnfZyKlBI8=
golang.org/x/net v0.38.0/go.mod h1:ivrbrMbzFq5J41QOQh0siUuly180yBYtLp+CKbEaFx8=
golang.org/x/sync v0.14.0 h1:woo0S4Yywslg6hp4eUFjTVOyKt0RookbpAHG4c1HmhQ=
golang.org/x/sync v0.14.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA=
golang.org/x/sys v0.37.0 h1:fdNQudmxPjkdUTPnLn5mdQv7Zwvbvpaxqs831goi9kQ=
golang.org/x/sys v0.37.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks=
golang.org/x/text v0.23.0 h1:D71I7dUrlY+VX0gQShAThNGHFxZ13dGLBHQLVl1mJlY=
golang.org/x/text v0.23.0/go.mod h1:/BLNzu4aZCJ1+kcD0DNRotWKage4q2rGVAg4o22unh4=
google.golang.org/genproto/googleapis/api v0.0.0-20240826202546-f6391c0de4c7 h1:YcyjlL1PRr2Q17/I0dPk2JmYS5CDXfcdb2Z3YRioEbw=
google.golang.org/genproto/googleapis/api v0.0.0-20240826202546-f6391c0de4c7/go.mod h1:OCdP9MfskevB/rbYvHTsXTtKC+3bHWajPdoKgjcYkfo=
google.golang.org/genproto/googleapis/rpc v0.0.0-20240826202546-f6391c0de4c7 h1:2035KHhUv+EpyB+hWgJnaWKJOdX1E95w2S8Rr4uWKTs=
google.golang.org/genproto/googleapis/rpc v0.0.0-20240826202546-f6391c0de4c7/go.mod h1:UqMtugtsSgubUsoxbuAoiCXvqvErP7Gf0so0mK9tHxU=
google.golang.org/grpc v1.65.0 h1:bs/cUb4lp1G5iImFFd3u5ixQzweKizoZJAwBNLR42lc=
google.golang.org/grpc v1.65.0/go.mod h1:WgYC2ypjlB0EiQi6wdKixMqukr6lBc0Vo+oOgjrM5ZQ=
google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg=
google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
================================================
FILE: _examples/11_multi_service/grpc/federation/federation.pb.go
================================================
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.33.0
// protoc (unknown)
// source: grpc/federation/federation.proto
package federation
import (
_ "github.com/mercari/grpc-federation/grpc/federation/cel"
code "google.golang.org/genproto/googleapis/rpc/code"
errdetails "google.golang.org/genproto/googleapis/rpc/errdetails"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
descriptorpb "google.golang.org/protobuf/types/descriptorpb"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
// TypeKind is primitive kind list.
type TypeKind int32
const (
// UNKNOWN represents unexpected value.
TypeKind_UNKNOWN TypeKind = 0
// STRING is used to convert the input value to `string` type.
TypeKind_STRING TypeKind = 1
// BOOL is used to convert the input value to `bool` type.
TypeKind_BOOL TypeKind = 2
// INT64 is used to convert the input value to `int64` type.
TypeKind_INT64 TypeKind = 3
// UINT64 is used to convert the input value to `uint64` type.
TypeKind_UINT64 TypeKind = 4
// DOUBLE is used to convert the input value to `double` type.
TypeKind_DOUBLE TypeKind = 5
// DURATION is used to convert the input value to the `google.protobuf.Duration` type.
TypeKind_DURATION TypeKind = 6
)
// Enum value maps for TypeKind.
var (
TypeKind_name = map[int32]string{
0: "UNKNOWN",
1: "STRING",
2: "BOOL",
3: "INT64",
4: "UINT64",
5: "DOUBLE",
6: "DURATION",
}
TypeKind_value = map[string]int32{
"UNKNOWN": 0,
"STRING": 1,
"BOOL": 2,
"INT64": 3,
"UINT64": 4,
"DOUBLE": 5,
"DURATION": 6,
}
)
func (x TypeKind) Enum() *TypeKind {
p := new(TypeKind)
*p = x
return p
}
func (x TypeKind) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (TypeKind) Descriptor() protoreflect.EnumDescriptor {
return file_grpc_federation_federation_proto_enumTypes[0].Descriptor()
}
func (TypeKind) Type() protoreflect.EnumType {
return &file_grpc_federation_federation_proto_enumTypes[0]
}
func (x TypeKind) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use TypeKind.Descriptor instead.
func (TypeKind) EnumDescriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{0}
}
// LogLevel is the importance or severity of a log event.
type GRPCError_LogLevel int32
const (
// UNKNOWN represents unexpected value.
GRPCError_UNKNOWN GRPCError_LogLevel = 0
// DEBUG is used for detailed information that is useful during development and debugging.
GRPCError_DEBUG GRPCError_LogLevel = 1
// INFO logs are used to provide information about the normal functioning of the application.
GRPCError_INFO GRPCError_LogLevel = 2
// WARN signifies a potential problem or warning that does not necessarily stop the program from working but may lead to issues in the future.
GRPCError_WARN GRPCError_LogLevel = 3
// ERROR indicates a serious issue that has caused a failure in the application.
GRPCError_ERROR GRPCError_LogLevel = 4
)
// Enum value maps for GRPCError_LogLevel.
var (
GRPCError_LogLevel_name = map[int32]string{
0: "UNKNOWN",
1: "DEBUG",
2: "INFO",
3: "WARN",
4: "ERROR",
}
GRPCError_LogLevel_value = map[string]int32{
"UNKNOWN": 0,
"DEBUG": 1,
"INFO": 2,
"WARN": 3,
"ERROR": 4,
}
)
func (x GRPCError_LogLevel) Enum() *GRPCError_LogLevel {
p := new(GRPCError_LogLevel)
*p = x
return p
}
func (x GRPCError_LogLevel) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (GRPCError_LogLevel) Descriptor() protoreflect.EnumDescriptor {
return file_grpc_federation_federation_proto_enumTypes[1].Descriptor()
}
func (GRPCError_LogLevel) Type() protoreflect.EnumType {
return &file_grpc_federation_federation_proto_enumTypes[1]
}
func (x GRPCError_LogLevel) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use GRPCError_LogLevel.Descriptor instead.
func (GRPCError_LogLevel) EnumDescriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{24, 0}
}
type FileRule struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Plugin *CELPlugin `protobuf:"bytes,1,opt,name=plugin,proto3" json:"plugin,omitempty"`
// import can be used to resolve methods, messages, etc. that are referenced in gRPC Federation rules.
Import []string `protobuf:"bytes,2,rep,name=import,proto3" json:"import,omitempty"`
}
func (x *FileRule) Reset() {
*x = FileRule{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *FileRule) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*FileRule) ProtoMessage() {}
func (x *FileRule) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use FileRule.ProtoReflect.Descriptor instead.
func (*FileRule) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{0}
}
func (x *FileRule) GetPlugin() *CELPlugin {
if x != nil {
return x.Plugin
}
return nil
}
func (x *FileRule) GetImport() []string {
if x != nil {
return x.Import
}
return nil
}
type EnumRule struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// alias mapping between enums defined in other packages and enums defined on the federation service side.
// The alias is the FQDN ( . ) to the enum.
// If this definition exists, type conversion is automatically performed before the enum value assignment operation.
// If a enum with this option has a value that is not present in the enum specified by alias, and the alias option is not specified for that value, an error is occurred.
// You can specify multiple aliases. In that case, only values common to all aliases will be considered.
// Specifying a value that is not included in either alias will result in an error.
Alias []string `protobuf:"bytes,1,rep,name=alias,proto3" json:"alias,omitempty"`
}
func (x *EnumRule) Reset() {
*x = EnumRule{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *EnumRule) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*EnumRule) ProtoMessage() {}
func (x *EnumRule) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use EnumRule.ProtoReflect.Descriptor instead.
func (*EnumRule) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{1}
}
func (x *EnumRule) GetAlias() []string {
if x != nil {
return x.Alias
}
return nil
}
type EnumValueRule struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// specifies the default value of the enum.
// All values other than those specified in alias will be default values.
Default *bool `protobuf:"varint,1,opt,name=default,proto3,oneof" json:"default,omitempty"`
// alias can be used when alias is specified in grpc.federation.enum option,
// and specifies the value name to be referenced among the enums specified in alias of enum option.
// multiple value names can be specified for alias.
Alias []string `protobuf:"bytes,2,rep,name=alias,proto3" json:"alias,omitempty"`
// attr is used to hold multiple name-value pairs corresponding to an enum value.
// The values specified by the name must be consistently specified for all enum values.
// The values stored using this feature can be retrieved using the `attr()` method of the enum API.
Attr []*EnumValueAttribute `protobuf:"bytes,3,rep,name=attr,proto3" json:"attr,omitempty"`
// noalias exclude from the target of alias.
// This option cannot be specified simultaneously with `default` or `alias`.
Noalias *bool `protobuf:"varint,4,opt,name=noalias,proto3,oneof" json:"noalias,omitempty"`
}
func (x *EnumValueRule) Reset() {
*x = EnumValueRule{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *EnumValueRule) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*EnumValueRule) ProtoMessage() {}
func (x *EnumValueRule) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use EnumValueRule.ProtoReflect.Descriptor instead.
func (*EnumValueRule) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{2}
}
func (x *EnumValueRule) GetDefault() bool {
if x != nil && x.Default != nil {
return *x.Default
}
return false
}
func (x *EnumValueRule) GetAlias() []string {
if x != nil {
return x.Alias
}
return nil
}
func (x *EnumValueRule) GetAttr() []*EnumValueAttribute {
if x != nil {
return x.Attr
}
return nil
}
func (x *EnumValueRule) GetNoalias() bool {
if x != nil && x.Noalias != nil {
return *x.Noalias
}
return false
}
type EnumValueAttribute struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// name is the attribute key.
// This value is used to search for values using the `attr()` method.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// value represents the value corresponding to `name`.
Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
}
func (x *EnumValueAttribute) Reset() {
*x = EnumValueAttribute{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *EnumValueAttribute) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*EnumValueAttribute) ProtoMessage() {}
func (x *EnumValueAttribute) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[3]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use EnumValueAttribute.ProtoReflect.Descriptor instead.
func (*EnumValueAttribute) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{3}
}
func (x *EnumValueAttribute) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *EnumValueAttribute) GetValue() string {
if x != nil {
return x.Value
}
return ""
}
type OneofRule struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
}
func (x *OneofRule) Reset() {
*x = OneofRule{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *OneofRule) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*OneofRule) ProtoMessage() {}
func (x *OneofRule) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[4]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use OneofRule.ProtoReflect.Descriptor instead.
func (*OneofRule) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{4}
}
// ServiceRule define gRPC Federation rules for the service.
type ServiceRule struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// env defines the environment variable.
Env *Env `protobuf:"bytes,1,opt,name=env,proto3" json:"env,omitempty"`
// var defines the service-level variables.
Var []*ServiceVariable `protobuf:"bytes,2,rep,name=var,proto3" json:"var,omitempty"`
}
func (x *ServiceRule) Reset() {
*x = ServiceRule{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[5]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ServiceRule) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ServiceRule) ProtoMessage() {}
func (x *ServiceRule) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[5]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ServiceRule.ProtoReflect.Descriptor instead.
func (*ServiceRule) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{5}
}
func (x *ServiceRule) GetEnv() *Env {
if x != nil {
return x.Env
}
return nil
}
func (x *ServiceRule) GetVar() []*ServiceVariable {
if x != nil {
return x.Var
}
return nil
}
// Env is used when setting environment variables.
// There are two ways to configure it.
type Env struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// var is used to directly list environment variables.
Var []*EnvVar `protobuf:"bytes,1,rep,name=var,proto3" json:"var,omitempty"`
// message is used to reference an already defined Protocol Buffers' message for defining environment variables.
// If you want to set detailed options for the fields of the message, use the `env` option in FieldRule.
Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
}
func (x *Env) Reset() {
*x = Env{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[6]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Env) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Env) ProtoMessage() {}
func (x *Env) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[6]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Env.ProtoReflect.Descriptor instead.
func (*Env) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{6}
}
func (x *Env) GetVar() []*EnvVar {
if x != nil {
return x.Var
}
return nil
}
func (x *Env) GetMessage() string {
if x != nil {
return x.Message
}
return ""
}
// ServiceVariable define variables at the service level.
// This definition is executed at server startup, after the initialization of Env.
// The defined variables can be used across all messages that the service depends on.
type ServiceVariable struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// name is a variable name.
// This name can be referenced in all CELs related to the service by using `grpc.federation.var.` prefix.
Name *string `protobuf:"bytes,1,opt,name=name,proto3,oneof" json:"name,omitempty"`
// if specify the condition for evaluating expr.
// this value evaluated by CEL and it must return a boolean value.
// If the result of evaluation is `false`, the value assigned to name is the default value of the result of evaluation of `expr`.
If *string `protobuf:"bytes,2,opt,name=if,proto3,oneof" json:"if,omitempty"`
// expr specify the value to be assigned to name.
//
// Types that are assignable to Expr:
//
// *ServiceVariable_By
// *ServiceVariable_Map
// *ServiceVariable_Message
// *ServiceVariable_Validation
// *ServiceVariable_Enum
// *ServiceVariable_Switch
Expr isServiceVariable_Expr `protobuf_oneof:"expr"`
}
func (x *ServiceVariable) Reset() {
*x = ServiceVariable{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[7]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ServiceVariable) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ServiceVariable) ProtoMessage() {}
func (x *ServiceVariable) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[7]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ServiceVariable.ProtoReflect.Descriptor instead.
func (*ServiceVariable) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{7}
}
func (x *ServiceVariable) GetName() string {
if x != nil && x.Name != nil {
return *x.Name
}
return ""
}
func (x *ServiceVariable) GetIf() string {
if x != nil && x.If != nil {
return *x.If
}
return ""
}
func (m *ServiceVariable) GetExpr() isServiceVariable_Expr {
if m != nil {
return m.Expr
}
return nil
}
func (x *ServiceVariable) GetBy() string {
if x, ok := x.GetExpr().(*ServiceVariable_By); ok {
return x.By
}
return ""
}
func (x *ServiceVariable) GetMap() *MapExpr {
if x, ok := x.GetExpr().(*ServiceVariable_Map); ok {
return x.Map
}
return nil
}
func (x *ServiceVariable) GetMessage() *MessageExpr {
if x, ok := x.GetExpr().(*ServiceVariable_Message); ok {
return x.Message
}
return nil
}
func (x *ServiceVariable) GetValidation() *ServiceVariableValidationExpr {
if x, ok := x.GetExpr().(*ServiceVariable_Validation); ok {
return x.Validation
}
return nil
}
func (x *ServiceVariable) GetEnum() *EnumExpr {
if x, ok := x.GetExpr().(*ServiceVariable_Enum); ok {
return x.Enum
}
return nil
}
func (x *ServiceVariable) GetSwitch() *SwitchExpr {
if x, ok := x.GetExpr().(*ServiceVariable_Switch); ok {
return x.Switch
}
return nil
}
type isServiceVariable_Expr interface {
isServiceVariable_Expr()
}
type ServiceVariable_By struct {
// `by` evaluates with CEL.
By string `protobuf:"bytes,11,opt,name=by,proto3,oneof"`
}
type ServiceVariable_Map struct {
// map apply map operation for the specified repeated type.
Map *MapExpr `protobuf:"bytes,12,opt,name=map,proto3,oneof"`
}
type ServiceVariable_Message struct {
// message gets with message arguments.
Message *MessageExpr `protobuf:"bytes,13,opt,name=message,proto3,oneof"`
}
type ServiceVariable_Validation struct {
// validation defines the validation rule and message.
Validation *ServiceVariableValidationExpr `protobuf:"bytes,14,opt,name=validation,proto3,oneof"`
}
type ServiceVariable_Enum struct {
// enum gets with cel value.
Enum *EnumExpr `protobuf:"bytes,15,opt,name=enum,proto3,oneof"`
}
type ServiceVariable_Switch struct {
// switch provides conditional evaluation with multiple branches.
Switch *SwitchExpr `protobuf:"bytes,16,opt,name=switch,proto3,oneof"`
}
func (*ServiceVariable_By) isServiceVariable_Expr() {}
func (*ServiceVariable_Map) isServiceVariable_Expr() {}
func (*ServiceVariable_Message) isServiceVariable_Expr() {}
func (*ServiceVariable_Validation) isServiceVariable_Expr() {}
func (*ServiceVariable_Enum) isServiceVariable_Expr() {}
func (*ServiceVariable_Switch) isServiceVariable_Expr() {}
// ServiceVariableValidationExpr represents validation rule and error message.
type ServiceVariableValidationExpr struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// if specifies condition in CEL. If the condition is true, it returns error.
// The return value must always be of type boolean.
If string `protobuf:"bytes,1,opt,name=if,proto3" json:"if,omitempty"`
// message is a error message in CEL.
Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
}
func (x *ServiceVariableValidationExpr) Reset() {
*x = ServiceVariableValidationExpr{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[8]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ServiceVariableValidationExpr) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ServiceVariableValidationExpr) ProtoMessage() {}
func (x *ServiceVariableValidationExpr) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[8]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ServiceVariableValidationExpr.ProtoReflect.Descriptor instead.
func (*ServiceVariableValidationExpr) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{8}
}
func (x *ServiceVariableValidationExpr) GetIf() string {
if x != nil {
return x.If
}
return ""
}
func (x *ServiceVariableValidationExpr) GetMessage() string {
if x != nil {
return x.Message
}
return ""
}
// EnvVar represents an environment variable.
type EnvVar struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// name is an environment variable name.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// type is an environment variable type.
Type *EnvType `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"`
// option is an additional option for parsing environment variable.
Option *EnvVarOption `protobuf:"bytes,3,opt,name=option,proto3,oneof" json:"option,omitempty"`
}
func (x *EnvVar) Reset() {
*x = EnvVar{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[9]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *EnvVar) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*EnvVar) ProtoMessage() {}
func (x *EnvVar) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[9]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use EnvVar.ProtoReflect.Descriptor instead.
func (*EnvVar) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{9}
}
func (x *EnvVar) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *EnvVar) GetType() *EnvType {
if x != nil {
return x.Type
}
return nil
}
func (x *EnvVar) GetOption() *EnvVarOption {
if x != nil {
return x.Option
}
return nil
}
// EnvType represents type information for environment variable.
type EnvType struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Types that are assignable to Type:
//
// *EnvType_Kind
// *EnvType_Repeated
// *EnvType_Map
Type isEnvType_Type `protobuf_oneof:"type"`
}
func (x *EnvType) Reset() {
*x = EnvType{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[10]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *EnvType) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*EnvType) ProtoMessage() {}
func (x *EnvType) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[10]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use EnvType.ProtoReflect.Descriptor instead.
func (*EnvType) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{10}
}
func (m *EnvType) GetType() isEnvType_Type {
if m != nil {
return m.Type
}
return nil
}
func (x *EnvType) GetKind() TypeKind {
if x, ok := x.GetType().(*EnvType_Kind); ok {
return x.Kind
}
return TypeKind_UNKNOWN
}
func (x *EnvType) GetRepeated() *EnvType {
if x, ok := x.GetType().(*EnvType_Repeated); ok {
return x.Repeated
}
return nil
}
func (x *EnvType) GetMap() *EnvMapType {
if x, ok := x.GetType().(*EnvType_Map); ok {
return x.Map
}
return nil
}
type isEnvType_Type interface {
isEnvType_Type()
}
type EnvType_Kind struct {
// kind is used when the type is a primitive type.
Kind TypeKind `protobuf:"varint,1,opt,name=kind,proto3,enum=grpc.federation.TypeKind,oneof"`
}
type EnvType_Repeated struct {
// repeated is used when the type is a repeated type.
Repeated *EnvType `protobuf:"bytes,2,opt,name=repeated,proto3,oneof"`
}
type EnvType_Map struct {
// map is used when the type is a map type.
Map *EnvMapType `protobuf:"bytes,3,opt,name=map,proto3,oneof"`
}
func (*EnvType_Kind) isEnvType_Type() {}
func (*EnvType_Repeated) isEnvType_Type() {}
func (*EnvType_Map) isEnvType_Type() {}
// EnvMapType represents map type.
type EnvMapType struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// key represents map's key type.
Key *EnvType `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
// value represents map's value type.
Value *EnvType `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
}
func (x *EnvMapType) Reset() {
*x = EnvMapType{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[11]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *EnvMapType) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*EnvMapType) ProtoMessage() {}
func (x *EnvMapType) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[11]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use EnvMapType.ProtoReflect.Descriptor instead.
func (*EnvMapType) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{11}
}
func (x *EnvMapType) GetKey() *EnvType {
if x != nil {
return x.Key
}
return nil
}
func (x *EnvMapType) GetValue() *EnvType {
if x != nil {
return x.Value
}
return nil
}
// EnvVarOption represents additional option for environment variable.
// The option work with the `envconfig` library in Go language.
// For detailed specifications, please refer to the library's documentation ( https://pkg.go.dev/github.com/kelseyhightower/envconfig#section-readme ).
type EnvVarOption struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// alternate use this option if you want to use an environment variable with a different name than the value specified in `EnvVar.name`.
Alternate *string `protobuf:"bytes,1,opt,name=alternate,proto3,oneof" json:"alternate,omitempty"`
// default specify the value to use as a fallback if the specified environment variable is not found.
Default *string `protobuf:"bytes,2,opt,name=default,proto3,oneof" json:"default,omitempty"`
// required require the environment variable to exist.
// If it does not exist, an error will occur at startup.
Required *bool `protobuf:"varint,3,opt,name=required,proto3,oneof" json:"required,omitempty"`
// ignored if ignored is true, it does nothing even if the environment variable exists.
Ignored *bool `protobuf:"varint,4,opt,name=ignored,proto3,oneof" json:"ignored,omitempty"`
}
func (x *EnvVarOption) Reset() {
*x = EnvVarOption{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[12]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *EnvVarOption) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*EnvVarOption) ProtoMessage() {}
func (x *EnvVarOption) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[12]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use EnvVarOption.ProtoReflect.Descriptor instead.
func (*EnvVarOption) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{12}
}
func (x *EnvVarOption) GetAlternate() string {
if x != nil && x.Alternate != nil {
return *x.Alternate
}
return ""
}
func (x *EnvVarOption) GetDefault() string {
if x != nil && x.Default != nil {
return *x.Default
}
return ""
}
func (x *EnvVarOption) GetRequired() bool {
if x != nil && x.Required != nil {
return *x.Required
}
return false
}
func (x *EnvVarOption) GetIgnored() bool {
if x != nil && x.Ignored != nil {
return *x.Ignored
}
return false
}
type MethodRule struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// the time to timeout. If the specified time period elapses, DEADLINE_EXCEEDED status is returned.
// If you want to handle this error, you need to implement a custom error handler in Go.
// The format is the same as Go's time.Duration format. See https://pkg.go.dev/time#ParseDuration.
Timeout *string `protobuf:"bytes,1,opt,name=timeout,proto3,oneof" json:"timeout,omitempty"`
// response specify the name of the message you want to use to create the response value.
// If you specify a reserved type like `google.protobuf.Empty` as the response, you cannot define gRPC Federation options.
// In such cases, you can specify a separate message to create the response value.
// The specified response message must contain fields with the same names and types as all the fields in the original response.
Response *string `protobuf:"bytes,2,opt,name=response,proto3,oneof" json:"response,omitempty"`
}
func (x *MethodRule) Reset() {
*x = MethodRule{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[13]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *MethodRule) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*MethodRule) ProtoMessage() {}
func (x *MethodRule) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[13]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use MethodRule.ProtoReflect.Descriptor instead.
func (*MethodRule) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{13}
}
func (x *MethodRule) GetTimeout() string {
if x != nil && x.Timeout != nil {
return *x.Timeout
}
return ""
}
func (x *MethodRule) GetResponse() string {
if x != nil && x.Response != nil {
return *x.Response
}
return ""
}
// MessageRule define gRPC Federation rules for the message.
type MessageRule struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// def specify variables to be used in field binding by `grpc.federation.field` option.
Def []*VariableDefinition `protobuf:"bytes,1,rep,name=def,proto3" json:"def,omitempty"`
// if custom_resolver is true, the resolver for this message is implemented by Go.
// If there are any values retrieved by resolver or messages, they are passed as arguments for custom resolver.
// Each field of the message returned by the custom resolver is automatically bound.
// If you want to change the binding process for a particular field, set `custom_resolver=true` option for that field.
CustomResolver *bool `protobuf:"varint,2,opt,name=custom_resolver,json=customResolver,proto3,oneof" json:"custom_resolver,omitempty"`
// alias mapping between messages defined in other packages and messages defined on the federation service side.
// The alias is the FQDN ( . ) to the message.
// If this definition exists, type conversion is automatically performed before the field assignment operation.
// If a message with this option has a field that is not present in the message specified by alias, and the alias option is not specified for that field, an error is occurred.
// You can specify multiple aliases. In that case, only fields common to all aliases will be considered.
// Specifying a field that is not included in either alias will result in an error.
Alias []string `protobuf:"bytes,3,rep,name=alias,proto3" json:"alias,omitempty"`
}
func (x *MessageRule) Reset() {
*x = MessageRule{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[14]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *MessageRule) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*MessageRule) ProtoMessage() {}
func (x *MessageRule) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[14]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use MessageRule.ProtoReflect.Descriptor instead.
func (*MessageRule) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{14}
}
func (x *MessageRule) GetDef() []*VariableDefinition {
if x != nil {
return x.Def
}
return nil
}
func (x *MessageRule) GetCustomResolver() bool {
if x != nil && x.CustomResolver != nil {
return *x.CustomResolver
}
return false
}
func (x *MessageRule) GetAlias() []string {
if x != nil {
return x.Alias
}
return nil
}
// VariableDefinition represents variable definition.
type VariableDefinition struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// name is a variable name.
// This name can be referenced in all CELs defined after itself in the same message.
// It can also be referenced in `grpc.federation.field` option.
Name *string `protobuf:"bytes,1,opt,name=name,proto3,oneof" json:"name,omitempty"`
// if specify the condition for evaluating expr.
// this value evaluated by CEL and it must return a boolean value.
// If the result of evaluation is `false`, the value assigned to name is the default value of the result of evaluation of `expr`.
If *string `protobuf:"bytes,2,opt,name=if,proto3,oneof" json:"if,omitempty"`
// autobind if the result value of `expr` is a message type,
// the value of a field with the same name and type as the field name of its own message is automatically assigned to the value of the field in the message.
// If multiple autobinds are used at the same message,
// you must explicitly use the `grpc.federation.field` option to do the binding yourself, since duplicate field names cannot be correctly determined as one.
Autobind *bool `protobuf:"varint,3,opt,name=autobind,proto3,oneof" json:"autobind,omitempty"`
// expr specify the value to be assigned to name.
//
// Types that are assignable to Expr:
//
// *VariableDefinition_By
// *VariableDefinition_Map
// *VariableDefinition_Message
// *VariableDefinition_Call
// *VariableDefinition_Validation
// *VariableDefinition_Enum
// *VariableDefinition_Switch
Expr isVariableDefinition_Expr `protobuf_oneof:"expr"`
}
func (x *VariableDefinition) Reset() {
*x = VariableDefinition{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[15]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *VariableDefinition) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*VariableDefinition) ProtoMessage() {}
func (x *VariableDefinition) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[15]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use VariableDefinition.ProtoReflect.Descriptor instead.
func (*VariableDefinition) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{15}
}
func (x *VariableDefinition) GetName() string {
if x != nil && x.Name != nil {
return *x.Name
}
return ""
}
func (x *VariableDefinition) GetIf() string {
if x != nil && x.If != nil {
return *x.If
}
return ""
}
func (x *VariableDefinition) GetAutobind() bool {
if x != nil && x.Autobind != nil {
return *x.Autobind
}
return false
}
func (m *VariableDefinition) GetExpr() isVariableDefinition_Expr {
if m != nil {
return m.Expr
}
return nil
}
func (x *VariableDefinition) GetBy() string {
if x, ok := x.GetExpr().(*VariableDefinition_By); ok {
return x.By
}
return ""
}
func (x *VariableDefinition) GetMap() *MapExpr {
if x, ok := x.GetExpr().(*VariableDefinition_Map); ok {
return x.Map
}
return nil
}
func (x *VariableDefinition) GetMessage() *MessageExpr {
if x, ok := x.GetExpr().(*VariableDefinition_Message); ok {
return x.Message
}
return nil
}
func (x *VariableDefinition) GetCall() *CallExpr {
if x, ok := x.GetExpr().(*VariableDefinition_Call); ok {
return x.Call
}
return nil
}
func (x *VariableDefinition) GetValidation() *ValidationExpr {
if x, ok := x.GetExpr().(*VariableDefinition_Validation); ok {
return x.Validation
}
return nil
}
func (x *VariableDefinition) GetEnum() *EnumExpr {
if x, ok := x.GetExpr().(*VariableDefinition_Enum); ok {
return x.Enum
}
return nil
}
func (x *VariableDefinition) GetSwitch() *SwitchExpr {
if x, ok := x.GetExpr().(*VariableDefinition_Switch); ok {
return x.Switch
}
return nil
}
type isVariableDefinition_Expr interface {
isVariableDefinition_Expr()
}
type VariableDefinition_By struct {
// `by` evaluates with CEL.
By string `protobuf:"bytes,11,opt,name=by,proto3,oneof"`
}
type VariableDefinition_Map struct {
// map apply map operation for the specified repeated type.
Map *MapExpr `protobuf:"bytes,12,opt,name=map,proto3,oneof"`
}
type VariableDefinition_Message struct {
// message gets with message arguments.
Message *MessageExpr `protobuf:"bytes,13,opt,name=message,proto3,oneof"`
}
type VariableDefinition_Call struct {
// call specifies how to call gRPC method.
Call *CallExpr `protobuf:"bytes,14,opt,name=call,proto3,oneof"`
}
type VariableDefinition_Validation struct {
// validation defines the validation rule and error.
Validation *ValidationExpr `protobuf:"bytes,15,opt,name=validation,proto3,oneof"`
}
type VariableDefinition_Enum struct {
// enum gets with cel value.
Enum *EnumExpr `protobuf:"bytes,16,opt,name=enum,proto3,oneof"`
}
type VariableDefinition_Switch struct {
// switch provides conditional evaluation with multiple branches.
Switch *SwitchExpr `protobuf:"bytes,17,opt,name=switch,proto3,oneof"`
}
func (*VariableDefinition_By) isVariableDefinition_Expr() {}
func (*VariableDefinition_Map) isVariableDefinition_Expr() {}
func (*VariableDefinition_Message) isVariableDefinition_Expr() {}
func (*VariableDefinition_Call) isVariableDefinition_Expr() {}
func (*VariableDefinition_Validation) isVariableDefinition_Expr() {}
func (*VariableDefinition_Enum) isVariableDefinition_Expr() {}
func (*VariableDefinition_Switch) isVariableDefinition_Expr() {}
// MapExpr apply map operation for the specified repeated type.
type MapExpr struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// iterator define iterator variable.
// When evaluating CEL in `expr`, we can refer to the name defined in iterator.
Iterator *Iterator `protobuf:"bytes,1,opt,name=iterator,proto3" json:"iterator,omitempty"`
// expr creates map elements using iterator variable.
//
// Types that are assignable to Expr:
//
// *MapExpr_By
// *MapExpr_Message
// *MapExpr_Enum
Expr isMapExpr_Expr `protobuf_oneof:"expr"`
}
func (x *MapExpr) Reset() {
*x = MapExpr{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[16]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *MapExpr) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*MapExpr) ProtoMessage() {}
func (x *MapExpr) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[16]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use MapExpr.ProtoReflect.Descriptor instead.
func (*MapExpr) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{16}
}
func (x *MapExpr) GetIterator() *Iterator {
if x != nil {
return x.Iterator
}
return nil
}
func (m *MapExpr) GetExpr() isMapExpr_Expr {
if m != nil {
return m.Expr
}
return nil
}
func (x *MapExpr) GetBy() string {
if x, ok := x.GetExpr().(*MapExpr_By); ok {
return x.By
}
return ""
}
func (x *MapExpr) GetMessage() *MessageExpr {
if x, ok := x.GetExpr().(*MapExpr_Message); ok {
return x.Message
}
return nil
}
func (x *MapExpr) GetEnum() *EnumExpr {
if x, ok := x.GetExpr().(*MapExpr_Enum); ok {
return x.Enum
}
return nil
}
type isMapExpr_Expr interface {
isMapExpr_Expr()
}
type MapExpr_By struct {
// `by` evaluates with CEL.
// this can refer to the variable declared by `iterator`.
By string `protobuf:"bytes,11,opt,name=by,proto3,oneof"`
}
type MapExpr_Message struct {
// message gets with message arguments, and it is made an element of the map.
// The result type of MapExpr is the repeated type of the specified message.
Message *MessageExpr `protobuf:"bytes,12,opt,name=message,proto3,oneof"`
}
type MapExpr_Enum struct {
// enum creates enum value for each element of the map.
// The result type of MapExpr is the repeated type of the specified enum.
Enum *EnumExpr `protobuf:"bytes,13,opt,name=enum,proto3,oneof"`
}
func (*MapExpr_By) isMapExpr_Expr() {}
func (*MapExpr_Message) isMapExpr_Expr() {}
func (*MapExpr_Enum) isMapExpr_Expr() {}
// Iterator represents iterator variable.
type Iterator struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// variable name.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// src the value that will be the source for creating the iterator.
// src must be a repeated type.
Src string `protobuf:"bytes,2,opt,name=src,proto3" json:"src,omitempty"`
}
func (x *Iterator) Reset() {
*x = Iterator{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[17]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Iterator) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Iterator) ProtoMessage() {}
func (x *Iterator) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[17]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Iterator.ProtoReflect.Descriptor instead.
func (*Iterator) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{17}
}
func (x *Iterator) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *Iterator) GetSrc() string {
if x != nil {
return x.Src
}
return ""
}
// MessageExpr represents dependent message.
type MessageExpr struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// name specify the message name by FQDN. format is `.`.
// can be omitted when referring to messages in the same package.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// args specify the parameters needed to get the message. This is called the "message arguments".
Args []*Argument `protobuf:"bytes,2,rep,name=args,proto3" json:"args,omitempty"`
}
func (x *MessageExpr) Reset() {
*x = MessageExpr{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[18]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *MessageExpr) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*MessageExpr) ProtoMessage() {}
func (x *MessageExpr) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[18]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use MessageExpr.ProtoReflect.Descriptor instead.
func (*MessageExpr) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{18}
}
func (x *MessageExpr) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *MessageExpr) GetArgs() []*Argument {
if x != nil {
return x.Args
}
return nil
}
// EnumExpr represents dependent enum.
type EnumExpr struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// name specify the enum name by FQDN. format is `.`.
// can be omitted when referring to enum in the same package.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// `by` evaluates with CEL.
By string `protobuf:"bytes,2,opt,name=by,proto3" json:"by,omitempty"`
}
func (x *EnumExpr) Reset() {
*x = EnumExpr{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[19]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *EnumExpr) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*EnumExpr) ProtoMessage() {}
func (x *EnumExpr) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[19]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use EnumExpr.ProtoReflect.Descriptor instead.
func (*EnumExpr) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{19}
}
func (x *EnumExpr) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *EnumExpr) GetBy() string {
if x != nil {
return x.By
}
return ""
}
// CallExpr represents how to call gRPC method.
type CallExpr struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// method specify the FQDN for the gRPC method. format is `./`.
Method string `protobuf:"bytes,1,opt,name=method,proto3" json:"method,omitempty"`
// request specify request parameters for the gRPC method.
Request []*MethodRequest `protobuf:"bytes,2,rep,name=request,proto3" json:"request,omitempty"`
// the time to timeout. If the specified time period elapses, DEADLINE_EXCEEDED status is returned.
// If you want to handle this error, you need to implement a custom error handler in Go.
// The format is the same as Go's time.Duration format. See https://pkg.go.dev/time#ParseDuration.
Timeout *string `protobuf:"bytes,3,opt,name=timeout,proto3,oneof" json:"timeout,omitempty"`
// retry specifies the retry policy if the method call fails.
Retry *RetryPolicy `protobuf:"bytes,4,opt,name=retry,proto3,oneof" json:"retry,omitempty"`
// error evaluated when an error occurs during a method call.
// Multiple errors can be defined and are evaluated in the order in which they are described.
// If an error occurs while creating an gRPC status error, original error will be returned.
Error []*GRPCError `protobuf:"bytes,5,rep,name=error,proto3" json:"error,omitempty"`
// option is the gRPC's call option (https://pkg.go.dev/google.golang.org/grpc#CallOption).
Option *GRPCCallOption `protobuf:"bytes,6,opt,name=option,proto3,oneof" json:"option,omitempty"`
// metadata specify outgoing metadata with CEL value.
// The specified type must always be of type map.
Metadata *string `protobuf:"bytes,7,opt,name=metadata,proto3,oneof" json:"metadata,omitempty"`
}
func (x *CallExpr) Reset() {
*x = CallExpr{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[20]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *CallExpr) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CallExpr) ProtoMessage() {}
func (x *CallExpr) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[20]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use CallExpr.ProtoReflect.Descriptor instead.
func (*CallExpr) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{20}
}
func (x *CallExpr) GetMethod() string {
if x != nil {
return x.Method
}
return ""
}
func (x *CallExpr) GetRequest() []*MethodRequest {
if x != nil {
return x.Request
}
return nil
}
func (x *CallExpr) GetTimeout() string {
if x != nil && x.Timeout != nil {
return *x.Timeout
}
return ""
}
func (x *CallExpr) GetRetry() *RetryPolicy {
if x != nil {
return x.Retry
}
return nil
}
func (x *CallExpr) GetError() []*GRPCError {
if x != nil {
return x.Error
}
return nil
}
func (x *CallExpr) GetOption() *GRPCCallOption {
if x != nil {
return x.Option
}
return nil
}
func (x *CallExpr) GetMetadata() string {
if x != nil && x.Metadata != nil {
return *x.Metadata
}
return ""
}
// SwitchExpr represents a switch statement. At least one "case", and "default", must be defined. All
// case.if expressions must evaluate to a boolean value. All case.by expressions, and default.by, must
// evaluate to the same type (the return type of the switch).
//
// When executed, the case.if expressions are evaluated in order, and, for the first case whose
// case.if expression evaluates to true, its case.by is evaluated to make the return value of the
// SwitchExpr.
// If no case.if evaluates to true, default.by is evaluated to make the return value.
type SwitchExpr struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Cases for the switch expression.
Case []*SwitchCaseExpr `protobuf:"bytes,1,rep,name=case,proto3" json:"case,omitempty"`
// The default case, if none of the "case.if" expressions evaluate to true.
Default *SwitchDefaultExpr `protobuf:"bytes,2,opt,name=default,proto3" json:"default,omitempty"`
}
func (x *SwitchExpr) Reset() {
*x = SwitchExpr{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[21]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *SwitchExpr) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*SwitchExpr) ProtoMessage() {}
func (x *SwitchExpr) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[21]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use SwitchExpr.ProtoReflect.Descriptor instead.
func (*SwitchExpr) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{21}
}
func (x *SwitchExpr) GetCase() []*SwitchCaseExpr {
if x != nil {
return x.Case
}
return nil
}
func (x *SwitchExpr) GetDefault() *SwitchDefaultExpr {
if x != nil {
return x.Default
}
return nil
}
// SwitchCaseExpr represents a single case for a switch expression.
type SwitchCaseExpr struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// if specify the condition for evaluating expr.
// this value evaluated by CEL and it must return a boolean value.
If string `protobuf:"bytes,1,opt,name=if,proto3" json:"if,omitempty"`
// def define variables in current scope.
Def []*VariableDefinition `protobuf:"bytes,2,rep,name=def,proto3" json:"def,omitempty"`
// expr specify the value to return for the case.
//
// Types that are assignable to Expr:
//
// *SwitchCaseExpr_By
Expr isSwitchCaseExpr_Expr `protobuf_oneof:"expr"`
}
func (x *SwitchCaseExpr) Reset() {
*x = SwitchCaseExpr{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[22]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *SwitchCaseExpr) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*SwitchCaseExpr) ProtoMessage() {}
func (x *SwitchCaseExpr) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[22]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use SwitchCaseExpr.ProtoReflect.Descriptor instead.
func (*SwitchCaseExpr) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{22}
}
func (x *SwitchCaseExpr) GetIf() string {
if x != nil {
return x.If
}
return ""
}
func (x *SwitchCaseExpr) GetDef() []*VariableDefinition {
if x != nil {
return x.Def
}
return nil
}
func (m *SwitchCaseExpr) GetExpr() isSwitchCaseExpr_Expr {
if m != nil {
return m.Expr
}
return nil
}
func (x *SwitchCaseExpr) GetBy() string {
if x, ok := x.GetExpr().(*SwitchCaseExpr_By); ok {
return x.By
}
return ""
}
type isSwitchCaseExpr_Expr interface {
isSwitchCaseExpr_Expr()
}
type SwitchCaseExpr_By struct {
// `by` evaluates with CEL.
By string `protobuf:"bytes,11,opt,name=by,proto3,oneof"`
}
func (*SwitchCaseExpr_By) isSwitchCaseExpr_Expr() {}
// SwitchDefaultExpr represents the default case for a switch expression.
type SwitchDefaultExpr struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// def define variables in current scope.
Def []*VariableDefinition `protobuf:"bytes,1,rep,name=def,proto3" json:"def,omitempty"`
// expr specify the value to return for the default case.
//
// Types that are assignable to Expr:
//
// *SwitchDefaultExpr_By
Expr isSwitchDefaultExpr_Expr `protobuf_oneof:"expr"`
}
func (x *SwitchDefaultExpr) Reset() {
*x = SwitchDefaultExpr{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[23]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *SwitchDefaultExpr) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*SwitchDefaultExpr) ProtoMessage() {}
func (x *SwitchDefaultExpr) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[23]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use SwitchDefaultExpr.ProtoReflect.Descriptor instead.
func (*SwitchDefaultExpr) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{23}
}
func (x *SwitchDefaultExpr) GetDef() []*VariableDefinition {
if x != nil {
return x.Def
}
return nil
}
func (m *SwitchDefaultExpr) GetExpr() isSwitchDefaultExpr_Expr {
if m != nil {
return m.Expr
}
return nil
}
func (x *SwitchDefaultExpr) GetBy() string {
if x, ok := x.GetExpr().(*SwitchDefaultExpr_By); ok {
return x.By
}
return ""
}
type isSwitchDefaultExpr_Expr interface {
isSwitchDefaultExpr_Expr()
}
type SwitchDefaultExpr_By struct {
// `by` evaluates with CEL.
By string `protobuf:"bytes,11,opt,name=by,proto3,oneof"`
}
func (*SwitchDefaultExpr_By) isSwitchDefaultExpr_Expr() {}
// GRPCError create gRPC status value.
type GRPCError struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// def define variables in current scope.
Def []*VariableDefinition `protobuf:"bytes,1,rep,name=def,proto3" json:"def,omitempty"`
// if specifies condition in CEL. If the condition is true, it returns defined error information.
// If this field is omitted, it is always treated as 'true' and returns defined error information.
// The return value must always be of type boolean.
If *string `protobuf:"bytes,2,opt,name=if,proto3,oneof" json:"if,omitempty"`
// code is a gRPC status code.
Code *code.Code `protobuf:"varint,3,opt,name=code,proto3,enum=google.rpc.Code,oneof" json:"code,omitempty"`
// message is a gRPC status message.
// If omitted, the message will be auto-generated from the configurations.
Message *string `protobuf:"bytes,4,opt,name=message,proto3,oneof" json:"message,omitempty"`
// details is a list of error details.
// If returns error, the corresponding error details are set.
Details []*GRPCErrorDetail `protobuf:"bytes,5,rep,name=details,proto3" json:"details,omitempty"`
// ignore ignore the error if the condition in the "if" field is true and "ignore" field is set to true.
// When an error is ignored, the returned response is always null value.
// If you want to return a response that is not null, please use `ignore_and_response` feature.
// Therefore, `ignore` and `ignore_and_response` cannot be specified same.
Ignore *bool `protobuf:"varint,6,opt,name=ignore,proto3,oneof" json:"ignore,omitempty"`
// ignore_and_response ignore the error if the condition in the "if" field is true and it returns response specified in CEL.
// The evaluation value of CEL must always be the same as the response message type.
// `ignore` and `ignore_and_response` cannot be specified same.
IgnoreAndResponse *string `protobuf:"bytes,7,opt,name=ignore_and_response,json=ignoreAndResponse,proto3,oneof" json:"ignore_and_response,omitempty"`
// log_level can be configured to output logs as any log level.
// If DEBUG is specified for the log_level, logs are output as debug logs.
// default value is ERROR.
LogLevel *GRPCError_LogLevel `protobuf:"varint,8,opt,name=log_level,json=logLevel,proto3,enum=grpc.federation.GRPCError_LogLevel,oneof" json:"log_level,omitempty"`
}
func (x *GRPCError) Reset() {
*x = GRPCError{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[24]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GRPCError) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GRPCError) ProtoMessage() {}
func (x *GRPCError) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[24]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GRPCError.ProtoReflect.Descriptor instead.
func (*GRPCError) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{24}
}
func (x *GRPCError) GetDef() []*VariableDefinition {
if x != nil {
return x.Def
}
return nil
}
func (x *GRPCError) GetIf() string {
if x != nil && x.If != nil {
return *x.If
}
return ""
}
func (x *GRPCError) GetCode() code.Code {
if x != nil && x.Code != nil {
return *x.Code
}
return code.Code(0)
}
func (x *GRPCError) GetMessage() string {
if x != nil && x.Message != nil {
return *x.Message
}
return ""
}
func (x *GRPCError) GetDetails() []*GRPCErrorDetail {
if x != nil {
return x.Details
}
return nil
}
func (x *GRPCError) GetIgnore() bool {
if x != nil && x.Ignore != nil {
return *x.Ignore
}
return false
}
func (x *GRPCError) GetIgnoreAndResponse() string {
if x != nil && x.IgnoreAndResponse != nil {
return *x.IgnoreAndResponse
}
return ""
}
func (x *GRPCError) GetLogLevel() GRPCError_LogLevel {
if x != nil && x.LogLevel != nil {
return *x.LogLevel
}
return GRPCError_UNKNOWN
}
type GRPCErrorDetail struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// if specifies condition rule in CEL. If the condition is true, gRPC error detail is added to the error.
If string `protobuf:"bytes,1,opt,name=if,proto3" json:"if,omitempty"`
// def define variables in current scope.
Def []*VariableDefinition `protobuf:"bytes,2,rep,name=def,proto3" json:"def,omitempty"`
// message represents arbitrary messages to describe the detail of the error.
Message []*MessageExpr `protobuf:"bytes,3,rep,name=message,proto3" json:"message,omitempty"`
// error_info describes the cause of the error with structured details.
ErrorInfo []*errdetails.ErrorInfo `protobuf:"bytes,4,rep,name=error_info,json=errorInfo,proto3" json:"error_info,omitempty"`
// retry_info describes when the clients can retry a failed request.
RetryInfo []*errdetails.RetryInfo `protobuf:"bytes,5,rep,name=retry_info,json=retryInfo,proto3" json:"retry_info,omitempty"`
// debug_info describes additional debugging info.
DebugInfo []*errdetails.DebugInfo `protobuf:"bytes,6,rep,name=debug_info,json=debugInfo,proto3" json:"debug_info,omitempty"`
// quota_failure describes how a quota check failed.
QuotaFailure []*errdetails.QuotaFailure `protobuf:"bytes,7,rep,name=quota_failure,json=quotaFailure,proto3" json:"quota_failure,omitempty"`
// precondition_failure describes what preconditions have failed.
PreconditionFailure []*errdetails.PreconditionFailure `protobuf:"bytes,8,rep,name=precondition_failure,json=preconditionFailure,proto3" json:"precondition_failure,omitempty"`
// bad_request describes violations in a client request.
BadRequest []*errdetails.BadRequest `protobuf:"bytes,9,rep,name=bad_request,json=badRequest,proto3" json:"bad_request,omitempty"`
// request_info contains metadata about the request that clients can attach.
RequestInfo []*errdetails.RequestInfo `protobuf:"bytes,10,rep,name=request_info,json=requestInfo,proto3" json:"request_info,omitempty"`
// resource_info describes the resource that is being accessed.
ResourceInfo []*errdetails.ResourceInfo `protobuf:"bytes,11,rep,name=resource_info,json=resourceInfo,proto3" json:"resource_info,omitempty"`
// help provides links to documentation or for performing an out of band action.
Help []*errdetails.Help `protobuf:"bytes,12,rep,name=help,proto3" json:"help,omitempty"`
// localized_message provides a localized error message that is safe to return to the user.
LocalizedMessage []*errdetails.LocalizedMessage `protobuf:"bytes,13,rep,name=localized_message,json=localizedMessage,proto3" json:"localized_message,omitempty"`
// by specify a message in CEL to express the details of the error.
By []string `protobuf:"bytes,14,rep,name=by,proto3" json:"by,omitempty"`
}
func (x *GRPCErrorDetail) Reset() {
*x = GRPCErrorDetail{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[25]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GRPCErrorDetail) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GRPCErrorDetail) ProtoMessage() {}
func (x *GRPCErrorDetail) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[25]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GRPCErrorDetail.ProtoReflect.Descriptor instead.
func (*GRPCErrorDetail) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{25}
}
func (x *GRPCErrorDetail) GetIf() string {
if x != nil {
return x.If
}
return ""
}
func (x *GRPCErrorDetail) GetDef() []*VariableDefinition {
if x != nil {
return x.Def
}
return nil
}
func (x *GRPCErrorDetail) GetMessage() []*MessageExpr {
if x != nil {
return x.Message
}
return nil
}
func (x *GRPCErrorDetail) GetErrorInfo() []*errdetails.ErrorInfo {
if x != nil {
return x.ErrorInfo
}
return nil
}
func (x *GRPCErrorDetail) GetRetryInfo() []*errdetails.RetryInfo {
if x != nil {
return x.RetryInfo
}
return nil
}
func (x *GRPCErrorDetail) GetDebugInfo() []*errdetails.DebugInfo {
if x != nil {
return x.DebugInfo
}
return nil
}
func (x *GRPCErrorDetail) GetQuotaFailure() []*errdetails.QuotaFailure {
if x != nil {
return x.QuotaFailure
}
return nil
}
func (x *GRPCErrorDetail) GetPreconditionFailure() []*errdetails.PreconditionFailure {
if x != nil {
return x.PreconditionFailure
}
return nil
}
func (x *GRPCErrorDetail) GetBadRequest() []*errdetails.BadRequest {
if x != nil {
return x.BadRequest
}
return nil
}
func (x *GRPCErrorDetail) GetRequestInfo() []*errdetails.RequestInfo {
if x != nil {
return x.RequestInfo
}
return nil
}
func (x *GRPCErrorDetail) GetResourceInfo() []*errdetails.ResourceInfo {
if x != nil {
return x.ResourceInfo
}
return nil
}
func (x *GRPCErrorDetail) GetHelp() []*errdetails.Help {
if x != nil {
return x.Help
}
return nil
}
func (x *GRPCErrorDetail) GetLocalizedMessage() []*errdetails.LocalizedMessage {
if x != nil {
return x.LocalizedMessage
}
return nil
}
func (x *GRPCErrorDetail) GetBy() []string {
if x != nil {
return x.By
}
return nil
}
// GRPCCallOption configures a gRPC Call before it starts or extracts information from a gRPC Call after it completes.
type GRPCCallOption struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// set the content-subtype. For example, if content-subtype is "json", the Content-Type over the wire will be "application/grpc+json".
// The content-subtype is converted to lowercase before being included in Content-Type.
// See Content-Type on https://github.com/grpc/grpc/blob/master/doc/PROTOCOL-HTTP2.md#requests for more details.
// If no such codec is found, the call will result in an error with code INTERNAL.
ContentSubtype *string `protobuf:"bytes,1,opt,name=content_subtype,json=contentSubtype,proto3,oneof" json:"content_subtype,omitempty"`
// header retrieves the header metadata for a unary RPC.
// In order to obtain the metadata, you must specify a variable of type map in the header.
// e.g.)
// def [
//
// { name: "hdr" by: "grpc.federation.metadata.new()" }
// { call { method: "pkg.Method" option { header: "hdr" } } }
//
// ]
Header *string `protobuf:"bytes,2,opt,name=header,proto3,oneof" json:"header,omitempty"`
// max_call_recv_msg_size sets the maximum message size in bytes the client can receive.
// If this is not set, gRPC uses the default 4MB.
MaxCallRecvMsgSize *int64 `protobuf:"varint,3,opt,name=max_call_recv_msg_size,json=maxCallRecvMsgSize,proto3,oneof" json:"max_call_recv_msg_size,omitempty"`
// max_call_send_msg_size sets the maximum message size in bytes the client can send.
// If this is not set, gRPC uses the default maximum number of int32 range.
MaxCallSendMsgSize *int64 `protobuf:"varint,4,opt,name=max_call_send_msg_size,json=maxCallSendMsgSize,proto3,oneof" json:"max_call_send_msg_size,omitempty"`
// static_method specifies that a call is being made to a method that is static,
// which means the method is known at compile time and doesn't change at runtime.
// This can be used as a signal to stats plugins that this method is safe to include as a key to a measurement.
StaticMethod *bool `protobuf:"varint,5,opt,name=static_method,json=staticMethod,proto3,oneof" json:"static_method,omitempty"`
// trailer retrieves the trailer metadata for a unary RPC.
// In order to obtain the metadata, you must specify a variable of type map in the trailer.
// e.g.)
// def [
//
// { name: "trl" by: "grpc.federation.metadata.new()" }
// { call { method: "pkg.Method" option { trailer: "trl" } } }
//
// ]
Trailer *string `protobuf:"bytes,6,opt,name=trailer,proto3,oneof" json:"trailer,omitempty"`
// wait_for_ready configures the RPC's behavior when the client is in TRANSIENT_FAILURE,
// which occurs when all addresses fail to connect.
// If wait_for_ready is false, the RPC will fail immediately.
// Otherwise, the client will wait until a connection becomes available or the RPC's deadline is reached.
// By default, RPCs do not "wait for ready".
WaitForReady *bool `protobuf:"varint,7,opt,name=wait_for_ready,json=waitForReady,proto3,oneof" json:"wait_for_ready,omitempty"`
}
func (x *GRPCCallOption) Reset() {
*x = GRPCCallOption{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[26]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GRPCCallOption) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GRPCCallOption) ProtoMessage() {}
func (x *GRPCCallOption) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[26]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GRPCCallOption.ProtoReflect.Descriptor instead.
func (*GRPCCallOption) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{26}
}
func (x *GRPCCallOption) GetContentSubtype() string {
if x != nil && x.ContentSubtype != nil {
return *x.ContentSubtype
}
return ""
}
func (x *GRPCCallOption) GetHeader() string {
if x != nil && x.Header != nil {
return *x.Header
}
return ""
}
func (x *GRPCCallOption) GetMaxCallRecvMsgSize() int64 {
if x != nil && x.MaxCallRecvMsgSize != nil {
return *x.MaxCallRecvMsgSize
}
return 0
}
func (x *GRPCCallOption) GetMaxCallSendMsgSize() int64 {
if x != nil && x.MaxCallSendMsgSize != nil {
return *x.MaxCallSendMsgSize
}
return 0
}
func (x *GRPCCallOption) GetStaticMethod() bool {
if x != nil && x.StaticMethod != nil {
return *x.StaticMethod
}
return false
}
func (x *GRPCCallOption) GetTrailer() string {
if x != nil && x.Trailer != nil {
return *x.Trailer
}
return ""
}
func (x *GRPCCallOption) GetWaitForReady() bool {
if x != nil && x.WaitForReady != nil {
return *x.WaitForReady
}
return false
}
// Validation represents a validation rule against variables defined within the current scope.
type ValidationExpr struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// name is a unique name for the validation.
// If set, the validation error type will be Error.
// If omitted, the validation error type will be ValidationError.
Name *string `protobuf:"bytes,1,opt,name=name,proto3,oneof" json:"name,omitempty"`
// error defines the actual validation rules and an error to returned if the validation fails.
Error *GRPCError `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"`
}
func (x *ValidationExpr) Reset() {
*x = ValidationExpr{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[27]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ValidationExpr) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ValidationExpr) ProtoMessage() {}
func (x *ValidationExpr) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[27]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ValidationExpr.ProtoReflect.Descriptor instead.
func (*ValidationExpr) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{27}
}
func (x *ValidationExpr) GetName() string {
if x != nil && x.Name != nil {
return *x.Name
}
return ""
}
func (x *ValidationExpr) GetError() *GRPCError {
if x != nil {
return x.Error
}
return nil
}
// RetryPolicy define the retry policy if the method call fails.
type RetryPolicy struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Types that are assignable to Policy:
//
// *RetryPolicy_Constant
// *RetryPolicy_Exponential
Policy isRetryPolicy_Policy `protobuf_oneof:"policy"`
// if specifies condition in CEL. If the condition is true, run the retry process according to the policy.
// If this field is omitted, it is always treated as 'true' and run the retry process.
// The return value must always be of type boolean.
If string `protobuf:"bytes,3,opt,name=if,proto3" json:"if,omitempty"`
}
func (x *RetryPolicy) Reset() {
*x = RetryPolicy{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[28]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *RetryPolicy) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*RetryPolicy) ProtoMessage() {}
func (x *RetryPolicy) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[28]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use RetryPolicy.ProtoReflect.Descriptor instead.
func (*RetryPolicy) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{28}
}
func (m *RetryPolicy) GetPolicy() isRetryPolicy_Policy {
if m != nil {
return m.Policy
}
return nil
}
func (x *RetryPolicy) GetConstant() *RetryPolicyConstant {
if x, ok := x.GetPolicy().(*RetryPolicy_Constant); ok {
return x.Constant
}
return nil
}
func (x *RetryPolicy) GetExponential() *RetryPolicyExponential {
if x, ok := x.GetPolicy().(*RetryPolicy_Exponential); ok {
return x.Exponential
}
return nil
}
func (x *RetryPolicy) GetIf() string {
if x != nil {
return x.If
}
return ""
}
type isRetryPolicy_Policy interface {
isRetryPolicy_Policy()
}
type RetryPolicy_Constant struct {
// retry according to the "constant" policy.
Constant *RetryPolicyConstant `protobuf:"bytes,1,opt,name=constant,proto3,oneof"`
}
type RetryPolicy_Exponential struct {
// retry according to the "exponential backoff" policy.
// The following Go library is used in the implementation,
// so please refer to the library documentation for how to specify each parameter.
// https://pkg.go.dev/github.com/cenkalti/backoff/v4#section-readme.
Exponential *RetryPolicyExponential `protobuf:"bytes,2,opt,name=exponential,proto3,oneof"`
}
func (*RetryPolicy_Constant) isRetryPolicy_Policy() {}
func (*RetryPolicy_Exponential) isRetryPolicy_Policy() {}
// RetryPolicyConstant define "constant" based retry policy.
type RetryPolicyConstant struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// interval value. ( default value is 1s ).
Interval *string `protobuf:"bytes,1,opt,name=interval,proto3,oneof" json:"interval,omitempty"`
// max retry count. ( default value is 5. If zero is specified, it never stops )
MaxRetries *uint64 `protobuf:"varint,2,opt,name=max_retries,json=maxRetries,proto3,oneof" json:"max_retries,omitempty"`
}
func (x *RetryPolicyConstant) Reset() {
*x = RetryPolicyConstant{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[29]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *RetryPolicyConstant) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*RetryPolicyConstant) ProtoMessage() {}
func (x *RetryPolicyConstant) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[29]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use RetryPolicyConstant.ProtoReflect.Descriptor instead.
func (*RetryPolicyConstant) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{29}
}
func (x *RetryPolicyConstant) GetInterval() string {
if x != nil && x.Interval != nil {
return *x.Interval
}
return ""
}
func (x *RetryPolicyConstant) GetMaxRetries() uint64 {
if x != nil && x.MaxRetries != nil {
return *x.MaxRetries
}
return 0
}
// RetryPolicyExponential define "exponential backoff" based retry policy.
type RetryPolicyExponential struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// initial interval value. ( default value is "500ms" ).
InitialInterval *string `protobuf:"bytes,1,opt,name=initial_interval,json=initialInterval,proto3,oneof" json:"initial_interval,omitempty"`
// randomization factor value. ( default value is 0.5 ).
RandomizationFactor *float64 `protobuf:"fixed64,2,opt,name=randomization_factor,json=randomizationFactor,proto3,oneof" json:"randomization_factor,omitempty"`
// multiplier. ( default value is 1.5 ).
Multiplier *float64 `protobuf:"fixed64,3,opt,name=multiplier,proto3,oneof" json:"multiplier,omitempty"`
// max interval value. ( default value is "60s" ).
MaxInterval *string `protobuf:"bytes,4,opt,name=max_interval,json=maxInterval,proto3,oneof" json:"max_interval,omitempty"`
// max retry count. ( default value is 5. If zero is specified, it never stops ).
MaxRetries *uint64 `protobuf:"varint,5,opt,name=max_retries,json=maxRetries,proto3,oneof" json:"max_retries,omitempty"`
}
func (x *RetryPolicyExponential) Reset() {
*x = RetryPolicyExponential{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[30]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *RetryPolicyExponential) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*RetryPolicyExponential) ProtoMessage() {}
func (x *RetryPolicyExponential) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[30]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use RetryPolicyExponential.ProtoReflect.Descriptor instead.
func (*RetryPolicyExponential) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{30}
}
func (x *RetryPolicyExponential) GetInitialInterval() string {
if x != nil && x.InitialInterval != nil {
return *x.InitialInterval
}
return ""
}
func (x *RetryPolicyExponential) GetRandomizationFactor() float64 {
if x != nil && x.RandomizationFactor != nil {
return *x.RandomizationFactor
}
return 0
}
func (x *RetryPolicyExponential) GetMultiplier() float64 {
if x != nil && x.Multiplier != nil {
return *x.Multiplier
}
return 0
}
func (x *RetryPolicyExponential) GetMaxInterval() string {
if x != nil && x.MaxInterval != nil {
return *x.MaxInterval
}
return ""
}
func (x *RetryPolicyExponential) GetMaxRetries() uint64 {
if x != nil && x.MaxRetries != nil {
return *x.MaxRetries
}
return 0
}
// MethodRequest define parameters to be used for gRPC method request.
type MethodRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// field name of the request message.
Field string `protobuf:"bytes,1,opt,name=field,proto3" json:"field,omitempty"`
// by used to refer to a name or message argument defined in a MessageRule, use `$.` to refer to the message argument.
// Use CEL (https://github.com/google/cel-spec) to evaluate the expression.
// Variables are already defined in MessageRule can be used.
By *string `protobuf:"bytes,2,opt,name=by,proto3,oneof" json:"by,omitempty"`
// if describes the condition to be assigned to field.
// The return value must be of type bool.
// Use CEL (https://github.com/google/cel-spec) to evaluate the expression.
// Variables are already defined in MessageRule can be used.
// If the field is a 'oneof' field, it must be specified.
If *string `protobuf:"bytes,3,opt,name=if,proto3,oneof" json:"if,omitempty"`
}
func (x *MethodRequest) Reset() {
*x = MethodRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[31]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *MethodRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*MethodRequest) ProtoMessage() {}
func (x *MethodRequest) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[31]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use MethodRequest.ProtoReflect.Descriptor instead.
func (*MethodRequest) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{31}
}
func (x *MethodRequest) GetField() string {
if x != nil {
return x.Field
}
return ""
}
func (x *MethodRequest) GetBy() string {
if x != nil && x.By != nil {
return *x.By
}
return ""
}
func (x *MethodRequest) GetIf() string {
if x != nil && x.If != nil {
return *x.If
}
return ""
}
// MethodResponse define which value of the method response is referenced.
type MethodResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// name specify the unique name that can be used in a `MessageRule` / `FieldRule` for the same message for a specific field in the response.
Name *string `protobuf:"bytes,1,opt,name=name,proto3,oneof" json:"name,omitempty"`
// field name in response message.
Field *string `protobuf:"bytes,2,opt,name=field,proto3,oneof" json:"field,omitempty"`
// autobind if the value referenced by `field` is a message type,
// the value of a field with the same name and type as the field name of its own message is automatically assigned to the value of the field in the message.
// If multiple autobinds are used at the same message,
// you must explicitly use the `grpc.federation.field` option to do the binding yourself, since duplicate field names cannot be correctly determined as one.
Autobind *bool `protobuf:"varint,3,opt,name=autobind,proto3,oneof" json:"autobind,omitempty"`
}
func (x *MethodResponse) Reset() {
*x = MethodResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[32]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *MethodResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*MethodResponse) ProtoMessage() {}
func (x *MethodResponse) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[32]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use MethodResponse.ProtoReflect.Descriptor instead.
func (*MethodResponse) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{32}
}
func (x *MethodResponse) GetName() string {
if x != nil && x.Name != nil {
return *x.Name
}
return ""
}
func (x *MethodResponse) GetField() string {
if x != nil && x.Field != nil {
return *x.Field
}
return ""
}
func (x *MethodResponse) GetAutobind() bool {
if x != nil && x.Autobind != nil {
return *x.Autobind
}
return false
}
// Argument define message argument.
type Argument struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// name of the message argument.
// Use this name to refer to the message argument.
// For example, if `foo` is specified as the name, it is referenced by `$.foo`.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// by used to refer to a name or message argument defined in a MessageRule, use `$.` to refer to the message argument.
// Use CEL (https://github.com/google/cel-spec) to evaluate the expression.
// Variables are already defined in MessageRule can be used.
By *string `protobuf:"bytes,2,opt,name=by,proto3,oneof" json:"by,omitempty"`
// inline like by, it refers to the specified value and expands all fields beyond it.
// For this reason, the referenced value must always be of message type.
Inline *string `protobuf:"bytes,3,opt,name=inline,proto3,oneof" json:"inline,omitempty"`
}
func (x *Argument) Reset() {
*x = Argument{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[33]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Argument) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Argument) ProtoMessage() {}
func (x *Argument) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[33]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Argument.ProtoReflect.Descriptor instead.
func (*Argument) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{33}
}
func (x *Argument) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *Argument) GetBy() string {
if x != nil && x.By != nil {
return *x.By
}
return ""
}
func (x *Argument) GetInline() string {
if x != nil && x.Inline != nil {
return *x.Inline
}
return ""
}
// FieldRule define gRPC Federation rules for the field of message.
type FieldRule struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// If custom_resolver is true, the field binding process is to be implemented in Go.
// If there are any values retrieved by grpc.federation.message option, they are passed as arguments for custom resolver.
CustomResolver *bool `protobuf:"varint,1,opt,name=custom_resolver,json=customResolver,proto3,oneof" json:"custom_resolver,omitempty"`
// by used to refer to a name or message argument defined in a MessageRule, use `$.` to refer to the message argument.
// Use CEL (https://github.com/google/cel-spec) to evaluate the expression.
// Variables are already defined in MessageRule can be used.
By *string `protobuf:"bytes,2,opt,name=by,proto3,oneof" json:"by,omitempty"`
// alias can be used when alias is specified in grpc.federation.message option,
// and specifies the field name to be referenced among the messages specified in alias of message option.
// If the specified field has the same type or can be converted automatically, its value is assigned.
Alias *string `protobuf:"bytes,3,opt,name=alias,proto3,oneof" json:"alias,omitempty"`
// use to evaluate any one of fields. this field only available in oneof.
Oneof *FieldOneof `protobuf:"bytes,4,opt,name=oneof,proto3" json:"oneof,omitempty"`
// when defining an environment variable, use it for fields where you want to set additional options.
Env *EnvVarOption `protobuf:"bytes,5,opt,name=env,proto3" json:"env,omitempty"`
}
func (x *FieldRule) Reset() {
*x = FieldRule{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[34]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *FieldRule) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*FieldRule) ProtoMessage() {}
func (x *FieldRule) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[34]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use FieldRule.ProtoReflect.Descriptor instead.
func (*FieldRule) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{34}
}
func (x *FieldRule) GetCustomResolver() bool {
if x != nil && x.CustomResolver != nil {
return *x.CustomResolver
}
return false
}
func (x *FieldRule) GetBy() string {
if x != nil && x.By != nil {
return *x.By
}
return ""
}
func (x *FieldRule) GetAlias() string {
if x != nil && x.Alias != nil {
return *x.Alias
}
return ""
}
func (x *FieldRule) GetOneof() *FieldOneof {
if x != nil {
return x.Oneof
}
return nil
}
func (x *FieldRule) GetEnv() *EnvVarOption {
if x != nil {
return x.Env
}
return nil
}
// FieldOneof evaluate "messages" or other field only if expr is true and assign to the oneof field.
// This feature only available in oneof.
type FieldOneof struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// cond specify either `expr` or `default`. Only one `default` can be set per oneof.
//
// Types that are assignable to Cond:
//
// *FieldOneof_If
// *FieldOneof_Default
Cond isFieldOneof_Cond `protobuf_oneof:"cond"`
// def specify variables to be used in current oneof field's scope for field binding.
Def []*VariableDefinition `protobuf:"bytes,3,rep,name=def,proto3" json:"def,omitempty"`
// by used to refer to a name or message argument defined in a MessageRule, use `$.` to refer to the message argument.
// Use CEL (https://github.com/google/cel-spec) to evaluate the expression.
// Variables are already defined in MessageRule and FieldOneOf can be used.
By string `protobuf:"bytes,4,opt,name=by,proto3" json:"by,omitempty"`
}
func (x *FieldOneof) Reset() {
*x = FieldOneof{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[35]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *FieldOneof) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*FieldOneof) ProtoMessage() {}
func (x *FieldOneof) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[35]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use FieldOneof.ProtoReflect.Descriptor instead.
func (*FieldOneof) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{35}
}
func (m *FieldOneof) GetCond() isFieldOneof_Cond {
if m != nil {
return m.Cond
}
return nil
}
func (x *FieldOneof) GetIf() string {
if x, ok := x.GetCond().(*FieldOneof_If); ok {
return x.If
}
return ""
}
func (x *FieldOneof) GetDefault() bool {
if x, ok := x.GetCond().(*FieldOneof_Default); ok {
return x.Default
}
return false
}
func (x *FieldOneof) GetDef() []*VariableDefinition {
if x != nil {
return x.Def
}
return nil
}
func (x *FieldOneof) GetBy() string {
if x != nil {
return x.By
}
return ""
}
type isFieldOneof_Cond interface {
isFieldOneof_Cond()
}
type FieldOneof_If struct {
// if describes the condition to be assigned to field.
// The return value must be of type bool.
// Use CEL (https://github.com/google/cel-spec) to evaluate the expression.
// Variables are already defined in MessageRule can be used.
If string `protobuf:"bytes,1,opt,name=if,proto3,oneof"`
}
type FieldOneof_Default struct {
// default used to assign a value when none of the other fields match any of the specified expressions.
// Only one value can be defined per oneof.
Default bool `protobuf:"varint,2,opt,name=default,proto3,oneof"`
}
func (*FieldOneof_If) isFieldOneof_Cond() {}
func (*FieldOneof_Default) isFieldOneof_Cond() {}
// CELPlugin define schema of CEL plugin.
type CELPlugin struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Export []*CELPluginExport `protobuf:"bytes,1,rep,name=export,proto3" json:"export,omitempty"`
}
func (x *CELPlugin) Reset() {
*x = CELPlugin{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[36]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *CELPlugin) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CELPlugin) ProtoMessage() {}
func (x *CELPlugin) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[36]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use CELPlugin.ProtoReflect.Descriptor instead.
func (*CELPlugin) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{36}
}
func (x *CELPlugin) GetExport() []*CELPluginExport {
if x != nil {
return x.Export
}
return nil
}
// CELPluginExport describe the schema to be exposed as a CEL plugin.
type CELPluginExport struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// name is the plugin name.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// desc is the description of plugin.
// This description is used as documentation at code generation.
Desc string `protobuf:"bytes,2,opt,name=desc,proto3" json:"desc,omitempty"`
// types describe the message type you want to expose.
Types []*CELReceiverType `protobuf:"bytes,3,rep,name=types,proto3" json:"types,omitempty"`
// functions describe the definition of the function you want to expose.
Functions []*CELFunction `protobuf:"bytes,4,rep,name=functions,proto3" json:"functions,omitempty"`
// variables describe the definition of the variable you want to expose.
Variables []*CELVariable `protobuf:"bytes,5,rep,name=variables,proto3" json:"variables,omitempty"`
Capability *CELPluginCapability `protobuf:"bytes,6,opt,name=capability,proto3" json:"capability,omitempty"`
}
func (x *CELPluginExport) Reset() {
*x = CELPluginExport{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[37]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *CELPluginExport) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CELPluginExport) ProtoMessage() {}
func (x *CELPluginExport) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[37]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use CELPluginExport.ProtoReflect.Descriptor instead.
func (*CELPluginExport) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{37}
}
func (x *CELPluginExport) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *CELPluginExport) GetDesc() string {
if x != nil {
return x.Desc
}
return ""
}
func (x *CELPluginExport) GetTypes() []*CELReceiverType {
if x != nil {
return x.Types
}
return nil
}
func (x *CELPluginExport) GetFunctions() []*CELFunction {
if x != nil {
return x.Functions
}
return nil
}
func (x *CELPluginExport) GetVariables() []*CELVariable {
if x != nil {
return x.Variables
}
return nil
}
func (x *CELPluginExport) GetCapability() *CELPluginCapability {
if x != nil {
return x.Capability
}
return nil
}
// CELPluginCapability controls the permissions granted to the WebAssembly plugin.
type CELPluginCapability struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// env is the capability for environment variable.
Env *CELPluginEnvCapability `protobuf:"bytes,1,opt,name=env,proto3,oneof" json:"env,omitempty"`
// file_system is the capability for file system.
FileSystem *CELPluginFileSystemCapability `protobuf:"bytes,2,opt,name=file_system,json=fileSystem,proto3,oneof" json:"file_system,omitempty"`
// network is the capability for network.
Network *CELPluginNetworkCapability `protobuf:"bytes,3,opt,name=network,proto3,oneof" json:"network,omitempty"`
}
func (x *CELPluginCapability) Reset() {
*x = CELPluginCapability{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[38]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *CELPluginCapability) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CELPluginCapability) ProtoMessage() {}
func (x *CELPluginCapability) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[38]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use CELPluginCapability.ProtoReflect.Descriptor instead.
func (*CELPluginCapability) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{38}
}
func (x *CELPluginCapability) GetEnv() *CELPluginEnvCapability {
if x != nil {
return x.Env
}
return nil
}
func (x *CELPluginCapability) GetFileSystem() *CELPluginFileSystemCapability {
if x != nil {
return x.FileSystem
}
return nil
}
func (x *CELPluginCapability) GetNetwork() *CELPluginNetworkCapability {
if x != nil {
return x.Network
}
return nil
}
// CELPluginEnvCapability controls access to the environment variable.
type CELPluginEnvCapability struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// all allows access to all environment variables.
All bool `protobuf:"varint,1,opt,name=all,proto3" json:"all,omitempty"`
// specifies accessible names. If "all" is true, it takes precedence.
Names []string `protobuf:"bytes,2,rep,name=names,proto3" json:"names,omitempty"`
}
func (x *CELPluginEnvCapability) Reset() {
*x = CELPluginEnvCapability{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[39]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *CELPluginEnvCapability) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CELPluginEnvCapability) ProtoMessage() {}
func (x *CELPluginEnvCapability) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[39]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use CELPluginEnvCapability.ProtoReflect.Descriptor instead.
func (*CELPluginEnvCapability) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{39}
}
func (x *CELPluginEnvCapability) GetAll() bool {
if x != nil {
return x.All
}
return false
}
func (x *CELPluginEnvCapability) GetNames() []string {
if x != nil {
return x.Names
}
return nil
}
// CELPluginFileSystemCapability controls access to the file system.
type CELPluginFileSystemCapability struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// mount_path specifies the file path of the host to mount.
// If not specified, the root directory will be used.
MountPath string `protobuf:"bytes,1,opt,name=mount_path,json=mountPath,proto3" json:"mount_path,omitempty"`
}
func (x *CELPluginFileSystemCapability) Reset() {
*x = CELPluginFileSystemCapability{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[40]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *CELPluginFileSystemCapability) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CELPluginFileSystemCapability) ProtoMessage() {}
func (x *CELPluginFileSystemCapability) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[40]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use CELPluginFileSystemCapability.ProtoReflect.Descriptor instead.
func (*CELPluginFileSystemCapability) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{40}
}
func (x *CELPluginFileSystemCapability) GetMountPath() string {
if x != nil {
return x.MountPath
}
return ""
}
// CELPluginNetworkCapability sets permissions related to network access.
// This is an experimental feature.
type CELPluginNetworkCapability struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
}
func (x *CELPluginNetworkCapability) Reset() {
*x = CELPluginNetworkCapability{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[41]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *CELPluginNetworkCapability) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CELPluginNetworkCapability) ProtoMessage() {}
func (x *CELPluginNetworkCapability) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[41]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use CELPluginNetworkCapability.ProtoReflect.Descriptor instead.
func (*CELPluginNetworkCapability) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{41}
}
// CELFunction represents the CEL function definition.
type CELFunction struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// name is the function name.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// desc is the description of function.
// This description is used as documentation at code generation.
Desc string `protobuf:"bytes,2,opt,name=desc,proto3" json:"desc,omitempty"`
// args describe the definition of the function argument.
Args []*CELFunctionArgument `protobuf:"bytes,3,rep,name=args,proto3" json:"args,omitempty"`
// return describe the definition of return type of function.
Return *CELType `protobuf:"bytes,4,opt,name=return,proto3" json:"return,omitempty"`
}
func (x *CELFunction) Reset() {
*x = CELFunction{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[42]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *CELFunction) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CELFunction) ProtoMessage() {}
func (x *CELFunction) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[42]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use CELFunction.ProtoReflect.Descriptor instead.
func (*CELFunction) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{42}
}
func (x *CELFunction) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *CELFunction) GetDesc() string {
if x != nil {
return x.Desc
}
return ""
}
func (x *CELFunction) GetArgs() []*CELFunctionArgument {
if x != nil {
return x.Args
}
return nil
}
func (x *CELFunction) GetReturn() *CELType {
if x != nil {
return x.Return
}
return nil
}
// CELReceiverType represents methods tied to the message.
type CELReceiverType struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// name is the message name.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// desc is the description of plugin.
// This description is used as documentation at code generation.
Desc string `protobuf:"bytes,2,opt,name=desc,proto3" json:"desc,omitempty"`
// methods describe the definition of the method for the message.
Methods []*CELFunction `protobuf:"bytes,3,rep,name=methods,proto3" json:"methods,omitempty"`
}
func (x *CELReceiverType) Reset() {
*x = CELReceiverType{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[43]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *CELReceiverType) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CELReceiverType) ProtoMessage() {}
func (x *CELReceiverType) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[43]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use CELReceiverType.ProtoReflect.Descriptor instead.
func (*CELReceiverType) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{43}
}
func (x *CELReceiverType) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *CELReceiverType) GetDesc() string {
if x != nil {
return x.Desc
}
return ""
}
func (x *CELReceiverType) GetMethods() []*CELFunction {
if x != nil {
return x.Methods
}
return nil
}
// CELFunctionArgument represents the function argument.
type CELFunctionArgument struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// name is the argument value name.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// desc is the description of plugin.
// This description is used as documentation at code generation.
Desc string `protobuf:"bytes,2,opt,name=desc,proto3" json:"desc,omitempty"`
// type is the argument type.
Type *CELType `protobuf:"bytes,3,opt,name=type,proto3" json:"type,omitempty"`
}
func (x *CELFunctionArgument) Reset() {
*x = CELFunctionArgument{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[44]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *CELFunctionArgument) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CELFunctionArgument) ProtoMessage() {}
func (x *CELFunctionArgument) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[44]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use CELFunctionArgument.ProtoReflect.Descriptor instead.
func (*CELFunctionArgument) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{44}
}
func (x *CELFunctionArgument) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *CELFunctionArgument) GetDesc() string {
if x != nil {
return x.Desc
}
return ""
}
func (x *CELFunctionArgument) GetType() *CELType {
if x != nil {
return x.Type
}
return nil
}
// CELType represents type information for CEL plugin interface.
type CELType struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Types that are assignable to Type:
//
// *CELType_Kind
// *CELType_Repeated
// *CELType_Map
// *CELType_Message
// *CELType_Enum
Type isCELType_Type `protobuf_oneof:"type"`
}
func (x *CELType) Reset() {
*x = CELType{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[45]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *CELType) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CELType) ProtoMessage() {}
func (x *CELType) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[45]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use CELType.ProtoReflect.Descriptor instead.
func (*CELType) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{45}
}
func (m *CELType) GetType() isCELType_Type {
if m != nil {
return m.Type
}
return nil
}
func (x *CELType) GetKind() TypeKind {
if x, ok := x.GetType().(*CELType_Kind); ok {
return x.Kind
}
return TypeKind_UNKNOWN
}
func (x *CELType) GetRepeated() *CELType {
if x, ok := x.GetType().(*CELType_Repeated); ok {
return x.Repeated
}
return nil
}
func (x *CELType) GetMap() *CELMapType {
if x, ok := x.GetType().(*CELType_Map); ok {
return x.Map
}
return nil
}
func (x *CELType) GetMessage() string {
if x, ok := x.GetType().(*CELType_Message); ok {
return x.Message
}
return ""
}
func (x *CELType) GetEnum() string {
if x, ok := x.GetType().(*CELType_Enum); ok {
return x.Enum
}
return ""
}
type isCELType_Type interface {
isCELType_Type()
}
type CELType_Kind struct {
// kind is used when the type is a primitive type.
Kind TypeKind `protobuf:"varint,1,opt,name=kind,proto3,enum=grpc.federation.TypeKind,oneof"`
}
type CELType_Repeated struct {
// repeated is used when the type is a repeated type.
Repeated *CELType `protobuf:"bytes,2,opt,name=repeated,proto3,oneof"`
}
type CELType_Map struct {
// map is used when the type is a map type.
Map *CELMapType `protobuf:"bytes,3,opt,name=map,proto3,oneof"`
}
type CELType_Message struct {
// message is a fqdn to the message type.
Message string `protobuf:"bytes,4,opt,name=message,proto3,oneof"`
}
type CELType_Enum struct {
// enum is a fqdn to the enum type.
Enum string `protobuf:"bytes,5,opt,name=enum,proto3,oneof"`
}
func (*CELType_Kind) isCELType_Type() {}
func (*CELType_Repeated) isCELType_Type() {}
func (*CELType_Map) isCELType_Type() {}
func (*CELType_Message) isCELType_Type() {}
func (*CELType_Enum) isCELType_Type() {}
// CELMapType represents map type.
type CELMapType struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// key represents map's key type.
Key *CELType `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
// value represents map's value type.
Value *CELType `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
}
func (x *CELMapType) Reset() {
*x = CELMapType{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[46]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *CELMapType) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CELMapType) ProtoMessage() {}
func (x *CELMapType) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[46]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use CELMapType.ProtoReflect.Descriptor instead.
func (*CELMapType) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{46}
}
func (x *CELMapType) GetKey() *CELType {
if x != nil {
return x.Key
}
return nil
}
func (x *CELMapType) GetValue() *CELType {
if x != nil {
return x.Value
}
return nil
}
// CELVariable represents CEL variable.
type CELVariable struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// name is the variable name.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// desc is the description of plugin.
// This description is used as documentation at code generation.
Desc string `protobuf:"bytes,2,opt,name=desc,proto3" json:"desc,omitempty"`
// type is the variable type.
Type *CELType `protobuf:"bytes,3,opt,name=type,proto3" json:"type,omitempty"`
}
func (x *CELVariable) Reset() {
*x = CELVariable{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[47]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *CELVariable) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CELVariable) ProtoMessage() {}
func (x *CELVariable) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[47]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use CELVariable.ProtoReflect.Descriptor instead.
func (*CELVariable) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{47}
}
func (x *CELVariable) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *CELVariable) GetDesc() string {
if x != nil {
return x.Desc
}
return ""
}
func (x *CELVariable) GetType() *CELType {
if x != nil {
return x.Type
}
return nil
}
var file_grpc_federation_federation_proto_extTypes = []protoimpl.ExtensionInfo{
{
ExtendedType: (*descriptorpb.FileOptions)(nil),
ExtensionType: (*FileRule)(nil),
Field: 1187,
Name: "grpc.federation.file",
Tag: "bytes,1187,opt,name=file",
Filename: "grpc/federation/federation.proto",
},
{
ExtendedType: (*descriptorpb.ServiceOptions)(nil),
ExtensionType: (*ServiceRule)(nil),
Field: 1187,
Name: "grpc.federation.service",
Tag: "bytes,1187,opt,name=service",
Filename: "grpc/federation/federation.proto",
},
{
ExtendedType: (*descriptorpb.MethodOptions)(nil),
ExtensionType: (*MethodRule)(nil),
Field: 1187,
Name: "grpc.federation.method",
Tag: "bytes,1187,opt,name=method",
Filename: "grpc/federation/federation.proto",
},
{
ExtendedType: (*descriptorpb.MessageOptions)(nil),
ExtensionType: (*MessageRule)(nil),
Field: 1187,
Name: "grpc.federation.message",
Tag: "bytes,1187,opt,name=message",
Filename: "grpc/federation/federation.proto",
},
{
ExtendedType: (*descriptorpb.FieldOptions)(nil),
ExtensionType: (*FieldRule)(nil),
Field: 1187,
Name: "grpc.federation.field",
Tag: "bytes,1187,opt,name=field",
Filename: "grpc/federation/federation.proto",
},
{
ExtendedType: (*descriptorpb.EnumOptions)(nil),
ExtensionType: (*EnumRule)(nil),
Field: 1187,
Name: "grpc.federation.enum",
Tag: "bytes,1187,opt,name=enum",
Filename: "grpc/federation/federation.proto",
},
{
ExtendedType: (*descriptorpb.EnumValueOptions)(nil),
ExtensionType: (*EnumValueRule)(nil),
Field: 1187,
Name: "grpc.federation.enum_value",
Tag: "bytes,1187,opt,name=enum_value",
Filename: "grpc/federation/federation.proto",
},
{
ExtendedType: (*descriptorpb.OneofOptions)(nil),
ExtensionType: (*OneofRule)(nil),
Field: 1187,
Name: "grpc.federation.oneof",
Tag: "bytes,1187,opt,name=oneof",
Filename: "grpc/federation/federation.proto",
},
}
// Extension fields to descriptorpb.FileOptions.
var (
// optional grpc.federation.FileRule file = 1187;
E_File = &file_grpc_federation_federation_proto_extTypes[0]
)
// Extension fields to descriptorpb.ServiceOptions.
var (
// optional grpc.federation.ServiceRule service = 1187;
E_Service = &file_grpc_federation_federation_proto_extTypes[1]
)
// Extension fields to descriptorpb.MethodOptions.
var (
// optional grpc.federation.MethodRule method = 1187;
E_Method = &file_grpc_federation_federation_proto_extTypes[2]
)
// Extension fields to descriptorpb.MessageOptions.
var (
// optional grpc.federation.MessageRule message = 1187;
E_Message = &file_grpc_federation_federation_proto_extTypes[3]
)
// Extension fields to descriptorpb.FieldOptions.
var (
// optional grpc.federation.FieldRule field = 1187;
E_Field = &file_grpc_federation_federation_proto_extTypes[4]
)
// Extension fields to descriptorpb.EnumOptions.
var (
// optional grpc.federation.EnumRule enum = 1187;
E_Enum = &file_grpc_federation_federation_proto_extTypes[5]
)
// Extension fields to descriptorpb.EnumValueOptions.
var (
// optional grpc.federation.EnumValueRule enum_value = 1187;
E_EnumValue = &file_grpc_federation_federation_proto_extTypes[6]
)
// Extension fields to descriptorpb.OneofOptions.
var (
// optional grpc.federation.OneofRule oneof = 1187;
E_Oneof = &file_grpc_federation_federation_proto_extTypes[7]
)
var File_grpc_federation_federation_proto protoreflect.FileDescriptor
var file_grpc_federation_federation_proto_rawDesc = []byte{
0x0a, 0x20, 0x67, 0x72, 0x70, 0x63, 0x2f, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f,
0x6e, 0x2f, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f,
0x74, 0x6f, 0x12, 0x0f, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74,
0x69, 0x6f, 0x6e, 0x1a, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x2e,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x15, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x72, 0x70,
0x63, 0x2f, 0x63, 0x6f, 0x64, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f,
0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x72, 0x70, 0x63, 0x2f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x64,
0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x67, 0x72,
0x70, 0x63, 0x2f, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x70, 0x72,
0x69, 0x76, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1a, 0x67, 0x72, 0x70,
0x63, 0x2f, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x74, 0x69, 0x6d,
0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x56, 0x0a, 0x08, 0x46, 0x69, 0x6c, 0x65, 0x52,
0x75, 0x6c, 0x65, 0x12, 0x32, 0x0a, 0x06, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x18, 0x01, 0x20,
0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72,
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x43, 0x45, 0x4c, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x52,
0x06, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x69, 0x6d, 0x70, 0x6f, 0x72,
0x74, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x69, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x22,
0x20, 0x0a, 0x08, 0x45, 0x6e, 0x75, 0x6d, 0x52, 0x75, 0x6c, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x61,
0x6c, 0x69, 0x61, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x61, 0x6c, 0x69, 0x61,
0x73, 0x22, 0xb4, 0x01, 0x0a, 0x0d, 0x45, 0x6e, 0x75, 0x6d, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52,
0x75, 0x6c, 0x65, 0x12, 0x1d, 0x0a, 0x07, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x18, 0x01,
0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x07, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x88,
0x01, 0x01, 0x12, 0x14, 0x0a, 0x05, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28,
0x09, 0x52, 0x05, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x12, 0x37, 0x0a, 0x04, 0x61, 0x74, 0x74, 0x72,
0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65,
0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x56, 0x61, 0x6c,
0x75, 0x65, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x52, 0x04, 0x61, 0x74, 0x74,
0x72, 0x12, 0x1d, 0x0a, 0x07, 0x6e, 0x6f, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x18, 0x04, 0x20, 0x01,
0x28, 0x08, 0x48, 0x01, 0x52, 0x07, 0x6e, 0x6f, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x88, 0x01, 0x01,
0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x42, 0x0a, 0x0a, 0x08,
0x5f, 0x6e, 0x6f, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x22, 0x3e, 0x0a, 0x12, 0x45, 0x6e, 0x75, 0x6d,
0x56, 0x61, 0x6c, 0x75, 0x65, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 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, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28,
0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x0b, 0x0a, 0x09, 0x4f, 0x6e, 0x65, 0x6f,
0x66, 0x52, 0x75, 0x6c, 0x65, 0x22, 0x69, 0x0a, 0x0b, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65,
0x52, 0x75, 0x6c, 0x65, 0x12, 0x26, 0x0a, 0x03, 0x65, 0x6e, 0x76, 0x18, 0x01, 0x20, 0x01, 0x28,
0x0b, 0x32, 0x14, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74,
0x69, 0x6f, 0x6e, 0x2e, 0x45, 0x6e, 0x76, 0x52, 0x03, 0x65, 0x6e, 0x76, 0x12, 0x32, 0x0a, 0x03,
0x76, 0x61, 0x72, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x67, 0x72, 0x70, 0x63,
0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x53, 0x65, 0x72, 0x76,
0x69, 0x63, 0x65, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x03, 0x76, 0x61, 0x72,
0x22, 0x4a, 0x0a, 0x03, 0x45, 0x6e, 0x76, 0x12, 0x29, 0x0a, 0x03, 0x76, 0x61, 0x72, 0x18, 0x01,
0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65,
0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x45, 0x6e, 0x76, 0x56, 0x61, 0x72, 0x52, 0x03, 0x76,
0x61, 0x72, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20,
0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x8b, 0x03, 0x0a,
0x0f, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65,
0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01,
0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x13, 0x0a, 0x02, 0x69, 0x66, 0x18,
0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x02, 0x52, 0x02, 0x69, 0x66, 0x88, 0x01, 0x01, 0x12, 0x10,
0x0a, 0x02, 0x62, 0x79, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x02, 0x62, 0x79,
0x12, 0x2c, 0x0a, 0x03, 0x6d, 0x61, 0x70, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e,
0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e,
0x4d, 0x61, 0x70, 0x45, 0x78, 0x70, 0x72, 0x48, 0x00, 0x52, 0x03, 0x6d, 0x61, 0x70, 0x12, 0x38,
0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32,
0x1c, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f,
0x6e, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x45, 0x78, 0x70, 0x72, 0x48, 0x00, 0x52,
0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x50, 0x0a, 0x0a, 0x76, 0x61, 0x6c, 0x69,
0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x67,
0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x53,
0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x56, 0x61,
0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x78, 0x70, 0x72, 0x48, 0x00, 0x52, 0x0a,
0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2f, 0x0a, 0x04, 0x65, 0x6e,
0x75, 0x6d, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e,
0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x45,
0x78, 0x70, 0x72, 0x48, 0x00, 0x52, 0x04, 0x65, 0x6e, 0x75, 0x6d, 0x12, 0x35, 0x0a, 0x06, 0x73,
0x77, 0x69, 0x74, 0x63, 0x68, 0x18, 0x10, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x72,
0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x53, 0x77,
0x69, 0x74, 0x63, 0x68, 0x45, 0x78, 0x70, 0x72, 0x48, 0x00, 0x52, 0x06, 0x73, 0x77, 0x69, 0x74,
0x63, 0x68, 0x42, 0x06, 0x0a, 0x04, 0x65, 0x78, 0x70, 0x72, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e,
0x61, 0x6d, 0x65, 0x42, 0x05, 0x0a, 0x03, 0x5f, 0x69, 0x66, 0x22, 0x49, 0x0a, 0x1d, 0x53, 0x65,
0x72, 0x76, 0x69, 0x63, 0x65, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x56, 0x61, 0x6c,
0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x78, 0x70, 0x72, 0x12, 0x0e, 0x0a, 0x02, 0x69,
0x66, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x66, 0x12, 0x18, 0x0a, 0x07, 0x6d,
0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65,
0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x91, 0x01, 0x0a, 0x06, 0x45, 0x6e, 0x76, 0x56, 0x61, 0x72,
0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04,
0x6e, 0x61, 0x6d, 0x65, 0x12, 0x2c, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01,
0x28, 0x0b, 0x32, 0x18, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61,
0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x45, 0x6e, 0x76, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79,
0x70, 0x65, 0x12, 0x3a, 0x0a, 0x06, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01,
0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61,
0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x45, 0x6e, 0x76, 0x56, 0x61, 0x72, 0x4f, 0x70, 0x74, 0x69, 0x6f,
0x6e, 0x48, 0x00, 0x52, 0x06, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x88, 0x01, 0x01, 0x42, 0x09,
0x0a, 0x07, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xab, 0x01, 0x0a, 0x07, 0x45, 0x6e,
0x76, 0x54, 0x79, 0x70, 0x65, 0x12, 0x2f, 0x0a, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x18, 0x01, 0x20,
0x01, 0x28, 0x0e, 0x32, 0x19, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72,
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x4b, 0x69, 0x6e, 0x64, 0x48, 0x00,
0x52, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x12, 0x36, 0x0a, 0x08, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74,
0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e,
0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x45, 0x6e, 0x76, 0x54, 0x79,
0x70, 0x65, 0x48, 0x00, 0x52, 0x08, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x12, 0x2f,
0x0a, 0x03, 0x6d, 0x61, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x72,
0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x45, 0x6e,
0x76, 0x4d, 0x61, 0x70, 0x54, 0x79, 0x70, 0x65, 0x48, 0x00, 0x52, 0x03, 0x6d, 0x61, 0x70, 0x42,
0x06, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x22, 0x68, 0x0a, 0x0a, 0x45, 0x6e, 0x76, 0x4d, 0x61,
0x70, 0x54, 0x79, 0x70, 0x65, 0x12, 0x2a, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01,
0x28, 0x0b, 0x32, 0x18, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61,
0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x45, 0x6e, 0x76, 0x54, 0x79, 0x70, 0x65, 0x52, 0x03, 0x6b, 0x65,
0x79, 0x12, 0x2e, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b,
0x32, 0x18, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69,
0x6f, 0x6e, 0x2e, 0x45, 0x6e, 0x76, 0x54, 0x79, 0x70, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75,
0x65, 0x22, 0xc3, 0x01, 0x0a, 0x0c, 0x45, 0x6e, 0x76, 0x56, 0x61, 0x72, 0x4f, 0x70, 0x74, 0x69,
0x6f, 0x6e, 0x12, 0x21, 0x0a, 0x09, 0x61, 0x6c, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x74, 0x65, 0x18,
0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x09, 0x61, 0x6c, 0x74, 0x65, 0x72, 0x6e, 0x61,
0x74, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1d, 0x0a, 0x07, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74,
0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x07, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c,
0x74, 0x88, 0x01, 0x01, 0x12, 0x1f, 0x0a, 0x08, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64,
0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x48, 0x02, 0x52, 0x08, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72,
0x65, 0x64, 0x88, 0x01, 0x01, 0x12, 0x1d, 0x0a, 0x07, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x64,
0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x48, 0x03, 0x52, 0x07, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65,
0x64, 0x88, 0x01, 0x01, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x61, 0x6c, 0x74, 0x65, 0x72, 0x6e, 0x61,
0x74, 0x65, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x42, 0x0b,
0x0a, 0x09, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x42, 0x0a, 0x0a, 0x08, 0x5f,
0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x64, 0x22, 0x65, 0x0a, 0x0a, 0x4d, 0x65, 0x74, 0x68, 0x6f,
0x64, 0x52, 0x75, 0x6c, 0x65, 0x12, 0x1d, 0x0a, 0x07, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74,
0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x07, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75,
0x74, 0x88, 0x01, 0x01, 0x12, 0x1f, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e,
0x73, 0x65, 0x88, 0x01, 0x01, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75,
0x74, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x9c,
0x01, 0x0a, 0x0b, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x75, 0x6c, 0x65, 0x12, 0x35,
0x0a, 0x03, 0x64, 0x65, 0x66, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x67, 0x72,
0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x56, 0x61,
0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e,
0x52, 0x03, 0x64, 0x65, 0x66, 0x12, 0x2c, 0x0a, 0x0f, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x5f,
0x72, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00,
0x52, 0x0e, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x52, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x72,
0x88, 0x01, 0x01, 0x12, 0x14, 0x0a, 0x05, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x18, 0x03, 0x20, 0x03,
0x28, 0x09, 0x52, 0x05, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x42, 0x12, 0x0a, 0x10, 0x5f, 0x63, 0x75,
0x73, 0x74, 0x6f, 0x6d, 0x5f, 0x72, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x72, 0x22, 0xde, 0x03,
0x0a, 0x12, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69,
0x74, 0x69, 0x6f, 0x6e, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01,
0x28, 0x09, 0x48, 0x01, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x13, 0x0a,
0x02, 0x69, 0x66, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x02, 0x52, 0x02, 0x69, 0x66, 0x88,
0x01, 0x01, 0x12, 0x1f, 0x0a, 0x08, 0x61, 0x75, 0x74, 0x6f, 0x62, 0x69, 0x6e, 0x64, 0x18, 0x03,
0x20, 0x01, 0x28, 0x08, 0x48, 0x03, 0x52, 0x08, 0x61, 0x75, 0x74, 0x6f, 0x62, 0x69, 0x6e, 0x64,
0x88, 0x01, 0x01, 0x12, 0x10, 0x0a, 0x02, 0x62, 0x79, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x48,
0x00, 0x52, 0x02, 0x62, 0x79, 0x12, 0x2c, 0x0a, 0x03, 0x6d, 0x61, 0x70, 0x18, 0x0c, 0x20, 0x01,
0x28, 0x0b, 0x32, 0x18, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61,
0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x4d, 0x61, 0x70, 0x45, 0x78, 0x70, 0x72, 0x48, 0x00, 0x52, 0x03,
0x6d, 0x61, 0x70, 0x12, 0x38, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x0d,
0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65,
0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x45, 0x78,
0x70, 0x72, 0x48, 0x00, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x2f, 0x0a,
0x04, 0x63, 0x61, 0x6c, 0x6c, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x72,
0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x43, 0x61,
0x6c, 0x6c, 0x45, 0x78, 0x70, 0x72, 0x48, 0x00, 0x52, 0x04, 0x63, 0x61, 0x6c, 0x6c, 0x12, 0x41,
0x0a, 0x0a, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x0f, 0x20, 0x01,
0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61,
0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45,
0x78, 0x70, 0x72, 0x48, 0x00, 0x52, 0x0a, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f,
0x6e, 0x12, 0x2f, 0x0a, 0x04, 0x65, 0x6e, 0x75, 0x6d, 0x18, 0x10, 0x20, 0x01, 0x28, 0x0b, 0x32,
0x19, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f,
0x6e, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x45, 0x78, 0x70, 0x72, 0x48, 0x00, 0x52, 0x04, 0x65, 0x6e,
0x75, 0x6d, 0x12, 0x35, 0x0a, 0x06, 0x73, 0x77, 0x69, 0x74, 0x63, 0x68, 0x18, 0x11, 0x20, 0x01,
0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61,
0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x53, 0x77, 0x69, 0x74, 0x63, 0x68, 0x45, 0x78, 0x70, 0x72, 0x48,
0x00, 0x52, 0x06, 0x73, 0x77, 0x69, 0x74, 0x63, 0x68, 0x42, 0x06, 0x0a, 0x04, 0x65, 0x78, 0x70,
0x72, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x05, 0x0a, 0x03, 0x5f, 0x69,
0x66, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x61, 0x75, 0x74, 0x6f, 0x62, 0x69, 0x6e, 0x64, 0x22, 0xc5,
0x01, 0x0a, 0x07, 0x4d, 0x61, 0x70, 0x45, 0x78, 0x70, 0x72, 0x12, 0x35, 0x0a, 0x08, 0x69, 0x74,
0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67,
0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x49,
0x74, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x08, 0x69, 0x74, 0x65, 0x72, 0x61, 0x74, 0x6f,
0x72, 0x12, 0x10, 0x0a, 0x02, 0x62, 0x79, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52,
0x02, 0x62, 0x79, 0x12, 0x38, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x0c,
0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65,
0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x45, 0x78,
0x70, 0x72, 0x48, 0x00, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x2f, 0x0a,
0x04, 0x65, 0x6e, 0x75, 0x6d, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x72,
0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x45, 0x6e,
0x75, 0x6d, 0x45, 0x78, 0x70, 0x72, 0x48, 0x00, 0x52, 0x04, 0x65, 0x6e, 0x75, 0x6d, 0x42, 0x06,
0x0a, 0x04, 0x65, 0x78, 0x70, 0x72, 0x22, 0x30, 0x0a, 0x08, 0x49, 0x74, 0x65, 0x72, 0x61, 0x74,
0x6f, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x73, 0x72, 0x63, 0x18, 0x02, 0x20,
0x01, 0x28, 0x09, 0x52, 0x03, 0x73, 0x72, 0x63, 0x22, 0x50, 0x0a, 0x0b, 0x4d, 0x65, 0x73, 0x73,
0x61, 0x67, 0x65, 0x45, 0x78, 0x70, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18,
0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x2d, 0x0a, 0x04, 0x61,
0x72, 0x67, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x72, 0x70, 0x63,
0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x41, 0x72, 0x67, 0x75,
0x6d, 0x65, 0x6e, 0x74, 0x52, 0x04, 0x61, 0x72, 0x67, 0x73, 0x22, 0x2e, 0x0a, 0x08, 0x45, 0x6e,
0x75, 0x6d, 0x45, 0x78, 0x70, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01,
0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x62, 0x79,
0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x62, 0x79, 0x22, 0xf3, 0x02, 0x0a, 0x08, 0x43,
0x61, 0x6c, 0x6c, 0x45, 0x78, 0x70, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f,
0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12,
0x38, 0x0a, 0x07, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b,
0x32, 0x1e, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69,
0x6f, 0x6e, 0x2e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
0x52, 0x07, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x07, 0x74, 0x69, 0x6d,
0x65, 0x6f, 0x75, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x07, 0x74, 0x69,
0x6d, 0x65, 0x6f, 0x75, 0x74, 0x88, 0x01, 0x01, 0x12, 0x37, 0x0a, 0x05, 0x72, 0x65, 0x74, 0x72,
0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66,
0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x52, 0x65, 0x74, 0x72, 0x79, 0x50,
0x6f, 0x6c, 0x69, 0x63, 0x79, 0x48, 0x01, 0x52, 0x05, 0x72, 0x65, 0x74, 0x72, 0x79, 0x88, 0x01,
0x01, 0x12, 0x30, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b,
0x32, 0x1a, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69,
0x6f, 0x6e, 0x2e, 0x47, 0x52, 0x50, 0x43, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x05, 0x65, 0x72,
0x72, 0x6f, 0x72, 0x12, 0x3c, 0x0a, 0x06, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x06, 0x20,
0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72,
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x47, 0x52, 0x50, 0x43, 0x43, 0x61, 0x6c, 0x6c, 0x4f, 0x70,
0x74, 0x69, 0x6f, 0x6e, 0x48, 0x02, 0x52, 0x06, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x88, 0x01,
0x01, 0x12, 0x1f, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x07, 0x20,
0x01, 0x28, 0x09, 0x48, 0x03, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x88,
0x01, 0x01, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x42, 0x08,
0x0a, 0x06, 0x5f, 0x72, 0x65, 0x74, 0x72, 0x79, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6f, 0x70, 0x74,
0x69, 0x6f, 0x6e, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61,
0x22, 0x7f, 0x0a, 0x0a, 0x53, 0x77, 0x69, 0x74, 0x63, 0x68, 0x45, 0x78, 0x70, 0x72, 0x12, 0x33,
0x0a, 0x04, 0x63, 0x61, 0x73, 0x65, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x67,
0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x53,
0x77, 0x69, 0x74, 0x63, 0x68, 0x43, 0x61, 0x73, 0x65, 0x45, 0x78, 0x70, 0x72, 0x52, 0x04, 0x63,
0x61, 0x73, 0x65, 0x12, 0x3c, 0x0a, 0x07, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x18, 0x02,
0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65,
0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x53, 0x77, 0x69, 0x74, 0x63, 0x68, 0x44, 0x65, 0x66,
0x61, 0x75, 0x6c, 0x74, 0x45, 0x78, 0x70, 0x72, 0x52, 0x07, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c,
0x74, 0x22, 0x71, 0x0a, 0x0e, 0x53, 0x77, 0x69, 0x74, 0x63, 0x68, 0x43, 0x61, 0x73, 0x65, 0x45,
0x78, 0x70, 0x72, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x66, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
0x02, 0x69, 0x66, 0x12, 0x35, 0x0a, 0x03, 0x64, 0x65, 0x66, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b,
0x32, 0x23, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69,
0x6f, 0x6e, 0x2e, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x44, 0x65, 0x66, 0x69, 0x6e,
0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x03, 0x64, 0x65, 0x66, 0x12, 0x10, 0x0a, 0x02, 0x62, 0x79,
0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x02, 0x62, 0x79, 0x42, 0x06, 0x0a, 0x04,
0x65, 0x78, 0x70, 0x72, 0x22, 0x64, 0x0a, 0x11, 0x53, 0x77, 0x69, 0x74, 0x63, 0x68, 0x44, 0x65,
0x66, 0x61, 0x75, 0x6c, 0x74, 0x45, 0x78, 0x70, 0x72, 0x12, 0x35, 0x0a, 0x03, 0x64, 0x65, 0x66,
0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65,
0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c,
0x65, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x03, 0x64, 0x65, 0x66,
0x12, 0x10, 0x0a, 0x02, 0x62, 0x79, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x02,
0x62, 0x79, 0x42, 0x06, 0x0a, 0x04, 0x65, 0x78, 0x70, 0x72, 0x22, 0x86, 0x04, 0x0a, 0x09, 0x47,
0x52, 0x50, 0x43, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x35, 0x0a, 0x03, 0x64, 0x65, 0x66, 0x18,
0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64,
0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65,
0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x03, 0x64, 0x65, 0x66, 0x12,
0x13, 0x0a, 0x02, 0x69, 0x66, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x02, 0x69,
0x66, 0x88, 0x01, 0x01, 0x12, 0x29, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x03, 0x20, 0x01,
0x28, 0x0e, 0x32, 0x10, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x72, 0x70, 0x63, 0x2e,
0x43, 0x6f, 0x64, 0x65, 0x48, 0x01, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x88, 0x01, 0x01, 0x12,
0x1d, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09,
0x48, 0x02, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x88, 0x01, 0x01, 0x12, 0x3a,
0x0a, 0x07, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32,
0x20, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f,
0x6e, 0x2e, 0x47, 0x52, 0x50, 0x43, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x44, 0x65, 0x74, 0x61, 0x69,
0x6c, 0x52, 0x07, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x12, 0x1b, 0x0a, 0x06, 0x69, 0x67,
0x6e, 0x6f, 0x72, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x48, 0x03, 0x52, 0x06, 0x69, 0x67,
0x6e, 0x6f, 0x72, 0x65, 0x88, 0x01, 0x01, 0x12, 0x33, 0x0a, 0x13, 0x69, 0x67, 0x6e, 0x6f, 0x72,
0x65, 0x5f, 0x61, 0x6e, 0x64, 0x5f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x07,
0x20, 0x01, 0x28, 0x09, 0x48, 0x04, 0x52, 0x11, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x41, 0x6e,
0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x88, 0x01, 0x01, 0x12, 0x45, 0x0a, 0x09,
0x6c, 0x6f, 0x67, 0x5f, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0e, 0x32,
0x23, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f,
0x6e, 0x2e, 0x47, 0x52, 0x50, 0x43, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x2e, 0x4c, 0x6f, 0x67, 0x4c,
0x65, 0x76, 0x65, 0x6c, 0x48, 0x05, 0x52, 0x08, 0x6c, 0x6f, 0x67, 0x4c, 0x65, 0x76, 0x65, 0x6c,
0x88, 0x01, 0x01, 0x22, 0x41, 0x0a, 0x08, 0x4c, 0x6f, 0x67, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x12,
0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05,
0x44, 0x45, 0x42, 0x55, 0x47, 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, 0x49, 0x4e, 0x46, 0x4f, 0x10,
0x02, 0x12, 0x08, 0x0a, 0x04, 0x57, 0x41, 0x52, 0x4e, 0x10, 0x03, 0x12, 0x09, 0x0a, 0x05, 0x45,
0x52, 0x52, 0x4f, 0x52, 0x10, 0x04, 0x42, 0x05, 0x0a, 0x03, 0x5f, 0x69, 0x66, 0x42, 0x07, 0x0a,
0x05, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61,
0x67, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x42, 0x16, 0x0a,
0x14, 0x5f, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x5f, 0x61, 0x6e, 0x64, 0x5f, 0x72, 0x65, 0x73,
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x6c, 0x6f, 0x67, 0x5f, 0x6c, 0x65,
0x76, 0x65, 0x6c, 0x22, 0xfa, 0x05, 0x0a, 0x0f, 0x47, 0x52, 0x50, 0x43, 0x45, 0x72, 0x72, 0x6f,
0x72, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x66, 0x18, 0x01, 0x20,
0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x66, 0x12, 0x35, 0x0a, 0x03, 0x64, 0x65, 0x66, 0x18, 0x02,
0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65,
0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x44,
0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x03, 0x64, 0x65, 0x66, 0x12, 0x36,
0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32,
0x1c, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f,
0x6e, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x45, 0x78, 0x70, 0x72, 0x52, 0x07, 0x6d,
0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x34, 0x0a, 0x0a, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f,
0x69, 0x6e, 0x66, 0x6f, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x67, 0x6f, 0x6f,
0x67, 0x6c, 0x65, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x49, 0x6e, 0x66,
0x6f, 0x52, 0x09, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x34, 0x0a, 0x0a,
0x72, 0x65, 0x74, 0x72, 0x79, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b,
0x32, 0x15, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x52, 0x65,
0x74, 0x72, 0x79, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x09, 0x72, 0x65, 0x74, 0x72, 0x79, 0x49, 0x6e,
0x66, 0x6f, 0x12, 0x34, 0x0a, 0x0a, 0x64, 0x65, 0x62, 0x75, 0x67, 0x5f, 0x69, 0x6e, 0x66, 0x6f,
0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e,
0x72, 0x70, 0x63, 0x2e, 0x44, 0x65, 0x62, 0x75, 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x09, 0x64,
0x65, 0x62, 0x75, 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x3d, 0x0a, 0x0d, 0x71, 0x75, 0x6f, 0x74,
0x61, 0x5f, 0x66, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32,
0x18, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x51, 0x75, 0x6f,
0x74, 0x61, 0x46, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x52, 0x0c, 0x71, 0x75, 0x6f, 0x74, 0x61,
0x46, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x12, 0x52, 0x0a, 0x14, 0x70, 0x72, 0x65, 0x63, 0x6f,
0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x66, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x18,
0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x72,
0x70, 0x63, 0x2e, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x46,
0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x52, 0x13, 0x70, 0x72, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x69,
0x74, 0x69, 0x6f, 0x6e, 0x46, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x12, 0x37, 0x0a, 0x0b, 0x62,
0x61, 0x64, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b,
0x32, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x42, 0x61,
0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x0a, 0x62, 0x61, 0x64, 0x52, 0x65, 0x71,
0x75, 0x65, 0x73, 0x74, 0x12, 0x3a, 0x0a, 0x0c, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f,
0x69, 0x6e, 0x66, 0x6f, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f,
0x67, 0x6c, 0x65, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x49,
0x6e, 0x66, 0x6f, 0x52, 0x0b, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, 0x6e, 0x66, 0x6f,
0x12, 0x3d, 0x0a, 0x0d, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x69, 0x6e, 0x66,
0x6f, 0x18, 0x0b, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,
0x2e, 0x72, 0x70, 0x63, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x6e, 0x66,
0x6f, 0x52, 0x0c, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12,
0x24, 0x0a, 0x04, 0x68, 0x65, 0x6c, 0x70, 0x18, 0x0c, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e,
0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x48, 0x65, 0x6c, 0x70, 0x52,
0x04, 0x68, 0x65, 0x6c, 0x70, 0x12, 0x49, 0x0a, 0x11, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x69, 0x7a,
0x65, 0x64, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x0d, 0x20, 0x03, 0x28, 0x0b,
0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x6f,
0x63, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x10,
0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65,
0x12, 0x0e, 0x0a, 0x02, 0x62, 0x79, 0x18, 0x0e, 0x20, 0x03, 0x28, 0x09, 0x52, 0x02, 0x62, 0x79,
0x22, 0xc7, 0x03, 0x0a, 0x0e, 0x47, 0x52, 0x50, 0x43, 0x43, 0x61, 0x6c, 0x6c, 0x4f, 0x70, 0x74,
0x69, 0x6f, 0x6e, 0x12, 0x2c, 0x0a, 0x0f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x5f, 0x73,
0x75, 0x62, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0e,
0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x53, 0x75, 0x62, 0x74, 0x79, 0x70, 0x65, 0x88, 0x01,
0x01, 0x12, 0x1b, 0x0a, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28,
0x09, 0x48, 0x01, 0x52, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x88, 0x01, 0x01, 0x12, 0x37,
0x0a, 0x16, 0x6d, 0x61, 0x78, 0x5f, 0x63, 0x61, 0x6c, 0x6c, 0x5f, 0x72, 0x65, 0x63, 0x76, 0x5f,
0x6d, 0x73, 0x67, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x48, 0x02,
0x52, 0x12, 0x6d, 0x61, 0x78, 0x43, 0x61, 0x6c, 0x6c, 0x52, 0x65, 0x63, 0x76, 0x4d, 0x73, 0x67,
0x53, 0x69, 0x7a, 0x65, 0x88, 0x01, 0x01, 0x12, 0x37, 0x0a, 0x16, 0x6d, 0x61, 0x78, 0x5f, 0x63,
0x61, 0x6c, 0x6c, 0x5f, 0x73, 0x65, 0x6e, 0x64, 0x5f, 0x6d, 0x73, 0x67, 0x5f, 0x73, 0x69, 0x7a,
0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x48, 0x03, 0x52, 0x12, 0x6d, 0x61, 0x78, 0x43, 0x61,
0x6c, 0x6c, 0x53, 0x65, 0x6e, 0x64, 0x4d, 0x73, 0x67, 0x53, 0x69, 0x7a, 0x65, 0x88, 0x01, 0x01,
0x12, 0x28, 0x0a, 0x0d, 0x73, 0x74, 0x61, 0x74, 0x69, 0x63, 0x5f, 0x6d, 0x65, 0x74, 0x68, 0x6f,
0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x48, 0x04, 0x52, 0x0c, 0x73, 0x74, 0x61, 0x74, 0x69,
0x63, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x88, 0x01, 0x01, 0x12, 0x1d, 0x0a, 0x07, 0x74, 0x72,
0x61, 0x69, 0x6c, 0x65, 0x72, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x48, 0x05, 0x52, 0x07, 0x74,
0x72, 0x61, 0x69, 0x6c, 0x65, 0x72, 0x88, 0x01, 0x01, 0x12, 0x29, 0x0a, 0x0e, 0x77, 0x61, 0x69,
0x74, 0x5f, 0x66, 0x6f, 0x72, 0x5f, 0x72, 0x65, 0x61, 0x64, 0x79, 0x18, 0x07, 0x20, 0x01, 0x28,
0x08, 0x48, 0x06, 0x52, 0x0c, 0x77, 0x61, 0x69, 0x74, 0x46, 0x6f, 0x72, 0x52, 0x65, 0x61, 0x64,
0x79, 0x88, 0x01, 0x01, 0x42, 0x12, 0x0a, 0x10, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74,
0x5f, 0x73, 0x75, 0x62, 0x74, 0x79, 0x70, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x68, 0x65, 0x61,
0x64, 0x65, 0x72, 0x42, 0x19, 0x0a, 0x17, 0x5f, 0x6d, 0x61, 0x78, 0x5f, 0x63, 0x61, 0x6c, 0x6c,
0x5f, 0x72, 0x65, 0x63, 0x76, 0x5f, 0x6d, 0x73, 0x67, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x42, 0x19,
0x0a, 0x17, 0x5f, 0x6d, 0x61, 0x78, 0x5f, 0x63, 0x61, 0x6c, 0x6c, 0x5f, 0x73, 0x65, 0x6e, 0x64,
0x5f, 0x6d, 0x73, 0x67, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x42, 0x10, 0x0a, 0x0e, 0x5f, 0x73, 0x74,
0x61, 0x74, 0x69, 0x63, 0x5f, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x42, 0x0a, 0x0a, 0x08, 0x5f,
0x74, 0x72, 0x61, 0x69, 0x6c, 0x65, 0x72, 0x42, 0x11, 0x0a, 0x0f, 0x5f, 0x77, 0x61, 0x69, 0x74,
0x5f, 0x66, 0x6f, 0x72, 0x5f, 0x72, 0x65, 0x61, 0x64, 0x79, 0x22, 0x64, 0x0a, 0x0e, 0x56, 0x61,
0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x78, 0x70, 0x72, 0x12, 0x17, 0x0a, 0x04,
0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61,
0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x30, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x02,
0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65,
0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x47, 0x52, 0x50, 0x43, 0x45, 0x72, 0x72, 0x6f, 0x72,
0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65,
0x22, 0xb8, 0x01, 0x0a, 0x0b, 0x52, 0x65, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79,
0x12, 0x42, 0x0a, 0x08, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01,
0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61,
0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x52, 0x65, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79,
0x43, 0x6f, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x08, 0x63, 0x6f, 0x6e, 0x73,
0x74, 0x61, 0x6e, 0x74, 0x12, 0x4b, 0x0a, 0x0b, 0x65, 0x78, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74,
0x69, 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x67, 0x72, 0x70, 0x63,
0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x52, 0x65, 0x74, 0x72,
0x79, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x45, 0x78, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x69,
0x61, 0x6c, 0x48, 0x00, 0x52, 0x0b, 0x65, 0x78, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x69, 0x61,
0x6c, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x66, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69,
0x66, 0x42, 0x08, 0x0a, 0x06, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x22, 0x79, 0x0a, 0x13, 0x52,
0x65, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x61,
0x6e, 0x74, 0x12, 0x1f, 0x0a, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x01,
0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c,
0x88, 0x01, 0x01, 0x12, 0x24, 0x0a, 0x0b, 0x6d, 0x61, 0x78, 0x5f, 0x72, 0x65, 0x74, 0x72, 0x69,
0x65, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x48, 0x01, 0x52, 0x0a, 0x6d, 0x61, 0x78, 0x52,
0x65, 0x74, 0x72, 0x69, 0x65, 0x73, 0x88, 0x01, 0x01, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x69, 0x6e,
0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x6d, 0x61, 0x78, 0x5f, 0x72,
0x65, 0x74, 0x72, 0x69, 0x65, 0x73, 0x22, 0xd1, 0x02, 0x0a, 0x16, 0x52, 0x65, 0x74, 0x72, 0x79,
0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x45, 0x78, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x69, 0x61,
0x6c, 0x12, 0x2e, 0x0a, 0x10, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x5f, 0x69, 0x6e, 0x74,
0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0f, 0x69,
0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x88, 0x01,
0x01, 0x12, 0x36, 0x0a, 0x14, 0x72, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x69, 0x7a, 0x61, 0x74, 0x69,
0x6f, 0x6e, 0x5f, 0x66, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x01, 0x48,
0x01, 0x52, 0x13, 0x72, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e,
0x46, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x88, 0x01, 0x01, 0x12, 0x23, 0x0a, 0x0a, 0x6d, 0x75, 0x6c,
0x74, 0x69, 0x70, 0x6c, 0x69, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x01, 0x48, 0x02, 0x52,
0x0a, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x69, 0x65, 0x72, 0x88, 0x01, 0x01, 0x12, 0x26,
0x0a, 0x0c, 0x6d, 0x61, 0x78, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x04,
0x20, 0x01, 0x28, 0x09, 0x48, 0x03, 0x52, 0x0b, 0x6d, 0x61, 0x78, 0x49, 0x6e, 0x74, 0x65, 0x72,
0x76, 0x61, 0x6c, 0x88, 0x01, 0x01, 0x12, 0x24, 0x0a, 0x0b, 0x6d, 0x61, 0x78, 0x5f, 0x72, 0x65,
0x74, 0x72, 0x69, 0x65, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x48, 0x04, 0x52, 0x0a, 0x6d,
0x61, 0x78, 0x52, 0x65, 0x74, 0x72, 0x69, 0x65, 0x73, 0x88, 0x01, 0x01, 0x42, 0x13, 0x0a, 0x11,
0x5f, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61,
0x6c, 0x42, 0x17, 0x0a, 0x15, 0x5f, 0x72, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x69, 0x7a, 0x61, 0x74,
0x69, 0x6f, 0x6e, 0x5f, 0x66, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x6d,
0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x69, 0x65, 0x72, 0x42, 0x0f, 0x0a, 0x0d, 0x5f, 0x6d, 0x61,
0x78, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x6d,
0x61, 0x78, 0x5f, 0x72, 0x65, 0x74, 0x72, 0x69, 0x65, 0x73, 0x22, 0x5d, 0x0a, 0x0d, 0x4d, 0x65,
0x74, 0x68, 0x6f, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x66,
0x69, 0x65, 0x6c, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x66, 0x69, 0x65, 0x6c,
0x64, 0x12, 0x13, 0x0a, 0x02, 0x62, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52,
0x02, 0x62, 0x79, 0x88, 0x01, 0x01, 0x12, 0x13, 0x0a, 0x02, 0x69, 0x66, 0x18, 0x03, 0x20, 0x01,
0x28, 0x09, 0x48, 0x01, 0x52, 0x02, 0x69, 0x66, 0x88, 0x01, 0x01, 0x42, 0x05, 0x0a, 0x03, 0x5f,
0x62, 0x79, 0x42, 0x05, 0x0a, 0x03, 0x5f, 0x69, 0x66, 0x22, 0x85, 0x01, 0x0a, 0x0e, 0x4d, 0x65,
0x74, 0x68, 0x6f, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x17, 0x0a, 0x04,
0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61,
0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x18, 0x02,
0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x05, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x88, 0x01, 0x01,
0x12, 0x1f, 0x0a, 0x08, 0x61, 0x75, 0x74, 0x6f, 0x62, 0x69, 0x6e, 0x64, 0x18, 0x03, 0x20, 0x01,
0x28, 0x08, 0x48, 0x02, 0x52, 0x08, 0x61, 0x75, 0x74, 0x6f, 0x62, 0x69, 0x6e, 0x64, 0x88, 0x01,
0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x66,
0x69, 0x65, 0x6c, 0x64, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x61, 0x75, 0x74, 0x6f, 0x62, 0x69, 0x6e,
0x64, 0x22, 0x62, 0x0a, 0x08, 0x41, 0x72, 0x67, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x12, 0x0a,
0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d,
0x65, 0x12, 0x13, 0x0a, 0x02, 0x62, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52,
0x02, 0x62, 0x79, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x69, 0x6e, 0x6c, 0x69, 0x6e, 0x65,
0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x06, 0x69, 0x6e, 0x6c, 0x69, 0x6e, 0x65,
0x88, 0x01, 0x01, 0x42, 0x05, 0x0a, 0x03, 0x5f, 0x62, 0x79, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x69,
0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x22, 0xf2, 0x01, 0x0a, 0x09, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x52,
0x75, 0x6c, 0x65, 0x12, 0x2c, 0x0a, 0x0f, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x5f, 0x72, 0x65,
0x73, 0x6f, 0x6c, 0x76, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x0e,
0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x52, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x72, 0x88, 0x01,
0x01, 0x12, 0x13, 0x0a, 0x02, 0x62, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52,
0x02, 0x62, 0x79, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x18,
0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x02, 0x52, 0x05, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x88, 0x01,
0x01, 0x12, 0x31, 0x0a, 0x05, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b,
0x32, 0x1b, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69,
0x6f, 0x6e, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x6e, 0x65, 0x6f, 0x66, 0x52, 0x05, 0x6f,
0x6e, 0x65, 0x6f, 0x66, 0x12, 0x2f, 0x0a, 0x03, 0x65, 0x6e, 0x76, 0x18, 0x05, 0x20, 0x01, 0x28,
0x0b, 0x32, 0x1d, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74,
0x69, 0x6f, 0x6e, 0x2e, 0x45, 0x6e, 0x76, 0x56, 0x61, 0x72, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e,
0x52, 0x03, 0x65, 0x6e, 0x76, 0x42, 0x12, 0x0a, 0x10, 0x5f, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d,
0x5f, 0x72, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x72, 0x42, 0x05, 0x0a, 0x03, 0x5f, 0x62, 0x79,
0x42, 0x08, 0x0a, 0x06, 0x5f, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x22, 0x89, 0x01, 0x0a, 0x0a, 0x46,
0x69, 0x65, 0x6c, 0x64, 0x4f, 0x6e, 0x65, 0x6f, 0x66, 0x12, 0x10, 0x0a, 0x02, 0x69, 0x66, 0x18,
0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x02, 0x69, 0x66, 0x12, 0x1a, 0x0a, 0x07, 0x64,
0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x07,
0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x12, 0x35, 0x0a, 0x03, 0x64, 0x65, 0x66, 0x18, 0x03,
0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65,
0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x44,
0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x03, 0x64, 0x65, 0x66, 0x12, 0x0e,
0x0a, 0x02, 0x62, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x62, 0x79, 0x42, 0x06,
0x0a, 0x04, 0x63, 0x6f, 0x6e, 0x64, 0x22, 0x45, 0x0a, 0x09, 0x43, 0x45, 0x4c, 0x50, 0x6c, 0x75,
0x67, 0x69, 0x6e, 0x12, 0x38, 0x0a, 0x06, 0x65, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x01, 0x20,
0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72,
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x43, 0x45, 0x4c, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x45,
0x78, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x06, 0x65, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x22, 0xaf, 0x02,
0x0a, 0x0f, 0x43, 0x45, 0x4c, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x45, 0x78, 0x70, 0x6f, 0x72,
0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x65, 0x73, 0x63, 0x18, 0x02, 0x20,
0x01, 0x28, 0x09, 0x52, 0x04, 0x64, 0x65, 0x73, 0x63, 0x12, 0x36, 0x0a, 0x05, 0x74, 0x79, 0x70,
0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e,
0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x43, 0x45, 0x4c, 0x52, 0x65,
0x63, 0x65, 0x69, 0x76, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x52, 0x05, 0x74, 0x79, 0x70, 0x65,
0x73, 0x12, 0x3a, 0x0a, 0x09, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x04,
0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65,
0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x43, 0x45, 0x4c, 0x46, 0x75, 0x6e, 0x63, 0x74, 0x69,
0x6f, 0x6e, 0x52, 0x09, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x3a, 0x0a,
0x09, 0x76, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b,
0x32, 0x1c, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69,
0x6f, 0x6e, 0x2e, 0x43, 0x45, 0x4c, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x09,
0x76, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x12, 0x44, 0x0a, 0x0a, 0x63, 0x61, 0x70,
0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e,
0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e,
0x43, 0x45, 0x4c, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c,
0x69, 0x74, 0x79, 0x52, 0x0a, 0x63, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x22,
0x9b, 0x02, 0x0a, 0x13, 0x43, 0x45, 0x4c, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x43, 0x61, 0x70,
0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x12, 0x3e, 0x0a, 0x03, 0x65, 0x6e, 0x76, 0x18, 0x01,
0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65,
0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x43, 0x45, 0x4c, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e,
0x45, 0x6e, 0x76, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x48, 0x00, 0x52,
0x03, 0x65, 0x6e, 0x76, 0x88, 0x01, 0x01, 0x12, 0x54, 0x0a, 0x0b, 0x66, 0x69, 0x6c, 0x65, 0x5f,
0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x67,
0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x43,
0x45, 0x4c, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x46, 0x69, 0x6c, 0x65, 0x53, 0x79, 0x73, 0x74,
0x65, 0x6d, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x48, 0x01, 0x52, 0x0a,
0x66, 0x69, 0x6c, 0x65, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x88, 0x01, 0x01, 0x12, 0x4a, 0x0a,
0x07, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b,
0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e,
0x2e, 0x43, 0x45, 0x4c, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72,
0x6b, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x48, 0x02, 0x52, 0x07, 0x6e,
0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x88, 0x01, 0x01, 0x42, 0x06, 0x0a, 0x04, 0x5f, 0x65, 0x6e,
0x76, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x73, 0x79, 0x73, 0x74, 0x65,
0x6d, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x22, 0x40, 0x0a,
0x16, 0x43, 0x45, 0x4c, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x45, 0x6e, 0x76, 0x43, 0x61, 0x70,
0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x61, 0x6c, 0x6c, 0x18, 0x01,
0x20, 0x01, 0x28, 0x08, 0x52, 0x03, 0x61, 0x6c, 0x6c, 0x12, 0x14, 0x0a, 0x05, 0x6e, 0x61, 0x6d,
0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x22,
0x3e, 0x0a, 0x1d, 0x43, 0x45, 0x4c, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x46, 0x69, 0x6c, 0x65,
0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79,
0x12, 0x1d, 0x0a, 0x0a, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01,
0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x50, 0x61, 0x74, 0x68, 0x22,
0x1c, 0x0a, 0x1a, 0x43, 0x45, 0x4c, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x4e, 0x65, 0x74, 0x77,
0x6f, 0x72, 0x6b, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x22, 0xa1, 0x01,
0x0a, 0x0b, 0x43, 0x45, 0x4c, 0x46, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a,
0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d,
0x65, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x65, 0x73, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52,
0x04, 0x64, 0x65, 0x73, 0x63, 0x12, 0x38, 0x0a, 0x04, 0x61, 0x72, 0x67, 0x73, 0x18, 0x03, 0x20,
0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72,
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x43, 0x45, 0x4c, 0x46, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f,
0x6e, 0x41, 0x72, 0x67, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x04, 0x61, 0x72, 0x67, 0x73, 0x12,
0x30, 0x0a, 0x06, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32,
0x18, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f,
0x6e, 0x2e, 0x43, 0x45, 0x4c, 0x54, 0x79, 0x70, 0x65, 0x52, 0x06, 0x72, 0x65, 0x74, 0x75, 0x72,
0x6e, 0x22, 0x71, 0x0a, 0x0f, 0x43, 0x45, 0x4c, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x72,
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, 0x12, 0x0a, 0x04, 0x64, 0x65, 0x73, 0x63,
0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x64, 0x65, 0x73, 0x63, 0x12, 0x36, 0x0a, 0x07,
0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e,
0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e,
0x43, 0x45, 0x4c, 0x46, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x6d, 0x65, 0x74,
0x68, 0x6f, 0x64, 0x73, 0x22, 0x6b, 0x0a, 0x13, 0x43, 0x45, 0x4c, 0x46, 0x75, 0x6e, 0x63, 0x74,
0x69, 0x6f, 0x6e, 0x41, 0x72, 0x67, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e,
0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12,
0x12, 0x0a, 0x04, 0x64, 0x65, 0x73, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x64,
0x65, 0x73, 0x63, 0x12, 0x2c, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28,
0x0b, 0x32, 0x18, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74,
0x69, 0x6f, 0x6e, 0x2e, 0x43, 0x45, 0x4c, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70,
0x65, 0x22, 0xdd, 0x01, 0x0a, 0x07, 0x43, 0x45, 0x4c, 0x54, 0x79, 0x70, 0x65, 0x12, 0x2f, 0x0a,
0x04, 0x6b, 0x69, 0x6e, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x19, 0x2e, 0x67, 0x72,
0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x54, 0x79,
0x70, 0x65, 0x4b, 0x69, 0x6e, 0x64, 0x48, 0x00, 0x52, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x12, 0x36,
0x0a, 0x08, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b,
0x32, 0x18, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69,
0x6f, 0x6e, 0x2e, 0x43, 0x45, 0x4c, 0x54, 0x79, 0x70, 0x65, 0x48, 0x00, 0x52, 0x08, 0x72, 0x65,
0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x12, 0x2f, 0x0a, 0x03, 0x6d, 0x61, 0x70, 0x18, 0x03, 0x20,
0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72,
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x43, 0x45, 0x4c, 0x4d, 0x61, 0x70, 0x54, 0x79, 0x70, 0x65,
0x48, 0x00, 0x52, 0x03, 0x6d, 0x61, 0x70, 0x12, 0x1a, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61,
0x67, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73,
0x61, 0x67, 0x65, 0x12, 0x14, 0x0a, 0x04, 0x65, 0x6e, 0x75, 0x6d, 0x18, 0x05, 0x20, 0x01, 0x28,
0x09, 0x48, 0x00, 0x52, 0x04, 0x65, 0x6e, 0x75, 0x6d, 0x42, 0x06, 0x0a, 0x04, 0x74, 0x79, 0x70,
0x65, 0x22, 0x68, 0x0a, 0x0a, 0x43, 0x45, 0x4c, 0x4d, 0x61, 0x70, 0x54, 0x79, 0x70, 0x65, 0x12,
0x2a, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x67,
0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x43,
0x45, 0x4c, 0x54, 0x79, 0x70, 0x65, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x2e, 0x0a, 0x05, 0x76,
0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x67, 0x72, 0x70,
0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x43, 0x45, 0x4c,
0x54, 0x79, 0x70, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x63, 0x0a, 0x0b, 0x43,
0x45, 0x4c, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61,
0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x12,
0x0a, 0x04, 0x64, 0x65, 0x73, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x64, 0x65,
0x73, 0x63, 0x12, 0x2c, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b,
0x32, 0x18, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69,
0x6f, 0x6e, 0x2e, 0x43, 0x45, 0x4c, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65,
0x2a, 0x5e, 0x0a, 0x08, 0x54, 0x79, 0x70, 0x65, 0x4b, 0x69, 0x6e, 0x64, 0x12, 0x0b, 0x0a, 0x07,
0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x53, 0x54, 0x52,
0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, 0x42, 0x4f, 0x4f, 0x4c, 0x10, 0x02, 0x12,
0x09, 0x0a, 0x05, 0x49, 0x4e, 0x54, 0x36, 0x34, 0x10, 0x03, 0x12, 0x0a, 0x0a, 0x06, 0x55, 0x49,
0x4e, 0x54, 0x36, 0x34, 0x10, 0x04, 0x12, 0x0a, 0x0a, 0x06, 0x44, 0x4f, 0x55, 0x42, 0x4c, 0x45,
0x10, 0x05, 0x12, 0x0c, 0x0a, 0x08, 0x44, 0x55, 0x52, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x06,
0x3a, 0x4c, 0x0a, 0x04, 0x66, 0x69, 0x6c, 0x65, 0x12, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c,
0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x4f,
0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xa3, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e,
0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e,
0x46, 0x69, 0x6c, 0x65, 0x52, 0x75, 0x6c, 0x65, 0x52, 0x04, 0x66, 0x69, 0x6c, 0x65, 0x3a, 0x58,
0x0a, 0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x1f, 0x2e, 0x67, 0x6f, 0x6f, 0x67,
0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x65, 0x72, 0x76,
0x69, 0x63, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xa3, 0x09, 0x20, 0x01, 0x28,
0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74,
0x69, 0x6f, 0x6e, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x75, 0x6c, 0x65, 0x52,
0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x3a, 0x54, 0x0a, 0x06, 0x6d, 0x65, 0x74, 0x68,
0x6f, 0x64, 0x12, 0x1e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f,
0x6e, 0x73, 0x18, 0xa3, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x72, 0x70, 0x63,
0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x4d, 0x65, 0x74, 0x68,
0x6f, 0x64, 0x52, 0x75, 0x6c, 0x65, 0x52, 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x3a, 0x58,
0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x1f, 0x2e, 0x67, 0x6f, 0x6f, 0x67,
0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4d, 0x65, 0x73, 0x73,
0x61, 0x67, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xa3, 0x09, 0x20, 0x01, 0x28,
0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74,
0x69, 0x6f, 0x6e, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x75, 0x6c, 0x65, 0x52,
0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x3a, 0x50, 0x0a, 0x05, 0x66, 0x69, 0x65, 0x6c,
0x64, 0x12, 0x1d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73,
0x18, 0xa3, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66,
0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x52,
0x75, 0x6c, 0x65, 0x52, 0x05, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x3a, 0x4c, 0x0a, 0x04, 0x65, 0x6e,
0x75, 0x6d, 0x12, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73,
0x18, 0xa3, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66,
0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x52, 0x75,
0x6c, 0x65, 0x52, 0x04, 0x65, 0x6e, 0x75, 0x6d, 0x3a, 0x61, 0x0a, 0x0a, 0x65, 0x6e, 0x75, 0x6d,
0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x21, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x56, 0x61, 0x6c,
0x75, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xa3, 0x09, 0x20, 0x01, 0x28, 0x0b,
0x32, 0x1e, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69,
0x6f, 0x6e, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x75, 0x6c, 0x65,
0x52, 0x09, 0x65, 0x6e, 0x75, 0x6d, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x50, 0x0a, 0x05, 0x6f,
0x6e, 0x65, 0x6f, 0x66, 0x12, 0x1d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4f, 0x6e, 0x65, 0x6f, 0x66, 0x4f, 0x70, 0x74, 0x69,
0x6f, 0x6e, 0x73, 0x18, 0xa3, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x72, 0x70,
0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x4f, 0x6e, 0x65,
0x6f, 0x66, 0x52, 0x75, 0x6c, 0x65, 0x52, 0x05, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x42, 0xc2, 0x01,
0x0a, 0x13, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72,
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x0f, 0x46, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f,
0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3d, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62,
0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6d, 0x65, 0x72, 0x63, 0x61, 0x72, 0x69, 0x2f, 0x67, 0x72, 0x70,
0x63, 0x2d, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x67, 0x72, 0x70,
0x63, 0x2f, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x3b, 0x66, 0x65, 0x64,
0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0xa2, 0x02, 0x03, 0x47, 0x46, 0x58, 0xaa, 0x02, 0x0f,
0x47, 0x72, 0x70, 0x63, 0x2e, 0x46, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0xca,
0x02, 0x0f, 0x47, 0x72, 0x70, 0x63, 0x5c, 0x46, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f,
0x6e, 0xe2, 0x02, 0x1b, 0x47, 0x72, 0x70, 0x63, 0x5c, 0x46, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74,
0x69, 0x6f, 0x6e, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea,
0x02, 0x10, 0x47, 0x72, 0x70, 0x63, 0x3a, 0x3a, 0x46, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69,
0x6f, 0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_grpc_federation_federation_proto_rawDescOnce sync.Once
file_grpc_federation_federation_proto_rawDescData = file_grpc_federation_federation_proto_rawDesc
)
func file_grpc_federation_federation_proto_rawDescGZIP() []byte {
file_grpc_federation_federation_proto_rawDescOnce.Do(func() {
file_grpc_federation_federation_proto_rawDescData = protoimpl.X.CompressGZIP(file_grpc_federation_federation_proto_rawDescData)
})
return file_grpc_federation_federation_proto_rawDescData
}
var file_grpc_federation_federation_proto_enumTypes = make([]protoimpl.EnumInfo, 2)
var file_grpc_federation_federation_proto_msgTypes = make([]protoimpl.MessageInfo, 48)
var file_grpc_federation_federation_proto_goTypes = []interface{}{
(TypeKind)(0), // 0: grpc.federation.TypeKind
(GRPCError_LogLevel)(0), // 1: grpc.federation.GRPCError.LogLevel
(*FileRule)(nil), // 2: grpc.federation.FileRule
(*EnumRule)(nil), // 3: grpc.federation.EnumRule
(*EnumValueRule)(nil), // 4: grpc.federation.EnumValueRule
(*EnumValueAttribute)(nil), // 5: grpc.federation.EnumValueAttribute
(*OneofRule)(nil), // 6: grpc.federation.OneofRule
(*ServiceRule)(nil), // 7: grpc.federation.ServiceRule
(*Env)(nil), // 8: grpc.federation.Env
(*ServiceVariable)(nil), // 9: grpc.federation.ServiceVariable
(*ServiceVariableValidationExpr)(nil), // 10: grpc.federation.ServiceVariableValidationExpr
(*EnvVar)(nil), // 11: grpc.federation.EnvVar
(*EnvType)(nil), // 12: grpc.federation.EnvType
(*EnvMapType)(nil), // 13: grpc.federation.EnvMapType
(*EnvVarOption)(nil), // 14: grpc.federation.EnvVarOption
(*MethodRule)(nil), // 15: grpc.federation.MethodRule
(*MessageRule)(nil), // 16: grpc.federation.MessageRule
(*VariableDefinition)(nil), // 17: grpc.federation.VariableDefinition
(*MapExpr)(nil), // 18: grpc.federation.MapExpr
(*Iterator)(nil), // 19: grpc.federation.Iterator
(*MessageExpr)(nil), // 20: grpc.federation.MessageExpr
(*EnumExpr)(nil), // 21: grpc.federation.EnumExpr
(*CallExpr)(nil), // 22: grpc.federation.CallExpr
(*SwitchExpr)(nil), // 23: grpc.federation.SwitchExpr
(*SwitchCaseExpr)(nil), // 24: grpc.federation.SwitchCaseExpr
(*SwitchDefaultExpr)(nil), // 25: grpc.federation.SwitchDefaultExpr
(*GRPCError)(nil), // 26: grpc.federation.GRPCError
(*GRPCErrorDetail)(nil), // 27: grpc.federation.GRPCErrorDetail
(*GRPCCallOption)(nil), // 28: grpc.federation.GRPCCallOption
(*ValidationExpr)(nil), // 29: grpc.federation.ValidationExpr
(*RetryPolicy)(nil), // 30: grpc.federation.RetryPolicy
(*RetryPolicyConstant)(nil), // 31: grpc.federation.RetryPolicyConstant
(*RetryPolicyExponential)(nil), // 32: grpc.federation.RetryPolicyExponential
(*MethodRequest)(nil), // 33: grpc.federation.MethodRequest
(*MethodResponse)(nil), // 34: grpc.federation.MethodResponse
(*Argument)(nil), // 35: grpc.federation.Argument
(*FieldRule)(nil), // 36: grpc.federation.FieldRule
(*FieldOneof)(nil), // 37: grpc.federation.FieldOneof
(*CELPlugin)(nil), // 38: grpc.federation.CELPlugin
(*CELPluginExport)(nil), // 39: grpc.federation.CELPluginExport
(*CELPluginCapability)(nil), // 40: grpc.federation.CELPluginCapability
(*CELPluginEnvCapability)(nil), // 41: grpc.federation.CELPluginEnvCapability
(*CELPluginFileSystemCapability)(nil), // 42: grpc.federation.CELPluginFileSystemCapability
(*CELPluginNetworkCapability)(nil), // 43: grpc.federation.CELPluginNetworkCapability
(*CELFunction)(nil), // 44: grpc.federation.CELFunction
(*CELReceiverType)(nil), // 45: grpc.federation.CELReceiverType
(*CELFunctionArgument)(nil), // 46: grpc.federation.CELFunctionArgument
(*CELType)(nil), // 47: grpc.federation.CELType
(*CELMapType)(nil), // 48: grpc.federation.CELMapType
(*CELVariable)(nil), // 49: grpc.federation.CELVariable
(code.Code)(0), // 50: google.rpc.Code
(*errdetails.ErrorInfo)(nil), // 51: google.rpc.ErrorInfo
(*errdetails.RetryInfo)(nil), // 52: google.rpc.RetryInfo
(*errdetails.DebugInfo)(nil), // 53: google.rpc.DebugInfo
(*errdetails.QuotaFailure)(nil), // 54: google.rpc.QuotaFailure
(*errdetails.PreconditionFailure)(nil), // 55: google.rpc.PreconditionFailure
(*errdetails.BadRequest)(nil), // 56: google.rpc.BadRequest
(*errdetails.RequestInfo)(nil), // 57: google.rpc.RequestInfo
(*errdetails.ResourceInfo)(nil), // 58: google.rpc.ResourceInfo
(*errdetails.Help)(nil), // 59: google.rpc.Help
(*errdetails.LocalizedMessage)(nil), // 60: google.rpc.LocalizedMessage
(*descriptorpb.FileOptions)(nil), // 61: google.protobuf.FileOptions
(*descriptorpb.ServiceOptions)(nil), // 62: google.protobuf.ServiceOptions
(*descriptorpb.MethodOptions)(nil), // 63: google.protobuf.MethodOptions
(*descriptorpb.MessageOptions)(nil), // 64: google.protobuf.MessageOptions
(*descriptorpb.FieldOptions)(nil), // 65: google.protobuf.FieldOptions
(*descriptorpb.EnumOptions)(nil), // 66: google.protobuf.EnumOptions
(*descriptorpb.EnumValueOptions)(nil), // 67: google.protobuf.EnumValueOptions
(*descriptorpb.OneofOptions)(nil), // 68: google.protobuf.OneofOptions
}
var file_grpc_federation_federation_proto_depIdxs = []int32{
38, // 0: grpc.federation.FileRule.plugin:type_name -> grpc.federation.CELPlugin
5, // 1: grpc.federation.EnumValueRule.attr:type_name -> grpc.federation.EnumValueAttribute
8, // 2: grpc.federation.ServiceRule.env:type_name -> grpc.federation.Env
9, // 3: grpc.federation.ServiceRule.var:type_name -> grpc.federation.ServiceVariable
11, // 4: grpc.federation.Env.var:type_name -> grpc.federation.EnvVar
18, // 5: grpc.federation.ServiceVariable.map:type_name -> grpc.federation.MapExpr
20, // 6: grpc.federation.ServiceVariable.message:type_name -> grpc.federation.MessageExpr
10, // 7: grpc.federation.ServiceVariable.validation:type_name -> grpc.federation.ServiceVariableValidationExpr
21, // 8: grpc.federation.ServiceVariable.enum:type_name -> grpc.federation.EnumExpr
23, // 9: grpc.federation.ServiceVariable.switch:type_name -> grpc.federation.SwitchExpr
12, // 10: grpc.federation.EnvVar.type:type_name -> grpc.federation.EnvType
14, // 11: grpc.federation.EnvVar.option:type_name -> grpc.federation.EnvVarOption
0, // 12: grpc.federation.EnvType.kind:type_name -> grpc.federation.TypeKind
12, // 13: grpc.federation.EnvType.repeated:type_name -> grpc.federation.EnvType
13, // 14: grpc.federation.EnvType.map:type_name -> grpc.federation.EnvMapType
12, // 15: grpc.federation.EnvMapType.key:type_name -> grpc.federation.EnvType
12, // 16: grpc.federation.EnvMapType.value:type_name -> grpc.federation.EnvType
17, // 17: grpc.federation.MessageRule.def:type_name -> grpc.federation.VariableDefinition
18, // 18: grpc.federation.VariableDefinition.map:type_name -> grpc.federation.MapExpr
20, // 19: grpc.federation.VariableDefinition.message:type_name -> grpc.federation.MessageExpr
22, // 20: grpc.federation.VariableDefinition.call:type_name -> grpc.federation.CallExpr
29, // 21: grpc.federation.VariableDefinition.validation:type_name -> grpc.federation.ValidationExpr
21, // 22: grpc.federation.VariableDefinition.enum:type_name -> grpc.federation.EnumExpr
23, // 23: grpc.federation.VariableDefinition.switch:type_name -> grpc.federation.SwitchExpr
19, // 24: grpc.federation.MapExpr.iterator:type_name -> grpc.federation.Iterator
20, // 25: grpc.federation.MapExpr.message:type_name -> grpc.federation.MessageExpr
21, // 26: grpc.federation.MapExpr.enum:type_name -> grpc.federation.EnumExpr
35, // 27: grpc.federation.MessageExpr.args:type_name -> grpc.federation.Argument
33, // 28: grpc.federation.CallExpr.request:type_name -> grpc.federation.MethodRequest
30, // 29: grpc.federation.CallExpr.retry:type_name -> grpc.federation.RetryPolicy
26, // 30: grpc.federation.CallExpr.error:type_name -> grpc.federation.GRPCError
28, // 31: grpc.federation.CallExpr.option:type_name -> grpc.federation.GRPCCallOption
24, // 32: grpc.federation.SwitchExpr.case:type_name -> grpc.federation.SwitchCaseExpr
25, // 33: grpc.federation.SwitchExpr.default:type_name -> grpc.federation.SwitchDefaultExpr
17, // 34: grpc.federation.SwitchCaseExpr.def:type_name -> grpc.federation.VariableDefinition
17, // 35: grpc.federation.SwitchDefaultExpr.def:type_name -> grpc.federation.VariableDefinition
17, // 36: grpc.federation.GRPCError.def:type_name -> grpc.federation.VariableDefinition
50, // 37: grpc.federation.GRPCError.code:type_name -> google.rpc.Code
27, // 38: grpc.federation.GRPCError.details:type_name -> grpc.federation.GRPCErrorDetail
1, // 39: grpc.federation.GRPCError.log_level:type_name -> grpc.federation.GRPCError.LogLevel
17, // 40: grpc.federation.GRPCErrorDetail.def:type_name -> grpc.federation.VariableDefinition
20, // 41: grpc.federation.GRPCErrorDetail.message:type_name -> grpc.federation.MessageExpr
51, // 42: grpc.federation.GRPCErrorDetail.error_info:type_name -> google.rpc.ErrorInfo
52, // 43: grpc.federation.GRPCErrorDetail.retry_info:type_name -> google.rpc.RetryInfo
53, // 44: grpc.federation.GRPCErrorDetail.debug_info:type_name -> google.rpc.DebugInfo
54, // 45: grpc.federation.GRPCErrorDetail.quota_failure:type_name -> google.rpc.QuotaFailure
55, // 46: grpc.federation.GRPCErrorDetail.precondition_failure:type_name -> google.rpc.PreconditionFailure
56, // 47: grpc.federation.GRPCErrorDetail.bad_request:type_name -> google.rpc.BadRequest
57, // 48: grpc.federation.GRPCErrorDetail.request_info:type_name -> google.rpc.RequestInfo
58, // 49: grpc.federation.GRPCErrorDetail.resource_info:type_name -> google.rpc.ResourceInfo
59, // 50: grpc.federation.GRPCErrorDetail.help:type_name -> google.rpc.Help
60, // 51: grpc.federation.GRPCErrorDetail.localized_message:type_name -> google.rpc.LocalizedMessage
26, // 52: grpc.federation.ValidationExpr.error:type_name -> grpc.federation.GRPCError
31, // 53: grpc.federation.RetryPolicy.constant:type_name -> grpc.federation.RetryPolicyConstant
32, // 54: grpc.federation.RetryPolicy.exponential:type_name -> grpc.federation.RetryPolicyExponential
37, // 55: grpc.federation.FieldRule.oneof:type_name -> grpc.federation.FieldOneof
14, // 56: grpc.federation.FieldRule.env:type_name -> grpc.federation.EnvVarOption
17, // 57: grpc.federation.FieldOneof.def:type_name -> grpc.federation.VariableDefinition
39, // 58: grpc.federation.CELPlugin.export:type_name -> grpc.federation.CELPluginExport
45, // 59: grpc.federation.CELPluginExport.types:type_name -> grpc.federation.CELReceiverType
44, // 60: grpc.federation.CELPluginExport.functions:type_name -> grpc.federation.CELFunction
49, // 61: grpc.federation.CELPluginExport.variables:type_name -> grpc.federation.CELVariable
40, // 62: grpc.federation.CELPluginExport.capability:type_name -> grpc.federation.CELPluginCapability
41, // 63: grpc.federation.CELPluginCapability.env:type_name -> grpc.federation.CELPluginEnvCapability
42, // 64: grpc.federation.CELPluginCapability.file_system:type_name -> grpc.federation.CELPluginFileSystemCapability
43, // 65: grpc.federation.CELPluginCapability.network:type_name -> grpc.federation.CELPluginNetworkCapability
46, // 66: grpc.federation.CELFunction.args:type_name -> grpc.federation.CELFunctionArgument
47, // 67: grpc.federation.CELFunction.return:type_name -> grpc.federation.CELType
44, // 68: grpc.federation.CELReceiverType.methods:type_name -> grpc.federation.CELFunction
47, // 69: grpc.federation.CELFunctionArgument.type:type_name -> grpc.federation.CELType
0, // 70: grpc.federation.CELType.kind:type_name -> grpc.federation.TypeKind
47, // 71: grpc.federation.CELType.repeated:type_name -> grpc.federation.CELType
48, // 72: grpc.federation.CELType.map:type_name -> grpc.federation.CELMapType
47, // 73: grpc.federation.CELMapType.key:type_name -> grpc.federation.CELType
47, // 74: grpc.federation.CELMapType.value:type_name -> grpc.federation.CELType
47, // 75: grpc.federation.CELVariable.type:type_name -> grpc.federation.CELType
61, // 76: grpc.federation.file:extendee -> google.protobuf.FileOptions
62, // 77: grpc.federation.service:extendee -> google.protobuf.ServiceOptions
63, // 78: grpc.federation.method:extendee -> google.protobuf.MethodOptions
64, // 79: grpc.federation.message:extendee -> google.protobuf.MessageOptions
65, // 80: grpc.federation.field:extendee -> google.protobuf.FieldOptions
66, // 81: grpc.federation.enum:extendee -> google.protobuf.EnumOptions
67, // 82: grpc.federation.enum_value:extendee -> google.protobuf.EnumValueOptions
68, // 83: grpc.federation.oneof:extendee -> google.protobuf.OneofOptions
2, // 84: grpc.federation.file:type_name -> grpc.federation.FileRule
7, // 85: grpc.federation.service:type_name -> grpc.federation.ServiceRule
15, // 86: grpc.federation.method:type_name -> grpc.federation.MethodRule
16, // 87: grpc.federation.message:type_name -> grpc.federation.MessageRule
36, // 88: grpc.federation.field:type_name -> grpc.federation.FieldRule
3, // 89: grpc.federation.enum:type_name -> grpc.federation.EnumRule
4, // 90: grpc.federation.enum_value:type_name -> grpc.federation.EnumValueRule
6, // 91: grpc.federation.oneof:type_name -> grpc.federation.OneofRule
92, // [92:92] is the sub-list for method output_type
92, // [92:92] is the sub-list for method input_type
84, // [84:92] is the sub-list for extension type_name
76, // [76:84] is the sub-list for extension extendee
0, // [0:76] is the sub-list for field type_name
}
func init() { file_grpc_federation_federation_proto_init() }
func file_grpc_federation_federation_proto_init() {
if File_grpc_federation_federation_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_grpc_federation_federation_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*FileRule); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*EnumRule); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*EnumValueRule); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*EnumValueAttribute); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*OneofRule); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ServiceRule); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Env); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ServiceVariable); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ServiceVariableValidationExpr); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*EnvVar); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*EnvType); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*EnvMapType); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*EnvVarOption); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*MethodRule); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*MessageRule); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*VariableDefinition); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*MapExpr); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Iterator); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*MessageExpr); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*EnumExpr); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CallExpr); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*SwitchExpr); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*SwitchCaseExpr); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*SwitchDefaultExpr); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GRPCError); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GRPCErrorDetail); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GRPCCallOption); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ValidationExpr); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[28].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*RetryPolicy); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[29].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*RetryPolicyConstant); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[30].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*RetryPolicyExponential); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[31].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*MethodRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[32].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*MethodResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[33].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Argument); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[34].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*FieldRule); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[35].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*FieldOneof); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[36].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CELPlugin); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[37].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CELPluginExport); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[38].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CELPluginCapability); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[39].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CELPluginEnvCapability); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[40].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CELPluginFileSystemCapability); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[41].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CELPluginNetworkCapability); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[42].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CELFunction); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[43].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CELReceiverType); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[44].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CELFunctionArgument); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[45].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CELType); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[46].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CELMapType); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[47].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CELVariable); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
file_grpc_federation_federation_proto_msgTypes[2].OneofWrappers = []interface{}{}
file_grpc_federation_federation_proto_msgTypes[7].OneofWrappers = []interface{}{
(*ServiceVariable_By)(nil),
(*ServiceVariable_Map)(nil),
(*ServiceVariable_Message)(nil),
(*ServiceVariable_Validation)(nil),
(*ServiceVariable_Enum)(nil),
(*ServiceVariable_Switch)(nil),
}
file_grpc_federation_federation_proto_msgTypes[9].OneofWrappers = []interface{}{}
file_grpc_federation_federation_proto_msgTypes[10].OneofWrappers = []interface{}{
(*EnvType_Kind)(nil),
(*EnvType_Repeated)(nil),
(*EnvType_Map)(nil),
}
file_grpc_federation_federation_proto_msgTypes[12].OneofWrappers = []interface{}{}
file_grpc_federation_federation_proto_msgTypes[13].OneofWrappers = []interface{}{}
file_grpc_federation_federation_proto_msgTypes[14].OneofWrappers = []interface{}{}
file_grpc_federation_federation_proto_msgTypes[15].OneofWrappers = []interface{}{
(*VariableDefinition_By)(nil),
(*VariableDefinition_Map)(nil),
(*VariableDefinition_Message)(nil),
(*VariableDefinition_Call)(nil),
(*VariableDefinition_Validation)(nil),
(*VariableDefinition_Enum)(nil),
(*VariableDefinition_Switch)(nil),
}
file_grpc_federation_federation_proto_msgTypes[16].OneofWrappers = []interface{}{
(*MapExpr_By)(nil),
(*MapExpr_Message)(nil),
(*MapExpr_Enum)(nil),
}
file_grpc_federation_federation_proto_msgTypes[20].OneofWrappers = []interface{}{}
file_grpc_federation_federation_proto_msgTypes[22].OneofWrappers = []interface{}{
(*SwitchCaseExpr_By)(nil),
}
file_grpc_federation_federation_proto_msgTypes[23].OneofWrappers = []interface{}{
(*SwitchDefaultExpr_By)(nil),
}
file_grpc_federation_federation_proto_msgTypes[24].OneofWrappers = []interface{}{}
file_grpc_federation_federation_proto_msgTypes[26].OneofWrappers = []interface{}{}
file_grpc_federation_federation_proto_msgTypes[27].OneofWrappers = []interface{}{}
file_grpc_federation_federation_proto_msgTypes[28].OneofWrappers = []interface{}{
(*RetryPolicy_Constant)(nil),
(*RetryPolicy_Exponential)(nil),
}
file_grpc_federation_federation_proto_msgTypes[29].OneofWrappers = []interface{}{}
file_grpc_federation_federation_proto_msgTypes[30].OneofWrappers = []interface{}{}
file_grpc_federation_federation_proto_msgTypes[31].OneofWrappers = []interface{}{}
file_grpc_federation_federation_proto_msgTypes[32].OneofWrappers = []interface{}{}
file_grpc_federation_federation_proto_msgTypes[33].OneofWrappers = []interface{}{}
file_grpc_federation_federation_proto_msgTypes[34].OneofWrappers = []interface{}{}
file_grpc_federation_federation_proto_msgTypes[35].OneofWrappers = []interface{}{
(*FieldOneof_If)(nil),
(*FieldOneof_Default)(nil),
}
file_grpc_federation_federation_proto_msgTypes[38].OneofWrappers = []interface{}{}
file_grpc_federation_federation_proto_msgTypes[45].OneofWrappers = []interface{}{
(*CELType_Kind)(nil),
(*CELType_Repeated)(nil),
(*CELType_Map)(nil),
(*CELType_Message)(nil),
(*CELType_Enum)(nil),
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_grpc_federation_federation_proto_rawDesc,
NumEnums: 2,
NumMessages: 48,
NumExtensions: 8,
NumServices: 0,
},
GoTypes: file_grpc_federation_federation_proto_goTypes,
DependencyIndexes: file_grpc_federation_federation_proto_depIdxs,
EnumInfos: file_grpc_federation_federation_proto_enumTypes,
MessageInfos: file_grpc_federation_federation_proto_msgTypes,
ExtensionInfos: file_grpc_federation_federation_proto_extTypes,
}.Build()
File_grpc_federation_federation_proto = out.File
file_grpc_federation_federation_proto_rawDesc = nil
file_grpc_federation_federation_proto_goTypes = nil
file_grpc_federation_federation_proto_depIdxs = nil
}
================================================
FILE: _examples/11_multi_service/grpc-federation.yaml
================================================
imports:
- proto
src:
- proto
out: .
plugins:
- plugin: go
opt: paths=source_relative
- plugin: go-grpc
opt: paths=source_relative
- plugin: grpc-federation
opt: paths=source_relative
================================================
FILE: _examples/11_multi_service/like/like.pb.go
================================================
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.33.0
// protoc (unknown)
// source: like/like.proto
package like
import (
_ "github.com/mercari/grpc-federation/grpc/federation"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
type LikeType int32
const (
LikeType_UNKNOWN LikeType = 0
LikeType_TYPE1 LikeType = 1
LikeType_TYPE2 LikeType = 2
)
// Enum value maps for LikeType.
var (
LikeType_name = map[int32]string{
0: "UNKNOWN",
1: "TYPE1",
2: "TYPE2",
}
LikeType_value = map[string]int32{
"UNKNOWN": 0,
"TYPE1": 1,
"TYPE2": 2,
}
)
func (x LikeType) Enum() *LikeType {
p := new(LikeType)
*p = x
return p
}
func (x LikeType) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (LikeType) Descriptor() protoreflect.EnumDescriptor {
return file_like_like_proto_enumTypes[0].Descriptor()
}
func (LikeType) Type() protoreflect.EnumType {
return &file_like_like_proto_enumTypes[0]
}
func (x LikeType) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use LikeType.Descriptor instead.
func (LikeType) EnumDescriptor() ([]byte, []int) {
return file_like_like_proto_rawDescGZIP(), []int{0}
}
var File_like_like_proto protoreflect.FileDescriptor
var file_like_like_proto_rawDesc = []byte{
0x0a, 0x0f, 0x6c, 0x69, 0x6b, 0x65, 0x2f, 0x6c, 0x69, 0x6b, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x12, 0x04, 0x6c, 0x69, 0x6b, 0x65, 0x1a, 0x20, 0x67, 0x72, 0x70, 0x63, 0x2f, 0x66, 0x65,
0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74,
0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2a, 0x2d, 0x0a, 0x08, 0x4c, 0x69, 0x6b,
0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e,
0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x54, 0x59, 0x50, 0x45, 0x31, 0x10, 0x01, 0x12, 0x09, 0x0a,
0x05, 0x54, 0x59, 0x50, 0x45, 0x32, 0x10, 0x02, 0x42, 0x58, 0x0a, 0x08, 0x63, 0x6f, 0x6d, 0x2e,
0x6c, 0x69, 0x6b, 0x65, 0x42, 0x09, 0x4c, 0x69, 0x6b, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50,
0x01, 0x5a, 0x11, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2f, 0x6c, 0x69, 0x6b, 0x65, 0x3b,
0x6c, 0x69, 0x6b, 0x65, 0xa2, 0x02, 0x03, 0x4c, 0x58, 0x58, 0xaa, 0x02, 0x04, 0x4c, 0x69, 0x6b,
0x65, 0xca, 0x02, 0x04, 0x4c, 0x69, 0x6b, 0x65, 0xe2, 0x02, 0x10, 0x4c, 0x69, 0x6b, 0x65, 0x5c,
0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x04, 0x4c, 0x69,
0x6b, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_like_like_proto_rawDescOnce sync.Once
file_like_like_proto_rawDescData = file_like_like_proto_rawDesc
)
func file_like_like_proto_rawDescGZIP() []byte {
file_like_like_proto_rawDescOnce.Do(func() {
file_like_like_proto_rawDescData = protoimpl.X.CompressGZIP(file_like_like_proto_rawDescData)
})
return file_like_like_proto_rawDescData
}
var file_like_like_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
var file_like_like_proto_goTypes = []interface{}{
(LikeType)(0), // 0: like.LikeType
}
var file_like_like_proto_depIdxs = []int32{
0, // [0:0] is the sub-list for method output_type
0, // [0:0] is the sub-list for method input_type
0, // [0:0] is the sub-list for extension type_name
0, // [0:0] is the sub-list for extension extendee
0, // [0:0] is the sub-list for field type_name
}
func init() { file_like_like_proto_init() }
func file_like_like_proto_init() {
if File_like_like_proto != nil {
return
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_like_like_proto_rawDesc,
NumEnums: 1,
NumMessages: 0,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_like_like_proto_goTypes,
DependencyIndexes: file_like_like_proto_depIdxs,
EnumInfos: file_like_like_proto_enumTypes,
}.Build()
File_like_like_proto = out.File
file_like_like_proto_rawDesc = nil
file_like_like_proto_goTypes = nil
file_like_like_proto_depIdxs = nil
}
================================================
FILE: _examples/11_multi_service/main_test.go
================================================
package main_test
import (
"context"
"example/favorite"
"log/slog"
"os"
"testing"
"github.com/google/go-cmp/cmp"
"github.com/google/go-cmp/cmp/cmpopts"
"go.opentelemetry.io/otel"
"go.opentelemetry.io/otel/attribute"
"go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc"
"go.opentelemetry.io/otel/propagation"
"go.opentelemetry.io/otel/sdk/resource"
sdktrace "go.opentelemetry.io/otel/sdk/trace"
semconv "go.opentelemetry.io/otel/semconv/v1.4.0"
"go.uber.org/goleak"
"example/federation"
)
type Resolver struct {
*federation.OtherServiceUnimplementedResolver
}
var otherServicePostData = &federation.Post{
Id: "abcd",
Title: "tttt",
Content: "xxxx",
User: &federation.User{
Id: "yyyy",
Name: "zzzz",
},
}
func (r *Resolver) Resolve_Federation_GetResponse_Post(_ context.Context, _ *federation.OtherService_Federation_GetResponse_PostArgument) (*federation.Post, error) {
return otherServicePostData, nil
}
func TestFederation(t *testing.T) {
defer goleak.VerifyNone(t)
ctx := context.Background()
if os.Getenv("ENABLE_JAEGER") != "" {
exporter, err := otlptracegrpc.New(ctx, otlptracegrpc.WithInsecure())
if err != nil {
t.Fatal(err)
}
tp := sdktrace.NewTracerProvider(
sdktrace.WithBatcher(exporter),
sdktrace.WithResource(
resource.NewWithAttributes(
semconv.SchemaURL,
semconv.ServiceNameKey.String("example11/multi_service"),
semconv.ServiceVersionKey.String("1.0.0"),
attribute.String("environment", "dev"),
),
),
sdktrace.WithSampler(sdktrace.AlwaysSample()),
)
defer tp.Shutdown(ctx)
otel.SetTextMapPropagator(propagation.TraceContext{})
otel.SetTracerProvider(tp)
}
logger := slog.New(slog.NewJSONHandler(os.Stdout, &slog.HandlerOptions{
Level: slog.LevelDebug,
}))
t.Run("federation", func(t *testing.T) {
var (
requestID = "foo"
expectedGetPostResp = &federation.GetPostResponse{
Post: &federation.Post{
Id: "post-id",
Title: "title",
Content: "content",
User: &federation.User{
Id: requestID,
Name: "bar",
},
Reaction: &federation.Reaction{
FavoriteType: favorite.FavoriteType_TYPE1,
FavoriteTypeStr: "TYPE1",
Cmp: true,
},
FavoriteValue: federation.MyFavoriteType_TYPE1,
Cmp: true,
},
UpperName: "FEDERATION",
Foo: &federation.GetPostResponse_Foo{X: "x"},
}
expectedGetNameResp = &federation.GetNameResponse{
Name: "federation",
Foo: &federation.GetNameResponse_Foo{Y: "y"},
}
)
svc, err := federation.NewFederationService(federation.FederationServiceConfig{
Logger: logger,
})
if err != nil {
t.Fatal(err)
}
defer federation.CleanupFederationService(ctx, svc)
gotGetPostResp, err := svc.GetPost(ctx, &federation.GetPostRequest{Id: requestID})
if err != nil {
t.Fatal(err)
}
if diff := cmp.Diff(
gotGetPostResp, expectedGetPostResp,
cmpopts.IgnoreUnexported(
federation.GetPostResponse{},
federation.Post{},
federation.User{},
federation.Reaction{},
federation.GetPostResponse_Foo{},
),
); diff != "" {
t.Errorf("(-got, +want)\n%s", diff)
}
gotGetNameResp, err := svc.GetName(ctx, &federation.GetNameRequest{})
if err != nil {
t.Fatal(err)
}
if diff := cmp.Diff(
gotGetNameResp, expectedGetNameResp,
cmpopts.IgnoreUnexported(
federation.GetNameResponse{},
federation.GetNameResponse_Foo{},
),
); diff != "" {
t.Errorf("(-got, +want)\n%s", diff)
}
})
t.Run("debug", func(t *testing.T) {
expected := &federation.GetStatusResponse{
User: &federation.User{
Id: "xxxx",
Name: "yyyy",
},
}
svc, err := federation.NewDebugService(federation.DebugServiceConfig{
Logger: logger,
})
if err != nil {
t.Fatal(err)
}
defer federation.CleanupDebugService(ctx, svc)
got, err := svc.GetStatus(ctx, &federation.GetStatusRequest{})
if err != nil {
t.Fatal(err)
}
if diff := cmp.Diff(
got, expected,
cmpopts.IgnoreUnexported(federation.GetStatusResponse{}, federation.User{}),
); diff != "" {
t.Errorf("(-got, +want)\n%s", diff)
}
})
t.Run("private", func(t *testing.T) {
expected := &federation.GetNameResponse{
Name: "private",
Foo: &federation.GetNameResponse_Foo{Y: "y"},
}
svc, err := federation.NewPrivateService(federation.PrivateServiceConfig{
Logger: logger,
})
if err != nil {
t.Fatal(err)
}
defer federation.CleanupPrivateService(ctx, svc)
got, err := svc.GetName(ctx, &federation.GetNameRequest{})
if err != nil {
t.Fatal(err)
}
if diff := cmp.Diff(
got, expected,
cmpopts.IgnoreUnexported(federation.GetNameResponse{}, federation.GetNameResponse_Foo{}),
); diff != "" {
t.Errorf("(-got, +want)\n%s", diff)
}
})
t.Run("other", func(t *testing.T) {
expected := &federation.GetResponse{
Post: otherServicePostData,
}
svc, err := federation.NewOtherService(federation.OtherServiceConfig{
Logger: logger,
Resolver: new(Resolver),
})
if err != nil {
t.Fatal(err)
}
defer federation.CleanupOtherService(ctx, svc)
got, err := svc.Get(ctx, &federation.GetRequest{})
if err != nil {
t.Fatal(err)
}
if diff := cmp.Diff(
got, expected,
cmpopts.IgnoreUnexported(federation.GetResponse{}, federation.Post{}, federation.User{}),
); diff != "" {
t.Errorf("(-got, +want)\n%s", diff)
}
})
}
================================================
FILE: _examples/11_multi_service/proto/buf.yaml
================================================
version: v1
breaking:
use:
- FILE
lint:
use:
- DEFAULT
================================================
FILE: _examples/11_multi_service/proto/comment/comment.proto
================================================
syntax = "proto3";
package comment;
option go_package = "example/comment;comment";
enum CommentType {
UNKNOWN = 0;
TYPE1 = 1;
TYPE2 = 2;
}
================================================
FILE: _examples/11_multi_service/proto/favorite/favorite.proto
================================================
syntax = "proto3";
package favorite;
import "grpc/federation/federation.proto";
option go_package = "example/favorite;favorite";
enum FavoriteType {
option (grpc.federation.enum).alias = "favorite.FavoriteType";
UNKNOWN = 0;
TYPE1 = 1;
TYPE2 = 2;
}
================================================
FILE: _examples/11_multi_service/proto/federation/federation.proto
================================================
syntax = "proto3";
package federation;
import "grpc/federation/federation.proto";
import "federation/reaction.proto";
option go_package = "example/federation;federation";
option (grpc.federation.file) = {
import: ["favorite/favorite.proto"]
};
service FederationService {
option (grpc.federation.service) = {
env {
var {
name: "name"
type { kind: STRING }
option {
default: "federation"
}
}
var {
name: "federation"
type { kind: STRING }
}
}
var {
name: "upper_name"
by: "grpc.federation.strings.toUpper(grpc.federation.env.name)"
}
var {
name: "federation_service_variable"
by: "1"
}
var {
validation {
if: "grpc.federation.env.name == ''"
message: "'name environment variable is unspecified'"
}
}
var {
name: "foo_bar_baz"
by: "{'a': true}"
}
};
rpc GetPost(GetPostRequest) returns (GetPostResponse) {};
rpc GetName(GetNameRequest) returns (GetNameResponse) {};
}
service PrivateService {
option (grpc.federation.service) = {
env {
var {
name: "name"
type { kind: STRING }
option {
default: "private"
}
}
var {
name: "private"
type { kind: STRING }
}
}
var {
name: "upper_name"
by: "grpc.federation.strings.toUpper(grpc.federation.env.name)"
}
var {
name: "private_service_enum"
enum {
name: "MyFavoriteType"
by: "favorite.FavoriteType.value('TYPE_1')"
}
}
var {
name: "private_service_user"
message {
name: "User"
args [
{name: "id" by: "'private_service_user_id'"},
{name: "name" by: "'private_service_user_name'"}
]
}
}
var { name: "users" by: "[private_service_user]"}
var {
name: "private_service_user_names"
map {
iterator {
name: "iter"
src: "users"
}
by: "iter.name"
}
}
var {
name: "foo_bar_baz"
by: "{'b': true}"
}
};
rpc GetPost(GetPostRequest) returns (GetPostResponse) {};
rpc GetName(GetNameRequest) returns (GetNameResponse) {};
}
service DebugService {
option (grpc.federation.service) = {};
rpc GetStatus(GetStatusRequest) returns (GetStatusResponse) {};
}
message GetPostRequest {
string id = 1;
}
message GetPostResponse {
option (grpc.federation.message) = {
def {
name: "p"
message { name: "Post" }
}
def { name: "foo" message {name: "GetPostResponse.Foo"} }
};
Post post = 1 [(grpc.federation.field).by = "p"];
string upper_name = 2 [(grpc.federation.field).by = "grpc.federation.var.upper_name"];
message Foo {
string x = 1 [(grpc.federation.field).by = "'x'"];
}
GetPostResponse.Foo foo = 3 [(grpc.federation.field).by = "foo"];
}
message Post {
option (grpc.federation.message).def = {
name: "u"
message {
name: "User"
args { name: "id", by: "'foo'" }
args { name: "name", by: "'bar'" }
}
};
option (grpc.federation.message).def = {
name: "favorite_value" by: "favorite.FavoriteType.value('TYPE1')"
};
option (grpc.federation.message).def = {
name: "cmp" by: "favorite_value == favorite.FavoriteType.TYPE1"
};
option (grpc.federation.message).def = {
name: "reaction"
message {
name: "Reaction"
args { name: "v" by: "favorite_value" }
}
};
string id = 1 [(grpc.federation.field).by = "'post-id'"];
string title = 2 [(grpc.federation.field).by = "'title'"];
string content = 3 [(grpc.federation.field).by = "'content'"];
User user = 4 [(grpc.federation.field).by = "u"];
Reaction reaction = 5 [(grpc.federation.field).by = "reaction"];
MyFavoriteType favorite_value = 6 [(grpc.federation.field).by = "favorite_value"];
bool cmp = 7 [(grpc.federation.field).by = "cmp"];
}
enum MyFavoriteType {
option (grpc.federation.enum).alias = "favorite.FavoriteType";
UNKNOWN = 0 [(grpc.federation.enum_value).alias = "UNKNOWN"];
TYPE1 = 5000 [(grpc.federation.enum_value).alias = "TYPE1"];
}
message User {
string id = 1 [(grpc.federation.field).by = "$.id"];
string name = 2 [(grpc.federation.field).by = "$.name"];
}
message GetNameRequest {
}
message GetNameResponse {
option (grpc.federation.message) = {
def { name: "foo" message {name: "GetNameResponse.Foo"} }
};
string name = 1 [(grpc.federation.field).by = "grpc.federation.env.name"];
message Foo {
string y = 1 [(grpc.federation.field).by = "'y'"];
}
GetNameResponse.Foo foo = 2 [(grpc.federation.field).by = "foo"];
}
message GetStatusRequest {
}
message GetStatusResponse {
option (grpc.federation.message).def = {
name: "u"
message {
name: "User"
args { name: "id", by: "'xxxx'" }
args { name: "name", by: "'yyyy'" }
}
};
User user = 1 [(grpc.federation.field).by = "u"];
}
================================================
FILE: _examples/11_multi_service/proto/federation/other.proto
================================================
syntax = "proto3";
package federation;
import "grpc/federation/federation.proto";
import "federation/federation.proto";
option go_package = "example/federation;federation";
service OtherService {
option (grpc.federation.service) = {};
rpc Get(GetRequest) returns (GetResponse) {};
}
message GetRequest {
string id = 1;
}
message GetResponse {
option (grpc.federation.message).def = {
name: "p"
message { name: "Post" }
};
Post post = 1 [(grpc.federation.field).custom_resolver = true];
}
================================================
FILE: _examples/11_multi_service/proto/federation/reaction.proto
================================================
syntax = "proto3";
package federation;
import "grpc/federation/federation.proto";
import "favorite/favorite.proto";
option go_package = "example/federation;federation";
message Reaction {
option (grpc.federation.message) = {
def { name: "cmp" by: "$.v == favorite.FavoriteType.TYPE1" }
};
favorite.FavoriteType favorite_type = 1 [(grpc.federation.field).by = "favorite.FavoriteType.value('TYPE1')"];
string favorite_type_str = 2 [(grpc.federation.field).by = "favorite.FavoriteType.name(favorite.FavoriteType.value('TYPE1'))"];
bool cmp = 3 [(grpc.federation.field).by = "cmp"];
}
================================================
FILE: _examples/12_validation/.gitignore
================================================
grpc/federation
================================================
FILE: _examples/12_validation/.vscode/settings.json
================================================
{
"protoc": {
"options": [
"--proto_path=proto",
"--proto_path=proto_deps"
]
},
"grpc-federation": {
"path": "../../bin/grpc-federation-language-server",
"import-paths": [
"proto",
"proto_deps"
]
}
}
================================================
FILE: _examples/12_validation/Makefile
================================================
MAKEFILE_DIR := $(dir $(lastword $(MAKEFILE_LIST)))
GOBIN := $(MAKEFILE_DIR)/../../bin
PATH := $(GOBIN):$(PATH)
.PHONY: generate
generate:
$(GOBIN)/buf generate
.PHONY: lint
lint:
@$(GOBIN)/grpc-federation-linter -Iproto -Iproto_deps ./proto/federation/federation.proto
.PHONY: test
test:
go test -race ./ -count=1
================================================
FILE: _examples/12_validation/buf.gen.yaml
================================================
version: v1
managed:
enabled: true
plugins:
- plugin: go
out: .
opt: paths=source_relative
- plugin: go-grpc
out: .
opt: paths=source_relative
- plugin: grpc-federation
out: .
opt: paths=source_relative
================================================
FILE: _examples/12_validation/buf.work.yaml
================================================
version: v1
directories:
- proto
- proto_deps
================================================
FILE: _examples/12_validation/federation/federation.pb.go
================================================
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.33.0
// protoc (unknown)
// source: federation/federation.proto
package federation
import (
_ "github.com/mercari/grpc-federation/grpc/federation"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
_ "google.golang.org/protobuf/types/known/anypb"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
type GetPostRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
}
func (x *GetPostRequest) Reset() {
*x = GetPostRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_federation_federation_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GetPostRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetPostRequest) ProtoMessage() {}
func (x *GetPostRequest) ProtoReflect() protoreflect.Message {
mi := &file_federation_federation_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GetPostRequest.ProtoReflect.Descriptor instead.
func (*GetPostRequest) Descriptor() ([]byte, []int) {
return file_federation_federation_proto_rawDescGZIP(), []int{0}
}
func (x *GetPostRequest) GetId() string {
if x != nil {
return x.Id
}
return ""
}
type GetPostResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Post *Post `protobuf:"bytes,1,opt,name=post,proto3" json:"post,omitempty"`
}
func (x *GetPostResponse) Reset() {
*x = GetPostResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_federation_federation_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GetPostResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetPostResponse) ProtoMessage() {}
func (x *GetPostResponse) ProtoReflect() protoreflect.Message {
mi := &file_federation_federation_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GetPostResponse.ProtoReflect.Descriptor instead.
func (*GetPostResponse) Descriptor() ([]byte, []int) {
return file_federation_federation_proto_rawDescGZIP(), []int{1}
}
func (x *GetPostResponse) GetPost() *Post {
if x != nil {
return x.Post
}
return nil
}
type Post struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
Title string `protobuf:"bytes,2,opt,name=title,proto3" json:"title,omitempty"`
Content string `protobuf:"bytes,3,opt,name=content,proto3" json:"content,omitempty"`
Item *Item `protobuf:"bytes,4,opt,name=item,proto3" json:"item,omitempty"`
}
func (x *Post) Reset() {
*x = Post{}
if protoimpl.UnsafeEnabled {
mi := &file_federation_federation_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Post) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Post) ProtoMessage() {}
func (x *Post) ProtoReflect() protoreflect.Message {
mi := &file_federation_federation_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Post.ProtoReflect.Descriptor instead.
func (*Post) Descriptor() ([]byte, []int) {
return file_federation_federation_proto_rawDescGZIP(), []int{2}
}
func (x *Post) GetId() string {
if x != nil {
return x.Id
}
return ""
}
func (x *Post) GetTitle() string {
if x != nil {
return x.Title
}
return ""
}
func (x *Post) GetContent() string {
if x != nil {
return x.Content
}
return ""
}
func (x *Post) GetItem() *Item {
if x != nil {
return x.Item
}
return nil
}
type Item struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
ItemId int32 `protobuf:"varint,1,opt,name=item_id,json=itemId,proto3" json:"item_id,omitempty"`
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
}
func (x *Item) Reset() {
*x = Item{}
if protoimpl.UnsafeEnabled {
mi := &file_federation_federation_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Item) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Item) ProtoMessage() {}
func (x *Item) ProtoReflect() protoreflect.Message {
mi := &file_federation_federation_proto_msgTypes[3]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Item.ProtoReflect.Descriptor instead.
func (*Item) Descriptor() ([]byte, []int) {
return file_federation_federation_proto_rawDescGZIP(), []int{3}
}
func (x *Item) GetItemId() int32 {
if x != nil {
return x.ItemId
}
return 0
}
func (x *Item) GetName() string {
if x != nil {
return x.Name
}
return ""
}
type CustomMessage struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"`
}
func (x *CustomMessage) Reset() {
*x = CustomMessage{}
if protoimpl.UnsafeEnabled {
mi := &file_federation_federation_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *CustomMessage) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CustomMessage) ProtoMessage() {}
func (x *CustomMessage) ProtoReflect() protoreflect.Message {
mi := &file_federation_federation_proto_msgTypes[4]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use CustomMessage.ProtoReflect.Descriptor instead.
func (*CustomMessage) Descriptor() ([]byte, []int) {
return file_federation_federation_proto_rawDescGZIP(), []int{4}
}
func (x *CustomMessage) GetMessage() string {
if x != nil {
return x.Message
}
return ""
}
type CustomHandlerMessage struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
}
func (x *CustomHandlerMessage) Reset() {
*x = CustomHandlerMessage{}
if protoimpl.UnsafeEnabled {
mi := &file_federation_federation_proto_msgTypes[5]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *CustomHandlerMessage) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CustomHandlerMessage) ProtoMessage() {}
func (x *CustomHandlerMessage) ProtoReflect() protoreflect.Message {
mi := &file_federation_federation_proto_msgTypes[5]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use CustomHandlerMessage.ProtoReflect.Descriptor instead.
func (*CustomHandlerMessage) Descriptor() ([]byte, []int) {
return file_federation_federation_proto_rawDescGZIP(), []int{5}
}
var File_federation_federation_proto protoreflect.FileDescriptor
var file_federation_federation_proto_rawDesc = []byte{
0x0a, 0x1b, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x66, 0x65, 0x64,
0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0e, 0x6f,
0x72, 0x67, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x19, 0x67,
0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x61,
0x6e, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x20, 0x67, 0x72, 0x70, 0x63, 0x2f, 0x66,
0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61,
0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x20, 0x0a, 0x0e, 0x47, 0x65,
0x74, 0x50, 0x6f, 0x73, 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, 0xb6, 0x07, 0x0a,
0x0f, 0x47, 0x65, 0x74, 0x50, 0x6f, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
0x12, 0x33, 0x0a, 0x04, 0x70, 0x6f, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14,
0x2e, 0x6f, 0x72, 0x67, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e,
0x50, 0x6f, 0x73, 0x74, 0x42, 0x09, 0x9a, 0x4a, 0x06, 0x12, 0x04, 0x70, 0x6f, 0x73, 0x74, 0x52,
0x04, 0x70, 0x6f, 0x73, 0x74, 0x3a, 0xed, 0x06, 0x9a, 0x4a, 0xe9, 0x06, 0x0a, 0x0e, 0x0a, 0x04,
0x70, 0x6f, 0x73, 0x74, 0x6a, 0x06, 0x0a, 0x04, 0x50, 0x6f, 0x73, 0x74, 0x0a, 0x3a, 0x0a, 0x0d,
0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x72, 0x6a, 0x29, 0x0a,
0x14, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x72, 0x4d, 0x65,
0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x11, 0x0a, 0x03, 0x61, 0x72, 0x67, 0x12, 0x0a, 0x27, 0x73,
0x6f, 0x6d, 0x65, 0x2d, 0x61, 0x72, 0x67, 0x27, 0x0a, 0x3b, 0x0a, 0x0d, 0x63, 0x75, 0x73, 0x74,
0x6f, 0x6d, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x6a, 0x2a, 0x0a, 0x0d, 0x43, 0x75, 0x73,
0x74, 0x6f, 0x6d, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x19, 0x0a, 0x07, 0x6d, 0x65,
0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x0e, 0x27, 0x73, 0x6f, 0x6d, 0x65, 0x2d, 0x6d, 0x65, 0x73,
0x73, 0x61, 0x67, 0x65, 0x27, 0x0a, 0x33, 0x7a, 0x31, 0x12, 0x2f, 0x12, 0x14, 0x70, 0x6f, 0x73,
0x74, 0x2e, 0x69, 0x64, 0x20, 0x21, 0x3d, 0x20, 0x27, 0x73, 0x6f, 0x6d, 0x65, 0x2d, 0x69, 0x64,
0x27, 0x18, 0x09, 0x22, 0x15, 0x27, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e,
0x31, 0x20, 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x21, 0x27, 0x0a, 0x33, 0x7a, 0x31, 0x12, 0x2f,
0x12, 0x14, 0x70, 0x6f, 0x73, 0x74, 0x2e, 0x69, 0x64, 0x20, 0x21, 0x3d, 0x20, 0x27, 0x73, 0x6f,
0x6d, 0x65, 0x2d, 0x69, 0x64, 0x27, 0x18, 0x09, 0x22, 0x15, 0x27, 0x76, 0x61, 0x6c, 0x69, 0x64,
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x32, 0x20, 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x21, 0x27, 0x0a,
0xbb, 0x02, 0x7a, 0xb8, 0x02, 0x12, 0xb5, 0x02, 0x0a, 0x36, 0x5a, 0x34, 0x67, 0x72, 0x70, 0x63,
0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x6c, 0x6f, 0x67, 0x2e,
0x61, 0x64, 0x64, 0x28, 0x7b, 0x27, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e,
0x33, 0x5f, 0x61, 0x74, 0x74, 0x72, 0x73, 0x27, 0x3a, 0x20, 0x74, 0x72, 0x75, 0x65, 0x7d, 0x29,
0x12, 0x14, 0x24, 0x2e, 0x69, 0x64, 0x20, 0x21, 0x3d, 0x20, 0x27, 0x63, 0x6f, 0x72, 0x72, 0x65,
0x63, 0x74, 0x2d, 0x69, 0x64, 0x27, 0x18, 0x09, 0x22, 0x15, 0x27, 0x76, 0x61, 0x6c, 0x69, 0x64,
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x33, 0x20, 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x21, 0x27, 0x2a,
0xc9, 0x01, 0x1a, 0x26, 0x0a, 0x0d, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x4d, 0x65, 0x73, 0x73,
0x61, 0x67, 0x65, 0x12, 0x15, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x0a,
0x27, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x31, 0x27, 0x1a, 0x26, 0x0a, 0x0d, 0x43, 0x75,
0x73, 0x74, 0x6f, 0x6d, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x15, 0x0a, 0x07, 0x6d,
0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x0a, 0x27, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65,
0x32, 0x27, 0x42, 0x24, 0x0a, 0x22, 0x0a, 0x07, 0x27, 0x74, 0x79, 0x70, 0x65, 0x31, 0x27, 0x12,
0x07, 0x70, 0x6f, 0x73, 0x74, 0x2e, 0x69, 0x64, 0x1a, 0x0e, 0x27, 0x64, 0x65, 0x73, 0x63, 0x72,
0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x31, 0x27, 0x4a, 0x1b, 0x0a, 0x19, 0x0a, 0x07, 0x70, 0x6f,
0x73, 0x74, 0x2e, 0x69, 0x64, 0x12, 0x0e, 0x27, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74,
0x69, 0x6f, 0x6e, 0x32, 0x27, 0x6a, 0x15, 0x0a, 0x05, 0x65, 0x6e, 0x2d, 0x55, 0x53, 0x12, 0x0c,
0x70, 0x6f, 0x73, 0x74, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x72, 0x1d, 0x43, 0x75,
0x73, 0x74, 0x6f, 0x6d, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x7b, 0x6d, 0x65, 0x73, 0x73,
0x61, 0x67, 0x65, 0x3a, 0x20, 0x27, 0x66, 0x6f, 0x6f, 0x27, 0x7d, 0x40, 0x03, 0x0a, 0x4b, 0x7a,
0x49, 0x12, 0x47, 0x0a, 0x21, 0x0a, 0x09, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e,
0x5a, 0x14, 0x70, 0x6f, 0x73, 0x74, 0x2e, 0x69, 0x64, 0x20, 0x21, 0x3d, 0x20, 0x27, 0x73, 0x6f,
0x6d, 0x65, 0x2d, 0x69, 0x64, 0x27, 0x12, 0x09, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f,
0x6e, 0x18, 0x09, 0x22, 0x15, 0x27, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e,
0x34, 0x20, 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x21, 0x27, 0x0a, 0x57, 0x0a, 0x17, 0x63, 0x75,
0x73, 0x74, 0x6f, 0x6d, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x56, 0x61, 0x6c, 0x69, 0x64,
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x7a, 0x3c, 0x12, 0x3a, 0x12, 0x1b, 0x63, 0x75, 0x73, 0x74, 0x6f,
0x6d, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65,
0x20, 0x3d, 0x3d, 0x20, 0x27, 0x27, 0x18, 0x0d, 0x22, 0x19, 0x27, 0x63, 0x75, 0x73, 0x74, 0x6f,
0x6d, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x20, 0x69, 0x73, 0x20, 0x65, 0x6d, 0x70,
0x74, 0x79, 0x27, 0x0a, 0x29, 0x7a, 0x27, 0x12, 0x25, 0x12, 0x11, 0x70, 0x6f, 0x73, 0x74, 0x2e,
0x69, 0x74, 0x65, 0x6d, 0x20, 0x3d, 0x3d, 0x20, 0x6e, 0x75, 0x6c, 0x6c, 0x18, 0x0d, 0x22, 0x0e,
0x27, 0x69, 0x74, 0x65, 0x6d, 0x20, 0x69, 0x73, 0x20, 0x6e, 0x75, 0x6c, 0x6c, 0x27, 0x0a, 0x31,
0x7a, 0x2f, 0x12, 0x2d, 0x12, 0x16, 0x70, 0x6f, 0x73, 0x74, 0x2e, 0x69, 0x74, 0x65, 0x6d, 0x2e,
0x69, 0x74, 0x65, 0x6d, 0x5f, 0x69, 0x64, 0x20, 0x3d, 0x3d, 0x20, 0x30, 0x18, 0x0d, 0x22, 0x11,
0x27, 0x69, 0x74, 0x65, 0x6d, 0x20, 0x69, 0x64, 0x20, 0x69, 0x73, 0x20, 0x7a, 0x65, 0x72, 0x6f,
0x27, 0x0a, 0x32, 0x7a, 0x30, 0x12, 0x2e, 0x12, 0x14, 0x70, 0x6f, 0x73, 0x74, 0x2e, 0x69, 0x74,
0x65, 0x6d, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x20, 0x3d, 0x3d, 0x20, 0x27, 0x27, 0x18, 0x0d, 0x22,
0x14, 0x27, 0x69, 0x74, 0x65, 0x6d, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x20, 0x69, 0x73, 0x20, 0x65,
0x6d, 0x70, 0x74, 0x79, 0x27, 0x22, 0xd3, 0x01, 0x0a, 0x04, 0x50, 0x6f, 0x73, 0x74, 0x12, 0x1e,
0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0e, 0x9a, 0x4a, 0x0b, 0x12,
0x09, 0x27, 0x73, 0x6f, 0x6d, 0x65, 0x2d, 0x69, 0x64, 0x27, 0x52, 0x02, 0x69, 0x64, 0x12, 0x27,
0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x11, 0x9a,
0x4a, 0x0e, 0x12, 0x0c, 0x27, 0x73, 0x6f, 0x6d, 0x65, 0x2d, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x27,
0x52, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x12, 0x2d, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65,
0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x13, 0x9a, 0x4a, 0x10, 0x12, 0x0e, 0x27,
0x73, 0x6f, 0x6d, 0x65, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x27, 0x52, 0x07, 0x63,
0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, 0x53, 0x0a, 0x04, 0x69, 0x74, 0x65, 0x6d, 0x18, 0x04,
0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6f, 0x72, 0x67, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72,
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x49, 0x74, 0x65, 0x6d, 0x42, 0x29, 0x9a, 0x4a, 0x26, 0x12,
0x24, 0x49, 0x74, 0x65, 0x6d, 0x7b, 0x69, 0x74, 0x65, 0x6d, 0x5f, 0x69, 0x64, 0x3a, 0x20, 0x32,
0x2c, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3a, 0x20, 0x27, 0x69, 0x74, 0x65, 0x6d, 0x2d, 0x6e, 0x61,
0x6d, 0x65, 0x32, 0x27, 0x7d, 0x52, 0x04, 0x69, 0x74, 0x65, 0x6d, 0x22, 0x4d, 0x0a, 0x04, 0x49,
0x74, 0x65, 0x6d, 0x12, 0x1f, 0x0a, 0x07, 0x69, 0x74, 0x65, 0x6d, 0x5f, 0x69, 0x64, 0x18, 0x01,
0x20, 0x01, 0x28, 0x05, 0x42, 0x06, 0x9a, 0x4a, 0x03, 0x12, 0x01, 0x31, 0x52, 0x06, 0x69, 0x74,
0x65, 0x6d, 0x49, 0x64, 0x12, 0x24, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01,
0x28, 0x09, 0x42, 0x10, 0x9a, 0x4a, 0x0d, 0x12, 0x0b, 0x27, 0x69, 0x74, 0x65, 0x6d, 0x2d, 0x6e,
0x61, 0x6d, 0x65, 0x27, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x39, 0x0a, 0x0d, 0x43, 0x75,
0x73, 0x74, 0x6f, 0x6d, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x28, 0x0a, 0x07, 0x6d,
0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0e, 0x9a, 0x4a,
0x0b, 0x12, 0x09, 0x24, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x07, 0x6d, 0x65,
0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x37, 0x0a, 0x14, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x48,
0x61, 0x6e, 0x64, 0x6c, 0x65, 0x72, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x3a, 0x1f, 0x9a,
0x4a, 0x1c, 0x0a, 0x18, 0x7a, 0x16, 0x12, 0x14, 0x12, 0x10, 0x24, 0x2e, 0x61, 0x72, 0x67, 0x20,
0x3d, 0x3d, 0x20, 0x27, 0x77, 0x72, 0x6f, 0x6e, 0x67, 0x27, 0x18, 0x09, 0x10, 0x01, 0x32, 0x66,
0x0a, 0x11, 0x46, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76,
0x69, 0x63, 0x65, 0x12, 0x4c, 0x0a, 0x07, 0x47, 0x65, 0x74, 0x50, 0x6f, 0x73, 0x74, 0x12, 0x1e,
0x2e, 0x6f, 0x72, 0x67, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e,
0x47, 0x65, 0x74, 0x50, 0x6f, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f,
0x2e, 0x6f, 0x72, 0x67, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e,
0x47, 0x65, 0x74, 0x50, 0x6f, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22,
0x00, 0x1a, 0x03, 0x9a, 0x4a, 0x00, 0x42, 0x9d, 0x01, 0x0a, 0x12, 0x63, 0x6f, 0x6d, 0x2e, 0x6f,
0x72, 0x67, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x0f, 0x46,
0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01,
0x5a, 0x1d, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2f, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61,
0x74, 0x69, 0x6f, 0x6e, 0x3b, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0xa2,
0x02, 0x03, 0x4f, 0x46, 0x58, 0xaa, 0x02, 0x0e, 0x4f, 0x72, 0x67, 0x2e, 0x46, 0x65, 0x64, 0x65,
0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0xca, 0x02, 0x0e, 0x4f, 0x72, 0x67, 0x5c, 0x46, 0x65, 0x64,
0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0xe2, 0x02, 0x1a, 0x4f, 0x72, 0x67, 0x5c, 0x46, 0x65,
0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61,
0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0f, 0x4f, 0x72, 0x67, 0x3a, 0x3a, 0x46, 0x65, 0x64, 0x65,
0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_federation_federation_proto_rawDescOnce sync.Once
file_federation_federation_proto_rawDescData = file_federation_federation_proto_rawDesc
)
func file_federation_federation_proto_rawDescGZIP() []byte {
file_federation_federation_proto_rawDescOnce.Do(func() {
file_federation_federation_proto_rawDescData = protoimpl.X.CompressGZIP(file_federation_federation_proto_rawDescData)
})
return file_federation_federation_proto_rawDescData
}
var file_federation_federation_proto_msgTypes = make([]protoimpl.MessageInfo, 6)
var file_federation_federation_proto_goTypes = []interface{}{
(*GetPostRequest)(nil), // 0: org.federation.GetPostRequest
(*GetPostResponse)(nil), // 1: org.federation.GetPostResponse
(*Post)(nil), // 2: org.federation.Post
(*Item)(nil), // 3: org.federation.Item
(*CustomMessage)(nil), // 4: org.federation.CustomMessage
(*CustomHandlerMessage)(nil), // 5: org.federation.CustomHandlerMessage
}
var file_federation_federation_proto_depIdxs = []int32{
2, // 0: org.federation.GetPostResponse.post:type_name -> org.federation.Post
3, // 1: org.federation.Post.item:type_name -> org.federation.Item
0, // 2: org.federation.FederationService.GetPost:input_type -> org.federation.GetPostRequest
1, // 3: org.federation.FederationService.GetPost:output_type -> org.federation.GetPostResponse
3, // [3:4] is the sub-list for method output_type
2, // [2:3] is the sub-list for method input_type
2, // [2:2] is the sub-list for extension type_name
2, // [2:2] is the sub-list for extension extendee
0, // [0:2] is the sub-list for field type_name
}
func init() { file_federation_federation_proto_init() }
func file_federation_federation_proto_init() {
if File_federation_federation_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_federation_federation_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetPostRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_federation_federation_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetPostResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_federation_federation_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Post); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_federation_federation_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Item); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_federation_federation_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CustomMessage); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_federation_federation_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CustomHandlerMessage); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_federation_federation_proto_rawDesc,
NumEnums: 0,
NumMessages: 6,
NumExtensions: 0,
NumServices: 1,
},
GoTypes: file_federation_federation_proto_goTypes,
DependencyIndexes: file_federation_federation_proto_depIdxs,
MessageInfos: file_federation_federation_proto_msgTypes,
}.Build()
File_federation_federation_proto = out.File
file_federation_federation_proto_rawDesc = nil
file_federation_federation_proto_goTypes = nil
file_federation_federation_proto_depIdxs = nil
}
================================================
FILE: _examples/12_validation/federation/federation_grpc.pb.go
================================================
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.3.0
// - protoc (unknown)
// source: federation/federation.proto
package federation
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 (
FederationService_GetPost_FullMethodName = "/org.federation.FederationService/GetPost"
)
// FederationServiceClient is the client API for FederationService 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 FederationServiceClient interface {
GetPost(ctx context.Context, in *GetPostRequest, opts ...grpc.CallOption) (*GetPostResponse, error)
}
type federationServiceClient struct {
cc grpc.ClientConnInterface
}
func NewFederationServiceClient(cc grpc.ClientConnInterface) FederationServiceClient {
return &federationServiceClient{cc}
}
func (c *federationServiceClient) GetPost(ctx context.Context, in *GetPostRequest, opts ...grpc.CallOption) (*GetPostResponse, error) {
out := new(GetPostResponse)
err := c.cc.Invoke(ctx, FederationService_GetPost_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// FederationServiceServer is the server API for FederationService service.
// All implementations must embed UnimplementedFederationServiceServer
// for forward compatibility
type FederationServiceServer interface {
GetPost(context.Context, *GetPostRequest) (*GetPostResponse, error)
mustEmbedUnimplementedFederationServiceServer()
}
// UnimplementedFederationServiceServer must be embedded to have forward compatible implementations.
type UnimplementedFederationServiceServer struct {
}
func (UnimplementedFederationServiceServer) GetPost(context.Context, *GetPostRequest) (*GetPostResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetPost not implemented")
}
func (UnimplementedFederationServiceServer) mustEmbedUnimplementedFederationServiceServer() {}
// UnsafeFederationServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to FederationServiceServer will
// result in compilation errors.
type UnsafeFederationServiceServer interface {
mustEmbedUnimplementedFederationServiceServer()
}
func RegisterFederationServiceServer(s grpc.ServiceRegistrar, srv FederationServiceServer) {
s.RegisterService(&FederationService_ServiceDesc, srv)
}
func _FederationService_GetPost_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetPostRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(FederationServiceServer).GetPost(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: FederationService_GetPost_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(FederationServiceServer).GetPost(ctx, req.(*GetPostRequest))
}
return interceptor(ctx, in, info, handler)
}
// FederationService_ServiceDesc is the grpc.ServiceDesc for FederationService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var FederationService_ServiceDesc = grpc.ServiceDesc{
ServiceName: "org.federation.FederationService",
HandlerType: (*FederationServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "GetPost",
Handler: _FederationService_GetPost_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "federation/federation.proto",
}
================================================
FILE: _examples/12_validation/federation/federation_grpc_federation.pb.go
================================================
// Code generated by protoc-gen-grpc-federation. DO NOT EDIT!
// versions:
//
// protoc-gen-grpc-federation: (devel)
//
// source: federation/federation.proto
package federation
import (
"context"
"io"
"log/slog"
"reflect"
grpcfed "github.com/mercari/grpc-federation/grpc/federation"
grpcfedcel "github.com/mercari/grpc-federation/grpc/federation/cel"
"go.opentelemetry.io/otel"
"go.opentelemetry.io/otel/trace"
)
var (
_ = reflect.Invalid // to avoid "imported and not used error"
)
// Org_Federation_CustomHandlerMessageVariable represents variable definitions in "org.federation.CustomHandlerMessage".
type FederationService_Org_Federation_CustomHandlerMessageVariable struct {
}
// Org_Federation_CustomHandlerMessageArgument is argument for "org.federation.CustomHandlerMessage" message.
type FederationService_Org_Federation_CustomHandlerMessageArgument struct {
Arg string
FederationService_Org_Federation_CustomHandlerMessageVariable
}
// Org_Federation_CustomMessageVariable represents variable definitions in "org.federation.CustomMessage".
type FederationService_Org_Federation_CustomMessageVariable struct {
}
// Org_Federation_CustomMessageArgument is argument for "org.federation.CustomMessage" message.
type FederationService_Org_Federation_CustomMessageArgument struct {
Message string
FederationService_Org_Federation_CustomMessageVariable
}
// Org_Federation_GetPostResponseVariable represents variable definitions in "org.federation.GetPostResponse".
type FederationService_Org_Federation_GetPostResponseVariable struct {
Condition bool
CustomMessage *CustomMessage
Post *Post
XDef5ErrDetail0Msg0 *CustomMessage
XDef5ErrDetail0Msg1 *CustomMessage
}
// Org_Federation_GetPostResponseArgument is argument for "org.federation.GetPostResponse" message.
type FederationService_Org_Federation_GetPostResponseArgument struct {
Id string
FederationService_Org_Federation_GetPostResponseVariable
}
// Org_Federation_PostVariable represents variable definitions in "org.federation.Post".
type FederationService_Org_Federation_PostVariable struct {
}
// Org_Federation_PostArgument is argument for "org.federation.Post" message.
type FederationService_Org_Federation_PostArgument struct {
FederationService_Org_Federation_PostVariable
}
// FederationServiceConfig configuration required to initialize the service that use GRPC Federation.
type FederationServiceConfig struct {
// Resolver provides an interface to directly implement message resolver and field resolver not defined in Protocol Buffers.
// If this interface is not provided, an error is returned during initialization.
Resolver FederationServiceResolver // required
// ErrorHandler Federation Service often needs to convert errors received from downstream services.
// If an error occurs during method execution in the Federation Service, this error handler is called and the returned error is treated as a final error.
ErrorHandler grpcfed.ErrorHandler
// Logger sets the logger used to output Debug/Info/Error information.
Logger *slog.Logger
}
// FederationServiceClientFactory provides a factory that creates the gRPC Client needed to invoke methods of the gRPC Service on which the Federation Service depends.
type FederationServiceClientFactory interface {
}
// FederationServiceClientConfig helper to create gRPC client.
// Hints for creating a gRPC Client.
type FederationServiceClientConfig struct {
// Service FQDN ( `.` ) of the service on Protocol Buffers.
Service string
}
// FederationServiceDependentClientSet has a gRPC client for all services on which the federation service depends.
// This is provided as an argument when implementing the custom resolver.
type FederationServiceDependentClientSet struct {
}
// FederationServiceResolver provides an interface to directly implement message resolver and field resolver not defined in Protocol Buffers.
type FederationServiceResolver interface {
// Resolve_Org_Federation_CustomHandlerMessage implements resolver for "org.federation.CustomHandlerMessage".
Resolve_Org_Federation_CustomHandlerMessage(context.Context, *FederationService_Org_Federation_CustomHandlerMessageArgument) (*CustomHandlerMessage, error)
}
// FederationServiceCELPluginWasmConfig type alias for grpcfedcel.WasmConfig.
type FederationServiceCELPluginWasmConfig = grpcfedcel.WasmConfig
// FederationServiceCELPluginConfig hints for loading a WebAssembly based plugin.
type FederationServiceCELPluginConfig struct {
CacheDir string
}
// FederationServiceUnimplementedResolver a structure implemented to satisfy the Resolver interface.
// An Unimplemented error is always returned.
// This is intended for use when there are many Resolver interfaces that do not need to be implemented,
// by embedding them in a resolver structure that you have created.
type FederationServiceUnimplementedResolver struct{}
// Resolve_Org_Federation_CustomHandlerMessage resolve "org.federation.CustomHandlerMessage".
// This method always returns Unimplemented error.
func (FederationServiceUnimplementedResolver) Resolve_Org_Federation_CustomHandlerMessage(context.Context, *FederationService_Org_Federation_CustomHandlerMessageArgument) (ret *CustomHandlerMessage, e error) {
e = grpcfed.GRPCErrorf(grpcfed.UnimplementedCode, "method Resolve_Org_Federation_CustomHandlerMessage not implemented")
return
}
// FederationService represents Federation Service.
type FederationService struct {
UnimplementedFederationServiceServer
cfg FederationServiceConfig
logger *slog.Logger
isLogLevelDebug bool
errorHandler grpcfed.ErrorHandler
celCacheMap *grpcfed.CELCacheMap
tracer trace.Tracer
resolver FederationServiceResolver
celTypeHelper *grpcfed.CELTypeHelper
celEnvOpts []grpcfed.CELEnvOption
celPlugins []*grpcfedcel.CELPlugin
client *FederationServiceDependentClientSet
}
// NewFederationService creates FederationService instance by FederationServiceConfig.
func NewFederationService(cfg FederationServiceConfig) (*FederationService, error) {
if cfg.Resolver == nil {
return nil, grpcfed.ErrResolverConfig
}
logger := cfg.Logger
if logger == nil {
logger = slog.New(slog.NewJSONHandler(io.Discard, nil))
}
tracer := otel.Tracer("org.federation.FederationService")
ctx := grpcfed.WithLogger(context.Background(), logger)
ctx = grpcfed.WithTracer(ctx, tracer)
errorHandler := cfg.ErrorHandler
if errorHandler == nil {
errorHandler = func(ctx context.Context, methodName string, err error) error { return err }
}
celTypeHelperFieldMap := grpcfed.CELTypeHelperFieldMap{
"grpc.federation.private.org.federation.CustomHandlerMessageArgument": {
"arg": grpcfed.NewCELFieldType(grpcfed.CELStringType, "Arg"),
},
"grpc.federation.private.org.federation.CustomMessageArgument": {
"message": grpcfed.NewCELFieldType(grpcfed.CELStringType, "Message"),
},
"grpc.federation.private.org.federation.GetPostResponseArgument": {
"id": grpcfed.NewCELFieldType(grpcfed.CELStringType, "Id"),
},
"grpc.federation.private.org.federation.PostArgument": {},
}
celTypeHelper := grpcfed.NewCELTypeHelper("org.federation", celTypeHelperFieldMap)
var celEnvOpts []grpcfed.CELEnvOption
celEnvOpts = append(celEnvOpts, grpcfed.NewDefaultEnvOptions(celTypeHelper)...)
svc := &FederationService{
cfg: cfg,
logger: logger,
isLogLevelDebug: logger.Enabled(context.Background(), slog.LevelDebug),
errorHandler: errorHandler,
celEnvOpts: celEnvOpts,
celTypeHelper: celTypeHelper,
celCacheMap: grpcfed.NewCELCacheMap(),
tracer: tracer,
resolver: cfg.Resolver,
client: &FederationServiceDependentClientSet{},
}
if resolver, ok := cfg.Resolver.(grpcfed.CustomResolverInitializer); ok {
ctx := context.Background()
if err := resolver.Init(ctx); err != nil {
return nil, err
}
}
return svc, nil
}
// CleanupFederationService cleanup all resources to prevent goroutine leaks.
func CleanupFederationService(ctx context.Context, svc *FederationService) {
svc.cleanup(ctx)
}
func (s *FederationService) cleanup(ctx context.Context) {
for _, plugin := range s.celPlugins {
plugin.Close()
}
}
// GetPost implements "org.federation.FederationService/GetPost" method.
func (s *FederationService) GetPost(ctx context.Context, req *GetPostRequest) (res *GetPostResponse, e error) {
ctx, span := s.tracer.Start(ctx, "org.federation.FederationService/GetPost")
defer span.End()
ctx = grpcfed.WithLogger(ctx, s.logger)
ctx = grpcfed.WithCELCacheMap(ctx, s.celCacheMap)
defer func() {
if r := recover(); r != nil {
e = grpcfed.RecoverError(r, grpcfed.StackTrace())
grpcfed.OutputErrorLog(ctx, e)
}
}()
defer func() {
for _, celPlugin := range s.celPlugins {
celPlugin.Cleanup()
}
}()
res, err := s.resolve_Org_Federation_GetPostResponse(ctx, &FederationService_Org_Federation_GetPostResponseArgument{
Id: req.GetId(),
})
if err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
grpcfed.OutputErrorLog(ctx, err)
return nil, err
}
return res, nil
}
// resolve_Org_Federation_CustomHandlerMessage resolve "org.federation.CustomHandlerMessage" message.
func (s *FederationService) resolve_Org_Federation_CustomHandlerMessage(ctx context.Context, req *FederationService_Org_Federation_CustomHandlerMessageArgument) (*CustomHandlerMessage, error) {
ctx, span := s.tracer.Start(ctx, "org.federation.CustomHandlerMessage")
defer span.End()
ctx = grpcfed.WithLogger(ctx, grpcfed.Logger(ctx), grpcfed.LogAttrs(ctx)...)
grpcfed.Logger(ctx).DebugContext(ctx, "resolve org.federation.CustomHandlerMessage", slog.Any("message_args", s.logvalue_Org_Federation_CustomHandlerMessageArgument(req)))
type localValueType struct {
*grpcfed.LocalValue
vars struct {
XDef0 bool
}
}
value := &localValueType{LocalValue: grpcfed.NewLocalValue(ctx, s.celEnvOpts, "grpc.federation.private.org.federation.CustomHandlerMessageArgument", req)}
ctx = grpcfed.WithLocalValue(ctx, value.LocalValue)
/*
def {
name: "_def0"
validation {
error {
code: FAILED_PRECONDITION
if: "$.arg == 'wrong'"
}
}
}
*/
def__def0 := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[bool, *localValueType]{
Name: `_def0`,
Type: grpcfed.CELBoolType,
Setter: func(value *localValueType, v bool) error {
value.vars.XDef0 = v
return nil
},
Validation: func(ctx context.Context, value *localValueType) error {
var stat *grpcfed.Status
if err := grpcfed.If(ctx, &grpcfed.IfParam[*localValueType]{
Value: value,
Expr: `$.arg == 'wrong'`,
CacheIndex: 1,
Body: func(value *localValueType) error {
errorMessage := "error"
stat = grpcfed.NewGRPCStatus(grpcfed.FailedPreconditionCode, errorMessage)
return nil
},
}); err != nil {
return err
}
return grpcfed.NewErrorWithLogAttrs(stat.Err(), slog.LevelError, grpcfed.LogAttrs(ctx))
},
})
}
if err := def__def0(ctx); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
// create a message value to be returned.
// `custom_resolver = true` in "grpc.federation.message" option.
ctx = grpcfed.WithLogger(ctx, grpcfed.Logger(ctx)) // create a new reference to logger.
ret, err := s.resolver.Resolve_Org_Federation_CustomHandlerMessage(ctx, req)
if err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
grpcfed.Logger(ctx).DebugContext(ctx, "resolved org.federation.CustomHandlerMessage", slog.Any("org.federation.CustomHandlerMessage", s.logvalue_Org_Federation_CustomHandlerMessage(ret)))
return ret, nil
}
// resolve_Org_Federation_CustomMessage resolve "org.federation.CustomMessage" message.
func (s *FederationService) resolve_Org_Federation_CustomMessage(ctx context.Context, req *FederationService_Org_Federation_CustomMessageArgument) (*CustomMessage, error) {
ctx, span := s.tracer.Start(ctx, "org.federation.CustomMessage")
defer span.End()
ctx = grpcfed.WithLogger(ctx, grpcfed.Logger(ctx), grpcfed.LogAttrs(ctx)...)
grpcfed.Logger(ctx).DebugContext(ctx, "resolve org.federation.CustomMessage", slog.Any("message_args", s.logvalue_Org_Federation_CustomMessageArgument(req)))
type localValueType struct {
*grpcfed.LocalValue
vars struct {
}
}
value := &localValueType{LocalValue: grpcfed.NewLocalValue(ctx, s.celEnvOpts, "grpc.federation.private.org.federation.CustomMessageArgument", req)}
ctx = grpcfed.WithLocalValue(ctx, value.LocalValue)
// create a message value to be returned.
ret := &CustomMessage{}
// field binding section.
// (grpc.federation.field).by = "$.message"
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[string]{
Value: value,
Expr: `$.message`,
CacheIndex: 2,
Setter: func(v string) error {
ret.Message = v
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
grpcfed.Logger(ctx).DebugContext(ctx, "resolved org.federation.CustomMessage", slog.Any("org.federation.CustomMessage", s.logvalue_Org_Federation_CustomMessage(ret)))
return ret, nil
}
// resolve_Org_Federation_GetPostResponse resolve "org.federation.GetPostResponse" message.
func (s *FederationService) resolve_Org_Federation_GetPostResponse(ctx context.Context, req *FederationService_Org_Federation_GetPostResponseArgument) (*GetPostResponse, error) {
ctx, span := s.tracer.Start(ctx, "org.federation.GetPostResponse")
defer span.End()
ctx = grpcfed.WithLogger(ctx, grpcfed.Logger(ctx), grpcfed.LogAttrs(ctx)...)
grpcfed.Logger(ctx).DebugContext(ctx, "resolve org.federation.GetPostResponse", slog.Any("message_args", s.logvalue_Org_Federation_GetPostResponseArgument(req)))
type localValueType struct {
*grpcfed.LocalValue
vars struct {
Condition bool
CustomHandler *CustomHandlerMessage
CustomMessage *CustomMessage
CustomMessageValidation bool
Post *Post
XDef10 bool
XDef3 bool
XDef4 bool
XDef5 bool
XDef5Def0 bool
XDef5ErrDetail0Msg0 *CustomMessage
XDef5ErrDetail0Msg1 *CustomMessage
XDef6 bool
XDef8 bool
XDef9 bool
}
}
value := &localValueType{LocalValue: grpcfed.NewLocalValue(ctx, s.celEnvOpts, "grpc.federation.private.org.federation.GetPostResponseArgument", req)}
ctx = grpcfed.WithLocalValue(ctx, value.LocalValue)
/*
def {
name: "post"
message {
name: "Post"
}
}
*/
def_post := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[*Post, *localValueType]{
Name: `post`,
Type: grpcfed.CELObjectType("org.federation.Post"),
Setter: func(value *localValueType, v *Post) error {
value.vars.Post = v
return nil
},
Message: func(ctx context.Context, value *localValueType) (any, error) {
args := &FederationService_Org_Federation_PostArgument{}
ret, err := s.resolve_Org_Federation_Post(ctx, args)
if err != nil {
return nil, err
}
return ret, nil
},
})
}
/*
def {
name: "customHandler"
message {
name: "CustomHandlerMessage"
args { name: "arg", by: "'some-arg'" }
}
}
*/
def_customHandler := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[*CustomHandlerMessage, *localValueType]{
Name: `customHandler`,
Type: grpcfed.CELObjectType("org.federation.CustomHandlerMessage"),
Setter: func(value *localValueType, v *CustomHandlerMessage) error {
value.vars.CustomHandler = v
return nil
},
Message: func(ctx context.Context, value *localValueType) (any, error) {
args := &FederationService_Org_Federation_CustomHandlerMessageArgument{}
// { name: "arg", by: "'some-arg'" }
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[string]{
Value: value,
Expr: `'some-arg'`,
CacheIndex: 3,
Setter: func(v string) error {
args.Arg = v
return nil
},
}); err != nil {
return nil, err
}
ret, err := s.resolve_Org_Federation_CustomHandlerMessage(ctx, args)
if err != nil {
return nil, err
}
return ret, nil
},
})
}
/*
def {
name: "customMessage"
message {
name: "CustomMessage"
args { name: "message", by: "'some-message'" }
}
}
*/
def_customMessage := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[*CustomMessage, *localValueType]{
Name: `customMessage`,
Type: grpcfed.CELObjectType("org.federation.CustomMessage"),
Setter: func(value *localValueType, v *CustomMessage) error {
value.vars.CustomMessage = v
return nil
},
Message: func(ctx context.Context, value *localValueType) (any, error) {
args := &FederationService_Org_Federation_CustomMessageArgument{}
// { name: "message", by: "'some-message'" }
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[string]{
Value: value,
Expr: `'some-message'`,
CacheIndex: 4,
Setter: func(v string) error {
args.Message = v
return nil
},
}); err != nil {
return nil, err
}
ret, err := s.resolve_Org_Federation_CustomMessage(ctx, args)
if err != nil {
return nil, err
}
return ret, nil
},
})
}
/*
def {
name: "_def3"
validation {
error {
code: FAILED_PRECONDITION
if: "post.id != 'some-id'"
message: "'validation1 failed!'"
}
}
}
*/
def__def3 := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[bool, *localValueType]{
Name: `_def3`,
Type: grpcfed.CELBoolType,
Setter: func(value *localValueType, v bool) error {
value.vars.XDef3 = v
return nil
},
Validation: func(ctx context.Context, value *localValueType) error {
var stat *grpcfed.Status
if err := grpcfed.If(ctx, &grpcfed.IfParam[*localValueType]{
Value: value,
Expr: `post.id != 'some-id'`,
CacheIndex: 5,
Body: func(value *localValueType) error {
errmsg, err := grpcfed.EvalCEL(ctx, &grpcfed.EvalCELRequest{
Value: value,
Expr: `'validation1 failed!'`,
OutType: reflect.TypeOf(""),
CacheIndex: 6,
})
if err != nil {
return err
}
errorMessage := errmsg.(string)
stat = grpcfed.NewGRPCStatus(grpcfed.FailedPreconditionCode, errorMessage)
return nil
},
}); err != nil {
return err
}
return grpcfed.NewErrorWithLogAttrs(stat.Err(), slog.LevelError, grpcfed.LogAttrs(ctx))
},
})
}
/*
def {
name: "_def4"
validation {
error {
code: FAILED_PRECONDITION
if: "post.id != 'some-id'"
message: "'validation2 failed!'"
}
}
}
*/
def__def4 := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[bool, *localValueType]{
Name: `_def4`,
Type: grpcfed.CELBoolType,
Setter: func(value *localValueType, v bool) error {
value.vars.XDef4 = v
return nil
},
Validation: func(ctx context.Context, value *localValueType) error {
var stat *grpcfed.Status
if err := grpcfed.If(ctx, &grpcfed.IfParam[*localValueType]{
Value: value,
Expr: `post.id != 'some-id'`,
CacheIndex: 7,
Body: func(value *localValueType) error {
errmsg, err := grpcfed.EvalCEL(ctx, &grpcfed.EvalCELRequest{
Value: value,
Expr: `'validation2 failed!'`,
OutType: reflect.TypeOf(""),
CacheIndex: 8,
})
if err != nil {
return err
}
errorMessage := errmsg.(string)
stat = grpcfed.NewGRPCStatus(grpcfed.FailedPreconditionCode, errorMessage)
return nil
},
}); err != nil {
return err
}
return grpcfed.NewErrorWithLogAttrs(stat.Err(), slog.LevelError, grpcfed.LogAttrs(ctx))
},
})
}
/*
def {
name: "_def5"
validation {
error {
code: FAILED_PRECONDITION
def {
name: "_def5_def0"
by: "grpc.federation.log.add({'validation3_attrs': true})"
}
if: "$.id != 'correct-id'"
message: "'validation3 failed!'"
details {
if: "true"
message: [
{...},
{...}
]
precondition_failure {...}
bad_request {...}
localized_message {...}
}
}
}
}
*/
def__def5 := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[bool, *localValueType]{
Name: `_def5`,
Type: grpcfed.CELBoolType,
Setter: func(value *localValueType, v bool) error {
value.vars.XDef5 = v
return nil
},
Validation: func(ctx context.Context, value *localValueType) error {
var stat *grpcfed.Status
if _, err := func() (any, error) {
/*
def {
name: "_def5_def0"
by: "grpc.federation.log.add({'validation3_attrs': true})"
}
*/
def__def5_def0 := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[bool, *localValueType]{
Name: `_def5_def0`,
Type: grpcfed.CELBoolType,
Setter: func(value *localValueType, v bool) error {
value.vars.XDef5Def0 = v
return nil
},
By: `grpc.federation.log.add({'validation3_attrs': true})`,
ByCacheIndex: 9,
})
}
if err := def__def5_def0(ctx); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
return nil, nil
}(); err != nil {
return err
}
if err := grpcfed.If(ctx, &grpcfed.IfParam[*localValueType]{
Value: value,
Expr: `$.id != 'correct-id'`,
CacheIndex: 10,
Body: func(value *localValueType) error {
errmsg, err := grpcfed.EvalCEL(ctx, &grpcfed.EvalCELRequest{
Value: value,
Expr: `'validation3 failed!'`,
OutType: reflect.TypeOf(""),
CacheIndex: 11,
})
if err != nil {
return err
}
errorMessage := errmsg.(string)
var details []grpcfed.ProtoMessage
if err := grpcfed.If(ctx, &grpcfed.IfParam[*localValueType]{
Value: value,
Expr: `true`,
CacheIndex: 12,
Body: func(value *localValueType) error {
if _, err := func() (any, error) {
/*
def {
name: "_def5_err_detail0_msg0"
message {
name: "CustomMessage"
args { name: "message", by: "'message1'" }
}
}
*/
def__def5_err_detail0_msg0 := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[*CustomMessage, *localValueType]{
Name: `_def5_err_detail0_msg0`,
Type: grpcfed.CELObjectType("org.federation.CustomMessage"),
Setter: func(value *localValueType, v *CustomMessage) error {
value.vars.XDef5ErrDetail0Msg0 = v
return nil
},
Message: func(ctx context.Context, value *localValueType) (any, error) {
args := &FederationService_Org_Federation_CustomMessageArgument{}
// { name: "message", by: "'message1'" }
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[string]{
Value: value,
Expr: `'message1'`,
CacheIndex: 13,
Setter: func(v string) error {
args.Message = v
return nil
},
}); err != nil {
return nil, err
}
ret, err := s.resolve_Org_Federation_CustomMessage(ctx, args)
if err != nil {
return nil, err
}
return ret, nil
},
})
}
/*
def {
name: "_def5_err_detail0_msg1"
message {
name: "CustomMessage"
args { name: "message", by: "'message2'" }
}
}
*/
def__def5_err_detail0_msg1 := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[*CustomMessage, *localValueType]{
Name: `_def5_err_detail0_msg1`,
Type: grpcfed.CELObjectType("org.federation.CustomMessage"),
Setter: func(value *localValueType, v *CustomMessage) error {
value.vars.XDef5ErrDetail0Msg1 = v
return nil
},
Message: func(ctx context.Context, value *localValueType) (any, error) {
args := &FederationService_Org_Federation_CustomMessageArgument{}
// { name: "message", by: "'message2'" }
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[string]{
Value: value,
Expr: `'message2'`,
CacheIndex: 14,
Setter: func(v string) error {
args.Message = v
return nil
},
}); err != nil {
return nil, err
}
ret, err := s.resolve_Org_Federation_CustomMessage(ctx, args)
if err != nil {
return nil, err
}
return ret, nil
},
})
}
// A tree view of message dependencies is shown below.
/*
_def5_err_detail0_msg0 ─┐
_def5_err_detail0_msg1 ─┤
*/
eg, ctx1 := grpcfed.ErrorGroupWithContext(ctx)
grpcfed.GoWithRecover(eg, func() (any, error) {
if err := def__def5_err_detail0_msg0(ctx1); err != nil {
grpcfed.RecordErrorToSpan(ctx1, err)
return nil, err
}
return nil, nil
})
grpcfed.GoWithRecover(eg, func() (any, error) {
if err := def__def5_err_detail0_msg1(ctx1); err != nil {
grpcfed.RecordErrorToSpan(ctx1, err)
return nil, err
}
return nil, nil
})
if err := eg.Wait(); err != nil {
return nil, err
}
return nil, nil
}(); err != nil {
return err
}
if detail := grpcfed.CustomMessage(ctx, &grpcfed.CustomMessageParam{
Value: value,
MessageValueName: "_def5_err_detail0_msg0",
CacheIndex: 15,
MessageIndex: 0,
}); detail != nil {
details = append(details, detail)
}
if detail := grpcfed.CustomMessage(ctx, &grpcfed.CustomMessageParam{
Value: value,
MessageValueName: "_def5_err_detail0_msg1",
CacheIndex: 16,
MessageIndex: 1,
}); detail != nil {
details = append(details, detail)
}
{
detail, err := grpcfed.EvalCEL(ctx, &grpcfed.EvalCELRequest{
Value: value,
Expr: `CustomMessage{message: 'foo'}`,
OutType: reflect.TypeOf((*CustomMessage)(nil)),
CacheIndex: 17,
})
if err != nil {
grpcfed.Logger(ctx).ErrorContext(ctx, "failed setting error details", slog.String("error", err.Error()))
}
if detail != nil {
details = append(details, detail.(grpcfed.ProtoMessage))
}
}
if detail := grpcfed.PreconditionFailure(ctx, value, []*grpcfed.PreconditionFailureViolation{
{
Type: `'type1'`,
Subject: `post.id`,
Desc: `'description1'`,
TypeCacheIndex: 18,
SubjectCacheIndex: 19,
DescCacheIndex: 20,
},
}); detail != nil {
details = append(details, detail)
}
if detail := grpcfed.BadRequest(ctx, value, []*grpcfed.BadRequestFieldViolation{
{
Field: `post.id`,
Desc: `'description2'`,
FieldCacheIndex: 21,
DescCacheIndex: 22,
},
}); detail != nil {
details = append(details, detail)
}
if detail := grpcfed.LocalizedMessage(ctx, &grpcfed.LocalizedMessageParam{
Value: value,
Locale: "en-US",
Message: `post.content`,
CacheIndex: 23,
}); detail != nil {
details = append(details, detail)
}
return nil
},
}); err != nil {
return err
}
status := grpcfed.NewGRPCStatus(grpcfed.FailedPreconditionCode, errorMessage)
statusWithDetails, err := status.WithDetails(details...)
if err != nil {
grpcfed.Logger(ctx).ErrorContext(ctx, "failed setting error details", slog.String("error", err.Error()))
stat = status
} else {
stat = statusWithDetails
}
return nil
},
}); err != nil {
return err
}
return grpcfed.NewErrorWithLogAttrs(stat.Err(), slog.LevelWarn, grpcfed.LogAttrs(ctx))
},
})
}
/*
def {
name: "_def6"
validation {
error {
code: FAILED_PRECONDITION
def {
name: "condition"
by: "post.id != 'some-id'"
}
if: "condition"
message: "'validation4 failed!'"
}
}
}
*/
def__def6 := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[bool, *localValueType]{
Name: `_def6`,
Type: grpcfed.CELBoolType,
Setter: func(value *localValueType, v bool) error {
value.vars.XDef6 = v
return nil
},
Validation: func(ctx context.Context, value *localValueType) error {
var stat *grpcfed.Status
if _, err := func() (any, error) {
/*
def {
name: "condition"
by: "post.id != 'some-id'"
}
*/
def_condition := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[bool, *localValueType]{
Name: `condition`,
Type: grpcfed.CELBoolType,
Setter: func(value *localValueType, v bool) error {
value.vars.Condition = v
return nil
},
By: `post.id != 'some-id'`,
ByCacheIndex: 24,
})
}
if err := def_condition(ctx); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
return nil, nil
}(); err != nil {
return err
}
if err := grpcfed.If(ctx, &grpcfed.IfParam[*localValueType]{
Value: value,
Expr: `condition`,
CacheIndex: 25,
Body: func(value *localValueType) error {
errmsg, err := grpcfed.EvalCEL(ctx, &grpcfed.EvalCELRequest{
Value: value,
Expr: `'validation4 failed!'`,
OutType: reflect.TypeOf(""),
CacheIndex: 26,
})
if err != nil {
return err
}
errorMessage := errmsg.(string)
stat = grpcfed.NewGRPCStatus(grpcfed.FailedPreconditionCode, errorMessage)
return nil
},
}); err != nil {
return err
}
return grpcfed.NewErrorWithLogAttrs(stat.Err(), slog.LevelError, grpcfed.LogAttrs(ctx))
},
})
}
/*
def {
name: "customMessageValidation"
validation {
error {
code: INTERNAL
if: "customMessage.message == ''"
message: "'custom message is empty'"
}
}
}
*/
def_customMessageValidation := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[bool, *localValueType]{
Name: `customMessageValidation`,
Type: grpcfed.CELBoolType,
Setter: func(value *localValueType, v bool) error {
value.vars.CustomMessageValidation = v
return nil
},
Validation: func(ctx context.Context, value *localValueType) error {
var stat *grpcfed.Status
if err := grpcfed.If(ctx, &grpcfed.IfParam[*localValueType]{
Value: value,
Expr: `customMessage.message == ''`,
CacheIndex: 27,
Body: func(value *localValueType) error {
errmsg, err := grpcfed.EvalCEL(ctx, &grpcfed.EvalCELRequest{
Value: value,
Expr: `'custom message is empty'`,
OutType: reflect.TypeOf(""),
CacheIndex: 28,
})
if err != nil {
return err
}
errorMessage := errmsg.(string)
stat = grpcfed.NewGRPCStatus(grpcfed.InternalCode, errorMessage)
return nil
},
}); err != nil {
return err
}
return grpcfed.NewErrorWithLogAttrs(stat.Err(), slog.LevelError, grpcfed.LogAttrs(ctx))
},
})
}
/*
def {
name: "_def8"
validation {
error {
code: INTERNAL
if: "post.item == null"
message: "'item is null'"
}
}
}
*/
def__def8 := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[bool, *localValueType]{
Name: `_def8`,
Type: grpcfed.CELBoolType,
Setter: func(value *localValueType, v bool) error {
value.vars.XDef8 = v
return nil
},
Validation: func(ctx context.Context, value *localValueType) error {
var stat *grpcfed.Status
if err := grpcfed.If(ctx, &grpcfed.IfParam[*localValueType]{
Value: value,
Expr: `post.item == null`,
CacheIndex: 29,
Body: func(value *localValueType) error {
errmsg, err := grpcfed.EvalCEL(ctx, &grpcfed.EvalCELRequest{
Value: value,
Expr: `'item is null'`,
OutType: reflect.TypeOf(""),
CacheIndex: 30,
})
if err != nil {
return err
}
errorMessage := errmsg.(string)
stat = grpcfed.NewGRPCStatus(grpcfed.InternalCode, errorMessage)
return nil
},
}); err != nil {
return err
}
return grpcfed.NewErrorWithLogAttrs(stat.Err(), slog.LevelError, grpcfed.LogAttrs(ctx))
},
})
}
/*
def {
name: "_def9"
validation {
error {
code: INTERNAL
if: "post.item.item_id == 0"
message: "'item id is zero'"
}
}
}
*/
def__def9 := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[bool, *localValueType]{
Name: `_def9`,
Type: grpcfed.CELBoolType,
Setter: func(value *localValueType, v bool) error {
value.vars.XDef9 = v
return nil
},
Validation: func(ctx context.Context, value *localValueType) error {
var stat *grpcfed.Status
if err := grpcfed.If(ctx, &grpcfed.IfParam[*localValueType]{
Value: value,
Expr: `post.item.item_id == 0`,
CacheIndex: 31,
Body: func(value *localValueType) error {
errmsg, err := grpcfed.EvalCEL(ctx, &grpcfed.EvalCELRequest{
Value: value,
Expr: `'item id is zero'`,
OutType: reflect.TypeOf(""),
CacheIndex: 32,
})
if err != nil {
return err
}
errorMessage := errmsg.(string)
stat = grpcfed.NewGRPCStatus(grpcfed.InternalCode, errorMessage)
return nil
},
}); err != nil {
return err
}
return grpcfed.NewErrorWithLogAttrs(stat.Err(), slog.LevelError, grpcfed.LogAttrs(ctx))
},
})
}
/*
def {
name: "_def10"
validation {
error {
code: INTERNAL
if: "post.item.name == ''"
message: "'item name is empty'"
}
}
}
*/
def__def10 := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[bool, *localValueType]{
Name: `_def10`,
Type: grpcfed.CELBoolType,
Setter: func(value *localValueType, v bool) error {
value.vars.XDef10 = v
return nil
},
Validation: func(ctx context.Context, value *localValueType) error {
var stat *grpcfed.Status
if err := grpcfed.If(ctx, &grpcfed.IfParam[*localValueType]{
Value: value,
Expr: `post.item.name == ''`,
CacheIndex: 33,
Body: func(value *localValueType) error {
errmsg, err := grpcfed.EvalCEL(ctx, &grpcfed.EvalCELRequest{
Value: value,
Expr: `'item name is empty'`,
OutType: reflect.TypeOf(""),
CacheIndex: 34,
})
if err != nil {
return err
}
errorMessage := errmsg.(string)
stat = grpcfed.NewGRPCStatus(grpcfed.InternalCode, errorMessage)
return nil
},
}); err != nil {
return err
}
return grpcfed.NewErrorWithLogAttrs(stat.Err(), slog.LevelError, grpcfed.LogAttrs(ctx))
},
})
}
// A tree view of message dependencies is shown below.
/*
post ─┐
_def3 ─┐
_def4 ─┐
_def5 ─┐
_def6 ─┐
customMessage ─┤
customMessageValidation ─┐
_def8 ─┐
_def9 ─┐
_def10 ─┐
customHandler ─┤
*/
eg, ctx1 := grpcfed.ErrorGroupWithContext(ctx)
grpcfed.GoWithRecover(eg, func() (any, error) {
eg, ctx2 := grpcfed.ErrorGroupWithContext(ctx1)
grpcfed.GoWithRecover(eg, func() (any, error) {
if err := def_post(ctx2); err != nil {
grpcfed.RecordErrorToSpan(ctx2, err)
return nil, err
}
if err := def__def3(ctx2); err != nil {
grpcfed.RecordErrorToSpan(ctx2, err)
return nil, err
}
if err := def__def4(ctx2); err != nil {
grpcfed.RecordErrorToSpan(ctx2, err)
return nil, err
}
if err := def__def5(ctx2); err != nil {
grpcfed.RecordErrorToSpan(ctx2, err)
return nil, err
}
if err := def__def6(ctx2); err != nil {
grpcfed.RecordErrorToSpan(ctx2, err)
return nil, err
}
return nil, nil
})
grpcfed.GoWithRecover(eg, func() (any, error) {
if err := def_customMessage(ctx2); err != nil {
grpcfed.RecordErrorToSpan(ctx2, err)
return nil, err
}
return nil, nil
})
if err := eg.Wait(); err != nil {
return nil, err
}
if err := def_customMessageValidation(ctx1); err != nil {
grpcfed.RecordErrorToSpan(ctx1, err)
return nil, err
}
if err := def__def8(ctx1); err != nil {
grpcfed.RecordErrorToSpan(ctx1, err)
return nil, err
}
if err := def__def9(ctx1); err != nil {
grpcfed.RecordErrorToSpan(ctx1, err)
return nil, err
}
if err := def__def10(ctx1); err != nil {
grpcfed.RecordErrorToSpan(ctx1, err)
return nil, err
}
return nil, nil
})
grpcfed.GoWithRecover(eg, func() (any, error) {
if err := def_customHandler(ctx1); err != nil {
grpcfed.RecordErrorToSpan(ctx1, err)
return nil, err
}
return nil, nil
})
if err := eg.Wait(); err != nil {
return nil, err
}
// assign named parameters to message arguments to pass to the custom resolver.
req.FederationService_Org_Federation_GetPostResponseVariable.Condition = value.vars.Condition
req.FederationService_Org_Federation_GetPostResponseVariable.CustomMessage = value.vars.CustomMessage
req.FederationService_Org_Federation_GetPostResponseVariable.Post = value.vars.Post
req.FederationService_Org_Federation_GetPostResponseVariable.XDef5ErrDetail0Msg0 = value.vars.XDef5ErrDetail0Msg0
req.FederationService_Org_Federation_GetPostResponseVariable.XDef5ErrDetail0Msg1 = value.vars.XDef5ErrDetail0Msg1
// create a message value to be returned.
ret := &GetPostResponse{}
// field binding section.
// (grpc.federation.field).by = "post"
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[*Post]{
Value: value,
Expr: `post`,
CacheIndex: 35,
Setter: func(v *Post) error {
ret.Post = v
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
grpcfed.Logger(ctx).DebugContext(ctx, "resolved org.federation.GetPostResponse", slog.Any("org.federation.GetPostResponse", s.logvalue_Org_Federation_GetPostResponse(ret)))
return ret, nil
}
// resolve_Org_Federation_Post resolve "org.federation.Post" message.
func (s *FederationService) resolve_Org_Federation_Post(ctx context.Context, req *FederationService_Org_Federation_PostArgument) (*Post, error) {
ctx, span := s.tracer.Start(ctx, "org.federation.Post")
defer span.End()
ctx = grpcfed.WithLogger(ctx, grpcfed.Logger(ctx), grpcfed.LogAttrs(ctx)...)
grpcfed.Logger(ctx).DebugContext(ctx, "resolve org.federation.Post", slog.Any("message_args", s.logvalue_Org_Federation_PostArgument(req)))
type localValueType struct {
*grpcfed.LocalValue
vars struct {
}
}
value := &localValueType{LocalValue: grpcfed.NewLocalValue(ctx, s.celEnvOpts, "grpc.federation.private.org.federation.PostArgument", req)}
ctx = grpcfed.WithLocalValue(ctx, value.LocalValue)
// create a message value to be returned.
ret := &Post{}
// field binding section.
// (grpc.federation.field).by = "'some-id'"
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[string]{
Value: value,
Expr: `'some-id'`,
CacheIndex: 36,
Setter: func(v string) error {
ret.Id = v
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
// (grpc.federation.field).by = "'some-title'"
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[string]{
Value: value,
Expr: `'some-title'`,
CacheIndex: 37,
Setter: func(v string) error {
ret.Title = v
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
// (grpc.federation.field).by = "'some-content'"
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[string]{
Value: value,
Expr: `'some-content'`,
CacheIndex: 38,
Setter: func(v string) error {
ret.Content = v
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
// (grpc.federation.field).by = "Item{item_id: 2, name: 'item-name2'}"
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[*Item]{
Value: value,
Expr: `Item{item_id: 2, name: 'item-name2'}`,
CacheIndex: 39,
Setter: func(v *Item) error {
ret.Item = v
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
grpcfed.Logger(ctx).DebugContext(ctx, "resolved org.federation.Post", slog.Any("org.federation.Post", s.logvalue_Org_Federation_Post(ret)))
return ret, nil
}
func (s *FederationService) logvalue_Org_Federation_CustomHandlerMessage(v *CustomHandlerMessage) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue()
}
func (s *FederationService) logvalue_Org_Federation_CustomHandlerMessageArgument(v *FederationService_Org_Federation_CustomHandlerMessageArgument) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.String("arg", v.Arg),
)
}
func (s *FederationService) logvalue_Org_Federation_CustomMessage(v *CustomMessage) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.String("message", v.GetMessage()),
)
}
func (s *FederationService) logvalue_Org_Federation_CustomMessageArgument(v *FederationService_Org_Federation_CustomMessageArgument) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.String("message", v.Message),
)
}
func (s *FederationService) logvalue_Org_Federation_GetPostResponse(v *GetPostResponse) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.Any("post", s.logvalue_Org_Federation_Post(v.GetPost())),
)
}
func (s *FederationService) logvalue_Org_Federation_GetPostResponseArgument(v *FederationService_Org_Federation_GetPostResponseArgument) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.String("id", v.Id),
)
}
func (s *FederationService) logvalue_Org_Federation_Item(v *Item) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.Int64("item_id", int64(v.GetItemId())),
slog.String("name", v.GetName()),
)
}
func (s *FederationService) logvalue_Org_Federation_Post(v *Post) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.String("id", v.GetId()),
slog.String("title", v.GetTitle()),
slog.String("content", v.GetContent()),
slog.Any("item", s.logvalue_Org_Federation_Item(v.GetItem())),
)
}
func (s *FederationService) logvalue_Org_Federation_PostArgument(v *FederationService_Org_Federation_PostArgument) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue()
}
================================================
FILE: _examples/12_validation/go.mod
================================================
module example
go 1.24.0
replace github.com/mercari/grpc-federation => ../../
require (
github.com/google/go-cmp v0.7.0
github.com/mercari/grpc-federation v0.0.0-00010101000000-000000000000
go.opentelemetry.io/otel v1.24.0
go.opentelemetry.io/otel/trace v1.24.0
go.uber.org/goleak v1.3.0
google.golang.org/genproto/googleapis/rpc v0.0.0-20240826202546-f6391c0de4c7
google.golang.org/grpc v1.65.0
google.golang.org/protobuf v1.34.2
)
require (
cel.dev/expr v0.19.1 // indirect
github.com/antlr4-go/antlr/v4 v4.13.0 // indirect
github.com/cenkalti/backoff/v4 v4.2.1 // indirect
github.com/go-logr/logr v1.4.1 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
github.com/goccy/wasi-go v0.3.2 // indirect
github.com/google/cel-go v0.23.1 // indirect
github.com/google/uuid v1.6.0 // indirect
github.com/kelseyhightower/envconfig v1.4.0 // indirect
github.com/stealthrocket/wazergo v0.19.1 // indirect
github.com/stoewer/go-strcase v1.3.0 // indirect
github.com/tetratelabs/wazero v1.10.1 // indirect
go.opentelemetry.io/otel/metric v1.24.0 // indirect
golang.org/x/exp v0.0.0-20250506013437-ce4c2cf36ca6 // indirect
golang.org/x/net v0.38.0 // indirect
golang.org/x/sync v0.14.0 // indirect
golang.org/x/sys v0.37.0 // indirect
golang.org/x/text v0.23.0 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20240826202546-f6391c0de4c7 // indirect
)
================================================
FILE: _examples/12_validation/go.sum
================================================
cel.dev/expr v0.19.1 h1:NciYrtDRIR0lNCnH1LFJegdjspNx9fI59O7TWcua/W4=
cel.dev/expr v0.19.1/go.mod h1:MrpN08Q+lEBs+bGYdLxxHkZoUSsCp0nSKTs0nTymJgw=
github.com/antlr4-go/antlr/v4 v4.13.0 h1:lxCg3LAv+EUK6t1i0y1V6/SLeUi0eKEKdhQAlS8TVTI=
github.com/antlr4-go/antlr/v4 v4.13.0/go.mod h1:pfChB/xh/Unjila75QW7+VU4TSnWnnk9UTnmpPaOR2g=
github.com/cenkalti/backoff/v4 v4.2.1 h1:y4OZtCnogmCPw98Zjyt5a6+QwPLGkiQsYW5oUqylYbM=
github.com/cenkalti/backoff/v4 v4.2.1/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A=
github.com/go-logr/logr v1.4.1 h1:pKouT5E8xu9zeFC39JXRDukb6JFQPXM5p5I91188VAQ=
github.com/go-logr/logr v1.4.1/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY=
github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag=
github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE=
github.com/goccy/wasi-go v0.3.2 h1:wAvGXmqCkfcp0B0AwIp5Ya53hzDwkKm9W8iuT3nCCz0=
github.com/goccy/wasi-go v0.3.2/go.mod h1:nIKD204n9xa4Z20UV+XA483kIr9TAl2vXr+X5qVAO5M=
github.com/google/cel-go v0.23.1 h1:91ThhEZlBcE5rB2adBVXqvDoqdL8BG2oyhd0bK1I/r4=
github.com/google/cel-go v0.23.1/go.mod h1:52Pb6QsDbC5kvgxvZhiL9QX1oZEkcUF/ZqaPx1J5Wwo=
github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8=
github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU=
github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/kelseyhightower/envconfig v1.4.0 h1:Im6hONhd3pLkfDFsbRgu68RDNkGF1r3dvMUtDTo2cv8=
github.com/kelseyhightower/envconfig v1.4.0/go.mod h1:cccZRl6mQpaq41TPp5QxidR+Sa3axMbJDNb//FQX6Gg=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/stealthrocket/wazergo v0.19.1 h1:BPrITETPgSFwiytwmToO0MbUC/+RGC39JScz1JmmG6c=
github.com/stealthrocket/wazergo v0.19.1/go.mod h1:riI0hxw4ndZA5e6z7PesHg2BtTftcZaMxRcoiGGipTs=
github.com/stoewer/go-strcase v1.3.0 h1:g0eASXYtp+yvN9fK8sH94oCIk0fau9uV1/ZdJ0AVEzs=
github.com/stoewer/go-strcase v1.3.0/go.mod h1:fAH5hQ5pehh+j3nZfvwdk2RgEgQjAoM8wodgtPmh1xo=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=
github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo=
github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk=
github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
github.com/tetratelabs/wazero v1.10.1 h1:2DugeJf6VVk58KTPszlNfeeN8AhhpwcZqkJj2wwFuH8=
github.com/tetratelabs/wazero v1.10.1/go.mod h1:DRm5twOQ5Gr1AoEdSi0CLjDQF1J9ZAuyqFIjl1KKfQU=
go.opentelemetry.io/otel v1.24.0 h1:0LAOdjNmQeSTzGBzduGe/rU4tZhMwL5rWgtp9Ku5Jfo=
go.opentelemetry.io/otel v1.24.0/go.mod h1:W7b9Ozg4nkF5tWI5zsXkaKKDjdVjpD4oAt9Qi/MArHo=
go.opentelemetry.io/otel/metric v1.24.0 h1:6EhoGWWK28x1fbpA4tYTOWBkPefTDQnb8WSGXlc88kI=
go.opentelemetry.io/otel/metric v1.24.0/go.mod h1:VYhLe1rFfxuTXLgj4CBiyz+9WYBA8pNGJgDcSFRKBco=
go.opentelemetry.io/otel/trace v1.24.0 h1:CsKnnL4dUAr/0llH9FKuc698G04IrpWV0MQA/Y1YELI=
go.opentelemetry.io/otel/trace v1.24.0/go.mod h1:HPc3Xr/cOApsBI154IU0OI0HJexz+aw5uPdbs3UCjNU=
go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto=
go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE=
golang.org/x/exp v0.0.0-20250506013437-ce4c2cf36ca6 h1:y5zboxd6LQAqYIhHnB48p0ByQ/GnQx2BE33L8BOHQkI=
golang.org/x/exp v0.0.0-20250506013437-ce4c2cf36ca6/go.mod h1:U6Lno4MTRCDY+Ba7aCcauB9T60gsv5s4ralQzP72ZoQ=
golang.org/x/net v0.38.0 h1:vRMAPTMaeGqVhG5QyLJHqNDwecKTomGeqbnfZyKlBI8=
golang.org/x/net v0.38.0/go.mod h1:ivrbrMbzFq5J41QOQh0siUuly180yBYtLp+CKbEaFx8=
golang.org/x/sync v0.14.0 h1:woo0S4Yywslg6hp4eUFjTVOyKt0RookbpAHG4c1HmhQ=
golang.org/x/sync v0.14.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA=
golang.org/x/sys v0.37.0 h1:fdNQudmxPjkdUTPnLn5mdQv7Zwvbvpaxqs831goi9kQ=
golang.org/x/sys v0.37.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks=
golang.org/x/text v0.23.0 h1:D71I7dUrlY+VX0gQShAThNGHFxZ13dGLBHQLVl1mJlY=
golang.org/x/text v0.23.0/go.mod h1:/BLNzu4aZCJ1+kcD0DNRotWKage4q2rGVAg4o22unh4=
google.golang.org/genproto/googleapis/api v0.0.0-20240826202546-f6391c0de4c7 h1:YcyjlL1PRr2Q17/I0dPk2JmYS5CDXfcdb2Z3YRioEbw=
google.golang.org/genproto/googleapis/api v0.0.0-20240826202546-f6391c0de4c7/go.mod h1:OCdP9MfskevB/rbYvHTsXTtKC+3bHWajPdoKgjcYkfo=
google.golang.org/genproto/googleapis/rpc v0.0.0-20240826202546-f6391c0de4c7 h1:2035KHhUv+EpyB+hWgJnaWKJOdX1E95w2S8Rr4uWKTs=
google.golang.org/genproto/googleapis/rpc v0.0.0-20240826202546-f6391c0de4c7/go.mod h1:UqMtugtsSgubUsoxbuAoiCXvqvErP7Gf0so0mK9tHxU=
google.golang.org/grpc v1.65.0 h1:bs/cUb4lp1G5iImFFd3u5ixQzweKizoZJAwBNLR42lc=
google.golang.org/grpc v1.65.0/go.mod h1:WgYC2ypjlB0EiQi6wdKixMqukr6lBc0Vo+oOgjrM5ZQ=
google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg=
google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
================================================
FILE: _examples/12_validation/main_test.go
================================================
package main_test
import (
"context"
"log/slog"
"net"
"os"
"testing"
"github.com/google/go-cmp/cmp"
"github.com/google/go-cmp/cmp/cmpopts"
"go.uber.org/goleak"
"google.golang.org/genproto/googleapis/rpc/errdetails"
"google.golang.org/grpc"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/status"
"google.golang.org/grpc/test/bufconn"
"example/federation"
)
type Resolver struct{}
func (r *Resolver) Resolve_Org_Federation_CustomHandlerMessage(_ context.Context, _ *federation.FederationService_Org_Federation_CustomHandlerMessageArgument) (*federation.CustomHandlerMessage, error) {
return &federation.CustomHandlerMessage{}, nil
}
const bufSize = 1024
var listener *bufconn.Listener
func dialer(_ context.Context, _ string) (net.Conn, error) {
return listener.Dial()
}
func TestFederation(t *testing.T) {
defer goleak.VerifyNone(t)
ctx := context.Background()
listener = bufconn.Listen(bufSize)
conn, err := grpc.DialContext(ctx, "", grpc.WithContextDialer(dialer), grpc.WithInsecure())
if err != nil {
t.Fatal(err)
}
defer conn.Close()
grpcServer := grpc.NewServer()
defer grpcServer.Stop()
logger := slog.New(slog.NewJSONHandler(os.Stdout, &slog.HandlerOptions{
Level: slog.LevelDebug,
}))
federationServer, err := federation.NewFederationService(federation.FederationServiceConfig{
Resolver: &Resolver{},
Logger: logger,
})
if err != nil {
t.Fatal(err)
}
defer federation.CleanupFederationService(ctx, federationServer)
federation.RegisterFederationServiceServer(grpcServer, federationServer)
go func() {
if err := grpcServer.Serve(listener); err != nil {
t.Fatal(err)
}
}()
client := federation.NewFederationServiceClient(conn)
type errStatus struct {
code codes.Code
message string
details []any
}
for _, tc := range []struct {
desc string
request *federation.GetPostRequest
expected *federation.GetPostResponse
expectedErr *errStatus
}{
{
desc: "success",
request: &federation.GetPostRequest{
Id: "correct-id",
},
expected: &federation.GetPostResponse{
Post: &federation.Post{
Id: "some-id",
Title: "some-title",
Content: "some-content",
Item: &federation.Item{
ItemId: 2,
Name: "item-name2",
},
},
},
},
{
desc: "validation failure",
request: &federation.GetPostRequest{
Id: "wrong-id",
},
expectedErr: &errStatus{
code: codes.FailedPrecondition,
message: "validation3 failed!",
details: []any{
&federation.CustomMessage{
Message: "message1",
},
&federation.CustomMessage{
Message: "message2",
},
&federation.CustomMessage{
Message: "foo",
},
&errdetails.PreconditionFailure{
Violations: []*errdetails.PreconditionFailure_Violation{
{
Type: "type1",
Subject: "some-id",
Description: "description1",
},
},
},
&errdetails.BadRequest{
FieldViolations: []*errdetails.BadRequest_FieldViolation{
{
Field: "some-id",
Description: "description2",
},
},
},
&errdetails.LocalizedMessage{
Locale: "en-US",
Message: "some-content",
},
},
},
},
} {
t.Run(tc.desc, func(t *testing.T) {
res, err := client.GetPost(ctx, tc.request)
if err != nil {
if tc.expectedErr == nil {
t.Fatalf("failed to call GetPost: %v", err)
}
s, ok := status.FromError(err)
if !ok {
t.Fatalf("failed to extract gRPC Status from the error: %v", err)
}
if got := s.Code(); got != tc.expectedErr.code {
t.Errorf("invalid a gRPC status code: got: %v, expected: %v", got, tc.expectedErr.code)
}
if got := s.Message(); got != tc.expectedErr.message {
t.Errorf("invalid a gRPC status message: got: %v, expected: %v", got, tc.expectedErr.message)
}
if diff := cmp.Diff(s.Details(), tc.expectedErr.details, cmpopts.IgnoreUnexported(
federation.CustomMessage{},
errdetails.PreconditionFailure{},
errdetails.PreconditionFailure_Violation{},
errdetails.BadRequest{},
errdetails.BadRequest_FieldViolation{},
errdetails.LocalizedMessage{},
)); diff != "" {
t.Errorf("(-got, +want)\n%s", diff)
}
return
}
if tc.expectedErr != nil {
t.Fatal("expected to receive an error but got nil")
}
if diff := cmp.Diff(res, tc.expected, cmpopts.IgnoreUnexported(
federation.GetPostResponse{},
federation.Post{},
federation.Item{},
)); diff != "" {
t.Errorf("(-got, +want)\n%s", diff)
}
})
}
}
================================================
FILE: _examples/12_validation/proto/buf.yaml
================================================
version: v1
breaking:
use:
- FILE
lint:
use:
- DEFAULT
================================================
FILE: _examples/12_validation/proto/federation/federation.proto
================================================
syntax = "proto3";
package org.federation;
import "google/protobuf/any.proto";
import "grpc/federation/federation.proto";
option go_package = "example/federation;federation";
service FederationService {
option (grpc.federation.service) = {};
rpc GetPost(GetPostRequest) returns (GetPostResponse) {};
}
message GetPostRequest {
string id = 1;
}
message GetPostResponse {
option (grpc.federation.message) = {
def [
{ name: "post" message { name: "Post" } },
{
name: "customHandler"
message {
name: "CustomHandlerMessage",
args: {name: "arg", by: "'some-arg'"}
}
},
{
name: "customMessage"
message {
name: "CustomMessage",
args: {name: "message", by: "'some-message'"}
}
},
{
validation {
error {
code: FAILED_PRECONDITION
message: "'validation1 failed!'",
if: "post.id != 'some-id'"
}
}
},
{
validation {
error {
code: FAILED_PRECONDITION
message: "'validation2 failed!'",
if: "post.id != 'some-id'"
}
}
},
{
validation {
error: {
log_level: WARN
def [
{ by: "grpc.federation.log.add({'validation3_attrs': true})" }
]
code: FAILED_PRECONDITION,
message: "'validation3 failed!'",
if: "$.id != 'correct-id'"
details: {
by: "CustomMessage{message: 'foo'}"
message: [
{
name: "CustomMessage",
args: {
name: "message",
by: "'message1'"
}
},
{
name: "CustomMessage",
args: {
name: "message",
by: "'message2'"
}
}
]
precondition_failure {
violations: [
{
type: "'type1'"
subject: "post.id"
description: "'description1'"
}
]
}
bad_request {
field_violations: [
{
field: "post.id"
description: "'description2'"
}
]
}
localized_message {
locale: "en-US"
message: "post.content"
}
}
}
}
},
{
validation {
error {
def [
{
name: "condition",
by: "post.id != 'some-id'"
}
]
code: FAILED_PRECONDITION
message: "'validation4 failed!'",
if: "condition"
}
}
},
{
name: "customMessageValidation"
validation : {error {code : INTERNAL message : "'custom message is empty'" if : "customMessage.message == ''"}}
},
{validation : {error {code : INTERNAL message : "'item is null'" if : "post.item == null"}}},
{validation : {error {code : INTERNAL message : "'item id is zero'" if : "post.item.item_id == 0"}}},
{validation : {error {code : INTERNAL message : "'item name is empty'" if : "post.item.name == ''"}}}
]
};
Post post = 1 [(grpc.federation.field).by = "post"];
}
message Post {
string id = 1 [(grpc.federation.field).by = "'some-id'"];
string title = 2 [(grpc.federation.field).by = "'some-title'"];
string content = 3 [(grpc.federation.field).by = "'some-content'"];
Item item = 4 [(grpc.federation.field).by = "Item{item_id: 2, name: 'item-name2'}"];
}
message Item {
int32 item_id = 1 [(grpc.federation.field).by = "1"];
string name = 2 [(grpc.federation.field).by = "'item-name'"];
}
message CustomMessage {
string message = 1 [(grpc.federation.field).by = "$.message"];
}
message CustomHandlerMessage {
option (grpc.federation.message) = {
def {
validation {
error {
code: FAILED_PRECONDITION
if: "$.arg == 'wrong'"
}
}
}
custom_resolver: true
};
}
================================================
FILE: _examples/13_map/.gitignore
================================================
grpc/federation
================================================
FILE: _examples/13_map/.vscode/settings.json
================================================
{
"protoc": {
"options": [
"--proto_path=proto",
"--proto_path=proto_deps"
]
},
"grpc-federation": {
"path": "../../bin/grpc-federation-language-server",
"import-paths": [
"proto",
"proto_deps"
]
}
}
================================================
FILE: _examples/13_map/Makefile
================================================
MAKEFILE_DIR := $(dir $(lastword $(MAKEFILE_LIST)))
GOBIN := $(MAKEFILE_DIR)/../../bin
PATH := $(GOBIN):$(PATH)
JAEGER_IMAGE := jaegertracing/all-in-one:latest
.PHONY: generate
generate:
$(GOBIN)/buf generate
.PHONY: lint
lint:
@$(GOBIN)/grpc-federation-linter -Iproto -Iproto_deps ./proto/federation/federation.proto
.PHONY: test
test:
go test -race ./ -count=1
.PHONY: grpc-federation/generate
grpc-federation/generate:
@$(GOBIN)/grpc-federation-generator ./proto/federation/federation.proto
.PHONY: grpc-federation/watch
grpc-federation/watch:
@$(GOBIN)/grpc-federation-generator -w
.PHONY: jaeger/start
jaeger/start:
@docker run \
-e COLLECTOR_OTLP_ENABLED=true \
-p 16686:16686 \
-p 4317:4317 \
-p 4318:4318 \
-d \
$(JAEGER_IMAGE)
.PHONY: jaeger/stop
jaeger/stop:
@docker stop $(shell docker ps -q --filter ancestor=$(JAEGER_IMAGE))
================================================
FILE: _examples/13_map/buf.gen.yaml
================================================
version: v1
managed:
enabled: true
plugins:
- plugin: go
out: .
opt: paths=source_relative
- plugin: go-grpc
out: .
opt: paths=source_relative
- plugin: grpc-federation
out: .
opt:
- paths=source_relative
- import_paths=proto
================================================
FILE: _examples/13_map/buf.work.yaml
================================================
version: v1
directories:
- proto
- proto_deps
================================================
FILE: _examples/13_map/federation/federation.pb.go
================================================
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.33.0
// protoc (unknown)
// source: federation/federation.proto
package federation
import (
_ "github.com/mercari/grpc-federation/grpc/federation"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
_ "google.golang.org/protobuf/types/known/anypb"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
type Item_ItemType int32
const (
Item_ITEM_TYPE_UNSPECIFIED Item_ItemType = 0
Item_ITEM_TYPE_1 Item_ItemType = 1
Item_ITEM_TYPE_2 Item_ItemType = 2
Item_ITEM_TYPE_3 Item_ItemType = 3
)
// Enum value maps for Item_ItemType.
var (
Item_ItemType_name = map[int32]string{
0: "ITEM_TYPE_UNSPECIFIED",
1: "ITEM_TYPE_1",
2: "ITEM_TYPE_2",
3: "ITEM_TYPE_3",
}
Item_ItemType_value = map[string]int32{
"ITEM_TYPE_UNSPECIFIED": 0,
"ITEM_TYPE_1": 1,
"ITEM_TYPE_2": 2,
"ITEM_TYPE_3": 3,
}
)
func (x Item_ItemType) Enum() *Item_ItemType {
p := new(Item_ItemType)
*p = x
return p
}
func (x Item_ItemType) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (Item_ItemType) Descriptor() protoreflect.EnumDescriptor {
return file_federation_federation_proto_enumTypes[0].Descriptor()
}
func (Item_ItemType) Type() protoreflect.EnumType {
return &file_federation_federation_proto_enumTypes[0]
}
func (x Item_ItemType) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use Item_ItemType.Descriptor instead.
func (Item_ItemType) EnumDescriptor() ([]byte, []int) {
return file_federation_federation_proto_rawDescGZIP(), []int{4, 0}
}
type GetPostsRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Ids []string `protobuf:"bytes,1,rep,name=ids,proto3" json:"ids,omitempty"`
}
func (x *GetPostsRequest) Reset() {
*x = GetPostsRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_federation_federation_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GetPostsRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetPostsRequest) ProtoMessage() {}
func (x *GetPostsRequest) ProtoReflect() protoreflect.Message {
mi := &file_federation_federation_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GetPostsRequest.ProtoReflect.Descriptor instead.
func (*GetPostsRequest) Descriptor() ([]byte, []int) {
return file_federation_federation_proto_rawDescGZIP(), []int{0}
}
func (x *GetPostsRequest) GetIds() []string {
if x != nil {
return x.Ids
}
return nil
}
type GetPostsResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Posts *Posts `protobuf:"bytes,1,opt,name=posts,proto3" json:"posts,omitempty"`
}
func (x *GetPostsResponse) Reset() {
*x = GetPostsResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_federation_federation_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GetPostsResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetPostsResponse) ProtoMessage() {}
func (x *GetPostsResponse) ProtoReflect() protoreflect.Message {
mi := &file_federation_federation_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GetPostsResponse.ProtoReflect.Descriptor instead.
func (*GetPostsResponse) Descriptor() ([]byte, []int) {
return file_federation_federation_proto_rawDescGZIP(), []int{1}
}
func (x *GetPostsResponse) GetPosts() *Posts {
if x != nil {
return x.Posts
}
return nil
}
type Posts struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Ids []string `protobuf:"bytes,1,rep,name=ids,proto3" json:"ids,omitempty"`
Titles []string `protobuf:"bytes,2,rep,name=titles,proto3" json:"titles,omitempty"`
Contents []string `protobuf:"bytes,3,rep,name=contents,proto3" json:"contents,omitempty"`
Users []*User `protobuf:"bytes,4,rep,name=users,proto3" json:"users,omitempty"`
Items []*Posts_PostItem `protobuf:"bytes,5,rep,name=items,proto3" json:"items,omitempty"`
ItemTypes []Item_ItemType `protobuf:"varint,6,rep,packed,name=item_types,json=itemTypes,proto3,enum=org.federation.Item_ItemType" json:"item_types,omitempty"`
SelectedItemTypes []Item_ItemType `protobuf:"varint,7,rep,packed,name=selected_item_types,json=selectedItemTypes,proto3,enum=org.federation.Item_ItemType" json:"selected_item_types,omitempty"`
}
func (x *Posts) Reset() {
*x = Posts{}
if protoimpl.UnsafeEnabled {
mi := &file_federation_federation_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Posts) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Posts) ProtoMessage() {}
func (x *Posts) ProtoReflect() protoreflect.Message {
mi := &file_federation_federation_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Posts.ProtoReflect.Descriptor instead.
func (*Posts) Descriptor() ([]byte, []int) {
return file_federation_federation_proto_rawDescGZIP(), []int{2}
}
func (x *Posts) GetIds() []string {
if x != nil {
return x.Ids
}
return nil
}
func (x *Posts) GetTitles() []string {
if x != nil {
return x.Titles
}
return nil
}
func (x *Posts) GetContents() []string {
if x != nil {
return x.Contents
}
return nil
}
func (x *Posts) GetUsers() []*User {
if x != nil {
return x.Users
}
return nil
}
func (x *Posts) GetItems() []*Posts_PostItem {
if x != nil {
return x.Items
}
return nil
}
func (x *Posts) GetItemTypes() []Item_ItemType {
if x != nil {
return x.ItemTypes
}
return nil
}
func (x *Posts) GetSelectedItemTypes() []Item_ItemType {
if x != nil {
return x.SelectedItemTypes
}
return nil
}
type User struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
}
func (x *User) Reset() {
*x = User{}
if protoimpl.UnsafeEnabled {
mi := &file_federation_federation_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *User) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*User) ProtoMessage() {}
func (x *User) ProtoReflect() protoreflect.Message {
mi := &file_federation_federation_proto_msgTypes[3]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use User.ProtoReflect.Descriptor instead.
func (*User) Descriptor() ([]byte, []int) {
return file_federation_federation_proto_rawDescGZIP(), []int{3}
}
func (x *User) GetId() string {
if x != nil {
return x.Id
}
return ""
}
func (x *User) GetName() string {
if x != nil {
return x.Name
}
return ""
}
type Item struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
}
func (x *Item) Reset() {
*x = Item{}
if protoimpl.UnsafeEnabled {
mi := &file_federation_federation_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Item) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Item) ProtoMessage() {}
func (x *Item) ProtoReflect() protoreflect.Message {
mi := &file_federation_federation_proto_msgTypes[4]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Item.ProtoReflect.Descriptor instead.
func (*Item) Descriptor() ([]byte, []int) {
return file_federation_federation_proto_rawDescGZIP(), []int{4}
}
type Posts_PostItem struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
}
func (x *Posts_PostItem) Reset() {
*x = Posts_PostItem{}
if protoimpl.UnsafeEnabled {
mi := &file_federation_federation_proto_msgTypes[5]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Posts_PostItem) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Posts_PostItem) ProtoMessage() {}
func (x *Posts_PostItem) ProtoReflect() protoreflect.Message {
mi := &file_federation_federation_proto_msgTypes[5]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Posts_PostItem.ProtoReflect.Descriptor instead.
func (*Posts_PostItem) Descriptor() ([]byte, []int) {
return file_federation_federation_proto_rawDescGZIP(), []int{2, 0}
}
func (x *Posts_PostItem) GetName() string {
if x != nil {
return x.Name
}
return ""
}
var File_federation_federation_proto protoreflect.FileDescriptor
var file_federation_federation_proto_rawDesc = []byte{
0x0a, 0x1b, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x66, 0x65, 0x64,
0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0e, 0x6f,
0x72, 0x67, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x19, 0x67,
0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x61,
0x6e, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x20, 0x67, 0x72, 0x70, 0x63, 0x2f, 0x66,
0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61,
0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x23, 0x0a, 0x0f, 0x47, 0x65,
0x74, 0x50, 0x6f, 0x73, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x10, 0x0a,
0x03, 0x69, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x03, 0x69, 0x64, 0x73, 0x22,
0x75, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x50, 0x6f, 0x73, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f,
0x6e, 0x73, 0x65, 0x12, 0x37, 0x0a, 0x05, 0x70, 0x6f, 0x73, 0x74, 0x73, 0x18, 0x01, 0x20, 0x01,
0x28, 0x0b, 0x32, 0x15, 0x2e, 0x6f, 0x72, 0x67, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74,
0x69, 0x6f, 0x6e, 0x2e, 0x50, 0x6f, 0x73, 0x74, 0x73, 0x42, 0x0a, 0x9a, 0x4a, 0x07, 0x12, 0x05,
0x70, 0x6f, 0x73, 0x74, 0x73, 0x52, 0x05, 0x70, 0x6f, 0x73, 0x74, 0x73, 0x3a, 0x28, 0x9a, 0x4a,
0x25, 0x0a, 0x23, 0x0a, 0x05, 0x70, 0x6f, 0x73, 0x74, 0x73, 0x6a, 0x1a, 0x0a, 0x05, 0x50, 0x6f,
0x73, 0x74, 0x73, 0x12, 0x11, 0x0a, 0x08, 0x70, 0x6f, 0x73, 0x74, 0x5f, 0x69, 0x64, 0x73, 0x12,
0x05, 0x24, 0x2e, 0x69, 0x64, 0x73, 0x22, 0xb7, 0x08, 0x0a, 0x05, 0x50, 0x6f, 0x73, 0x74, 0x73,
0x12, 0x1a, 0x0a, 0x03, 0x69, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x42, 0x08, 0x9a,
0x4a, 0x05, 0x12, 0x03, 0x69, 0x64, 0x73, 0x52, 0x03, 0x69, 0x64, 0x73, 0x12, 0x38, 0x0a, 0x06,
0x74, 0x69, 0x74, 0x6c, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x42, 0x20, 0x9a, 0x4a,
0x1d, 0x12, 0x1b, 0x70, 0x6f, 0x73, 0x74, 0x73, 0x2e, 0x6d, 0x61, 0x70, 0x28, 0x70, 0x6f, 0x73,
0x74, 0x2c, 0x20, 0x70, 0x6f, 0x73, 0x74, 0x2e, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x29, 0x52, 0x06,
0x74, 0x69, 0x74, 0x6c, 0x65, 0x73, 0x12, 0x3e, 0x0a, 0x08, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e,
0x74, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x42, 0x22, 0x9a, 0x4a, 0x1f, 0x12, 0x1d, 0x70,
0x6f, 0x73, 0x74, 0x73, 0x2e, 0x6d, 0x61, 0x70, 0x28, 0x70, 0x6f, 0x73, 0x74, 0x2c, 0x20, 0x70,
0x6f, 0x73, 0x74, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x29, 0x52, 0x08, 0x63, 0x6f,
0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x36, 0x0a, 0x05, 0x75, 0x73, 0x65, 0x72, 0x73, 0x18,
0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6f, 0x72, 0x67, 0x2e, 0x66, 0x65, 0x64, 0x65,
0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x42, 0x0a, 0x9a, 0x4a, 0x07,
0x12, 0x05, 0x75, 0x73, 0x65, 0x72, 0x73, 0x52, 0x05, 0x75, 0x73, 0x65, 0x72, 0x73, 0x12, 0x40,
0x0a, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e,
0x6f, 0x72, 0x67, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x50,
0x6f, 0x73, 0x74, 0x73, 0x2e, 0x50, 0x6f, 0x73, 0x74, 0x49, 0x74, 0x65, 0x6d, 0x42, 0x0a, 0x9a,
0x4a, 0x07, 0x12, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x52, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73,
0x12, 0x4d, 0x0a, 0x0a, 0x69, 0x74, 0x65, 0x6d, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x18, 0x06,
0x20, 0x03, 0x28, 0x0e, 0x32, 0x1d, 0x2e, 0x6f, 0x72, 0x67, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72,
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x49, 0x74, 0x65, 0x6d, 0x2e, 0x49, 0x74, 0x65, 0x6d, 0x54,
0x79, 0x70, 0x65, 0x42, 0x0f, 0x9a, 0x4a, 0x0c, 0x12, 0x0a, 0x69, 0x74, 0x65, 0x6d, 0x5f, 0x74,
0x79, 0x70, 0x65, 0x73, 0x52, 0x09, 0x69, 0x74, 0x65, 0x6d, 0x54, 0x79, 0x70, 0x65, 0x73, 0x12,
0x67, 0x0a, 0x13, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x65, 0x64, 0x5f, 0x69, 0x74, 0x65, 0x6d,
0x5f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x1d, 0x2e, 0x6f,
0x72, 0x67, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x49, 0x74,
0x65, 0x6d, 0x2e, 0x49, 0x74, 0x65, 0x6d, 0x54, 0x79, 0x70, 0x65, 0x42, 0x18, 0x9a, 0x4a, 0x15,
0x12, 0x13, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x65, 0x64, 0x5f, 0x69, 0x74, 0x65, 0x6d, 0x5f,
0x74, 0x79, 0x70, 0x65, 0x73, 0x52, 0x11, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x65, 0x64, 0x49,
0x74, 0x65, 0x6d, 0x54, 0x79, 0x70, 0x65, 0x73, 0x1a, 0x33, 0x0a, 0x08, 0x50, 0x6f, 0x73, 0x74,
0x49, 0x74, 0x65, 0x6d, 0x12, 0x27, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01,
0x28, 0x09, 0x42, 0x13, 0x9a, 0x4a, 0x10, 0x12, 0x0e, 0x27, 0x69, 0x74, 0x65, 0x6d, 0x5f, 0x27,
0x20, 0x2b, 0x20, 0x24, 0x2e, 0x69, 0x64, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x3a, 0xb0, 0x04,
0x9a, 0x4a, 0xac, 0x04, 0x0a, 0x35, 0x0a, 0x03, 0x72, 0x65, 0x73, 0x72, 0x2e, 0x0a, 0x19, 0x70,
0x6f, 0x73, 0x74, 0x2e, 0x50, 0x6f, 0x73, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f,
0x47, 0x65, 0x74, 0x50, 0x6f, 0x73, 0x74, 0x73, 0x12, 0x11, 0x0a, 0x03, 0x69, 0x64, 0x73, 0x12,
0x0a, 0x24, 0x2e, 0x70, 0x6f, 0x73, 0x74, 0x5f, 0x69, 0x64, 0x73, 0x0a, 0x12, 0x0a, 0x05, 0x70,
0x6f, 0x73, 0x74, 0x73, 0x5a, 0x09, 0x72, 0x65, 0x73, 0x2e, 0x70, 0x6f, 0x73, 0x74, 0x73, 0x0a,
0x1f, 0x0a, 0x03, 0x69, 0x64, 0x73, 0x62, 0x18, 0x0a, 0x0d, 0x0a, 0x04, 0x70, 0x6f, 0x73, 0x74,
0x12, 0x05, 0x70, 0x6f, 0x73, 0x74, 0x73, 0x5a, 0x07, 0x70, 0x6f, 0x73, 0x74, 0x2e, 0x69, 0x64,
0x0a, 0x39, 0x0a, 0x05, 0x75, 0x73, 0x65, 0x72, 0x73, 0x62, 0x30, 0x0a, 0x0d, 0x0a, 0x04, 0x69,
0x74, 0x65, 0x72, 0x12, 0x05, 0x70, 0x6f, 0x73, 0x74, 0x73, 0x62, 0x1f, 0x0a, 0x04, 0x55, 0x73,
0x65, 0x72, 0x12, 0x17, 0x0a, 0x07, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x12, 0x0c, 0x69,
0x74, 0x65, 0x72, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x0a, 0x39, 0x0a, 0x05, 0x69,
0x74, 0x65, 0x6d, 0x73, 0x62, 0x30, 0x0a, 0x0d, 0x0a, 0x04, 0x69, 0x74, 0x65, 0x72, 0x12, 0x05,
0x70, 0x6f, 0x73, 0x74, 0x73, 0x62, 0x1f, 0x0a, 0x0e, 0x50, 0x6f, 0x73, 0x74, 0x73, 0x2e, 0x50,
0x6f, 0x73, 0x74, 0x49, 0x74, 0x65, 0x6d, 0x12, 0x0d, 0x0a, 0x02, 0x69, 0x64, 0x12, 0x07, 0x69,
0x74, 0x65, 0x72, 0x2e, 0x69, 0x64, 0x0a, 0x67, 0x0a, 0x11, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65,
0x5f, 0x69, 0x74, 0x65, 0x6d, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x5a, 0x52, 0x5b, 0x75, 0x73,
0x65, 0x72, 0x2e, 0x49, 0x74, 0x65, 0x6d, 0x2e, 0x49, 0x74, 0x65, 0x6d, 0x54, 0x79, 0x70, 0x65,
0x2e, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x28, 0x27, 0x49, 0x54, 0x45, 0x4d, 0x5f, 0x54, 0x59, 0x50,
0x45, 0x5f, 0x31, 0x27, 0x29, 0x2c, 0x20, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x49, 0x74, 0x65, 0x6d,
0x2e, 0x49, 0x74, 0x65, 0x6d, 0x54, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x28,
0x27, 0x49, 0x54, 0x45, 0x4d, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x32, 0x27, 0x29, 0x5d, 0x0a,
0x3e, 0x0a, 0x0a, 0x69, 0x74, 0x65, 0x6d, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x62, 0x30, 0x0a,
0x18, 0x0a, 0x03, 0x74, 0x79, 0x70, 0x12, 0x11, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x69,
0x74, 0x65, 0x6d, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x6a, 0x14, 0x0a, 0x0d, 0x49, 0x74, 0x65,
0x6d, 0x2e, 0x49, 0x74, 0x65, 0x6d, 0x54, 0x79, 0x70, 0x65, 0x12, 0x03, 0x74, 0x79, 0x70, 0x0a,
0x9e, 0x01, 0x0a, 0x13, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x65, 0x64, 0x5f, 0x69, 0x74, 0x65,
0x6d, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x62, 0x86, 0x01, 0x0a, 0x18, 0x0a, 0x03, 0x74, 0x79,
0x70, 0x12, 0x11, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x69, 0x74, 0x65, 0x6d, 0x5f, 0x74,
0x79, 0x70, 0x65, 0x73, 0x6a, 0x6a, 0x0a, 0x0d, 0x49, 0x74, 0x65, 0x6d, 0x2e, 0x49, 0x74, 0x65,
0x6d, 0x54, 0x79, 0x70, 0x65, 0x12, 0x59, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65,
0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x65, 0x6e, 0x75, 0x6d, 0x2e, 0x73, 0x65, 0x6c, 0x65,
0x63, 0x74, 0x28, 0x74, 0x72, 0x75, 0x65, 0x2c, 0x20, 0x74, 0x79, 0x70, 0x2c, 0x20, 0x75, 0x73,
0x65, 0x72, 0x2e, 0x49, 0x74, 0x65, 0x6d, 0x2e, 0x49, 0x74, 0x65, 0x6d, 0x54, 0x79, 0x70, 0x65,
0x2e, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x28, 0x27, 0x49, 0x54, 0x45, 0x4d, 0x5f, 0x54, 0x59, 0x50,
0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x27, 0x29, 0x29,
0x22, 0x77, 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, 0x6e, 0x61, 0x6d, 0x65,
0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x3a, 0x4b, 0x9a, 0x4a,
0x48, 0x0a, 0x32, 0x0a, 0x03, 0x72, 0x65, 0x73, 0x72, 0x2b, 0x0a, 0x18, 0x75, 0x73, 0x65, 0x72,
0x2e, 0x55, 0x73, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x47, 0x65, 0x74,
0x55, 0x73, 0x65, 0x72, 0x12, 0x0f, 0x0a, 0x02, 0x69, 0x64, 0x12, 0x09, 0x24, 0x2e, 0x75, 0x73,
0x65, 0x72, 0x5f, 0x69, 0x64, 0x0a, 0x12, 0x0a, 0x04, 0x75, 0x73, 0x65, 0x72, 0x18, 0x01, 0x5a,
0x08, 0x72, 0x65, 0x73, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x22, 0x89, 0x01, 0x0a, 0x04, 0x49, 0x74,
0x65, 0x6d, 0x22, 0x71, 0x0a, 0x08, 0x49, 0x74, 0x65, 0x6d, 0x54, 0x79, 0x70, 0x65, 0x12, 0x19,
0x0a, 0x15, 0x49, 0x54, 0x45, 0x4d, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50,
0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0f, 0x0a, 0x0b, 0x49, 0x54, 0x45,
0x4d, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x31, 0x10, 0x01, 0x12, 0x0f, 0x0a, 0x0b, 0x49, 0x54,
0x45, 0x4d, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x32, 0x10, 0x02, 0x12, 0x0f, 0x0a, 0x0b, 0x49,
0x54, 0x45, 0x4d, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x33, 0x10, 0x03, 0x1a, 0x17, 0x9a, 0x4a,
0x14, 0x0a, 0x12, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x49, 0x74, 0x65, 0x6d, 0x2e, 0x49, 0x74, 0x65,
0x6d, 0x54, 0x79, 0x70, 0x65, 0x3a, 0x0e, 0x9a, 0x4a, 0x0b, 0x1a, 0x09, 0x75, 0x73, 0x65, 0x72,
0x2e, 0x49, 0x74, 0x65, 0x6d, 0x32, 0x69, 0x0a, 0x11, 0x46, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74,
0x69, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x4f, 0x0a, 0x08, 0x47, 0x65,
0x74, 0x50, 0x6f, 0x73, 0x74, 0x73, 0x12, 0x1f, 0x2e, 0x6f, 0x72, 0x67, 0x2e, 0x66, 0x65, 0x64,
0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x6f, 0x73, 0x74, 0x73,
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x6f, 0x72, 0x67, 0x2e, 0x66, 0x65,
0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x6f, 0x73, 0x74,
0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x1a, 0x03, 0x9a, 0x4a, 0x00,
0x42, 0xc2, 0x01, 0x9a, 0x4a, 0x22, 0x12, 0x0f, 0x70, 0x6f, 0x73, 0x74, 0x2f, 0x70, 0x6f, 0x73,
0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0f, 0x75, 0x73, 0x65, 0x72, 0x2f, 0x75, 0x73,
0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x0a, 0x12, 0x63, 0x6f, 0x6d, 0x2e, 0x6f, 0x72,
0x67, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x0f, 0x46, 0x65,
0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a,
0x1d, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2f, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74,
0x69, 0x6f, 0x6e, 0x3b, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0xa2, 0x02,
0x03, 0x4f, 0x46, 0x58, 0xaa, 0x02, 0x0e, 0x4f, 0x72, 0x67, 0x2e, 0x46, 0x65, 0x64, 0x65, 0x72,
0x61, 0x74, 0x69, 0x6f, 0x6e, 0xca, 0x02, 0x0e, 0x4f, 0x72, 0x67, 0x5c, 0x46, 0x65, 0x64, 0x65,
0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0xe2, 0x02, 0x1a, 0x4f, 0x72, 0x67, 0x5c, 0x46, 0x65, 0x64,
0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64,
0x61, 0x74, 0x61, 0xea, 0x02, 0x0f, 0x4f, 0x72, 0x67, 0x3a, 0x3a, 0x46, 0x65, 0x64, 0x65, 0x72,
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_federation_federation_proto_rawDescOnce sync.Once
file_federation_federation_proto_rawDescData = file_federation_federation_proto_rawDesc
)
func file_federation_federation_proto_rawDescGZIP() []byte {
file_federation_federation_proto_rawDescOnce.Do(func() {
file_federation_federation_proto_rawDescData = protoimpl.X.CompressGZIP(file_federation_federation_proto_rawDescData)
})
return file_federation_federation_proto_rawDescData
}
var file_federation_federation_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
var file_federation_federation_proto_msgTypes = make([]protoimpl.MessageInfo, 6)
var file_federation_federation_proto_goTypes = []interface{}{
(Item_ItemType)(0), // 0: org.federation.Item.ItemType
(*GetPostsRequest)(nil), // 1: org.federation.GetPostsRequest
(*GetPostsResponse)(nil), // 2: org.federation.GetPostsResponse
(*Posts)(nil), // 3: org.federation.Posts
(*User)(nil), // 4: org.federation.User
(*Item)(nil), // 5: org.federation.Item
(*Posts_PostItem)(nil), // 6: org.federation.Posts.PostItem
}
var file_federation_federation_proto_depIdxs = []int32{
3, // 0: org.federation.GetPostsResponse.posts:type_name -> org.federation.Posts
4, // 1: org.federation.Posts.users:type_name -> org.federation.User
6, // 2: org.federation.Posts.items:type_name -> org.federation.Posts.PostItem
0, // 3: org.federation.Posts.item_types:type_name -> org.federation.Item.ItemType
0, // 4: org.federation.Posts.selected_item_types:type_name -> org.federation.Item.ItemType
1, // 5: org.federation.FederationService.GetPosts:input_type -> org.federation.GetPostsRequest
2, // 6: org.federation.FederationService.GetPosts:output_type -> org.federation.GetPostsResponse
6, // [6:7] is the sub-list for method output_type
5, // [5:6] is the sub-list for method input_type
5, // [5:5] is the sub-list for extension type_name
5, // [5:5] is the sub-list for extension extendee
0, // [0:5] is the sub-list for field type_name
}
func init() { file_federation_federation_proto_init() }
func file_federation_federation_proto_init() {
if File_federation_federation_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_federation_federation_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetPostsRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_federation_federation_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetPostsResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_federation_federation_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Posts); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_federation_federation_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*User); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_federation_federation_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Item); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_federation_federation_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Posts_PostItem); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_federation_federation_proto_rawDesc,
NumEnums: 1,
NumMessages: 6,
NumExtensions: 0,
NumServices: 1,
},
GoTypes: file_federation_federation_proto_goTypes,
DependencyIndexes: file_federation_federation_proto_depIdxs,
EnumInfos: file_federation_federation_proto_enumTypes,
MessageInfos: file_federation_federation_proto_msgTypes,
}.Build()
File_federation_federation_proto = out.File
file_federation_federation_proto_rawDesc = nil
file_federation_federation_proto_goTypes = nil
file_federation_federation_proto_depIdxs = nil
}
================================================
FILE: _examples/13_map/federation/federation_grpc.pb.go
================================================
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.3.0
// - protoc (unknown)
// source: federation/federation.proto
package federation
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 (
FederationService_GetPosts_FullMethodName = "/org.federation.FederationService/GetPosts"
)
// FederationServiceClient is the client API for FederationService 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 FederationServiceClient interface {
GetPosts(ctx context.Context, in *GetPostsRequest, opts ...grpc.CallOption) (*GetPostsResponse, error)
}
type federationServiceClient struct {
cc grpc.ClientConnInterface
}
func NewFederationServiceClient(cc grpc.ClientConnInterface) FederationServiceClient {
return &federationServiceClient{cc}
}
func (c *federationServiceClient) GetPosts(ctx context.Context, in *GetPostsRequest, opts ...grpc.CallOption) (*GetPostsResponse, error) {
out := new(GetPostsResponse)
err := c.cc.Invoke(ctx, FederationService_GetPosts_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// FederationServiceServer is the server API for FederationService service.
// All implementations must embed UnimplementedFederationServiceServer
// for forward compatibility
type FederationServiceServer interface {
GetPosts(context.Context, *GetPostsRequest) (*GetPostsResponse, error)
mustEmbedUnimplementedFederationServiceServer()
}
// UnimplementedFederationServiceServer must be embedded to have forward compatible implementations.
type UnimplementedFederationServiceServer struct {
}
func (UnimplementedFederationServiceServer) GetPosts(context.Context, *GetPostsRequest) (*GetPostsResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetPosts not implemented")
}
func (UnimplementedFederationServiceServer) mustEmbedUnimplementedFederationServiceServer() {}
// UnsafeFederationServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to FederationServiceServer will
// result in compilation errors.
type UnsafeFederationServiceServer interface {
mustEmbedUnimplementedFederationServiceServer()
}
func RegisterFederationServiceServer(s grpc.ServiceRegistrar, srv FederationServiceServer) {
s.RegisterService(&FederationService_ServiceDesc, srv)
}
func _FederationService_GetPosts_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetPostsRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(FederationServiceServer).GetPosts(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: FederationService_GetPosts_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(FederationServiceServer).GetPosts(ctx, req.(*GetPostsRequest))
}
return interceptor(ctx, in, info, handler)
}
// FederationService_ServiceDesc is the grpc.ServiceDesc for FederationService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var FederationService_ServiceDesc = grpc.ServiceDesc{
ServiceName: "org.federation.FederationService",
HandlerType: (*FederationServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "GetPosts",
Handler: _FederationService_GetPosts_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "federation/federation.proto",
}
================================================
FILE: _examples/13_map/federation/federation_grpc_federation.pb.go
================================================
// Code generated by protoc-gen-grpc-federation. DO NOT EDIT!
// versions:
//
// protoc-gen-grpc-federation: (devel)
//
// source: federation/federation.proto
package federation
import (
"context"
"io"
"log/slog"
"reflect"
grpcfed "github.com/mercari/grpc-federation/grpc/federation"
grpcfedcel "github.com/mercari/grpc-federation/grpc/federation/cel"
"go.opentelemetry.io/otel"
"go.opentelemetry.io/otel/trace"
post "example/post"
user "example/user"
)
var (
_ = reflect.Invalid // to avoid "imported and not used error"
)
// Org_Federation_GetPostsResponseVariable represents variable definitions in "org.federation.GetPostsResponse".
type FederationService_Org_Federation_GetPostsResponseVariable struct {
Posts *Posts
}
// Org_Federation_GetPostsResponseArgument is argument for "org.federation.GetPostsResponse" message.
type FederationService_Org_Federation_GetPostsResponseArgument struct {
Ids []string
FederationService_Org_Federation_GetPostsResponseVariable
}
// Org_Federation_PostsVariable represents variable definitions in "org.federation.Posts".
type FederationService_Org_Federation_PostsVariable struct {
Ids []string
ItemTypes []Item_ItemType
Items []*Posts_PostItem
Posts []*post.Post
Res *post.GetPostsResponse
SelectedItemTypes []Item_ItemType
SourceItemTypes []user.Item_ItemType
Users []*User
}
// Org_Federation_PostsArgument is argument for "org.federation.Posts" message.
type FederationService_Org_Federation_PostsArgument struct {
PostIds []string
FederationService_Org_Federation_PostsVariable
}
// Org_Federation_Posts_PostItemVariable represents variable definitions in "org.federation.PostItem".
type FederationService_Org_Federation_Posts_PostItemVariable struct {
}
// Org_Federation_Posts_PostItemArgument is argument for "org.federation.PostItem" message.
type FederationService_Org_Federation_Posts_PostItemArgument struct {
Id string
FederationService_Org_Federation_Posts_PostItemVariable
}
// Org_Federation_UserVariable represents variable definitions in "org.federation.User".
type FederationService_Org_Federation_UserVariable struct {
Res *user.GetUserResponse
User *user.User
}
// Org_Federation_UserArgument is argument for "org.federation.User" message.
type FederationService_Org_Federation_UserArgument struct {
UserId string
FederationService_Org_Federation_UserVariable
}
// FederationServiceConfig configuration required to initialize the service that use GRPC Federation.
type FederationServiceConfig struct {
// Client provides a factory that creates the gRPC Client needed to invoke methods of the gRPC Service on which the Federation Service depends.
// If this interface is not provided, an error is returned during initialization.
Client FederationServiceClientFactory // required
// ErrorHandler Federation Service often needs to convert errors received from downstream services.
// If an error occurs during method execution in the Federation Service, this error handler is called and the returned error is treated as a final error.
ErrorHandler grpcfed.ErrorHandler
// Logger sets the logger used to output Debug/Info/Error information.
Logger *slog.Logger
}
// FederationServiceClientFactory provides a factory that creates the gRPC Client needed to invoke methods of the gRPC Service on which the Federation Service depends.
type FederationServiceClientFactory interface {
// Post_PostServiceClient create a gRPC Client to be used to call methods in post.PostService.
Post_PostServiceClient(FederationServiceClientConfig) (post.PostServiceClient, error)
// User_UserServiceClient create a gRPC Client to be used to call methods in user.UserService.
User_UserServiceClient(FederationServiceClientConfig) (user.UserServiceClient, error)
}
// FederationServiceClientConfig helper to create gRPC client.
// Hints for creating a gRPC Client.
type FederationServiceClientConfig struct {
// Service FQDN ( `.` ) of the service on Protocol Buffers.
Service string
}
// FederationServiceDependentClientSet has a gRPC client for all services on which the federation service depends.
// This is provided as an argument when implementing the custom resolver.
type FederationServiceDependentClientSet struct {
Post_PostServiceClient post.PostServiceClient
User_UserServiceClient user.UserServiceClient
}
// FederationServiceResolver provides an interface to directly implement message resolver and field resolver not defined in Protocol Buffers.
type FederationServiceResolver interface {
}
// FederationServiceCELPluginWasmConfig type alias for grpcfedcel.WasmConfig.
type FederationServiceCELPluginWasmConfig = grpcfedcel.WasmConfig
// FederationServiceCELPluginConfig hints for loading a WebAssembly based plugin.
type FederationServiceCELPluginConfig struct {
CacheDir string
}
// FederationServiceUnimplementedResolver a structure implemented to satisfy the Resolver interface.
// An Unimplemented error is always returned.
// This is intended for use when there are many Resolver interfaces that do not need to be implemented,
// by embedding them in a resolver structure that you have created.
type FederationServiceUnimplementedResolver struct{}
const (
FederationService_DependentMethod_Post_PostService_GetPosts = "/post.PostService/GetPosts"
FederationService_DependentMethod_User_UserService_GetUser = "/user.UserService/GetUser"
)
// FederationService represents Federation Service.
type FederationService struct {
UnimplementedFederationServiceServer
cfg FederationServiceConfig
logger *slog.Logger
isLogLevelDebug bool
errorHandler grpcfed.ErrorHandler
celCacheMap *grpcfed.CELCacheMap
tracer trace.Tracer
celTypeHelper *grpcfed.CELTypeHelper
celEnvOpts []grpcfed.CELEnvOption
celPlugins []*grpcfedcel.CELPlugin
client *FederationServiceDependentClientSet
}
// NewFederationService creates FederationService instance by FederationServiceConfig.
func NewFederationService(cfg FederationServiceConfig) (*FederationService, error) {
if cfg.Client == nil {
return nil, grpcfed.ErrClientConfig
}
Post_PostServiceClient, err := cfg.Client.Post_PostServiceClient(FederationServiceClientConfig{
Service: "post.PostService",
})
if err != nil {
return nil, err
}
User_UserServiceClient, err := cfg.Client.User_UserServiceClient(FederationServiceClientConfig{
Service: "user.UserService",
})
if err != nil {
return nil, err
}
logger := cfg.Logger
if logger == nil {
logger = slog.New(slog.NewJSONHandler(io.Discard, nil))
}
tracer := otel.Tracer("org.federation.FederationService")
ctx := grpcfed.WithLogger(context.Background(), logger)
ctx = grpcfed.WithTracer(ctx, tracer)
errorHandler := cfg.ErrorHandler
if errorHandler == nil {
errorHandler = func(ctx context.Context, methodName string, err error) error { return err }
}
celTypeHelperFieldMap := grpcfed.CELTypeHelperFieldMap{
"grpc.federation.private.org.federation.GetPostsResponseArgument": {
"ids": grpcfed.NewCELFieldType(grpcfed.NewCELListType(grpcfed.CELStringType), "Ids"),
},
"grpc.federation.private.org.federation.PostsArgument": {
"post_ids": grpcfed.NewCELFieldType(grpcfed.NewCELListType(grpcfed.CELStringType), "PostIds"),
},
"grpc.federation.private.org.federation.Posts_PostItemArgument": {
"id": grpcfed.NewCELFieldType(grpcfed.CELStringType, "Id"),
},
"grpc.federation.private.org.federation.UserArgument": {
"user_id": grpcfed.NewCELFieldType(grpcfed.CELStringType, "UserId"),
},
}
celTypeHelper := grpcfed.NewCELTypeHelper("org.federation", celTypeHelperFieldMap)
var celEnvOpts []grpcfed.CELEnvOption
celEnvOpts = append(celEnvOpts, grpcfed.NewDefaultEnvOptions(celTypeHelper)...)
celEnvOpts = append(celEnvOpts, grpcfed.GRPCErrorAccessorOptions(celTypeHelper, "post.GetPostsResponse")...)
celEnvOpts = append(celEnvOpts, grpcfed.GRPCErrorAccessorOptions(celTypeHelper, "user.GetUserResponse")...)
celEnvOpts = append(celEnvOpts, grpcfed.EnumAccessorOptions("org.federation.Item.ItemType", Item_ItemType_value, Item_ItemType_name)...)
celEnvOpts = append(celEnvOpts, grpcfed.EnumAccessorOptions("user.Item.ItemType", user.Item_ItemType_value, user.Item_ItemType_name)...)
svc := &FederationService{
cfg: cfg,
logger: logger,
isLogLevelDebug: logger.Enabled(context.Background(), slog.LevelDebug),
errorHandler: errorHandler,
celEnvOpts: celEnvOpts,
celTypeHelper: celTypeHelper,
celCacheMap: grpcfed.NewCELCacheMap(),
tracer: tracer,
client: &FederationServiceDependentClientSet{
Post_PostServiceClient: Post_PostServiceClient,
User_UserServiceClient: User_UserServiceClient,
},
}
return svc, nil
}
// CleanupFederationService cleanup all resources to prevent goroutine leaks.
func CleanupFederationService(ctx context.Context, svc *FederationService) {
svc.cleanup(ctx)
}
func (s *FederationService) cleanup(ctx context.Context) {
for _, plugin := range s.celPlugins {
plugin.Close()
}
}
// GetPosts implements "org.federation.FederationService/GetPosts" method.
func (s *FederationService) GetPosts(ctx context.Context, req *GetPostsRequest) (res *GetPostsResponse, e error) {
ctx, span := s.tracer.Start(ctx, "org.federation.FederationService/GetPosts")
defer span.End()
ctx = grpcfed.WithLogger(ctx, s.logger)
ctx = grpcfed.WithCELCacheMap(ctx, s.celCacheMap)
defer func() {
if r := recover(); r != nil {
e = grpcfed.RecoverError(r, grpcfed.StackTrace())
grpcfed.OutputErrorLog(ctx, e)
}
}()
defer func() {
for _, celPlugin := range s.celPlugins {
celPlugin.Cleanup()
}
}()
res, err := s.resolve_Org_Federation_GetPostsResponse(ctx, &FederationService_Org_Federation_GetPostsResponseArgument{
Ids: req.GetIds(),
})
if err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
grpcfed.OutputErrorLog(ctx, err)
return nil, err
}
return res, nil
}
// resolve_Org_Federation_GetPostsResponse resolve "org.federation.GetPostsResponse" message.
func (s *FederationService) resolve_Org_Federation_GetPostsResponse(ctx context.Context, req *FederationService_Org_Federation_GetPostsResponseArgument) (*GetPostsResponse, error) {
ctx, span := s.tracer.Start(ctx, "org.federation.GetPostsResponse")
defer span.End()
ctx = grpcfed.WithLogger(ctx, grpcfed.Logger(ctx), grpcfed.LogAttrs(ctx)...)
grpcfed.Logger(ctx).DebugContext(ctx, "resolve org.federation.GetPostsResponse", slog.Any("message_args", s.logvalue_Org_Federation_GetPostsResponseArgument(req)))
type localValueType struct {
*grpcfed.LocalValue
vars struct {
Posts *Posts
}
}
value := &localValueType{LocalValue: grpcfed.NewLocalValue(ctx, s.celEnvOpts, "grpc.federation.private.org.federation.GetPostsResponseArgument", req)}
ctx = grpcfed.WithLocalValue(ctx, value.LocalValue)
/*
def {
name: "posts"
message {
name: "Posts"
args { name: "post_ids", by: "$.ids" }
}
}
*/
def_posts := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[*Posts, *localValueType]{
Name: `posts`,
Type: grpcfed.CELObjectType("org.federation.Posts"),
Setter: func(value *localValueType, v *Posts) error {
value.vars.Posts = v
return nil
},
Message: func(ctx context.Context, value *localValueType) (any, error) {
args := &FederationService_Org_Federation_PostsArgument{}
// { name: "post_ids", by: "$.ids" }
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[[]string]{
Value: value,
Expr: `$.ids`,
CacheIndex: 1,
Setter: func(v []string) error {
args.PostIds = v
return nil
},
}); err != nil {
return nil, err
}
ret, err := s.resolve_Org_Federation_Posts(ctx, args)
if err != nil {
return nil, err
}
return ret, nil
},
})
}
if err := def_posts(ctx); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
// assign named parameters to message arguments to pass to the custom resolver.
req.FederationService_Org_Federation_GetPostsResponseVariable.Posts = value.vars.Posts
// create a message value to be returned.
ret := &GetPostsResponse{}
// field binding section.
// (grpc.federation.field).by = "posts"
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[*Posts]{
Value: value,
Expr: `posts`,
CacheIndex: 2,
Setter: func(v *Posts) error {
ret.Posts = v
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
grpcfed.Logger(ctx).DebugContext(ctx, "resolved org.federation.GetPostsResponse", slog.Any("org.federation.GetPostsResponse", s.logvalue_Org_Federation_GetPostsResponse(ret)))
return ret, nil
}
// resolve_Org_Federation_Posts resolve "org.federation.Posts" message.
func (s *FederationService) resolve_Org_Federation_Posts(ctx context.Context, req *FederationService_Org_Federation_PostsArgument) (*Posts, error) {
ctx, span := s.tracer.Start(ctx, "org.federation.Posts")
defer span.End()
ctx = grpcfed.WithLogger(ctx, grpcfed.Logger(ctx), grpcfed.LogAttrs(ctx)...)
grpcfed.Logger(ctx).DebugContext(ctx, "resolve org.federation.Posts", slog.Any("message_args", s.logvalue_Org_Federation_PostsArgument(req)))
type localValueType struct {
*grpcfed.LocalValue
vars struct {
Ids []string
ItemTypes []Item_ItemType
Items []*Posts_PostItem
Posts []*post.Post
Res *post.GetPostsResponse
SelectedItemTypes []Item_ItemType
SourceItemTypes []user.Item_ItemType
Users []*User
}
}
value := &localValueType{LocalValue: grpcfed.NewLocalValue(ctx, s.celEnvOpts, "grpc.federation.private.org.federation.PostsArgument", req)}
ctx = grpcfed.WithLocalValue(ctx, value.LocalValue)
/*
def {
name: "res"
call {
method: "post.PostService/GetPosts"
request { field: "ids", by: "$.post_ids" }
}
}
*/
def_res := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[*post.GetPostsResponse, *localValueType]{
Name: `res`,
Type: grpcfed.CELObjectType("post.GetPostsResponse"),
Setter: func(value *localValueType, v *post.GetPostsResponse) error {
value.vars.Res = v
return nil
},
Message: func(ctx context.Context, value *localValueType) (any, error) {
args := &post.GetPostsRequest{}
// { field: "ids", by: "$.post_ids" }
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[[]string]{
Value: value,
Expr: `$.post_ids`,
CacheIndex: 3,
Setter: func(v []string) error {
args.Ids = v
return nil
},
}); err != nil {
return nil, err
}
grpcfed.Logger(ctx).DebugContext(ctx, "call post.PostService/GetPosts", slog.Any("post.GetPostsRequest", s.logvalue_Post_GetPostsRequest(args)))
ret, err := s.client.Post_PostServiceClient.GetPosts(ctx, args)
if err != nil {
if err := s.errorHandler(ctx, FederationService_DependentMethod_Post_PostService_GetPosts, err); err != nil {
return nil, grpcfed.NewErrorWithLogAttrs(err, slog.LevelError, grpcfed.LogAttrs(ctx))
}
}
return ret, nil
},
})
}
/*
def {
name: "posts"
by: "res.posts"
}
*/
def_posts := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[[]*post.Post, *localValueType]{
Name: `posts`,
Type: grpcfed.CELListType(grpcfed.CELObjectType("post.Post")),
Setter: func(value *localValueType, v []*post.Post) error {
value.vars.Posts = v
return nil
},
By: `res.posts`,
ByCacheIndex: 4,
})
}
/*
def {
name: "ids"
map {
iterator {
name: "post"
src: "posts"
}
by: "post.id"
}
}
*/
def_ids := func(ctx context.Context) error {
return grpcfed.EvalDefMap(ctx, value, grpcfed.DefMap[[]string, *post.Post, *localValueType]{
Name: `ids`,
Type: grpcfed.CELListType(grpcfed.CELStringType),
Setter: func(value *localValueType, v []string) error {
value.vars.Ids = v
return nil
},
IteratorName: `post`,
IteratorType: grpcfed.CELObjectType("post.Post"),
IteratorSource: func(value *localValueType) []*post.Post { return value.vars.Posts },
Iterator: func(ctx context.Context, value *grpcfed.MapIteratorValue) (any, error) {
return grpcfed.EvalCEL(ctx, &grpcfed.EvalCELRequest{
Value: value,
Expr: `post.id`,
OutType: reflect.TypeOf(""),
CacheIndex: 5,
})
},
})
}
/*
def {
name: "users"
map {
iterator {
name: "iter"
src: "posts"
}
message {
name: "User"
args { name: "user_id", by: "iter.user_id" }
}
}
}
*/
def_users := func(ctx context.Context) error {
return grpcfed.EvalDefMap(ctx, value, grpcfed.DefMap[[]*User, *post.Post, *localValueType]{
Name: `users`,
Type: grpcfed.CELListType(grpcfed.CELObjectType("org.federation.User")),
Setter: func(value *localValueType, v []*User) error {
value.vars.Users = v
return nil
},
IteratorName: `iter`,
IteratorType: grpcfed.CELObjectType("post.Post"),
IteratorSource: func(value *localValueType) []*post.Post { return value.vars.Posts },
Iterator: func(ctx context.Context, value *grpcfed.MapIteratorValue) (any, error) {
args := &FederationService_Org_Federation_UserArgument{}
// { name: "user_id", by: "iter.user_id" }
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[string]{
Value: value,
Expr: `iter.user_id`,
CacheIndex: 6,
Setter: func(v string) error {
args.UserId = v
return nil
},
}); err != nil {
return nil, err
}
return s.resolve_Org_Federation_User(ctx, args)
},
})
}
/*
def {
name: "items"
map {
iterator {
name: "iter"
src: "posts"
}
message {
name: "PostItem"
args { name: "id", by: "iter.id" }
}
}
}
*/
def_items := func(ctx context.Context) error {
return grpcfed.EvalDefMap(ctx, value, grpcfed.DefMap[[]*Posts_PostItem, *post.Post, *localValueType]{
Name: `items`,
Type: grpcfed.CELListType(grpcfed.CELObjectType("org.federation.Posts.PostItem")),
Setter: func(value *localValueType, v []*Posts_PostItem) error {
value.vars.Items = v
return nil
},
IteratorName: `iter`,
IteratorType: grpcfed.CELObjectType("post.Post"),
IteratorSource: func(value *localValueType) []*post.Post { return value.vars.Posts },
Iterator: func(ctx context.Context, value *grpcfed.MapIteratorValue) (any, error) {
args := &FederationService_Org_Federation_Posts_PostItemArgument{}
// { name: "id", by: "iter.id" }
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[string]{
Value: value,
Expr: `iter.id`,
CacheIndex: 7,
Setter: func(v string) error {
args.Id = v
return nil
},
}); err != nil {
return nil, err
}
return s.resolve_Org_Federation_Posts_PostItem(ctx, args)
},
})
}
/*
def {
name: "source_item_types"
by: "[user.Item.ItemType.value('ITEM_TYPE_1'), user.Item.ItemType.value('ITEM_TYPE_2')]"
}
*/
def_source_item_types := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[[]user.Item_ItemType, *localValueType]{
Name: `source_item_types`,
Type: grpcfed.CELListType(grpcfed.CELIntType),
Setter: func(value *localValueType, v []user.Item_ItemType) error {
value.vars.SourceItemTypes = v
return nil
},
By: `[user.Item.ItemType.value('ITEM_TYPE_1'), user.Item.ItemType.value('ITEM_TYPE_2')]`,
ByCacheIndex: 8,
})
}
/*
def {
name: "item_types"
map {
iterator {
name: "typ"
src: "source_item_types"
}
}
}
*/
def_item_types := func(ctx context.Context) error {
return grpcfed.EvalDefMap(ctx, value, grpcfed.DefMap[[]Item_ItemType, user.Item_ItemType, *localValueType]{
Name: `item_types`,
Type: grpcfed.CELListType(grpcfed.CELIntType),
Setter: func(value *localValueType, v []Item_ItemType) error {
value.vars.ItemTypes = v
return nil
},
IteratorName: `typ`,
IteratorType: grpcfed.CELIntType,
IteratorSource: func(value *localValueType) []user.Item_ItemType { return value.vars.SourceItemTypes },
Iterator: func(ctx context.Context, value *grpcfed.MapIteratorValue) (any, error) {
src, err := grpcfed.EvalCEL(ctx, &grpcfed.EvalCELRequest{
Value: value,
Expr: `typ`,
OutType: reflect.TypeOf(user.Item_ItemType(0)),
CacheIndex: 9,
})
if err != nil {
return 0, err
}
v := src.(user.Item_ItemType)
return s.cast_User_Item_ItemType__to__Org_Federation_Item_ItemType(v)
},
})
}
/*
def {
name: "selected_item_types"
map {
iterator {
name: "typ"
src: "source_item_types"
}
}
}
*/
def_selected_item_types := func(ctx context.Context) error {
return grpcfed.EvalDefMap(ctx, value, grpcfed.DefMap[[]Item_ItemType, user.Item_ItemType, *localValueType]{
Name: `selected_item_types`,
Type: grpcfed.CELListType(grpcfed.CELIntType),
Setter: func(value *localValueType, v []Item_ItemType) error {
value.vars.SelectedItemTypes = v
return nil
},
IteratorName: `typ`,
IteratorType: grpcfed.CELIntType,
IteratorSource: func(value *localValueType) []user.Item_ItemType { return value.vars.SourceItemTypes },
Iterator: func(ctx context.Context, value *grpcfed.MapIteratorValue) (any, error) {
src, err := grpcfed.EvalCEL(ctx, &grpcfed.EvalCELRequest{
Value: value,
Expr: `grpc.federation.enum.select(true, typ, user.Item.ItemType.value('ITEM_TYPE_UNSPECIFIED'))`,
OutType: reflect.TypeOf((*grpcfedcel.EnumSelector)(nil)),
CacheIndex: 10,
})
if err != nil {
return 0, err
}
v := src.(*grpcfedcel.EnumSelector)
var dst Item_ItemType
if err := func() error {
if v.GetCond() {
casted, err := s.cast_User_Item_ItemType__to__Org_Federation_Item_ItemType(user.Item_ItemType(v.GetTrueValue()))
if err != nil {
return err
}
dst = casted
} else {
casted, err := s.cast_User_Item_ItemType__to__Org_Federation_Item_ItemType(user.Item_ItemType(v.GetFalseValue()))
if err != nil {
return err
}
dst = casted
}
return nil
}(); err != nil {
return 0, err
}
return dst, nil
},
})
}
// A tree view of message dependencies is shown below.
/*
res ─┐
posts ─┐
ids ─┐
source_item_types ─┐ │
item_types ─┤
res ─┐ │
posts ─┐ │
items ─┤
source_item_types ─┐ │
selected_item_types ─┤
res ─┐ │
posts ─┐ │
users ─┤
*/
eg, ctx1 := grpcfed.ErrorGroupWithContext(ctx)
grpcfed.GoWithRecover(eg, func() (any, error) {
if err := def_res(ctx1); err != nil {
grpcfed.RecordErrorToSpan(ctx1, err)
return nil, err
}
if err := def_posts(ctx1); err != nil {
grpcfed.RecordErrorToSpan(ctx1, err)
return nil, err
}
if err := def_ids(ctx1); err != nil {
grpcfed.RecordErrorToSpan(ctx1, err)
return nil, err
}
return nil, nil
})
grpcfed.GoWithRecover(eg, func() (any, error) {
if err := def_source_item_types(ctx1); err != nil {
grpcfed.RecordErrorToSpan(ctx1, err)
return nil, err
}
if err := def_item_types(ctx1); err != nil {
grpcfed.RecordErrorToSpan(ctx1, err)
return nil, err
}
return nil, nil
})
grpcfed.GoWithRecover(eg, func() (any, error) {
if err := def_res(ctx1); err != nil {
grpcfed.RecordErrorToSpan(ctx1, err)
return nil, err
}
if err := def_posts(ctx1); err != nil {
grpcfed.RecordErrorToSpan(ctx1, err)
return nil, err
}
if err := def_items(ctx1); err != nil {
grpcfed.RecordErrorToSpan(ctx1, err)
return nil, err
}
return nil, nil
})
grpcfed.GoWithRecover(eg, func() (any, error) {
if err := def_source_item_types(ctx1); err != nil {
grpcfed.RecordErrorToSpan(ctx1, err)
return nil, err
}
if err := def_selected_item_types(ctx1); err != nil {
grpcfed.RecordErrorToSpan(ctx1, err)
return nil, err
}
return nil, nil
})
grpcfed.GoWithRecover(eg, func() (any, error) {
if err := def_res(ctx1); err != nil {
grpcfed.RecordErrorToSpan(ctx1, err)
return nil, err
}
if err := def_posts(ctx1); err != nil {
grpcfed.RecordErrorToSpan(ctx1, err)
return nil, err
}
if err := def_users(ctx1); err != nil {
grpcfed.RecordErrorToSpan(ctx1, err)
return nil, err
}
return nil, nil
})
if err := eg.Wait(); err != nil {
return nil, err
}
// assign named parameters to message arguments to pass to the custom resolver.
req.FederationService_Org_Federation_PostsVariable.Ids = value.vars.Ids
req.FederationService_Org_Federation_PostsVariable.ItemTypes = value.vars.ItemTypes
req.FederationService_Org_Federation_PostsVariable.Items = value.vars.Items
req.FederationService_Org_Federation_PostsVariable.Posts = value.vars.Posts
req.FederationService_Org_Federation_PostsVariable.Res = value.vars.Res
req.FederationService_Org_Federation_PostsVariable.SelectedItemTypes = value.vars.SelectedItemTypes
req.FederationService_Org_Federation_PostsVariable.SourceItemTypes = value.vars.SourceItemTypes
req.FederationService_Org_Federation_PostsVariable.Users = value.vars.Users
// create a message value to be returned.
ret := &Posts{}
// field binding section.
// (grpc.federation.field).by = "ids"
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[[]string]{
Value: value,
Expr: `ids`,
CacheIndex: 11,
Setter: func(v []string) error {
ret.Ids = v
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
// (grpc.federation.field).by = "posts.map(post, post.title)"
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[[]string]{
Value: value,
Expr: `posts.map(post, post.title)`,
CacheIndex: 12,
Setter: func(v []string) error {
ret.Titles = v
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
// (grpc.federation.field).by = "posts.map(post, post.content)"
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[[]string]{
Value: value,
Expr: `posts.map(post, post.content)`,
CacheIndex: 13,
Setter: func(v []string) error {
ret.Contents = v
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
// (grpc.federation.field).by = "users"
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[[]*User]{
Value: value,
Expr: `users`,
CacheIndex: 14,
Setter: func(v []*User) error {
ret.Users = v
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
// (grpc.federation.field).by = "items"
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[[]*Posts_PostItem]{
Value: value,
Expr: `items`,
CacheIndex: 15,
Setter: func(v []*Posts_PostItem) error {
ret.Items = v
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
// (grpc.federation.field).by = "item_types"
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[[]Item_ItemType]{
Value: value,
Expr: `item_types`,
CacheIndex: 16,
Setter: func(v []Item_ItemType) error {
ret.ItemTypes = v
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
// (grpc.federation.field).by = "selected_item_types"
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[[]Item_ItemType]{
Value: value,
Expr: `selected_item_types`,
CacheIndex: 17,
Setter: func(v []Item_ItemType) error {
ret.SelectedItemTypes = v
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
grpcfed.Logger(ctx).DebugContext(ctx, "resolved org.federation.Posts", slog.Any("org.federation.Posts", s.logvalue_Org_Federation_Posts(ret)))
return ret, nil
}
// resolve_Org_Federation_Posts_PostItem resolve "org.federation.Posts.PostItem" message.
func (s *FederationService) resolve_Org_Federation_Posts_PostItem(ctx context.Context, req *FederationService_Org_Federation_Posts_PostItemArgument) (*Posts_PostItem, error) {
ctx, span := s.tracer.Start(ctx, "org.federation.Posts.PostItem")
defer span.End()
ctx = grpcfed.WithLogger(ctx, grpcfed.Logger(ctx), grpcfed.LogAttrs(ctx)...)
grpcfed.Logger(ctx).DebugContext(ctx, "resolve org.federation.Posts.PostItem", slog.Any("message_args", s.logvalue_Org_Federation_Posts_PostItemArgument(req)))
type localValueType struct {
*grpcfed.LocalValue
vars struct {
}
}
value := &localValueType{LocalValue: grpcfed.NewLocalValue(ctx, s.celEnvOpts, "grpc.federation.private.org.federation.Posts_PostItemArgument", req)}
ctx = grpcfed.WithLocalValue(ctx, value.LocalValue)
// create a message value to be returned.
ret := &Posts_PostItem{}
// field binding section.
// (grpc.federation.field).by = "'item_' + $.id"
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[string]{
Value: value,
Expr: `'item_' + $.id`,
CacheIndex: 18,
Setter: func(v string) error {
ret.Name = v
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
grpcfed.Logger(ctx).DebugContext(ctx, "resolved org.federation.Posts.PostItem", slog.Any("org.federation.Posts.PostItem", s.logvalue_Org_Federation_Posts_PostItem(ret)))
return ret, nil
}
// resolve_Org_Federation_User resolve "org.federation.User" message.
func (s *FederationService) resolve_Org_Federation_User(ctx context.Context, req *FederationService_Org_Federation_UserArgument) (*User, error) {
ctx, span := s.tracer.Start(ctx, "org.federation.User")
defer span.End()
ctx = grpcfed.WithLogger(ctx, grpcfed.Logger(ctx), grpcfed.LogAttrs(ctx)...)
grpcfed.Logger(ctx).DebugContext(ctx, "resolve org.federation.User", slog.Any("message_args", s.logvalue_Org_Federation_UserArgument(req)))
type localValueType struct {
*grpcfed.LocalValue
vars struct {
Res *user.GetUserResponse
User *user.User
}
}
value := &localValueType{LocalValue: grpcfed.NewLocalValue(ctx, s.celEnvOpts, "grpc.federation.private.org.federation.UserArgument", req)}
ctx = grpcfed.WithLocalValue(ctx, value.LocalValue)
/*
def {
name: "res"
call {
method: "user.UserService/GetUser"
request { field: "id", by: "$.user_id" }
}
}
*/
def_res := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[*user.GetUserResponse, *localValueType]{
Name: `res`,
Type: grpcfed.CELObjectType("user.GetUserResponse"),
Setter: func(value *localValueType, v *user.GetUserResponse) error {
value.vars.Res = v
return nil
},
Message: func(ctx context.Context, value *localValueType) (any, error) {
args := &user.GetUserRequest{}
// { field: "id", by: "$.user_id" }
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[string]{
Value: value,
Expr: `$.user_id`,
CacheIndex: 19,
Setter: func(v string) error {
args.Id = v
return nil
},
}); err != nil {
return nil, err
}
grpcfed.Logger(ctx).DebugContext(ctx, "call user.UserService/GetUser", slog.Any("user.GetUserRequest", s.logvalue_User_GetUserRequest(args)))
ret, err := s.client.User_UserServiceClient.GetUser(ctx, args)
if err != nil {
if err := s.errorHandler(ctx, FederationService_DependentMethod_User_UserService_GetUser, err); err != nil {
return nil, grpcfed.NewErrorWithLogAttrs(err, slog.LevelError, grpcfed.LogAttrs(ctx))
}
}
return ret, nil
},
})
}
/*
def {
name: "user"
autobind: true
by: "res.user"
}
*/
def_user := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[*user.User, *localValueType]{
Name: `user`,
Type: grpcfed.CELObjectType("user.User"),
Setter: func(value *localValueType, v *user.User) error {
value.vars.User = v
return nil
},
By: `res.user`,
ByCacheIndex: 20,
})
}
if err := def_res(ctx); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
if err := def_user(ctx); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
// assign named parameters to message arguments to pass to the custom resolver.
req.FederationService_Org_Federation_UserVariable.Res = value.vars.Res
req.FederationService_Org_Federation_UserVariable.User = value.vars.User
// create a message value to be returned.
ret := &User{}
// field binding section.
ret.Id = value.vars.User.GetId() // { name: "user", autobind: true }
ret.Name = value.vars.User.GetName() // { name: "user", autobind: true }
grpcfed.Logger(ctx).DebugContext(ctx, "resolved org.federation.User", slog.Any("org.federation.User", s.logvalue_Org_Federation_User(ret)))
return ret, nil
}
// cast_User_Item_ItemType__to__Org_Federation_Item_ItemType cast from "user.Item.ItemType" to "org.federation.Item.ItemType".
func (s *FederationService) cast_User_Item_ItemType__to__Org_Federation_Item_ItemType(from user.Item_ItemType) (Item_ItemType, error) {
var ret Item_ItemType
switch from {
case user.Item_ITEM_TYPE_UNSPECIFIED:
ret = Item_ITEM_TYPE_UNSPECIFIED
case user.Item_ITEM_TYPE_1:
ret = Item_ITEM_TYPE_1
case user.Item_ITEM_TYPE_2:
ret = Item_ITEM_TYPE_2
case user.Item_ITEM_TYPE_3:
ret = Item_ITEM_TYPE_3
default:
ret = 0
}
return ret, nil
}
// cast_repeated_User_Item_ItemType__to__repeated_Org_Federation_Item_ItemType cast from "repeated user.Item.ItemType" to "repeated org.federation.Item.ItemType".
func (s *FederationService) cast_repeated_User_Item_ItemType__to__repeated_Org_Federation_Item_ItemType(from []user.Item_ItemType) ([]Item_ItemType, error) {
ret := make([]Item_ItemType, 0, len(from))
for _, v := range from {
casted, err := s.cast_User_Item_ItemType__to__Org_Federation_Item_ItemType(v)
if err != nil {
return nil, err
}
ret = append(ret, casted)
}
return ret, nil
}
func (s *FederationService) logvalue_Org_Federation_GetPostsResponse(v *GetPostsResponse) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.Any("posts", s.logvalue_Org_Federation_Posts(v.GetPosts())),
)
}
func (s *FederationService) logvalue_Org_Federation_GetPostsResponseArgument(v *FederationService_Org_Federation_GetPostsResponseArgument) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.Any("ids", v.Ids),
)
}
func (s *FederationService) logvalue_Org_Federation_Item_ItemType(v Item_ItemType) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
switch v {
case Item_ITEM_TYPE_UNSPECIFIED:
return slog.StringValue("ITEM_TYPE_UNSPECIFIED")
case Item_ITEM_TYPE_1:
return slog.StringValue("ITEM_TYPE_1")
case Item_ITEM_TYPE_2:
return slog.StringValue("ITEM_TYPE_2")
case Item_ITEM_TYPE_3:
return slog.StringValue("ITEM_TYPE_3")
}
return slog.StringValue("")
}
func (s *FederationService) logvalue_Org_Federation_Posts(v *Posts) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.Any("ids", v.GetIds()),
slog.Any("titles", v.GetTitles()),
slog.Any("contents", v.GetContents()),
slog.Any("users", s.logvalue_repeated_Org_Federation_User(v.GetUsers())),
slog.Any("items", s.logvalue_repeated_Org_Federation_Posts_PostItem(v.GetItems())),
slog.Any("item_types", s.logvalue_repeated_Org_Federation_Item_ItemType(v.GetItemTypes())),
slog.Any("selected_item_types", s.logvalue_repeated_Org_Federation_Item_ItemType(v.GetSelectedItemTypes())),
)
}
func (s *FederationService) logvalue_Org_Federation_PostsArgument(v *FederationService_Org_Federation_PostsArgument) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.Any("post_ids", v.PostIds),
)
}
func (s *FederationService) logvalue_Org_Federation_Posts_PostItem(v *Posts_PostItem) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.String("name", v.GetName()),
)
}
func (s *FederationService) logvalue_Org_Federation_Posts_PostItemArgument(v *FederationService_Org_Federation_Posts_PostItemArgument) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.String("id", v.Id),
)
}
func (s *FederationService) logvalue_Org_Federation_User(v *User) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.String("id", v.GetId()),
slog.String("name", v.GetName()),
)
}
func (s *FederationService) logvalue_Org_Federation_UserArgument(v *FederationService_Org_Federation_UserArgument) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.String("user_id", v.UserId),
)
}
func (s *FederationService) logvalue_Post_GetPostRequest(v *post.GetPostRequest) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.String("id", v.GetId()),
)
}
func (s *FederationService) logvalue_Post_GetPostsRequest(v *post.GetPostsRequest) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.Any("ids", v.GetIds()),
)
}
func (s *FederationService) logvalue_User_GetUserRequest(v *user.GetUserRequest) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.String("id", v.GetId()),
)
}
func (s *FederationService) logvalue_User_GetUsersRequest(v *user.GetUsersRequest) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.Any("ids", v.GetIds()),
)
}
func (s *FederationService) logvalue_repeated_Org_Federation_Item_ItemType(v []Item_ItemType) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
attrs := make([]slog.Attr, 0, len(v))
for idx, vv := range v {
attrs = append(attrs, slog.Attr{
Key: grpcfed.ToLogAttrKey(idx),
Value: s.logvalue_Org_Federation_Item_ItemType(vv),
})
}
return slog.GroupValue(attrs...)
}
func (s *FederationService) logvalue_repeated_Org_Federation_Posts_PostItem(v []*Posts_PostItem) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
attrs := make([]slog.Attr, 0, len(v))
for idx, vv := range v {
attrs = append(attrs, slog.Attr{
Key: grpcfed.ToLogAttrKey(idx),
Value: s.logvalue_Org_Federation_Posts_PostItem(vv),
})
}
return slog.GroupValue(attrs...)
}
func (s *FederationService) logvalue_repeated_Org_Federation_User(v []*User) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
attrs := make([]slog.Attr, 0, len(v))
for idx, vv := range v {
attrs = append(attrs, slog.Attr{
Key: grpcfed.ToLogAttrKey(idx),
Value: s.logvalue_Org_Federation_User(vv),
})
}
return slog.GroupValue(attrs...)
}
================================================
FILE: _examples/13_map/go.mod
================================================
module example
go 1.24.0
replace github.com/mercari/grpc-federation => ../../
require (
github.com/google/go-cmp v0.7.0
github.com/mercari/grpc-federation v0.0.0-00010101000000-000000000000
go.opentelemetry.io/otel v1.24.0
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.21.0
go.opentelemetry.io/otel/sdk v1.24.0
go.opentelemetry.io/otel/trace v1.24.0
go.uber.org/goleak v1.3.0
google.golang.org/genproto/googleapis/rpc v0.0.0-20240826202546-f6391c0de4c7
google.golang.org/grpc v1.65.0
google.golang.org/protobuf v1.34.2
)
require (
cel.dev/expr v0.19.1 // indirect
github.com/antlr4-go/antlr/v4 v4.13.0 // indirect
github.com/cenkalti/backoff/v4 v4.2.1 // indirect
github.com/go-logr/logr v1.4.1 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
github.com/goccy/wasi-go v0.3.2 // indirect
github.com/google/cel-go v0.23.1 // indirect
github.com/google/uuid v1.6.0 // indirect
github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0 // indirect
github.com/kelseyhightower/envconfig v1.4.0 // indirect
github.com/stealthrocket/wazergo v0.19.1 // indirect
github.com/stoewer/go-strcase v1.3.0 // indirect
github.com/tetratelabs/wazero v1.10.1 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.21.0 // indirect
go.opentelemetry.io/otel/metric v1.24.0 // indirect
go.opentelemetry.io/proto/otlp v1.0.0 // indirect
golang.org/x/exp v0.0.0-20250506013437-ce4c2cf36ca6 // indirect
golang.org/x/net v0.38.0 // indirect
golang.org/x/sync v0.14.0 // indirect
golang.org/x/sys v0.37.0 // indirect
golang.org/x/text v0.23.0 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20240826202546-f6391c0de4c7 // indirect
)
================================================
FILE: _examples/13_map/go.sum
================================================
cel.dev/expr v0.19.1 h1:NciYrtDRIR0lNCnH1LFJegdjspNx9fI59O7TWcua/W4=
cel.dev/expr v0.19.1/go.mod h1:MrpN08Q+lEBs+bGYdLxxHkZoUSsCp0nSKTs0nTymJgw=
github.com/antlr4-go/antlr/v4 v4.13.0 h1:lxCg3LAv+EUK6t1i0y1V6/SLeUi0eKEKdhQAlS8TVTI=
github.com/antlr4-go/antlr/v4 v4.13.0/go.mod h1:pfChB/xh/Unjila75QW7+VU4TSnWnnk9UTnmpPaOR2g=
github.com/cenkalti/backoff/v4 v4.2.1 h1:y4OZtCnogmCPw98Zjyt5a6+QwPLGkiQsYW5oUqylYbM=
github.com/cenkalti/backoff/v4 v4.2.1/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A=
github.com/go-logr/logr v1.4.1 h1:pKouT5E8xu9zeFC39JXRDukb6JFQPXM5p5I91188VAQ=
github.com/go-logr/logr v1.4.1/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY=
github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag=
github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE=
github.com/goccy/wasi-go v0.3.2 h1:wAvGXmqCkfcp0B0AwIp5Ya53hzDwkKm9W8iuT3nCCz0=
github.com/goccy/wasi-go v0.3.2/go.mod h1:nIKD204n9xa4Z20UV+XA483kIr9TAl2vXr+X5qVAO5M=
github.com/golang/glog v1.2.1 h1:OptwRhECazUx5ix5TTWC3EZhsZEHWcYWY4FQHTIubm4=
github.com/golang/glog v1.2.1/go.mod h1:6AhwSGph0fcJtXVM/PEHPqZlFeoLxhs7/t5UDAwmO+w=
github.com/google/cel-go v0.23.1 h1:91ThhEZlBcE5rB2adBVXqvDoqdL8BG2oyhd0bK1I/r4=
github.com/google/cel-go v0.23.1/go.mod h1:52Pb6QsDbC5kvgxvZhiL9QX1oZEkcUF/ZqaPx1J5Wwo=
github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8=
github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU=
github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0 h1:YBftPWNWd4WwGqtY2yeZL2ef8rHAxPBD8KFhJpmcqms=
github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0/go.mod h1:YN5jB8ie0yfIUg6VvR9Kz84aCaG7AsGZnLjhHbUqwPg=
github.com/kelseyhightower/envconfig v1.4.0 h1:Im6hONhd3pLkfDFsbRgu68RDNkGF1r3dvMUtDTo2cv8=
github.com/kelseyhightower/envconfig v1.4.0/go.mod h1:cccZRl6mQpaq41TPp5QxidR+Sa3axMbJDNb//FQX6Gg=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/stealthrocket/wazergo v0.19.1 h1:BPrITETPgSFwiytwmToO0MbUC/+RGC39JScz1JmmG6c=
github.com/stealthrocket/wazergo v0.19.1/go.mod h1:riI0hxw4ndZA5e6z7PesHg2BtTftcZaMxRcoiGGipTs=
github.com/stoewer/go-strcase v1.3.0 h1:g0eASXYtp+yvN9fK8sH94oCIk0fau9uV1/ZdJ0AVEzs=
github.com/stoewer/go-strcase v1.3.0/go.mod h1:fAH5hQ5pehh+j3nZfvwdk2RgEgQjAoM8wodgtPmh1xo=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=
github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo=
github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk=
github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
github.com/tetratelabs/wazero v1.10.1 h1:2DugeJf6VVk58KTPszlNfeeN8AhhpwcZqkJj2wwFuH8=
github.com/tetratelabs/wazero v1.10.1/go.mod h1:DRm5twOQ5Gr1AoEdSi0CLjDQF1J9ZAuyqFIjl1KKfQU=
go.opentelemetry.io/otel v1.24.0 h1:0LAOdjNmQeSTzGBzduGe/rU4tZhMwL5rWgtp9Ku5Jfo=
go.opentelemetry.io/otel v1.24.0/go.mod h1:W7b9Ozg4nkF5tWI5zsXkaKKDjdVjpD4oAt9Qi/MArHo=
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.21.0 h1:cl5P5/GIfFh4t6xyruOgJP5QiA1pw4fYYdv6nc6CBWw=
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.21.0/go.mod h1:zgBdWWAu7oEEMC06MMKc5NLbA/1YDXV1sMpSqEeLQLg=
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.21.0 h1:tIqheXEFWAZ7O8A7m+J0aPTmpJN3YQ7qetUAdkkkKpk=
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.21.0/go.mod h1:nUeKExfxAQVbiVFn32YXpXZZHZ61Cc3s3Rn1pDBGAb0=
go.opentelemetry.io/otel/metric v1.24.0 h1:6EhoGWWK28x1fbpA4tYTOWBkPefTDQnb8WSGXlc88kI=
go.opentelemetry.io/otel/metric v1.24.0/go.mod h1:VYhLe1rFfxuTXLgj4CBiyz+9WYBA8pNGJgDcSFRKBco=
go.opentelemetry.io/otel/sdk v1.24.0 h1:YMPPDNymmQN3ZgczicBY3B6sf9n62Dlj9pWD3ucgoDw=
go.opentelemetry.io/otel/sdk v1.24.0/go.mod h1:KVrIYw6tEubO9E96HQpcmpTKDVn9gdv35HoYiQWGDFg=
go.opentelemetry.io/otel/trace v1.24.0 h1:CsKnnL4dUAr/0llH9FKuc698G04IrpWV0MQA/Y1YELI=
go.opentelemetry.io/otel/trace v1.24.0/go.mod h1:HPc3Xr/cOApsBI154IU0OI0HJexz+aw5uPdbs3UCjNU=
go.opentelemetry.io/proto/otlp v1.0.0 h1:T0TX0tmXU8a3CbNXzEKGeU5mIVOdf0oykP+u2lIVU/I=
go.opentelemetry.io/proto/otlp v1.0.0/go.mod h1:Sy6pihPLfYHkr3NkUbEhGHFhINUSI/v80hjKIs5JXpM=
go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto=
go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE=
golang.org/x/exp v0.0.0-20250506013437-ce4c2cf36ca6 h1:y5zboxd6LQAqYIhHnB48p0ByQ/GnQx2BE33L8BOHQkI=
golang.org/x/exp v0.0.0-20250506013437-ce4c2cf36ca6/go.mod h1:U6Lno4MTRCDY+Ba7aCcauB9T60gsv5s4ralQzP72ZoQ=
golang.org/x/net v0.38.0 h1:vRMAPTMaeGqVhG5QyLJHqNDwecKTomGeqbnfZyKlBI8=
golang.org/x/net v0.38.0/go.mod h1:ivrbrMbzFq5J41QOQh0siUuly180yBYtLp+CKbEaFx8=
golang.org/x/sync v0.14.0 h1:woo0S4Yywslg6hp4eUFjTVOyKt0RookbpAHG4c1HmhQ=
golang.org/x/sync v0.14.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA=
golang.org/x/sys v0.37.0 h1:fdNQudmxPjkdUTPnLn5mdQv7Zwvbvpaxqs831goi9kQ=
golang.org/x/sys v0.37.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks=
golang.org/x/text v0.23.0 h1:D71I7dUrlY+VX0gQShAThNGHFxZ13dGLBHQLVl1mJlY=
golang.org/x/text v0.23.0/go.mod h1:/BLNzu4aZCJ1+kcD0DNRotWKage4q2rGVAg4o22unh4=
google.golang.org/genproto/googleapis/api v0.0.0-20240826202546-f6391c0de4c7 h1:YcyjlL1PRr2Q17/I0dPk2JmYS5CDXfcdb2Z3YRioEbw=
google.golang.org/genproto/googleapis/api v0.0.0-20240826202546-f6391c0de4c7/go.mod h1:OCdP9MfskevB/rbYvHTsXTtKC+3bHWajPdoKgjcYkfo=
google.golang.org/genproto/googleapis/rpc v0.0.0-20240826202546-f6391c0de4c7 h1:2035KHhUv+EpyB+hWgJnaWKJOdX1E95w2S8Rr4uWKTs=
google.golang.org/genproto/googleapis/rpc v0.0.0-20240826202546-f6391c0de4c7/go.mod h1:UqMtugtsSgubUsoxbuAoiCXvqvErP7Gf0so0mK9tHxU=
google.golang.org/grpc v1.65.0 h1:bs/cUb4lp1G5iImFFd3u5ixQzweKizoZJAwBNLR42lc=
google.golang.org/grpc v1.65.0/go.mod h1:WgYC2ypjlB0EiQi6wdKixMqukr6lBc0Vo+oOgjrM5ZQ=
google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg=
google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
================================================
FILE: _examples/13_map/main_test.go
================================================
package main_test
import (
"context"
"fmt"
"log/slog"
"net"
"os"
"testing"
"github.com/google/go-cmp/cmp"
"github.com/google/go-cmp/cmp/cmpopts"
"go.opentelemetry.io/otel"
"go.opentelemetry.io/otel/attribute"
"go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc"
"go.opentelemetry.io/otel/propagation"
"go.opentelemetry.io/otel/sdk/resource"
sdktrace "go.opentelemetry.io/otel/sdk/trace"
semconv "go.opentelemetry.io/otel/semconv/v1.4.0"
"go.uber.org/goleak"
"google.golang.org/grpc"
"google.golang.org/grpc/credentials/insecure"
"google.golang.org/grpc/test/bufconn"
"example/federation"
"example/post"
"example/user"
)
const bufSize = 1024
var (
listener *bufconn.Listener
postClient post.PostServiceClient
userClient user.UserServiceClient
)
type clientConfig struct{}
func (c *clientConfig) Post_PostServiceClient(cfg federation.FederationServiceClientConfig) (post.PostServiceClient, error) {
return postClient, nil
}
func (c *clientConfig) User_UserServiceClient(cfg federation.FederationServiceClientConfig) (user.UserServiceClient, error) {
return userClient, nil
}
type PostServer struct {
*post.UnimplementedPostServiceServer
}
func (s *PostServer) GetPosts(ctx context.Context, req *post.GetPostsRequest) (*post.GetPostsResponse, error) {
var ret post.GetPostsResponse
for _, id := range req.GetIds() {
ret.Posts = append(ret.Posts, &post.Post{
Id: id,
Title: "title for " + id,
Content: "content for " + id,
UserId: id,
})
}
return &ret, nil
}
type UserServer struct {
*user.UnimplementedUserServiceServer
}
func (s *UserServer) GetUser(ctx context.Context, req *user.GetUserRequest) (*user.GetUserResponse, error) {
return &user.GetUserResponse{
User: &user.User{
Id: req.Id,
Name: fmt.Sprintf("name_%s", req.Id),
},
}, nil
}
func dialer(ctx context.Context, address string) (net.Conn, error) {
return listener.Dial()
}
func TestFederation(t *testing.T) {
defer goleak.VerifyNone(t)
ctx := context.Background()
listener = bufconn.Listen(bufSize)
if os.Getenv("ENABLE_JAEGER") != "" {
exporter, err := otlptracegrpc.New(ctx, otlptracegrpc.WithInsecure())
if err != nil {
t.Fatal(err)
}
tp := sdktrace.NewTracerProvider(
sdktrace.WithBatcher(exporter),
sdktrace.WithResource(
resource.NewWithAttributes(
semconv.SchemaURL,
semconv.ServiceNameKey.String("example13/map"),
semconv.ServiceVersionKey.String("1.0.0"),
attribute.String("environment", "dev"),
),
),
sdktrace.WithSampler(sdktrace.AlwaysSample()),
)
defer tp.Shutdown(ctx)
otel.SetTextMapPropagator(propagation.TraceContext{})
otel.SetTracerProvider(tp)
}
conn, err := grpc.DialContext(
ctx, "",
grpc.WithContextDialer(dialer),
grpc.WithTransportCredentials(insecure.NewCredentials()),
)
if err != nil {
t.Fatal(err)
}
defer conn.Close()
postClient = post.NewPostServiceClient(conn)
userClient = user.NewUserServiceClient(conn)
grpcServer := grpc.NewServer()
defer grpcServer.Stop()
logger := slog.New(slog.NewJSONHandler(os.Stdout, &slog.HandlerOptions{
Level: slog.LevelDebug,
}))
federationServer, err := federation.NewFederationService(federation.FederationServiceConfig{
Client: new(clientConfig),
Logger: logger,
})
if err != nil {
t.Fatal(err)
}
defer federation.CleanupFederationService(ctx, federationServer)
post.RegisterPostServiceServer(grpcServer, &PostServer{})
user.RegisterUserServiceServer(grpcServer, &UserServer{})
federation.RegisterFederationServiceServer(grpcServer, federationServer)
go func() {
if err := grpcServer.Serve(listener); err != nil {
t.Fatal(err)
}
}()
client := federation.NewFederationServiceClient(conn)
res, err := client.GetPosts(ctx, &federation.GetPostsRequest{
Ids: []string{"x", "y"},
})
if err != nil {
t.Fatal(err)
}
if diff := cmp.Diff(res, &federation.GetPostsResponse{
Posts: &federation.Posts{
Ids: []string{"x", "y"},
Titles: []string{"title for x", "title for y"},
Contents: []string{"content for x", "content for y"},
Users: []*federation.User{
{
Id: "x",
Name: "name_x",
},
{
Id: "y",
Name: "name_y",
},
},
Items: []*federation.Posts_PostItem{
{Name: "item_x"},
{Name: "item_y"},
},
ItemTypes: []federation.Item_ItemType{
federation.Item_ITEM_TYPE_1,
federation.Item_ITEM_TYPE_2,
},
SelectedItemTypes: []federation.Item_ItemType{
federation.Item_ITEM_TYPE_1,
federation.Item_ITEM_TYPE_2,
},
},
}, cmpopts.IgnoreUnexported(
federation.GetPostsResponse{},
federation.Posts{},
federation.User{},
federation.Posts_PostItem{},
)); diff != "" {
t.Errorf("(-got, +want)\n%s", diff)
}
}
================================================
FILE: _examples/13_map/post/post.pb.go
================================================
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.33.0
// protoc (unknown)
// source: post/post.proto
package post
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
type GetPostRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
}
func (x *GetPostRequest) Reset() {
*x = GetPostRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_post_post_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GetPostRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetPostRequest) ProtoMessage() {}
func (x *GetPostRequest) ProtoReflect() protoreflect.Message {
mi := &file_post_post_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GetPostRequest.ProtoReflect.Descriptor instead.
func (*GetPostRequest) Descriptor() ([]byte, []int) {
return file_post_post_proto_rawDescGZIP(), []int{0}
}
func (x *GetPostRequest) GetId() string {
if x != nil {
return x.Id
}
return ""
}
type GetPostResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Post *Post `protobuf:"bytes,1,opt,name=post,proto3" json:"post,omitempty"`
}
func (x *GetPostResponse) Reset() {
*x = GetPostResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_post_post_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GetPostResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetPostResponse) ProtoMessage() {}
func (x *GetPostResponse) ProtoReflect() protoreflect.Message {
mi := &file_post_post_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GetPostResponse.ProtoReflect.Descriptor instead.
func (*GetPostResponse) Descriptor() ([]byte, []int) {
return file_post_post_proto_rawDescGZIP(), []int{1}
}
func (x *GetPostResponse) GetPost() *Post {
if x != nil {
return x.Post
}
return nil
}
type GetPostsRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Ids []string `protobuf:"bytes,1,rep,name=ids,proto3" json:"ids,omitempty"`
}
func (x *GetPostsRequest) Reset() {
*x = GetPostsRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_post_post_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GetPostsRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetPostsRequest) ProtoMessage() {}
func (x *GetPostsRequest) ProtoReflect() protoreflect.Message {
mi := &file_post_post_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GetPostsRequest.ProtoReflect.Descriptor instead.
func (*GetPostsRequest) Descriptor() ([]byte, []int) {
return file_post_post_proto_rawDescGZIP(), []int{2}
}
func (x *GetPostsRequest) GetIds() []string {
if x != nil {
return x.Ids
}
return nil
}
type GetPostsResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Posts []*Post `protobuf:"bytes,1,rep,name=posts,proto3" json:"posts,omitempty"`
}
func (x *GetPostsResponse) Reset() {
*x = GetPostsResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_post_post_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GetPostsResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetPostsResponse) ProtoMessage() {}
func (x *GetPostsResponse) ProtoReflect() protoreflect.Message {
mi := &file_post_post_proto_msgTypes[3]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GetPostsResponse.ProtoReflect.Descriptor instead.
func (*GetPostsResponse) Descriptor() ([]byte, []int) {
return file_post_post_proto_rawDescGZIP(), []int{3}
}
func (x *GetPostsResponse) GetPosts() []*Post {
if x != nil {
return x.Posts
}
return nil
}
type Post struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
Title string `protobuf:"bytes,2,opt,name=title,proto3" json:"title,omitempty"`
Content string `protobuf:"bytes,3,opt,name=content,proto3" json:"content,omitempty"`
UserId string `protobuf:"bytes,4,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
}
func (x *Post) Reset() {
*x = Post{}
if protoimpl.UnsafeEnabled {
mi := &file_post_post_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Post) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Post) ProtoMessage() {}
func (x *Post) ProtoReflect() protoreflect.Message {
mi := &file_post_post_proto_msgTypes[4]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Post.ProtoReflect.Descriptor instead.
func (*Post) Descriptor() ([]byte, []int) {
return file_post_post_proto_rawDescGZIP(), []int{4}
}
func (x *Post) GetId() string {
if x != nil {
return x.Id
}
return ""
}
func (x *Post) GetTitle() string {
if x != nil {
return x.Title
}
return ""
}
func (x *Post) GetContent() string {
if x != nil {
return x.Content
}
return ""
}
func (x *Post) GetUserId() string {
if x != nil {
return x.UserId
}
return ""
}
var File_post_post_proto protoreflect.FileDescriptor
var file_post_post_proto_rawDesc = []byte{
0x0a, 0x0f, 0x70, 0x6f, 0x73, 0x74, 0x2f, 0x70, 0x6f, 0x73, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x12, 0x04, 0x70, 0x6f, 0x73, 0x74, 0x22, 0x20, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x50, 0x6f,
0x73, 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, 0x31, 0x0a, 0x0f, 0x47, 0x65, 0x74,
0x50, 0x6f, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1e, 0x0a, 0x04,
0x70, 0x6f, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x70, 0x6f, 0x73,
0x74, 0x2e, 0x50, 0x6f, 0x73, 0x74, 0x52, 0x04, 0x70, 0x6f, 0x73, 0x74, 0x22, 0x23, 0x0a, 0x0f,
0x47, 0x65, 0x74, 0x50, 0x6f, 0x73, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12,
0x10, 0x0a, 0x03, 0x69, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x03, 0x69, 0x64,
0x73, 0x22, 0x34, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x50, 0x6f, 0x73, 0x74, 0x73, 0x52, 0x65, 0x73,
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x20, 0x0a, 0x05, 0x70, 0x6f, 0x73, 0x74, 0x73, 0x18, 0x01,
0x20, 0x03, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x70, 0x6f, 0x73, 0x74, 0x2e, 0x50, 0x6f, 0x73, 0x74,
0x52, 0x05, 0x70, 0x6f, 0x73, 0x74, 0x73, 0x22, 0x5f, 0x0a, 0x04, 0x50, 0x6f, 0x73, 0x74, 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, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74,
0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12,
0x17, 0x0a, 0x07, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09,
0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x32, 0x84, 0x01, 0x0a, 0x0b, 0x50, 0x6f, 0x73,
0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x38, 0x0a, 0x07, 0x47, 0x65, 0x74, 0x50,
0x6f, 0x73, 0x74, 0x12, 0x14, 0x2e, 0x70, 0x6f, 0x73, 0x74, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x6f,
0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x70, 0x6f, 0x73, 0x74,
0x2e, 0x47, 0x65, 0x74, 0x50, 0x6f, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
0x22, 0x00, 0x12, 0x3b, 0x0a, 0x08, 0x47, 0x65, 0x74, 0x50, 0x6f, 0x73, 0x74, 0x73, 0x12, 0x15,
0x2e, 0x70, 0x6f, 0x73, 0x74, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x6f, 0x73, 0x74, 0x73, 0x52, 0x65,
0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x70, 0x6f, 0x73, 0x74, 0x2e, 0x47, 0x65, 0x74,
0x50, 0x6f, 0x73, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42,
0x58, 0x0a, 0x08, 0x63, 0x6f, 0x6d, 0x2e, 0x70, 0x6f, 0x73, 0x74, 0x42, 0x09, 0x50, 0x6f, 0x73,
0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x11, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c,
0x65, 0x2f, 0x70, 0x6f, 0x73, 0x74, 0x3b, 0x70, 0x6f, 0x73, 0x74, 0xa2, 0x02, 0x03, 0x50, 0x58,
0x58, 0xaa, 0x02, 0x04, 0x50, 0x6f, 0x73, 0x74, 0xca, 0x02, 0x04, 0x50, 0x6f, 0x73, 0x74, 0xe2,
0x02, 0x10, 0x50, 0x6f, 0x73, 0x74, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61,
0x74, 0x61, 0xea, 0x02, 0x04, 0x50, 0x6f, 0x73, 0x74, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f,
0x33,
}
var (
file_post_post_proto_rawDescOnce sync.Once
file_post_post_proto_rawDescData = file_post_post_proto_rawDesc
)
func file_post_post_proto_rawDescGZIP() []byte {
file_post_post_proto_rawDescOnce.Do(func() {
file_post_post_proto_rawDescData = protoimpl.X.CompressGZIP(file_post_post_proto_rawDescData)
})
return file_post_post_proto_rawDescData
}
var file_post_post_proto_msgTypes = make([]protoimpl.MessageInfo, 5)
var file_post_post_proto_goTypes = []interface{}{
(*GetPostRequest)(nil), // 0: post.GetPostRequest
(*GetPostResponse)(nil), // 1: post.GetPostResponse
(*GetPostsRequest)(nil), // 2: post.GetPostsRequest
(*GetPostsResponse)(nil), // 3: post.GetPostsResponse
(*Post)(nil), // 4: post.Post
}
var file_post_post_proto_depIdxs = []int32{
4, // 0: post.GetPostResponse.post:type_name -> post.Post
4, // 1: post.GetPostsResponse.posts:type_name -> post.Post
0, // 2: post.PostService.GetPost:input_type -> post.GetPostRequest
2, // 3: post.PostService.GetPosts:input_type -> post.GetPostsRequest
1, // 4: post.PostService.GetPost:output_type -> post.GetPostResponse
3, // 5: post.PostService.GetPosts:output_type -> post.GetPostsResponse
4, // [4:6] is the sub-list for method output_type
2, // [2:4] is the sub-list for method input_type
2, // [2:2] is the sub-list for extension type_name
2, // [2:2] is the sub-list for extension extendee
0, // [0:2] is the sub-list for field type_name
}
func init() { file_post_post_proto_init() }
func file_post_post_proto_init() {
if File_post_post_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_post_post_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetPostRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_post_post_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetPostResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_post_post_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetPostsRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_post_post_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetPostsResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_post_post_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Post); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_post_post_proto_rawDesc,
NumEnums: 0,
NumMessages: 5,
NumExtensions: 0,
NumServices: 1,
},
GoTypes: file_post_post_proto_goTypes,
DependencyIndexes: file_post_post_proto_depIdxs,
MessageInfos: file_post_post_proto_msgTypes,
}.Build()
File_post_post_proto = out.File
file_post_post_proto_rawDesc = nil
file_post_post_proto_goTypes = nil
file_post_post_proto_depIdxs = nil
}
================================================
FILE: _examples/13_map/post/post_grpc.pb.go
================================================
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.3.0
// - protoc (unknown)
// source: post/post.proto
package post
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 (
PostService_GetPost_FullMethodName = "/post.PostService/GetPost"
PostService_GetPosts_FullMethodName = "/post.PostService/GetPosts"
)
// PostServiceClient is the client API for PostService 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 PostServiceClient interface {
GetPost(ctx context.Context, in *GetPostRequest, opts ...grpc.CallOption) (*GetPostResponse, error)
GetPosts(ctx context.Context, in *GetPostsRequest, opts ...grpc.CallOption) (*GetPostsResponse, error)
}
type postServiceClient struct {
cc grpc.ClientConnInterface
}
func NewPostServiceClient(cc grpc.ClientConnInterface) PostServiceClient {
return &postServiceClient{cc}
}
func (c *postServiceClient) GetPost(ctx context.Context, in *GetPostRequest, opts ...grpc.CallOption) (*GetPostResponse, error) {
out := new(GetPostResponse)
err := c.cc.Invoke(ctx, PostService_GetPost_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *postServiceClient) GetPosts(ctx context.Context, in *GetPostsRequest, opts ...grpc.CallOption) (*GetPostsResponse, error) {
out := new(GetPostsResponse)
err := c.cc.Invoke(ctx, PostService_GetPosts_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// PostServiceServer is the server API for PostService service.
// All implementations must embed UnimplementedPostServiceServer
// for forward compatibility
type PostServiceServer interface {
GetPost(context.Context, *GetPostRequest) (*GetPostResponse, error)
GetPosts(context.Context, *GetPostsRequest) (*GetPostsResponse, error)
mustEmbedUnimplementedPostServiceServer()
}
// UnimplementedPostServiceServer must be embedded to have forward compatible implementations.
type UnimplementedPostServiceServer struct {
}
func (UnimplementedPostServiceServer) GetPost(context.Context, *GetPostRequest) (*GetPostResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetPost not implemented")
}
func (UnimplementedPostServiceServer) GetPosts(context.Context, *GetPostsRequest) (*GetPostsResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetPosts not implemented")
}
func (UnimplementedPostServiceServer) mustEmbedUnimplementedPostServiceServer() {}
// UnsafePostServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to PostServiceServer will
// result in compilation errors.
type UnsafePostServiceServer interface {
mustEmbedUnimplementedPostServiceServer()
}
func RegisterPostServiceServer(s grpc.ServiceRegistrar, srv PostServiceServer) {
s.RegisterService(&PostService_ServiceDesc, srv)
}
func _PostService_GetPost_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetPostRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(PostServiceServer).GetPost(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: PostService_GetPost_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(PostServiceServer).GetPost(ctx, req.(*GetPostRequest))
}
return interceptor(ctx, in, info, handler)
}
func _PostService_GetPosts_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetPostsRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(PostServiceServer).GetPosts(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: PostService_GetPosts_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(PostServiceServer).GetPosts(ctx, req.(*GetPostsRequest))
}
return interceptor(ctx, in, info, handler)
}
// PostService_ServiceDesc is the grpc.ServiceDesc for PostService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var PostService_ServiceDesc = grpc.ServiceDesc{
ServiceName: "post.PostService",
HandlerType: (*PostServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "GetPost",
Handler: _PostService_GetPost_Handler,
},
{
MethodName: "GetPosts",
Handler: _PostService_GetPosts_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "post/post.proto",
}
================================================
FILE: _examples/13_map/proto/buf.yaml
================================================
version: v1
breaking:
use:
- FILE
lint:
use:
- DEFAULT
================================================
FILE: _examples/13_map/proto/federation/federation.proto
================================================
syntax = "proto3";
package org.federation;
import "google/protobuf/any.proto";
import "grpc/federation/federation.proto";
option go_package = "example/federation;federation";
option (grpc.federation.file)= {
import: ["post/post.proto", "user/user.proto"]
};
service FederationService {
option (grpc.federation.service) = {};
rpc GetPosts(GetPostsRequest) returns (GetPostsResponse) {};
}
message GetPostsRequest {
repeated string ids = 1;
}
message GetPostsResponse {
option (grpc.federation.message) = {
def {
name: "posts"
message {
name: "Posts"
args { name: "post_ids", by: "$.ids" }
}
}
};
Posts posts = 1 [(grpc.federation.field).by = "posts"];
}
message Posts {
option (grpc.federation.message) = {
def [
{
name: "res"
call {
method: "post.PostService/GetPosts"
request { field: "ids" by: "$.post_ids" }
}
},
{ name: "posts", by: "res.posts" },
{
name: "ids"
map {
iterator {
name: "post"
src: "posts"
}
by: "post.id"
}
},
{
name: "users"
map {
iterator {
name: "iter"
src: "posts"
}
message {
name: "User"
args { name: "user_id", by: "iter.user_id" }
}
}
},
{
name: "items"
map {
iterator {
name: "iter"
src: "posts"
}
message {
name: "Posts.PostItem"
args { name: "id" by: "iter.id" }
}
}
},
{
name: "source_item_types"
by: "[user.Item.ItemType.value('ITEM_TYPE_1'), user.Item.ItemType.value('ITEM_TYPE_2')]"
},
{
name: "item_types"
map {
iterator {
name: "typ"
src: "source_item_types"
}
enum {
name: "Item.ItemType"
by: "typ"
}
}
},
{
name: "selected_item_types"
map {
iterator {
name: "typ"
src: "source_item_types"
}
enum {
name: "Item.ItemType"
by: "grpc.federation.enum.select(true, typ, user.Item.ItemType.value('ITEM_TYPE_UNSPECIFIED'))"
}
}
}
]
};
message PostItem {
string name = 1 [(grpc.federation.field).by = "'item_' + $.id"];
};
repeated string ids = 1 [(grpc.federation.field).by = "ids"];
repeated string titles = 2 [(grpc.federation.field).by = "posts.map(post, post.title)"];
repeated string contents = 3 [(grpc.federation.field).by = "posts.map(post, post.content)"];
repeated User users = 4 [(grpc.federation.field).by = "users"];
repeated PostItem items = 5 [(grpc.federation.field).by = "items"];
repeated Item.ItemType item_types = 6 [(grpc.federation.field).by = "item_types"];
repeated Item.ItemType selected_item_types = 7 [(grpc.federation.field).by = "selected_item_types"];
}
message User {
option (grpc.federation.message) = {
def {
name: "res"
call {
method: "user.UserService/GetUser"
request { field: "id" by: "$.user_id" }
}
}
def { name: "user" by: "res.user" autobind: true }
};
string id = 1;
string name = 2;
}
message Item {
option (grpc.federation.message).alias = "user.Item";
enum ItemType {
option (grpc.federation.enum).alias = "user.Item.ItemType";
ITEM_TYPE_UNSPECIFIED = 0;
ITEM_TYPE_1 = 1;
ITEM_TYPE_2 = 2;
ITEM_TYPE_3 = 3;
}
}
================================================
FILE: _examples/13_map/proto/post/post.proto
================================================
syntax = "proto3";
package post;
option go_package = "example/post;post";
service PostService {
rpc GetPost(GetPostRequest) returns (GetPostResponse) {};
rpc GetPosts(GetPostsRequest) returns (GetPostsResponse) {};
}
message GetPostRequest {
string id = 1;
}
message GetPostResponse {
Post post = 1;
}
message GetPostsRequest {
repeated string ids = 1;
}
message GetPostsResponse {
repeated Post posts = 1;
}
message Post {
string id = 1;
string title = 2;
string content = 3;
string user_id = 4;
}
================================================
FILE: _examples/13_map/proto/user/user.proto
================================================
syntax = "proto3";
package user;
import "google/protobuf/any.proto";
option go_package = "example/user;user";
service UserService {
rpc GetUser(GetUserRequest) returns (GetUserResponse) {};
rpc GetUsers(GetUsersRequest) returns (GetUsersResponse) {};
}
message GetUserRequest {
string id = 1;
}
message GetUserResponse {
User user = 1;
}
message GetUsersRequest {
repeated string ids = 1;
}
message GetUsersResponse {
repeated User users = 1;
}
message User {
string id = 1;
string name = 2;
repeated Item items = 3;
map profile = 4;
oneof attr {
AttrA attr_a = 5;
AttrB b = 6;
}
message AttrA {
string foo = 1;
}
message AttrB {
bool bar = 2;
}
}
message Item {
enum ItemType {
ITEM_TYPE_UNSPECIFIED = 0;
ITEM_TYPE_1 = 1;
ITEM_TYPE_2 = 2;
ITEM_TYPE_3 = 3;
}
message Location {
string addr1 = 1;
string addr2 = 2;
oneof addr3 {
AddrA addr_a = 3;
AddrB b = 4;
};
message AddrA {
string foo = 1;
}
message AddrB {
int64 bar = 1;
}
}
string name = 1;
ItemType type = 2;
int64 value = 3;
Location location = 4;
}
================================================
FILE: _examples/13_map/user/user.pb.go
================================================
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.33.0
// protoc (unknown)
// source: user/user.proto
package user
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
anypb "google.golang.org/protobuf/types/known/anypb"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
type Item_ItemType int32
const (
Item_ITEM_TYPE_UNSPECIFIED Item_ItemType = 0
Item_ITEM_TYPE_1 Item_ItemType = 1
Item_ITEM_TYPE_2 Item_ItemType = 2
Item_ITEM_TYPE_3 Item_ItemType = 3
)
// Enum value maps for Item_ItemType.
var (
Item_ItemType_name = map[int32]string{
0: "ITEM_TYPE_UNSPECIFIED",
1: "ITEM_TYPE_1",
2: "ITEM_TYPE_2",
3: "ITEM_TYPE_3",
}
Item_ItemType_value = map[string]int32{
"ITEM_TYPE_UNSPECIFIED": 0,
"ITEM_TYPE_1": 1,
"ITEM_TYPE_2": 2,
"ITEM_TYPE_3": 3,
}
)
func (x Item_ItemType) Enum() *Item_ItemType {
p := new(Item_ItemType)
*p = x
return p
}
func (x Item_ItemType) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (Item_ItemType) Descriptor() protoreflect.EnumDescriptor {
return file_user_user_proto_enumTypes[0].Descriptor()
}
func (Item_ItemType) Type() protoreflect.EnumType {
return &file_user_user_proto_enumTypes[0]
}
func (x Item_ItemType) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use Item_ItemType.Descriptor instead.
func (Item_ItemType) EnumDescriptor() ([]byte, []int) {
return file_user_user_proto_rawDescGZIP(), []int{5, 0}
}
type GetUserRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
}
func (x *GetUserRequest) Reset() {
*x = GetUserRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_user_user_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GetUserRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetUserRequest) ProtoMessage() {}
func (x *GetUserRequest) ProtoReflect() protoreflect.Message {
mi := &file_user_user_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GetUserRequest.ProtoReflect.Descriptor instead.
func (*GetUserRequest) Descriptor() ([]byte, []int) {
return file_user_user_proto_rawDescGZIP(), []int{0}
}
func (x *GetUserRequest) GetId() string {
if x != nil {
return x.Id
}
return ""
}
type GetUserResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
User *User `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"`
}
func (x *GetUserResponse) Reset() {
*x = GetUserResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_user_user_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GetUserResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetUserResponse) ProtoMessage() {}
func (x *GetUserResponse) ProtoReflect() protoreflect.Message {
mi := &file_user_user_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GetUserResponse.ProtoReflect.Descriptor instead.
func (*GetUserResponse) Descriptor() ([]byte, []int) {
return file_user_user_proto_rawDescGZIP(), []int{1}
}
func (x *GetUserResponse) GetUser() *User {
if x != nil {
return x.User
}
return nil
}
type GetUsersRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Ids []string `protobuf:"bytes,1,rep,name=ids,proto3" json:"ids,omitempty"`
}
func (x *GetUsersRequest) Reset() {
*x = GetUsersRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_user_user_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GetUsersRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetUsersRequest) ProtoMessage() {}
func (x *GetUsersRequest) ProtoReflect() protoreflect.Message {
mi := &file_user_user_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GetUsersRequest.ProtoReflect.Descriptor instead.
func (*GetUsersRequest) Descriptor() ([]byte, []int) {
return file_user_user_proto_rawDescGZIP(), []int{2}
}
func (x *GetUsersRequest) GetIds() []string {
if x != nil {
return x.Ids
}
return nil
}
type GetUsersResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Users []*User `protobuf:"bytes,1,rep,name=users,proto3" json:"users,omitempty"`
}
func (x *GetUsersResponse) Reset() {
*x = GetUsersResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_user_user_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GetUsersResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetUsersResponse) ProtoMessage() {}
func (x *GetUsersResponse) ProtoReflect() protoreflect.Message {
mi := &file_user_user_proto_msgTypes[3]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GetUsersResponse.ProtoReflect.Descriptor instead.
func (*GetUsersResponse) Descriptor() ([]byte, []int) {
return file_user_user_proto_rawDescGZIP(), []int{3}
}
func (x *GetUsersResponse) GetUsers() []*User {
if x != nil {
return x.Users
}
return nil
}
type User struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
Items []*Item `protobuf:"bytes,3,rep,name=items,proto3" json:"items,omitempty"`
Profile map[string]*anypb.Any `protobuf:"bytes,4,rep,name=profile,proto3" json:"profile,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
// Types that are assignable to Attr:
//
// *User_AttrA_
// *User_B
Attr isUser_Attr `protobuf_oneof:"attr"`
}
func (x *User) Reset() {
*x = User{}
if protoimpl.UnsafeEnabled {
mi := &file_user_user_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *User) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*User) ProtoMessage() {}
func (x *User) ProtoReflect() protoreflect.Message {
mi := &file_user_user_proto_msgTypes[4]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use User.ProtoReflect.Descriptor instead.
func (*User) Descriptor() ([]byte, []int) {
return file_user_user_proto_rawDescGZIP(), []int{4}
}
func (x *User) GetId() string {
if x != nil {
return x.Id
}
return ""
}
func (x *User) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *User) GetItems() []*Item {
if x != nil {
return x.Items
}
return nil
}
func (x *User) GetProfile() map[string]*anypb.Any {
if x != nil {
return x.Profile
}
return nil
}
func (m *User) GetAttr() isUser_Attr {
if m != nil {
return m.Attr
}
return nil
}
func (x *User) GetAttrA() *User_AttrA {
if x, ok := x.GetAttr().(*User_AttrA_); ok {
return x.AttrA
}
return nil
}
func (x *User) GetB() *User_AttrB {
if x, ok := x.GetAttr().(*User_B); ok {
return x.B
}
return nil
}
type isUser_Attr interface {
isUser_Attr()
}
type User_AttrA_ struct {
AttrA *User_AttrA `protobuf:"bytes,5,opt,name=attr_a,json=attrA,proto3,oneof"`
}
type User_B struct {
B *User_AttrB `protobuf:"bytes,6,opt,name=b,proto3,oneof"`
}
func (*User_AttrA_) isUser_Attr() {}
func (*User_B) isUser_Attr() {}
type Item struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
Type Item_ItemType `protobuf:"varint,2,opt,name=type,proto3,enum=user.Item_ItemType" json:"type,omitempty"`
Value int64 `protobuf:"varint,3,opt,name=value,proto3" json:"value,omitempty"`
Location *Item_Location `protobuf:"bytes,4,opt,name=location,proto3" json:"location,omitempty"`
}
func (x *Item) Reset() {
*x = Item{}
if protoimpl.UnsafeEnabled {
mi := &file_user_user_proto_msgTypes[5]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Item) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Item) ProtoMessage() {}
func (x *Item) ProtoReflect() protoreflect.Message {
mi := &file_user_user_proto_msgTypes[5]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Item.ProtoReflect.Descriptor instead.
func (*Item) Descriptor() ([]byte, []int) {
return file_user_user_proto_rawDescGZIP(), []int{5}
}
func (x *Item) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *Item) GetType() Item_ItemType {
if x != nil {
return x.Type
}
return Item_ITEM_TYPE_UNSPECIFIED
}
func (x *Item) GetValue() int64 {
if x != nil {
return x.Value
}
return 0
}
func (x *Item) GetLocation() *Item_Location {
if x != nil {
return x.Location
}
return nil
}
type User_AttrA struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Foo string `protobuf:"bytes,1,opt,name=foo,proto3" json:"foo,omitempty"`
}
func (x *User_AttrA) Reset() {
*x = User_AttrA{}
if protoimpl.UnsafeEnabled {
mi := &file_user_user_proto_msgTypes[7]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *User_AttrA) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*User_AttrA) ProtoMessage() {}
func (x *User_AttrA) ProtoReflect() protoreflect.Message {
mi := &file_user_user_proto_msgTypes[7]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use User_AttrA.ProtoReflect.Descriptor instead.
func (*User_AttrA) Descriptor() ([]byte, []int) {
return file_user_user_proto_rawDescGZIP(), []int{4, 1}
}
func (x *User_AttrA) GetFoo() string {
if x != nil {
return x.Foo
}
return ""
}
type User_AttrB struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Bar bool `protobuf:"varint,2,opt,name=bar,proto3" json:"bar,omitempty"`
}
func (x *User_AttrB) Reset() {
*x = User_AttrB{}
if protoimpl.UnsafeEnabled {
mi := &file_user_user_proto_msgTypes[8]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *User_AttrB) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*User_AttrB) ProtoMessage() {}
func (x *User_AttrB) ProtoReflect() protoreflect.Message {
mi := &file_user_user_proto_msgTypes[8]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use User_AttrB.ProtoReflect.Descriptor instead.
func (*User_AttrB) Descriptor() ([]byte, []int) {
return file_user_user_proto_rawDescGZIP(), []int{4, 2}
}
func (x *User_AttrB) GetBar() bool {
if x != nil {
return x.Bar
}
return false
}
type Item_Location struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Addr1 string `protobuf:"bytes,1,opt,name=addr1,proto3" json:"addr1,omitempty"`
Addr2 string `protobuf:"bytes,2,opt,name=addr2,proto3" json:"addr2,omitempty"`
// Types that are assignable to Addr3:
//
// *Item_Location_AddrA_
// *Item_Location_B
Addr3 isItem_Location_Addr3 `protobuf_oneof:"addr3"`
}
func (x *Item_Location) Reset() {
*x = Item_Location{}
if protoimpl.UnsafeEnabled {
mi := &file_user_user_proto_msgTypes[9]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Item_Location) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Item_Location) ProtoMessage() {}
func (x *Item_Location) ProtoReflect() protoreflect.Message {
mi := &file_user_user_proto_msgTypes[9]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Item_Location.ProtoReflect.Descriptor instead.
func (*Item_Location) Descriptor() ([]byte, []int) {
return file_user_user_proto_rawDescGZIP(), []int{5, 0}
}
func (x *Item_Location) GetAddr1() string {
if x != nil {
return x.Addr1
}
return ""
}
func (x *Item_Location) GetAddr2() string {
if x != nil {
return x.Addr2
}
return ""
}
func (m *Item_Location) GetAddr3() isItem_Location_Addr3 {
if m != nil {
return m.Addr3
}
return nil
}
func (x *Item_Location) GetAddrA() *Item_Location_AddrA {
if x, ok := x.GetAddr3().(*Item_Location_AddrA_); ok {
return x.AddrA
}
return nil
}
func (x *Item_Location) GetB() *Item_Location_AddrB {
if x, ok := x.GetAddr3().(*Item_Location_B); ok {
return x.B
}
return nil
}
type isItem_Location_Addr3 interface {
isItem_Location_Addr3()
}
type Item_Location_AddrA_ struct {
AddrA *Item_Location_AddrA `protobuf:"bytes,3,opt,name=addr_a,json=addrA,proto3,oneof"`
}
type Item_Location_B struct {
B *Item_Location_AddrB `protobuf:"bytes,4,opt,name=b,proto3,oneof"`
}
func (*Item_Location_AddrA_) isItem_Location_Addr3() {}
func (*Item_Location_B) isItem_Location_Addr3() {}
type Item_Location_AddrA struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Foo string `protobuf:"bytes,1,opt,name=foo,proto3" json:"foo,omitempty"`
}
func (x *Item_Location_AddrA) Reset() {
*x = Item_Location_AddrA{}
if protoimpl.UnsafeEnabled {
mi := &file_user_user_proto_msgTypes[10]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Item_Location_AddrA) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Item_Location_AddrA) ProtoMessage() {}
func (x *Item_Location_AddrA) ProtoReflect() protoreflect.Message {
mi := &file_user_user_proto_msgTypes[10]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Item_Location_AddrA.ProtoReflect.Descriptor instead.
func (*Item_Location_AddrA) Descriptor() ([]byte, []int) {
return file_user_user_proto_rawDescGZIP(), []int{5, 0, 0}
}
func (x *Item_Location_AddrA) GetFoo() string {
if x != nil {
return x.Foo
}
return ""
}
type Item_Location_AddrB struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Bar int64 `protobuf:"varint,1,opt,name=bar,proto3" json:"bar,omitempty"`
}
func (x *Item_Location_AddrB) Reset() {
*x = Item_Location_AddrB{}
if protoimpl.UnsafeEnabled {
mi := &file_user_user_proto_msgTypes[11]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Item_Location_AddrB) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Item_Location_AddrB) ProtoMessage() {}
func (x *Item_Location_AddrB) ProtoReflect() protoreflect.Message {
mi := &file_user_user_proto_msgTypes[11]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Item_Location_AddrB.ProtoReflect.Descriptor instead.
func (*Item_Location_AddrB) Descriptor() ([]byte, []int) {
return file_user_user_proto_rawDescGZIP(), []int{5, 0, 1}
}
func (x *Item_Location_AddrB) GetBar() int64 {
if x != nil {
return x.Bar
}
return 0
}
var File_user_user_proto protoreflect.FileDescriptor
var file_user_user_proto_rawDesc = []byte{
0x0a, 0x0f, 0x75, 0x73, 0x65, 0x72, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x12, 0x04, 0x75, 0x73, 0x65, 0x72, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6e, 0x79, 0x2e, 0x70, 0x72, 0x6f,
0x74, 0x6f, 0x22, 0x20, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71,
0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
0x52, 0x02, 0x69, 0x64, 0x22, 0x31, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x52,
0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1e, 0x0a, 0x04, 0x75, 0x73, 0x65, 0x72, 0x18,
0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x55, 0x73, 0x65,
0x72, 0x52, 0x04, 0x75, 0x73, 0x65, 0x72, 0x22, 0x23, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x55, 0x73,
0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x69, 0x64,
0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x03, 0x69, 0x64, 0x73, 0x22, 0x34, 0x0a, 0x10,
0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
0x12, 0x20, 0x0a, 0x05, 0x75, 0x73, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32,
0x0a, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x05, 0x75, 0x73, 0x65,
0x72, 0x73, 0x22, 0xdc, 0x02, 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, 0x6e,
0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12,
0x20, 0x0a, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0a,
0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x49, 0x74, 0x65, 0x6d, 0x52, 0x05, 0x69, 0x74, 0x65, 0x6d,
0x73, 0x12, 0x31, 0x0a, 0x07, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x18, 0x04, 0x20, 0x03,
0x28, 0x0b, 0x32, 0x17, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x2e, 0x50,
0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x07, 0x70, 0x72, 0x6f,
0x66, 0x69, 0x6c, 0x65, 0x12, 0x29, 0x0a, 0x06, 0x61, 0x74, 0x74, 0x72, 0x5f, 0x61, 0x18, 0x05,
0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x55, 0x73, 0x65, 0x72,
0x2e, 0x41, 0x74, 0x74, 0x72, 0x41, 0x48, 0x00, 0x52, 0x05, 0x61, 0x74, 0x74, 0x72, 0x41, 0x12,
0x20, 0x0a, 0x01, 0x62, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x75, 0x73, 0x65,
0x72, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x2e, 0x41, 0x74, 0x74, 0x72, 0x42, 0x48, 0x00, 0x52, 0x01,
0x62, 0x1a, 0x50, 0x0a, 0x0c, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x45, 0x6e, 0x74, 0x72,
0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03,
0x6b, 0x65, 0x79, 0x12, 0x2a, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01,
0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a,
0x02, 0x38, 0x01, 0x1a, 0x19, 0x0a, 0x05, 0x41, 0x74, 0x74, 0x72, 0x41, 0x12, 0x10, 0x0a, 0x03,
0x66, 0x6f, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x66, 0x6f, 0x6f, 0x1a, 0x19,
0x0a, 0x05, 0x41, 0x74, 0x74, 0x72, 0x42, 0x12, 0x10, 0x0a, 0x03, 0x62, 0x61, 0x72, 0x18, 0x02,
0x20, 0x01, 0x28, 0x08, 0x52, 0x03, 0x62, 0x61, 0x72, 0x42, 0x06, 0x0a, 0x04, 0x61, 0x74, 0x74,
0x72, 0x22, 0xbb, 0x03, 0x0a, 0x04, 0x49, 0x74, 0x65, 0x6d, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61,
0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x27,
0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x13, 0x2e, 0x75,
0x73, 0x65, 0x72, 0x2e, 0x49, 0x74, 0x65, 0x6d, 0x2e, 0x49, 0x74, 0x65, 0x6d, 0x54, 0x79, 0x70,
0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65,
0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x2f, 0x0a,
0x08, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32,
0x13, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x49, 0x74, 0x65, 0x6d, 0x2e, 0x4c, 0x6f, 0x63, 0x61,
0x74, 0x69, 0x6f, 0x6e, 0x52, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0xd4,
0x01, 0x0a, 0x08, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x61,
0x64, 0x64, 0x72, 0x31, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x61, 0x64, 0x64, 0x72,
0x31, 0x12, 0x14, 0x0a, 0x05, 0x61, 0x64, 0x64, 0x72, 0x32, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09,
0x52, 0x05, 0x61, 0x64, 0x64, 0x72, 0x32, 0x12, 0x32, 0x0a, 0x06, 0x61, 0x64, 0x64, 0x72, 0x5f,
0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x49,
0x74, 0x65, 0x6d, 0x2e, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x41, 0x64, 0x64,
0x72, 0x41, 0x48, 0x00, 0x52, 0x05, 0x61, 0x64, 0x64, 0x72, 0x41, 0x12, 0x29, 0x0a, 0x01, 0x62,
0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x49, 0x74,
0x65, 0x6d, 0x2e, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x41, 0x64, 0x64, 0x72,
0x42, 0x48, 0x00, 0x52, 0x01, 0x62, 0x1a, 0x19, 0x0a, 0x05, 0x41, 0x64, 0x64, 0x72, 0x41, 0x12,
0x10, 0x0a, 0x03, 0x66, 0x6f, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x66, 0x6f,
0x6f, 0x1a, 0x19, 0x0a, 0x05, 0x41, 0x64, 0x64, 0x72, 0x42, 0x12, 0x10, 0x0a, 0x03, 0x62, 0x61,
0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x62, 0x61, 0x72, 0x42, 0x07, 0x0a, 0x05,
0x61, 0x64, 0x64, 0x72, 0x33, 0x22, 0x58, 0x0a, 0x08, 0x49, 0x74, 0x65, 0x6d, 0x54, 0x79, 0x70,
0x65, 0x12, 0x19, 0x0a, 0x15, 0x49, 0x54, 0x45, 0x4d, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55,
0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0f, 0x0a, 0x0b,
0x49, 0x54, 0x45, 0x4d, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x31, 0x10, 0x01, 0x12, 0x0f, 0x0a,
0x0b, 0x49, 0x54, 0x45, 0x4d, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x32, 0x10, 0x02, 0x12, 0x0f,
0x0a, 0x0b, 0x49, 0x54, 0x45, 0x4d, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x33, 0x10, 0x03, 0x32,
0x84, 0x01, 0x0a, 0x0b, 0x55, 0x73, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12,
0x38, 0x0a, 0x07, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x12, 0x14, 0x2e, 0x75, 0x73, 0x65,
0x72, 0x2e, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
0x1a, 0x15, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x52,
0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x3b, 0x0a, 0x08, 0x47, 0x65, 0x74,
0x55, 0x73, 0x65, 0x72, 0x73, 0x12, 0x15, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x47, 0x65, 0x74,
0x55, 0x73, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x75,
0x73, 0x65, 0x72, 0x2e, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70,
0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x58, 0x0a, 0x08, 0x63, 0x6f, 0x6d, 0x2e, 0x75, 0x73,
0x65, 0x72, 0x42, 0x09, 0x55, 0x73, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a,
0x11, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x3b, 0x75, 0x73,
0x65, 0x72, 0xa2, 0x02, 0x03, 0x55, 0x58, 0x58, 0xaa, 0x02, 0x04, 0x55, 0x73, 0x65, 0x72, 0xca,
0x02, 0x04, 0x55, 0x73, 0x65, 0x72, 0xe2, 0x02, 0x10, 0x55, 0x73, 0x65, 0x72, 0x5c, 0x47, 0x50,
0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x04, 0x55, 0x73, 0x65, 0x72,
0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_user_user_proto_rawDescOnce sync.Once
file_user_user_proto_rawDescData = file_user_user_proto_rawDesc
)
func file_user_user_proto_rawDescGZIP() []byte {
file_user_user_proto_rawDescOnce.Do(func() {
file_user_user_proto_rawDescData = protoimpl.X.CompressGZIP(file_user_user_proto_rawDescData)
})
return file_user_user_proto_rawDescData
}
var file_user_user_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
var file_user_user_proto_msgTypes = make([]protoimpl.MessageInfo, 12)
var file_user_user_proto_goTypes = []interface{}{
(Item_ItemType)(0), // 0: user.Item.ItemType
(*GetUserRequest)(nil), // 1: user.GetUserRequest
(*GetUserResponse)(nil), // 2: user.GetUserResponse
(*GetUsersRequest)(nil), // 3: user.GetUsersRequest
(*GetUsersResponse)(nil), // 4: user.GetUsersResponse
(*User)(nil), // 5: user.User
(*Item)(nil), // 6: user.Item
nil, // 7: user.User.ProfileEntry
(*User_AttrA)(nil), // 8: user.User.AttrA
(*User_AttrB)(nil), // 9: user.User.AttrB
(*Item_Location)(nil), // 10: user.Item.Location
(*Item_Location_AddrA)(nil), // 11: user.Item.Location.AddrA
(*Item_Location_AddrB)(nil), // 12: user.Item.Location.AddrB
(*anypb.Any)(nil), // 13: google.protobuf.Any
}
var file_user_user_proto_depIdxs = []int32{
5, // 0: user.GetUserResponse.user:type_name -> user.User
5, // 1: user.GetUsersResponse.users:type_name -> user.User
6, // 2: user.User.items:type_name -> user.Item
7, // 3: user.User.profile:type_name -> user.User.ProfileEntry
8, // 4: user.User.attr_a:type_name -> user.User.AttrA
9, // 5: user.User.b:type_name -> user.User.AttrB
0, // 6: user.Item.type:type_name -> user.Item.ItemType
10, // 7: user.Item.location:type_name -> user.Item.Location
13, // 8: user.User.ProfileEntry.value:type_name -> google.protobuf.Any
11, // 9: user.Item.Location.addr_a:type_name -> user.Item.Location.AddrA
12, // 10: user.Item.Location.b:type_name -> user.Item.Location.AddrB
1, // 11: user.UserService.GetUser:input_type -> user.GetUserRequest
3, // 12: user.UserService.GetUsers:input_type -> user.GetUsersRequest
2, // 13: user.UserService.GetUser:output_type -> user.GetUserResponse
4, // 14: user.UserService.GetUsers:output_type -> user.GetUsersResponse
13, // [13:15] is the sub-list for method output_type
11, // [11:13] is the sub-list for method input_type
11, // [11:11] is the sub-list for extension type_name
11, // [11:11] is the sub-list for extension extendee
0, // [0:11] is the sub-list for field type_name
}
func init() { file_user_user_proto_init() }
func file_user_user_proto_init() {
if File_user_user_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_user_user_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetUserRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_user_user_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetUserResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_user_user_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetUsersRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_user_user_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetUsersResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_user_user_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*User); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_user_user_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Item); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_user_user_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*User_AttrA); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_user_user_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*User_AttrB); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_user_user_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Item_Location); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_user_user_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Item_Location_AddrA); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_user_user_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Item_Location_AddrB); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
file_user_user_proto_msgTypes[4].OneofWrappers = []interface{}{
(*User_AttrA_)(nil),
(*User_B)(nil),
}
file_user_user_proto_msgTypes[9].OneofWrappers = []interface{}{
(*Item_Location_AddrA_)(nil),
(*Item_Location_B)(nil),
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_user_user_proto_rawDesc,
NumEnums: 1,
NumMessages: 12,
NumExtensions: 0,
NumServices: 1,
},
GoTypes: file_user_user_proto_goTypes,
DependencyIndexes: file_user_user_proto_depIdxs,
EnumInfos: file_user_user_proto_enumTypes,
MessageInfos: file_user_user_proto_msgTypes,
}.Build()
File_user_user_proto = out.File
file_user_user_proto_rawDesc = nil
file_user_user_proto_goTypes = nil
file_user_user_proto_depIdxs = nil
}
================================================
FILE: _examples/13_map/user/user_grpc.pb.go
================================================
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.3.0
// - protoc (unknown)
// source: user/user.proto
package user
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 (
UserService_GetUser_FullMethodName = "/user.UserService/GetUser"
UserService_GetUsers_FullMethodName = "/user.UserService/GetUsers"
)
// UserServiceClient is the client API for UserService 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 UserServiceClient interface {
GetUser(ctx context.Context, in *GetUserRequest, opts ...grpc.CallOption) (*GetUserResponse, error)
GetUsers(ctx context.Context, in *GetUsersRequest, opts ...grpc.CallOption) (*GetUsersResponse, error)
}
type userServiceClient struct {
cc grpc.ClientConnInterface
}
func NewUserServiceClient(cc grpc.ClientConnInterface) UserServiceClient {
return &userServiceClient{cc}
}
func (c *userServiceClient) GetUser(ctx context.Context, in *GetUserRequest, opts ...grpc.CallOption) (*GetUserResponse, error) {
out := new(GetUserResponse)
err := c.cc.Invoke(ctx, UserService_GetUser_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *userServiceClient) GetUsers(ctx context.Context, in *GetUsersRequest, opts ...grpc.CallOption) (*GetUsersResponse, error) {
out := new(GetUsersResponse)
err := c.cc.Invoke(ctx, UserService_GetUsers_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// UserServiceServer is the server API for UserService service.
// All implementations must embed UnimplementedUserServiceServer
// for forward compatibility
type UserServiceServer interface {
GetUser(context.Context, *GetUserRequest) (*GetUserResponse, error)
GetUsers(context.Context, *GetUsersRequest) (*GetUsersResponse, error)
mustEmbedUnimplementedUserServiceServer()
}
// UnimplementedUserServiceServer must be embedded to have forward compatible implementations.
type UnimplementedUserServiceServer struct {
}
func (UnimplementedUserServiceServer) GetUser(context.Context, *GetUserRequest) (*GetUserResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetUser not implemented")
}
func (UnimplementedUserServiceServer) GetUsers(context.Context, *GetUsersRequest) (*GetUsersResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetUsers not implemented")
}
func (UnimplementedUserServiceServer) mustEmbedUnimplementedUserServiceServer() {}
// UnsafeUserServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to UserServiceServer will
// result in compilation errors.
type UnsafeUserServiceServer interface {
mustEmbedUnimplementedUserServiceServer()
}
func RegisterUserServiceServer(s grpc.ServiceRegistrar, srv UserServiceServer) {
s.RegisterService(&UserService_ServiceDesc, srv)
}
func _UserService_GetUser_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetUserRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(UserServiceServer).GetUser(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: UserService_GetUser_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(UserServiceServer).GetUser(ctx, req.(*GetUserRequest))
}
return interceptor(ctx, in, info, handler)
}
func _UserService_GetUsers_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetUsersRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(UserServiceServer).GetUsers(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: UserService_GetUsers_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(UserServiceServer).GetUsers(ctx, req.(*GetUsersRequest))
}
return interceptor(ctx, in, info, handler)
}
// UserService_ServiceDesc is the grpc.ServiceDesc for UserService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var UserService_ServiceDesc = grpc.ServiceDesc{
ServiceName: "user.UserService",
HandlerType: (*UserServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "GetUser",
Handler: _UserService_GetUser_Handler,
},
{
MethodName: "GetUsers",
Handler: _UserService_GetUsers_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "user/user.proto",
}
================================================
FILE: _examples/14_condition/.gitignore
================================================
grpc/federation
================================================
FILE: _examples/14_condition/Makefile
================================================
MAKEFILE_DIR := $(dir $(lastword $(MAKEFILE_LIST)))
GOBIN := $(MAKEFILE_DIR)/../../bin
PATH := $(GOBIN):$(PATH)
JAEGER_IMAGE := jaegertracing/all-in-one:latest
.PHONY: generate
generate:
$(GOBIN)/buf generate
.PHONY: lint
lint:
@$(GOBIN)/grpc-federation-linter -Iproto -Iproto_deps ./proto/federation/federation.proto
.PHONY: test
test:
go test -race ./ -count=1
.PHONY: grpc-federation/generate
grpc-federation/generate:
@$(GOBIN)/grpc-federation-generator ./proto/federation/federation.proto
.PHONY: grpc-federation/watch
grpc-federation/watch:
@$(GOBIN)/grpc-federation-generator -w
.PHONY: jaeger/start
jaeger/start:
@docker run \
-e COLLECTOR_OTLP_ENABLED=true \
-p 16686:16686 \
-p 4317:4317 \
-p 4318:4318 \
-d \
$(JAEGER_IMAGE)
.PHONY: jaeger/stop
jaeger/stop:
@docker stop $(shell docker ps -q --filter ancestor=$(JAEGER_IMAGE))
================================================
FILE: _examples/14_condition/buf.gen.yaml
================================================
version: v1
managed:
enabled: true
plugins:
- plugin: go
out: .
opt: paths=source_relative
- plugin: go-grpc
out: .
opt: paths=source_relative
- plugin: grpc-federation
out: .
opt:
- paths=source_relative
- import_paths=proto
================================================
FILE: _examples/14_condition/buf.work.yaml
================================================
version: v1
directories:
- proto
- proto_deps
================================================
FILE: _examples/14_condition/federation/federation.pb.go
================================================
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.33.0
// protoc (unknown)
// source: federation/federation.proto
package federation
import (
_ "github.com/mercari/grpc-federation/grpc/federation"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
_ "google.golang.org/protobuf/types/known/anypb"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
type GetPostRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
}
func (x *GetPostRequest) Reset() {
*x = GetPostRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_federation_federation_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GetPostRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetPostRequest) ProtoMessage() {}
func (x *GetPostRequest) ProtoReflect() protoreflect.Message {
mi := &file_federation_federation_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GetPostRequest.ProtoReflect.Descriptor instead.
func (*GetPostRequest) Descriptor() ([]byte, []int) {
return file_federation_federation_proto_rawDescGZIP(), []int{0}
}
func (x *GetPostRequest) GetId() string {
if x != nil {
return x.Id
}
return ""
}
type GetPostResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Post *Post `protobuf:"bytes,1,opt,name=post,proto3" json:"post,omitempty"`
}
func (x *GetPostResponse) Reset() {
*x = GetPostResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_federation_federation_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GetPostResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetPostResponse) ProtoMessage() {}
func (x *GetPostResponse) ProtoReflect() protoreflect.Message {
mi := &file_federation_federation_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GetPostResponse.ProtoReflect.Descriptor instead.
func (*GetPostResponse) Descriptor() ([]byte, []int) {
return file_federation_federation_proto_rawDescGZIP(), []int{1}
}
func (x *GetPostResponse) GetPost() *Post {
if x != nil {
return x.Post
}
return nil
}
type Post struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
Title string `protobuf:"bytes,2,opt,name=title,proto3" json:"title,omitempty"`
User *User `protobuf:"bytes,4,opt,name=user,proto3" json:"user,omitempty"`
}
func (x *Post) Reset() {
*x = Post{}
if protoimpl.UnsafeEnabled {
mi := &file_federation_federation_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Post) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Post) ProtoMessage() {}
func (x *Post) ProtoReflect() protoreflect.Message {
mi := &file_federation_federation_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Post.ProtoReflect.Descriptor instead.
func (*Post) Descriptor() ([]byte, []int) {
return file_federation_federation_proto_rawDescGZIP(), []int{2}
}
func (x *Post) GetId() string {
if x != nil {
return x.Id
}
return ""
}
func (x *Post) GetTitle() string {
if x != nil {
return x.Title
}
return ""
}
func (x *Post) GetUser() *User {
if x != nil {
return x.User
}
return nil
}
type User struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
}
func (x *User) Reset() {
*x = User{}
if protoimpl.UnsafeEnabled {
mi := &file_federation_federation_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *User) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*User) ProtoMessage() {}
func (x *User) ProtoReflect() protoreflect.Message {
mi := &file_federation_federation_proto_msgTypes[3]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use User.ProtoReflect.Descriptor instead.
func (*User) Descriptor() ([]byte, []int) {
return file_federation_federation_proto_rawDescGZIP(), []int{3}
}
func (x *User) GetId() string {
if x != nil {
return x.Id
}
return ""
}
var File_federation_federation_proto protoreflect.FileDescriptor
var file_federation_federation_proto_rawDesc = []byte{
0x0a, 0x1b, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x66, 0x65, 0x64,
0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0e, 0x6f,
0x72, 0x67, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x19, 0x67,
0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x61,
0x6e, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x20, 0x67, 0x72, 0x70, 0x63, 0x2f, 0x66,
0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61,
0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x20, 0x0a, 0x0e, 0x47, 0x65,
0x74, 0x50, 0x6f, 0x73, 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, 0x67, 0x0a, 0x0f,
0x47, 0x65, 0x74, 0x50, 0x6f, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12,
0x33, 0x0a, 0x04, 0x70, 0x6f, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e,
0x6f, 0x72, 0x67, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x50,
0x6f, 0x73, 0x74, 0x42, 0x09, 0x9a, 0x4a, 0x06, 0x12, 0x04, 0x70, 0x6f, 0x73, 0x74, 0x52, 0x04,
0x70, 0x6f, 0x73, 0x74, 0x3a, 0x1f, 0x9a, 0x4a, 0x1c, 0x0a, 0x1a, 0x0a, 0x04, 0x70, 0x6f, 0x73,
0x74, 0x6a, 0x12, 0x0a, 0x04, 0x50, 0x6f, 0x73, 0x74, 0x12, 0x0a, 0x0a, 0x02, 0x69, 0x64, 0x12,
0x04, 0x24, 0x2e, 0x69, 0x64, 0x22, 0xa3, 0x03, 0x0a, 0x04, 0x50, 0x6f, 0x73, 0x74, 0x12, 0x1c,
0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0c, 0x9a, 0x4a, 0x09, 0x12,
0x07, 0x70, 0x6f, 0x73, 0x74, 0x2e, 0x69, 0x64, 0x52, 0x02, 0x69, 0x64, 0x12, 0x25, 0x0a, 0x05,
0x74, 0x69, 0x74, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0f, 0x9a, 0x4a, 0x0c,
0x12, 0x0a, 0x70, 0x6f, 0x73, 0x74, 0x2e, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x52, 0x05, 0x74, 0x69,
0x74, 0x6c, 0x65, 0x12, 0x37, 0x0a, 0x04, 0x75, 0x73, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28,
0x0b, 0x32, 0x14, 0x2e, 0x6f, 0x72, 0x67, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69,
0x6f, 0x6e, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x42, 0x0d, 0x9a, 0x4a, 0x0a, 0x12, 0x08, 0x75, 0x73,
0x65, 0x72, 0x73, 0x5b, 0x30, 0x5d, 0x52, 0x04, 0x75, 0x73, 0x65, 0x72, 0x3a, 0x9c, 0x02, 0x9a,
0x4a, 0x98, 0x02, 0x0a, 0x39, 0x0a, 0x03, 0x72, 0x65, 0x73, 0x12, 0x0a, 0x24, 0x2e, 0x69, 0x64,
0x20, 0x21, 0x3d, 0x20, 0x27, 0x27, 0x72, 0x26, 0x0a, 0x18, 0x70, 0x6f, 0x73, 0x74, 0x2e, 0x50,
0x6f, 0x73, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x47, 0x65, 0x74, 0x50, 0x6f,
0x73, 0x74, 0x12, 0x0a, 0x0a, 0x02, 0x69, 0x64, 0x12, 0x04, 0x24, 0x2e, 0x69, 0x64, 0x0a, 0x1d,
0x0a, 0x04, 0x70, 0x6f, 0x73, 0x74, 0x12, 0x0b, 0x72, 0x65, 0x73, 0x20, 0x21, 0x3d, 0x20, 0x6e,
0x75, 0x6c, 0x6c, 0x5a, 0x08, 0x72, 0x65, 0x73, 0x2e, 0x70, 0x6f, 0x73, 0x74, 0x0a, 0x35, 0x0a,
0x04, 0x75, 0x73, 0x65, 0x72, 0x12, 0x0c, 0x70, 0x6f, 0x73, 0x74, 0x20, 0x21, 0x3d, 0x20, 0x6e,
0x75, 0x6c, 0x6c, 0x6a, 0x1f, 0x0a, 0x04, 0x55, 0x73, 0x65, 0x72, 0x12, 0x17, 0x0a, 0x07, 0x75,
0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x12, 0x0c, 0x70, 0x6f, 0x73, 0x74, 0x2e, 0x75, 0x73, 0x65,
0x72, 0x5f, 0x69, 0x64, 0x0a, 0x0f, 0x0a, 0x05, 0x70, 0x6f, 0x73, 0x74, 0x73, 0x5a, 0x06, 0x5b,
0x70, 0x6f, 0x73, 0x74, 0x5d, 0x0a, 0x47, 0x0a, 0x05, 0x75, 0x73, 0x65, 0x72, 0x73, 0x12, 0x0c,
0x75, 0x73, 0x65, 0x72, 0x20, 0x21, 0x3d, 0x20, 0x6e, 0x75, 0x6c, 0x6c, 0x62, 0x30, 0x0a, 0x0d,
0x0a, 0x04, 0x69, 0x74, 0x65, 0x72, 0x12, 0x05, 0x70, 0x6f, 0x73, 0x74, 0x73, 0x62, 0x1f, 0x0a,
0x04, 0x55, 0x73, 0x65, 0x72, 0x12, 0x17, 0x0a, 0x07, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64,
0x12, 0x0c, 0x69, 0x74, 0x65, 0x72, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x0a, 0x2b,
0x12, 0x10, 0x75, 0x73, 0x65, 0x72, 0x73, 0x2e, 0x73, 0x69, 0x7a, 0x65, 0x28, 0x29, 0x20, 0x3e,
0x20, 0x30, 0x7a, 0x17, 0x12, 0x15, 0x12, 0x11, 0x75, 0x73, 0x65, 0x72, 0x73, 0x5b, 0x30, 0x5d,
0x2e, 0x69, 0x64, 0x20, 0x3d, 0x3d, 0x20, 0x27, 0x27, 0x18, 0x03, 0x22, 0x26, 0x0a, 0x04, 0x55,
0x73, 0x65, 0x72, 0x12, 0x1e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42,
0x0e, 0x9a, 0x4a, 0x0b, 0x12, 0x09, 0x24, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x52,
0x02, 0x69, 0x64, 0x32, 0x66, 0x0a, 0x11, 0x46, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f,
0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x4c, 0x0a, 0x07, 0x47, 0x65, 0x74, 0x50,
0x6f, 0x73, 0x74, 0x12, 0x1e, 0x2e, 0x6f, 0x72, 0x67, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61,
0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x6f, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75,
0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x6f, 0x72, 0x67, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61,
0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x6f, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70,
0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x1a, 0x03, 0x9a, 0x4a, 0x00, 0x42, 0xb1, 0x01, 0x9a, 0x4a,
0x11, 0x12, 0x0f, 0x70, 0x6f, 0x73, 0x74, 0x2f, 0x70, 0x6f, 0x73, 0x74, 0x2e, 0x70, 0x72, 0x6f,
0x74, 0x6f, 0x0a, 0x12, 0x63, 0x6f, 0x6d, 0x2e, 0x6f, 0x72, 0x67, 0x2e, 0x66, 0x65, 0x64, 0x65,
0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x0f, 0x46, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69,
0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x1d, 0x65, 0x78, 0x61, 0x6d, 0x70,
0x6c, 0x65, 0x2f, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x3b, 0x66, 0x65,
0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0xa2, 0x02, 0x03, 0x4f, 0x46, 0x58, 0xaa, 0x02,
0x0e, 0x4f, 0x72, 0x67, 0x2e, 0x46, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0xca,
0x02, 0x0e, 0x4f, 0x72, 0x67, 0x5c, 0x46, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e,
0xe2, 0x02, 0x1a, 0x4f, 0x72, 0x67, 0x5c, 0x46, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f,
0x6e, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0f,
0x4f, 0x72, 0x67, 0x3a, 0x3a, 0x46, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x62,
0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_federation_federation_proto_rawDescOnce sync.Once
file_federation_federation_proto_rawDescData = file_federation_federation_proto_rawDesc
)
func file_federation_federation_proto_rawDescGZIP() []byte {
file_federation_federation_proto_rawDescOnce.Do(func() {
file_federation_federation_proto_rawDescData = protoimpl.X.CompressGZIP(file_federation_federation_proto_rawDescData)
})
return file_federation_federation_proto_rawDescData
}
var file_federation_federation_proto_msgTypes = make([]protoimpl.MessageInfo, 4)
var file_federation_federation_proto_goTypes = []interface{}{
(*GetPostRequest)(nil), // 0: org.federation.GetPostRequest
(*GetPostResponse)(nil), // 1: org.federation.GetPostResponse
(*Post)(nil), // 2: org.federation.Post
(*User)(nil), // 3: org.federation.User
}
var file_federation_federation_proto_depIdxs = []int32{
2, // 0: org.federation.GetPostResponse.post:type_name -> org.federation.Post
3, // 1: org.federation.Post.user:type_name -> org.federation.User
0, // 2: org.federation.FederationService.GetPost:input_type -> org.federation.GetPostRequest
1, // 3: org.federation.FederationService.GetPost:output_type -> org.federation.GetPostResponse
3, // [3:4] is the sub-list for method output_type
2, // [2:3] is the sub-list for method input_type
2, // [2:2] is the sub-list for extension type_name
2, // [2:2] is the sub-list for extension extendee
0, // [0:2] is the sub-list for field type_name
}
func init() { file_federation_federation_proto_init() }
func file_federation_federation_proto_init() {
if File_federation_federation_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_federation_federation_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetPostRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_federation_federation_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetPostResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_federation_federation_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Post); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_federation_federation_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*User); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_federation_federation_proto_rawDesc,
NumEnums: 0,
NumMessages: 4,
NumExtensions: 0,
NumServices: 1,
},
GoTypes: file_federation_federation_proto_goTypes,
DependencyIndexes: file_federation_federation_proto_depIdxs,
MessageInfos: file_federation_federation_proto_msgTypes,
}.Build()
File_federation_federation_proto = out.File
file_federation_federation_proto_rawDesc = nil
file_federation_federation_proto_goTypes = nil
file_federation_federation_proto_depIdxs = nil
}
================================================
FILE: _examples/14_condition/federation/federation_grpc.pb.go
================================================
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.3.0
// - protoc (unknown)
// source: federation/federation.proto
package federation
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 (
FederationService_GetPost_FullMethodName = "/org.federation.FederationService/GetPost"
)
// FederationServiceClient is the client API for FederationService 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 FederationServiceClient interface {
GetPost(ctx context.Context, in *GetPostRequest, opts ...grpc.CallOption) (*GetPostResponse, error)
}
type federationServiceClient struct {
cc grpc.ClientConnInterface
}
func NewFederationServiceClient(cc grpc.ClientConnInterface) FederationServiceClient {
return &federationServiceClient{cc}
}
func (c *federationServiceClient) GetPost(ctx context.Context, in *GetPostRequest, opts ...grpc.CallOption) (*GetPostResponse, error) {
out := new(GetPostResponse)
err := c.cc.Invoke(ctx, FederationService_GetPost_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// FederationServiceServer is the server API for FederationService service.
// All implementations must embed UnimplementedFederationServiceServer
// for forward compatibility
type FederationServiceServer interface {
GetPost(context.Context, *GetPostRequest) (*GetPostResponse, error)
mustEmbedUnimplementedFederationServiceServer()
}
// UnimplementedFederationServiceServer must be embedded to have forward compatible implementations.
type UnimplementedFederationServiceServer struct {
}
func (UnimplementedFederationServiceServer) GetPost(context.Context, *GetPostRequest) (*GetPostResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetPost not implemented")
}
func (UnimplementedFederationServiceServer) mustEmbedUnimplementedFederationServiceServer() {}
// UnsafeFederationServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to FederationServiceServer will
// result in compilation errors.
type UnsafeFederationServiceServer interface {
mustEmbedUnimplementedFederationServiceServer()
}
func RegisterFederationServiceServer(s grpc.ServiceRegistrar, srv FederationServiceServer) {
s.RegisterService(&FederationService_ServiceDesc, srv)
}
func _FederationService_GetPost_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetPostRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(FederationServiceServer).GetPost(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: FederationService_GetPost_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(FederationServiceServer).GetPost(ctx, req.(*GetPostRequest))
}
return interceptor(ctx, in, info, handler)
}
// FederationService_ServiceDesc is the grpc.ServiceDesc for FederationService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var FederationService_ServiceDesc = grpc.ServiceDesc{
ServiceName: "org.federation.FederationService",
HandlerType: (*FederationServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "GetPost",
Handler: _FederationService_GetPost_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "federation/federation.proto",
}
================================================
FILE: _examples/14_condition/federation/federation_grpc_federation.pb.go
================================================
// Code generated by protoc-gen-grpc-federation. DO NOT EDIT!
// versions:
//
// protoc-gen-grpc-federation: (devel)
//
// source: federation/federation.proto
package federation
import (
"context"
"io"
"log/slog"
"reflect"
grpcfed "github.com/mercari/grpc-federation/grpc/federation"
grpcfedcel "github.com/mercari/grpc-federation/grpc/federation/cel"
"go.opentelemetry.io/otel"
"go.opentelemetry.io/otel/trace"
post "example/post"
)
var (
_ = reflect.Invalid // to avoid "imported and not used error"
)
// Org_Federation_GetPostResponseVariable represents variable definitions in "org.federation.GetPostResponse".
type FederationService_Org_Federation_GetPostResponseVariable struct {
Post *Post
}
// Org_Federation_GetPostResponseArgument is argument for "org.federation.GetPostResponse" message.
type FederationService_Org_Federation_GetPostResponseArgument struct {
Id string
FederationService_Org_Federation_GetPostResponseVariable
}
// Org_Federation_PostVariable represents variable definitions in "org.federation.Post".
type FederationService_Org_Federation_PostVariable struct {
Post *post.Post
Posts []*post.Post
Res *post.GetPostResponse
User *User
Users []*User
}
// Org_Federation_PostArgument is argument for "org.federation.Post" message.
type FederationService_Org_Federation_PostArgument struct {
Id string
FederationService_Org_Federation_PostVariable
}
// Org_Federation_UserVariable represents variable definitions in "org.federation.User".
type FederationService_Org_Federation_UserVariable struct {
}
// Org_Federation_UserArgument is argument for "org.federation.User" message.
type FederationService_Org_Federation_UserArgument struct {
UserId string
FederationService_Org_Federation_UserVariable
}
// FederationServiceConfig configuration required to initialize the service that use GRPC Federation.
type FederationServiceConfig struct {
// Client provides a factory that creates the gRPC Client needed to invoke methods of the gRPC Service on which the Federation Service depends.
// If this interface is not provided, an error is returned during initialization.
Client FederationServiceClientFactory // required
// ErrorHandler Federation Service often needs to convert errors received from downstream services.
// If an error occurs during method execution in the Federation Service, this error handler is called and the returned error is treated as a final error.
ErrorHandler grpcfed.ErrorHandler
// Logger sets the logger used to output Debug/Info/Error information.
Logger *slog.Logger
}
// FederationServiceClientFactory provides a factory that creates the gRPC Client needed to invoke methods of the gRPC Service on which the Federation Service depends.
type FederationServiceClientFactory interface {
// Post_PostServiceClient create a gRPC Client to be used to call methods in post.PostService.
Post_PostServiceClient(FederationServiceClientConfig) (post.PostServiceClient, error)
}
// FederationServiceClientConfig helper to create gRPC client.
// Hints for creating a gRPC Client.
type FederationServiceClientConfig struct {
// Service FQDN ( `.` ) of the service on Protocol Buffers.
Service string
}
// FederationServiceDependentClientSet has a gRPC client for all services on which the federation service depends.
// This is provided as an argument when implementing the custom resolver.
type FederationServiceDependentClientSet struct {
Post_PostServiceClient post.PostServiceClient
}
// FederationServiceResolver provides an interface to directly implement message resolver and field resolver not defined in Protocol Buffers.
type FederationServiceResolver interface {
}
// FederationServiceCELPluginWasmConfig type alias for grpcfedcel.WasmConfig.
type FederationServiceCELPluginWasmConfig = grpcfedcel.WasmConfig
// FederationServiceCELPluginConfig hints for loading a WebAssembly based plugin.
type FederationServiceCELPluginConfig struct {
CacheDir string
}
// FederationServiceUnimplementedResolver a structure implemented to satisfy the Resolver interface.
// An Unimplemented error is always returned.
// This is intended for use when there are many Resolver interfaces that do not need to be implemented,
// by embedding them in a resolver structure that you have created.
type FederationServiceUnimplementedResolver struct{}
const (
FederationService_DependentMethod_Post_PostService_GetPost = "/post.PostService/GetPost"
)
// FederationService represents Federation Service.
type FederationService struct {
UnimplementedFederationServiceServer
cfg FederationServiceConfig
logger *slog.Logger
isLogLevelDebug bool
errorHandler grpcfed.ErrorHandler
celCacheMap *grpcfed.CELCacheMap
tracer trace.Tracer
celTypeHelper *grpcfed.CELTypeHelper
celEnvOpts []grpcfed.CELEnvOption
celPlugins []*grpcfedcel.CELPlugin
client *FederationServiceDependentClientSet
}
// NewFederationService creates FederationService instance by FederationServiceConfig.
func NewFederationService(cfg FederationServiceConfig) (*FederationService, error) {
if cfg.Client == nil {
return nil, grpcfed.ErrClientConfig
}
Post_PostServiceClient, err := cfg.Client.Post_PostServiceClient(FederationServiceClientConfig{
Service: "post.PostService",
})
if err != nil {
return nil, err
}
logger := cfg.Logger
if logger == nil {
logger = slog.New(slog.NewJSONHandler(io.Discard, nil))
}
tracer := otel.Tracer("org.federation.FederationService")
ctx := grpcfed.WithLogger(context.Background(), logger)
ctx = grpcfed.WithTracer(ctx, tracer)
errorHandler := cfg.ErrorHandler
if errorHandler == nil {
errorHandler = func(ctx context.Context, methodName string, err error) error { return err }
}
celTypeHelperFieldMap := grpcfed.CELTypeHelperFieldMap{
"grpc.federation.private.org.federation.GetPostResponseArgument": {
"id": grpcfed.NewCELFieldType(grpcfed.CELStringType, "Id"),
},
"grpc.federation.private.org.federation.PostArgument": {
"id": grpcfed.NewCELFieldType(grpcfed.CELStringType, "Id"),
},
"grpc.federation.private.org.federation.UserArgument": {
"user_id": grpcfed.NewCELFieldType(grpcfed.CELStringType, "UserId"),
},
}
celTypeHelper := grpcfed.NewCELTypeHelper("org.federation", celTypeHelperFieldMap)
var celEnvOpts []grpcfed.CELEnvOption
celEnvOpts = append(celEnvOpts, grpcfed.NewDefaultEnvOptions(celTypeHelper)...)
celEnvOpts = append(celEnvOpts, grpcfed.GRPCErrorAccessorOptions(celTypeHelper, "post.GetPostResponse")...)
svc := &FederationService{
cfg: cfg,
logger: logger,
isLogLevelDebug: logger.Enabled(context.Background(), slog.LevelDebug),
errorHandler: errorHandler,
celEnvOpts: celEnvOpts,
celTypeHelper: celTypeHelper,
celCacheMap: grpcfed.NewCELCacheMap(),
tracer: tracer,
client: &FederationServiceDependentClientSet{
Post_PostServiceClient: Post_PostServiceClient,
},
}
return svc, nil
}
// CleanupFederationService cleanup all resources to prevent goroutine leaks.
func CleanupFederationService(ctx context.Context, svc *FederationService) {
svc.cleanup(ctx)
}
func (s *FederationService) cleanup(ctx context.Context) {
for _, plugin := range s.celPlugins {
plugin.Close()
}
}
// GetPost implements "org.federation.FederationService/GetPost" method.
func (s *FederationService) GetPost(ctx context.Context, req *GetPostRequest) (res *GetPostResponse, e error) {
ctx, span := s.tracer.Start(ctx, "org.federation.FederationService/GetPost")
defer span.End()
ctx = grpcfed.WithLogger(ctx, s.logger)
ctx = grpcfed.WithCELCacheMap(ctx, s.celCacheMap)
defer func() {
if r := recover(); r != nil {
e = grpcfed.RecoverError(r, grpcfed.StackTrace())
grpcfed.OutputErrorLog(ctx, e)
}
}()
defer func() {
for _, celPlugin := range s.celPlugins {
celPlugin.Cleanup()
}
}()
res, err := s.resolve_Org_Federation_GetPostResponse(ctx, &FederationService_Org_Federation_GetPostResponseArgument{
Id: req.GetId(),
})
if err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
grpcfed.OutputErrorLog(ctx, err)
return nil, err
}
return res, nil
}
// resolve_Org_Federation_GetPostResponse resolve "org.federation.GetPostResponse" message.
func (s *FederationService) resolve_Org_Federation_GetPostResponse(ctx context.Context, req *FederationService_Org_Federation_GetPostResponseArgument) (*GetPostResponse, error) {
ctx, span := s.tracer.Start(ctx, "org.federation.GetPostResponse")
defer span.End()
ctx = grpcfed.WithLogger(ctx, grpcfed.Logger(ctx), grpcfed.LogAttrs(ctx)...)
grpcfed.Logger(ctx).DebugContext(ctx, "resolve org.federation.GetPostResponse", slog.Any("message_args", s.logvalue_Org_Federation_GetPostResponseArgument(req)))
type localValueType struct {
*grpcfed.LocalValue
vars struct {
Post *Post
}
}
value := &localValueType{LocalValue: grpcfed.NewLocalValue(ctx, s.celEnvOpts, "grpc.federation.private.org.federation.GetPostResponseArgument", req)}
ctx = grpcfed.WithLocalValue(ctx, value.LocalValue)
/*
def {
name: "post"
message {
name: "Post"
args { name: "id", by: "$.id" }
}
}
*/
def_post := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[*Post, *localValueType]{
Name: `post`,
Type: grpcfed.CELObjectType("org.federation.Post"),
Setter: func(value *localValueType, v *Post) error {
value.vars.Post = v
return nil
},
Message: func(ctx context.Context, value *localValueType) (any, error) {
args := &FederationService_Org_Federation_PostArgument{}
// { name: "id", by: "$.id" }
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[string]{
Value: value,
Expr: `$.id`,
CacheIndex: 1,
Setter: func(v string) error {
args.Id = v
return nil
},
}); err != nil {
return nil, err
}
ret, err := s.resolve_Org_Federation_Post(ctx, args)
if err != nil {
return nil, err
}
return ret, nil
},
})
}
if err := def_post(ctx); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
// assign named parameters to message arguments to pass to the custom resolver.
req.FederationService_Org_Federation_GetPostResponseVariable.Post = value.vars.Post
// create a message value to be returned.
ret := &GetPostResponse{}
// field binding section.
// (grpc.federation.field).by = "post"
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[*Post]{
Value: value,
Expr: `post`,
CacheIndex: 2,
Setter: func(v *Post) error {
ret.Post = v
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
grpcfed.Logger(ctx).DebugContext(ctx, "resolved org.federation.GetPostResponse", slog.Any("org.federation.GetPostResponse", s.logvalue_Org_Federation_GetPostResponse(ret)))
return ret, nil
}
// resolve_Org_Federation_Post resolve "org.federation.Post" message.
func (s *FederationService) resolve_Org_Federation_Post(ctx context.Context, req *FederationService_Org_Federation_PostArgument) (*Post, error) {
ctx, span := s.tracer.Start(ctx, "org.federation.Post")
defer span.End()
ctx = grpcfed.WithLogger(ctx, grpcfed.Logger(ctx), grpcfed.LogAttrs(ctx)...)
grpcfed.Logger(ctx).DebugContext(ctx, "resolve org.federation.Post", slog.Any("message_args", s.logvalue_Org_Federation_PostArgument(req)))
type localValueType struct {
*grpcfed.LocalValue
vars struct {
Post *post.Post
Posts []*post.Post
Res *post.GetPostResponse
User *User
Users []*User
XDef5 bool
}
}
value := &localValueType{LocalValue: grpcfed.NewLocalValue(ctx, s.celEnvOpts, "grpc.federation.private.org.federation.PostArgument", req)}
ctx = grpcfed.WithLocalValue(ctx, value.LocalValue)
/*
def {
name: "res"
if: "$.id != ''"
call {
method: "post.PostService/GetPost"
request { field: "id", by: "$.id" }
}
}
*/
def_res := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[*post.GetPostResponse, *localValueType]{
If: `$.id != ''`,
IfCacheIndex: 3,
Name: `res`,
Type: grpcfed.CELObjectType("post.GetPostResponse"),
Setter: func(value *localValueType, v *post.GetPostResponse) error {
value.vars.Res = v
return nil
},
Message: func(ctx context.Context, value *localValueType) (any, error) {
args := &post.GetPostRequest{}
// { field: "id", by: "$.id" }
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[string]{
Value: value,
Expr: `$.id`,
CacheIndex: 4,
Setter: func(v string) error {
args.Id = v
return nil
},
}); err != nil {
return nil, err
}
grpcfed.Logger(ctx).DebugContext(ctx, "call post.PostService/GetPost", slog.Any("post.GetPostRequest", s.logvalue_Post_GetPostRequest(args)))
ret, err := s.client.Post_PostServiceClient.GetPost(ctx, args)
if err != nil {
if err := s.errorHandler(ctx, FederationService_DependentMethod_Post_PostService_GetPost, err); err != nil {
return nil, grpcfed.NewErrorWithLogAttrs(err, slog.LevelError, grpcfed.LogAttrs(ctx))
}
}
return ret, nil
},
})
}
/*
def {
name: "post"
if: "res != null"
by: "res.post"
}
*/
def_post := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[*post.Post, *localValueType]{
If: `res != null`,
IfCacheIndex: 5,
Name: `post`,
Type: grpcfed.CELObjectType("post.Post"),
Setter: func(value *localValueType, v *post.Post) error {
value.vars.Post = v
return nil
},
By: `res.post`,
ByCacheIndex: 6,
})
}
/*
def {
name: "user"
if: "post != null"
message {
name: "User"
args { name: "user_id", by: "post.user_id" }
}
}
*/
def_user := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[*User, *localValueType]{
If: `post != null`,
IfCacheIndex: 7,
Name: `user`,
Type: grpcfed.CELObjectType("org.federation.User"),
Setter: func(value *localValueType, v *User) error {
value.vars.User = v
return nil
},
Message: func(ctx context.Context, value *localValueType) (any, error) {
args := &FederationService_Org_Federation_UserArgument{}
// { name: "user_id", by: "post.user_id" }
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[string]{
Value: value,
Expr: `post.user_id`,
CacheIndex: 8,
Setter: func(v string) error {
args.UserId = v
return nil
},
}); err != nil {
return nil, err
}
ret, err := s.resolve_Org_Federation_User(ctx, args)
if err != nil {
return nil, err
}
return ret, nil
},
})
}
/*
def {
name: "posts"
by: "[post]"
}
*/
def_posts := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[[]*post.Post, *localValueType]{
Name: `posts`,
Type: grpcfed.CELListType(grpcfed.CELObjectType("post.Post")),
Setter: func(value *localValueType, v []*post.Post) error {
value.vars.Posts = v
return nil
},
By: `[post]`,
ByCacheIndex: 9,
})
}
/*
def {
name: "users"
if: "user != null"
map {
iterator {
name: "iter"
src: "posts"
}
message {
name: "User"
args { name: "user_id", by: "iter.user_id" }
}
}
}
*/
def_users := func(ctx context.Context) error {
return grpcfed.EvalDefMap(ctx, value, grpcfed.DefMap[[]*User, *post.Post, *localValueType]{
If: `user != null`,
IfCacheIndex: 10,
Name: `users`,
Type: grpcfed.CELListType(grpcfed.CELObjectType("org.federation.User")),
Setter: func(value *localValueType, v []*User) error {
value.vars.Users = v
return nil
},
IteratorName: `iter`,
IteratorType: grpcfed.CELObjectType("post.Post"),
IteratorSource: func(value *localValueType) []*post.Post { return value.vars.Posts },
Iterator: func(ctx context.Context, value *grpcfed.MapIteratorValue) (any, error) {
args := &FederationService_Org_Federation_UserArgument{}
// { name: "user_id", by: "iter.user_id" }
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[string]{
Value: value,
Expr: `iter.user_id`,
CacheIndex: 11,
Setter: func(v string) error {
args.UserId = v
return nil
},
}); err != nil {
return nil, err
}
return s.resolve_Org_Federation_User(ctx, args)
},
})
}
/*
def {
name: "_def5"
if: "users.size() > 0"
validation {
error {
code: INVALID_ARGUMENT
if: "users[0].id == ''"
}
}
}
*/
def__def5 := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[bool, *localValueType]{
If: `users.size() > 0`,
IfCacheIndex: 12,
Name: `_def5`,
Type: grpcfed.CELBoolType,
Setter: func(value *localValueType, v bool) error {
value.vars.XDef5 = v
return nil
},
Validation: func(ctx context.Context, value *localValueType) error {
var stat *grpcfed.Status
if err := grpcfed.If(ctx, &grpcfed.IfParam[*localValueType]{
Value: value,
Expr: `users[0].id == ''`,
CacheIndex: 13,
Body: func(value *localValueType) error {
errorMessage := "error"
stat = grpcfed.NewGRPCStatus(grpcfed.InvalidArgumentCode, errorMessage)
return nil
},
}); err != nil {
return err
}
return grpcfed.NewErrorWithLogAttrs(stat.Err(), slog.LevelError, grpcfed.LogAttrs(ctx))
},
})
}
eg, ctx1 := grpcfed.ErrorGroupWithContext(ctx)
grpcfed.GoWithRecover(eg, func() (any, error) {
if err := def_res(ctx1); err != nil {
grpcfed.RecordErrorToSpan(ctx1, err)
return nil, err
}
if err := def_post(ctx1); err != nil {
grpcfed.RecordErrorToSpan(ctx1, err)
return nil, err
}
if err := def_posts(ctx1); err != nil {
grpcfed.RecordErrorToSpan(ctx1, err)
return nil, err
}
return nil, nil
})
grpcfed.GoWithRecover(eg, func() (any, error) {
if err := def_res(ctx1); err != nil {
grpcfed.RecordErrorToSpan(ctx1, err)
return nil, err
}
if err := def_post(ctx1); err != nil {
grpcfed.RecordErrorToSpan(ctx1, err)
return nil, err
}
if err := def_user(ctx1); err != nil {
grpcfed.RecordErrorToSpan(ctx1, err)
return nil, err
}
return nil, nil
})
if err := eg.Wait(); err != nil {
return nil, err
}
if err := def_users(ctx); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
if err := def__def5(ctx); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
// assign named parameters to message arguments to pass to the custom resolver.
req.FederationService_Org_Federation_PostVariable.Post = value.vars.Post
req.FederationService_Org_Federation_PostVariable.Posts = value.vars.Posts
req.FederationService_Org_Federation_PostVariable.Res = value.vars.Res
req.FederationService_Org_Federation_PostVariable.User = value.vars.User
req.FederationService_Org_Federation_PostVariable.Users = value.vars.Users
// create a message value to be returned.
ret := &Post{}
// field binding section.
// (grpc.federation.field).by = "post.id"
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[string]{
Value: value,
Expr: `post.id`,
CacheIndex: 14,
Setter: func(v string) error {
ret.Id = v
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
// (grpc.federation.field).by = "post.title"
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[string]{
Value: value,
Expr: `post.title`,
CacheIndex: 15,
Setter: func(v string) error {
ret.Title = v
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
// (grpc.federation.field).by = "users[0]"
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[*User]{
Value: value,
Expr: `users[0]`,
CacheIndex: 16,
Setter: func(v *User) error {
ret.User = v
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
grpcfed.Logger(ctx).DebugContext(ctx, "resolved org.federation.Post", slog.Any("org.federation.Post", s.logvalue_Org_Federation_Post(ret)))
return ret, nil
}
// resolve_Org_Federation_User resolve "org.federation.User" message.
func (s *FederationService) resolve_Org_Federation_User(ctx context.Context, req *FederationService_Org_Federation_UserArgument) (*User, error) {
ctx, span := s.tracer.Start(ctx, "org.federation.User")
defer span.End()
ctx = grpcfed.WithLogger(ctx, grpcfed.Logger(ctx), grpcfed.LogAttrs(ctx)...)
grpcfed.Logger(ctx).DebugContext(ctx, "resolve org.federation.User", slog.Any("message_args", s.logvalue_Org_Federation_UserArgument(req)))
type localValueType struct {
*grpcfed.LocalValue
vars struct {
}
}
value := &localValueType{LocalValue: grpcfed.NewLocalValue(ctx, s.celEnvOpts, "grpc.federation.private.org.federation.UserArgument", req)}
ctx = grpcfed.WithLocalValue(ctx, value.LocalValue)
// create a message value to be returned.
ret := &User{}
// field binding section.
// (grpc.federation.field).by = "$.user_id"
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[string]{
Value: value,
Expr: `$.user_id`,
CacheIndex: 17,
Setter: func(v string) error {
ret.Id = v
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
grpcfed.Logger(ctx).DebugContext(ctx, "resolved org.federation.User", slog.Any("org.federation.User", s.logvalue_Org_Federation_User(ret)))
return ret, nil
}
func (s *FederationService) logvalue_Org_Federation_GetPostResponse(v *GetPostResponse) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.Any("post", s.logvalue_Org_Federation_Post(v.GetPost())),
)
}
func (s *FederationService) logvalue_Org_Federation_GetPostResponseArgument(v *FederationService_Org_Federation_GetPostResponseArgument) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.String("id", v.Id),
)
}
func (s *FederationService) logvalue_Org_Federation_Post(v *Post) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.String("id", v.GetId()),
slog.String("title", v.GetTitle()),
slog.Any("user", s.logvalue_Org_Federation_User(v.GetUser())),
)
}
func (s *FederationService) logvalue_Org_Federation_PostArgument(v *FederationService_Org_Federation_PostArgument) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.String("id", v.Id),
)
}
func (s *FederationService) logvalue_Org_Federation_User(v *User) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.String("id", v.GetId()),
)
}
func (s *FederationService) logvalue_Org_Federation_UserArgument(v *FederationService_Org_Federation_UserArgument) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.String("user_id", v.UserId),
)
}
func (s *FederationService) logvalue_Post_GetPostRequest(v *post.GetPostRequest) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.String("id", v.GetId()),
)
}
func (s *FederationService) logvalue_Post_GetPostsRequest(v *post.GetPostsRequest) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.Any("ids", v.GetIds()),
)
}
================================================
FILE: _examples/14_condition/go.mod
================================================
module example
go 1.24.0
replace github.com/mercari/grpc-federation => ../../
require (
github.com/google/go-cmp v0.7.0
github.com/mercari/grpc-federation v0.0.0-00010101000000-000000000000
go.opentelemetry.io/otel v1.24.0
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.21.0
go.opentelemetry.io/otel/sdk v1.24.0
go.opentelemetry.io/otel/trace v1.24.0
go.uber.org/goleak v1.3.0
google.golang.org/genproto/googleapis/rpc v0.0.0-20240826202546-f6391c0de4c7
google.golang.org/grpc v1.65.0
google.golang.org/protobuf v1.34.2
)
require (
cel.dev/expr v0.19.1 // indirect
github.com/antlr4-go/antlr/v4 v4.13.0 // indirect
github.com/cenkalti/backoff/v4 v4.2.1 // indirect
github.com/go-logr/logr v1.4.1 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
github.com/goccy/wasi-go v0.3.2 // indirect
github.com/google/cel-go v0.23.1 // indirect
github.com/google/uuid v1.6.0 // indirect
github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0 // indirect
github.com/kelseyhightower/envconfig v1.4.0 // indirect
github.com/stealthrocket/wazergo v0.19.1 // indirect
github.com/stoewer/go-strcase v1.3.0 // indirect
github.com/tetratelabs/wazero v1.10.1 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.21.0 // indirect
go.opentelemetry.io/otel/metric v1.24.0 // indirect
go.opentelemetry.io/proto/otlp v1.0.0 // indirect
golang.org/x/exp v0.0.0-20250506013437-ce4c2cf36ca6 // indirect
golang.org/x/net v0.38.0 // indirect
golang.org/x/sync v0.14.0 // indirect
golang.org/x/sys v0.37.0 // indirect
golang.org/x/text v0.23.0 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20240826202546-f6391c0de4c7 // indirect
)
================================================
FILE: _examples/14_condition/go.sum
================================================
cel.dev/expr v0.19.1 h1:NciYrtDRIR0lNCnH1LFJegdjspNx9fI59O7TWcua/W4=
cel.dev/expr v0.19.1/go.mod h1:MrpN08Q+lEBs+bGYdLxxHkZoUSsCp0nSKTs0nTymJgw=
github.com/antlr4-go/antlr/v4 v4.13.0 h1:lxCg3LAv+EUK6t1i0y1V6/SLeUi0eKEKdhQAlS8TVTI=
github.com/antlr4-go/antlr/v4 v4.13.0/go.mod h1:pfChB/xh/Unjila75QW7+VU4TSnWnnk9UTnmpPaOR2g=
github.com/cenkalti/backoff/v4 v4.2.1 h1:y4OZtCnogmCPw98Zjyt5a6+QwPLGkiQsYW5oUqylYbM=
github.com/cenkalti/backoff/v4 v4.2.1/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A=
github.com/go-logr/logr v1.4.1 h1:pKouT5E8xu9zeFC39JXRDukb6JFQPXM5p5I91188VAQ=
github.com/go-logr/logr v1.4.1/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY=
github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag=
github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE=
github.com/goccy/wasi-go v0.3.2 h1:wAvGXmqCkfcp0B0AwIp5Ya53hzDwkKm9W8iuT3nCCz0=
github.com/goccy/wasi-go v0.3.2/go.mod h1:nIKD204n9xa4Z20UV+XA483kIr9TAl2vXr+X5qVAO5M=
github.com/golang/glog v1.2.1 h1:OptwRhECazUx5ix5TTWC3EZhsZEHWcYWY4FQHTIubm4=
github.com/golang/glog v1.2.1/go.mod h1:6AhwSGph0fcJtXVM/PEHPqZlFeoLxhs7/t5UDAwmO+w=
github.com/google/cel-go v0.23.1 h1:91ThhEZlBcE5rB2adBVXqvDoqdL8BG2oyhd0bK1I/r4=
github.com/google/cel-go v0.23.1/go.mod h1:52Pb6QsDbC5kvgxvZhiL9QX1oZEkcUF/ZqaPx1J5Wwo=
github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8=
github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU=
github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0 h1:YBftPWNWd4WwGqtY2yeZL2ef8rHAxPBD8KFhJpmcqms=
github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0/go.mod h1:YN5jB8ie0yfIUg6VvR9Kz84aCaG7AsGZnLjhHbUqwPg=
github.com/kelseyhightower/envconfig v1.4.0 h1:Im6hONhd3pLkfDFsbRgu68RDNkGF1r3dvMUtDTo2cv8=
github.com/kelseyhightower/envconfig v1.4.0/go.mod h1:cccZRl6mQpaq41TPp5QxidR+Sa3axMbJDNb//FQX6Gg=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/stealthrocket/wazergo v0.19.1 h1:BPrITETPgSFwiytwmToO0MbUC/+RGC39JScz1JmmG6c=
github.com/stealthrocket/wazergo v0.19.1/go.mod h1:riI0hxw4ndZA5e6z7PesHg2BtTftcZaMxRcoiGGipTs=
github.com/stoewer/go-strcase v1.3.0 h1:g0eASXYtp+yvN9fK8sH94oCIk0fau9uV1/ZdJ0AVEzs=
github.com/stoewer/go-strcase v1.3.0/go.mod h1:fAH5hQ5pehh+j3nZfvwdk2RgEgQjAoM8wodgtPmh1xo=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=
github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo=
github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk=
github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
github.com/tetratelabs/wazero v1.10.1 h1:2DugeJf6VVk58KTPszlNfeeN8AhhpwcZqkJj2wwFuH8=
github.com/tetratelabs/wazero v1.10.1/go.mod h1:DRm5twOQ5Gr1AoEdSi0CLjDQF1J9ZAuyqFIjl1KKfQU=
go.opentelemetry.io/otel v1.24.0 h1:0LAOdjNmQeSTzGBzduGe/rU4tZhMwL5rWgtp9Ku5Jfo=
go.opentelemetry.io/otel v1.24.0/go.mod h1:W7b9Ozg4nkF5tWI5zsXkaKKDjdVjpD4oAt9Qi/MArHo=
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.21.0 h1:cl5P5/GIfFh4t6xyruOgJP5QiA1pw4fYYdv6nc6CBWw=
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.21.0/go.mod h1:zgBdWWAu7oEEMC06MMKc5NLbA/1YDXV1sMpSqEeLQLg=
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.21.0 h1:tIqheXEFWAZ7O8A7m+J0aPTmpJN3YQ7qetUAdkkkKpk=
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.21.0/go.mod h1:nUeKExfxAQVbiVFn32YXpXZZHZ61Cc3s3Rn1pDBGAb0=
go.opentelemetry.io/otel/metric v1.24.0 h1:6EhoGWWK28x1fbpA4tYTOWBkPefTDQnb8WSGXlc88kI=
go.opentelemetry.io/otel/metric v1.24.0/go.mod h1:VYhLe1rFfxuTXLgj4CBiyz+9WYBA8pNGJgDcSFRKBco=
go.opentelemetry.io/otel/sdk v1.24.0 h1:YMPPDNymmQN3ZgczicBY3B6sf9n62Dlj9pWD3ucgoDw=
go.opentelemetry.io/otel/sdk v1.24.0/go.mod h1:KVrIYw6tEubO9E96HQpcmpTKDVn9gdv35HoYiQWGDFg=
go.opentelemetry.io/otel/trace v1.24.0 h1:CsKnnL4dUAr/0llH9FKuc698G04IrpWV0MQA/Y1YELI=
go.opentelemetry.io/otel/trace v1.24.0/go.mod h1:HPc3Xr/cOApsBI154IU0OI0HJexz+aw5uPdbs3UCjNU=
go.opentelemetry.io/proto/otlp v1.0.0 h1:T0TX0tmXU8a3CbNXzEKGeU5mIVOdf0oykP+u2lIVU/I=
go.opentelemetry.io/proto/otlp v1.0.0/go.mod h1:Sy6pihPLfYHkr3NkUbEhGHFhINUSI/v80hjKIs5JXpM=
go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto=
go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE=
golang.org/x/exp v0.0.0-20250506013437-ce4c2cf36ca6 h1:y5zboxd6LQAqYIhHnB48p0ByQ/GnQx2BE33L8BOHQkI=
golang.org/x/exp v0.0.0-20250506013437-ce4c2cf36ca6/go.mod h1:U6Lno4MTRCDY+Ba7aCcauB9T60gsv5s4ralQzP72ZoQ=
golang.org/x/net v0.38.0 h1:vRMAPTMaeGqVhG5QyLJHqNDwecKTomGeqbnfZyKlBI8=
golang.org/x/net v0.38.0/go.mod h1:ivrbrMbzFq5J41QOQh0siUuly180yBYtLp+CKbEaFx8=
golang.org/x/sync v0.14.0 h1:woo0S4Yywslg6hp4eUFjTVOyKt0RookbpAHG4c1HmhQ=
golang.org/x/sync v0.14.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA=
golang.org/x/sys v0.37.0 h1:fdNQudmxPjkdUTPnLn5mdQv7Zwvbvpaxqs831goi9kQ=
golang.org/x/sys v0.37.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks=
golang.org/x/text v0.23.0 h1:D71I7dUrlY+VX0gQShAThNGHFxZ13dGLBHQLVl1mJlY=
golang.org/x/text v0.23.0/go.mod h1:/BLNzu4aZCJ1+kcD0DNRotWKage4q2rGVAg4o22unh4=
google.golang.org/genproto/googleapis/api v0.0.0-20240826202546-f6391c0de4c7 h1:YcyjlL1PRr2Q17/I0dPk2JmYS5CDXfcdb2Z3YRioEbw=
google.golang.org/genproto/googleapis/api v0.0.0-20240826202546-f6391c0de4c7/go.mod h1:OCdP9MfskevB/rbYvHTsXTtKC+3bHWajPdoKgjcYkfo=
google.golang.org/genproto/googleapis/rpc v0.0.0-20240826202546-f6391c0de4c7 h1:2035KHhUv+EpyB+hWgJnaWKJOdX1E95w2S8Rr4uWKTs=
google.golang.org/genproto/googleapis/rpc v0.0.0-20240826202546-f6391c0de4c7/go.mod h1:UqMtugtsSgubUsoxbuAoiCXvqvErP7Gf0so0mK9tHxU=
google.golang.org/grpc v1.65.0 h1:bs/cUb4lp1G5iImFFd3u5ixQzweKizoZJAwBNLR42lc=
google.golang.org/grpc v1.65.0/go.mod h1:WgYC2ypjlB0EiQi6wdKixMqukr6lBc0Vo+oOgjrM5ZQ=
google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg=
google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
================================================
FILE: _examples/14_condition/grpc/federation/federation.pb.go
================================================
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.33.0
// protoc (unknown)
// source: grpc/federation/federation.proto
package federation
import (
_ "github.com/mercari/grpc-federation/grpc/federation/cel"
code "google.golang.org/genproto/googleapis/rpc/code"
errdetails "google.golang.org/genproto/googleapis/rpc/errdetails"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
descriptorpb "google.golang.org/protobuf/types/descriptorpb"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
// TypeKind is primitive kind list.
type TypeKind int32
const (
// UNKNOWN represents unexpected value.
TypeKind_UNKNOWN TypeKind = 0
// STRING is used to convert the input value to `string` type.
TypeKind_STRING TypeKind = 1
// BOOL is used to convert the input value to `bool` type.
TypeKind_BOOL TypeKind = 2
// INT64 is used to convert the input value to `int64` type.
TypeKind_INT64 TypeKind = 3
// UINT64 is used to convert the input value to `uint64` type.
TypeKind_UINT64 TypeKind = 4
// DOUBLE is used to convert the input value to `double` type.
TypeKind_DOUBLE TypeKind = 5
// DURATION is used to convert the input value to the `google.protobuf.Duration` type.
TypeKind_DURATION TypeKind = 6
)
// Enum value maps for TypeKind.
var (
TypeKind_name = map[int32]string{
0: "UNKNOWN",
1: "STRING",
2: "BOOL",
3: "INT64",
4: "UINT64",
5: "DOUBLE",
6: "DURATION",
}
TypeKind_value = map[string]int32{
"UNKNOWN": 0,
"STRING": 1,
"BOOL": 2,
"INT64": 3,
"UINT64": 4,
"DOUBLE": 5,
"DURATION": 6,
}
)
func (x TypeKind) Enum() *TypeKind {
p := new(TypeKind)
*p = x
return p
}
func (x TypeKind) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (TypeKind) Descriptor() protoreflect.EnumDescriptor {
return file_grpc_federation_federation_proto_enumTypes[0].Descriptor()
}
func (TypeKind) Type() protoreflect.EnumType {
return &file_grpc_federation_federation_proto_enumTypes[0]
}
func (x TypeKind) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use TypeKind.Descriptor instead.
func (TypeKind) EnumDescriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{0}
}
// LogLevel is the importance or severity of a log event.
type GRPCError_LogLevel int32
const (
// UNKNOWN represents unexpected value.
GRPCError_UNKNOWN GRPCError_LogLevel = 0
// DEBUG is used for detailed information that is useful during development and debugging.
GRPCError_DEBUG GRPCError_LogLevel = 1
// INFO logs are used to provide information about the normal functioning of the application.
GRPCError_INFO GRPCError_LogLevel = 2
// WARN signifies a potential problem or warning that does not necessarily stop the program from working but may lead to issues in the future.
GRPCError_WARN GRPCError_LogLevel = 3
// ERROR indicates a serious issue that has caused a failure in the application.
GRPCError_ERROR GRPCError_LogLevel = 4
)
// Enum value maps for GRPCError_LogLevel.
var (
GRPCError_LogLevel_name = map[int32]string{
0: "UNKNOWN",
1: "DEBUG",
2: "INFO",
3: "WARN",
4: "ERROR",
}
GRPCError_LogLevel_value = map[string]int32{
"UNKNOWN": 0,
"DEBUG": 1,
"INFO": 2,
"WARN": 3,
"ERROR": 4,
}
)
func (x GRPCError_LogLevel) Enum() *GRPCError_LogLevel {
p := new(GRPCError_LogLevel)
*p = x
return p
}
func (x GRPCError_LogLevel) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (GRPCError_LogLevel) Descriptor() protoreflect.EnumDescriptor {
return file_grpc_federation_federation_proto_enumTypes[1].Descriptor()
}
func (GRPCError_LogLevel) Type() protoreflect.EnumType {
return &file_grpc_federation_federation_proto_enumTypes[1]
}
func (x GRPCError_LogLevel) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use GRPCError_LogLevel.Descriptor instead.
func (GRPCError_LogLevel) EnumDescriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{24, 0}
}
type FileRule struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Plugin *CELPlugin `protobuf:"bytes,1,opt,name=plugin,proto3" json:"plugin,omitempty"`
// import can be used to resolve methods, messages, etc. that are referenced in gRPC Federation rules.
Import []string `protobuf:"bytes,2,rep,name=import,proto3" json:"import,omitempty"`
}
func (x *FileRule) Reset() {
*x = FileRule{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *FileRule) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*FileRule) ProtoMessage() {}
func (x *FileRule) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use FileRule.ProtoReflect.Descriptor instead.
func (*FileRule) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{0}
}
func (x *FileRule) GetPlugin() *CELPlugin {
if x != nil {
return x.Plugin
}
return nil
}
func (x *FileRule) GetImport() []string {
if x != nil {
return x.Import
}
return nil
}
type EnumRule struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// alias mapping between enums defined in other packages and enums defined on the federation service side.
// The alias is the FQDN ( . ) to the enum.
// If this definition exists, type conversion is automatically performed before the enum value assignment operation.
// If a enum with this option has a value that is not present in the enum specified by alias, and the alias option is not specified for that value, an error is occurred.
// You can specify multiple aliases. In that case, only values common to all aliases will be considered.
// Specifying a value that is not included in either alias will result in an error.
Alias []string `protobuf:"bytes,1,rep,name=alias,proto3" json:"alias,omitempty"`
}
func (x *EnumRule) Reset() {
*x = EnumRule{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *EnumRule) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*EnumRule) ProtoMessage() {}
func (x *EnumRule) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use EnumRule.ProtoReflect.Descriptor instead.
func (*EnumRule) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{1}
}
func (x *EnumRule) GetAlias() []string {
if x != nil {
return x.Alias
}
return nil
}
type EnumValueRule struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// specifies the default value of the enum.
// All values other than those specified in alias will be default values.
Default *bool `protobuf:"varint,1,opt,name=default,proto3,oneof" json:"default,omitempty"`
// alias can be used when alias is specified in grpc.federation.enum option,
// and specifies the value name to be referenced among the enums specified in alias of enum option.
// multiple value names can be specified for alias.
Alias []string `protobuf:"bytes,2,rep,name=alias,proto3" json:"alias,omitempty"`
// attr is used to hold multiple name-value pairs corresponding to an enum value.
// The values specified by the name must be consistently specified for all enum values.
// The values stored using this feature can be retrieved using the `attr()` method of the enum API.
Attr []*EnumValueAttribute `protobuf:"bytes,3,rep,name=attr,proto3" json:"attr,omitempty"`
// noalias exclude from the target of alias.
// This option cannot be specified simultaneously with `default` or `alias`.
Noalias *bool `protobuf:"varint,4,opt,name=noalias,proto3,oneof" json:"noalias,omitempty"`
}
func (x *EnumValueRule) Reset() {
*x = EnumValueRule{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *EnumValueRule) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*EnumValueRule) ProtoMessage() {}
func (x *EnumValueRule) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use EnumValueRule.ProtoReflect.Descriptor instead.
func (*EnumValueRule) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{2}
}
func (x *EnumValueRule) GetDefault() bool {
if x != nil && x.Default != nil {
return *x.Default
}
return false
}
func (x *EnumValueRule) GetAlias() []string {
if x != nil {
return x.Alias
}
return nil
}
func (x *EnumValueRule) GetAttr() []*EnumValueAttribute {
if x != nil {
return x.Attr
}
return nil
}
func (x *EnumValueRule) GetNoalias() bool {
if x != nil && x.Noalias != nil {
return *x.Noalias
}
return false
}
type EnumValueAttribute struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// name is the attribute key.
// This value is used to search for values using the `attr()` method.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// value represents the value corresponding to `name`.
Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
}
func (x *EnumValueAttribute) Reset() {
*x = EnumValueAttribute{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *EnumValueAttribute) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*EnumValueAttribute) ProtoMessage() {}
func (x *EnumValueAttribute) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[3]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use EnumValueAttribute.ProtoReflect.Descriptor instead.
func (*EnumValueAttribute) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{3}
}
func (x *EnumValueAttribute) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *EnumValueAttribute) GetValue() string {
if x != nil {
return x.Value
}
return ""
}
type OneofRule struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
}
func (x *OneofRule) Reset() {
*x = OneofRule{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *OneofRule) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*OneofRule) ProtoMessage() {}
func (x *OneofRule) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[4]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use OneofRule.ProtoReflect.Descriptor instead.
func (*OneofRule) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{4}
}
// ServiceRule define gRPC Federation rules for the service.
type ServiceRule struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// env defines the environment variable.
Env *Env `protobuf:"bytes,1,opt,name=env,proto3" json:"env,omitempty"`
// var defines the service-level variables.
Var []*ServiceVariable `protobuf:"bytes,2,rep,name=var,proto3" json:"var,omitempty"`
}
func (x *ServiceRule) Reset() {
*x = ServiceRule{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[5]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ServiceRule) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ServiceRule) ProtoMessage() {}
func (x *ServiceRule) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[5]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ServiceRule.ProtoReflect.Descriptor instead.
func (*ServiceRule) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{5}
}
func (x *ServiceRule) GetEnv() *Env {
if x != nil {
return x.Env
}
return nil
}
func (x *ServiceRule) GetVar() []*ServiceVariable {
if x != nil {
return x.Var
}
return nil
}
// Env is used when setting environment variables.
// There are two ways to configure it.
type Env struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// var is used to directly list environment variables.
Var []*EnvVar `protobuf:"bytes,1,rep,name=var,proto3" json:"var,omitempty"`
// message is used to reference an already defined Protocol Buffers' message for defining environment variables.
// If you want to set detailed options for the fields of the message, use the `env` option in FieldRule.
Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
}
func (x *Env) Reset() {
*x = Env{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[6]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Env) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Env) ProtoMessage() {}
func (x *Env) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[6]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Env.ProtoReflect.Descriptor instead.
func (*Env) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{6}
}
func (x *Env) GetVar() []*EnvVar {
if x != nil {
return x.Var
}
return nil
}
func (x *Env) GetMessage() string {
if x != nil {
return x.Message
}
return ""
}
// ServiceVariable define variables at the service level.
// This definition is executed at server startup, after the initialization of Env.
// The defined variables can be used across all messages that the service depends on.
type ServiceVariable struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// name is a variable name.
// This name can be referenced in all CELs related to the service by using `grpc.federation.var.` prefix.
Name *string `protobuf:"bytes,1,opt,name=name,proto3,oneof" json:"name,omitempty"`
// if specify the condition for evaluating expr.
// this value evaluated by CEL and it must return a boolean value.
// If the result of evaluation is `false`, the value assigned to name is the default value of the result of evaluation of `expr`.
If *string `protobuf:"bytes,2,opt,name=if,proto3,oneof" json:"if,omitempty"`
// expr specify the value to be assigned to name.
//
// Types that are assignable to Expr:
//
// *ServiceVariable_By
// *ServiceVariable_Map
// *ServiceVariable_Message
// *ServiceVariable_Validation
// *ServiceVariable_Enum
// *ServiceVariable_Switch
Expr isServiceVariable_Expr `protobuf_oneof:"expr"`
}
func (x *ServiceVariable) Reset() {
*x = ServiceVariable{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[7]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ServiceVariable) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ServiceVariable) ProtoMessage() {}
func (x *ServiceVariable) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[7]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ServiceVariable.ProtoReflect.Descriptor instead.
func (*ServiceVariable) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{7}
}
func (x *ServiceVariable) GetName() string {
if x != nil && x.Name != nil {
return *x.Name
}
return ""
}
func (x *ServiceVariable) GetIf() string {
if x != nil && x.If != nil {
return *x.If
}
return ""
}
func (m *ServiceVariable) GetExpr() isServiceVariable_Expr {
if m != nil {
return m.Expr
}
return nil
}
func (x *ServiceVariable) GetBy() string {
if x, ok := x.GetExpr().(*ServiceVariable_By); ok {
return x.By
}
return ""
}
func (x *ServiceVariable) GetMap() *MapExpr {
if x, ok := x.GetExpr().(*ServiceVariable_Map); ok {
return x.Map
}
return nil
}
func (x *ServiceVariable) GetMessage() *MessageExpr {
if x, ok := x.GetExpr().(*ServiceVariable_Message); ok {
return x.Message
}
return nil
}
func (x *ServiceVariable) GetValidation() *ServiceVariableValidationExpr {
if x, ok := x.GetExpr().(*ServiceVariable_Validation); ok {
return x.Validation
}
return nil
}
func (x *ServiceVariable) GetEnum() *EnumExpr {
if x, ok := x.GetExpr().(*ServiceVariable_Enum); ok {
return x.Enum
}
return nil
}
func (x *ServiceVariable) GetSwitch() *SwitchExpr {
if x, ok := x.GetExpr().(*ServiceVariable_Switch); ok {
return x.Switch
}
return nil
}
type isServiceVariable_Expr interface {
isServiceVariable_Expr()
}
type ServiceVariable_By struct {
// `by` evaluates with CEL.
By string `protobuf:"bytes,11,opt,name=by,proto3,oneof"`
}
type ServiceVariable_Map struct {
// map apply map operation for the specified repeated type.
Map *MapExpr `protobuf:"bytes,12,opt,name=map,proto3,oneof"`
}
type ServiceVariable_Message struct {
// message gets with message arguments.
Message *MessageExpr `protobuf:"bytes,13,opt,name=message,proto3,oneof"`
}
type ServiceVariable_Validation struct {
// validation defines the validation rule and message.
Validation *ServiceVariableValidationExpr `protobuf:"bytes,14,opt,name=validation,proto3,oneof"`
}
type ServiceVariable_Enum struct {
// enum gets with cel value.
Enum *EnumExpr `protobuf:"bytes,15,opt,name=enum,proto3,oneof"`
}
type ServiceVariable_Switch struct {
// switch provides conditional evaluation with multiple branches.
Switch *SwitchExpr `protobuf:"bytes,16,opt,name=switch,proto3,oneof"`
}
func (*ServiceVariable_By) isServiceVariable_Expr() {}
func (*ServiceVariable_Map) isServiceVariable_Expr() {}
func (*ServiceVariable_Message) isServiceVariable_Expr() {}
func (*ServiceVariable_Validation) isServiceVariable_Expr() {}
func (*ServiceVariable_Enum) isServiceVariable_Expr() {}
func (*ServiceVariable_Switch) isServiceVariable_Expr() {}
// ServiceVariableValidationExpr represents validation rule and error message.
type ServiceVariableValidationExpr struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// if specifies condition in CEL. If the condition is true, it returns error.
// The return value must always be of type boolean.
If string `protobuf:"bytes,1,opt,name=if,proto3" json:"if,omitempty"`
// message is a error message in CEL.
Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
}
func (x *ServiceVariableValidationExpr) Reset() {
*x = ServiceVariableValidationExpr{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[8]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ServiceVariableValidationExpr) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ServiceVariableValidationExpr) ProtoMessage() {}
func (x *ServiceVariableValidationExpr) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[8]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ServiceVariableValidationExpr.ProtoReflect.Descriptor instead.
func (*ServiceVariableValidationExpr) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{8}
}
func (x *ServiceVariableValidationExpr) GetIf() string {
if x != nil {
return x.If
}
return ""
}
func (x *ServiceVariableValidationExpr) GetMessage() string {
if x != nil {
return x.Message
}
return ""
}
// EnvVar represents an environment variable.
type EnvVar struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// name is an environment variable name.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// type is an environment variable type.
Type *EnvType `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"`
// option is an additional option for parsing environment variable.
Option *EnvVarOption `protobuf:"bytes,3,opt,name=option,proto3,oneof" json:"option,omitempty"`
}
func (x *EnvVar) Reset() {
*x = EnvVar{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[9]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *EnvVar) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*EnvVar) ProtoMessage() {}
func (x *EnvVar) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[9]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use EnvVar.ProtoReflect.Descriptor instead.
func (*EnvVar) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{9}
}
func (x *EnvVar) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *EnvVar) GetType() *EnvType {
if x != nil {
return x.Type
}
return nil
}
func (x *EnvVar) GetOption() *EnvVarOption {
if x != nil {
return x.Option
}
return nil
}
// EnvType represents type information for environment variable.
type EnvType struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Types that are assignable to Type:
//
// *EnvType_Kind
// *EnvType_Repeated
// *EnvType_Map
Type isEnvType_Type `protobuf_oneof:"type"`
}
func (x *EnvType) Reset() {
*x = EnvType{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[10]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *EnvType) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*EnvType) ProtoMessage() {}
func (x *EnvType) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[10]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use EnvType.ProtoReflect.Descriptor instead.
func (*EnvType) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{10}
}
func (m *EnvType) GetType() isEnvType_Type {
if m != nil {
return m.Type
}
return nil
}
func (x *EnvType) GetKind() TypeKind {
if x, ok := x.GetType().(*EnvType_Kind); ok {
return x.Kind
}
return TypeKind_UNKNOWN
}
func (x *EnvType) GetRepeated() *EnvType {
if x, ok := x.GetType().(*EnvType_Repeated); ok {
return x.Repeated
}
return nil
}
func (x *EnvType) GetMap() *EnvMapType {
if x, ok := x.GetType().(*EnvType_Map); ok {
return x.Map
}
return nil
}
type isEnvType_Type interface {
isEnvType_Type()
}
type EnvType_Kind struct {
// kind is used when the type is a primitive type.
Kind TypeKind `protobuf:"varint,1,opt,name=kind,proto3,enum=grpc.federation.TypeKind,oneof"`
}
type EnvType_Repeated struct {
// repeated is used when the type is a repeated type.
Repeated *EnvType `protobuf:"bytes,2,opt,name=repeated,proto3,oneof"`
}
type EnvType_Map struct {
// map is used when the type is a map type.
Map *EnvMapType `protobuf:"bytes,3,opt,name=map,proto3,oneof"`
}
func (*EnvType_Kind) isEnvType_Type() {}
func (*EnvType_Repeated) isEnvType_Type() {}
func (*EnvType_Map) isEnvType_Type() {}
// EnvMapType represents map type.
type EnvMapType struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// key represents map's key type.
Key *EnvType `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
// value represents map's value type.
Value *EnvType `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
}
func (x *EnvMapType) Reset() {
*x = EnvMapType{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[11]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *EnvMapType) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*EnvMapType) ProtoMessage() {}
func (x *EnvMapType) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[11]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use EnvMapType.ProtoReflect.Descriptor instead.
func (*EnvMapType) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{11}
}
func (x *EnvMapType) GetKey() *EnvType {
if x != nil {
return x.Key
}
return nil
}
func (x *EnvMapType) GetValue() *EnvType {
if x != nil {
return x.Value
}
return nil
}
// EnvVarOption represents additional option for environment variable.
// The option work with the `envconfig` library in Go language.
// For detailed specifications, please refer to the library's documentation ( https://pkg.go.dev/github.com/kelseyhightower/envconfig#section-readme ).
type EnvVarOption struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// alternate use this option if you want to use an environment variable with a different name than the value specified in `EnvVar.name`.
Alternate *string `protobuf:"bytes,1,opt,name=alternate,proto3,oneof" json:"alternate,omitempty"`
// default specify the value to use as a fallback if the specified environment variable is not found.
Default *string `protobuf:"bytes,2,opt,name=default,proto3,oneof" json:"default,omitempty"`
// required require the environment variable to exist.
// If it does not exist, an error will occur at startup.
Required *bool `protobuf:"varint,3,opt,name=required,proto3,oneof" json:"required,omitempty"`
// ignored if ignored is true, it does nothing even if the environment variable exists.
Ignored *bool `protobuf:"varint,4,opt,name=ignored,proto3,oneof" json:"ignored,omitempty"`
}
func (x *EnvVarOption) Reset() {
*x = EnvVarOption{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[12]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *EnvVarOption) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*EnvVarOption) ProtoMessage() {}
func (x *EnvVarOption) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[12]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use EnvVarOption.ProtoReflect.Descriptor instead.
func (*EnvVarOption) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{12}
}
func (x *EnvVarOption) GetAlternate() string {
if x != nil && x.Alternate != nil {
return *x.Alternate
}
return ""
}
func (x *EnvVarOption) GetDefault() string {
if x != nil && x.Default != nil {
return *x.Default
}
return ""
}
func (x *EnvVarOption) GetRequired() bool {
if x != nil && x.Required != nil {
return *x.Required
}
return false
}
func (x *EnvVarOption) GetIgnored() bool {
if x != nil && x.Ignored != nil {
return *x.Ignored
}
return false
}
type MethodRule struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// the time to timeout. If the specified time period elapses, DEADLINE_EXCEEDED status is returned.
// If you want to handle this error, you need to implement a custom error handler in Go.
// The format is the same as Go's time.Duration format. See https://pkg.go.dev/time#ParseDuration.
Timeout *string `protobuf:"bytes,1,opt,name=timeout,proto3,oneof" json:"timeout,omitempty"`
// response specify the name of the message you want to use to create the response value.
// If you specify a reserved type like `google.protobuf.Empty` as the response, you cannot define gRPC Federation options.
// In such cases, you can specify a separate message to create the response value.
// The specified response message must contain fields with the same names and types as all the fields in the original response.
Response *string `protobuf:"bytes,2,opt,name=response,proto3,oneof" json:"response,omitempty"`
}
func (x *MethodRule) Reset() {
*x = MethodRule{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[13]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *MethodRule) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*MethodRule) ProtoMessage() {}
func (x *MethodRule) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[13]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use MethodRule.ProtoReflect.Descriptor instead.
func (*MethodRule) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{13}
}
func (x *MethodRule) GetTimeout() string {
if x != nil && x.Timeout != nil {
return *x.Timeout
}
return ""
}
func (x *MethodRule) GetResponse() string {
if x != nil && x.Response != nil {
return *x.Response
}
return ""
}
// MessageRule define gRPC Federation rules for the message.
type MessageRule struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// def specify variables to be used in field binding by `grpc.federation.field` option.
Def []*VariableDefinition `protobuf:"bytes,1,rep,name=def,proto3" json:"def,omitempty"`
// if custom_resolver is true, the resolver for this message is implemented by Go.
// If there are any values retrieved by resolver or messages, they are passed as arguments for custom resolver.
// Each field of the message returned by the custom resolver is automatically bound.
// If you want to change the binding process for a particular field, set `custom_resolver=true` option for that field.
CustomResolver *bool `protobuf:"varint,2,opt,name=custom_resolver,json=customResolver,proto3,oneof" json:"custom_resolver,omitempty"`
// alias mapping between messages defined in other packages and messages defined on the federation service side.
// The alias is the FQDN ( . ) to the message.
// If this definition exists, type conversion is automatically performed before the field assignment operation.
// If a message with this option has a field that is not present in the message specified by alias, and the alias option is not specified for that field, an error is occurred.
// You can specify multiple aliases. In that case, only fields common to all aliases will be considered.
// Specifying a field that is not included in either alias will result in an error.
Alias []string `protobuf:"bytes,3,rep,name=alias,proto3" json:"alias,omitempty"`
}
func (x *MessageRule) Reset() {
*x = MessageRule{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[14]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *MessageRule) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*MessageRule) ProtoMessage() {}
func (x *MessageRule) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[14]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use MessageRule.ProtoReflect.Descriptor instead.
func (*MessageRule) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{14}
}
func (x *MessageRule) GetDef() []*VariableDefinition {
if x != nil {
return x.Def
}
return nil
}
func (x *MessageRule) GetCustomResolver() bool {
if x != nil && x.CustomResolver != nil {
return *x.CustomResolver
}
return false
}
func (x *MessageRule) GetAlias() []string {
if x != nil {
return x.Alias
}
return nil
}
// VariableDefinition represents variable definition.
type VariableDefinition struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// name is a variable name.
// This name can be referenced in all CELs defined after itself in the same message.
// It can also be referenced in `grpc.federation.field` option.
Name *string `protobuf:"bytes,1,opt,name=name,proto3,oneof" json:"name,omitempty"`
// if specify the condition for evaluating expr.
// this value evaluated by CEL and it must return a boolean value.
// If the result of evaluation is `false`, the value assigned to name is the default value of the result of evaluation of `expr`.
If *string `protobuf:"bytes,2,opt,name=if,proto3,oneof" json:"if,omitempty"`
// autobind if the result value of `expr` is a message type,
// the value of a field with the same name and type as the field name of its own message is automatically assigned to the value of the field in the message.
// If multiple autobinds are used at the same message,
// you must explicitly use the `grpc.federation.field` option to do the binding yourself, since duplicate field names cannot be correctly determined as one.
Autobind *bool `protobuf:"varint,3,opt,name=autobind,proto3,oneof" json:"autobind,omitempty"`
// expr specify the value to be assigned to name.
//
// Types that are assignable to Expr:
//
// *VariableDefinition_By
// *VariableDefinition_Map
// *VariableDefinition_Message
// *VariableDefinition_Call
// *VariableDefinition_Validation
// *VariableDefinition_Enum
// *VariableDefinition_Switch
Expr isVariableDefinition_Expr `protobuf_oneof:"expr"`
}
func (x *VariableDefinition) Reset() {
*x = VariableDefinition{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[15]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *VariableDefinition) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*VariableDefinition) ProtoMessage() {}
func (x *VariableDefinition) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[15]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use VariableDefinition.ProtoReflect.Descriptor instead.
func (*VariableDefinition) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{15}
}
func (x *VariableDefinition) GetName() string {
if x != nil && x.Name != nil {
return *x.Name
}
return ""
}
func (x *VariableDefinition) GetIf() string {
if x != nil && x.If != nil {
return *x.If
}
return ""
}
func (x *VariableDefinition) GetAutobind() bool {
if x != nil && x.Autobind != nil {
return *x.Autobind
}
return false
}
func (m *VariableDefinition) GetExpr() isVariableDefinition_Expr {
if m != nil {
return m.Expr
}
return nil
}
func (x *VariableDefinition) GetBy() string {
if x, ok := x.GetExpr().(*VariableDefinition_By); ok {
return x.By
}
return ""
}
func (x *VariableDefinition) GetMap() *MapExpr {
if x, ok := x.GetExpr().(*VariableDefinition_Map); ok {
return x.Map
}
return nil
}
func (x *VariableDefinition) GetMessage() *MessageExpr {
if x, ok := x.GetExpr().(*VariableDefinition_Message); ok {
return x.Message
}
return nil
}
func (x *VariableDefinition) GetCall() *CallExpr {
if x, ok := x.GetExpr().(*VariableDefinition_Call); ok {
return x.Call
}
return nil
}
func (x *VariableDefinition) GetValidation() *ValidationExpr {
if x, ok := x.GetExpr().(*VariableDefinition_Validation); ok {
return x.Validation
}
return nil
}
func (x *VariableDefinition) GetEnum() *EnumExpr {
if x, ok := x.GetExpr().(*VariableDefinition_Enum); ok {
return x.Enum
}
return nil
}
func (x *VariableDefinition) GetSwitch() *SwitchExpr {
if x, ok := x.GetExpr().(*VariableDefinition_Switch); ok {
return x.Switch
}
return nil
}
type isVariableDefinition_Expr interface {
isVariableDefinition_Expr()
}
type VariableDefinition_By struct {
// `by` evaluates with CEL.
By string `protobuf:"bytes,11,opt,name=by,proto3,oneof"`
}
type VariableDefinition_Map struct {
// map apply map operation for the specified repeated type.
Map *MapExpr `protobuf:"bytes,12,opt,name=map,proto3,oneof"`
}
type VariableDefinition_Message struct {
// message gets with message arguments.
Message *MessageExpr `protobuf:"bytes,13,opt,name=message,proto3,oneof"`
}
type VariableDefinition_Call struct {
// call specifies how to call gRPC method.
Call *CallExpr `protobuf:"bytes,14,opt,name=call,proto3,oneof"`
}
type VariableDefinition_Validation struct {
// validation defines the validation rule and error.
Validation *ValidationExpr `protobuf:"bytes,15,opt,name=validation,proto3,oneof"`
}
type VariableDefinition_Enum struct {
// enum gets with cel value.
Enum *EnumExpr `protobuf:"bytes,16,opt,name=enum,proto3,oneof"`
}
type VariableDefinition_Switch struct {
// switch provides conditional evaluation with multiple branches.
Switch *SwitchExpr `protobuf:"bytes,17,opt,name=switch,proto3,oneof"`
}
func (*VariableDefinition_By) isVariableDefinition_Expr() {}
func (*VariableDefinition_Map) isVariableDefinition_Expr() {}
func (*VariableDefinition_Message) isVariableDefinition_Expr() {}
func (*VariableDefinition_Call) isVariableDefinition_Expr() {}
func (*VariableDefinition_Validation) isVariableDefinition_Expr() {}
func (*VariableDefinition_Enum) isVariableDefinition_Expr() {}
func (*VariableDefinition_Switch) isVariableDefinition_Expr() {}
// MapExpr apply map operation for the specified repeated type.
type MapExpr struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// iterator define iterator variable.
// When evaluating CEL in `expr`, we can refer to the name defined in iterator.
Iterator *Iterator `protobuf:"bytes,1,opt,name=iterator,proto3" json:"iterator,omitempty"`
// expr creates map elements using iterator variable.
//
// Types that are assignable to Expr:
//
// *MapExpr_By
// *MapExpr_Message
// *MapExpr_Enum
Expr isMapExpr_Expr `protobuf_oneof:"expr"`
}
func (x *MapExpr) Reset() {
*x = MapExpr{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[16]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *MapExpr) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*MapExpr) ProtoMessage() {}
func (x *MapExpr) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[16]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use MapExpr.ProtoReflect.Descriptor instead.
func (*MapExpr) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{16}
}
func (x *MapExpr) GetIterator() *Iterator {
if x != nil {
return x.Iterator
}
return nil
}
func (m *MapExpr) GetExpr() isMapExpr_Expr {
if m != nil {
return m.Expr
}
return nil
}
func (x *MapExpr) GetBy() string {
if x, ok := x.GetExpr().(*MapExpr_By); ok {
return x.By
}
return ""
}
func (x *MapExpr) GetMessage() *MessageExpr {
if x, ok := x.GetExpr().(*MapExpr_Message); ok {
return x.Message
}
return nil
}
func (x *MapExpr) GetEnum() *EnumExpr {
if x, ok := x.GetExpr().(*MapExpr_Enum); ok {
return x.Enum
}
return nil
}
type isMapExpr_Expr interface {
isMapExpr_Expr()
}
type MapExpr_By struct {
// `by` evaluates with CEL.
// this can refer to the variable declared by `iterator`.
By string `protobuf:"bytes,11,opt,name=by,proto3,oneof"`
}
type MapExpr_Message struct {
// message gets with message arguments, and it is made an element of the map.
// The result type of MapExpr is the repeated type of the specified message.
Message *MessageExpr `protobuf:"bytes,12,opt,name=message,proto3,oneof"`
}
type MapExpr_Enum struct {
// enum creates enum value for each element of the map.
// The result type of MapExpr is the repeated type of the specified enum.
Enum *EnumExpr `protobuf:"bytes,13,opt,name=enum,proto3,oneof"`
}
func (*MapExpr_By) isMapExpr_Expr() {}
func (*MapExpr_Message) isMapExpr_Expr() {}
func (*MapExpr_Enum) isMapExpr_Expr() {}
// Iterator represents iterator variable.
type Iterator struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// variable name.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// src the value that will be the source for creating the iterator.
// src must be a repeated type.
Src string `protobuf:"bytes,2,opt,name=src,proto3" json:"src,omitempty"`
}
func (x *Iterator) Reset() {
*x = Iterator{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[17]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Iterator) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Iterator) ProtoMessage() {}
func (x *Iterator) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[17]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Iterator.ProtoReflect.Descriptor instead.
func (*Iterator) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{17}
}
func (x *Iterator) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *Iterator) GetSrc() string {
if x != nil {
return x.Src
}
return ""
}
// MessageExpr represents dependent message.
type MessageExpr struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// name specify the message name by FQDN. format is `.`.
// can be omitted when referring to messages in the same package.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// args specify the parameters needed to get the message. This is called the "message arguments".
Args []*Argument `protobuf:"bytes,2,rep,name=args,proto3" json:"args,omitempty"`
}
func (x *MessageExpr) Reset() {
*x = MessageExpr{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[18]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *MessageExpr) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*MessageExpr) ProtoMessage() {}
func (x *MessageExpr) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[18]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use MessageExpr.ProtoReflect.Descriptor instead.
func (*MessageExpr) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{18}
}
func (x *MessageExpr) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *MessageExpr) GetArgs() []*Argument {
if x != nil {
return x.Args
}
return nil
}
// EnumExpr represents dependent enum.
type EnumExpr struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// name specify the enum name by FQDN. format is `.`.
// can be omitted when referring to enum in the same package.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// `by` evaluates with CEL.
By string `protobuf:"bytes,2,opt,name=by,proto3" json:"by,omitempty"`
}
func (x *EnumExpr) Reset() {
*x = EnumExpr{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[19]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *EnumExpr) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*EnumExpr) ProtoMessage() {}
func (x *EnumExpr) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[19]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use EnumExpr.ProtoReflect.Descriptor instead.
func (*EnumExpr) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{19}
}
func (x *EnumExpr) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *EnumExpr) GetBy() string {
if x != nil {
return x.By
}
return ""
}
// CallExpr represents how to call gRPC method.
type CallExpr struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// method specify the FQDN for the gRPC method. format is `./`.
Method string `protobuf:"bytes,1,opt,name=method,proto3" json:"method,omitempty"`
// request specify request parameters for the gRPC method.
Request []*MethodRequest `protobuf:"bytes,2,rep,name=request,proto3" json:"request,omitempty"`
// the time to timeout. If the specified time period elapses, DEADLINE_EXCEEDED status is returned.
// If you want to handle this error, you need to implement a custom error handler in Go.
// The format is the same as Go's time.Duration format. See https://pkg.go.dev/time#ParseDuration.
Timeout *string `protobuf:"bytes,3,opt,name=timeout,proto3,oneof" json:"timeout,omitempty"`
// retry specifies the retry policy if the method call fails.
Retry *RetryPolicy `protobuf:"bytes,4,opt,name=retry,proto3,oneof" json:"retry,omitempty"`
// error evaluated when an error occurs during a method call.
// Multiple errors can be defined and are evaluated in the order in which they are described.
// If an error occurs while creating an gRPC status error, original error will be returned.
Error []*GRPCError `protobuf:"bytes,5,rep,name=error,proto3" json:"error,omitempty"`
// option is the gRPC's call option (https://pkg.go.dev/google.golang.org/grpc#CallOption).
Option *GRPCCallOption `protobuf:"bytes,6,opt,name=option,proto3,oneof" json:"option,omitempty"`
// metadata specify outgoing metadata with CEL value.
// The specified type must always be of type map.
Metadata *string `protobuf:"bytes,7,opt,name=metadata,proto3,oneof" json:"metadata,omitempty"`
}
func (x *CallExpr) Reset() {
*x = CallExpr{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[20]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *CallExpr) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CallExpr) ProtoMessage() {}
func (x *CallExpr) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[20]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use CallExpr.ProtoReflect.Descriptor instead.
func (*CallExpr) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{20}
}
func (x *CallExpr) GetMethod() string {
if x != nil {
return x.Method
}
return ""
}
func (x *CallExpr) GetRequest() []*MethodRequest {
if x != nil {
return x.Request
}
return nil
}
func (x *CallExpr) GetTimeout() string {
if x != nil && x.Timeout != nil {
return *x.Timeout
}
return ""
}
func (x *CallExpr) GetRetry() *RetryPolicy {
if x != nil {
return x.Retry
}
return nil
}
func (x *CallExpr) GetError() []*GRPCError {
if x != nil {
return x.Error
}
return nil
}
func (x *CallExpr) GetOption() *GRPCCallOption {
if x != nil {
return x.Option
}
return nil
}
func (x *CallExpr) GetMetadata() string {
if x != nil && x.Metadata != nil {
return *x.Metadata
}
return ""
}
// SwitchExpr represents a switch statement. At least one "case", and "default", must be defined. All
// case.if expressions must evaluate to a boolean value. All case.by expressions, and default.by, must
// evaluate to the same type (the return type of the switch).
//
// When executed, the case.if expressions are evaluated in order, and, for the first case whose
// case.if expression evaluates to true, its case.by is evaluated to make the return value of the
// SwitchExpr.
// If no case.if evaluates to true, default.by is evaluated to make the return value.
type SwitchExpr struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Cases for the switch expression.
Case []*SwitchCaseExpr `protobuf:"bytes,1,rep,name=case,proto3" json:"case,omitempty"`
// The default case, if none of the "case.if" expressions evaluate to true.
Default *SwitchDefaultExpr `protobuf:"bytes,2,opt,name=default,proto3" json:"default,omitempty"`
}
func (x *SwitchExpr) Reset() {
*x = SwitchExpr{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[21]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *SwitchExpr) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*SwitchExpr) ProtoMessage() {}
func (x *SwitchExpr) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[21]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use SwitchExpr.ProtoReflect.Descriptor instead.
func (*SwitchExpr) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{21}
}
func (x *SwitchExpr) GetCase() []*SwitchCaseExpr {
if x != nil {
return x.Case
}
return nil
}
func (x *SwitchExpr) GetDefault() *SwitchDefaultExpr {
if x != nil {
return x.Default
}
return nil
}
// SwitchCaseExpr represents a single case for a switch expression.
type SwitchCaseExpr struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// if specify the condition for evaluating expr.
// this value evaluated by CEL and it must return a boolean value.
If string `protobuf:"bytes,1,opt,name=if,proto3" json:"if,omitempty"`
// def define variables in current scope.
Def []*VariableDefinition `protobuf:"bytes,2,rep,name=def,proto3" json:"def,omitempty"`
// expr specify the value to return for the case.
//
// Types that are assignable to Expr:
//
// *SwitchCaseExpr_By
Expr isSwitchCaseExpr_Expr `protobuf_oneof:"expr"`
}
func (x *SwitchCaseExpr) Reset() {
*x = SwitchCaseExpr{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[22]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *SwitchCaseExpr) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*SwitchCaseExpr) ProtoMessage() {}
func (x *SwitchCaseExpr) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[22]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use SwitchCaseExpr.ProtoReflect.Descriptor instead.
func (*SwitchCaseExpr) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{22}
}
func (x *SwitchCaseExpr) GetIf() string {
if x != nil {
return x.If
}
return ""
}
func (x *SwitchCaseExpr) GetDef() []*VariableDefinition {
if x != nil {
return x.Def
}
return nil
}
func (m *SwitchCaseExpr) GetExpr() isSwitchCaseExpr_Expr {
if m != nil {
return m.Expr
}
return nil
}
func (x *SwitchCaseExpr) GetBy() string {
if x, ok := x.GetExpr().(*SwitchCaseExpr_By); ok {
return x.By
}
return ""
}
type isSwitchCaseExpr_Expr interface {
isSwitchCaseExpr_Expr()
}
type SwitchCaseExpr_By struct {
// `by` evaluates with CEL.
By string `protobuf:"bytes,11,opt,name=by,proto3,oneof"`
}
func (*SwitchCaseExpr_By) isSwitchCaseExpr_Expr() {}
// SwitchDefaultExpr represents the default case for a switch expression.
type SwitchDefaultExpr struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// def define variables in current scope.
Def []*VariableDefinition `protobuf:"bytes,1,rep,name=def,proto3" json:"def,omitempty"`
// expr specify the value to return for the default case.
//
// Types that are assignable to Expr:
//
// *SwitchDefaultExpr_By
Expr isSwitchDefaultExpr_Expr `protobuf_oneof:"expr"`
}
func (x *SwitchDefaultExpr) Reset() {
*x = SwitchDefaultExpr{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[23]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *SwitchDefaultExpr) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*SwitchDefaultExpr) ProtoMessage() {}
func (x *SwitchDefaultExpr) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[23]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use SwitchDefaultExpr.ProtoReflect.Descriptor instead.
func (*SwitchDefaultExpr) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{23}
}
func (x *SwitchDefaultExpr) GetDef() []*VariableDefinition {
if x != nil {
return x.Def
}
return nil
}
func (m *SwitchDefaultExpr) GetExpr() isSwitchDefaultExpr_Expr {
if m != nil {
return m.Expr
}
return nil
}
func (x *SwitchDefaultExpr) GetBy() string {
if x, ok := x.GetExpr().(*SwitchDefaultExpr_By); ok {
return x.By
}
return ""
}
type isSwitchDefaultExpr_Expr interface {
isSwitchDefaultExpr_Expr()
}
type SwitchDefaultExpr_By struct {
// `by` evaluates with CEL.
By string `protobuf:"bytes,11,opt,name=by,proto3,oneof"`
}
func (*SwitchDefaultExpr_By) isSwitchDefaultExpr_Expr() {}
// GRPCError create gRPC status value.
type GRPCError struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// def define variables in current scope.
Def []*VariableDefinition `protobuf:"bytes,1,rep,name=def,proto3" json:"def,omitempty"`
// if specifies condition in CEL. If the condition is true, it returns defined error information.
// If this field is omitted, it is always treated as 'true' and returns defined error information.
// The return value must always be of type boolean.
If *string `protobuf:"bytes,2,opt,name=if,proto3,oneof" json:"if,omitempty"`
// code is a gRPC status code.
Code *code.Code `protobuf:"varint,3,opt,name=code,proto3,enum=google.rpc.Code,oneof" json:"code,omitempty"`
// message is a gRPC status message.
// If omitted, the message will be auto-generated from the configurations.
Message *string `protobuf:"bytes,4,opt,name=message,proto3,oneof" json:"message,omitempty"`
// details is a list of error details.
// If returns error, the corresponding error details are set.
Details []*GRPCErrorDetail `protobuf:"bytes,5,rep,name=details,proto3" json:"details,omitempty"`
// ignore ignore the error if the condition in the "if" field is true and "ignore" field is set to true.
// When an error is ignored, the returned response is always null value.
// If you want to return a response that is not null, please use `ignore_and_response` feature.
// Therefore, `ignore` and `ignore_and_response` cannot be specified same.
Ignore *bool `protobuf:"varint,6,opt,name=ignore,proto3,oneof" json:"ignore,omitempty"`
// ignore_and_response ignore the error if the condition in the "if" field is true and it returns response specified in CEL.
// The evaluation value of CEL must always be the same as the response message type.
// `ignore` and `ignore_and_response` cannot be specified same.
IgnoreAndResponse *string `protobuf:"bytes,7,opt,name=ignore_and_response,json=ignoreAndResponse,proto3,oneof" json:"ignore_and_response,omitempty"`
// log_level can be configured to output logs as any log level.
// If DEBUG is specified for the log_level, logs are output as debug logs.
// default value is ERROR.
LogLevel *GRPCError_LogLevel `protobuf:"varint,8,opt,name=log_level,json=logLevel,proto3,enum=grpc.federation.GRPCError_LogLevel,oneof" json:"log_level,omitempty"`
}
func (x *GRPCError) Reset() {
*x = GRPCError{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[24]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GRPCError) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GRPCError) ProtoMessage() {}
func (x *GRPCError) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[24]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GRPCError.ProtoReflect.Descriptor instead.
func (*GRPCError) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{24}
}
func (x *GRPCError) GetDef() []*VariableDefinition {
if x != nil {
return x.Def
}
return nil
}
func (x *GRPCError) GetIf() string {
if x != nil && x.If != nil {
return *x.If
}
return ""
}
func (x *GRPCError) GetCode() code.Code {
if x != nil && x.Code != nil {
return *x.Code
}
return code.Code(0)
}
func (x *GRPCError) GetMessage() string {
if x != nil && x.Message != nil {
return *x.Message
}
return ""
}
func (x *GRPCError) GetDetails() []*GRPCErrorDetail {
if x != nil {
return x.Details
}
return nil
}
func (x *GRPCError) GetIgnore() bool {
if x != nil && x.Ignore != nil {
return *x.Ignore
}
return false
}
func (x *GRPCError) GetIgnoreAndResponse() string {
if x != nil && x.IgnoreAndResponse != nil {
return *x.IgnoreAndResponse
}
return ""
}
func (x *GRPCError) GetLogLevel() GRPCError_LogLevel {
if x != nil && x.LogLevel != nil {
return *x.LogLevel
}
return GRPCError_UNKNOWN
}
type GRPCErrorDetail struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// if specifies condition rule in CEL. If the condition is true, gRPC error detail is added to the error.
If string `protobuf:"bytes,1,opt,name=if,proto3" json:"if,omitempty"`
// def define variables in current scope.
Def []*VariableDefinition `protobuf:"bytes,2,rep,name=def,proto3" json:"def,omitempty"`
// message represents arbitrary messages to describe the detail of the error.
Message []*MessageExpr `protobuf:"bytes,3,rep,name=message,proto3" json:"message,omitempty"`
// error_info describes the cause of the error with structured details.
ErrorInfo []*errdetails.ErrorInfo `protobuf:"bytes,4,rep,name=error_info,json=errorInfo,proto3" json:"error_info,omitempty"`
// retry_info describes when the clients can retry a failed request.
RetryInfo []*errdetails.RetryInfo `protobuf:"bytes,5,rep,name=retry_info,json=retryInfo,proto3" json:"retry_info,omitempty"`
// debug_info describes additional debugging info.
DebugInfo []*errdetails.DebugInfo `protobuf:"bytes,6,rep,name=debug_info,json=debugInfo,proto3" json:"debug_info,omitempty"`
// quota_failure describes how a quota check failed.
QuotaFailure []*errdetails.QuotaFailure `protobuf:"bytes,7,rep,name=quota_failure,json=quotaFailure,proto3" json:"quota_failure,omitempty"`
// precondition_failure describes what preconditions have failed.
PreconditionFailure []*errdetails.PreconditionFailure `protobuf:"bytes,8,rep,name=precondition_failure,json=preconditionFailure,proto3" json:"precondition_failure,omitempty"`
// bad_request describes violations in a client request.
BadRequest []*errdetails.BadRequest `protobuf:"bytes,9,rep,name=bad_request,json=badRequest,proto3" json:"bad_request,omitempty"`
// request_info contains metadata about the request that clients can attach.
RequestInfo []*errdetails.RequestInfo `protobuf:"bytes,10,rep,name=request_info,json=requestInfo,proto3" json:"request_info,omitempty"`
// resource_info describes the resource that is being accessed.
ResourceInfo []*errdetails.ResourceInfo `protobuf:"bytes,11,rep,name=resource_info,json=resourceInfo,proto3" json:"resource_info,omitempty"`
// help provides links to documentation or for performing an out of band action.
Help []*errdetails.Help `protobuf:"bytes,12,rep,name=help,proto3" json:"help,omitempty"`
// localized_message provides a localized error message that is safe to return to the user.
LocalizedMessage []*errdetails.LocalizedMessage `protobuf:"bytes,13,rep,name=localized_message,json=localizedMessage,proto3" json:"localized_message,omitempty"`
// by specify a message in CEL to express the details of the error.
By []string `protobuf:"bytes,14,rep,name=by,proto3" json:"by,omitempty"`
}
func (x *GRPCErrorDetail) Reset() {
*x = GRPCErrorDetail{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[25]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GRPCErrorDetail) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GRPCErrorDetail) ProtoMessage() {}
func (x *GRPCErrorDetail) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[25]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GRPCErrorDetail.ProtoReflect.Descriptor instead.
func (*GRPCErrorDetail) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{25}
}
func (x *GRPCErrorDetail) GetIf() string {
if x != nil {
return x.If
}
return ""
}
func (x *GRPCErrorDetail) GetDef() []*VariableDefinition {
if x != nil {
return x.Def
}
return nil
}
func (x *GRPCErrorDetail) GetMessage() []*MessageExpr {
if x != nil {
return x.Message
}
return nil
}
func (x *GRPCErrorDetail) GetErrorInfo() []*errdetails.ErrorInfo {
if x != nil {
return x.ErrorInfo
}
return nil
}
func (x *GRPCErrorDetail) GetRetryInfo() []*errdetails.RetryInfo {
if x != nil {
return x.RetryInfo
}
return nil
}
func (x *GRPCErrorDetail) GetDebugInfo() []*errdetails.DebugInfo {
if x != nil {
return x.DebugInfo
}
return nil
}
func (x *GRPCErrorDetail) GetQuotaFailure() []*errdetails.QuotaFailure {
if x != nil {
return x.QuotaFailure
}
return nil
}
func (x *GRPCErrorDetail) GetPreconditionFailure() []*errdetails.PreconditionFailure {
if x != nil {
return x.PreconditionFailure
}
return nil
}
func (x *GRPCErrorDetail) GetBadRequest() []*errdetails.BadRequest {
if x != nil {
return x.BadRequest
}
return nil
}
func (x *GRPCErrorDetail) GetRequestInfo() []*errdetails.RequestInfo {
if x != nil {
return x.RequestInfo
}
return nil
}
func (x *GRPCErrorDetail) GetResourceInfo() []*errdetails.ResourceInfo {
if x != nil {
return x.ResourceInfo
}
return nil
}
func (x *GRPCErrorDetail) GetHelp() []*errdetails.Help {
if x != nil {
return x.Help
}
return nil
}
func (x *GRPCErrorDetail) GetLocalizedMessage() []*errdetails.LocalizedMessage {
if x != nil {
return x.LocalizedMessage
}
return nil
}
func (x *GRPCErrorDetail) GetBy() []string {
if x != nil {
return x.By
}
return nil
}
// GRPCCallOption configures a gRPC Call before it starts or extracts information from a gRPC Call after it completes.
type GRPCCallOption struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// set the content-subtype. For example, if content-subtype is "json", the Content-Type over the wire will be "application/grpc+json".
// The content-subtype is converted to lowercase before being included in Content-Type.
// See Content-Type on https://github.com/grpc/grpc/blob/master/doc/PROTOCOL-HTTP2.md#requests for more details.
// If no such codec is found, the call will result in an error with code INTERNAL.
ContentSubtype *string `protobuf:"bytes,1,opt,name=content_subtype,json=contentSubtype,proto3,oneof" json:"content_subtype,omitempty"`
// header retrieves the header metadata for a unary RPC.
// In order to obtain the metadata, you must specify a variable of type map in the header.
// e.g.)
// def [
//
// { name: "hdr" by: "grpc.federation.metadata.new()" }
// { call { method: "pkg.Method" option { header: "hdr" } } }
//
// ]
Header *string `protobuf:"bytes,2,opt,name=header,proto3,oneof" json:"header,omitempty"`
// max_call_recv_msg_size sets the maximum message size in bytes the client can receive.
// If this is not set, gRPC uses the default 4MB.
MaxCallRecvMsgSize *int64 `protobuf:"varint,3,opt,name=max_call_recv_msg_size,json=maxCallRecvMsgSize,proto3,oneof" json:"max_call_recv_msg_size,omitempty"`
// max_call_send_msg_size sets the maximum message size in bytes the client can send.
// If this is not set, gRPC uses the default maximum number of int32 range.
MaxCallSendMsgSize *int64 `protobuf:"varint,4,opt,name=max_call_send_msg_size,json=maxCallSendMsgSize,proto3,oneof" json:"max_call_send_msg_size,omitempty"`
// static_method specifies that a call is being made to a method that is static,
// which means the method is known at compile time and doesn't change at runtime.
// This can be used as a signal to stats plugins that this method is safe to include as a key to a measurement.
StaticMethod *bool `protobuf:"varint,5,opt,name=static_method,json=staticMethod,proto3,oneof" json:"static_method,omitempty"`
// trailer retrieves the trailer metadata for a unary RPC.
// In order to obtain the metadata, you must specify a variable of type map in the trailer.
// e.g.)
// def [
//
// { name: "trl" by: "grpc.federation.metadata.new()" }
// { call { method: "pkg.Method" option { trailer: "trl" } } }
//
// ]
Trailer *string `protobuf:"bytes,6,opt,name=trailer,proto3,oneof" json:"trailer,omitempty"`
// wait_for_ready configures the RPC's behavior when the client is in TRANSIENT_FAILURE,
// which occurs when all addresses fail to connect.
// If wait_for_ready is false, the RPC will fail immediately.
// Otherwise, the client will wait until a connection becomes available or the RPC's deadline is reached.
// By default, RPCs do not "wait for ready".
WaitForReady *bool `protobuf:"varint,7,opt,name=wait_for_ready,json=waitForReady,proto3,oneof" json:"wait_for_ready,omitempty"`
}
func (x *GRPCCallOption) Reset() {
*x = GRPCCallOption{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[26]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GRPCCallOption) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GRPCCallOption) ProtoMessage() {}
func (x *GRPCCallOption) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[26]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GRPCCallOption.ProtoReflect.Descriptor instead.
func (*GRPCCallOption) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{26}
}
func (x *GRPCCallOption) GetContentSubtype() string {
if x != nil && x.ContentSubtype != nil {
return *x.ContentSubtype
}
return ""
}
func (x *GRPCCallOption) GetHeader() string {
if x != nil && x.Header != nil {
return *x.Header
}
return ""
}
func (x *GRPCCallOption) GetMaxCallRecvMsgSize() int64 {
if x != nil && x.MaxCallRecvMsgSize != nil {
return *x.MaxCallRecvMsgSize
}
return 0
}
func (x *GRPCCallOption) GetMaxCallSendMsgSize() int64 {
if x != nil && x.MaxCallSendMsgSize != nil {
return *x.MaxCallSendMsgSize
}
return 0
}
func (x *GRPCCallOption) GetStaticMethod() bool {
if x != nil && x.StaticMethod != nil {
return *x.StaticMethod
}
return false
}
func (x *GRPCCallOption) GetTrailer() string {
if x != nil && x.Trailer != nil {
return *x.Trailer
}
return ""
}
func (x *GRPCCallOption) GetWaitForReady() bool {
if x != nil && x.WaitForReady != nil {
return *x.WaitForReady
}
return false
}
// Validation represents a validation rule against variables defined within the current scope.
type ValidationExpr struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// name is a unique name for the validation.
// If set, the validation error type will be Error.
// If omitted, the validation error type will be ValidationError.
Name *string `protobuf:"bytes,1,opt,name=name,proto3,oneof" json:"name,omitempty"`
// error defines the actual validation rules and an error to returned if the validation fails.
Error *GRPCError `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"`
}
func (x *ValidationExpr) Reset() {
*x = ValidationExpr{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[27]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ValidationExpr) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ValidationExpr) ProtoMessage() {}
func (x *ValidationExpr) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[27]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ValidationExpr.ProtoReflect.Descriptor instead.
func (*ValidationExpr) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{27}
}
func (x *ValidationExpr) GetName() string {
if x != nil && x.Name != nil {
return *x.Name
}
return ""
}
func (x *ValidationExpr) GetError() *GRPCError {
if x != nil {
return x.Error
}
return nil
}
// RetryPolicy define the retry policy if the method call fails.
type RetryPolicy struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Types that are assignable to Policy:
//
// *RetryPolicy_Constant
// *RetryPolicy_Exponential
Policy isRetryPolicy_Policy `protobuf_oneof:"policy"`
// if specifies condition in CEL. If the condition is true, run the retry process according to the policy.
// If this field is omitted, it is always treated as 'true' and run the retry process.
// The return value must always be of type boolean.
If string `protobuf:"bytes,3,opt,name=if,proto3" json:"if,omitempty"`
}
func (x *RetryPolicy) Reset() {
*x = RetryPolicy{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[28]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *RetryPolicy) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*RetryPolicy) ProtoMessage() {}
func (x *RetryPolicy) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[28]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use RetryPolicy.ProtoReflect.Descriptor instead.
func (*RetryPolicy) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{28}
}
func (m *RetryPolicy) GetPolicy() isRetryPolicy_Policy {
if m != nil {
return m.Policy
}
return nil
}
func (x *RetryPolicy) GetConstant() *RetryPolicyConstant {
if x, ok := x.GetPolicy().(*RetryPolicy_Constant); ok {
return x.Constant
}
return nil
}
func (x *RetryPolicy) GetExponential() *RetryPolicyExponential {
if x, ok := x.GetPolicy().(*RetryPolicy_Exponential); ok {
return x.Exponential
}
return nil
}
func (x *RetryPolicy) GetIf() string {
if x != nil {
return x.If
}
return ""
}
type isRetryPolicy_Policy interface {
isRetryPolicy_Policy()
}
type RetryPolicy_Constant struct {
// retry according to the "constant" policy.
Constant *RetryPolicyConstant `protobuf:"bytes,1,opt,name=constant,proto3,oneof"`
}
type RetryPolicy_Exponential struct {
// retry according to the "exponential backoff" policy.
// The following Go library is used in the implementation,
// so please refer to the library documentation for how to specify each parameter.
// https://pkg.go.dev/github.com/cenkalti/backoff/v4#section-readme.
Exponential *RetryPolicyExponential `protobuf:"bytes,2,opt,name=exponential,proto3,oneof"`
}
func (*RetryPolicy_Constant) isRetryPolicy_Policy() {}
func (*RetryPolicy_Exponential) isRetryPolicy_Policy() {}
// RetryPolicyConstant define "constant" based retry policy.
type RetryPolicyConstant struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// interval value. ( default value is 1s ).
Interval *string `protobuf:"bytes,1,opt,name=interval,proto3,oneof" json:"interval,omitempty"`
// max retry count. ( default value is 5. If zero is specified, it never stops )
MaxRetries *uint64 `protobuf:"varint,2,opt,name=max_retries,json=maxRetries,proto3,oneof" json:"max_retries,omitempty"`
}
func (x *RetryPolicyConstant) Reset() {
*x = RetryPolicyConstant{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[29]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *RetryPolicyConstant) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*RetryPolicyConstant) ProtoMessage() {}
func (x *RetryPolicyConstant) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[29]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use RetryPolicyConstant.ProtoReflect.Descriptor instead.
func (*RetryPolicyConstant) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{29}
}
func (x *RetryPolicyConstant) GetInterval() string {
if x != nil && x.Interval != nil {
return *x.Interval
}
return ""
}
func (x *RetryPolicyConstant) GetMaxRetries() uint64 {
if x != nil && x.MaxRetries != nil {
return *x.MaxRetries
}
return 0
}
// RetryPolicyExponential define "exponential backoff" based retry policy.
type RetryPolicyExponential struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// initial interval value. ( default value is "500ms" ).
InitialInterval *string `protobuf:"bytes,1,opt,name=initial_interval,json=initialInterval,proto3,oneof" json:"initial_interval,omitempty"`
// randomization factor value. ( default value is 0.5 ).
RandomizationFactor *float64 `protobuf:"fixed64,2,opt,name=randomization_factor,json=randomizationFactor,proto3,oneof" json:"randomization_factor,omitempty"`
// multiplier. ( default value is 1.5 ).
Multiplier *float64 `protobuf:"fixed64,3,opt,name=multiplier,proto3,oneof" json:"multiplier,omitempty"`
// max interval value. ( default value is "60s" ).
MaxInterval *string `protobuf:"bytes,4,opt,name=max_interval,json=maxInterval,proto3,oneof" json:"max_interval,omitempty"`
// max retry count. ( default value is 5. If zero is specified, it never stops ).
MaxRetries *uint64 `protobuf:"varint,5,opt,name=max_retries,json=maxRetries,proto3,oneof" json:"max_retries,omitempty"`
}
func (x *RetryPolicyExponential) Reset() {
*x = RetryPolicyExponential{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[30]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *RetryPolicyExponential) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*RetryPolicyExponential) ProtoMessage() {}
func (x *RetryPolicyExponential) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[30]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use RetryPolicyExponential.ProtoReflect.Descriptor instead.
func (*RetryPolicyExponential) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{30}
}
func (x *RetryPolicyExponential) GetInitialInterval() string {
if x != nil && x.InitialInterval != nil {
return *x.InitialInterval
}
return ""
}
func (x *RetryPolicyExponential) GetRandomizationFactor() float64 {
if x != nil && x.RandomizationFactor != nil {
return *x.RandomizationFactor
}
return 0
}
func (x *RetryPolicyExponential) GetMultiplier() float64 {
if x != nil && x.Multiplier != nil {
return *x.Multiplier
}
return 0
}
func (x *RetryPolicyExponential) GetMaxInterval() string {
if x != nil && x.MaxInterval != nil {
return *x.MaxInterval
}
return ""
}
func (x *RetryPolicyExponential) GetMaxRetries() uint64 {
if x != nil && x.MaxRetries != nil {
return *x.MaxRetries
}
return 0
}
// MethodRequest define parameters to be used for gRPC method request.
type MethodRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// field name of the request message.
Field string `protobuf:"bytes,1,opt,name=field,proto3" json:"field,omitempty"`
// by used to refer to a name or message argument defined in a MessageRule, use `$.` to refer to the message argument.
// Use CEL (https://github.com/google/cel-spec) to evaluate the expression.
// Variables are already defined in MessageRule can be used.
By *string `protobuf:"bytes,2,opt,name=by,proto3,oneof" json:"by,omitempty"`
// if describes the condition to be assigned to field.
// The return value must be of type bool.
// Use CEL (https://github.com/google/cel-spec) to evaluate the expression.
// Variables are already defined in MessageRule can be used.
// If the field is a 'oneof' field, it must be specified.
If *string `protobuf:"bytes,3,opt,name=if,proto3,oneof" json:"if,omitempty"`
}
func (x *MethodRequest) Reset() {
*x = MethodRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[31]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *MethodRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*MethodRequest) ProtoMessage() {}
func (x *MethodRequest) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[31]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use MethodRequest.ProtoReflect.Descriptor instead.
func (*MethodRequest) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{31}
}
func (x *MethodRequest) GetField() string {
if x != nil {
return x.Field
}
return ""
}
func (x *MethodRequest) GetBy() string {
if x != nil && x.By != nil {
return *x.By
}
return ""
}
func (x *MethodRequest) GetIf() string {
if x != nil && x.If != nil {
return *x.If
}
return ""
}
// MethodResponse define which value of the method response is referenced.
type MethodResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// name specify the unique name that can be used in a `MessageRule` / `FieldRule` for the same message for a specific field in the response.
Name *string `protobuf:"bytes,1,opt,name=name,proto3,oneof" json:"name,omitempty"`
// field name in response message.
Field *string `protobuf:"bytes,2,opt,name=field,proto3,oneof" json:"field,omitempty"`
// autobind if the value referenced by `field` is a message type,
// the value of a field with the same name and type as the field name of its own message is automatically assigned to the value of the field in the message.
// If multiple autobinds are used at the same message,
// you must explicitly use the `grpc.federation.field` option to do the binding yourself, since duplicate field names cannot be correctly determined as one.
Autobind *bool `protobuf:"varint,3,opt,name=autobind,proto3,oneof" json:"autobind,omitempty"`
}
func (x *MethodResponse) Reset() {
*x = MethodResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[32]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *MethodResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*MethodResponse) ProtoMessage() {}
func (x *MethodResponse) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[32]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use MethodResponse.ProtoReflect.Descriptor instead.
func (*MethodResponse) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{32}
}
func (x *MethodResponse) GetName() string {
if x != nil && x.Name != nil {
return *x.Name
}
return ""
}
func (x *MethodResponse) GetField() string {
if x != nil && x.Field != nil {
return *x.Field
}
return ""
}
func (x *MethodResponse) GetAutobind() bool {
if x != nil && x.Autobind != nil {
return *x.Autobind
}
return false
}
// Argument define message argument.
type Argument struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// name of the message argument.
// Use this name to refer to the message argument.
// For example, if `foo` is specified as the name, it is referenced by `$.foo`.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// by used to refer to a name or message argument defined in a MessageRule, use `$.` to refer to the message argument.
// Use CEL (https://github.com/google/cel-spec) to evaluate the expression.
// Variables are already defined in MessageRule can be used.
By *string `protobuf:"bytes,2,opt,name=by,proto3,oneof" json:"by,omitempty"`
// inline like by, it refers to the specified value and expands all fields beyond it.
// For this reason, the referenced value must always be of message type.
Inline *string `protobuf:"bytes,3,opt,name=inline,proto3,oneof" json:"inline,omitempty"`
}
func (x *Argument) Reset() {
*x = Argument{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[33]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Argument) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Argument) ProtoMessage() {}
func (x *Argument) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[33]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Argument.ProtoReflect.Descriptor instead.
func (*Argument) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{33}
}
func (x *Argument) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *Argument) GetBy() string {
if x != nil && x.By != nil {
return *x.By
}
return ""
}
func (x *Argument) GetInline() string {
if x != nil && x.Inline != nil {
return *x.Inline
}
return ""
}
// FieldRule define gRPC Federation rules for the field of message.
type FieldRule struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// If custom_resolver is true, the field binding process is to be implemented in Go.
// If there are any values retrieved by grpc.federation.message option, they are passed as arguments for custom resolver.
CustomResolver *bool `protobuf:"varint,1,opt,name=custom_resolver,json=customResolver,proto3,oneof" json:"custom_resolver,omitempty"`
// by used to refer to a name or message argument defined in a MessageRule, use `$.` to refer to the message argument.
// Use CEL (https://github.com/google/cel-spec) to evaluate the expression.
// Variables are already defined in MessageRule can be used.
By *string `protobuf:"bytes,2,opt,name=by,proto3,oneof" json:"by,omitempty"`
// alias can be used when alias is specified in grpc.federation.message option,
// and specifies the field name to be referenced among the messages specified in alias of message option.
// If the specified field has the same type or can be converted automatically, its value is assigned.
Alias *string `protobuf:"bytes,3,opt,name=alias,proto3,oneof" json:"alias,omitempty"`
// use to evaluate any one of fields. this field only available in oneof.
Oneof *FieldOneof `protobuf:"bytes,4,opt,name=oneof,proto3" json:"oneof,omitempty"`
// when defining an environment variable, use it for fields where you want to set additional options.
Env *EnvVarOption `protobuf:"bytes,5,opt,name=env,proto3" json:"env,omitempty"`
}
func (x *FieldRule) Reset() {
*x = FieldRule{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[34]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *FieldRule) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*FieldRule) ProtoMessage() {}
func (x *FieldRule) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[34]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use FieldRule.ProtoReflect.Descriptor instead.
func (*FieldRule) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{34}
}
func (x *FieldRule) GetCustomResolver() bool {
if x != nil && x.CustomResolver != nil {
return *x.CustomResolver
}
return false
}
func (x *FieldRule) GetBy() string {
if x != nil && x.By != nil {
return *x.By
}
return ""
}
func (x *FieldRule) GetAlias() string {
if x != nil && x.Alias != nil {
return *x.Alias
}
return ""
}
func (x *FieldRule) GetOneof() *FieldOneof {
if x != nil {
return x.Oneof
}
return nil
}
func (x *FieldRule) GetEnv() *EnvVarOption {
if x != nil {
return x.Env
}
return nil
}
// FieldOneof evaluate "messages" or other field only if expr is true and assign to the oneof field.
// This feature only available in oneof.
type FieldOneof struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// cond specify either `expr` or `default`. Only one `default` can be set per oneof.
//
// Types that are assignable to Cond:
//
// *FieldOneof_If
// *FieldOneof_Default
Cond isFieldOneof_Cond `protobuf_oneof:"cond"`
// def specify variables to be used in current oneof field's scope for field binding.
Def []*VariableDefinition `protobuf:"bytes,3,rep,name=def,proto3" json:"def,omitempty"`
// by used to refer to a name or message argument defined in a MessageRule, use `$.` to refer to the message argument.
// Use CEL (https://github.com/google/cel-spec) to evaluate the expression.
// Variables are already defined in MessageRule and FieldOneOf can be used.
By string `protobuf:"bytes,4,opt,name=by,proto3" json:"by,omitempty"`
}
func (x *FieldOneof) Reset() {
*x = FieldOneof{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[35]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *FieldOneof) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*FieldOneof) ProtoMessage() {}
func (x *FieldOneof) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[35]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use FieldOneof.ProtoReflect.Descriptor instead.
func (*FieldOneof) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{35}
}
func (m *FieldOneof) GetCond() isFieldOneof_Cond {
if m != nil {
return m.Cond
}
return nil
}
func (x *FieldOneof) GetIf() string {
if x, ok := x.GetCond().(*FieldOneof_If); ok {
return x.If
}
return ""
}
func (x *FieldOneof) GetDefault() bool {
if x, ok := x.GetCond().(*FieldOneof_Default); ok {
return x.Default
}
return false
}
func (x *FieldOneof) GetDef() []*VariableDefinition {
if x != nil {
return x.Def
}
return nil
}
func (x *FieldOneof) GetBy() string {
if x != nil {
return x.By
}
return ""
}
type isFieldOneof_Cond interface {
isFieldOneof_Cond()
}
type FieldOneof_If struct {
// if describes the condition to be assigned to field.
// The return value must be of type bool.
// Use CEL (https://github.com/google/cel-spec) to evaluate the expression.
// Variables are already defined in MessageRule can be used.
If string `protobuf:"bytes,1,opt,name=if,proto3,oneof"`
}
type FieldOneof_Default struct {
// default used to assign a value when none of the other fields match any of the specified expressions.
// Only one value can be defined per oneof.
Default bool `protobuf:"varint,2,opt,name=default,proto3,oneof"`
}
func (*FieldOneof_If) isFieldOneof_Cond() {}
func (*FieldOneof_Default) isFieldOneof_Cond() {}
// CELPlugin define schema of CEL plugin.
type CELPlugin struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Export []*CELPluginExport `protobuf:"bytes,1,rep,name=export,proto3" json:"export,omitempty"`
}
func (x *CELPlugin) Reset() {
*x = CELPlugin{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[36]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *CELPlugin) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CELPlugin) ProtoMessage() {}
func (x *CELPlugin) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[36]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use CELPlugin.ProtoReflect.Descriptor instead.
func (*CELPlugin) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{36}
}
func (x *CELPlugin) GetExport() []*CELPluginExport {
if x != nil {
return x.Export
}
return nil
}
// CELPluginExport describe the schema to be exposed as a CEL plugin.
type CELPluginExport struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// name is the plugin name.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// desc is the description of plugin.
// This description is used as documentation at code generation.
Desc string `protobuf:"bytes,2,opt,name=desc,proto3" json:"desc,omitempty"`
// types describe the message type you want to expose.
Types []*CELReceiverType `protobuf:"bytes,3,rep,name=types,proto3" json:"types,omitempty"`
// functions describe the definition of the function you want to expose.
Functions []*CELFunction `protobuf:"bytes,4,rep,name=functions,proto3" json:"functions,omitempty"`
// variables describe the definition of the variable you want to expose.
Variables []*CELVariable `protobuf:"bytes,5,rep,name=variables,proto3" json:"variables,omitempty"`
Capability *CELPluginCapability `protobuf:"bytes,6,opt,name=capability,proto3" json:"capability,omitempty"`
}
func (x *CELPluginExport) Reset() {
*x = CELPluginExport{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[37]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *CELPluginExport) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CELPluginExport) ProtoMessage() {}
func (x *CELPluginExport) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[37]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use CELPluginExport.ProtoReflect.Descriptor instead.
func (*CELPluginExport) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{37}
}
func (x *CELPluginExport) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *CELPluginExport) GetDesc() string {
if x != nil {
return x.Desc
}
return ""
}
func (x *CELPluginExport) GetTypes() []*CELReceiverType {
if x != nil {
return x.Types
}
return nil
}
func (x *CELPluginExport) GetFunctions() []*CELFunction {
if x != nil {
return x.Functions
}
return nil
}
func (x *CELPluginExport) GetVariables() []*CELVariable {
if x != nil {
return x.Variables
}
return nil
}
func (x *CELPluginExport) GetCapability() *CELPluginCapability {
if x != nil {
return x.Capability
}
return nil
}
// CELPluginCapability controls the permissions granted to the WebAssembly plugin.
type CELPluginCapability struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// env is the capability for environment variable.
Env *CELPluginEnvCapability `protobuf:"bytes,1,opt,name=env,proto3,oneof" json:"env,omitempty"`
// file_system is the capability for file system.
FileSystem *CELPluginFileSystemCapability `protobuf:"bytes,2,opt,name=file_system,json=fileSystem,proto3,oneof" json:"file_system,omitempty"`
// network is the capability for network.
Network *CELPluginNetworkCapability `protobuf:"bytes,3,opt,name=network,proto3,oneof" json:"network,omitempty"`
}
func (x *CELPluginCapability) Reset() {
*x = CELPluginCapability{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[38]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *CELPluginCapability) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CELPluginCapability) ProtoMessage() {}
func (x *CELPluginCapability) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[38]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use CELPluginCapability.ProtoReflect.Descriptor instead.
func (*CELPluginCapability) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{38}
}
func (x *CELPluginCapability) GetEnv() *CELPluginEnvCapability {
if x != nil {
return x.Env
}
return nil
}
func (x *CELPluginCapability) GetFileSystem() *CELPluginFileSystemCapability {
if x != nil {
return x.FileSystem
}
return nil
}
func (x *CELPluginCapability) GetNetwork() *CELPluginNetworkCapability {
if x != nil {
return x.Network
}
return nil
}
// CELPluginEnvCapability controls access to the environment variable.
type CELPluginEnvCapability struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// all allows access to all environment variables.
All bool `protobuf:"varint,1,opt,name=all,proto3" json:"all,omitempty"`
// specifies accessible names. If "all" is true, it takes precedence.
Names []string `protobuf:"bytes,2,rep,name=names,proto3" json:"names,omitempty"`
}
func (x *CELPluginEnvCapability) Reset() {
*x = CELPluginEnvCapability{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[39]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *CELPluginEnvCapability) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CELPluginEnvCapability) ProtoMessage() {}
func (x *CELPluginEnvCapability) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[39]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use CELPluginEnvCapability.ProtoReflect.Descriptor instead.
func (*CELPluginEnvCapability) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{39}
}
func (x *CELPluginEnvCapability) GetAll() bool {
if x != nil {
return x.All
}
return false
}
func (x *CELPluginEnvCapability) GetNames() []string {
if x != nil {
return x.Names
}
return nil
}
// CELPluginFileSystemCapability controls access to the file system.
type CELPluginFileSystemCapability struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// mount_path specifies the file path of the host to mount.
// If not specified, the root directory will be used.
MountPath string `protobuf:"bytes,1,opt,name=mount_path,json=mountPath,proto3" json:"mount_path,omitempty"`
}
func (x *CELPluginFileSystemCapability) Reset() {
*x = CELPluginFileSystemCapability{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[40]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *CELPluginFileSystemCapability) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CELPluginFileSystemCapability) ProtoMessage() {}
func (x *CELPluginFileSystemCapability) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[40]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use CELPluginFileSystemCapability.ProtoReflect.Descriptor instead.
func (*CELPluginFileSystemCapability) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{40}
}
func (x *CELPluginFileSystemCapability) GetMountPath() string {
if x != nil {
return x.MountPath
}
return ""
}
// CELPluginNetworkCapability sets permissions related to network access.
// This is an experimental feature.
type CELPluginNetworkCapability struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
}
func (x *CELPluginNetworkCapability) Reset() {
*x = CELPluginNetworkCapability{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[41]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *CELPluginNetworkCapability) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CELPluginNetworkCapability) ProtoMessage() {}
func (x *CELPluginNetworkCapability) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[41]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use CELPluginNetworkCapability.ProtoReflect.Descriptor instead.
func (*CELPluginNetworkCapability) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{41}
}
// CELFunction represents the CEL function definition.
type CELFunction struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// name is the function name.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// desc is the description of function.
// This description is used as documentation at code generation.
Desc string `protobuf:"bytes,2,opt,name=desc,proto3" json:"desc,omitempty"`
// args describe the definition of the function argument.
Args []*CELFunctionArgument `protobuf:"bytes,3,rep,name=args,proto3" json:"args,omitempty"`
// return describe the definition of return type of function.
Return *CELType `protobuf:"bytes,4,opt,name=return,proto3" json:"return,omitempty"`
}
func (x *CELFunction) Reset() {
*x = CELFunction{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[42]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *CELFunction) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CELFunction) ProtoMessage() {}
func (x *CELFunction) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[42]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use CELFunction.ProtoReflect.Descriptor instead.
func (*CELFunction) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{42}
}
func (x *CELFunction) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *CELFunction) GetDesc() string {
if x != nil {
return x.Desc
}
return ""
}
func (x *CELFunction) GetArgs() []*CELFunctionArgument {
if x != nil {
return x.Args
}
return nil
}
func (x *CELFunction) GetReturn() *CELType {
if x != nil {
return x.Return
}
return nil
}
// CELReceiverType represents methods tied to the message.
type CELReceiverType struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// name is the message name.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// desc is the description of plugin.
// This description is used as documentation at code generation.
Desc string `protobuf:"bytes,2,opt,name=desc,proto3" json:"desc,omitempty"`
// methods describe the definition of the method for the message.
Methods []*CELFunction `protobuf:"bytes,3,rep,name=methods,proto3" json:"methods,omitempty"`
}
func (x *CELReceiverType) Reset() {
*x = CELReceiverType{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[43]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *CELReceiverType) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CELReceiverType) ProtoMessage() {}
func (x *CELReceiverType) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[43]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use CELReceiverType.ProtoReflect.Descriptor instead.
func (*CELReceiverType) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{43}
}
func (x *CELReceiverType) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *CELReceiverType) GetDesc() string {
if x != nil {
return x.Desc
}
return ""
}
func (x *CELReceiverType) GetMethods() []*CELFunction {
if x != nil {
return x.Methods
}
return nil
}
// CELFunctionArgument represents the function argument.
type CELFunctionArgument struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// name is the argument value name.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// desc is the description of plugin.
// This description is used as documentation at code generation.
Desc string `protobuf:"bytes,2,opt,name=desc,proto3" json:"desc,omitempty"`
// type is the argument type.
Type *CELType `protobuf:"bytes,3,opt,name=type,proto3" json:"type,omitempty"`
}
func (x *CELFunctionArgument) Reset() {
*x = CELFunctionArgument{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[44]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *CELFunctionArgument) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CELFunctionArgument) ProtoMessage() {}
func (x *CELFunctionArgument) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[44]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use CELFunctionArgument.ProtoReflect.Descriptor instead.
func (*CELFunctionArgument) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{44}
}
func (x *CELFunctionArgument) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *CELFunctionArgument) GetDesc() string {
if x != nil {
return x.Desc
}
return ""
}
func (x *CELFunctionArgument) GetType() *CELType {
if x != nil {
return x.Type
}
return nil
}
// CELType represents type information for CEL plugin interface.
type CELType struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Types that are assignable to Type:
//
// *CELType_Kind
// *CELType_Repeated
// *CELType_Map
// *CELType_Message
// *CELType_Enum
Type isCELType_Type `protobuf_oneof:"type"`
}
func (x *CELType) Reset() {
*x = CELType{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[45]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *CELType) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CELType) ProtoMessage() {}
func (x *CELType) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[45]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use CELType.ProtoReflect.Descriptor instead.
func (*CELType) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{45}
}
func (m *CELType) GetType() isCELType_Type {
if m != nil {
return m.Type
}
return nil
}
func (x *CELType) GetKind() TypeKind {
if x, ok := x.GetType().(*CELType_Kind); ok {
return x.Kind
}
return TypeKind_UNKNOWN
}
func (x *CELType) GetRepeated() *CELType {
if x, ok := x.GetType().(*CELType_Repeated); ok {
return x.Repeated
}
return nil
}
func (x *CELType) GetMap() *CELMapType {
if x, ok := x.GetType().(*CELType_Map); ok {
return x.Map
}
return nil
}
func (x *CELType) GetMessage() string {
if x, ok := x.GetType().(*CELType_Message); ok {
return x.Message
}
return ""
}
func (x *CELType) GetEnum() string {
if x, ok := x.GetType().(*CELType_Enum); ok {
return x.Enum
}
return ""
}
type isCELType_Type interface {
isCELType_Type()
}
type CELType_Kind struct {
// kind is used when the type is a primitive type.
Kind TypeKind `protobuf:"varint,1,opt,name=kind,proto3,enum=grpc.federation.TypeKind,oneof"`
}
type CELType_Repeated struct {
// repeated is used when the type is a repeated type.
Repeated *CELType `protobuf:"bytes,2,opt,name=repeated,proto3,oneof"`
}
type CELType_Map struct {
// map is used when the type is a map type.
Map *CELMapType `protobuf:"bytes,3,opt,name=map,proto3,oneof"`
}
type CELType_Message struct {
// message is a fqdn to the message type.
Message string `protobuf:"bytes,4,opt,name=message,proto3,oneof"`
}
type CELType_Enum struct {
// enum is a fqdn to the enum type.
Enum string `protobuf:"bytes,5,opt,name=enum,proto3,oneof"`
}
func (*CELType_Kind) isCELType_Type() {}
func (*CELType_Repeated) isCELType_Type() {}
func (*CELType_Map) isCELType_Type() {}
func (*CELType_Message) isCELType_Type() {}
func (*CELType_Enum) isCELType_Type() {}
// CELMapType represents map type.
type CELMapType struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// key represents map's key type.
Key *CELType `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
// value represents map's value type.
Value *CELType `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
}
func (x *CELMapType) Reset() {
*x = CELMapType{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[46]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *CELMapType) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CELMapType) ProtoMessage() {}
func (x *CELMapType) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[46]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use CELMapType.ProtoReflect.Descriptor instead.
func (*CELMapType) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{46}
}
func (x *CELMapType) GetKey() *CELType {
if x != nil {
return x.Key
}
return nil
}
func (x *CELMapType) GetValue() *CELType {
if x != nil {
return x.Value
}
return nil
}
// CELVariable represents CEL variable.
type CELVariable struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// name is the variable name.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// desc is the description of plugin.
// This description is used as documentation at code generation.
Desc string `protobuf:"bytes,2,opt,name=desc,proto3" json:"desc,omitempty"`
// type is the variable type.
Type *CELType `protobuf:"bytes,3,opt,name=type,proto3" json:"type,omitempty"`
}
func (x *CELVariable) Reset() {
*x = CELVariable{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[47]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *CELVariable) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CELVariable) ProtoMessage() {}
func (x *CELVariable) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[47]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use CELVariable.ProtoReflect.Descriptor instead.
func (*CELVariable) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{47}
}
func (x *CELVariable) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *CELVariable) GetDesc() string {
if x != nil {
return x.Desc
}
return ""
}
func (x *CELVariable) GetType() *CELType {
if x != nil {
return x.Type
}
return nil
}
var file_grpc_federation_federation_proto_extTypes = []protoimpl.ExtensionInfo{
{
ExtendedType: (*descriptorpb.FileOptions)(nil),
ExtensionType: (*FileRule)(nil),
Field: 1187,
Name: "grpc.federation.file",
Tag: "bytes,1187,opt,name=file",
Filename: "grpc/federation/federation.proto",
},
{
ExtendedType: (*descriptorpb.ServiceOptions)(nil),
ExtensionType: (*ServiceRule)(nil),
Field: 1187,
Name: "grpc.federation.service",
Tag: "bytes,1187,opt,name=service",
Filename: "grpc/federation/federation.proto",
},
{
ExtendedType: (*descriptorpb.MethodOptions)(nil),
ExtensionType: (*MethodRule)(nil),
Field: 1187,
Name: "grpc.federation.method",
Tag: "bytes,1187,opt,name=method",
Filename: "grpc/federation/federation.proto",
},
{
ExtendedType: (*descriptorpb.MessageOptions)(nil),
ExtensionType: (*MessageRule)(nil),
Field: 1187,
Name: "grpc.federation.message",
Tag: "bytes,1187,opt,name=message",
Filename: "grpc/federation/federation.proto",
},
{
ExtendedType: (*descriptorpb.FieldOptions)(nil),
ExtensionType: (*FieldRule)(nil),
Field: 1187,
Name: "grpc.federation.field",
Tag: "bytes,1187,opt,name=field",
Filename: "grpc/federation/federation.proto",
},
{
ExtendedType: (*descriptorpb.EnumOptions)(nil),
ExtensionType: (*EnumRule)(nil),
Field: 1187,
Name: "grpc.federation.enum",
Tag: "bytes,1187,opt,name=enum",
Filename: "grpc/federation/federation.proto",
},
{
ExtendedType: (*descriptorpb.EnumValueOptions)(nil),
ExtensionType: (*EnumValueRule)(nil),
Field: 1187,
Name: "grpc.federation.enum_value",
Tag: "bytes,1187,opt,name=enum_value",
Filename: "grpc/federation/federation.proto",
},
{
ExtendedType: (*descriptorpb.OneofOptions)(nil),
ExtensionType: (*OneofRule)(nil),
Field: 1187,
Name: "grpc.federation.oneof",
Tag: "bytes,1187,opt,name=oneof",
Filename: "grpc/federation/federation.proto",
},
}
// Extension fields to descriptorpb.FileOptions.
var (
// optional grpc.federation.FileRule file = 1187;
E_File = &file_grpc_federation_federation_proto_extTypes[0]
)
// Extension fields to descriptorpb.ServiceOptions.
var (
// optional grpc.federation.ServiceRule service = 1187;
E_Service = &file_grpc_federation_federation_proto_extTypes[1]
)
// Extension fields to descriptorpb.MethodOptions.
var (
// optional grpc.federation.MethodRule method = 1187;
E_Method = &file_grpc_federation_federation_proto_extTypes[2]
)
// Extension fields to descriptorpb.MessageOptions.
var (
// optional grpc.federation.MessageRule message = 1187;
E_Message = &file_grpc_federation_federation_proto_extTypes[3]
)
// Extension fields to descriptorpb.FieldOptions.
var (
// optional grpc.federation.FieldRule field = 1187;
E_Field = &file_grpc_federation_federation_proto_extTypes[4]
)
// Extension fields to descriptorpb.EnumOptions.
var (
// optional grpc.federation.EnumRule enum = 1187;
E_Enum = &file_grpc_federation_federation_proto_extTypes[5]
)
// Extension fields to descriptorpb.EnumValueOptions.
var (
// optional grpc.federation.EnumValueRule enum_value = 1187;
E_EnumValue = &file_grpc_federation_federation_proto_extTypes[6]
)
// Extension fields to descriptorpb.OneofOptions.
var (
// optional grpc.federation.OneofRule oneof = 1187;
E_Oneof = &file_grpc_federation_federation_proto_extTypes[7]
)
var File_grpc_federation_federation_proto protoreflect.FileDescriptor
var file_grpc_federation_federation_proto_rawDesc = []byte{
0x0a, 0x20, 0x67, 0x72, 0x70, 0x63, 0x2f, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f,
0x6e, 0x2f, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f,
0x74, 0x6f, 0x12, 0x0f, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74,
0x69, 0x6f, 0x6e, 0x1a, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x2e,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x15, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x72, 0x70,
0x63, 0x2f, 0x63, 0x6f, 0x64, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f,
0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x72, 0x70, 0x63, 0x2f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x64,
0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x67, 0x72,
0x70, 0x63, 0x2f, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x70, 0x72,
0x69, 0x76, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1a, 0x67, 0x72, 0x70,
0x63, 0x2f, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x74, 0x69, 0x6d,
0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x56, 0x0a, 0x08, 0x46, 0x69, 0x6c, 0x65, 0x52,
0x75, 0x6c, 0x65, 0x12, 0x32, 0x0a, 0x06, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x18, 0x01, 0x20,
0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72,
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x43, 0x45, 0x4c, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x52,
0x06, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x69, 0x6d, 0x70, 0x6f, 0x72,
0x74, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x69, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x22,
0x20, 0x0a, 0x08, 0x45, 0x6e, 0x75, 0x6d, 0x52, 0x75, 0x6c, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x61,
0x6c, 0x69, 0x61, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x61, 0x6c, 0x69, 0x61,
0x73, 0x22, 0xb4, 0x01, 0x0a, 0x0d, 0x45, 0x6e, 0x75, 0x6d, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52,
0x75, 0x6c, 0x65, 0x12, 0x1d, 0x0a, 0x07, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x18, 0x01,
0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x07, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x88,
0x01, 0x01, 0x12, 0x14, 0x0a, 0x05, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28,
0x09, 0x52, 0x05, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x12, 0x37, 0x0a, 0x04, 0x61, 0x74, 0x74, 0x72,
0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65,
0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x56, 0x61, 0x6c,
0x75, 0x65, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x52, 0x04, 0x61, 0x74, 0x74,
0x72, 0x12, 0x1d, 0x0a, 0x07, 0x6e, 0x6f, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x18, 0x04, 0x20, 0x01,
0x28, 0x08, 0x48, 0x01, 0x52, 0x07, 0x6e, 0x6f, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x88, 0x01, 0x01,
0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x42, 0x0a, 0x0a, 0x08,
0x5f, 0x6e, 0x6f, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x22, 0x3e, 0x0a, 0x12, 0x45, 0x6e, 0x75, 0x6d,
0x56, 0x61, 0x6c, 0x75, 0x65, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 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, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28,
0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x0b, 0x0a, 0x09, 0x4f, 0x6e, 0x65, 0x6f,
0x66, 0x52, 0x75, 0x6c, 0x65, 0x22, 0x69, 0x0a, 0x0b, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65,
0x52, 0x75, 0x6c, 0x65, 0x12, 0x26, 0x0a, 0x03, 0x65, 0x6e, 0x76, 0x18, 0x01, 0x20, 0x01, 0x28,
0x0b, 0x32, 0x14, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74,
0x69, 0x6f, 0x6e, 0x2e, 0x45, 0x6e, 0x76, 0x52, 0x03, 0x65, 0x6e, 0x76, 0x12, 0x32, 0x0a, 0x03,
0x76, 0x61, 0x72, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x67, 0x72, 0x70, 0x63,
0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x53, 0x65, 0x72, 0x76,
0x69, 0x63, 0x65, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x03, 0x76, 0x61, 0x72,
0x22, 0x4a, 0x0a, 0x03, 0x45, 0x6e, 0x76, 0x12, 0x29, 0x0a, 0x03, 0x76, 0x61, 0x72, 0x18, 0x01,
0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65,
0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x45, 0x6e, 0x76, 0x56, 0x61, 0x72, 0x52, 0x03, 0x76,
0x61, 0x72, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20,
0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x8b, 0x03, 0x0a,
0x0f, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65,
0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01,
0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x13, 0x0a, 0x02, 0x69, 0x66, 0x18,
0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x02, 0x52, 0x02, 0x69, 0x66, 0x88, 0x01, 0x01, 0x12, 0x10,
0x0a, 0x02, 0x62, 0x79, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x02, 0x62, 0x79,
0x12, 0x2c, 0x0a, 0x03, 0x6d, 0x61, 0x70, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e,
0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e,
0x4d, 0x61, 0x70, 0x45, 0x78, 0x70, 0x72, 0x48, 0x00, 0x52, 0x03, 0x6d, 0x61, 0x70, 0x12, 0x38,
0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32,
0x1c, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f,
0x6e, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x45, 0x78, 0x70, 0x72, 0x48, 0x00, 0x52,
0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x50, 0x0a, 0x0a, 0x76, 0x61, 0x6c, 0x69,
0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x67,
0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x53,
0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x56, 0x61,
0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x78, 0x70, 0x72, 0x48, 0x00, 0x52, 0x0a,
0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2f, 0x0a, 0x04, 0x65, 0x6e,
0x75, 0x6d, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e,
0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x45,
0x78, 0x70, 0x72, 0x48, 0x00, 0x52, 0x04, 0x65, 0x6e, 0x75, 0x6d, 0x12, 0x35, 0x0a, 0x06, 0x73,
0x77, 0x69, 0x74, 0x63, 0x68, 0x18, 0x10, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x72,
0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x53, 0x77,
0x69, 0x74, 0x63, 0x68, 0x45, 0x78, 0x70, 0x72, 0x48, 0x00, 0x52, 0x06, 0x73, 0x77, 0x69, 0x74,
0x63, 0x68, 0x42, 0x06, 0x0a, 0x04, 0x65, 0x78, 0x70, 0x72, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e,
0x61, 0x6d, 0x65, 0x42, 0x05, 0x0a, 0x03, 0x5f, 0x69, 0x66, 0x22, 0x49, 0x0a, 0x1d, 0x53, 0x65,
0x72, 0x76, 0x69, 0x63, 0x65, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x56, 0x61, 0x6c,
0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x78, 0x70, 0x72, 0x12, 0x0e, 0x0a, 0x02, 0x69,
0x66, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x66, 0x12, 0x18, 0x0a, 0x07, 0x6d,
0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65,
0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x91, 0x01, 0x0a, 0x06, 0x45, 0x6e, 0x76, 0x56, 0x61, 0x72,
0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04,
0x6e, 0x61, 0x6d, 0x65, 0x12, 0x2c, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01,
0x28, 0x0b, 0x32, 0x18, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61,
0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x45, 0x6e, 0x76, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79,
0x70, 0x65, 0x12, 0x3a, 0x0a, 0x06, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01,
0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61,
0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x45, 0x6e, 0x76, 0x56, 0x61, 0x72, 0x4f, 0x70, 0x74, 0x69, 0x6f,
0x6e, 0x48, 0x00, 0x52, 0x06, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x88, 0x01, 0x01, 0x42, 0x09,
0x0a, 0x07, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xab, 0x01, 0x0a, 0x07, 0x45, 0x6e,
0x76, 0x54, 0x79, 0x70, 0x65, 0x12, 0x2f, 0x0a, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x18, 0x01, 0x20,
0x01, 0x28, 0x0e, 0x32, 0x19, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72,
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x4b, 0x69, 0x6e, 0x64, 0x48, 0x00,
0x52, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x12, 0x36, 0x0a, 0x08, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74,
0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e,
0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x45, 0x6e, 0x76, 0x54, 0x79,
0x70, 0x65, 0x48, 0x00, 0x52, 0x08, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x12, 0x2f,
0x0a, 0x03, 0x6d, 0x61, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x72,
0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x45, 0x6e,
0x76, 0x4d, 0x61, 0x70, 0x54, 0x79, 0x70, 0x65, 0x48, 0x00, 0x52, 0x03, 0x6d, 0x61, 0x70, 0x42,
0x06, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x22, 0x68, 0x0a, 0x0a, 0x45, 0x6e, 0x76, 0x4d, 0x61,
0x70, 0x54, 0x79, 0x70, 0x65, 0x12, 0x2a, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01,
0x28, 0x0b, 0x32, 0x18, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61,
0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x45, 0x6e, 0x76, 0x54, 0x79, 0x70, 0x65, 0x52, 0x03, 0x6b, 0x65,
0x79, 0x12, 0x2e, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b,
0x32, 0x18, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69,
0x6f, 0x6e, 0x2e, 0x45, 0x6e, 0x76, 0x54, 0x79, 0x70, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75,
0x65, 0x22, 0xc3, 0x01, 0x0a, 0x0c, 0x45, 0x6e, 0x76, 0x56, 0x61, 0x72, 0x4f, 0x70, 0x74, 0x69,
0x6f, 0x6e, 0x12, 0x21, 0x0a, 0x09, 0x61, 0x6c, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x74, 0x65, 0x18,
0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x09, 0x61, 0x6c, 0x74, 0x65, 0x72, 0x6e, 0x61,
0x74, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1d, 0x0a, 0x07, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74,
0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x07, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c,
0x74, 0x88, 0x01, 0x01, 0x12, 0x1f, 0x0a, 0x08, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64,
0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x48, 0x02, 0x52, 0x08, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72,
0x65, 0x64, 0x88, 0x01, 0x01, 0x12, 0x1d, 0x0a, 0x07, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x64,
0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x48, 0x03, 0x52, 0x07, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65,
0x64, 0x88, 0x01, 0x01, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x61, 0x6c, 0x74, 0x65, 0x72, 0x6e, 0x61,
0x74, 0x65, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x42, 0x0b,
0x0a, 0x09, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x42, 0x0a, 0x0a, 0x08, 0x5f,
0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x64, 0x22, 0x65, 0x0a, 0x0a, 0x4d, 0x65, 0x74, 0x68, 0x6f,
0x64, 0x52, 0x75, 0x6c, 0x65, 0x12, 0x1d, 0x0a, 0x07, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74,
0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x07, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75,
0x74, 0x88, 0x01, 0x01, 0x12, 0x1f, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e,
0x73, 0x65, 0x88, 0x01, 0x01, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75,
0x74, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x9c,
0x01, 0x0a, 0x0b, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x75, 0x6c, 0x65, 0x12, 0x35,
0x0a, 0x03, 0x64, 0x65, 0x66, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x67, 0x72,
0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x56, 0x61,
0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e,
0x52, 0x03, 0x64, 0x65, 0x66, 0x12, 0x2c, 0x0a, 0x0f, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x5f,
0x72, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00,
0x52, 0x0e, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x52, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x72,
0x88, 0x01, 0x01, 0x12, 0x14, 0x0a, 0x05, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x18, 0x03, 0x20, 0x03,
0x28, 0x09, 0x52, 0x05, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x42, 0x12, 0x0a, 0x10, 0x5f, 0x63, 0x75,
0x73, 0x74, 0x6f, 0x6d, 0x5f, 0x72, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x72, 0x22, 0xde, 0x03,
0x0a, 0x12, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69,
0x74, 0x69, 0x6f, 0x6e, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01,
0x28, 0x09, 0x48, 0x01, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x13, 0x0a,
0x02, 0x69, 0x66, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x02, 0x52, 0x02, 0x69, 0x66, 0x88,
0x01, 0x01, 0x12, 0x1f, 0x0a, 0x08, 0x61, 0x75, 0x74, 0x6f, 0x62, 0x69, 0x6e, 0x64, 0x18, 0x03,
0x20, 0x01, 0x28, 0x08, 0x48, 0x03, 0x52, 0x08, 0x61, 0x75, 0x74, 0x6f, 0x62, 0x69, 0x6e, 0x64,
0x88, 0x01, 0x01, 0x12, 0x10, 0x0a, 0x02, 0x62, 0x79, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x48,
0x00, 0x52, 0x02, 0x62, 0x79, 0x12, 0x2c, 0x0a, 0x03, 0x6d, 0x61, 0x70, 0x18, 0x0c, 0x20, 0x01,
0x28, 0x0b, 0x32, 0x18, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61,
0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x4d, 0x61, 0x70, 0x45, 0x78, 0x70, 0x72, 0x48, 0x00, 0x52, 0x03,
0x6d, 0x61, 0x70, 0x12, 0x38, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x0d,
0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65,
0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x45, 0x78,
0x70, 0x72, 0x48, 0x00, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x2f, 0x0a,
0x04, 0x63, 0x61, 0x6c, 0x6c, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x72,
0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x43, 0x61,
0x6c, 0x6c, 0x45, 0x78, 0x70, 0x72, 0x48, 0x00, 0x52, 0x04, 0x63, 0x61, 0x6c, 0x6c, 0x12, 0x41,
0x0a, 0x0a, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x0f, 0x20, 0x01,
0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61,
0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45,
0x78, 0x70, 0x72, 0x48, 0x00, 0x52, 0x0a, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f,
0x6e, 0x12, 0x2f, 0x0a, 0x04, 0x65, 0x6e, 0x75, 0x6d, 0x18, 0x10, 0x20, 0x01, 0x28, 0x0b, 0x32,
0x19, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f,
0x6e, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x45, 0x78, 0x70, 0x72, 0x48, 0x00, 0x52, 0x04, 0x65, 0x6e,
0x75, 0x6d, 0x12, 0x35, 0x0a, 0x06, 0x73, 0x77, 0x69, 0x74, 0x63, 0x68, 0x18, 0x11, 0x20, 0x01,
0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61,
0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x53, 0x77, 0x69, 0x74, 0x63, 0x68, 0x45, 0x78, 0x70, 0x72, 0x48,
0x00, 0x52, 0x06, 0x73, 0x77, 0x69, 0x74, 0x63, 0x68, 0x42, 0x06, 0x0a, 0x04, 0x65, 0x78, 0x70,
0x72, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x05, 0x0a, 0x03, 0x5f, 0x69,
0x66, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x61, 0x75, 0x74, 0x6f, 0x62, 0x69, 0x6e, 0x64, 0x22, 0xc5,
0x01, 0x0a, 0x07, 0x4d, 0x61, 0x70, 0x45, 0x78, 0x70, 0x72, 0x12, 0x35, 0x0a, 0x08, 0x69, 0x74,
0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67,
0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x49,
0x74, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x08, 0x69, 0x74, 0x65, 0x72, 0x61, 0x74, 0x6f,
0x72, 0x12, 0x10, 0x0a, 0x02, 0x62, 0x79, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52,
0x02, 0x62, 0x79, 0x12, 0x38, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x0c,
0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65,
0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x45, 0x78,
0x70, 0x72, 0x48, 0x00, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x2f, 0x0a,
0x04, 0x65, 0x6e, 0x75, 0x6d, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x72,
0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x45, 0x6e,
0x75, 0x6d, 0x45, 0x78, 0x70, 0x72, 0x48, 0x00, 0x52, 0x04, 0x65, 0x6e, 0x75, 0x6d, 0x42, 0x06,
0x0a, 0x04, 0x65, 0x78, 0x70, 0x72, 0x22, 0x30, 0x0a, 0x08, 0x49, 0x74, 0x65, 0x72, 0x61, 0x74,
0x6f, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x73, 0x72, 0x63, 0x18, 0x02, 0x20,
0x01, 0x28, 0x09, 0x52, 0x03, 0x73, 0x72, 0x63, 0x22, 0x50, 0x0a, 0x0b, 0x4d, 0x65, 0x73, 0x73,
0x61, 0x67, 0x65, 0x45, 0x78, 0x70, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18,
0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x2d, 0x0a, 0x04, 0x61,
0x72, 0x67, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x72, 0x70, 0x63,
0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x41, 0x72, 0x67, 0x75,
0x6d, 0x65, 0x6e, 0x74, 0x52, 0x04, 0x61, 0x72, 0x67, 0x73, 0x22, 0x2e, 0x0a, 0x08, 0x45, 0x6e,
0x75, 0x6d, 0x45, 0x78, 0x70, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01,
0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x62, 0x79,
0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x62, 0x79, 0x22, 0xf3, 0x02, 0x0a, 0x08, 0x43,
0x61, 0x6c, 0x6c, 0x45, 0x78, 0x70, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f,
0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12,
0x38, 0x0a, 0x07, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b,
0x32, 0x1e, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69,
0x6f, 0x6e, 0x2e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
0x52, 0x07, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x07, 0x74, 0x69, 0x6d,
0x65, 0x6f, 0x75, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x07, 0x74, 0x69,
0x6d, 0x65, 0x6f, 0x75, 0x74, 0x88, 0x01, 0x01, 0x12, 0x37, 0x0a, 0x05, 0x72, 0x65, 0x74, 0x72,
0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66,
0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x52, 0x65, 0x74, 0x72, 0x79, 0x50,
0x6f, 0x6c, 0x69, 0x63, 0x79, 0x48, 0x01, 0x52, 0x05, 0x72, 0x65, 0x74, 0x72, 0x79, 0x88, 0x01,
0x01, 0x12, 0x30, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b,
0x32, 0x1a, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69,
0x6f, 0x6e, 0x2e, 0x47, 0x52, 0x50, 0x43, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x05, 0x65, 0x72,
0x72, 0x6f, 0x72, 0x12, 0x3c, 0x0a, 0x06, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x06, 0x20,
0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72,
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x47, 0x52, 0x50, 0x43, 0x43, 0x61, 0x6c, 0x6c, 0x4f, 0x70,
0x74, 0x69, 0x6f, 0x6e, 0x48, 0x02, 0x52, 0x06, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x88, 0x01,
0x01, 0x12, 0x1f, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x07, 0x20,
0x01, 0x28, 0x09, 0x48, 0x03, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x88,
0x01, 0x01, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x42, 0x08,
0x0a, 0x06, 0x5f, 0x72, 0x65, 0x74, 0x72, 0x79, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6f, 0x70, 0x74,
0x69, 0x6f, 0x6e, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61,
0x22, 0x7f, 0x0a, 0x0a, 0x53, 0x77, 0x69, 0x74, 0x63, 0x68, 0x45, 0x78, 0x70, 0x72, 0x12, 0x33,
0x0a, 0x04, 0x63, 0x61, 0x73, 0x65, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x67,
0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x53,
0x77, 0x69, 0x74, 0x63, 0x68, 0x43, 0x61, 0x73, 0x65, 0x45, 0x78, 0x70, 0x72, 0x52, 0x04, 0x63,
0x61, 0x73, 0x65, 0x12, 0x3c, 0x0a, 0x07, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x18, 0x02,
0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65,
0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x53, 0x77, 0x69, 0x74, 0x63, 0x68, 0x44, 0x65, 0x66,
0x61, 0x75, 0x6c, 0x74, 0x45, 0x78, 0x70, 0x72, 0x52, 0x07, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c,
0x74, 0x22, 0x71, 0x0a, 0x0e, 0x53, 0x77, 0x69, 0x74, 0x63, 0x68, 0x43, 0x61, 0x73, 0x65, 0x45,
0x78, 0x70, 0x72, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x66, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
0x02, 0x69, 0x66, 0x12, 0x35, 0x0a, 0x03, 0x64, 0x65, 0x66, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b,
0x32, 0x23, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69,
0x6f, 0x6e, 0x2e, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x44, 0x65, 0x66, 0x69, 0x6e,
0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x03, 0x64, 0x65, 0x66, 0x12, 0x10, 0x0a, 0x02, 0x62, 0x79,
0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x02, 0x62, 0x79, 0x42, 0x06, 0x0a, 0x04,
0x65, 0x78, 0x70, 0x72, 0x22, 0x64, 0x0a, 0x11, 0x53, 0x77, 0x69, 0x74, 0x63, 0x68, 0x44, 0x65,
0x66, 0x61, 0x75, 0x6c, 0x74, 0x45, 0x78, 0x70, 0x72, 0x12, 0x35, 0x0a, 0x03, 0x64, 0x65, 0x66,
0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65,
0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c,
0x65, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x03, 0x64, 0x65, 0x66,
0x12, 0x10, 0x0a, 0x02, 0x62, 0x79, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x02,
0x62, 0x79, 0x42, 0x06, 0x0a, 0x04, 0x65, 0x78, 0x70, 0x72, 0x22, 0x86, 0x04, 0x0a, 0x09, 0x47,
0x52, 0x50, 0x43, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x35, 0x0a, 0x03, 0x64, 0x65, 0x66, 0x18,
0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64,
0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65,
0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x03, 0x64, 0x65, 0x66, 0x12,
0x13, 0x0a, 0x02, 0x69, 0x66, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x02, 0x69,
0x66, 0x88, 0x01, 0x01, 0x12, 0x29, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x03, 0x20, 0x01,
0x28, 0x0e, 0x32, 0x10, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x72, 0x70, 0x63, 0x2e,
0x43, 0x6f, 0x64, 0x65, 0x48, 0x01, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x88, 0x01, 0x01, 0x12,
0x1d, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09,
0x48, 0x02, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x88, 0x01, 0x01, 0x12, 0x3a,
0x0a, 0x07, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32,
0x20, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f,
0x6e, 0x2e, 0x47, 0x52, 0x50, 0x43, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x44, 0x65, 0x74, 0x61, 0x69,
0x6c, 0x52, 0x07, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x12, 0x1b, 0x0a, 0x06, 0x69, 0x67,
0x6e, 0x6f, 0x72, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x48, 0x03, 0x52, 0x06, 0x69, 0x67,
0x6e, 0x6f, 0x72, 0x65, 0x88, 0x01, 0x01, 0x12, 0x33, 0x0a, 0x13, 0x69, 0x67, 0x6e, 0x6f, 0x72,
0x65, 0x5f, 0x61, 0x6e, 0x64, 0x5f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x07,
0x20, 0x01, 0x28, 0x09, 0x48, 0x04, 0x52, 0x11, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x41, 0x6e,
0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x88, 0x01, 0x01, 0x12, 0x45, 0x0a, 0x09,
0x6c, 0x6f, 0x67, 0x5f, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0e, 0x32,
0x23, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f,
0x6e, 0x2e, 0x47, 0x52, 0x50, 0x43, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x2e, 0x4c, 0x6f, 0x67, 0x4c,
0x65, 0x76, 0x65, 0x6c, 0x48, 0x05, 0x52, 0x08, 0x6c, 0x6f, 0x67, 0x4c, 0x65, 0x76, 0x65, 0x6c,
0x88, 0x01, 0x01, 0x22, 0x41, 0x0a, 0x08, 0x4c, 0x6f, 0x67, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x12,
0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05,
0x44, 0x45, 0x42, 0x55, 0x47, 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, 0x49, 0x4e, 0x46, 0x4f, 0x10,
0x02, 0x12, 0x08, 0x0a, 0x04, 0x57, 0x41, 0x52, 0x4e, 0x10, 0x03, 0x12, 0x09, 0x0a, 0x05, 0x45,
0x52, 0x52, 0x4f, 0x52, 0x10, 0x04, 0x42, 0x05, 0x0a, 0x03, 0x5f, 0x69, 0x66, 0x42, 0x07, 0x0a,
0x05, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61,
0x67, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x42, 0x16, 0x0a,
0x14, 0x5f, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x5f, 0x61, 0x6e, 0x64, 0x5f, 0x72, 0x65, 0x73,
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x6c, 0x6f, 0x67, 0x5f, 0x6c, 0x65,
0x76, 0x65, 0x6c, 0x22, 0xfa, 0x05, 0x0a, 0x0f, 0x47, 0x52, 0x50, 0x43, 0x45, 0x72, 0x72, 0x6f,
0x72, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x66, 0x18, 0x01, 0x20,
0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x66, 0x12, 0x35, 0x0a, 0x03, 0x64, 0x65, 0x66, 0x18, 0x02,
0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65,
0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x44,
0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x03, 0x64, 0x65, 0x66, 0x12, 0x36,
0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32,
0x1c, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f,
0x6e, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x45, 0x78, 0x70, 0x72, 0x52, 0x07, 0x6d,
0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x34, 0x0a, 0x0a, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f,
0x69, 0x6e, 0x66, 0x6f, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x67, 0x6f, 0x6f,
0x67, 0x6c, 0x65, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x49, 0x6e, 0x66,
0x6f, 0x52, 0x09, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x34, 0x0a, 0x0a,
0x72, 0x65, 0x74, 0x72, 0x79, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b,
0x32, 0x15, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x52, 0x65,
0x74, 0x72, 0x79, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x09, 0x72, 0x65, 0x74, 0x72, 0x79, 0x49, 0x6e,
0x66, 0x6f, 0x12, 0x34, 0x0a, 0x0a, 0x64, 0x65, 0x62, 0x75, 0x67, 0x5f, 0x69, 0x6e, 0x66, 0x6f,
0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e,
0x72, 0x70, 0x63, 0x2e, 0x44, 0x65, 0x62, 0x75, 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x09, 0x64,
0x65, 0x62, 0x75, 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x3d, 0x0a, 0x0d, 0x71, 0x75, 0x6f, 0x74,
0x61, 0x5f, 0x66, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32,
0x18, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x51, 0x75, 0x6f,
0x74, 0x61, 0x46, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x52, 0x0c, 0x71, 0x75, 0x6f, 0x74, 0x61,
0x46, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x12, 0x52, 0x0a, 0x14, 0x70, 0x72, 0x65, 0x63, 0x6f,
0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x66, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x18,
0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x72,
0x70, 0x63, 0x2e, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x46,
0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x52, 0x13, 0x70, 0x72, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x69,
0x74, 0x69, 0x6f, 0x6e, 0x46, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x12, 0x37, 0x0a, 0x0b, 0x62,
0x61, 0x64, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b,
0x32, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x42, 0x61,
0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x0a, 0x62, 0x61, 0x64, 0x52, 0x65, 0x71,
0x75, 0x65, 0x73, 0x74, 0x12, 0x3a, 0x0a, 0x0c, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f,
0x69, 0x6e, 0x66, 0x6f, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f,
0x67, 0x6c, 0x65, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x49,
0x6e, 0x66, 0x6f, 0x52, 0x0b, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, 0x6e, 0x66, 0x6f,
0x12, 0x3d, 0x0a, 0x0d, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x69, 0x6e, 0x66,
0x6f, 0x18, 0x0b, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,
0x2e, 0x72, 0x70, 0x63, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x6e, 0x66,
0x6f, 0x52, 0x0c, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12,
0x24, 0x0a, 0x04, 0x68, 0x65, 0x6c, 0x70, 0x18, 0x0c, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e,
0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x48, 0x65, 0x6c, 0x70, 0x52,
0x04, 0x68, 0x65, 0x6c, 0x70, 0x12, 0x49, 0x0a, 0x11, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x69, 0x7a,
0x65, 0x64, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x0d, 0x20, 0x03, 0x28, 0x0b,
0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x6f,
0x63, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x10,
0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65,
0x12, 0x0e, 0x0a, 0x02, 0x62, 0x79, 0x18, 0x0e, 0x20, 0x03, 0x28, 0x09, 0x52, 0x02, 0x62, 0x79,
0x22, 0xc7, 0x03, 0x0a, 0x0e, 0x47, 0x52, 0x50, 0x43, 0x43, 0x61, 0x6c, 0x6c, 0x4f, 0x70, 0x74,
0x69, 0x6f, 0x6e, 0x12, 0x2c, 0x0a, 0x0f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x5f, 0x73,
0x75, 0x62, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0e,
0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x53, 0x75, 0x62, 0x74, 0x79, 0x70, 0x65, 0x88, 0x01,
0x01, 0x12, 0x1b, 0x0a, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28,
0x09, 0x48, 0x01, 0x52, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x88, 0x01, 0x01, 0x12, 0x37,
0x0a, 0x16, 0x6d, 0x61, 0x78, 0x5f, 0x63, 0x61, 0x6c, 0x6c, 0x5f, 0x72, 0x65, 0x63, 0x76, 0x5f,
0x6d, 0x73, 0x67, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x48, 0x02,
0x52, 0x12, 0x6d, 0x61, 0x78, 0x43, 0x61, 0x6c, 0x6c, 0x52, 0x65, 0x63, 0x76, 0x4d, 0x73, 0x67,
0x53, 0x69, 0x7a, 0x65, 0x88, 0x01, 0x01, 0x12, 0x37, 0x0a, 0x16, 0x6d, 0x61, 0x78, 0x5f, 0x63,
0x61, 0x6c, 0x6c, 0x5f, 0x73, 0x65, 0x6e, 0x64, 0x5f, 0x6d, 0x73, 0x67, 0x5f, 0x73, 0x69, 0x7a,
0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x48, 0x03, 0x52, 0x12, 0x6d, 0x61, 0x78, 0x43, 0x61,
0x6c, 0x6c, 0x53, 0x65, 0x6e, 0x64, 0x4d, 0x73, 0x67, 0x53, 0x69, 0x7a, 0x65, 0x88, 0x01, 0x01,
0x12, 0x28, 0x0a, 0x0d, 0x73, 0x74, 0x61, 0x74, 0x69, 0x63, 0x5f, 0x6d, 0x65, 0x74, 0x68, 0x6f,
0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x48, 0x04, 0x52, 0x0c, 0x73, 0x74, 0x61, 0x74, 0x69,
0x63, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x88, 0x01, 0x01, 0x12, 0x1d, 0x0a, 0x07, 0x74, 0x72,
0x61, 0x69, 0x6c, 0x65, 0x72, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x48, 0x05, 0x52, 0x07, 0x74,
0x72, 0x61, 0x69, 0x6c, 0x65, 0x72, 0x88, 0x01, 0x01, 0x12, 0x29, 0x0a, 0x0e, 0x77, 0x61, 0x69,
0x74, 0x5f, 0x66, 0x6f, 0x72, 0x5f, 0x72, 0x65, 0x61, 0x64, 0x79, 0x18, 0x07, 0x20, 0x01, 0x28,
0x08, 0x48, 0x06, 0x52, 0x0c, 0x77, 0x61, 0x69, 0x74, 0x46, 0x6f, 0x72, 0x52, 0x65, 0x61, 0x64,
0x79, 0x88, 0x01, 0x01, 0x42, 0x12, 0x0a, 0x10, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74,
0x5f, 0x73, 0x75, 0x62, 0x74, 0x79, 0x70, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x68, 0x65, 0x61,
0x64, 0x65, 0x72, 0x42, 0x19, 0x0a, 0x17, 0x5f, 0x6d, 0x61, 0x78, 0x5f, 0x63, 0x61, 0x6c, 0x6c,
0x5f, 0x72, 0x65, 0x63, 0x76, 0x5f, 0x6d, 0x73, 0x67, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x42, 0x19,
0x0a, 0x17, 0x5f, 0x6d, 0x61, 0x78, 0x5f, 0x63, 0x61, 0x6c, 0x6c, 0x5f, 0x73, 0x65, 0x6e, 0x64,
0x5f, 0x6d, 0x73, 0x67, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x42, 0x10, 0x0a, 0x0e, 0x5f, 0x73, 0x74,
0x61, 0x74, 0x69, 0x63, 0x5f, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x42, 0x0a, 0x0a, 0x08, 0x5f,
0x74, 0x72, 0x61, 0x69, 0x6c, 0x65, 0x72, 0x42, 0x11, 0x0a, 0x0f, 0x5f, 0x77, 0x61, 0x69, 0x74,
0x5f, 0x66, 0x6f, 0x72, 0x5f, 0x72, 0x65, 0x61, 0x64, 0x79, 0x22, 0x64, 0x0a, 0x0e, 0x56, 0x61,
0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x78, 0x70, 0x72, 0x12, 0x17, 0x0a, 0x04,
0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61,
0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x30, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x02,
0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65,
0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x47, 0x52, 0x50, 0x43, 0x45, 0x72, 0x72, 0x6f, 0x72,
0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65,
0x22, 0xb8, 0x01, 0x0a, 0x0b, 0x52, 0x65, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79,
0x12, 0x42, 0x0a, 0x08, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01,
0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61,
0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x52, 0x65, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79,
0x43, 0x6f, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x08, 0x63, 0x6f, 0x6e, 0x73,
0x74, 0x61, 0x6e, 0x74, 0x12, 0x4b, 0x0a, 0x0b, 0x65, 0x78, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74,
0x69, 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x67, 0x72, 0x70, 0x63,
0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x52, 0x65, 0x74, 0x72,
0x79, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x45, 0x78, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x69,
0x61, 0x6c, 0x48, 0x00, 0x52, 0x0b, 0x65, 0x78, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x69, 0x61,
0x6c, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x66, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69,
0x66, 0x42, 0x08, 0x0a, 0x06, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x22, 0x79, 0x0a, 0x13, 0x52,
0x65, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x61,
0x6e, 0x74, 0x12, 0x1f, 0x0a, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x01,
0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c,
0x88, 0x01, 0x01, 0x12, 0x24, 0x0a, 0x0b, 0x6d, 0x61, 0x78, 0x5f, 0x72, 0x65, 0x74, 0x72, 0x69,
0x65, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x48, 0x01, 0x52, 0x0a, 0x6d, 0x61, 0x78, 0x52,
0x65, 0x74, 0x72, 0x69, 0x65, 0x73, 0x88, 0x01, 0x01, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x69, 0x6e,
0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x6d, 0x61, 0x78, 0x5f, 0x72,
0x65, 0x74, 0x72, 0x69, 0x65, 0x73, 0x22, 0xd1, 0x02, 0x0a, 0x16, 0x52, 0x65, 0x74, 0x72, 0x79,
0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x45, 0x78, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x69, 0x61,
0x6c, 0x12, 0x2e, 0x0a, 0x10, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x5f, 0x69, 0x6e, 0x74,
0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0f, 0x69,
0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x88, 0x01,
0x01, 0x12, 0x36, 0x0a, 0x14, 0x72, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x69, 0x7a, 0x61, 0x74, 0x69,
0x6f, 0x6e, 0x5f, 0x66, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x01, 0x48,
0x01, 0x52, 0x13, 0x72, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e,
0x46, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x88, 0x01, 0x01, 0x12, 0x23, 0x0a, 0x0a, 0x6d, 0x75, 0x6c,
0x74, 0x69, 0x70, 0x6c, 0x69, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x01, 0x48, 0x02, 0x52,
0x0a, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x69, 0x65, 0x72, 0x88, 0x01, 0x01, 0x12, 0x26,
0x0a, 0x0c, 0x6d, 0x61, 0x78, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x04,
0x20, 0x01, 0x28, 0x09, 0x48, 0x03, 0x52, 0x0b, 0x6d, 0x61, 0x78, 0x49, 0x6e, 0x74, 0x65, 0x72,
0x76, 0x61, 0x6c, 0x88, 0x01, 0x01, 0x12, 0x24, 0x0a, 0x0b, 0x6d, 0x61, 0x78, 0x5f, 0x72, 0x65,
0x74, 0x72, 0x69, 0x65, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x48, 0x04, 0x52, 0x0a, 0x6d,
0x61, 0x78, 0x52, 0x65, 0x74, 0x72, 0x69, 0x65, 0x73, 0x88, 0x01, 0x01, 0x42, 0x13, 0x0a, 0x11,
0x5f, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61,
0x6c, 0x42, 0x17, 0x0a, 0x15, 0x5f, 0x72, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x69, 0x7a, 0x61, 0x74,
0x69, 0x6f, 0x6e, 0x5f, 0x66, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x6d,
0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x69, 0x65, 0x72, 0x42, 0x0f, 0x0a, 0x0d, 0x5f, 0x6d, 0x61,
0x78, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x6d,
0x61, 0x78, 0x5f, 0x72, 0x65, 0x74, 0x72, 0x69, 0x65, 0x73, 0x22, 0x5d, 0x0a, 0x0d, 0x4d, 0x65,
0x74, 0x68, 0x6f, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x66,
0x69, 0x65, 0x6c, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x66, 0x69, 0x65, 0x6c,
0x64, 0x12, 0x13, 0x0a, 0x02, 0x62, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52,
0x02, 0x62, 0x79, 0x88, 0x01, 0x01, 0x12, 0x13, 0x0a, 0x02, 0x69, 0x66, 0x18, 0x03, 0x20, 0x01,
0x28, 0x09, 0x48, 0x01, 0x52, 0x02, 0x69, 0x66, 0x88, 0x01, 0x01, 0x42, 0x05, 0x0a, 0x03, 0x5f,
0x62, 0x79, 0x42, 0x05, 0x0a, 0x03, 0x5f, 0x69, 0x66, 0x22, 0x85, 0x01, 0x0a, 0x0e, 0x4d, 0x65,
0x74, 0x68, 0x6f, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x17, 0x0a, 0x04,
0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61,
0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x18, 0x02,
0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x05, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x88, 0x01, 0x01,
0x12, 0x1f, 0x0a, 0x08, 0x61, 0x75, 0x74, 0x6f, 0x62, 0x69, 0x6e, 0x64, 0x18, 0x03, 0x20, 0x01,
0x28, 0x08, 0x48, 0x02, 0x52, 0x08, 0x61, 0x75, 0x74, 0x6f, 0x62, 0x69, 0x6e, 0x64, 0x88, 0x01,
0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x66,
0x69, 0x65, 0x6c, 0x64, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x61, 0x75, 0x74, 0x6f, 0x62, 0x69, 0x6e,
0x64, 0x22, 0x62, 0x0a, 0x08, 0x41, 0x72, 0x67, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x12, 0x0a,
0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d,
0x65, 0x12, 0x13, 0x0a, 0x02, 0x62, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52,
0x02, 0x62, 0x79, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x69, 0x6e, 0x6c, 0x69, 0x6e, 0x65,
0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x06, 0x69, 0x6e, 0x6c, 0x69, 0x6e, 0x65,
0x88, 0x01, 0x01, 0x42, 0x05, 0x0a, 0x03, 0x5f, 0x62, 0x79, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x69,
0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x22, 0xf2, 0x01, 0x0a, 0x09, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x52,
0x75, 0x6c, 0x65, 0x12, 0x2c, 0x0a, 0x0f, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x5f, 0x72, 0x65,
0x73, 0x6f, 0x6c, 0x76, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x0e,
0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x52, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x72, 0x88, 0x01,
0x01, 0x12, 0x13, 0x0a, 0x02, 0x62, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52,
0x02, 0x62, 0x79, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x18,
0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x02, 0x52, 0x05, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x88, 0x01,
0x01, 0x12, 0x31, 0x0a, 0x05, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b,
0x32, 0x1b, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69,
0x6f, 0x6e, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x6e, 0x65, 0x6f, 0x66, 0x52, 0x05, 0x6f,
0x6e, 0x65, 0x6f, 0x66, 0x12, 0x2f, 0x0a, 0x03, 0x65, 0x6e, 0x76, 0x18, 0x05, 0x20, 0x01, 0x28,
0x0b, 0x32, 0x1d, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74,
0x69, 0x6f, 0x6e, 0x2e, 0x45, 0x6e, 0x76, 0x56, 0x61, 0x72, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e,
0x52, 0x03, 0x65, 0x6e, 0x76, 0x42, 0x12, 0x0a, 0x10, 0x5f, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d,
0x5f, 0x72, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x72, 0x42, 0x05, 0x0a, 0x03, 0x5f, 0x62, 0x79,
0x42, 0x08, 0x0a, 0x06, 0x5f, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x22, 0x89, 0x01, 0x0a, 0x0a, 0x46,
0x69, 0x65, 0x6c, 0x64, 0x4f, 0x6e, 0x65, 0x6f, 0x66, 0x12, 0x10, 0x0a, 0x02, 0x69, 0x66, 0x18,
0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x02, 0x69, 0x66, 0x12, 0x1a, 0x0a, 0x07, 0x64,
0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x07,
0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x12, 0x35, 0x0a, 0x03, 0x64, 0x65, 0x66, 0x18, 0x03,
0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65,
0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x44,
0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x03, 0x64, 0x65, 0x66, 0x12, 0x0e,
0x0a, 0x02, 0x62, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x62, 0x79, 0x42, 0x06,
0x0a, 0x04, 0x63, 0x6f, 0x6e, 0x64, 0x22, 0x45, 0x0a, 0x09, 0x43, 0x45, 0x4c, 0x50, 0x6c, 0x75,
0x67, 0x69, 0x6e, 0x12, 0x38, 0x0a, 0x06, 0x65, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x01, 0x20,
0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72,
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x43, 0x45, 0x4c, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x45,
0x78, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x06, 0x65, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x22, 0xaf, 0x02,
0x0a, 0x0f, 0x43, 0x45, 0x4c, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x45, 0x78, 0x70, 0x6f, 0x72,
0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x65, 0x73, 0x63, 0x18, 0x02, 0x20,
0x01, 0x28, 0x09, 0x52, 0x04, 0x64, 0x65, 0x73, 0x63, 0x12, 0x36, 0x0a, 0x05, 0x74, 0x79, 0x70,
0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e,
0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x43, 0x45, 0x4c, 0x52, 0x65,
0x63, 0x65, 0x69, 0x76, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x52, 0x05, 0x74, 0x79, 0x70, 0x65,
0x73, 0x12, 0x3a, 0x0a, 0x09, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x04,
0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65,
0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x43, 0x45, 0x4c, 0x46, 0x75, 0x6e, 0x63, 0x74, 0x69,
0x6f, 0x6e, 0x52, 0x09, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x3a, 0x0a,
0x09, 0x76, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b,
0x32, 0x1c, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69,
0x6f, 0x6e, 0x2e, 0x43, 0x45, 0x4c, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x09,
0x76, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x12, 0x44, 0x0a, 0x0a, 0x63, 0x61, 0x70,
0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e,
0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e,
0x43, 0x45, 0x4c, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c,
0x69, 0x74, 0x79, 0x52, 0x0a, 0x63, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x22,
0x9b, 0x02, 0x0a, 0x13, 0x43, 0x45, 0x4c, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x43, 0x61, 0x70,
0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x12, 0x3e, 0x0a, 0x03, 0x65, 0x6e, 0x76, 0x18, 0x01,
0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65,
0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x43, 0x45, 0x4c, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e,
0x45, 0x6e, 0x76, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x48, 0x00, 0x52,
0x03, 0x65, 0x6e, 0x76, 0x88, 0x01, 0x01, 0x12, 0x54, 0x0a, 0x0b, 0x66, 0x69, 0x6c, 0x65, 0x5f,
0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x67,
0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x43,
0x45, 0x4c, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x46, 0x69, 0x6c, 0x65, 0x53, 0x79, 0x73, 0x74,
0x65, 0x6d, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x48, 0x01, 0x52, 0x0a,
0x66, 0x69, 0x6c, 0x65, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x88, 0x01, 0x01, 0x12, 0x4a, 0x0a,
0x07, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b,
0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e,
0x2e, 0x43, 0x45, 0x4c, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72,
0x6b, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x48, 0x02, 0x52, 0x07, 0x6e,
0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x88, 0x01, 0x01, 0x42, 0x06, 0x0a, 0x04, 0x5f, 0x65, 0x6e,
0x76, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x73, 0x79, 0x73, 0x74, 0x65,
0x6d, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x22, 0x40, 0x0a,
0x16, 0x43, 0x45, 0x4c, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x45, 0x6e, 0x76, 0x43, 0x61, 0x70,
0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x61, 0x6c, 0x6c, 0x18, 0x01,
0x20, 0x01, 0x28, 0x08, 0x52, 0x03, 0x61, 0x6c, 0x6c, 0x12, 0x14, 0x0a, 0x05, 0x6e, 0x61, 0x6d,
0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x22,
0x3e, 0x0a, 0x1d, 0x43, 0x45, 0x4c, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x46, 0x69, 0x6c, 0x65,
0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79,
0x12, 0x1d, 0x0a, 0x0a, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01,
0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x50, 0x61, 0x74, 0x68, 0x22,
0x1c, 0x0a, 0x1a, 0x43, 0x45, 0x4c, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x4e, 0x65, 0x74, 0x77,
0x6f, 0x72, 0x6b, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x22, 0xa1, 0x01,
0x0a, 0x0b, 0x43, 0x45, 0x4c, 0x46, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a,
0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d,
0x65, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x65, 0x73, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52,
0x04, 0x64, 0x65, 0x73, 0x63, 0x12, 0x38, 0x0a, 0x04, 0x61, 0x72, 0x67, 0x73, 0x18, 0x03, 0x20,
0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72,
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x43, 0x45, 0x4c, 0x46, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f,
0x6e, 0x41, 0x72, 0x67, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x04, 0x61, 0x72, 0x67, 0x73, 0x12,
0x30, 0x0a, 0x06, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32,
0x18, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f,
0x6e, 0x2e, 0x43, 0x45, 0x4c, 0x54, 0x79, 0x70, 0x65, 0x52, 0x06, 0x72, 0x65, 0x74, 0x75, 0x72,
0x6e, 0x22, 0x71, 0x0a, 0x0f, 0x43, 0x45, 0x4c, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x72,
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, 0x12, 0x0a, 0x04, 0x64, 0x65, 0x73, 0x63,
0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x64, 0x65, 0x73, 0x63, 0x12, 0x36, 0x0a, 0x07,
0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e,
0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e,
0x43, 0x45, 0x4c, 0x46, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x6d, 0x65, 0x74,
0x68, 0x6f, 0x64, 0x73, 0x22, 0x6b, 0x0a, 0x13, 0x43, 0x45, 0x4c, 0x46, 0x75, 0x6e, 0x63, 0x74,
0x69, 0x6f, 0x6e, 0x41, 0x72, 0x67, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e,
0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12,
0x12, 0x0a, 0x04, 0x64, 0x65, 0x73, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x64,
0x65, 0x73, 0x63, 0x12, 0x2c, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28,
0x0b, 0x32, 0x18, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74,
0x69, 0x6f, 0x6e, 0x2e, 0x43, 0x45, 0x4c, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70,
0x65, 0x22, 0xdd, 0x01, 0x0a, 0x07, 0x43, 0x45, 0x4c, 0x54, 0x79, 0x70, 0x65, 0x12, 0x2f, 0x0a,
0x04, 0x6b, 0x69, 0x6e, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x19, 0x2e, 0x67, 0x72,
0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x54, 0x79,
0x70, 0x65, 0x4b, 0x69, 0x6e, 0x64, 0x48, 0x00, 0x52, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x12, 0x36,
0x0a, 0x08, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b,
0x32, 0x18, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69,
0x6f, 0x6e, 0x2e, 0x43, 0x45, 0x4c, 0x54, 0x79, 0x70, 0x65, 0x48, 0x00, 0x52, 0x08, 0x72, 0x65,
0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x12, 0x2f, 0x0a, 0x03, 0x6d, 0x61, 0x70, 0x18, 0x03, 0x20,
0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72,
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x43, 0x45, 0x4c, 0x4d, 0x61, 0x70, 0x54, 0x79, 0x70, 0x65,
0x48, 0x00, 0x52, 0x03, 0x6d, 0x61, 0x70, 0x12, 0x1a, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61,
0x67, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73,
0x61, 0x67, 0x65, 0x12, 0x14, 0x0a, 0x04, 0x65, 0x6e, 0x75, 0x6d, 0x18, 0x05, 0x20, 0x01, 0x28,
0x09, 0x48, 0x00, 0x52, 0x04, 0x65, 0x6e, 0x75, 0x6d, 0x42, 0x06, 0x0a, 0x04, 0x74, 0x79, 0x70,
0x65, 0x22, 0x68, 0x0a, 0x0a, 0x43, 0x45, 0x4c, 0x4d, 0x61, 0x70, 0x54, 0x79, 0x70, 0x65, 0x12,
0x2a, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x67,
0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x43,
0x45, 0x4c, 0x54, 0x79, 0x70, 0x65, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x2e, 0x0a, 0x05, 0x76,
0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x67, 0x72, 0x70,
0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x43, 0x45, 0x4c,
0x54, 0x79, 0x70, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x63, 0x0a, 0x0b, 0x43,
0x45, 0x4c, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61,
0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x12,
0x0a, 0x04, 0x64, 0x65, 0x73, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x64, 0x65,
0x73, 0x63, 0x12, 0x2c, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b,
0x32, 0x18, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69,
0x6f, 0x6e, 0x2e, 0x43, 0x45, 0x4c, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65,
0x2a, 0x5e, 0x0a, 0x08, 0x54, 0x79, 0x70, 0x65, 0x4b, 0x69, 0x6e, 0x64, 0x12, 0x0b, 0x0a, 0x07,
0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x53, 0x54, 0x52,
0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, 0x42, 0x4f, 0x4f, 0x4c, 0x10, 0x02, 0x12,
0x09, 0x0a, 0x05, 0x49, 0x4e, 0x54, 0x36, 0x34, 0x10, 0x03, 0x12, 0x0a, 0x0a, 0x06, 0x55, 0x49,
0x4e, 0x54, 0x36, 0x34, 0x10, 0x04, 0x12, 0x0a, 0x0a, 0x06, 0x44, 0x4f, 0x55, 0x42, 0x4c, 0x45,
0x10, 0x05, 0x12, 0x0c, 0x0a, 0x08, 0x44, 0x55, 0x52, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x06,
0x3a, 0x4c, 0x0a, 0x04, 0x66, 0x69, 0x6c, 0x65, 0x12, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c,
0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x4f,
0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xa3, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e,
0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e,
0x46, 0x69, 0x6c, 0x65, 0x52, 0x75, 0x6c, 0x65, 0x52, 0x04, 0x66, 0x69, 0x6c, 0x65, 0x3a, 0x58,
0x0a, 0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x1f, 0x2e, 0x67, 0x6f, 0x6f, 0x67,
0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x65, 0x72, 0x76,
0x69, 0x63, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xa3, 0x09, 0x20, 0x01, 0x28,
0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74,
0x69, 0x6f, 0x6e, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x75, 0x6c, 0x65, 0x52,
0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x3a, 0x54, 0x0a, 0x06, 0x6d, 0x65, 0x74, 0x68,
0x6f, 0x64, 0x12, 0x1e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f,
0x6e, 0x73, 0x18, 0xa3, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x72, 0x70, 0x63,
0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x4d, 0x65, 0x74, 0x68,
0x6f, 0x64, 0x52, 0x75, 0x6c, 0x65, 0x52, 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x3a, 0x58,
0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x1f, 0x2e, 0x67, 0x6f, 0x6f, 0x67,
0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4d, 0x65, 0x73, 0x73,
0x61, 0x67, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xa3, 0x09, 0x20, 0x01, 0x28,
0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74,
0x69, 0x6f, 0x6e, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x75, 0x6c, 0x65, 0x52,
0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x3a, 0x50, 0x0a, 0x05, 0x66, 0x69, 0x65, 0x6c,
0x64, 0x12, 0x1d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73,
0x18, 0xa3, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66,
0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x52,
0x75, 0x6c, 0x65, 0x52, 0x05, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x3a, 0x4c, 0x0a, 0x04, 0x65, 0x6e,
0x75, 0x6d, 0x12, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73,
0x18, 0xa3, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66,
0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x52, 0x75,
0x6c, 0x65, 0x52, 0x04, 0x65, 0x6e, 0x75, 0x6d, 0x3a, 0x61, 0x0a, 0x0a, 0x65, 0x6e, 0x75, 0x6d,
0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x21, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x56, 0x61, 0x6c,
0x75, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xa3, 0x09, 0x20, 0x01, 0x28, 0x0b,
0x32, 0x1e, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69,
0x6f, 0x6e, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x75, 0x6c, 0x65,
0x52, 0x09, 0x65, 0x6e, 0x75, 0x6d, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x50, 0x0a, 0x05, 0x6f,
0x6e, 0x65, 0x6f, 0x66, 0x12, 0x1d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4f, 0x6e, 0x65, 0x6f, 0x66, 0x4f, 0x70, 0x74, 0x69,
0x6f, 0x6e, 0x73, 0x18, 0xa3, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x72, 0x70,
0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x4f, 0x6e, 0x65,
0x6f, 0x66, 0x52, 0x75, 0x6c, 0x65, 0x52, 0x05, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x42, 0xc2, 0x01,
0x0a, 0x13, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72,
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x0f, 0x46, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f,
0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3d, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62,
0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6d, 0x65, 0x72, 0x63, 0x61, 0x72, 0x69, 0x2f, 0x67, 0x72, 0x70,
0x63, 0x2d, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x67, 0x72, 0x70,
0x63, 0x2f, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x3b, 0x66, 0x65, 0x64,
0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0xa2, 0x02, 0x03, 0x47, 0x46, 0x58, 0xaa, 0x02, 0x0f,
0x47, 0x72, 0x70, 0x63, 0x2e, 0x46, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0xca,
0x02, 0x0f, 0x47, 0x72, 0x70, 0x63, 0x5c, 0x46, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f,
0x6e, 0xe2, 0x02, 0x1b, 0x47, 0x72, 0x70, 0x63, 0x5c, 0x46, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74,
0x69, 0x6f, 0x6e, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea,
0x02, 0x10, 0x47, 0x72, 0x70, 0x63, 0x3a, 0x3a, 0x46, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69,
0x6f, 0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_grpc_federation_federation_proto_rawDescOnce sync.Once
file_grpc_federation_federation_proto_rawDescData = file_grpc_federation_federation_proto_rawDesc
)
func file_grpc_federation_federation_proto_rawDescGZIP() []byte {
file_grpc_federation_federation_proto_rawDescOnce.Do(func() {
file_grpc_federation_federation_proto_rawDescData = protoimpl.X.CompressGZIP(file_grpc_federation_federation_proto_rawDescData)
})
return file_grpc_federation_federation_proto_rawDescData
}
var file_grpc_federation_federation_proto_enumTypes = make([]protoimpl.EnumInfo, 2)
var file_grpc_federation_federation_proto_msgTypes = make([]protoimpl.MessageInfo, 48)
var file_grpc_federation_federation_proto_goTypes = []interface{}{
(TypeKind)(0), // 0: grpc.federation.TypeKind
(GRPCError_LogLevel)(0), // 1: grpc.federation.GRPCError.LogLevel
(*FileRule)(nil), // 2: grpc.federation.FileRule
(*EnumRule)(nil), // 3: grpc.federation.EnumRule
(*EnumValueRule)(nil), // 4: grpc.federation.EnumValueRule
(*EnumValueAttribute)(nil), // 5: grpc.federation.EnumValueAttribute
(*OneofRule)(nil), // 6: grpc.federation.OneofRule
(*ServiceRule)(nil), // 7: grpc.federation.ServiceRule
(*Env)(nil), // 8: grpc.federation.Env
(*ServiceVariable)(nil), // 9: grpc.federation.ServiceVariable
(*ServiceVariableValidationExpr)(nil), // 10: grpc.federation.ServiceVariableValidationExpr
(*EnvVar)(nil), // 11: grpc.federation.EnvVar
(*EnvType)(nil), // 12: grpc.federation.EnvType
(*EnvMapType)(nil), // 13: grpc.federation.EnvMapType
(*EnvVarOption)(nil), // 14: grpc.federation.EnvVarOption
(*MethodRule)(nil), // 15: grpc.federation.MethodRule
(*MessageRule)(nil), // 16: grpc.federation.MessageRule
(*VariableDefinition)(nil), // 17: grpc.federation.VariableDefinition
(*MapExpr)(nil), // 18: grpc.federation.MapExpr
(*Iterator)(nil), // 19: grpc.federation.Iterator
(*MessageExpr)(nil), // 20: grpc.federation.MessageExpr
(*EnumExpr)(nil), // 21: grpc.federation.EnumExpr
(*CallExpr)(nil), // 22: grpc.federation.CallExpr
(*SwitchExpr)(nil), // 23: grpc.federation.SwitchExpr
(*SwitchCaseExpr)(nil), // 24: grpc.federation.SwitchCaseExpr
(*SwitchDefaultExpr)(nil), // 25: grpc.federation.SwitchDefaultExpr
(*GRPCError)(nil), // 26: grpc.federation.GRPCError
(*GRPCErrorDetail)(nil), // 27: grpc.federation.GRPCErrorDetail
(*GRPCCallOption)(nil), // 28: grpc.federation.GRPCCallOption
(*ValidationExpr)(nil), // 29: grpc.federation.ValidationExpr
(*RetryPolicy)(nil), // 30: grpc.federation.RetryPolicy
(*RetryPolicyConstant)(nil), // 31: grpc.federation.RetryPolicyConstant
(*RetryPolicyExponential)(nil), // 32: grpc.federation.RetryPolicyExponential
(*MethodRequest)(nil), // 33: grpc.federation.MethodRequest
(*MethodResponse)(nil), // 34: grpc.federation.MethodResponse
(*Argument)(nil), // 35: grpc.federation.Argument
(*FieldRule)(nil), // 36: grpc.federation.FieldRule
(*FieldOneof)(nil), // 37: grpc.federation.FieldOneof
(*CELPlugin)(nil), // 38: grpc.federation.CELPlugin
(*CELPluginExport)(nil), // 39: grpc.federation.CELPluginExport
(*CELPluginCapability)(nil), // 40: grpc.federation.CELPluginCapability
(*CELPluginEnvCapability)(nil), // 41: grpc.federation.CELPluginEnvCapability
(*CELPluginFileSystemCapability)(nil), // 42: grpc.federation.CELPluginFileSystemCapability
(*CELPluginNetworkCapability)(nil), // 43: grpc.federation.CELPluginNetworkCapability
(*CELFunction)(nil), // 44: grpc.federation.CELFunction
(*CELReceiverType)(nil), // 45: grpc.federation.CELReceiverType
(*CELFunctionArgument)(nil), // 46: grpc.federation.CELFunctionArgument
(*CELType)(nil), // 47: grpc.federation.CELType
(*CELMapType)(nil), // 48: grpc.federation.CELMapType
(*CELVariable)(nil), // 49: grpc.federation.CELVariable
(code.Code)(0), // 50: google.rpc.Code
(*errdetails.ErrorInfo)(nil), // 51: google.rpc.ErrorInfo
(*errdetails.RetryInfo)(nil), // 52: google.rpc.RetryInfo
(*errdetails.DebugInfo)(nil), // 53: google.rpc.DebugInfo
(*errdetails.QuotaFailure)(nil), // 54: google.rpc.QuotaFailure
(*errdetails.PreconditionFailure)(nil), // 55: google.rpc.PreconditionFailure
(*errdetails.BadRequest)(nil), // 56: google.rpc.BadRequest
(*errdetails.RequestInfo)(nil), // 57: google.rpc.RequestInfo
(*errdetails.ResourceInfo)(nil), // 58: google.rpc.ResourceInfo
(*errdetails.Help)(nil), // 59: google.rpc.Help
(*errdetails.LocalizedMessage)(nil), // 60: google.rpc.LocalizedMessage
(*descriptorpb.FileOptions)(nil), // 61: google.protobuf.FileOptions
(*descriptorpb.ServiceOptions)(nil), // 62: google.protobuf.ServiceOptions
(*descriptorpb.MethodOptions)(nil), // 63: google.protobuf.MethodOptions
(*descriptorpb.MessageOptions)(nil), // 64: google.protobuf.MessageOptions
(*descriptorpb.FieldOptions)(nil), // 65: google.protobuf.FieldOptions
(*descriptorpb.EnumOptions)(nil), // 66: google.protobuf.EnumOptions
(*descriptorpb.EnumValueOptions)(nil), // 67: google.protobuf.EnumValueOptions
(*descriptorpb.OneofOptions)(nil), // 68: google.protobuf.OneofOptions
}
var file_grpc_federation_federation_proto_depIdxs = []int32{
38, // 0: grpc.federation.FileRule.plugin:type_name -> grpc.federation.CELPlugin
5, // 1: grpc.federation.EnumValueRule.attr:type_name -> grpc.federation.EnumValueAttribute
8, // 2: grpc.federation.ServiceRule.env:type_name -> grpc.federation.Env
9, // 3: grpc.federation.ServiceRule.var:type_name -> grpc.federation.ServiceVariable
11, // 4: grpc.federation.Env.var:type_name -> grpc.federation.EnvVar
18, // 5: grpc.federation.ServiceVariable.map:type_name -> grpc.federation.MapExpr
20, // 6: grpc.federation.ServiceVariable.message:type_name -> grpc.federation.MessageExpr
10, // 7: grpc.federation.ServiceVariable.validation:type_name -> grpc.federation.ServiceVariableValidationExpr
21, // 8: grpc.federation.ServiceVariable.enum:type_name -> grpc.federation.EnumExpr
23, // 9: grpc.federation.ServiceVariable.switch:type_name -> grpc.federation.SwitchExpr
12, // 10: grpc.federation.EnvVar.type:type_name -> grpc.federation.EnvType
14, // 11: grpc.federation.EnvVar.option:type_name -> grpc.federation.EnvVarOption
0, // 12: grpc.federation.EnvType.kind:type_name -> grpc.federation.TypeKind
12, // 13: grpc.federation.EnvType.repeated:type_name -> grpc.federation.EnvType
13, // 14: grpc.federation.EnvType.map:type_name -> grpc.federation.EnvMapType
12, // 15: grpc.federation.EnvMapType.key:type_name -> grpc.federation.EnvType
12, // 16: grpc.federation.EnvMapType.value:type_name -> grpc.federation.EnvType
17, // 17: grpc.federation.MessageRule.def:type_name -> grpc.federation.VariableDefinition
18, // 18: grpc.federation.VariableDefinition.map:type_name -> grpc.federation.MapExpr
20, // 19: grpc.federation.VariableDefinition.message:type_name -> grpc.federation.MessageExpr
22, // 20: grpc.federation.VariableDefinition.call:type_name -> grpc.federation.CallExpr
29, // 21: grpc.federation.VariableDefinition.validation:type_name -> grpc.federation.ValidationExpr
21, // 22: grpc.federation.VariableDefinition.enum:type_name -> grpc.federation.EnumExpr
23, // 23: grpc.federation.VariableDefinition.switch:type_name -> grpc.federation.SwitchExpr
19, // 24: grpc.federation.MapExpr.iterator:type_name -> grpc.federation.Iterator
20, // 25: grpc.federation.MapExpr.message:type_name -> grpc.federation.MessageExpr
21, // 26: grpc.federation.MapExpr.enum:type_name -> grpc.federation.EnumExpr
35, // 27: grpc.federation.MessageExpr.args:type_name -> grpc.federation.Argument
33, // 28: grpc.federation.CallExpr.request:type_name -> grpc.federation.MethodRequest
30, // 29: grpc.federation.CallExpr.retry:type_name -> grpc.federation.RetryPolicy
26, // 30: grpc.federation.CallExpr.error:type_name -> grpc.federation.GRPCError
28, // 31: grpc.federation.CallExpr.option:type_name -> grpc.federation.GRPCCallOption
24, // 32: grpc.federation.SwitchExpr.case:type_name -> grpc.federation.SwitchCaseExpr
25, // 33: grpc.federation.SwitchExpr.default:type_name -> grpc.federation.SwitchDefaultExpr
17, // 34: grpc.federation.SwitchCaseExpr.def:type_name -> grpc.federation.VariableDefinition
17, // 35: grpc.federation.SwitchDefaultExpr.def:type_name -> grpc.federation.VariableDefinition
17, // 36: grpc.federation.GRPCError.def:type_name -> grpc.federation.VariableDefinition
50, // 37: grpc.federation.GRPCError.code:type_name -> google.rpc.Code
27, // 38: grpc.federation.GRPCError.details:type_name -> grpc.federation.GRPCErrorDetail
1, // 39: grpc.federation.GRPCError.log_level:type_name -> grpc.federation.GRPCError.LogLevel
17, // 40: grpc.federation.GRPCErrorDetail.def:type_name -> grpc.federation.VariableDefinition
20, // 41: grpc.federation.GRPCErrorDetail.message:type_name -> grpc.federation.MessageExpr
51, // 42: grpc.federation.GRPCErrorDetail.error_info:type_name -> google.rpc.ErrorInfo
52, // 43: grpc.federation.GRPCErrorDetail.retry_info:type_name -> google.rpc.RetryInfo
53, // 44: grpc.federation.GRPCErrorDetail.debug_info:type_name -> google.rpc.DebugInfo
54, // 45: grpc.federation.GRPCErrorDetail.quota_failure:type_name -> google.rpc.QuotaFailure
55, // 46: grpc.federation.GRPCErrorDetail.precondition_failure:type_name -> google.rpc.PreconditionFailure
56, // 47: grpc.federation.GRPCErrorDetail.bad_request:type_name -> google.rpc.BadRequest
57, // 48: grpc.federation.GRPCErrorDetail.request_info:type_name -> google.rpc.RequestInfo
58, // 49: grpc.federation.GRPCErrorDetail.resource_info:type_name -> google.rpc.ResourceInfo
59, // 50: grpc.federation.GRPCErrorDetail.help:type_name -> google.rpc.Help
60, // 51: grpc.federation.GRPCErrorDetail.localized_message:type_name -> google.rpc.LocalizedMessage
26, // 52: grpc.federation.ValidationExpr.error:type_name -> grpc.federation.GRPCError
31, // 53: grpc.federation.RetryPolicy.constant:type_name -> grpc.federation.RetryPolicyConstant
32, // 54: grpc.federation.RetryPolicy.exponential:type_name -> grpc.federation.RetryPolicyExponential
37, // 55: grpc.federation.FieldRule.oneof:type_name -> grpc.federation.FieldOneof
14, // 56: grpc.federation.FieldRule.env:type_name -> grpc.federation.EnvVarOption
17, // 57: grpc.federation.FieldOneof.def:type_name -> grpc.federation.VariableDefinition
39, // 58: grpc.federation.CELPlugin.export:type_name -> grpc.federation.CELPluginExport
45, // 59: grpc.federation.CELPluginExport.types:type_name -> grpc.federation.CELReceiverType
44, // 60: grpc.federation.CELPluginExport.functions:type_name -> grpc.federation.CELFunction
49, // 61: grpc.federation.CELPluginExport.variables:type_name -> grpc.federation.CELVariable
40, // 62: grpc.federation.CELPluginExport.capability:type_name -> grpc.federation.CELPluginCapability
41, // 63: grpc.federation.CELPluginCapability.env:type_name -> grpc.federation.CELPluginEnvCapability
42, // 64: grpc.federation.CELPluginCapability.file_system:type_name -> grpc.federation.CELPluginFileSystemCapability
43, // 65: grpc.federation.CELPluginCapability.network:type_name -> grpc.federation.CELPluginNetworkCapability
46, // 66: grpc.federation.CELFunction.args:type_name -> grpc.federation.CELFunctionArgument
47, // 67: grpc.federation.CELFunction.return:type_name -> grpc.federation.CELType
44, // 68: grpc.federation.CELReceiverType.methods:type_name -> grpc.federation.CELFunction
47, // 69: grpc.federation.CELFunctionArgument.type:type_name -> grpc.federation.CELType
0, // 70: grpc.federation.CELType.kind:type_name -> grpc.federation.TypeKind
47, // 71: grpc.federation.CELType.repeated:type_name -> grpc.federation.CELType
48, // 72: grpc.federation.CELType.map:type_name -> grpc.federation.CELMapType
47, // 73: grpc.federation.CELMapType.key:type_name -> grpc.federation.CELType
47, // 74: grpc.federation.CELMapType.value:type_name -> grpc.federation.CELType
47, // 75: grpc.federation.CELVariable.type:type_name -> grpc.federation.CELType
61, // 76: grpc.federation.file:extendee -> google.protobuf.FileOptions
62, // 77: grpc.federation.service:extendee -> google.protobuf.ServiceOptions
63, // 78: grpc.federation.method:extendee -> google.protobuf.MethodOptions
64, // 79: grpc.federation.message:extendee -> google.protobuf.MessageOptions
65, // 80: grpc.federation.field:extendee -> google.protobuf.FieldOptions
66, // 81: grpc.federation.enum:extendee -> google.protobuf.EnumOptions
67, // 82: grpc.federation.enum_value:extendee -> google.protobuf.EnumValueOptions
68, // 83: grpc.federation.oneof:extendee -> google.protobuf.OneofOptions
2, // 84: grpc.federation.file:type_name -> grpc.federation.FileRule
7, // 85: grpc.federation.service:type_name -> grpc.federation.ServiceRule
15, // 86: grpc.federation.method:type_name -> grpc.federation.MethodRule
16, // 87: grpc.federation.message:type_name -> grpc.federation.MessageRule
36, // 88: grpc.federation.field:type_name -> grpc.federation.FieldRule
3, // 89: grpc.federation.enum:type_name -> grpc.federation.EnumRule
4, // 90: grpc.federation.enum_value:type_name -> grpc.federation.EnumValueRule
6, // 91: grpc.federation.oneof:type_name -> grpc.federation.OneofRule
92, // [92:92] is the sub-list for method output_type
92, // [92:92] is the sub-list for method input_type
84, // [84:92] is the sub-list for extension type_name
76, // [76:84] is the sub-list for extension extendee
0, // [0:76] is the sub-list for field type_name
}
func init() { file_grpc_federation_federation_proto_init() }
func file_grpc_federation_federation_proto_init() {
if File_grpc_federation_federation_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_grpc_federation_federation_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*FileRule); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*EnumRule); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*EnumValueRule); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*EnumValueAttribute); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*OneofRule); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ServiceRule); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Env); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ServiceVariable); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ServiceVariableValidationExpr); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*EnvVar); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*EnvType); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*EnvMapType); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*EnvVarOption); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*MethodRule); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*MessageRule); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*VariableDefinition); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*MapExpr); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Iterator); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*MessageExpr); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*EnumExpr); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CallExpr); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*SwitchExpr); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*SwitchCaseExpr); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*SwitchDefaultExpr); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GRPCError); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GRPCErrorDetail); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GRPCCallOption); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ValidationExpr); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[28].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*RetryPolicy); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[29].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*RetryPolicyConstant); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[30].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*RetryPolicyExponential); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[31].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*MethodRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[32].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*MethodResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[33].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Argument); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[34].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*FieldRule); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[35].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*FieldOneof); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[36].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CELPlugin); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[37].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CELPluginExport); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[38].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CELPluginCapability); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[39].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CELPluginEnvCapability); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[40].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CELPluginFileSystemCapability); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[41].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CELPluginNetworkCapability); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[42].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CELFunction); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[43].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CELReceiverType); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[44].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CELFunctionArgument); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[45].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CELType); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[46].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CELMapType); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[47].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CELVariable); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
file_grpc_federation_federation_proto_msgTypes[2].OneofWrappers = []interface{}{}
file_grpc_federation_federation_proto_msgTypes[7].OneofWrappers = []interface{}{
(*ServiceVariable_By)(nil),
(*ServiceVariable_Map)(nil),
(*ServiceVariable_Message)(nil),
(*ServiceVariable_Validation)(nil),
(*ServiceVariable_Enum)(nil),
(*ServiceVariable_Switch)(nil),
}
file_grpc_federation_federation_proto_msgTypes[9].OneofWrappers = []interface{}{}
file_grpc_federation_federation_proto_msgTypes[10].OneofWrappers = []interface{}{
(*EnvType_Kind)(nil),
(*EnvType_Repeated)(nil),
(*EnvType_Map)(nil),
}
file_grpc_federation_federation_proto_msgTypes[12].OneofWrappers = []interface{}{}
file_grpc_federation_federation_proto_msgTypes[13].OneofWrappers = []interface{}{}
file_grpc_federation_federation_proto_msgTypes[14].OneofWrappers = []interface{}{}
file_grpc_federation_federation_proto_msgTypes[15].OneofWrappers = []interface{}{
(*VariableDefinition_By)(nil),
(*VariableDefinition_Map)(nil),
(*VariableDefinition_Message)(nil),
(*VariableDefinition_Call)(nil),
(*VariableDefinition_Validation)(nil),
(*VariableDefinition_Enum)(nil),
(*VariableDefinition_Switch)(nil),
}
file_grpc_federation_federation_proto_msgTypes[16].OneofWrappers = []interface{}{
(*MapExpr_By)(nil),
(*MapExpr_Message)(nil),
(*MapExpr_Enum)(nil),
}
file_grpc_federation_federation_proto_msgTypes[20].OneofWrappers = []interface{}{}
file_grpc_federation_federation_proto_msgTypes[22].OneofWrappers = []interface{}{
(*SwitchCaseExpr_By)(nil),
}
file_grpc_federation_federation_proto_msgTypes[23].OneofWrappers = []interface{}{
(*SwitchDefaultExpr_By)(nil),
}
file_grpc_federation_federation_proto_msgTypes[24].OneofWrappers = []interface{}{}
file_grpc_federation_federation_proto_msgTypes[26].OneofWrappers = []interface{}{}
file_grpc_federation_federation_proto_msgTypes[27].OneofWrappers = []interface{}{}
file_grpc_federation_federation_proto_msgTypes[28].OneofWrappers = []interface{}{
(*RetryPolicy_Constant)(nil),
(*RetryPolicy_Exponential)(nil),
}
file_grpc_federation_federation_proto_msgTypes[29].OneofWrappers = []interface{}{}
file_grpc_federation_federation_proto_msgTypes[30].OneofWrappers = []interface{}{}
file_grpc_federation_federation_proto_msgTypes[31].OneofWrappers = []interface{}{}
file_grpc_federation_federation_proto_msgTypes[32].OneofWrappers = []interface{}{}
file_grpc_federation_federation_proto_msgTypes[33].OneofWrappers = []interface{}{}
file_grpc_federation_federation_proto_msgTypes[34].OneofWrappers = []interface{}{}
file_grpc_federation_federation_proto_msgTypes[35].OneofWrappers = []interface{}{
(*FieldOneof_If)(nil),
(*FieldOneof_Default)(nil),
}
file_grpc_federation_federation_proto_msgTypes[38].OneofWrappers = []interface{}{}
file_grpc_federation_federation_proto_msgTypes[45].OneofWrappers = []interface{}{
(*CELType_Kind)(nil),
(*CELType_Repeated)(nil),
(*CELType_Map)(nil),
(*CELType_Message)(nil),
(*CELType_Enum)(nil),
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_grpc_federation_federation_proto_rawDesc,
NumEnums: 2,
NumMessages: 48,
NumExtensions: 8,
NumServices: 0,
},
GoTypes: file_grpc_federation_federation_proto_goTypes,
DependencyIndexes: file_grpc_federation_federation_proto_depIdxs,
EnumInfos: file_grpc_federation_federation_proto_enumTypes,
MessageInfos: file_grpc_federation_federation_proto_msgTypes,
ExtensionInfos: file_grpc_federation_federation_proto_extTypes,
}.Build()
File_grpc_federation_federation_proto = out.File
file_grpc_federation_federation_proto_rawDesc = nil
file_grpc_federation_federation_proto_goTypes = nil
file_grpc_federation_federation_proto_depIdxs = nil
}
================================================
FILE: _examples/14_condition/main_test.go
================================================
package main_test
import (
"context"
"log/slog"
"net"
"os"
"testing"
"github.com/google/go-cmp/cmp"
"github.com/google/go-cmp/cmp/cmpopts"
"go.opentelemetry.io/otel"
"go.opentelemetry.io/otel/attribute"
"go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc"
"go.opentelemetry.io/otel/propagation"
"go.opentelemetry.io/otel/sdk/resource"
sdktrace "go.opentelemetry.io/otel/sdk/trace"
semconv "go.opentelemetry.io/otel/semconv/v1.4.0"
"go.uber.org/goleak"
"google.golang.org/grpc"
"google.golang.org/grpc/credentials/insecure"
"google.golang.org/grpc/test/bufconn"
"example/federation"
"example/post"
)
const bufSize = 1024
var (
listener *bufconn.Listener
postClient post.PostServiceClient
)
type clientConfig struct{}
func (c *clientConfig) Post_PostServiceClient(cfg federation.FederationServiceClientConfig) (post.PostServiceClient, error) {
return postClient, nil
}
type PostServer struct {
*post.UnimplementedPostServiceServer
}
func (s *PostServer) GetPost(ctx context.Context, req *post.GetPostRequest) (*post.GetPostResponse, error) {
return &post.GetPostResponse{
Post: &post.Post{
Id: req.GetId(),
Title: "title for " + req.GetId(),
UserId: req.GetId(),
},
}, nil
}
func dialer(ctx context.Context, address string) (net.Conn, error) {
return listener.Dial()
}
func TestFederation(t *testing.T) {
defer goleak.VerifyNone(t)
ctx := context.Background()
listener = bufconn.Listen(bufSize)
if os.Getenv("ENABLE_JAEGER") != "" {
exporter, err := otlptracegrpc.New(ctx, otlptracegrpc.WithInsecure())
if err != nil {
t.Fatal(err)
}
tp := sdktrace.NewTracerProvider(
sdktrace.WithBatcher(exporter),
sdktrace.WithResource(
resource.NewWithAttributes(
semconv.SchemaURL,
semconv.ServiceNameKey.String("example14/condition"),
semconv.ServiceVersionKey.String("1.0.0"),
attribute.String("environment", "dev"),
),
),
sdktrace.WithSampler(sdktrace.AlwaysSample()),
)
defer tp.Shutdown(ctx)
otel.SetTextMapPropagator(propagation.TraceContext{})
otel.SetTracerProvider(tp)
}
conn, err := grpc.DialContext(
ctx, "",
grpc.WithContextDialer(dialer),
grpc.WithTransportCredentials(insecure.NewCredentials()),
)
if err != nil {
t.Fatal(err)
}
defer conn.Close()
postClient = post.NewPostServiceClient(conn)
grpcServer := grpc.NewServer()
defer grpcServer.Stop()
logger := slog.New(slog.NewJSONHandler(os.Stdout, &slog.HandlerOptions{
Level: slog.LevelDebug,
}))
federationServer, err := federation.NewFederationService(federation.FederationServiceConfig{
Client: new(clientConfig),
Logger: logger,
})
if err != nil {
t.Fatal(err)
}
defer federation.CleanupFederationService(ctx, federationServer)
post.RegisterPostServiceServer(grpcServer, &PostServer{})
federation.RegisterFederationServiceServer(grpcServer, federationServer)
go func() {
if err := grpcServer.Serve(listener); err != nil {
t.Fatal(err)
}
}()
client := federation.NewFederationServiceClient(conn)
res, err := client.GetPost(ctx, &federation.GetPostRequest{
Id: "x",
})
if err != nil {
t.Fatal(err)
}
if diff := cmp.Diff(res, &federation.GetPostResponse{
Post: &federation.Post{
Id: "x",
Title: "title for x",
User: &federation.User{
Id: "x",
},
},
}, cmpopts.IgnoreUnexported(
federation.GetPostResponse{},
federation.Post{},
federation.User{},
)); diff != "" {
t.Errorf("(-got, +want)\n%s", diff)
}
}
================================================
FILE: _examples/14_condition/post/post.pb.go
================================================
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.33.0
// protoc (unknown)
// source: post/post.proto
package post
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
type GetPostRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
}
func (x *GetPostRequest) Reset() {
*x = GetPostRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_post_post_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GetPostRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetPostRequest) ProtoMessage() {}
func (x *GetPostRequest) ProtoReflect() protoreflect.Message {
mi := &file_post_post_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GetPostRequest.ProtoReflect.Descriptor instead.
func (*GetPostRequest) Descriptor() ([]byte, []int) {
return file_post_post_proto_rawDescGZIP(), []int{0}
}
func (x *GetPostRequest) GetId() string {
if x != nil {
return x.Id
}
return ""
}
type GetPostResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Post *Post `protobuf:"bytes,1,opt,name=post,proto3" json:"post,omitempty"`
}
func (x *GetPostResponse) Reset() {
*x = GetPostResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_post_post_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GetPostResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetPostResponse) ProtoMessage() {}
func (x *GetPostResponse) ProtoReflect() protoreflect.Message {
mi := &file_post_post_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GetPostResponse.ProtoReflect.Descriptor instead.
func (*GetPostResponse) Descriptor() ([]byte, []int) {
return file_post_post_proto_rawDescGZIP(), []int{1}
}
func (x *GetPostResponse) GetPost() *Post {
if x != nil {
return x.Post
}
return nil
}
type GetPostsRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Ids []string `protobuf:"bytes,1,rep,name=ids,proto3" json:"ids,omitempty"`
}
func (x *GetPostsRequest) Reset() {
*x = GetPostsRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_post_post_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GetPostsRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetPostsRequest) ProtoMessage() {}
func (x *GetPostsRequest) ProtoReflect() protoreflect.Message {
mi := &file_post_post_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GetPostsRequest.ProtoReflect.Descriptor instead.
func (*GetPostsRequest) Descriptor() ([]byte, []int) {
return file_post_post_proto_rawDescGZIP(), []int{2}
}
func (x *GetPostsRequest) GetIds() []string {
if x != nil {
return x.Ids
}
return nil
}
type GetPostsResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Posts []*Post `protobuf:"bytes,1,rep,name=posts,proto3" json:"posts,omitempty"`
}
func (x *GetPostsResponse) Reset() {
*x = GetPostsResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_post_post_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GetPostsResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetPostsResponse) ProtoMessage() {}
func (x *GetPostsResponse) ProtoReflect() protoreflect.Message {
mi := &file_post_post_proto_msgTypes[3]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GetPostsResponse.ProtoReflect.Descriptor instead.
func (*GetPostsResponse) Descriptor() ([]byte, []int) {
return file_post_post_proto_rawDescGZIP(), []int{3}
}
func (x *GetPostsResponse) GetPosts() []*Post {
if x != nil {
return x.Posts
}
return nil
}
type Post struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
Title string `protobuf:"bytes,2,opt,name=title,proto3" json:"title,omitempty"`
Content string `protobuf:"bytes,3,opt,name=content,proto3" json:"content,omitempty"`
UserId string `protobuf:"bytes,4,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
}
func (x *Post) Reset() {
*x = Post{}
if protoimpl.UnsafeEnabled {
mi := &file_post_post_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Post) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Post) ProtoMessage() {}
func (x *Post) ProtoReflect() protoreflect.Message {
mi := &file_post_post_proto_msgTypes[4]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Post.ProtoReflect.Descriptor instead.
func (*Post) Descriptor() ([]byte, []int) {
return file_post_post_proto_rawDescGZIP(), []int{4}
}
func (x *Post) GetId() string {
if x != nil {
return x.Id
}
return ""
}
func (x *Post) GetTitle() string {
if x != nil {
return x.Title
}
return ""
}
func (x *Post) GetContent() string {
if x != nil {
return x.Content
}
return ""
}
func (x *Post) GetUserId() string {
if x != nil {
return x.UserId
}
return ""
}
var File_post_post_proto protoreflect.FileDescriptor
var file_post_post_proto_rawDesc = []byte{
0x0a, 0x0f, 0x70, 0x6f, 0x73, 0x74, 0x2f, 0x70, 0x6f, 0x73, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x12, 0x04, 0x70, 0x6f, 0x73, 0x74, 0x22, 0x20, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x50, 0x6f,
0x73, 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, 0x31, 0x0a, 0x0f, 0x47, 0x65, 0x74,
0x50, 0x6f, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1e, 0x0a, 0x04,
0x70, 0x6f, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x70, 0x6f, 0x73,
0x74, 0x2e, 0x50, 0x6f, 0x73, 0x74, 0x52, 0x04, 0x70, 0x6f, 0x73, 0x74, 0x22, 0x23, 0x0a, 0x0f,
0x47, 0x65, 0x74, 0x50, 0x6f, 0x73, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12,
0x10, 0x0a, 0x03, 0x69, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x03, 0x69, 0x64,
0x73, 0x22, 0x34, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x50, 0x6f, 0x73, 0x74, 0x73, 0x52, 0x65, 0x73,
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x20, 0x0a, 0x05, 0x70, 0x6f, 0x73, 0x74, 0x73, 0x18, 0x01,
0x20, 0x03, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x70, 0x6f, 0x73, 0x74, 0x2e, 0x50, 0x6f, 0x73, 0x74,
0x52, 0x05, 0x70, 0x6f, 0x73, 0x74, 0x73, 0x22, 0x5f, 0x0a, 0x04, 0x50, 0x6f, 0x73, 0x74, 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, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74,
0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12,
0x17, 0x0a, 0x07, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09,
0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x32, 0x84, 0x01, 0x0a, 0x0b, 0x50, 0x6f, 0x73,
0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x38, 0x0a, 0x07, 0x47, 0x65, 0x74, 0x50,
0x6f, 0x73, 0x74, 0x12, 0x14, 0x2e, 0x70, 0x6f, 0x73, 0x74, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x6f,
0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x70, 0x6f, 0x73, 0x74,
0x2e, 0x47, 0x65, 0x74, 0x50, 0x6f, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
0x22, 0x00, 0x12, 0x3b, 0x0a, 0x08, 0x47, 0x65, 0x74, 0x50, 0x6f, 0x73, 0x74, 0x73, 0x12, 0x15,
0x2e, 0x70, 0x6f, 0x73, 0x74, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x6f, 0x73, 0x74, 0x73, 0x52, 0x65,
0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x70, 0x6f, 0x73, 0x74, 0x2e, 0x47, 0x65, 0x74,
0x50, 0x6f, 0x73, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42,
0x58, 0x0a, 0x08, 0x63, 0x6f, 0x6d, 0x2e, 0x70, 0x6f, 0x73, 0x74, 0x42, 0x09, 0x50, 0x6f, 0x73,
0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x11, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c,
0x65, 0x2f, 0x70, 0x6f, 0x73, 0x74, 0x3b, 0x70, 0x6f, 0x73, 0x74, 0xa2, 0x02, 0x03, 0x50, 0x58,
0x58, 0xaa, 0x02, 0x04, 0x50, 0x6f, 0x73, 0x74, 0xca, 0x02, 0x04, 0x50, 0x6f, 0x73, 0x74, 0xe2,
0x02, 0x10, 0x50, 0x6f, 0x73, 0x74, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61,
0x74, 0x61, 0xea, 0x02, 0x04, 0x50, 0x6f, 0x73, 0x74, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f,
0x33,
}
var (
file_post_post_proto_rawDescOnce sync.Once
file_post_post_proto_rawDescData = file_post_post_proto_rawDesc
)
func file_post_post_proto_rawDescGZIP() []byte {
file_post_post_proto_rawDescOnce.Do(func() {
file_post_post_proto_rawDescData = protoimpl.X.CompressGZIP(file_post_post_proto_rawDescData)
})
return file_post_post_proto_rawDescData
}
var file_post_post_proto_msgTypes = make([]protoimpl.MessageInfo, 5)
var file_post_post_proto_goTypes = []interface{}{
(*GetPostRequest)(nil), // 0: post.GetPostRequest
(*GetPostResponse)(nil), // 1: post.GetPostResponse
(*GetPostsRequest)(nil), // 2: post.GetPostsRequest
(*GetPostsResponse)(nil), // 3: post.GetPostsResponse
(*Post)(nil), // 4: post.Post
}
var file_post_post_proto_depIdxs = []int32{
4, // 0: post.GetPostResponse.post:type_name -> post.Post
4, // 1: post.GetPostsResponse.posts:type_name -> post.Post
0, // 2: post.PostService.GetPost:input_type -> post.GetPostRequest
2, // 3: post.PostService.GetPosts:input_type -> post.GetPostsRequest
1, // 4: post.PostService.GetPost:output_type -> post.GetPostResponse
3, // 5: post.PostService.GetPosts:output_type -> post.GetPostsResponse
4, // [4:6] is the sub-list for method output_type
2, // [2:4] is the sub-list for method input_type
2, // [2:2] is the sub-list for extension type_name
2, // [2:2] is the sub-list for extension extendee
0, // [0:2] is the sub-list for field type_name
}
func init() { file_post_post_proto_init() }
func file_post_post_proto_init() {
if File_post_post_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_post_post_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetPostRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_post_post_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetPostResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_post_post_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetPostsRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_post_post_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetPostsResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_post_post_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Post); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_post_post_proto_rawDesc,
NumEnums: 0,
NumMessages: 5,
NumExtensions: 0,
NumServices: 1,
},
GoTypes: file_post_post_proto_goTypes,
DependencyIndexes: file_post_post_proto_depIdxs,
MessageInfos: file_post_post_proto_msgTypes,
}.Build()
File_post_post_proto = out.File
file_post_post_proto_rawDesc = nil
file_post_post_proto_goTypes = nil
file_post_post_proto_depIdxs = nil
}
================================================
FILE: _examples/14_condition/post/post_grpc.pb.go
================================================
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.3.0
// - protoc (unknown)
// source: post/post.proto
package post
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 (
PostService_GetPost_FullMethodName = "/post.PostService/GetPost"
PostService_GetPosts_FullMethodName = "/post.PostService/GetPosts"
)
// PostServiceClient is the client API for PostService 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 PostServiceClient interface {
GetPost(ctx context.Context, in *GetPostRequest, opts ...grpc.CallOption) (*GetPostResponse, error)
GetPosts(ctx context.Context, in *GetPostsRequest, opts ...grpc.CallOption) (*GetPostsResponse, error)
}
type postServiceClient struct {
cc grpc.ClientConnInterface
}
func NewPostServiceClient(cc grpc.ClientConnInterface) PostServiceClient {
return &postServiceClient{cc}
}
func (c *postServiceClient) GetPost(ctx context.Context, in *GetPostRequest, opts ...grpc.CallOption) (*GetPostResponse, error) {
out := new(GetPostResponse)
err := c.cc.Invoke(ctx, PostService_GetPost_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *postServiceClient) GetPosts(ctx context.Context, in *GetPostsRequest, opts ...grpc.CallOption) (*GetPostsResponse, error) {
out := new(GetPostsResponse)
err := c.cc.Invoke(ctx, PostService_GetPosts_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// PostServiceServer is the server API for PostService service.
// All implementations must embed UnimplementedPostServiceServer
// for forward compatibility
type PostServiceServer interface {
GetPost(context.Context, *GetPostRequest) (*GetPostResponse, error)
GetPosts(context.Context, *GetPostsRequest) (*GetPostsResponse, error)
mustEmbedUnimplementedPostServiceServer()
}
// UnimplementedPostServiceServer must be embedded to have forward compatible implementations.
type UnimplementedPostServiceServer struct {
}
func (UnimplementedPostServiceServer) GetPost(context.Context, *GetPostRequest) (*GetPostResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetPost not implemented")
}
func (UnimplementedPostServiceServer) GetPosts(context.Context, *GetPostsRequest) (*GetPostsResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetPosts not implemented")
}
func (UnimplementedPostServiceServer) mustEmbedUnimplementedPostServiceServer() {}
// UnsafePostServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to PostServiceServer will
// result in compilation errors.
type UnsafePostServiceServer interface {
mustEmbedUnimplementedPostServiceServer()
}
func RegisterPostServiceServer(s grpc.ServiceRegistrar, srv PostServiceServer) {
s.RegisterService(&PostService_ServiceDesc, srv)
}
func _PostService_GetPost_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetPostRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(PostServiceServer).GetPost(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: PostService_GetPost_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(PostServiceServer).GetPost(ctx, req.(*GetPostRequest))
}
return interceptor(ctx, in, info, handler)
}
func _PostService_GetPosts_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetPostsRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(PostServiceServer).GetPosts(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: PostService_GetPosts_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(PostServiceServer).GetPosts(ctx, req.(*GetPostsRequest))
}
return interceptor(ctx, in, info, handler)
}
// PostService_ServiceDesc is the grpc.ServiceDesc for PostService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var PostService_ServiceDesc = grpc.ServiceDesc{
ServiceName: "post.PostService",
HandlerType: (*PostServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "GetPost",
Handler: _PostService_GetPost_Handler,
},
{
MethodName: "GetPosts",
Handler: _PostService_GetPosts_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "post/post.proto",
}
================================================
FILE: _examples/14_condition/proto/buf.yaml
================================================
version: v1
breaking:
use:
- FILE
lint:
use:
- DEFAULT
================================================
FILE: _examples/14_condition/proto/federation/federation.proto
================================================
syntax = "proto3";
package org.federation;
import "google/protobuf/any.proto";
import "grpc/federation/federation.proto";
option go_package = "example/federation;federation";
option (grpc.federation.file)= {
import: ["post/post.proto"]
};
service FederationService {
option (grpc.federation.service) = {};
rpc GetPost(GetPostRequest) returns (GetPostResponse) {};
}
message GetPostRequest {
string id = 1;
}
message GetPostResponse {
option (grpc.federation.message) = {
def {
name: "post"
message {
name: "Post"
args { name: "id", by: "$.id" }
}
}
};
Post post = 1 [(grpc.federation.field).by = "post"];
}
message Post {
option (grpc.federation.message) = {
def [
{
if: "$.id != ''"
name: "res"
call {
method: "post.PostService/GetPost"
request { field: "id" by: "$.id" }
}
},
{
if: "res != null"
name: "post"
by: "res.post"
},
{
if: "post != null"
name: "user"
message {
name: "User"
args {
name: "user_id"
by: "post.user_id"
}
}
},
{ name: "posts", by: "[post]" },
{
if: "user != null"
name: "users"
map {
iterator {
name: "iter"
src: "posts"
}
message {
name: "User"
args {
name: "user_id"
by: "iter.user_id"
}
}
}
},
{
if: "users.size() > 0"
validation {
error {
code: INVALID_ARGUMENT
if: "users[0].id == ''"
}
}
}
]
};
string id = 1 [(grpc.federation.field).by = "post.id"];
string title = 2 [(grpc.federation.field).by = "post.title"];
User user = 4 [(grpc.federation.field).by = "users[0]"];
}
message User {
string id = 1 [(grpc.federation.field).by = "$.user_id"];
}
================================================
FILE: _examples/14_condition/proto/post/post.proto
================================================
syntax = "proto3";
package post;
option go_package = "example/post;post";
service PostService {
rpc GetPost(GetPostRequest) returns (GetPostResponse) {};
rpc GetPosts(GetPostsRequest) returns (GetPostsResponse) {};
}
message GetPostRequest {
string id = 1;
}
message GetPostResponse {
Post post = 1;
}
message GetPostsRequest {
repeated string ids = 1;
}
message GetPostsResponse {
repeated Post posts = 1;
}
message Post {
string id = 1;
string title = 2;
string content = 3;
string user_id = 4;
}
================================================
FILE: _examples/15_cel_plugin/.gitignore
================================================
grpc/federation
*.wasm
================================================
FILE: _examples/15_cel_plugin/Makefile
================================================
MAKEFILE_DIR := $(dir $(lastword $(MAKEFILE_LIST)))
GOBIN := $(MAKEFILE_DIR)/../../bin
PATH := $(GOBIN):$(PATH)
JAEGER_IMAGE := jaegertracing/all-in-one:latest
.PHONY: generate
generate:
$(GOBIN)/buf generate
.PHONY: lint
lint:
@$(GOBIN)/grpc-federation-linter -Iproto -Iproto_deps ./proto/federation/federation.proto
.PHONY: test
test: build/wasm
go test -race ./ -count=1
.PHONY: grpc-federation/generate
grpc-federation/generate:
@$(GOBIN)/grpc-federation-generator ./proto/federation/federation.proto
.PHONY: grpc-federation/watch
grpc-federation/watch:
@$(GOBIN)/grpc-federation-generator -w
.PHONY: jaeger/start
jaeger/start:
@docker run \
-e COLLECTOR_OTLP_ENABLED=true \
-p 16686:16686 \
-p 4317:4317 \
-p 4318:4318 \
-d \
$(JAEGER_IMAGE)
.PHONY: jaeger/stop
jaeger/stop:
@docker stop $(shell docker ps -q --filter ancestor=$(JAEGER_IMAGE))
build/wasm:
GOOS=wasip1 GOARCH=wasm go build -ldflags "-w -s" -o regexp.wasm ./cmd/plugin
================================================
FILE: _examples/15_cel_plugin/README.md
================================================
# CEL Plugin Example
## 1. Write plugin definition in ProtocolBuffers
The plugin feature allows you to define global functions, methods, and variables.
[plugin.proto](./proto/plugin/plugin.proto)
## 2. Run code generator
Run `make generate` to generate code by `protoc-gen-grpc-federation`.
## 3. Write plugin code
[cmd/plugin/main.go](./cmd/plugin/main.go) is the plugin source.
The helper code needed to write the plugin is already generated, so it is used.
[The helper is here](./plugin/plugin_grpc_federation.pb.go).
In `plugin/plugin_grpc_federation.pb.go`, there is a `RegisterRegexpPlugin` function required for plugin registration and a `RegexpPlugin` interface required for the plugin.
The code for the plugin is as follows.
```go
package main
import (
pluginpb "example/plugin"
"regexp"
"unsafe"
)
var _ pluginpb.RegexpPlugin = new(plugin)
type plugin struct{}
// For example.regexp.compile function.
func (_ *plugin) Example_Regexp_Compile(ctx context.Context, expr string) (*pluginpb.Regexp, error) {
re, err := regexp.Compile(expr)
if err != nil {
return nil, err
}
return &pluginpb.Regexp{
Ptr: uint32(uintptr(unsafe.Pointer(re))),
}, nil
}
// For example.regexp.Regexp.matchString method.
func (_ *plugin) Example_Regexp_Regexp_MatchString(ctx context.Context, re *pluginpb.Regexp, s string) (bool, error) {
return (*regexp.Regexp)(unsafe.Pointer(uintptr(re.Ptr))).MatchString(s), nil
}
func main() {
pluginpb.RegisterRegexpPlugin(new(plugin))
}
```
## 4. Compile a plugin to WebAssembly
Run `make build/wasm` to compile to WebAssembly.
( `regexp.wasm` is output )
## 5. Calculates sha256 value for the WebAssembly file
```console
$ sha256sum regexp.wasm
820f86011519c42da0fe9876bc2ca7fbee5df746acf104d9e2b9bba802ddd2b9 regexp.wasm
```
## 6. Load plugin ( WebAssembly ) file
Initialize the gRPC server with the path to the wasm file and the sha256 value of the file.
```go
federationServer, err := federation.NewFederationService(federation.FederationServiceConfig{
CELPlugin: &federation.FederationServiceCELPluginConfig{
Regexp: federation.FederationServiceCELPluginWasmConfig{
Path: "regexp.wasm",
Sha256: "820f86011519c42da0fe9876bc2ca7fbee5df746acf104d9e2b9bba802ddd2b9",
},
},
})
```
## 7. Plugin usage
You can evaluate the plugin's API in the same way you would evaluate a regular usage (e.g. `by` feature).
```proto
message IsMatchResponse {
option (grpc.federation.message) = {
def {
name: "matched"
by: "example.regexp.compile($.expr).matchString($.target)"
}
};
bool result = 1 [(grpc.federation.field).by = "matched"];
}
```
================================================
FILE: _examples/15_cel_plugin/buf.gen.yaml
================================================
version: v1
managed:
enabled: true
plugins:
- plugin: go
out: .
opt: paths=source_relative
- plugin: go-grpc
out: .
opt: paths=source_relative
- plugin: grpc-federation
out: .
opt:
- paths=source_relative
- import_paths=proto
================================================
FILE: _examples/15_cel_plugin/buf.work.yaml
================================================
version: v1
directories:
- proto
- proto_deps
================================================
FILE: _examples/15_cel_plugin/cmd/plugin/main.go
================================================
package main
import (
"context"
pluginpb "example/plugin"
"fmt"
"os"
"regexp"
"strings"
"time"
"unsafe"
"google.golang.org/grpc/metadata"
)
type plugin struct{}
func (_ *plugin) Val() string {
return "hello grpc-federation plugin"
}
func (_ *plugin) Example_Regexp_Compile(ctx context.Context, expr string) (*pluginpb.Regexp, error) {
md, ok := metadata.FromIncomingContext(ctx)
if ok {
fmt.Fprintf(os.Stderr, "plugin: got metadata is %+v", md)
}
re, err := regexp.Compile(expr)
if err != nil {
return nil, err
}
return &pluginpb.Regexp{
Ptr: uint32(uintptr(unsafe.Pointer(re))),
}, nil
}
func (_ *plugin) Example_Regexp_Regexp_MatchString(ctx context.Context, re *pluginpb.Regexp, s string) (bool, error) {
return (*regexp.Regexp)(unsafe.Pointer(uintptr(re.Ptr))).MatchString(s), nil
}
func (_ *plugin) Example_Regexp_NewExample(_ context.Context) (*pluginpb.Example, error) {
return &pluginpb.Example{}, nil
}
func (_ *plugin) Example_Regexp_NewExamples(_ context.Context) ([]*pluginpb.Example, error) {
return []*pluginpb.Example{{}, {}}, nil
}
func (_ *plugin) Example_Regexp_FilterExamples(_ context.Context, v []*pluginpb.Example) ([]*pluginpb.Example, error) {
return v, nil
}
func (_ *plugin) Example_Regexp_Example_Concat(_ context.Context, _ *pluginpb.Example, v []string) (string, error) {
return strings.Join(v, ""), nil
}
func (_ *plugin) Example_Regexp_Example_Split(_ context.Context, _ *pluginpb.Example, s string, sep string) ([]string, error) {
return strings.Split(s, sep), nil
}
func (_ *plugin) Example_Regexp_Block(ctx context.Context) (bool, error) {
time.Sleep(100 * time.Second)
return true, nil
}
func main() {
pluginpb.RegisterRegexpPlugin(&plugin{})
}
================================================
FILE: _examples/15_cel_plugin/federation/federation.pb.go
================================================
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.33.0
// protoc (unknown)
// source: federation/federation.proto
package federation
import (
_ "github.com/mercari/grpc-federation/grpc/federation"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
type IsMatchRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Expr string `protobuf:"bytes,1,opt,name=expr,proto3" json:"expr,omitempty"`
Target string `protobuf:"bytes,2,opt,name=target,proto3" json:"target,omitempty"`
}
func (x *IsMatchRequest) Reset() {
*x = IsMatchRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_federation_federation_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *IsMatchRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*IsMatchRequest) ProtoMessage() {}
func (x *IsMatchRequest) ProtoReflect() protoreflect.Message {
mi := &file_federation_federation_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use IsMatchRequest.ProtoReflect.Descriptor instead.
func (*IsMatchRequest) Descriptor() ([]byte, []int) {
return file_federation_federation_proto_rawDescGZIP(), []int{0}
}
func (x *IsMatchRequest) GetExpr() string {
if x != nil {
return x.Expr
}
return ""
}
func (x *IsMatchRequest) GetTarget() string {
if x != nil {
return x.Target
}
return ""
}
type IsMatchResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Result bool `protobuf:"varint,1,opt,name=result,proto3" json:"result,omitempty"`
}
func (x *IsMatchResponse) Reset() {
*x = IsMatchResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_federation_federation_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *IsMatchResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*IsMatchResponse) ProtoMessage() {}
func (x *IsMatchResponse) ProtoReflect() protoreflect.Message {
mi := &file_federation_federation_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use IsMatchResponse.ProtoReflect.Descriptor instead.
func (*IsMatchResponse) Descriptor() ([]byte, []int) {
return file_federation_federation_proto_rawDescGZIP(), []int{1}
}
func (x *IsMatchResponse) GetResult() bool {
if x != nil {
return x.Result
}
return false
}
type ExampleRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
}
func (x *ExampleRequest) Reset() {
*x = ExampleRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_federation_federation_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ExampleRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ExampleRequest) ProtoMessage() {}
func (x *ExampleRequest) ProtoReflect() protoreflect.Message {
mi := &file_federation_federation_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ExampleRequest.ProtoReflect.Descriptor instead.
func (*ExampleRequest) Descriptor() ([]byte, []int) {
return file_federation_federation_proto_rawDescGZIP(), []int{2}
}
type ExampleResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Size int64 `protobuf:"varint,1,opt,name=size,proto3" json:"size,omitempty"`
Str string `protobuf:"bytes,2,opt,name=str,proto3" json:"str,omitempty"`
Value int64 `protobuf:"varint,3,opt,name=value,proto3" json:"value,omitempty"`
}
func (x *ExampleResponse) Reset() {
*x = ExampleResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_federation_federation_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ExampleResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ExampleResponse) ProtoMessage() {}
func (x *ExampleResponse) ProtoReflect() protoreflect.Message {
mi := &file_federation_federation_proto_msgTypes[3]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ExampleResponse.ProtoReflect.Descriptor instead.
func (*ExampleResponse) Descriptor() ([]byte, []int) {
return file_federation_federation_proto_rawDescGZIP(), []int{3}
}
func (x *ExampleResponse) GetSize() int64 {
if x != nil {
return x.Size
}
return 0
}
func (x *ExampleResponse) GetStr() string {
if x != nil {
return x.Str
}
return ""
}
func (x *ExampleResponse) GetValue() int64 {
if x != nil {
return x.Value
}
return 0
}
var File_federation_federation_proto protoreflect.FileDescriptor
var file_federation_federation_proto_rawDesc = []byte{
0x0a, 0x1b, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x66, 0x65, 0x64,
0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0e, 0x6f,
0x72, 0x67, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x20, 0x67,
0x72, 0x70, 0x63, 0x2f, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x66,
0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22,
0x3c, 0x0a, 0x0e, 0x49, 0x73, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
0x74, 0x12, 0x12, 0x0a, 0x04, 0x65, 0x78, 0x70, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
0x04, 0x65, 0x78, 0x70, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x18,
0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x22, 0x87, 0x01,
0x0a, 0x0f, 0x49, 0x73, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
0x65, 0x12, 0x24, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28,
0x08, 0x42, 0x0c, 0x9a, 0x4a, 0x09, 0x12, 0x07, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x64, 0x52,
0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x3a, 0x4e, 0x9a, 0x4a, 0x4b, 0x0a, 0x24, 0x0a, 0x02,
0x72, 0x65, 0x5a, 0x1e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x72, 0x65, 0x67, 0x65,
0x78, 0x70, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x28, 0x24, 0x2e, 0x65, 0x78, 0x70,
0x72, 0x29, 0x0a, 0x23, 0x0a, 0x07, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x64, 0x5a, 0x18, 0x72,
0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x28, 0x24, 0x2e,
0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x29, 0x22, 0x10, 0x0a, 0x0e, 0x45, 0x78, 0x61, 0x6d, 0x70,
0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0xd3, 0x02, 0x0a, 0x0f, 0x45, 0x78,
0x61, 0x6d, 0x70, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x21, 0x0a,
0x04, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x42, 0x0d, 0x9a, 0x4a, 0x0a,
0x12, 0x08, 0x76, 0x2e, 0x73, 0x69, 0x7a, 0x65, 0x28, 0x29, 0x52, 0x04, 0x73, 0x69, 0x7a, 0x65,
0x12, 0x1a, 0x0a, 0x03, 0x73, 0x74, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x08, 0x9a,
0x4a, 0x05, 0x12, 0x03, 0x73, 0x74, 0x72, 0x52, 0x03, 0x73, 0x74, 0x72, 0x12, 0x28, 0x0a, 0x05,
0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x42, 0x12, 0x9a, 0x4a, 0x0f,
0x12, 0x0d, 0x65, 0x78, 0x70, 0x5f, 0x6d, 0x73, 0x67, 0x2e, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x52,
0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0xd6, 0x01, 0x9a, 0x4a, 0xd2, 0x01, 0x0a, 0x24, 0x0a,
0x04, 0x65, 0x78, 0x70, 0x73, 0x5a, 0x1c, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x72,
0x65, 0x67, 0x65, 0x78, 0x70, 0x2e, 0x6e, 0x65, 0x77, 0x45, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65,
0x73, 0x28, 0x29, 0x0a, 0x28, 0x0a, 0x01, 0x76, 0x5a, 0x23, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c,
0x65, 0x2e, 0x72, 0x65, 0x67, 0x65, 0x78, 0x70, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x45,
0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x73, 0x28, 0x65, 0x78, 0x70, 0x73, 0x29, 0x0a, 0x22, 0x0a,
0x03, 0x65, 0x78, 0x70, 0x5a, 0x1b, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x72, 0x65,
0x67, 0x65, 0x78, 0x70, 0x2e, 0x6e, 0x65, 0x77, 0x45, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x28,
0x29, 0x0a, 0x2b, 0x0a, 0x03, 0x73, 0x74, 0x72, 0x5a, 0x24, 0x65, 0x78, 0x70, 0x2e, 0x63, 0x6f,
0x6e, 0x63, 0x61, 0x74, 0x28, 0x65, 0x78, 0x70, 0x2e, 0x73, 0x70, 0x6c, 0x69, 0x74, 0x28, 0x27,
0x2f, 0x61, 0x2f, 0x62, 0x2f, 0x63, 0x27, 0x2c, 0x20, 0x27, 0x2f, 0x27, 0x29, 0x29, 0x0a, 0x2f,
0x0a, 0x07, 0x65, 0x78, 0x70, 0x5f, 0x6d, 0x73, 0x67, 0x6a, 0x24, 0x0a, 0x16, 0x65, 0x78, 0x61,
0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x72, 0x65, 0x67, 0x65, 0x78, 0x70, 0x2e, 0x45, 0x78, 0x61, 0x6d,
0x70, 0x6c, 0x65, 0x12, 0x0a, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x01, 0x32, 0x32,
0xb4, 0x01, 0x0a, 0x11, 0x46, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65,
0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x4c, 0x0a, 0x07, 0x49, 0x73, 0x4d, 0x61, 0x74, 0x63, 0x68,
0x12, 0x1e, 0x2e, 0x6f, 0x72, 0x67, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f,
0x6e, 0x2e, 0x49, 0x73, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
0x1a, 0x1f, 0x2e, 0x6f, 0x72, 0x67, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f,
0x6e, 0x2e, 0x49, 0x73, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
0x65, 0x22, 0x00, 0x12, 0x4c, 0x0a, 0x07, 0x45, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x12, 0x1e,
0x2e, 0x6f, 0x72, 0x67, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e,
0x45, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f,
0x2e, 0x6f, 0x72, 0x67, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e,
0x45, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22,
0x00, 0x1a, 0x03, 0x9a, 0x4a, 0x00, 0x42, 0xb5, 0x01, 0x9a, 0x4a, 0x15, 0x12, 0x13, 0x70, 0x6c,
0x75, 0x67, 0x69, 0x6e, 0x2f, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x0a, 0x12, 0x63, 0x6f, 0x6d, 0x2e, 0x6f, 0x72, 0x67, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72,
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x0f, 0x46, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f,
0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x1d, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c,
0x65, 0x2f, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x3b, 0x66, 0x65, 0x64,
0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0xa2, 0x02, 0x03, 0x4f, 0x46, 0x58, 0xaa, 0x02, 0x0e,
0x4f, 0x72, 0x67, 0x2e, 0x46, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0xca, 0x02,
0x0e, 0x4f, 0x72, 0x67, 0x5c, 0x46, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0xe2,
0x02, 0x1a, 0x4f, 0x72, 0x67, 0x5c, 0x46, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e,
0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0f, 0x4f,
0x72, 0x67, 0x3a, 0x3a, 0x46, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x62, 0x06,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_federation_federation_proto_rawDescOnce sync.Once
file_federation_federation_proto_rawDescData = file_federation_federation_proto_rawDesc
)
func file_federation_federation_proto_rawDescGZIP() []byte {
file_federation_federation_proto_rawDescOnce.Do(func() {
file_federation_federation_proto_rawDescData = protoimpl.X.CompressGZIP(file_federation_federation_proto_rawDescData)
})
return file_federation_federation_proto_rawDescData
}
var file_federation_federation_proto_msgTypes = make([]protoimpl.MessageInfo, 4)
var file_federation_federation_proto_goTypes = []interface{}{
(*IsMatchRequest)(nil), // 0: org.federation.IsMatchRequest
(*IsMatchResponse)(nil), // 1: org.federation.IsMatchResponse
(*ExampleRequest)(nil), // 2: org.federation.ExampleRequest
(*ExampleResponse)(nil), // 3: org.federation.ExampleResponse
}
var file_federation_federation_proto_depIdxs = []int32{
0, // 0: org.federation.FederationService.IsMatch:input_type -> org.federation.IsMatchRequest
2, // 1: org.federation.FederationService.Example:input_type -> org.federation.ExampleRequest
1, // 2: org.federation.FederationService.IsMatch:output_type -> org.federation.IsMatchResponse
3, // 3: org.federation.FederationService.Example:output_type -> org.federation.ExampleResponse
2, // [2:4] is the sub-list for method output_type
0, // [0:2] is the sub-list for method input_type
0, // [0:0] is the sub-list for extension type_name
0, // [0:0] is the sub-list for extension extendee
0, // [0:0] is the sub-list for field type_name
}
func init() { file_federation_federation_proto_init() }
func file_federation_federation_proto_init() {
if File_federation_federation_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_federation_federation_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*IsMatchRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_federation_federation_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*IsMatchResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_federation_federation_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ExampleRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_federation_federation_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ExampleResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_federation_federation_proto_rawDesc,
NumEnums: 0,
NumMessages: 4,
NumExtensions: 0,
NumServices: 1,
},
GoTypes: file_federation_federation_proto_goTypes,
DependencyIndexes: file_federation_federation_proto_depIdxs,
MessageInfos: file_federation_federation_proto_msgTypes,
}.Build()
File_federation_federation_proto = out.File
file_federation_federation_proto_rawDesc = nil
file_federation_federation_proto_goTypes = nil
file_federation_federation_proto_depIdxs = nil
}
================================================
FILE: _examples/15_cel_plugin/federation/federation_grpc.pb.go
================================================
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.3.0
// - protoc (unknown)
// source: federation/federation.proto
package federation
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 (
FederationService_IsMatch_FullMethodName = "/org.federation.FederationService/IsMatch"
FederationService_Example_FullMethodName = "/org.federation.FederationService/Example"
)
// FederationServiceClient is the client API for FederationService 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 FederationServiceClient interface {
IsMatch(ctx context.Context, in *IsMatchRequest, opts ...grpc.CallOption) (*IsMatchResponse, error)
Example(ctx context.Context, in *ExampleRequest, opts ...grpc.CallOption) (*ExampleResponse, error)
}
type federationServiceClient struct {
cc grpc.ClientConnInterface
}
func NewFederationServiceClient(cc grpc.ClientConnInterface) FederationServiceClient {
return &federationServiceClient{cc}
}
func (c *federationServiceClient) IsMatch(ctx context.Context, in *IsMatchRequest, opts ...grpc.CallOption) (*IsMatchResponse, error) {
out := new(IsMatchResponse)
err := c.cc.Invoke(ctx, FederationService_IsMatch_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *federationServiceClient) Example(ctx context.Context, in *ExampleRequest, opts ...grpc.CallOption) (*ExampleResponse, error) {
out := new(ExampleResponse)
err := c.cc.Invoke(ctx, FederationService_Example_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// FederationServiceServer is the server API for FederationService service.
// All implementations must embed UnimplementedFederationServiceServer
// for forward compatibility
type FederationServiceServer interface {
IsMatch(context.Context, *IsMatchRequest) (*IsMatchResponse, error)
Example(context.Context, *ExampleRequest) (*ExampleResponse, error)
mustEmbedUnimplementedFederationServiceServer()
}
// UnimplementedFederationServiceServer must be embedded to have forward compatible implementations.
type UnimplementedFederationServiceServer struct {
}
func (UnimplementedFederationServiceServer) IsMatch(context.Context, *IsMatchRequest) (*IsMatchResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method IsMatch not implemented")
}
func (UnimplementedFederationServiceServer) Example(context.Context, *ExampleRequest) (*ExampleResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method Example not implemented")
}
func (UnimplementedFederationServiceServer) mustEmbedUnimplementedFederationServiceServer() {}
// UnsafeFederationServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to FederationServiceServer will
// result in compilation errors.
type UnsafeFederationServiceServer interface {
mustEmbedUnimplementedFederationServiceServer()
}
func RegisterFederationServiceServer(s grpc.ServiceRegistrar, srv FederationServiceServer) {
s.RegisterService(&FederationService_ServiceDesc, srv)
}
func _FederationService_IsMatch_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(IsMatchRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(FederationServiceServer).IsMatch(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: FederationService_IsMatch_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(FederationServiceServer).IsMatch(ctx, req.(*IsMatchRequest))
}
return interceptor(ctx, in, info, handler)
}
func _FederationService_Example_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ExampleRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(FederationServiceServer).Example(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: FederationService_Example_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(FederationServiceServer).Example(ctx, req.(*ExampleRequest))
}
return interceptor(ctx, in, info, handler)
}
// FederationService_ServiceDesc is the grpc.ServiceDesc for FederationService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var FederationService_ServiceDesc = grpc.ServiceDesc{
ServiceName: "org.federation.FederationService",
HandlerType: (*FederationServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "IsMatch",
Handler: _FederationService_IsMatch_Handler,
},
{
MethodName: "Example",
Handler: _FederationService_Example_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "federation/federation.proto",
}
================================================
FILE: _examples/15_cel_plugin/federation/federation_grpc_federation.pb.go
================================================
// Code generated by protoc-gen-grpc-federation. DO NOT EDIT!
// versions:
//
// protoc-gen-grpc-federation: (devel)
//
// source: federation/federation.proto
package federation
import (
"context"
"io"
"log/slog"
"reflect"
grpcfed "github.com/mercari/grpc-federation/grpc/federation"
grpcfedcel "github.com/mercari/grpc-federation/grpc/federation/cel"
"go.opentelemetry.io/otel"
"go.opentelemetry.io/otel/trace"
pluginpb "example/plugin"
)
var (
_ = reflect.Invalid // to avoid "imported and not used error"
)
// Example_Regexp_ExampleVariable represents variable definitions in "example.regexp.Example".
type FederationService_Example_Regexp_ExampleVariable struct {
V int64
}
// Example_Regexp_ExampleArgument is argument for "example.regexp.Example" message.
type FederationService_Example_Regexp_ExampleArgument struct {
Value int64
FederationService_Example_Regexp_ExampleVariable
}
// Org_Federation_ExampleResponseVariable represents variable definitions in "org.federation.ExampleResponse".
type FederationService_Org_Federation_ExampleResponseVariable struct {
Exp *pluginpb.Example
ExpMsg *pluginpb.Example
Exps []*pluginpb.Example
Str string
V []*pluginpb.Example
}
// Org_Federation_ExampleResponseArgument is argument for "org.federation.ExampleResponse" message.
type FederationService_Org_Federation_ExampleResponseArgument struct {
FederationService_Org_Federation_ExampleResponseVariable
}
// Org_Federation_IsMatchResponseVariable represents variable definitions in "org.federation.IsMatchResponse".
type FederationService_Org_Federation_IsMatchResponseVariable struct {
Matched bool
Re *pluginpb.Regexp
}
// Org_Federation_IsMatchResponseArgument is argument for "org.federation.IsMatchResponse" message.
type FederationService_Org_Federation_IsMatchResponseArgument struct {
Expr string
Target string
FederationService_Org_Federation_IsMatchResponseVariable
}
// FederationServiceConfig configuration required to initialize the service that use GRPC Federation.
type FederationServiceConfig struct {
// CELPlugin If you use the plugin feature to extend the CEL API,
// you must write a plugin and output WebAssembly.
// In this field, configure to load wasm with the path to the WebAssembly file and the sha256 value.
CELPlugin *FederationServiceCELPluginConfig
// ErrorHandler Federation Service often needs to convert errors received from downstream services.
// If an error occurs during method execution in the Federation Service, this error handler is called and the returned error is treated as a final error.
ErrorHandler grpcfed.ErrorHandler
// Logger sets the logger used to output Debug/Info/Error information.
Logger *slog.Logger
}
// FederationServiceClientFactory provides a factory that creates the gRPC Client needed to invoke methods of the gRPC Service on which the Federation Service depends.
type FederationServiceClientFactory interface {
}
// FederationServiceClientConfig helper to create gRPC client.
// Hints for creating a gRPC Client.
type FederationServiceClientConfig struct {
// Service FQDN ( `.` ) of the service on Protocol Buffers.
Service string
}
// FederationServiceDependentClientSet has a gRPC client for all services on which the federation service depends.
// This is provided as an argument when implementing the custom resolver.
type FederationServiceDependentClientSet struct {
}
// FederationServiceResolver provides an interface to directly implement message resolver and field resolver not defined in Protocol Buffers.
type FederationServiceResolver interface {
}
// FederationServiceCELPluginWasmConfig type alias for grpcfedcel.WasmConfig.
type FederationServiceCELPluginWasmConfig = grpcfedcel.WasmConfig
// FederationServiceCELPluginConfig hints for loading a WebAssembly based plugin.
type FederationServiceCELPluginConfig struct {
Regexp FederationServiceCELPluginWasmConfig
CacheDir string
}
// FederationServiceUnimplementedResolver a structure implemented to satisfy the Resolver interface.
// An Unimplemented error is always returned.
// This is intended for use when there are many Resolver interfaces that do not need to be implemented,
// by embedding them in a resolver structure that you have created.
type FederationServiceUnimplementedResolver struct{}
// FederationService represents Federation Service.
type FederationService struct {
UnimplementedFederationServiceServer
cfg FederationServiceConfig
logger *slog.Logger
isLogLevelDebug bool
errorHandler grpcfed.ErrorHandler
celCacheMap *grpcfed.CELCacheMap
tracer trace.Tracer
celTypeHelper *grpcfed.CELTypeHelper
celEnvOpts []grpcfed.CELEnvOption
celPlugins []*grpcfedcel.CELPlugin
client *FederationServiceDependentClientSet
}
// NewFederationService creates FederationService instance by FederationServiceConfig.
func NewFederationService(cfg FederationServiceConfig) (*FederationService, error) {
if cfg.CELPlugin == nil {
return nil, grpcfed.ErrCELPluginConfig
}
logger := cfg.Logger
if logger == nil {
logger = slog.New(slog.NewJSONHandler(io.Discard, nil))
}
tracer := otel.Tracer("org.federation.FederationService")
ctx := grpcfed.WithLogger(context.Background(), logger)
ctx = grpcfed.WithTracer(ctx, tracer)
errorHandler := cfg.ErrorHandler
if errorHandler == nil {
errorHandler = func(ctx context.Context, methodName string, err error) error { return err }
}
celTypeHelperFieldMap := grpcfed.CELTypeHelperFieldMap{
"grpc.federation.private.example.regexp.ExampleArgument": {
"value": grpcfed.NewCELFieldType(grpcfed.CELIntType, "Value"),
},
"grpc.federation.private.org.federation.ExampleResponseArgument": {},
"grpc.federation.private.org.federation.IsMatchResponseArgument": {
"expr": grpcfed.NewCELFieldType(grpcfed.CELStringType, "Expr"),
"target": grpcfed.NewCELFieldType(grpcfed.CELStringType, "Target"),
},
}
celTypeHelper := grpcfed.NewCELTypeHelper("org.federation", celTypeHelperFieldMap)
var celEnvOpts []grpcfed.CELEnvOption
celEnvOpts = append(celEnvOpts, grpcfed.NewDefaultEnvOptions(celTypeHelper)...)
var celPlugins []*grpcfedcel.CELPlugin
{
plugin, err := grpcfedcel.NewCELPlugin(ctx, grpcfedcel.CELPluginConfig{
Name: "regexp",
Wasm: cfg.CELPlugin.Regexp,
CacheDir: cfg.CELPlugin.CacheDir,
Functions: []*grpcfedcel.CELFunction{
{
Name: "example.regexp.compile",
ID: "example_regexp_compile_string_example_regexp_Regexp",
Args: []*grpcfed.CELTypeDeclare{
grpcfed.CELStringType,
},
Return: grpcfed.NewCELObjectType("example.regexp.Regexp"),
IsMethod: false,
},
{
Name: "example.regexp.newExample",
ID: "example_regexp_newExample_example_regexp_Example",
Args: []*grpcfed.CELTypeDeclare{},
Return: grpcfed.NewCELObjectType("example.regexp.Example"),
IsMethod: false,
},
{
Name: "example.regexp.newExamples",
ID: "example_regexp_newExamples_repeated example_regexp_Example",
Args: []*grpcfed.CELTypeDeclare{},
Return: grpcfed.NewCELListType(grpcfed.NewCELObjectType("example.regexp.Example")),
IsMethod: false,
},
{
Name: "example.regexp.filterExamples",
ID: "example_regexp_filterExamples_repeated example_regexp_Example_repeated example_regexp_Example",
Args: []*grpcfed.CELTypeDeclare{
grpcfed.NewCELListType(grpcfed.NewCELObjectType("example.regexp.Example")),
},
Return: grpcfed.NewCELListType(grpcfed.NewCELObjectType("example.regexp.Example")),
IsMethod: false,
},
{
Name: "matchString",
ID: "example_regexp_Regexp_matchString_example_regexp_Regexp_string_bool",
Args: []*grpcfed.CELTypeDeclare{
grpcfed.NewCELObjectType("example.regexp.Regexp"),
grpcfed.CELStringType,
},
Return: grpcfed.CELBoolType,
IsMethod: true,
},
{
Name: "concat",
ID: "example_regexp_Example_concat_example_regexp_Example_repeated string_string",
Args: []*grpcfed.CELTypeDeclare{
grpcfed.NewCELObjectType("example.regexp.Example"),
grpcfed.NewCELListType(grpcfed.CELStringType),
},
Return: grpcfed.CELStringType,
IsMethod: true,
},
{
Name: "split",
ID: "example_regexp_Example_split_example_regexp_Example_string_string_repeated string",
Args: []*grpcfed.CELTypeDeclare{
grpcfed.NewCELObjectType("example.regexp.Example"),
grpcfed.CELStringType,
grpcfed.CELStringType,
},
Return: grpcfed.NewCELListType(grpcfed.CELStringType),
IsMethod: true,
},
},
Capability: &grpcfedcel.CELPluginCapability{},
})
if err != nil {
return nil, err
}
instance, err := plugin.CreateInstance(ctx, celTypeHelper.CELRegistry())
if err != nil {
return nil, err
}
if err := instance.ValidatePlugin(ctx); err != nil {
return nil, err
}
celPlugins = append(celPlugins, plugin)
celEnvOpts = append(celEnvOpts, grpcfed.CELLib(plugin))
}
svc := &FederationService{
cfg: cfg,
logger: logger,
isLogLevelDebug: logger.Enabled(context.Background(), slog.LevelDebug),
errorHandler: errorHandler,
celEnvOpts: celEnvOpts,
celTypeHelper: celTypeHelper,
celCacheMap: grpcfed.NewCELCacheMap(),
tracer: tracer,
celPlugins: celPlugins,
client: &FederationServiceDependentClientSet{},
}
return svc, nil
}
// CleanupFederationService cleanup all resources to prevent goroutine leaks.
func CleanupFederationService(ctx context.Context, svc *FederationService) {
svc.cleanup(ctx)
}
func (s *FederationService) cleanup(ctx context.Context) {
for _, plugin := range s.celPlugins {
plugin.Close()
}
}
// IsMatch implements "org.federation.FederationService/IsMatch" method.
func (s *FederationService) IsMatch(ctx context.Context, req *IsMatchRequest) (res *IsMatchResponse, e error) {
ctx, span := s.tracer.Start(ctx, "org.federation.FederationService/IsMatch")
defer span.End()
ctx = grpcfed.WithLogger(ctx, s.logger)
ctx = grpcfed.WithCELCacheMap(ctx, s.celCacheMap)
defer func() {
if r := recover(); r != nil {
e = grpcfed.RecoverError(r, grpcfed.StackTrace())
grpcfed.OutputErrorLog(ctx, e)
}
}()
defer func() {
for _, celPlugin := range s.celPlugins {
celPlugin.Cleanup()
}
}()
res, err := s.resolve_Org_Federation_IsMatchResponse(ctx, &FederationService_Org_Federation_IsMatchResponseArgument{
Expr: req.GetExpr(),
Target: req.GetTarget(),
})
if err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
grpcfed.OutputErrorLog(ctx, err)
return nil, err
}
return res, nil
}
// Example implements "org.federation.FederationService/Example" method.
func (s *FederationService) Example(ctx context.Context, req *ExampleRequest) (res *ExampleResponse, e error) {
ctx, span := s.tracer.Start(ctx, "org.federation.FederationService/Example")
defer span.End()
ctx = grpcfed.WithLogger(ctx, s.logger)
ctx = grpcfed.WithCELCacheMap(ctx, s.celCacheMap)
defer func() {
if r := recover(); r != nil {
e = grpcfed.RecoverError(r, grpcfed.StackTrace())
grpcfed.OutputErrorLog(ctx, e)
}
}()
defer func() {
for _, celPlugin := range s.celPlugins {
celPlugin.Cleanup()
}
}()
res, err := s.resolve_Org_Federation_ExampleResponse(ctx, &FederationService_Org_Federation_ExampleResponseArgument{})
if err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
grpcfed.OutputErrorLog(ctx, err)
return nil, err
}
return res, nil
}
// resolve_Example_Regexp_Example resolve "example.regexp.Example" message.
func (s *FederationService) resolve_Example_Regexp_Example(ctx context.Context, req *FederationService_Example_Regexp_ExampleArgument) (*pluginpb.Example, error) {
ctx, span := s.tracer.Start(ctx, "example.regexp.Example")
defer span.End()
ctx = grpcfed.WithLogger(ctx, grpcfed.Logger(ctx), grpcfed.LogAttrs(ctx)...)
grpcfed.Logger(ctx).DebugContext(ctx, "resolve example.regexp.Example", slog.Any("message_args", s.logvalue_Example_Regexp_ExampleArgument(req)))
type localValueType struct {
*grpcfed.LocalValue
vars struct {
V int64
}
}
value := &localValueType{LocalValue: grpcfed.NewLocalValue(ctx, s.celEnvOpts, "grpc.federation.private.example.regexp.ExampleArgument", req)}
ctx = grpcfed.WithLocalValue(ctx, value.LocalValue)
/*
def {
name: "v"
by: "$.value + 1"
}
*/
def_v := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[int64, *localValueType]{
Name: `v`,
Type: grpcfed.CELIntType,
Setter: func(value *localValueType, v int64) error {
value.vars.V = v
return nil
},
By: `$.value + 1`,
ByCacheIndex: 1,
})
}
if err := def_v(ctx); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
// assign named parameters to message arguments to pass to the custom resolver.
req.FederationService_Example_Regexp_ExampleVariable.V = value.vars.V
// create a message value to be returned.
ret := &pluginpb.Example{}
// field binding section.
// (grpc.federation.field).by = "v"
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[int64]{
Value: value,
Expr: `v`,
CacheIndex: 2,
Setter: func(v int64) error {
ret.Value = v
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
grpcfed.Logger(ctx).DebugContext(ctx, "resolved example.regexp.Example", slog.Any("example.regexp.Example", s.logvalue_Example_Regexp_Example(ret)))
return ret, nil
}
// resolve_Org_Federation_ExampleResponse resolve "org.federation.ExampleResponse" message.
func (s *FederationService) resolve_Org_Federation_ExampleResponse(ctx context.Context, req *FederationService_Org_Federation_ExampleResponseArgument) (*ExampleResponse, error) {
ctx, span := s.tracer.Start(ctx, "org.federation.ExampleResponse")
defer span.End()
ctx = grpcfed.WithLogger(ctx, grpcfed.Logger(ctx), grpcfed.LogAttrs(ctx)...)
grpcfed.Logger(ctx).DebugContext(ctx, "resolve org.federation.ExampleResponse", slog.Any("message_args", s.logvalue_Org_Federation_ExampleResponseArgument(req)))
type localValueType struct {
*grpcfed.LocalValue
vars struct {
Exp *pluginpb.Example
ExpMsg *pluginpb.Example
Exps []*pluginpb.Example
Str string
V []*pluginpb.Example
}
}
value := &localValueType{LocalValue: grpcfed.NewLocalValue(ctx, s.celEnvOpts, "grpc.federation.private.org.federation.ExampleResponseArgument", req)}
ctx = grpcfed.WithLocalValue(ctx, value.LocalValue)
/*
def {
name: "exps"
by: "example.regexp.newExamples()"
}
*/
def_exps := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[[]*pluginpb.Example, *localValueType]{
Name: `exps`,
Type: grpcfed.CELListType(grpcfed.CELObjectType("example.regexp.Example")),
Setter: func(value *localValueType, v []*pluginpb.Example) error {
value.vars.Exps = v
return nil
},
By: `example.regexp.newExamples()`,
ByCacheIndex: 3,
})
}
/*
def {
name: "v"
by: "example.regexp.filterExamples(exps)"
}
*/
def_v := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[[]*pluginpb.Example, *localValueType]{
Name: `v`,
Type: grpcfed.CELListType(grpcfed.CELObjectType("example.regexp.Example")),
Setter: func(value *localValueType, v []*pluginpb.Example) error {
value.vars.V = v
return nil
},
By: `example.regexp.filterExamples(exps)`,
ByCacheIndex: 4,
})
}
/*
def {
name: "exp"
by: "example.regexp.newExample()"
}
*/
def_exp := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[*pluginpb.Example, *localValueType]{
Name: `exp`,
Type: grpcfed.CELObjectType("example.regexp.Example"),
Setter: func(value *localValueType, v *pluginpb.Example) error {
value.vars.Exp = v
return nil
},
By: `example.regexp.newExample()`,
ByCacheIndex: 5,
})
}
/*
def {
name: "str"
by: "exp.concat(exp.split('/a/b/c', '/'))"
}
*/
def_str := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[string, *localValueType]{
Name: `str`,
Type: grpcfed.CELStringType,
Setter: func(value *localValueType, v string) error {
value.vars.Str = v
return nil
},
By: `exp.concat(exp.split('/a/b/c', '/'))`,
ByCacheIndex: 6,
})
}
/*
def {
name: "exp_msg"
message {
name: "Example"
args { name: "value", by: "2" }
}
}
*/
def_exp_msg := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[*pluginpb.Example, *localValueType]{
Name: `exp_msg`,
Type: grpcfed.CELObjectType("example.regexp.Example"),
Setter: func(value *localValueType, v *pluginpb.Example) error {
value.vars.ExpMsg = v
return nil
},
Message: func(ctx context.Context, value *localValueType) (any, error) {
args := &FederationService_Example_Regexp_ExampleArgument{}
// { name: "value", by: "2" }
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[int64]{
Value: value,
Expr: `2`,
CacheIndex: 7,
Setter: func(v int64) error {
args.Value = v
return nil
},
}); err != nil {
return nil, err
}
ret, err := s.resolve_Example_Regexp_Example(ctx, args)
if err != nil {
return nil, err
}
return ret, nil
},
})
}
// A tree view of message dependencies is shown below.
/*
exp_msg ─┐
exp ─┐ │
str ─┤
exps ─┐ │
v ─┤
*/
eg, ctx1 := grpcfed.ErrorGroupWithContext(ctx)
grpcfed.GoWithRecover(eg, func() (any, error) {
if err := def_exp_msg(ctx1); err != nil {
grpcfed.RecordErrorToSpan(ctx1, err)
return nil, err
}
return nil, nil
})
grpcfed.GoWithRecover(eg, func() (any, error) {
if err := def_exp(ctx1); err != nil {
grpcfed.RecordErrorToSpan(ctx1, err)
return nil, err
}
if err := def_str(ctx1); err != nil {
grpcfed.RecordErrorToSpan(ctx1, err)
return nil, err
}
return nil, nil
})
grpcfed.GoWithRecover(eg, func() (any, error) {
if err := def_exps(ctx1); err != nil {
grpcfed.RecordErrorToSpan(ctx1, err)
return nil, err
}
if err := def_v(ctx1); err != nil {
grpcfed.RecordErrorToSpan(ctx1, err)
return nil, err
}
return nil, nil
})
if err := eg.Wait(); err != nil {
return nil, err
}
// assign named parameters to message arguments to pass to the custom resolver.
req.FederationService_Org_Federation_ExampleResponseVariable.Exp = value.vars.Exp
req.FederationService_Org_Federation_ExampleResponseVariable.ExpMsg = value.vars.ExpMsg
req.FederationService_Org_Federation_ExampleResponseVariable.Exps = value.vars.Exps
req.FederationService_Org_Federation_ExampleResponseVariable.Str = value.vars.Str
req.FederationService_Org_Federation_ExampleResponseVariable.V = value.vars.V
// create a message value to be returned.
ret := &ExampleResponse{}
// field binding section.
// (grpc.federation.field).by = "v.size()"
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[int64]{
Value: value,
Expr: `v.size()`,
CacheIndex: 8,
Setter: func(v int64) error {
ret.Size = v
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
// (grpc.federation.field).by = "str"
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[string]{
Value: value,
Expr: `str`,
CacheIndex: 9,
Setter: func(v string) error {
ret.Str = v
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
// (grpc.federation.field).by = "exp_msg.value"
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[int64]{
Value: value,
Expr: `exp_msg.value`,
CacheIndex: 10,
Setter: func(v int64) error {
ret.Value = v
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
grpcfed.Logger(ctx).DebugContext(ctx, "resolved org.federation.ExampleResponse", slog.Any("org.federation.ExampleResponse", s.logvalue_Org_Federation_ExampleResponse(ret)))
return ret, nil
}
// resolve_Org_Federation_IsMatchResponse resolve "org.federation.IsMatchResponse" message.
func (s *FederationService) resolve_Org_Federation_IsMatchResponse(ctx context.Context, req *FederationService_Org_Federation_IsMatchResponseArgument) (*IsMatchResponse, error) {
ctx, span := s.tracer.Start(ctx, "org.federation.IsMatchResponse")
defer span.End()
ctx = grpcfed.WithLogger(ctx, grpcfed.Logger(ctx), grpcfed.LogAttrs(ctx)...)
grpcfed.Logger(ctx).DebugContext(ctx, "resolve org.federation.IsMatchResponse", slog.Any("message_args", s.logvalue_Org_Federation_IsMatchResponseArgument(req)))
type localValueType struct {
*grpcfed.LocalValue
vars struct {
Matched bool
Re *pluginpb.Regexp
}
}
value := &localValueType{LocalValue: grpcfed.NewLocalValue(ctx, s.celEnvOpts, "grpc.federation.private.org.federation.IsMatchResponseArgument", req)}
ctx = grpcfed.WithLocalValue(ctx, value.LocalValue)
/*
def {
name: "re"
by: "example.regexp.compile($.expr)"
}
*/
def_re := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[*pluginpb.Regexp, *localValueType]{
Name: `re`,
Type: grpcfed.CELObjectType("example.regexp.Regexp"),
Setter: func(value *localValueType, v *pluginpb.Regexp) error {
value.vars.Re = v
return nil
},
By: `example.regexp.compile($.expr)`,
ByCacheIndex: 11,
})
}
/*
def {
name: "matched"
by: "re.matchString($.target)"
}
*/
def_matched := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[bool, *localValueType]{
Name: `matched`,
Type: grpcfed.CELBoolType,
Setter: func(value *localValueType, v bool) error {
value.vars.Matched = v
return nil
},
By: `re.matchString($.target)`,
ByCacheIndex: 12,
})
}
if err := def_re(ctx); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
if err := def_matched(ctx); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
// assign named parameters to message arguments to pass to the custom resolver.
req.FederationService_Org_Federation_IsMatchResponseVariable.Matched = value.vars.Matched
req.FederationService_Org_Federation_IsMatchResponseVariable.Re = value.vars.Re
// create a message value to be returned.
ret := &IsMatchResponse{}
// field binding section.
// (grpc.federation.field).by = "matched"
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[bool]{
Value: value,
Expr: `matched`,
CacheIndex: 13,
Setter: func(v bool) error {
ret.Result = v
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
grpcfed.Logger(ctx).DebugContext(ctx, "resolved org.federation.IsMatchResponse", slog.Any("org.federation.IsMatchResponse", s.logvalue_Org_Federation_IsMatchResponse(ret)))
return ret, nil
}
func (s *FederationService) logvalue_Example_Regexp_Example(v *pluginpb.Example) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.Int64("value", v.GetValue()),
)
}
func (s *FederationService) logvalue_Example_Regexp_ExampleArgument(v *FederationService_Example_Regexp_ExampleArgument) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.Int64("value", v.Value),
)
}
func (s *FederationService) logvalue_Org_Federation_ExampleResponse(v *ExampleResponse) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.Int64("size", v.GetSize()),
slog.String("str", v.GetStr()),
slog.Int64("value", v.GetValue()),
)
}
func (s *FederationService) logvalue_Org_Federation_ExampleResponseArgument(v *FederationService_Org_Federation_ExampleResponseArgument) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue()
}
func (s *FederationService) logvalue_Org_Federation_IsMatchResponse(v *IsMatchResponse) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.Bool("result", v.GetResult()),
)
}
func (s *FederationService) logvalue_Org_Federation_IsMatchResponseArgument(v *FederationService_Org_Federation_IsMatchResponseArgument) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.String("expr", v.Expr),
slog.String("target", v.Target),
)
}
================================================
FILE: _examples/15_cel_plugin/go.mod
================================================
module example
go 1.24.0
replace github.com/mercari/grpc-federation => ../../
require (
github.com/google/go-cmp v0.7.0
github.com/mercari/grpc-federation v0.0.0-00010101000000-000000000000
go.opentelemetry.io/otel v1.24.0
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.21.0
go.opentelemetry.io/otel/sdk v1.24.0
go.opentelemetry.io/otel/trace v1.24.0
go.uber.org/goleak v1.3.0
google.golang.org/genproto/googleapis/rpc v0.0.0-20240826202546-f6391c0de4c7
google.golang.org/grpc v1.65.0
google.golang.org/protobuf v1.34.2
)
require (
cel.dev/expr v0.19.1 // indirect
github.com/antlr4-go/antlr/v4 v4.13.0 // indirect
github.com/cenkalti/backoff/v4 v4.2.1 // indirect
github.com/go-logr/logr v1.4.1 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
github.com/goccy/wasi-go v0.3.2 // indirect
github.com/google/cel-go v0.23.1 // indirect
github.com/google/uuid v1.6.0 // indirect
github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0 // indirect
github.com/kelseyhightower/envconfig v1.4.0 // indirect
github.com/stealthrocket/wazergo v0.19.1 // indirect
github.com/stoewer/go-strcase v1.3.0 // indirect
github.com/tetratelabs/wazero v1.10.1 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.21.0 // indirect
go.opentelemetry.io/otel/metric v1.24.0 // indirect
go.opentelemetry.io/proto/otlp v1.0.0 // indirect
golang.org/x/exp v0.0.0-20250506013437-ce4c2cf36ca6 // indirect
golang.org/x/net v0.38.0 // indirect
golang.org/x/sync v0.14.0 // indirect
golang.org/x/sys v0.37.0 // indirect
golang.org/x/text v0.23.0 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20240826202546-f6391c0de4c7 // indirect
)
================================================
FILE: _examples/15_cel_plugin/go.sum
================================================
cel.dev/expr v0.19.1 h1:NciYrtDRIR0lNCnH1LFJegdjspNx9fI59O7TWcua/W4=
cel.dev/expr v0.19.1/go.mod h1:MrpN08Q+lEBs+bGYdLxxHkZoUSsCp0nSKTs0nTymJgw=
github.com/antlr4-go/antlr/v4 v4.13.0 h1:lxCg3LAv+EUK6t1i0y1V6/SLeUi0eKEKdhQAlS8TVTI=
github.com/antlr4-go/antlr/v4 v4.13.0/go.mod h1:pfChB/xh/Unjila75QW7+VU4TSnWnnk9UTnmpPaOR2g=
github.com/cenkalti/backoff/v4 v4.2.1 h1:y4OZtCnogmCPw98Zjyt5a6+QwPLGkiQsYW5oUqylYbM=
github.com/cenkalti/backoff/v4 v4.2.1/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A=
github.com/go-logr/logr v1.4.1 h1:pKouT5E8xu9zeFC39JXRDukb6JFQPXM5p5I91188VAQ=
github.com/go-logr/logr v1.4.1/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY=
github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag=
github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE=
github.com/goccy/wasi-go v0.3.2 h1:wAvGXmqCkfcp0B0AwIp5Ya53hzDwkKm9W8iuT3nCCz0=
github.com/goccy/wasi-go v0.3.2/go.mod h1:nIKD204n9xa4Z20UV+XA483kIr9TAl2vXr+X5qVAO5M=
github.com/golang/glog v1.2.1 h1:OptwRhECazUx5ix5TTWC3EZhsZEHWcYWY4FQHTIubm4=
github.com/golang/glog v1.2.1/go.mod h1:6AhwSGph0fcJtXVM/PEHPqZlFeoLxhs7/t5UDAwmO+w=
github.com/google/cel-go v0.23.1 h1:91ThhEZlBcE5rB2adBVXqvDoqdL8BG2oyhd0bK1I/r4=
github.com/google/cel-go v0.23.1/go.mod h1:52Pb6QsDbC5kvgxvZhiL9QX1oZEkcUF/ZqaPx1J5Wwo=
github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8=
github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU=
github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0 h1:YBftPWNWd4WwGqtY2yeZL2ef8rHAxPBD8KFhJpmcqms=
github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0/go.mod h1:YN5jB8ie0yfIUg6VvR9Kz84aCaG7AsGZnLjhHbUqwPg=
github.com/kelseyhightower/envconfig v1.4.0 h1:Im6hONhd3pLkfDFsbRgu68RDNkGF1r3dvMUtDTo2cv8=
github.com/kelseyhightower/envconfig v1.4.0/go.mod h1:cccZRl6mQpaq41TPp5QxidR+Sa3axMbJDNb//FQX6Gg=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/stealthrocket/wazergo v0.19.1 h1:BPrITETPgSFwiytwmToO0MbUC/+RGC39JScz1JmmG6c=
github.com/stealthrocket/wazergo v0.19.1/go.mod h1:riI0hxw4ndZA5e6z7PesHg2BtTftcZaMxRcoiGGipTs=
github.com/stoewer/go-strcase v1.3.0 h1:g0eASXYtp+yvN9fK8sH94oCIk0fau9uV1/ZdJ0AVEzs=
github.com/stoewer/go-strcase v1.3.0/go.mod h1:fAH5hQ5pehh+j3nZfvwdk2RgEgQjAoM8wodgtPmh1xo=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=
github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo=
github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk=
github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
github.com/tetratelabs/wazero v1.10.1 h1:2DugeJf6VVk58KTPszlNfeeN8AhhpwcZqkJj2wwFuH8=
github.com/tetratelabs/wazero v1.10.1/go.mod h1:DRm5twOQ5Gr1AoEdSi0CLjDQF1J9ZAuyqFIjl1KKfQU=
go.opentelemetry.io/otel v1.24.0 h1:0LAOdjNmQeSTzGBzduGe/rU4tZhMwL5rWgtp9Ku5Jfo=
go.opentelemetry.io/otel v1.24.0/go.mod h1:W7b9Ozg4nkF5tWI5zsXkaKKDjdVjpD4oAt9Qi/MArHo=
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.21.0 h1:cl5P5/GIfFh4t6xyruOgJP5QiA1pw4fYYdv6nc6CBWw=
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.21.0/go.mod h1:zgBdWWAu7oEEMC06MMKc5NLbA/1YDXV1sMpSqEeLQLg=
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.21.0 h1:tIqheXEFWAZ7O8A7m+J0aPTmpJN3YQ7qetUAdkkkKpk=
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.21.0/go.mod h1:nUeKExfxAQVbiVFn32YXpXZZHZ61Cc3s3Rn1pDBGAb0=
go.opentelemetry.io/otel/metric v1.24.0 h1:6EhoGWWK28x1fbpA4tYTOWBkPefTDQnb8WSGXlc88kI=
go.opentelemetry.io/otel/metric v1.24.0/go.mod h1:VYhLe1rFfxuTXLgj4CBiyz+9WYBA8pNGJgDcSFRKBco=
go.opentelemetry.io/otel/sdk v1.24.0 h1:YMPPDNymmQN3ZgczicBY3B6sf9n62Dlj9pWD3ucgoDw=
go.opentelemetry.io/otel/sdk v1.24.0/go.mod h1:KVrIYw6tEubO9E96HQpcmpTKDVn9gdv35HoYiQWGDFg=
go.opentelemetry.io/otel/trace v1.24.0 h1:CsKnnL4dUAr/0llH9FKuc698G04IrpWV0MQA/Y1YELI=
go.opentelemetry.io/otel/trace v1.24.0/go.mod h1:HPc3Xr/cOApsBI154IU0OI0HJexz+aw5uPdbs3UCjNU=
go.opentelemetry.io/proto/otlp v1.0.0 h1:T0TX0tmXU8a3CbNXzEKGeU5mIVOdf0oykP+u2lIVU/I=
go.opentelemetry.io/proto/otlp v1.0.0/go.mod h1:Sy6pihPLfYHkr3NkUbEhGHFhINUSI/v80hjKIs5JXpM=
go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto=
go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE=
golang.org/x/exp v0.0.0-20250506013437-ce4c2cf36ca6 h1:y5zboxd6LQAqYIhHnB48p0ByQ/GnQx2BE33L8BOHQkI=
golang.org/x/exp v0.0.0-20250506013437-ce4c2cf36ca6/go.mod h1:U6Lno4MTRCDY+Ba7aCcauB9T60gsv5s4ralQzP72ZoQ=
golang.org/x/net v0.38.0 h1:vRMAPTMaeGqVhG5QyLJHqNDwecKTomGeqbnfZyKlBI8=
golang.org/x/net v0.38.0/go.mod h1:ivrbrMbzFq5J41QOQh0siUuly180yBYtLp+CKbEaFx8=
golang.org/x/sync v0.14.0 h1:woo0S4Yywslg6hp4eUFjTVOyKt0RookbpAHG4c1HmhQ=
golang.org/x/sync v0.14.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA=
golang.org/x/sys v0.37.0 h1:fdNQudmxPjkdUTPnLn5mdQv7Zwvbvpaxqs831goi9kQ=
golang.org/x/sys v0.37.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks=
golang.org/x/text v0.23.0 h1:D71I7dUrlY+VX0gQShAThNGHFxZ13dGLBHQLVl1mJlY=
golang.org/x/text v0.23.0/go.mod h1:/BLNzu4aZCJ1+kcD0DNRotWKage4q2rGVAg4o22unh4=
google.golang.org/genproto/googleapis/api v0.0.0-20240826202546-f6391c0de4c7 h1:YcyjlL1PRr2Q17/I0dPk2JmYS5CDXfcdb2Z3YRioEbw=
google.golang.org/genproto/googleapis/api v0.0.0-20240826202546-f6391c0de4c7/go.mod h1:OCdP9MfskevB/rbYvHTsXTtKC+3bHWajPdoKgjcYkfo=
google.golang.org/genproto/googleapis/rpc v0.0.0-20240826202546-f6391c0de4c7 h1:2035KHhUv+EpyB+hWgJnaWKJOdX1E95w2S8Rr4uWKTs=
google.golang.org/genproto/googleapis/rpc v0.0.0-20240826202546-f6391c0de4c7/go.mod h1:UqMtugtsSgubUsoxbuAoiCXvqvErP7Gf0so0mK9tHxU=
google.golang.org/grpc v1.65.0 h1:bs/cUb4lp1G5iImFFd3u5ixQzweKizoZJAwBNLR42lc=
google.golang.org/grpc v1.65.0/go.mod h1:WgYC2ypjlB0EiQi6wdKixMqukr6lBc0Vo+oOgjrM5ZQ=
google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg=
google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
================================================
FILE: _examples/15_cel_plugin/main_test.go
================================================
package main_test
import (
"bytes"
"context"
"crypto/sha256"
_ "embed"
"encoding/hex"
"log/slog"
"net"
"os"
"testing"
"github.com/google/go-cmp/cmp"
"github.com/google/go-cmp/cmp/cmpopts"
"go.opentelemetry.io/otel"
"go.opentelemetry.io/otel/attribute"
"go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc"
"go.opentelemetry.io/otel/propagation"
"go.opentelemetry.io/otel/sdk/resource"
sdktrace "go.opentelemetry.io/otel/sdk/trace"
semconv "go.opentelemetry.io/otel/semconv/v1.4.0"
"go.uber.org/goleak"
"google.golang.org/grpc"
"google.golang.org/grpc/credentials/insecure"
"google.golang.org/grpc/test/bufconn"
"example/federation"
)
const bufSize = 1024
var (
listener *bufconn.Listener
//go:embed regexp.wasm
wasm []byte
)
func dialer(ctx context.Context, address string) (net.Conn, error) {
return listener.Dial()
}
func toSha256(v []byte) string {
hash := sha256.Sum256(v)
return hex.EncodeToString(hash[:])
}
func TestFederation(t *testing.T) {
defer goleak.VerifyNone(
t,
goleak.IgnoreTopFunction("github.com/mercari/grpc-federation/grpc/federation/cel.(*CELPluginInstance).recvContent.func1"),
)
ctx := context.Background()
listener = bufconn.Listen(bufSize)
if os.Getenv("ENABLE_JAEGER") != "" {
exporter, err := otlptracegrpc.New(ctx, otlptracegrpc.WithInsecure())
if err != nil {
t.Fatal(err)
}
tp := sdktrace.NewTracerProvider(
sdktrace.WithBatcher(exporter),
sdktrace.WithResource(
resource.NewWithAttributes(
semconv.SchemaURL,
semconv.ServiceNameKey.String("example15/celplugin"),
semconv.ServiceVersionKey.String("1.0.0"),
attribute.String("environment", "dev"),
),
),
sdktrace.WithSampler(sdktrace.AlwaysSample()),
)
defer tp.Shutdown(ctx)
otel.SetTextMapPropagator(propagation.TraceContext{})
otel.SetTracerProvider(tp)
}
conn, err := grpc.DialContext(
ctx, "",
grpc.WithContextDialer(dialer),
grpc.WithTransportCredentials(insecure.NewCredentials()),
grpc.WithDefaultCallOptions(grpc.WaitForReady(true)),
)
if err != nil {
t.Fatal(err)
}
defer conn.Close()
grpcServer := grpc.NewServer()
defer grpcServer.Stop()
logger := slog.New(slog.NewJSONHandler(os.Stdout, &slog.HandlerOptions{
Level: slog.LevelDebug,
}))
federationServer, err := federation.NewFederationService(federation.FederationServiceConfig{
CELPlugin: &federation.FederationServiceCELPluginConfig{
Regexp: federation.FederationServiceCELPluginWasmConfig{
Reader: bytes.NewReader(wasm),
Sha256: toSha256(wasm),
},
},
Logger: logger,
})
if err != nil {
t.Fatal(err)
}
defer federation.CleanupFederationService(ctx, federationServer)
federation.RegisterFederationServiceServer(grpcServer, federationServer)
go func() {
if err := grpcServer.Serve(listener); err != nil {
t.Fatal(err)
}
}()
client := federation.NewFederationServiceClient(conn)
t.Run("success", func(t *testing.T) {
res, err := client.IsMatch(ctx, &federation.IsMatchRequest{
Expr: "hello world",
Target: "hello world world",
})
if err != nil {
t.Fatal(err)
}
if diff := cmp.Diff(res, &federation.IsMatchResponse{
Result: true,
}, cmpopts.IgnoreUnexported(
federation.IsMatchResponse{},
)); diff != "" {
t.Errorf("(-got, +want)\n%s", diff)
}
})
t.Run("failure", func(t *testing.T) {
_, err := client.IsMatch(ctx, &federation.IsMatchRequest{
Expr: "[]",
Target: "hello world world",
})
if err == nil {
t.Fatal("expected error")
}
t.Logf("expected error is %s", err)
})
t.Run("example", func(t *testing.T) {
res, err := client.Example(ctx, &federation.ExampleRequest{})
if err != nil {
t.Fatal(err)
}
if diff := cmp.Diff(res, &federation.ExampleResponse{
Size: 2,
Str: "abc",
Value: 3,
}, cmpopts.IgnoreUnexported(
federation.ExampleResponse{},
)); diff != "" {
t.Errorf("(-got, +want)\n%s", diff)
}
})
}
================================================
FILE: _examples/15_cel_plugin/plugin/plugin.pb.go
================================================
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.33.0
// protoc (unknown)
// source: plugin/plugin.proto
package pluginpb
import (
_ "github.com/mercari/grpc-federation/grpc/federation"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
type Regexp struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Ptr uint32 `protobuf:"varint,1,opt,name=ptr,proto3" json:"ptr,omitempty"` // store raw pointer value.
}
func (x *Regexp) Reset() {
*x = Regexp{}
if protoimpl.UnsafeEnabled {
mi := &file_plugin_plugin_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Regexp) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Regexp) ProtoMessage() {}
func (x *Regexp) ProtoReflect() protoreflect.Message {
mi := &file_plugin_plugin_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Regexp.ProtoReflect.Descriptor instead.
func (*Regexp) Descriptor() ([]byte, []int) {
return file_plugin_plugin_proto_rawDescGZIP(), []int{0}
}
func (x *Regexp) GetPtr() uint32 {
if x != nil {
return x.Ptr
}
return 0
}
type Example struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Value int64 `protobuf:"varint,1,opt,name=value,proto3" json:"value,omitempty"`
}
func (x *Example) Reset() {
*x = Example{}
if protoimpl.UnsafeEnabled {
mi := &file_plugin_plugin_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Example) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Example) ProtoMessage() {}
func (x *Example) ProtoReflect() protoreflect.Message {
mi := &file_plugin_plugin_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Example.ProtoReflect.Descriptor instead.
func (*Example) Descriptor() ([]byte, []int) {
return file_plugin_plugin_proto_rawDescGZIP(), []int{1}
}
func (x *Example) GetValue() int64 {
if x != nil {
return x.Value
}
return 0
}
var File_plugin_plugin_proto protoreflect.FileDescriptor
var file_plugin_plugin_proto_rawDesc = []byte{
0x0a, 0x13, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2f, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x72,
0x65, 0x67, 0x65, 0x78, 0x70, 0x1a, 0x20, 0x67, 0x72, 0x70, 0x63, 0x2f, 0x66, 0x65, 0x64, 0x65,
0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f,
0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x1a, 0x0a, 0x06, 0x52, 0x65, 0x67, 0x65, 0x78,
0x70, 0x12, 0x10, 0x0a, 0x03, 0x70, 0x74, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x03,
0x70, 0x74, 0x72, 0x22, 0x3e, 0x0a, 0x07, 0x45, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x12, 0x1c,
0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x42, 0x06, 0x9a,
0x4a, 0x03, 0x12, 0x01, 0x76, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x15, 0x9a, 0x4a,
0x12, 0x0a, 0x10, 0x0a, 0x01, 0x76, 0x5a, 0x0b, 0x24, 0x2e, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20,
0x2b, 0x20, 0x31, 0x42, 0xf2, 0x05, 0x9a, 0x4a, 0xdb, 0x04, 0x0a, 0xd8, 0x04, 0x0a, 0xd5, 0x04,
0x0a, 0x06, 0x72, 0x65, 0x67, 0x65, 0x78, 0x70, 0x1a, 0xc7, 0x01, 0x0a, 0x06, 0x52, 0x65, 0x67,
0x65, 0x78, 0x70, 0x12, 0x3d, 0x52, 0x65, 0x67, 0x65, 0x78, 0x70, 0x20, 0x69, 0x73, 0x20, 0x74,
0x68, 0x65, 0x20, 0x72, 0x65, 0x70, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f,
0x6e, 0x20, 0x6f, 0x66, 0x20, 0x61, 0x20, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x20,
0x72, 0x65, 0x67, 0x75, 0x6c, 0x61, 0x72, 0x20, 0x65, 0x78, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69,
0x6f, 0x6e, 0x1a, 0x7e, 0x0a, 0x0b, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x53, 0x74, 0x72, 0x69, 0x6e,
0x67, 0x12, 0x55, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x20, 0x72,
0x65, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x20, 0x77, 0x68, 0x65, 0x74, 0x68, 0x65, 0x72, 0x20, 0x74,
0x68, 0x65, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x20, 0x73, 0x20, 0x63, 0x6f, 0x6e, 0x74,
0x61, 0x69, 0x6e, 0x73, 0x20, 0x61, 0x6e, 0x79, 0x20, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x20, 0x6f,
0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x72, 0x65, 0x67, 0x75, 0x6c, 0x61, 0x72, 0x20, 0x65, 0x78,
0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x1a, 0x14, 0x0a, 0x01, 0x73, 0x12, 0x0b, 0x74,
0x61, 0x72, 0x67, 0x65, 0x74, 0x20, 0x74, 0x65, 0x78, 0x74, 0x1a, 0x02, 0x08, 0x01, 0x22, 0x02,
0x08, 0x02, 0x1a, 0x50, 0x0a, 0x07, 0x45, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x12, 0x0c, 0x65,
0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x20, 0x74, 0x79, 0x70, 0x65, 0x1a, 0x14, 0x0a, 0x06, 0x63,
0x6f, 0x6e, 0x63, 0x61, 0x74, 0x1a, 0x06, 0x1a, 0x04, 0x12, 0x02, 0x08, 0x01, 0x22, 0x02, 0x08,
0x01, 0x1a, 0x21, 0x0a, 0x05, 0x73, 0x70, 0x6c, 0x69, 0x74, 0x1a, 0x07, 0x0a, 0x01, 0x73, 0x1a,
0x02, 0x08, 0x01, 0x1a, 0x09, 0x0a, 0x03, 0x73, 0x65, 0x70, 0x1a, 0x02, 0x08, 0x01, 0x22, 0x04,
0x12, 0x02, 0x08, 0x01, 0x22, 0xab, 0x01, 0x0a, 0x07, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65,
0x12, 0x6f, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x20, 0x70, 0x61, 0x72, 0x73, 0x65, 0x73,
0x20, 0x61, 0x20, 0x72, 0x65, 0x67, 0x75, 0x6c, 0x61, 0x72, 0x20, 0x65, 0x78, 0x70, 0x72, 0x65,
0x73, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e,
0x73, 0x2c, 0x20, 0x69, 0x66, 0x20, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x66, 0x75, 0x6c,
0x2c, 0x20, 0x61, 0x20, 0x52, 0x65, 0x67, 0x65, 0x78, 0x70, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20,
0x63, 0x61, 0x6e, 0x20, 0x62, 0x65, 0x20, 0x75, 0x73, 0x65, 0x64, 0x20, 0x74, 0x6f, 0x20, 0x6d,
0x61, 0x74, 0x63, 0x68, 0x20, 0x61, 0x67, 0x61, 0x69, 0x6e, 0x73, 0x74, 0x20, 0x74, 0x65, 0x78,
0x74, 0x1a, 0x25, 0x0a, 0x04, 0x65, 0x78, 0x70, 0x72, 0x12, 0x19, 0x61, 0x20, 0x72, 0x65, 0x67,
0x75, 0x6c, 0x61, 0x72, 0x20, 0x65, 0x78, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x20,
0x74, 0x65, 0x78, 0x74, 0x1a, 0x02, 0x08, 0x01, 0x22, 0x08, 0x22, 0x06, 0x52, 0x65, 0x67, 0x65,
0x78, 0x70, 0x22, 0x17, 0x0a, 0x0a, 0x6e, 0x65, 0x77, 0x45, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65,
0x22, 0x09, 0x22, 0x07, 0x45, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x22, 0x1a, 0x0a, 0x0b, 0x6e,
0x65, 0x77, 0x45, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x73, 0x22, 0x0b, 0x12, 0x09, 0x22, 0x07,
0x45, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x22, 0x2c, 0x0a, 0x0e, 0x66, 0x69, 0x6c, 0x74, 0x65,
0x72, 0x45, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x73, 0x1a, 0x0d, 0x1a, 0x0b, 0x12, 0x09, 0x22,
0x07, 0x45, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x22, 0x0b, 0x12, 0x09, 0x22, 0x07, 0x45, 0x78,
0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2a, 0x1e, 0x0a, 0x03, 0x76, 0x61, 0x6c, 0x12, 0x13, 0x61, 0x20,
0x76, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x74, 0x65, 0x73,
0x74, 0x1a, 0x02, 0x08, 0x01, 0x0a, 0x12, 0x63, 0x6f, 0x6d, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70,
0x6c, 0x65, 0x2e, 0x72, 0x65, 0x67, 0x65, 0x78, 0x70, 0x42, 0x0b, 0x50, 0x6c, 0x75, 0x67, 0x69,
0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x17, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c,
0x65, 0x2f, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x3b, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x70,
0x62, 0xa2, 0x02, 0x03, 0x45, 0x52, 0x58, 0xaa, 0x02, 0x0e, 0x45, 0x78, 0x61, 0x6d, 0x70, 0x6c,
0x65, 0x2e, 0x52, 0x65, 0x67, 0x65, 0x78, 0x70, 0xca, 0x02, 0x0e, 0x45, 0x78, 0x61, 0x6d, 0x70,
0x6c, 0x65, 0x5c, 0x52, 0x65, 0x67, 0x65, 0x78, 0x70, 0xe2, 0x02, 0x1a, 0x45, 0x78, 0x61, 0x6d,
0x70, 0x6c, 0x65, 0x5c, 0x52, 0x65, 0x67, 0x65, 0x78, 0x70, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65,
0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0f, 0x45, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65,
0x3a, 0x3a, 0x52, 0x65, 0x67, 0x65, 0x78, 0x70, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_plugin_plugin_proto_rawDescOnce sync.Once
file_plugin_plugin_proto_rawDescData = file_plugin_plugin_proto_rawDesc
)
func file_plugin_plugin_proto_rawDescGZIP() []byte {
file_plugin_plugin_proto_rawDescOnce.Do(func() {
file_plugin_plugin_proto_rawDescData = protoimpl.X.CompressGZIP(file_plugin_plugin_proto_rawDescData)
})
return file_plugin_plugin_proto_rawDescData
}
var file_plugin_plugin_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
var file_plugin_plugin_proto_goTypes = []interface{}{
(*Regexp)(nil), // 0: example.regexp.Regexp
(*Example)(nil), // 1: example.regexp.Example
}
var file_plugin_plugin_proto_depIdxs = []int32{
0, // [0:0] is the sub-list for method output_type
0, // [0:0] is the sub-list for method input_type
0, // [0:0] is the sub-list for extension type_name
0, // [0:0] is the sub-list for extension extendee
0, // [0:0] is the sub-list for field type_name
}
func init() { file_plugin_plugin_proto_init() }
func file_plugin_plugin_proto_init() {
if File_plugin_plugin_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_plugin_plugin_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Regexp); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_plugin_plugin_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Example); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_plugin_plugin_proto_rawDesc,
NumEnums: 0,
NumMessages: 2,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_plugin_plugin_proto_goTypes,
DependencyIndexes: file_plugin_plugin_proto_depIdxs,
MessageInfos: file_plugin_plugin_proto_msgTypes,
}.Build()
File_plugin_plugin_proto = out.File
file_plugin_plugin_proto_rawDesc = nil
file_plugin_plugin_proto_goTypes = nil
file_plugin_plugin_proto_depIdxs = nil
}
================================================
FILE: _examples/15_cel_plugin/plugin/plugin_grpc_federation.pb.go
================================================
// Code generated by protoc-gen-grpc-federation. DO NOT EDIT!
// versions:
//
// protoc-gen-grpc-federation: (devel)
//
// source: plugin/plugin.proto
package pluginpb
import (
"context"
"fmt"
"reflect"
grpcfed "github.com/mercari/grpc-federation/grpc/federation"
)
var (
_ = reflect.Invalid // to avoid "imported and not used error"
)
type RegexpPlugin interface {
Example_Regexp_Compile(context.Context, string) (*Regexp, error)
Example_Regexp_NewExample(context.Context) (*Example, error)
Example_Regexp_NewExamples(context.Context) ([]*Example, error)
Example_Regexp_FilterExamples(context.Context, []*Example) ([]*Example, error)
Example_Regexp_Regexp_MatchString(context.Context, *Regexp, string) (bool, error)
Example_Regexp_Example_Concat(context.Context, *Example, []string) (string, error)
Example_Regexp_Example_Split(context.Context, *Example, string, string) ([]string, error)
}
func RegisterRegexpPlugin(plug RegexpPlugin) {
grpcfed.PluginMainLoop(
grpcfed.CELPluginVersionSchema{
ProtocolVersion: grpcfed.CELPluginProtocolVersion,
FederationVersion: "(devel)",
Functions: []string{
"example_regexp_compile_string_example_regexp_Regexp",
"example_regexp_newExample_example_regexp_Example",
"example_regexp_newExamples_repeated example_regexp_Example",
"example_regexp_filterExamples_repeated example_regexp_Example_repeated example_regexp_Example",
"example_regexp_Regexp_matchString_example_regexp_Regexp_string_bool",
"example_regexp_Example_concat_example_regexp_Example_repeated string_string",
"example_regexp_Example_split_example_regexp_Example_string_string_repeated string",
},
},
func(ctx context.Context, req *grpcfed.CELPluginRequest) (*grpcfed.CELPluginResponse, error) {
switch req.GetMethod() {
case "example_regexp_compile_string_example_regexp_Regexp":
if len(req.GetArgs()) != 1 {
return nil, fmt.Errorf("%s: invalid argument number: %d. expected number is %d", req.GetMethod(), len(req.GetArgs()), 1)
}
arg0, err := grpcfed.ToString(req.GetArgs()[0])
if err != nil {
return nil, err
}
ret, err := plug.Example_Regexp_Compile(ctx, arg0)
if err != nil {
return nil, err
}
return grpcfed.ToMessageCELPluginResponse[*Regexp](ret)
case "example_regexp_newExample_example_regexp_Example":
if len(req.GetArgs()) != 0 {
return nil, fmt.Errorf("%s: invalid argument number: %d. expected number is %d", req.GetMethod(), len(req.GetArgs()), 0)
}
ret, err := plug.Example_Regexp_NewExample(ctx)
if err != nil {
return nil, err
}
return grpcfed.ToMessageCELPluginResponse[*Example](ret)
case "example_regexp_newExamples_repeated example_regexp_Example":
if len(req.GetArgs()) != 0 {
return nil, fmt.Errorf("%s: invalid argument number: %d. expected number is %d", req.GetMethod(), len(req.GetArgs()), 0)
}
ret, err := plug.Example_Regexp_NewExamples(ctx)
if err != nil {
return nil, err
}
return grpcfed.ToMessageListCELPluginResponse[*Example](ret)
case "example_regexp_filterExamples_repeated example_regexp_Example_repeated example_regexp_Example":
if len(req.GetArgs()) != 1 {
return nil, fmt.Errorf("%s: invalid argument number: %d. expected number is %d", req.GetMethod(), len(req.GetArgs()), 1)
}
arg0, err := grpcfed.ToMessageList[*Example](req.GetArgs()[0])
if err != nil {
return nil, err
}
ret, err := plug.Example_Regexp_FilterExamples(ctx, arg0)
if err != nil {
return nil, err
}
return grpcfed.ToMessageListCELPluginResponse[*Example](ret)
case "example_regexp_Regexp_matchString_example_regexp_Regexp_string_bool":
if len(req.GetArgs()) != 2 {
return nil, fmt.Errorf("%s: invalid argument number: %d. expected number is %d", req.GetMethod(), len(req.GetArgs()), 2)
}
arg0, err := grpcfed.ToMessage[*Regexp](req.GetArgs()[0])
if err != nil {
return nil, err
}
arg1, err := grpcfed.ToString(req.GetArgs()[1])
if err != nil {
return nil, err
}
ret, err := plug.Example_Regexp_Regexp_MatchString(ctx, arg0, arg1)
if err != nil {
return nil, err
}
return grpcfed.ToBoolCELPluginResponse(ret)
case "example_regexp_Example_concat_example_regexp_Example_repeated string_string":
if len(req.GetArgs()) != 2 {
return nil, fmt.Errorf("%s: invalid argument number: %d. expected number is %d", req.GetMethod(), len(req.GetArgs()), 2)
}
arg0, err := grpcfed.ToMessage[*Example](req.GetArgs()[0])
if err != nil {
return nil, err
}
arg1, err := grpcfed.ToStringList(req.GetArgs()[1])
if err != nil {
return nil, err
}
ret, err := plug.Example_Regexp_Example_Concat(ctx, arg0, arg1)
if err != nil {
return nil, err
}
return grpcfed.ToStringCELPluginResponse(ret)
case "example_regexp_Example_split_example_regexp_Example_string_string_repeated string":
if len(req.GetArgs()) != 3 {
return nil, fmt.Errorf("%s: invalid argument number: %d. expected number is %d", req.GetMethod(), len(req.GetArgs()), 3)
}
arg0, err := grpcfed.ToMessage[*Example](req.GetArgs()[0])
if err != nil {
return nil, err
}
arg1, err := grpcfed.ToString(req.GetArgs()[1])
if err != nil {
return nil, err
}
arg2, err := grpcfed.ToString(req.GetArgs()[2])
if err != nil {
return nil, err
}
ret, err := plug.Example_Regexp_Example_Split(ctx, arg0, arg1, arg2)
if err != nil {
return nil, err
}
return grpcfed.ToStringListCELPluginResponse(ret)
}
return nil, fmt.Errorf("unexpected method name: %s", req.GetMethod())
},
)
}
================================================
FILE: _examples/15_cel_plugin/proto/buf.yaml
================================================
version: v1
breaking:
use:
- FILE
lint:
use:
- DEFAULT
================================================
FILE: _examples/15_cel_plugin/proto/federation/federation.proto
================================================
syntax = "proto3";
package org.federation;
import "grpc/federation/federation.proto";
option go_package = "example/federation;federation";
option (grpc.federation.file)= {
import: [
"plugin/plugin.proto"
]
};
service FederationService {
option (grpc.federation.service) = {};
rpc IsMatch(IsMatchRequest) returns (IsMatchResponse) {};
rpc Example(ExampleRequest) returns (ExampleResponse) {};
}
message IsMatchRequest {
string expr = 1;
string target = 2;
}
message IsMatchResponse {
option (grpc.federation.message) = {
def { name: "re" by: "example.regexp.compile($.expr)" }
def { name: "matched" by: "re.matchString($.target)" }
};
bool result = 1 [(grpc.federation.field).by = "matched"];
}
message ExampleRequest{}
message ExampleResponse {
option (grpc.federation.message) = {
def { name: "exps" by: "example.regexp.newExamples()" }
def { name: "v" by: "example.regexp.filterExamples(exps)" }
def { name: "exp" by: "example.regexp.newExample()"}
def { name: "str" by: "exp.concat(exp.split('/a/b/c', '/'))"}
def { name: "exp_msg" message { name: "example.regexp.Example" args { name: "value" by: "2" } }}
};
int64 size = 1 [(grpc.federation.field).by = "v.size()"];
string str = 2 [(grpc.federation.field).by = "str"];
int64 value = 3 [(grpc.federation.field).by = "exp_msg.value"];
}
================================================
FILE: _examples/15_cel_plugin/proto/plugin/plugin.proto
================================================
syntax = "proto3";
package example.regexp;
import "grpc/federation/federation.proto";
option go_package = "example/plugin;pluginpb";
message Regexp {
uint32 ptr = 1; // store raw pointer value.
}
message Example {
option (grpc.federation.message) = {
def { name: "v" by: "$.value + 1" }
};
int64 value = 1 [(grpc.federation.field).by = "v"];
}
option (grpc.federation.file).plugin.export = {
name: "regexp"
types: [
{
name: "Regexp"
desc: "Regexp is the representation of a compiled regular expression"
methods: [
{
name: "matchString"
desc: "matchString reports whether the string s contains any match of the regular expression"
args {
name: "s"
type { kind: STRING }
desc: "target text"
}
return { kind: BOOL }
}
]
},
{
name: "Example"
desc: "example type"
methods: [
{
name: "concat"
args { type { repeated {kind: STRING} } }
return { kind: STRING }
},
{
name: "split"
args { name: "s" type {kind: STRING} }
args { name: "sep" type {kind: STRING} }
return { repeated {kind: STRING} }
}
]
}
]
functions: [
{
name: "compile"
desc: "compile parses a regular expression and returns, if successful, a Regexp that can be used to match against text"
args {
name: "expr"
type { kind: STRING }
desc: "a regular expression text"
}
return { message: "Regexp" }
},
{
name: "newExample"
return { message: "Example" }
},
{
name: "newExamples"
return { repeated {message: "Example"} }
},
{
name: "filterExamples"
args {type {repeated {message: "Example"}}}
return { repeated {message: "Example"} }
}
]
variables: [
{
name: "val"
desc: "a variable for test"
type { kind: STRING }
}
]
};
================================================
FILE: _examples/16_code_gen_plugin/.gitignore
================================================
grpc/federation
*.wasm
grpc-federation.yaml
buf.gen.yaml
================================================
FILE: _examples/16_code_gen_plugin/Makefile
================================================
MAKEFILE_DIR := $(dir $(lastword $(MAKEFILE_LIST)))
GOBIN := $(MAKEFILE_DIR)/../../bin
PATH := $(GOBIN):$(PATH)
JAEGER_IMAGE := jaegertracing/all-in-one:latest
.PHONY: generate
generate: generate/config
$(GOBIN)/buf generate
generate/config: build/wasm
go run ./cmd/config/main.go
.PHONY: lint
lint:
@$(GOBIN)/grpc-federation-linter -Iproto -Iproto_deps ./proto/federation/federation.proto
.PHONY: test
test:
go test -race ./ -count=1
.PHONY: grpc-federation/generate
grpc-federation/generate: generate/config
@$(GOBIN)/grpc-federation-generator ./proto/federation/federation.proto
.PHONY: grpc-federation/watch
grpc-federation/watch:
@$(GOBIN)/grpc-federation-generator -w
.PHONY: jaeger/start
jaeger/start:
@docker run \
-e COLLECTOR_OTLP_ENABLED=true \
-p 16686:16686 \
-p 4317:4317 \
-p 4318:4318 \
-d \
$(JAEGER_IMAGE)
.PHONY: jaeger/stop
jaeger/stop:
@docker stop $(shell docker ps -q --filter ancestor=$(JAEGER_IMAGE))
build/wasm:
GOOS=wasip1 GOARCH=wasm go build -o plugin.wasm ./cmd/plugin
================================================
FILE: _examples/16_code_gen_plugin/buf.work.yaml
================================================
version: v1
directories:
- proto
- proto_deps
================================================
FILE: _examples/16_code_gen_plugin/cmd/config/main.go
================================================
package main
import (
"crypto/sha256"
"encoding/hex"
"fmt"
"log"
"os"
"path/filepath"
"runtime"
)
var bufGenYAML = `
# Code generated by cmd/config/main.go. DO NOT EDIT!
version: v1
managed:
enabled: true
plugins:
- plugin: go
out: .
opt: paths=source_relative
- plugin: go-grpc
out: .
opt: paths=source_relative
- plugin: grpc-federation
out: .
opt:
- paths=source_relative
- plugins=file://plugin.wasm:%s
`
var grpcFederationYAML = `
# Code generated by cmd/config/main.go. DO NOT EDIT!
imports:
- proto
src:
- proto
out: .
plugins:
- plugin: go
opt: paths=source_relative
- plugin: go-grpc
opt: paths=source_relative
- plugin: grpc-federation
opt:
- paths=source_relative
- plugins=file://plugin.wasm:%s
`
func main() {
if err := run(); err != nil {
log.Fatalf("%+v", err)
}
}
func run() error {
wasm, err := os.ReadFile(filepath.Join(root(), "plugin.wasm"))
if err != nil {
return err
}
hash := toSha256(wasm)
if err := os.WriteFile(
filepath.Join(root(), "buf.gen.yaml"),
[]byte(fmt.Sprintf(bufGenYAML, hash)),
0o600,
); err != nil {
return err
}
if err := os.WriteFile(
filepath.Join(root(), "grpc-federation.yaml"),
[]byte(fmt.Sprintf(grpcFederationYAML, hash)),
0o600,
); err != nil {
return err
}
return nil
}
func toSha256(v []byte) string {
hash := sha256.Sum256(v)
return hex.EncodeToString(hash[:])
}
func root() string {
return filepath.Join(curDir(), "..", "..")
}
func curDir() string {
_, file, _, _ := runtime.Caller(0) //nolint:dogsled
return filepath.Dir(file)
}
================================================
FILE: _examples/16_code_gen_plugin/cmd/plugin/main.go
================================================
package main
import (
_ "embed"
"fmt"
"log"
"os"
"github.com/mercari/grpc-federation/grpc/federation/generator"
)
//go:embed resolver.go.tmpl
var tmpl []byte
func main() {
req, err := generator.ToCodeGeneratorRequest(os.Stdin)
if err != nil {
log.Fatal(err)
}
for _, file := range req.GRPCFederationFiles {
for _, svc := range file.Services {
fmt.Fprintln(os.Stderr, "service name", svc.Name)
for _, method := range svc.Methods {
fmt.Fprintln(os.Stderr, "method name", method.Name)
if method.Rule != nil {
fmt.Fprintln(os.Stderr, "method timeout", method.Rule.Timeout)
}
}
}
for _, msg := range file.Messages {
fmt.Fprintln(os.Stderr, "msg name", msg.Name)
}
}
if err := os.WriteFile("resolver_test.go", tmpl, 0o600); err != nil {
log.Fatal(err)
}
}
================================================
FILE: _examples/16_code_gen_plugin/cmd/plugin/resolver.go.tmpl
================================================
// Code generated by cmd/plugin/main.go. DO NOT EDIT!
package main_test
import (
"context"
"example/federation"
)
func (r *resolver) Resolve_Org_Federation_GetResponse(ctx context.Context, req *federation.FederationService_Org_Federation_GetResponseArgument) (*federation.GetResponse, error) {
return &federation.GetResponse{
Id: req.Id,
}, nil
}
================================================
FILE: _examples/16_code_gen_plugin/federation/federation.pb.go
================================================
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.33.0
// protoc (unknown)
// source: federation/federation.proto
package federation
import (
_ "github.com/mercari/grpc-federation/grpc/federation"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
type GetRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
}
func (x *GetRequest) Reset() {
*x = GetRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_federation_federation_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GetRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetRequest) ProtoMessage() {}
func (x *GetRequest) ProtoReflect() protoreflect.Message {
mi := &file_federation_federation_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GetRequest.ProtoReflect.Descriptor instead.
func (*GetRequest) Descriptor() ([]byte, []int) {
return file_federation_federation_proto_rawDescGZIP(), []int{0}
}
func (x *GetRequest) GetId() int64 {
if x != nil {
return x.Id
}
return 0
}
type GetResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
}
func (x *GetResponse) Reset() {
*x = GetResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_federation_federation_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GetResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetResponse) ProtoMessage() {}
func (x *GetResponse) ProtoReflect() protoreflect.Message {
mi := &file_federation_federation_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GetResponse.ProtoReflect.Descriptor instead.
func (*GetResponse) Descriptor() ([]byte, []int) {
return file_federation_federation_proto_rawDescGZIP(), []int{1}
}
func (x *GetResponse) GetId() int64 {
if x != nil {
return x.Id
}
return 0
}
var File_federation_federation_proto protoreflect.FileDescriptor
var file_federation_federation_proto_rawDesc = []byte{
0x0a, 0x1b, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x66, 0x65, 0x64,
0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0e, 0x6f,
0x72, 0x67, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x20, 0x67,
0x72, 0x70, 0x63, 0x2f, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x66,
0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22,
0x1c, 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a,
0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x22, 0x24, 0x0a,
0x0b, 0x47, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x0e, 0x0a, 0x02,
0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x3a, 0x05, 0x9a, 0x4a,
0x02, 0x10, 0x01, 0x32, 0x62, 0x0a, 0x11, 0x46, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f,
0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x48, 0x0a, 0x03, 0x47, 0x65, 0x74, 0x12,
0x1a, 0x2e, 0x6f, 0x72, 0x67, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e,
0x2e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x6f, 0x72,
0x67, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x47, 0x65, 0x74,
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x08, 0x9a, 0x4a, 0x05, 0x0a, 0x03, 0x31,
0x30, 0x73, 0x1a, 0x03, 0x9a, 0x4a, 0x00, 0x42, 0x9d, 0x01, 0x0a, 0x12, 0x63, 0x6f, 0x6d, 0x2e,
0x6f, 0x72, 0x67, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x0f,
0x46, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50,
0x01, 0x5a, 0x1d, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2f, 0x66, 0x65, 0x64, 0x65, 0x72,
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x3b, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e,
0xa2, 0x02, 0x03, 0x4f, 0x46, 0x58, 0xaa, 0x02, 0x0e, 0x4f, 0x72, 0x67, 0x2e, 0x46, 0x65, 0x64,
0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0xca, 0x02, 0x0e, 0x4f, 0x72, 0x67, 0x5c, 0x46, 0x65,
0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0xe2, 0x02, 0x1a, 0x4f, 0x72, 0x67, 0x5c, 0x46,
0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74,
0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0f, 0x4f, 0x72, 0x67, 0x3a, 0x3a, 0x46, 0x65, 0x64,
0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_federation_federation_proto_rawDescOnce sync.Once
file_federation_federation_proto_rawDescData = file_federation_federation_proto_rawDesc
)
func file_federation_federation_proto_rawDescGZIP() []byte {
file_federation_federation_proto_rawDescOnce.Do(func() {
file_federation_federation_proto_rawDescData = protoimpl.X.CompressGZIP(file_federation_federation_proto_rawDescData)
})
return file_federation_federation_proto_rawDescData
}
var file_federation_federation_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
var file_federation_federation_proto_goTypes = []interface{}{
(*GetRequest)(nil), // 0: org.federation.GetRequest
(*GetResponse)(nil), // 1: org.federation.GetResponse
}
var file_federation_federation_proto_depIdxs = []int32{
0, // 0: org.federation.FederationService.Get:input_type -> org.federation.GetRequest
1, // 1: org.federation.FederationService.Get:output_type -> org.federation.GetResponse
1, // [1:2] is the sub-list for method output_type
0, // [0:1] is the sub-list for method input_type
0, // [0:0] is the sub-list for extension type_name
0, // [0:0] is the sub-list for extension extendee
0, // [0:0] is the sub-list for field type_name
}
func init() { file_federation_federation_proto_init() }
func file_federation_federation_proto_init() {
if File_federation_federation_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_federation_federation_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_federation_federation_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_federation_federation_proto_rawDesc,
NumEnums: 0,
NumMessages: 2,
NumExtensions: 0,
NumServices: 1,
},
GoTypes: file_federation_federation_proto_goTypes,
DependencyIndexes: file_federation_federation_proto_depIdxs,
MessageInfos: file_federation_federation_proto_msgTypes,
}.Build()
File_federation_federation_proto = out.File
file_federation_federation_proto_rawDesc = nil
file_federation_federation_proto_goTypes = nil
file_federation_federation_proto_depIdxs = nil
}
================================================
FILE: _examples/16_code_gen_plugin/federation/federation_grpc.pb.go
================================================
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.3.0
// - protoc (unknown)
// source: federation/federation.proto
package federation
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 (
FederationService_Get_FullMethodName = "/org.federation.FederationService/Get"
)
// FederationServiceClient is the client API for FederationService 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 FederationServiceClient interface {
Get(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*GetResponse, error)
}
type federationServiceClient struct {
cc grpc.ClientConnInterface
}
func NewFederationServiceClient(cc grpc.ClientConnInterface) FederationServiceClient {
return &federationServiceClient{cc}
}
func (c *federationServiceClient) Get(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*GetResponse, error) {
out := new(GetResponse)
err := c.cc.Invoke(ctx, FederationService_Get_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// FederationServiceServer is the server API for FederationService service.
// All implementations must embed UnimplementedFederationServiceServer
// for forward compatibility
type FederationServiceServer interface {
Get(context.Context, *GetRequest) (*GetResponse, error)
mustEmbedUnimplementedFederationServiceServer()
}
// UnimplementedFederationServiceServer must be embedded to have forward compatible implementations.
type UnimplementedFederationServiceServer struct {
}
func (UnimplementedFederationServiceServer) Get(context.Context, *GetRequest) (*GetResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method Get not implemented")
}
func (UnimplementedFederationServiceServer) mustEmbedUnimplementedFederationServiceServer() {}
// UnsafeFederationServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to FederationServiceServer will
// result in compilation errors.
type UnsafeFederationServiceServer interface {
mustEmbedUnimplementedFederationServiceServer()
}
func RegisterFederationServiceServer(s grpc.ServiceRegistrar, srv FederationServiceServer) {
s.RegisterService(&FederationService_ServiceDesc, srv)
}
func _FederationService_Get_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(FederationServiceServer).Get(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: FederationService_Get_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(FederationServiceServer).Get(ctx, req.(*GetRequest))
}
return interceptor(ctx, in, info, handler)
}
// FederationService_ServiceDesc is the grpc.ServiceDesc for FederationService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var FederationService_ServiceDesc = grpc.ServiceDesc{
ServiceName: "org.federation.FederationService",
HandlerType: (*FederationServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "Get",
Handler: _FederationService_Get_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "federation/federation.proto",
}
================================================
FILE: _examples/16_code_gen_plugin/federation/federation_grpc_federation.pb.go
================================================
// Code generated by protoc-gen-grpc-federation. DO NOT EDIT!
// versions:
//
// protoc-gen-grpc-federation: (devel)
//
// source: federation/federation.proto
package federation
import (
"context"
"io"
"log/slog"
"reflect"
grpcfed "github.com/mercari/grpc-federation/grpc/federation"
grpcfedcel "github.com/mercari/grpc-federation/grpc/federation/cel"
"go.opentelemetry.io/otel"
"go.opentelemetry.io/otel/trace"
)
var (
_ = reflect.Invalid // to avoid "imported and not used error"
)
// Org_Federation_GetResponseVariable represents variable definitions in "org.federation.GetResponse".
type FederationService_Org_Federation_GetResponseVariable struct {
}
// Org_Federation_GetResponseArgument is argument for "org.federation.GetResponse" message.
type FederationService_Org_Federation_GetResponseArgument struct {
Id int64
FederationService_Org_Federation_GetResponseVariable
}
// FederationServiceConfig configuration required to initialize the service that use GRPC Federation.
type FederationServiceConfig struct {
// Resolver provides an interface to directly implement message resolver and field resolver not defined in Protocol Buffers.
// If this interface is not provided, an error is returned during initialization.
Resolver FederationServiceResolver // required
// ErrorHandler Federation Service often needs to convert errors received from downstream services.
// If an error occurs during method execution in the Federation Service, this error handler is called and the returned error is treated as a final error.
ErrorHandler grpcfed.ErrorHandler
// Logger sets the logger used to output Debug/Info/Error information.
Logger *slog.Logger
}
// FederationServiceClientFactory provides a factory that creates the gRPC Client needed to invoke methods of the gRPC Service on which the Federation Service depends.
type FederationServiceClientFactory interface {
}
// FederationServiceClientConfig helper to create gRPC client.
// Hints for creating a gRPC Client.
type FederationServiceClientConfig struct {
// Service FQDN ( `.` ) of the service on Protocol Buffers.
Service string
}
// FederationServiceDependentClientSet has a gRPC client for all services on which the federation service depends.
// This is provided as an argument when implementing the custom resolver.
type FederationServiceDependentClientSet struct {
}
// FederationServiceResolver provides an interface to directly implement message resolver and field resolver not defined in Protocol Buffers.
type FederationServiceResolver interface {
// Resolve_Org_Federation_GetResponse implements resolver for "org.federation.GetResponse".
Resolve_Org_Federation_GetResponse(context.Context, *FederationService_Org_Federation_GetResponseArgument) (*GetResponse, error)
}
// FederationServiceCELPluginWasmConfig type alias for grpcfedcel.WasmConfig.
type FederationServiceCELPluginWasmConfig = grpcfedcel.WasmConfig
// FederationServiceCELPluginConfig hints for loading a WebAssembly based plugin.
type FederationServiceCELPluginConfig struct {
CacheDir string
}
// FederationServiceUnimplementedResolver a structure implemented to satisfy the Resolver interface.
// An Unimplemented error is always returned.
// This is intended for use when there are many Resolver interfaces that do not need to be implemented,
// by embedding them in a resolver structure that you have created.
type FederationServiceUnimplementedResolver struct{}
// Resolve_Org_Federation_GetResponse resolve "org.federation.GetResponse".
// This method always returns Unimplemented error.
func (FederationServiceUnimplementedResolver) Resolve_Org_Federation_GetResponse(context.Context, *FederationService_Org_Federation_GetResponseArgument) (ret *GetResponse, e error) {
e = grpcfed.GRPCErrorf(grpcfed.UnimplementedCode, "method Resolve_Org_Federation_GetResponse not implemented")
return
}
// FederationService represents Federation Service.
type FederationService struct {
UnimplementedFederationServiceServer
cfg FederationServiceConfig
logger *slog.Logger
isLogLevelDebug bool
errorHandler grpcfed.ErrorHandler
celCacheMap *grpcfed.CELCacheMap
tracer trace.Tracer
resolver FederationServiceResolver
celTypeHelper *grpcfed.CELTypeHelper
celEnvOpts []grpcfed.CELEnvOption
celPlugins []*grpcfedcel.CELPlugin
client *FederationServiceDependentClientSet
}
// NewFederationService creates FederationService instance by FederationServiceConfig.
func NewFederationService(cfg FederationServiceConfig) (*FederationService, error) {
if cfg.Resolver == nil {
return nil, grpcfed.ErrResolverConfig
}
logger := cfg.Logger
if logger == nil {
logger = slog.New(slog.NewJSONHandler(io.Discard, nil))
}
tracer := otel.Tracer("org.federation.FederationService")
ctx := grpcfed.WithLogger(context.Background(), logger)
ctx = grpcfed.WithTracer(ctx, tracer)
errorHandler := cfg.ErrorHandler
if errorHandler == nil {
errorHandler = func(ctx context.Context, methodName string, err error) error { return err }
}
celTypeHelperFieldMap := grpcfed.CELTypeHelperFieldMap{
"grpc.federation.private.org.federation.GetResponseArgument": {
"id": grpcfed.NewCELFieldType(grpcfed.CELIntType, "Id"),
},
}
celTypeHelper := grpcfed.NewCELTypeHelper("org.federation", celTypeHelperFieldMap)
var celEnvOpts []grpcfed.CELEnvOption
celEnvOpts = append(celEnvOpts, grpcfed.NewDefaultEnvOptions(celTypeHelper)...)
svc := &FederationService{
cfg: cfg,
logger: logger,
isLogLevelDebug: logger.Enabled(context.Background(), slog.LevelDebug),
errorHandler: errorHandler,
celEnvOpts: celEnvOpts,
celTypeHelper: celTypeHelper,
celCacheMap: grpcfed.NewCELCacheMap(),
tracer: tracer,
resolver: cfg.Resolver,
client: &FederationServiceDependentClientSet{},
}
if resolver, ok := cfg.Resolver.(grpcfed.CustomResolverInitializer); ok {
ctx := context.Background()
if err := resolver.Init(ctx); err != nil {
return nil, err
}
}
return svc, nil
}
// CleanupFederationService cleanup all resources to prevent goroutine leaks.
func CleanupFederationService(ctx context.Context, svc *FederationService) {
svc.cleanup(ctx)
}
func (s *FederationService) cleanup(ctx context.Context) {
for _, plugin := range s.celPlugins {
plugin.Close()
}
}
// Get implements "org.federation.FederationService/Get" method.
func (s *FederationService) Get(ctx context.Context, req *GetRequest) (res *GetResponse, e error) {
ctx, span := s.tracer.Start(ctx, "org.federation.FederationService/Get")
defer span.End()
ctx = grpcfed.WithLogger(ctx, s.logger)
ctx = grpcfed.WithCELCacheMap(ctx, s.celCacheMap)
defer func() {
if r := recover(); r != nil {
e = grpcfed.RecoverError(r, grpcfed.StackTrace())
grpcfed.OutputErrorLog(ctx, e)
}
}()
defer func() {
for _, celPlugin := range s.celPlugins {
celPlugin.Cleanup()
}
}()
res, err := grpcfed.WithTimeout[GetResponse](ctx, "org.federation.FederationService/Get", 10000000000 /* 10s */, func(ctx context.Context) (*GetResponse, error) {
return s.resolve_Org_Federation_GetResponse(ctx, &FederationService_Org_Federation_GetResponseArgument{
Id: req.GetId(),
})
})
if err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
grpcfed.OutputErrorLog(ctx, err)
return nil, err
}
return res, nil
}
// resolve_Org_Federation_GetResponse resolve "org.federation.GetResponse" message.
func (s *FederationService) resolve_Org_Federation_GetResponse(ctx context.Context, req *FederationService_Org_Federation_GetResponseArgument) (*GetResponse, error) {
ctx, span := s.tracer.Start(ctx, "org.federation.GetResponse")
defer span.End()
ctx = grpcfed.WithLogger(ctx, grpcfed.Logger(ctx), grpcfed.LogAttrs(ctx)...)
grpcfed.Logger(ctx).DebugContext(ctx, "resolve org.federation.GetResponse", slog.Any("message_args", s.logvalue_Org_Federation_GetResponseArgument(req)))
// create a message value to be returned.
// `custom_resolver = true` in "grpc.federation.message" option.
ctx = grpcfed.WithLogger(ctx, grpcfed.Logger(ctx)) // create a new reference to logger.
ret, err := s.resolver.Resolve_Org_Federation_GetResponse(ctx, req)
if err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
grpcfed.Logger(ctx).DebugContext(ctx, "resolved org.federation.GetResponse", slog.Any("org.federation.GetResponse", s.logvalue_Org_Federation_GetResponse(ret)))
return ret, nil
}
func (s *FederationService) logvalue_Org_Federation_GetResponse(v *GetResponse) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.Int64("id", v.GetId()),
)
}
func (s *FederationService) logvalue_Org_Federation_GetResponseArgument(v *FederationService_Org_Federation_GetResponseArgument) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.Int64("id", v.Id),
)
}
================================================
FILE: _examples/16_code_gen_plugin/go.mod
================================================
module example
go 1.24.0
replace github.com/mercari/grpc-federation => ../../
require (
github.com/google/go-cmp v0.7.0
github.com/mercari/grpc-federation v0.0.0-00010101000000-000000000000
go.opentelemetry.io/otel v1.24.0
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.21.0
go.opentelemetry.io/otel/sdk v1.24.0
go.opentelemetry.io/otel/trace v1.24.0
go.uber.org/goleak v1.3.0
google.golang.org/genproto/googleapis/rpc v0.0.0-20240826202546-f6391c0de4c7
google.golang.org/grpc v1.65.0
google.golang.org/protobuf v1.34.2
)
require (
cel.dev/expr v0.19.1 // indirect
github.com/antlr4-go/antlr/v4 v4.13.0 // indirect
github.com/bufbuild/protocompile v0.9.0 // indirect
github.com/cenkalti/backoff/v4 v4.2.1 // indirect
github.com/go-logr/logr v1.4.1 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
github.com/goccy/wasi-go v0.3.2 // indirect
github.com/google/cel-go v0.23.1 // indirect
github.com/google/uuid v1.6.0 // indirect
github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0 // indirect
github.com/kelseyhightower/envconfig v1.4.0 // indirect
github.com/stealthrocket/wazergo v0.19.1 // indirect
github.com/stoewer/go-strcase v1.3.0 // indirect
github.com/tetratelabs/wazero v1.10.1 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.21.0 // indirect
go.opentelemetry.io/otel/metric v1.24.0 // indirect
go.opentelemetry.io/proto/otlp v1.0.0 // indirect
golang.org/x/exp v0.0.0-20250506013437-ce4c2cf36ca6 // indirect
golang.org/x/net v0.38.0 // indirect
golang.org/x/sync v0.14.0 // indirect
golang.org/x/sys v0.37.0 // indirect
golang.org/x/text v0.23.0 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20240826202546-f6391c0de4c7 // indirect
)
================================================
FILE: _examples/16_code_gen_plugin/go.sum
================================================
cel.dev/expr v0.19.1 h1:NciYrtDRIR0lNCnH1LFJegdjspNx9fI59O7TWcua/W4=
cel.dev/expr v0.19.1/go.mod h1:MrpN08Q+lEBs+bGYdLxxHkZoUSsCp0nSKTs0nTymJgw=
github.com/antlr4-go/antlr/v4 v4.13.0 h1:lxCg3LAv+EUK6t1i0y1V6/SLeUi0eKEKdhQAlS8TVTI=
github.com/antlr4-go/antlr/v4 v4.13.0/go.mod h1:pfChB/xh/Unjila75QW7+VU4TSnWnnk9UTnmpPaOR2g=
github.com/bufbuild/protocompile v0.9.0 h1:DI8qLG5PEO0Mu1Oj51YFPqtx6I3qYXUAhJVJ/IzAVl0=
github.com/bufbuild/protocompile v0.9.0/go.mod h1:s89m1O8CqSYpyE/YaSGtg1r1YFMF5nLTwh4vlj6O444=
github.com/cenkalti/backoff/v4 v4.2.1 h1:y4OZtCnogmCPw98Zjyt5a6+QwPLGkiQsYW5oUqylYbM=
github.com/cenkalti/backoff/v4 v4.2.1/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A=
github.com/go-logr/logr v1.4.1 h1:pKouT5E8xu9zeFC39JXRDukb6JFQPXM5p5I91188VAQ=
github.com/go-logr/logr v1.4.1/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY=
github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag=
github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE=
github.com/goccy/wasi-go v0.3.2 h1:wAvGXmqCkfcp0B0AwIp5Ya53hzDwkKm9W8iuT3nCCz0=
github.com/goccy/wasi-go v0.3.2/go.mod h1:nIKD204n9xa4Z20UV+XA483kIr9TAl2vXr+X5qVAO5M=
github.com/golang/glog v1.2.1 h1:OptwRhECazUx5ix5TTWC3EZhsZEHWcYWY4FQHTIubm4=
github.com/golang/glog v1.2.1/go.mod h1:6AhwSGph0fcJtXVM/PEHPqZlFeoLxhs7/t5UDAwmO+w=
github.com/google/cel-go v0.23.1 h1:91ThhEZlBcE5rB2adBVXqvDoqdL8BG2oyhd0bK1I/r4=
github.com/google/cel-go v0.23.1/go.mod h1:52Pb6QsDbC5kvgxvZhiL9QX1oZEkcUF/ZqaPx1J5Wwo=
github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8=
github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU=
github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0 h1:YBftPWNWd4WwGqtY2yeZL2ef8rHAxPBD8KFhJpmcqms=
github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0/go.mod h1:YN5jB8ie0yfIUg6VvR9Kz84aCaG7AsGZnLjhHbUqwPg=
github.com/kelseyhightower/envconfig v1.4.0 h1:Im6hONhd3pLkfDFsbRgu68RDNkGF1r3dvMUtDTo2cv8=
github.com/kelseyhightower/envconfig v1.4.0/go.mod h1:cccZRl6mQpaq41TPp5QxidR+Sa3axMbJDNb//FQX6Gg=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/stealthrocket/wazergo v0.19.1 h1:BPrITETPgSFwiytwmToO0MbUC/+RGC39JScz1JmmG6c=
github.com/stealthrocket/wazergo v0.19.1/go.mod h1:riI0hxw4ndZA5e6z7PesHg2BtTftcZaMxRcoiGGipTs=
github.com/stoewer/go-strcase v1.3.0 h1:g0eASXYtp+yvN9fK8sH94oCIk0fau9uV1/ZdJ0AVEzs=
github.com/stoewer/go-strcase v1.3.0/go.mod h1:fAH5hQ5pehh+j3nZfvwdk2RgEgQjAoM8wodgtPmh1xo=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=
github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo=
github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk=
github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
github.com/tetratelabs/wazero v1.10.1 h1:2DugeJf6VVk58KTPszlNfeeN8AhhpwcZqkJj2wwFuH8=
github.com/tetratelabs/wazero v1.10.1/go.mod h1:DRm5twOQ5Gr1AoEdSi0CLjDQF1J9ZAuyqFIjl1KKfQU=
go.opentelemetry.io/otel v1.24.0 h1:0LAOdjNmQeSTzGBzduGe/rU4tZhMwL5rWgtp9Ku5Jfo=
go.opentelemetry.io/otel v1.24.0/go.mod h1:W7b9Ozg4nkF5tWI5zsXkaKKDjdVjpD4oAt9Qi/MArHo=
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.21.0 h1:cl5P5/GIfFh4t6xyruOgJP5QiA1pw4fYYdv6nc6CBWw=
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.21.0/go.mod h1:zgBdWWAu7oEEMC06MMKc5NLbA/1YDXV1sMpSqEeLQLg=
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.21.0 h1:tIqheXEFWAZ7O8A7m+J0aPTmpJN3YQ7qetUAdkkkKpk=
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.21.0/go.mod h1:nUeKExfxAQVbiVFn32YXpXZZHZ61Cc3s3Rn1pDBGAb0=
go.opentelemetry.io/otel/metric v1.24.0 h1:6EhoGWWK28x1fbpA4tYTOWBkPefTDQnb8WSGXlc88kI=
go.opentelemetry.io/otel/metric v1.24.0/go.mod h1:VYhLe1rFfxuTXLgj4CBiyz+9WYBA8pNGJgDcSFRKBco=
go.opentelemetry.io/otel/sdk v1.24.0 h1:YMPPDNymmQN3ZgczicBY3B6sf9n62Dlj9pWD3ucgoDw=
go.opentelemetry.io/otel/sdk v1.24.0/go.mod h1:KVrIYw6tEubO9E96HQpcmpTKDVn9gdv35HoYiQWGDFg=
go.opentelemetry.io/otel/trace v1.24.0 h1:CsKnnL4dUAr/0llH9FKuc698G04IrpWV0MQA/Y1YELI=
go.opentelemetry.io/otel/trace v1.24.0/go.mod h1:HPc3Xr/cOApsBI154IU0OI0HJexz+aw5uPdbs3UCjNU=
go.opentelemetry.io/proto/otlp v1.0.0 h1:T0TX0tmXU8a3CbNXzEKGeU5mIVOdf0oykP+u2lIVU/I=
go.opentelemetry.io/proto/otlp v1.0.0/go.mod h1:Sy6pihPLfYHkr3NkUbEhGHFhINUSI/v80hjKIs5JXpM=
go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto=
go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE=
golang.org/x/exp v0.0.0-20250506013437-ce4c2cf36ca6 h1:y5zboxd6LQAqYIhHnB48p0ByQ/GnQx2BE33L8BOHQkI=
golang.org/x/exp v0.0.0-20250506013437-ce4c2cf36ca6/go.mod h1:U6Lno4MTRCDY+Ba7aCcauB9T60gsv5s4ralQzP72ZoQ=
golang.org/x/net v0.38.0 h1:vRMAPTMaeGqVhG5QyLJHqNDwecKTomGeqbnfZyKlBI8=
golang.org/x/net v0.38.0/go.mod h1:ivrbrMbzFq5J41QOQh0siUuly180yBYtLp+CKbEaFx8=
golang.org/x/sync v0.14.0 h1:woo0S4Yywslg6hp4eUFjTVOyKt0RookbpAHG4c1HmhQ=
golang.org/x/sync v0.14.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA=
golang.org/x/sys v0.37.0 h1:fdNQudmxPjkdUTPnLn5mdQv7Zwvbvpaxqs831goi9kQ=
golang.org/x/sys v0.37.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks=
golang.org/x/text v0.23.0 h1:D71I7dUrlY+VX0gQShAThNGHFxZ13dGLBHQLVl1mJlY=
golang.org/x/text v0.23.0/go.mod h1:/BLNzu4aZCJ1+kcD0DNRotWKage4q2rGVAg4o22unh4=
google.golang.org/genproto/googleapis/api v0.0.0-20240826202546-f6391c0de4c7 h1:YcyjlL1PRr2Q17/I0dPk2JmYS5CDXfcdb2Z3YRioEbw=
google.golang.org/genproto/googleapis/api v0.0.0-20240826202546-f6391c0de4c7/go.mod h1:OCdP9MfskevB/rbYvHTsXTtKC+3bHWajPdoKgjcYkfo=
google.golang.org/genproto/googleapis/rpc v0.0.0-20240826202546-f6391c0de4c7 h1:2035KHhUv+EpyB+hWgJnaWKJOdX1E95w2S8Rr4uWKTs=
google.golang.org/genproto/googleapis/rpc v0.0.0-20240826202546-f6391c0de4c7/go.mod h1:UqMtugtsSgubUsoxbuAoiCXvqvErP7Gf0so0mK9tHxU=
google.golang.org/grpc v1.65.0 h1:bs/cUb4lp1G5iImFFd3u5ixQzweKizoZJAwBNLR42lc=
google.golang.org/grpc v1.65.0/go.mod h1:WgYC2ypjlB0EiQi6wdKixMqukr6lBc0Vo+oOgjrM5ZQ=
google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg=
google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
================================================
FILE: _examples/16_code_gen_plugin/main_test.go
================================================
package main_test
import (
"context"
"log/slog"
"net"
"os"
"testing"
"github.com/google/go-cmp/cmp"
"github.com/google/go-cmp/cmp/cmpopts"
"go.opentelemetry.io/otel"
"go.opentelemetry.io/otel/attribute"
"go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc"
"go.opentelemetry.io/otel/propagation"
"go.opentelemetry.io/otel/sdk/resource"
sdktrace "go.opentelemetry.io/otel/sdk/trace"
semconv "go.opentelemetry.io/otel/semconv/v1.4.0"
"go.uber.org/goleak"
"google.golang.org/grpc"
"google.golang.org/grpc/credentials/insecure"
"google.golang.org/grpc/test/bufconn"
"example/federation"
)
const bufSize = 1024
var (
listener *bufconn.Listener
)
func dialer(ctx context.Context, address string) (net.Conn, error) {
return listener.Dial()
}
type resolver struct{}
func TestFederation(t *testing.T) {
defer goleak.VerifyNone(t)
ctx := context.Background()
listener = bufconn.Listen(bufSize)
if os.Getenv("ENABLE_JAEGER") != "" {
exporter, err := otlptracegrpc.New(ctx, otlptracegrpc.WithInsecure())
if err != nil {
t.Fatal(err)
}
tp := sdktrace.NewTracerProvider(
sdktrace.WithBatcher(exporter),
sdktrace.WithResource(
resource.NewWithAttributes(
semconv.SchemaURL,
semconv.ServiceNameKey.String("example16/codegenplugin"),
semconv.ServiceVersionKey.String("1.0.0"),
attribute.String("environment", "dev"),
),
),
sdktrace.WithSampler(sdktrace.AlwaysSample()),
)
defer tp.Shutdown(ctx)
otel.SetTextMapPropagator(propagation.TraceContext{})
otel.SetTracerProvider(tp)
}
conn, err := grpc.DialContext(
ctx, "",
grpc.WithContextDialer(dialer),
grpc.WithTransportCredentials(insecure.NewCredentials()),
)
if err != nil {
t.Fatal(err)
}
defer conn.Close()
grpcServer := grpc.NewServer()
defer grpcServer.Stop()
logger := slog.New(slog.NewJSONHandler(os.Stdout, &slog.HandlerOptions{
Level: slog.LevelDebug,
}))
federationServer, err := federation.NewFederationService(federation.FederationServiceConfig{
Logger: logger,
Resolver: new(resolver),
})
if err != nil {
t.Fatal(err)
}
defer federation.CleanupFederationService(ctx, federationServer)
federation.RegisterFederationServiceServer(grpcServer, federationServer)
go func() {
if err := grpcServer.Serve(listener); err != nil {
t.Fatal(err)
}
}()
client := federation.NewFederationServiceClient(conn)
res, err := client.Get(ctx, &federation.GetRequest{
Id: 10,
})
if err != nil {
t.Fatal(err)
}
if diff := cmp.Diff(res, &federation.GetResponse{
Id: 10,
}, cmpopts.IgnoreUnexported(
federation.GetResponse{},
)); diff != "" {
t.Errorf("(-got, +want)\n%s", diff)
}
}
================================================
FILE: _examples/16_code_gen_plugin/proto/buf.yaml
================================================
version: v1
breaking:
use:
- FILE
lint:
use:
- DEFAULT
================================================
FILE: _examples/16_code_gen_plugin/proto/federation/federation.proto
================================================
syntax = "proto3";
package org.federation;
import "grpc/federation/federation.proto";
option go_package = "example/federation;federation";
service FederationService {
option (grpc.federation.service) = {};
rpc Get(GetRequest) returns (GetResponse) {
option (grpc.federation.method).timeout = "10s";
};
}
message GetRequest {
int64 id = 1;
}
message GetResponse {
option (grpc.federation.message).custom_resolver = true;
int64 id = 1;
}
================================================
FILE: _examples/16_code_gen_plugin/resolver_test.go
================================================
// Code generated by cmd/plugin/main.go. DO NOT EDIT!
package main_test
import (
"context"
"example/federation"
)
func (r *resolver) Resolve_Org_Federation_GetResponse(ctx context.Context, req *federation.FederationService_Org_Federation_GetResponseArgument) (*federation.GetResponse, error) {
return &federation.GetResponse{
Id: req.Id,
}, nil
}
================================================
FILE: _examples/17_error_handler/.gitignore
================================================
grpc/federation
================================================
FILE: _examples/17_error_handler/Makefile
================================================
MAKEFILE_DIR := $(dir $(lastword $(MAKEFILE_LIST)))
GOBIN := $(MAKEFILE_DIR)/../../bin
PATH := $(GOBIN):$(PATH)
JAEGER_IMAGE := jaegertracing/all-in-one:latest
.PHONY: generate
generate:
$(GOBIN)/buf generate
.PHONY: lint
lint:
@$(GOBIN)/grpc-federation-linter -Iproto -Iproto_deps ./proto/federation/federation.proto
.PHONY: test
test:
go test -race ./ -count=1
.PHONY: grpc-federation/generate
grpc-federation/generate:
@$(GOBIN)/grpc-federation-generator ./proto/federation/federation.proto
.PHONY: grpc-federation/watch
grpc-federation/watch:
@$(GOBIN)/grpc-federation-generator -w
.PHONY: jaeger/start
jaeger/start:
@docker run \
-e COLLECTOR_OTLP_ENABLED=true \
-p 16686:16686 \
-p 4317:4317 \
-p 4318:4318 \
-d \
$(JAEGER_IMAGE)
.PHONY: jaeger/stop
jaeger/stop:
@docker stop $(shell docker ps -q --filter ancestor=$(JAEGER_IMAGE))
================================================
FILE: _examples/17_error_handler/buf.gen.yaml
================================================
version: v1
managed:
enabled: true
plugins:
- plugin: go
out: .
opt: paths=source_relative
- plugin: go-grpc
out: .
opt: paths=source_relative
- plugin: grpc-federation
out: .
opt:
- paths=source_relative
- import_paths=proto
================================================
FILE: _examples/17_error_handler/buf.work.yaml
================================================
version: v1
directories:
- proto
- proto_deps
================================================
FILE: _examples/17_error_handler/federation/federation.pb.go
================================================
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.33.0
// protoc (unknown)
// source: federation/federation.proto
package federation
import (
_ "github.com/mercari/grpc-federation/grpc/federation"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
type GetPostRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
}
func (x *GetPostRequest) Reset() {
*x = GetPostRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_federation_federation_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GetPostRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetPostRequest) ProtoMessage() {}
func (x *GetPostRequest) ProtoReflect() protoreflect.Message {
mi := &file_federation_federation_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GetPostRequest.ProtoReflect.Descriptor instead.
func (*GetPostRequest) Descriptor() ([]byte, []int) {
return file_federation_federation_proto_rawDescGZIP(), []int{0}
}
func (x *GetPostRequest) GetId() string {
if x != nil {
return x.Id
}
return ""
}
type GetPostResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Post *Post `protobuf:"bytes,1,opt,name=post,proto3" json:"post,omitempty"`
}
func (x *GetPostResponse) Reset() {
*x = GetPostResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_federation_federation_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GetPostResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetPostResponse) ProtoMessage() {}
func (x *GetPostResponse) ProtoReflect() protoreflect.Message {
mi := &file_federation_federation_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GetPostResponse.ProtoReflect.Descriptor instead.
func (*GetPostResponse) Descriptor() ([]byte, []int) {
return file_federation_federation_proto_rawDescGZIP(), []int{1}
}
func (x *GetPostResponse) GetPost() *Post {
if x != nil {
return x.Post
}
return nil
}
type Z struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Code int32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"`
}
func (x *Z) Reset() {
*x = Z{}
if protoimpl.UnsafeEnabled {
mi := &file_federation_federation_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Z) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Z) ProtoMessage() {}
func (x *Z) ProtoReflect() protoreflect.Message {
mi := &file_federation_federation_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Z.ProtoReflect.Descriptor instead.
func (*Z) Descriptor() ([]byte, []int) {
return file_federation_federation_proto_rawDescGZIP(), []int{2}
}
func (x *Z) GetCode() int32 {
if x != nil {
return x.Code
}
return 0
}
type Post struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
Title string `protobuf:"bytes,2,opt,name=title,proto3" json:"title,omitempty"`
Code int32 `protobuf:"varint,3,opt,name=code,proto3" json:"code,omitempty"`
}
func (x *Post) Reset() {
*x = Post{}
if protoimpl.UnsafeEnabled {
mi := &file_federation_federation_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Post) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Post) ProtoMessage() {}
func (x *Post) ProtoReflect() protoreflect.Message {
mi := &file_federation_federation_proto_msgTypes[3]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Post.ProtoReflect.Descriptor instead.
func (*Post) Descriptor() ([]byte, []int) {
return file_federation_federation_proto_rawDescGZIP(), []int{3}
}
func (x *Post) GetId() string {
if x != nil {
return x.Id
}
return ""
}
func (x *Post) GetTitle() string {
if x != nil {
return x.Title
}
return ""
}
func (x *Post) GetCode() int32 {
if x != nil {
return x.Code
}
return 0
}
type LocalizedMessage struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Value string `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"`
}
func (x *LocalizedMessage) Reset() {
*x = LocalizedMessage{}
if protoimpl.UnsafeEnabled {
mi := &file_federation_federation_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *LocalizedMessage) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*LocalizedMessage) ProtoMessage() {}
func (x *LocalizedMessage) ProtoReflect() protoreflect.Message {
mi := &file_federation_federation_proto_msgTypes[4]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use LocalizedMessage.ProtoReflect.Descriptor instead.
func (*LocalizedMessage) Descriptor() ([]byte, []int) {
return file_federation_federation_proto_rawDescGZIP(), []int{4}
}
func (x *LocalizedMessage) GetValue() string {
if x != nil {
return x.Value
}
return ""
}
type CustomMessage struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Msg string `protobuf:"bytes,1,opt,name=msg,proto3" json:"msg,omitempty"`
}
func (x *CustomMessage) Reset() {
*x = CustomMessage{}
if protoimpl.UnsafeEnabled {
mi := &file_federation_federation_proto_msgTypes[5]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *CustomMessage) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CustomMessage) ProtoMessage() {}
func (x *CustomMessage) ProtoReflect() protoreflect.Message {
mi := &file_federation_federation_proto_msgTypes[5]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use CustomMessage.ProtoReflect.Descriptor instead.
func (*CustomMessage) Descriptor() ([]byte, []int) {
return file_federation_federation_proto_rawDescGZIP(), []int{5}
}
func (x *CustomMessage) GetMsg() string {
if x != nil {
return x.Msg
}
return ""
}
type GetPost2Request struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
}
func (x *GetPost2Request) Reset() {
*x = GetPost2Request{}
if protoimpl.UnsafeEnabled {
mi := &file_federation_federation_proto_msgTypes[6]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GetPost2Request) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetPost2Request) ProtoMessage() {}
func (x *GetPost2Request) ProtoReflect() protoreflect.Message {
mi := &file_federation_federation_proto_msgTypes[6]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GetPost2Request.ProtoReflect.Descriptor instead.
func (*GetPost2Request) Descriptor() ([]byte, []int) {
return file_federation_federation_proto_rawDescGZIP(), []int{6}
}
func (x *GetPost2Request) GetId() string {
if x != nil {
return x.Id
}
return ""
}
type GetPost2Response struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
}
func (x *GetPost2Response) Reset() {
*x = GetPost2Response{}
if protoimpl.UnsafeEnabled {
mi := &file_federation_federation_proto_msgTypes[7]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GetPost2Response) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetPost2Response) ProtoMessage() {}
func (x *GetPost2Response) ProtoReflect() protoreflect.Message {
mi := &file_federation_federation_proto_msgTypes[7]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GetPost2Response.ProtoReflect.Descriptor instead.
func (*GetPost2Response) Descriptor() ([]byte, []int) {
return file_federation_federation_proto_rawDescGZIP(), []int{7}
}
var File_federation_federation_proto protoreflect.FileDescriptor
var file_federation_federation_proto_rawDesc = []byte{
0x0a, 0x1b, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x66, 0x65, 0x64,
0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0e, 0x6f,
0x72, 0x67, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x20, 0x67,
0x72, 0x70, 0x63, 0x2f, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x66,
0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22,
0x20, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x50, 0x6f, 0x73, 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, 0x67, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x50, 0x6f, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70,
0x6f, 0x6e, 0x73, 0x65, 0x12, 0x33, 0x0a, 0x04, 0x70, 0x6f, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01,
0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6f, 0x72, 0x67, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74,
0x69, 0x6f, 0x6e, 0x2e, 0x50, 0x6f, 0x73, 0x74, 0x42, 0x09, 0x9a, 0x4a, 0x06, 0x12, 0x04, 0x70,
0x6f, 0x73, 0x74, 0x52, 0x04, 0x70, 0x6f, 0x73, 0x74, 0x3a, 0x1f, 0x9a, 0x4a, 0x1c, 0x0a, 0x1a,
0x0a, 0x04, 0x70, 0x6f, 0x73, 0x74, 0x6a, 0x12, 0x0a, 0x04, 0x50, 0x6f, 0x73, 0x74, 0x12, 0x0a,
0x0a, 0x02, 0x69, 0x64, 0x12, 0x04, 0x24, 0x2e, 0x69, 0x64, 0x22, 0x42, 0x0a, 0x01, 0x5a, 0x12,
0x1d, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x42, 0x09, 0x9a,
0x4a, 0x06, 0x12, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x3a, 0x1e,
0x9a, 0x4a, 0x1b, 0x0a, 0x19, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x5a, 0x11, 0x24, 0x2e, 0x65,
0x72, 0x72, 0x6f, 0x72, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x2e, 0x63, 0x6f, 0x64, 0x65, 0x22, 0x82,
0x07, 0x0a, 0x04, 0x50, 0x6f, 0x73, 0x74, 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, 0x1d, 0x0a,
0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x42, 0x09, 0x9a, 0x4a, 0x06,
0x12, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x3a, 0xb4, 0x06, 0x9a,
0x4a, 0xb0, 0x06, 0x0a, 0xe1, 0x05, 0x0a, 0x03, 0x72, 0x65, 0x73, 0x72, 0xd9, 0x05, 0x0a, 0x18,
0x70, 0x6f, 0x73, 0x74, 0x2e, 0x50, 0x6f, 0x73, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65,
0x2f, 0x47, 0x65, 0x74, 0x50, 0x6f, 0x73, 0x74, 0x12, 0x0a, 0x0a, 0x02, 0x69, 0x64, 0x12, 0x04,
0x24, 0x2e, 0x69, 0x64, 0x2a, 0xef, 0x03, 0x0a, 0x0a, 0x0a, 0x02, 0x69, 0x64, 0x5a, 0x04, 0x24,
0x2e, 0x69, 0x64, 0x0a, 0x1a, 0x6a, 0x18, 0x0a, 0x01, 0x5a, 0x12, 0x13, 0x0a, 0x0a, 0x65, 0x72,
0x72, 0x6f, 0x72, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x12, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x12,
0xc2, 0x01, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x69,
0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x66, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x73, 0x5b, 0x3f, 0x30,
0x5d, 0x2e, 0x76, 0x69, 0x6f, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x5b, 0x3f, 0x30, 0x5d,
0x2e, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x20, 0x3d, 0x3d, 0x20, 0x6f, 0x70, 0x74, 0x69,
0x6f, 0x6e, 0x61, 0x6c, 0x2e, 0x6f, 0x66, 0x28, 0x27, 0x62, 0x61, 0x72, 0x27, 0x29, 0x20, 0x26,
0x26, 0x20, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x2e, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x69, 0x7a, 0x65,
0x64, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x5b, 0x3f, 0x30, 0x5d, 0x2e, 0x6d,
0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x20, 0x3d, 0x3d, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e,
0x61, 0x6c, 0x2e, 0x6f, 0x66, 0x28, 0x27, 0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x27, 0x29, 0x20, 0x26,
0x26, 0x20, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x2e, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x5f, 0x6d,
0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x5b, 0x3f, 0x30, 0x5d, 0x2e, 0x69, 0x64, 0x20, 0x3d,
0x3d, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x2e, 0x6f, 0x66, 0x28, 0x27, 0x78,
0x78, 0x78, 0x27, 0x29, 0x18, 0x09, 0x22, 0x1e, 0x27, 0x74, 0x68, 0x69, 0x73, 0x20, 0x69, 0x73,
0x20, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x20, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x20, 0x6d, 0x65,
0x73, 0x73, 0x61, 0x67, 0x65, 0x27, 0x2a, 0xdd, 0x01, 0x12, 0x30, 0x0a, 0x0d, 0x6c, 0x6f, 0x63,
0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x5f, 0x6d, 0x73, 0x67, 0x6a, 0x1f, 0x0a, 0x10, 0x4c, 0x6f,
0x63, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x0b,
0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x02, 0x69, 0x64, 0x12, 0x1a, 0x6a, 0x18, 0x0a,
0x01, 0x5a, 0x12, 0x13, 0x0a, 0x0a, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x69, 0x6e, 0x66, 0x6f,
0x12, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x1a, 0x24, 0x0a, 0x0d, 0x43, 0x75, 0x73, 0x74, 0x6f,
0x6d, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x13, 0x0a, 0x0a, 0x65, 0x72, 0x72, 0x6f,
0x72, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x12, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x42, 0x33, 0x0a,
0x31, 0x0a, 0x0b, 0x27, 0x73, 0x6f, 0x6d, 0x65, 0x2d, 0x74, 0x79, 0x70, 0x65, 0x27, 0x12, 0x0e,
0x27, 0x73, 0x6f, 0x6d, 0x65, 0x2d, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x27, 0x1a, 0x12,
0x27, 0x73, 0x6f, 0x6d, 0x65, 0x2d, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f,
0x6e, 0x27, 0x6a, 0x1c, 0x0a, 0x05, 0x65, 0x6e, 0x2d, 0x55, 0x53, 0x12, 0x13, 0x6c, 0x6f, 0x63,
0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x5f, 0x6d, 0x73, 0x67, 0x2e, 0x76, 0x61, 0x6c, 0x75, 0x65,
0x72, 0x14, 0x70, 0x6f, 0x73, 0x74, 0x2e, 0x50, 0x6f, 0x73, 0x74, 0x7b, 0x69, 0x64, 0x3a, 0x20,
0x27, 0x66, 0x6f, 0x6f, 0x27, 0x7d, 0x2a, 0x50, 0x12, 0x2e, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x2e,
0x63, 0x6f, 0x64, 0x65, 0x20, 0x3d, 0x3d, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x72,
0x70, 0x63, 0x2e, 0x43, 0x6f, 0x64, 0x65, 0x2e, 0x49, 0x4e, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x5f,
0x41, 0x52, 0x47, 0x55, 0x4d, 0x45, 0x4e, 0x54, 0x18, 0x03, 0x22, 0x1a, 0x27, 0x74, 0x68, 0x69,
0x73, 0x20, 0x69, 0x73, 0x20, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x20, 0x6c, 0x6f, 0x67, 0x20,
0x6c, 0x65, 0x76, 0x65, 0x6c, 0x27, 0x40, 0x03, 0x2a, 0x65, 0x12, 0x2b, 0x65, 0x72, 0x72, 0x6f,
0x72, 0x2e, 0x63, 0x6f, 0x64, 0x65, 0x20, 0x3d, 0x3d, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,
0x2e, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x6f, 0x64, 0x65, 0x2e, 0x55, 0x4e, 0x49, 0x4d, 0x50, 0x4c,
0x45, 0x4d, 0x45, 0x4e, 0x54, 0x45, 0x44, 0x3a, 0x36, 0x70, 0x6f, 0x73, 0x74, 0x2e, 0x47, 0x65,
0x74, 0x50, 0x6f, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x7b, 0x70, 0x6f,
0x73, 0x74, 0x3a, 0x20, 0x70, 0x6f, 0x73, 0x74, 0x2e, 0x50, 0x6f, 0x73, 0x74, 0x7b, 0x69, 0x64,
0x3a, 0x20, 0x27, 0x61, 0x6e, 0x6f, 0x6e, 0x79, 0x6d, 0x6f, 0x75, 0x73, 0x27, 0x7d, 0x7d, 0x2a,
0x02, 0x30, 0x01, 0x2a, 0x02, 0x18, 0x01, 0x0a, 0x12, 0x0a, 0x04, 0x70, 0x6f, 0x73, 0x74, 0x18,
0x01, 0x5a, 0x08, 0x72, 0x65, 0x73, 0x2e, 0x70, 0x6f, 0x73, 0x74, 0x0a, 0x36, 0x0a, 0x04, 0x63,
0x6f, 0x64, 0x65, 0x12, 0x15, 0x72, 0x65, 0x73, 0x2e, 0x68, 0x61, 0x73, 0x49, 0x67, 0x6e, 0x6f,
0x72, 0x65, 0x64, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x28, 0x29, 0x5a, 0x17, 0x72, 0x65, 0x73, 0x2e,
0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x64, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x28, 0x29, 0x2e, 0x63,
0x6f, 0x64, 0x65, 0x22, 0x4b, 0x0a, 0x10, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64,
0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x37, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65,
0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x21, 0x9a, 0x4a, 0x1e, 0x12, 0x1c, 0x27, 0x6c, 0x6f,
0x63, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x20, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x27, 0x20,
0x2b, 0x20, 0x24, 0x2e, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65,
0x22, 0x56, 0x0a, 0x0d, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67,
0x65, 0x12, 0x45, 0x0a, 0x03, 0x6d, 0x73, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x33,
0x9a, 0x4a, 0x30, 0x12, 0x2e, 0x27, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x20, 0x65, 0x72, 0x72,
0x6f, 0x72, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x3a, 0x27, 0x20, 0x2b, 0x20, 0x24,
0x2e, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x2e, 0x6d, 0x65, 0x73, 0x73,
0x61, 0x67, 0x65, 0x52, 0x03, 0x6d, 0x73, 0x67, 0x22, 0x21, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x50,
0x6f, 0x73, 0x74, 0x32, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69,
0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x9f, 0x02, 0x0a, 0x10,
0x47, 0x65, 0x74, 0x50, 0x6f, 0x73, 0x74, 0x32, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
0x3a, 0x8a, 0x02, 0x9a, 0x4a, 0x86, 0x02, 0x0a, 0x83, 0x02, 0x72, 0x80, 0x02, 0x0a, 0x18, 0x70,
0x6f, 0x73, 0x74, 0x2e, 0x50, 0x6f, 0x73, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f,
0x47, 0x65, 0x74, 0x50, 0x6f, 0x73, 0x74, 0x12, 0x0a, 0x0a, 0x02, 0x69, 0x64, 0x12, 0x04, 0x24,
0x2e, 0x69, 0x64, 0x2a, 0x6f, 0x0a, 0x28, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x5a, 0x20, 0x67,
0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x6f, 0x64, 0x65, 0x2e, 0x66,
0x72, 0x6f, 0x6d, 0x28, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x2e, 0x63, 0x6f, 0x64, 0x65, 0x29, 0x0a,
0x14, 0x0a, 0x03, 0x6d, 0x73, 0x67, 0x5a, 0x0d, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x2e, 0x6d, 0x65,
0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x2b, 0x63, 0x6f, 0x64, 0x65, 0x20, 0x3d, 0x3d, 0x20, 0x67,
0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x6f, 0x64, 0x65, 0x2e, 0x46,
0x41, 0x49, 0x4c, 0x45, 0x44, 0x5f, 0x50, 0x52, 0x45, 0x43, 0x4f, 0x4e, 0x44, 0x49, 0x54, 0x49,
0x4f, 0x4e, 0x40, 0x03, 0x2a, 0x67, 0x0a, 0x29, 0x0a, 0x05, 0x63, 0x6f, 0x64, 0x65, 0x32, 0x5a,
0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x6f, 0x64, 0x65,
0x2e, 0x66, 0x72, 0x6f, 0x6d, 0x28, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x2e, 0x63, 0x6f, 0x64, 0x65,
0x29, 0x0a, 0x15, 0x0a, 0x04, 0x6d, 0x73, 0x67, 0x32, 0x5a, 0x0d, 0x65, 0x72, 0x72, 0x6f, 0x72,
0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x21, 0x63, 0x6f, 0x64, 0x65, 0x32, 0x20,
0x3d, 0x3d, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x6f,
0x64, 0x65, 0x2e, 0x49, 0x4e, 0x54, 0x45, 0x52, 0x4e, 0x41, 0x4c, 0x40, 0x04, 0x32, 0xb7, 0x01,
0x0a, 0x11, 0x46, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76,
0x69, 0x63, 0x65, 0x12, 0x4c, 0x0a, 0x07, 0x47, 0x65, 0x74, 0x50, 0x6f, 0x73, 0x74, 0x12, 0x1e,
0x2e, 0x6f, 0x72, 0x67, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e,
0x47, 0x65, 0x74, 0x50, 0x6f, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f,
0x2e, 0x6f, 0x72, 0x67, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e,
0x47, 0x65, 0x74, 0x50, 0x6f, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22,
0x00, 0x12, 0x4f, 0x0a, 0x08, 0x47, 0x65, 0x74, 0x50, 0x6f, 0x73, 0x74, 0x32, 0x12, 0x1f, 0x2e,
0x6f, 0x72, 0x67, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x47,
0x65, 0x74, 0x50, 0x6f, 0x73, 0x74, 0x32, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20,
0x2e, 0x6f, 0x72, 0x67, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e,
0x47, 0x65, 0x74, 0x50, 0x6f, 0x73, 0x74, 0x32, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
0x22, 0x00, 0x1a, 0x03, 0x9a, 0x4a, 0x00, 0x42, 0xb1, 0x01, 0x9a, 0x4a, 0x11, 0x12, 0x0f, 0x70,
0x6f, 0x73, 0x74, 0x2f, 0x70, 0x6f, 0x73, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x0a, 0x12,
0x63, 0x6f, 0x6d, 0x2e, 0x6f, 0x72, 0x67, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69,
0x6f, 0x6e, 0x42, 0x0f, 0x46, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72,
0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x1d, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2f, 0x66,
0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x3b, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61,
0x74, 0x69, 0x6f, 0x6e, 0xa2, 0x02, 0x03, 0x4f, 0x46, 0x58, 0xaa, 0x02, 0x0e, 0x4f, 0x72, 0x67,
0x2e, 0x46, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0xca, 0x02, 0x0e, 0x4f, 0x72,
0x67, 0x5c, 0x46, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0xe2, 0x02, 0x1a, 0x4f,
0x72, 0x67, 0x5c, 0x46, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5c, 0x47, 0x50,
0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0f, 0x4f, 0x72, 0x67, 0x3a,
0x3a, 0x46, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f,
0x74, 0x6f, 0x33,
}
var (
file_federation_federation_proto_rawDescOnce sync.Once
file_federation_federation_proto_rawDescData = file_federation_federation_proto_rawDesc
)
func file_federation_federation_proto_rawDescGZIP() []byte {
file_federation_federation_proto_rawDescOnce.Do(func() {
file_federation_federation_proto_rawDescData = protoimpl.X.CompressGZIP(file_federation_federation_proto_rawDescData)
})
return file_federation_federation_proto_rawDescData
}
var file_federation_federation_proto_msgTypes = make([]protoimpl.MessageInfo, 8)
var file_federation_federation_proto_goTypes = []interface{}{
(*GetPostRequest)(nil), // 0: org.federation.GetPostRequest
(*GetPostResponse)(nil), // 1: org.federation.GetPostResponse
(*Z)(nil), // 2: org.federation.Z
(*Post)(nil), // 3: org.federation.Post
(*LocalizedMessage)(nil), // 4: org.federation.LocalizedMessage
(*CustomMessage)(nil), // 5: org.federation.CustomMessage
(*GetPost2Request)(nil), // 6: org.federation.GetPost2Request
(*GetPost2Response)(nil), // 7: org.federation.GetPost2Response
}
var file_federation_federation_proto_depIdxs = []int32{
3, // 0: org.federation.GetPostResponse.post:type_name -> org.federation.Post
0, // 1: org.federation.FederationService.GetPost:input_type -> org.federation.GetPostRequest
6, // 2: org.federation.FederationService.GetPost2:input_type -> org.federation.GetPost2Request
1, // 3: org.federation.FederationService.GetPost:output_type -> org.federation.GetPostResponse
7, // 4: org.federation.FederationService.GetPost2:output_type -> org.federation.GetPost2Response
3, // [3:5] is the sub-list for method output_type
1, // [1:3] is the sub-list for method input_type
1, // [1:1] is the sub-list for extension type_name
1, // [1:1] is the sub-list for extension extendee
0, // [0:1] is the sub-list for field type_name
}
func init() { file_federation_federation_proto_init() }
func file_federation_federation_proto_init() {
if File_federation_federation_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_federation_federation_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetPostRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_federation_federation_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetPostResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_federation_federation_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Z); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_federation_federation_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Post); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_federation_federation_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*LocalizedMessage); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_federation_federation_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CustomMessage); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_federation_federation_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetPost2Request); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_federation_federation_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetPost2Response); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_federation_federation_proto_rawDesc,
NumEnums: 0,
NumMessages: 8,
NumExtensions: 0,
NumServices: 1,
},
GoTypes: file_federation_federation_proto_goTypes,
DependencyIndexes: file_federation_federation_proto_depIdxs,
MessageInfos: file_federation_federation_proto_msgTypes,
}.Build()
File_federation_federation_proto = out.File
file_federation_federation_proto_rawDesc = nil
file_federation_federation_proto_goTypes = nil
file_federation_federation_proto_depIdxs = nil
}
================================================
FILE: _examples/17_error_handler/federation/federation_grpc.pb.go
================================================
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.3.0
// - protoc (unknown)
// source: federation/federation.proto
package federation
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 (
FederationService_GetPost_FullMethodName = "/org.federation.FederationService/GetPost"
FederationService_GetPost2_FullMethodName = "/org.federation.FederationService/GetPost2"
)
// FederationServiceClient is the client API for FederationService 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 FederationServiceClient interface {
GetPost(ctx context.Context, in *GetPostRequest, opts ...grpc.CallOption) (*GetPostResponse, error)
GetPost2(ctx context.Context, in *GetPost2Request, opts ...grpc.CallOption) (*GetPost2Response, error)
}
type federationServiceClient struct {
cc grpc.ClientConnInterface
}
func NewFederationServiceClient(cc grpc.ClientConnInterface) FederationServiceClient {
return &federationServiceClient{cc}
}
func (c *federationServiceClient) GetPost(ctx context.Context, in *GetPostRequest, opts ...grpc.CallOption) (*GetPostResponse, error) {
out := new(GetPostResponse)
err := c.cc.Invoke(ctx, FederationService_GetPost_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *federationServiceClient) GetPost2(ctx context.Context, in *GetPost2Request, opts ...grpc.CallOption) (*GetPost2Response, error) {
out := new(GetPost2Response)
err := c.cc.Invoke(ctx, FederationService_GetPost2_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// FederationServiceServer is the server API for FederationService service.
// All implementations must embed UnimplementedFederationServiceServer
// for forward compatibility
type FederationServiceServer interface {
GetPost(context.Context, *GetPostRequest) (*GetPostResponse, error)
GetPost2(context.Context, *GetPost2Request) (*GetPost2Response, error)
mustEmbedUnimplementedFederationServiceServer()
}
// UnimplementedFederationServiceServer must be embedded to have forward compatible implementations.
type UnimplementedFederationServiceServer struct {
}
func (UnimplementedFederationServiceServer) GetPost(context.Context, *GetPostRequest) (*GetPostResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetPost not implemented")
}
func (UnimplementedFederationServiceServer) GetPost2(context.Context, *GetPost2Request) (*GetPost2Response, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetPost2 not implemented")
}
func (UnimplementedFederationServiceServer) mustEmbedUnimplementedFederationServiceServer() {}
// UnsafeFederationServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to FederationServiceServer will
// result in compilation errors.
type UnsafeFederationServiceServer interface {
mustEmbedUnimplementedFederationServiceServer()
}
func RegisterFederationServiceServer(s grpc.ServiceRegistrar, srv FederationServiceServer) {
s.RegisterService(&FederationService_ServiceDesc, srv)
}
func _FederationService_GetPost_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetPostRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(FederationServiceServer).GetPost(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: FederationService_GetPost_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(FederationServiceServer).GetPost(ctx, req.(*GetPostRequest))
}
return interceptor(ctx, in, info, handler)
}
func _FederationService_GetPost2_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetPost2Request)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(FederationServiceServer).GetPost2(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: FederationService_GetPost2_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(FederationServiceServer).GetPost2(ctx, req.(*GetPost2Request))
}
return interceptor(ctx, in, info, handler)
}
// FederationService_ServiceDesc is the grpc.ServiceDesc for FederationService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var FederationService_ServiceDesc = grpc.ServiceDesc{
ServiceName: "org.federation.FederationService",
HandlerType: (*FederationServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "GetPost",
Handler: _FederationService_GetPost_Handler,
},
{
MethodName: "GetPost2",
Handler: _FederationService_GetPost2_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "federation/federation.proto",
}
================================================
FILE: _examples/17_error_handler/federation/federation_grpc_federation.pb.go
================================================
// Code generated by protoc-gen-grpc-federation. DO NOT EDIT!
// versions:
//
// protoc-gen-grpc-federation: (devel)
//
// source: federation/federation.proto
package federation
import (
"context"
"io"
"log/slog"
"reflect"
grpcfed "github.com/mercari/grpc-federation/grpc/federation"
grpcfedcel "github.com/mercari/grpc-federation/grpc/federation/cel"
"go.opentelemetry.io/otel"
"go.opentelemetry.io/otel/trace"
post "example/post"
code "google.golang.org/genproto/googleapis/rpc/code"
)
var (
_ = reflect.Invalid // to avoid "imported and not used error"
)
// Org_Federation_CustomMessageVariable represents variable definitions in "org.federation.CustomMessage".
type FederationService_Org_Federation_CustomMessageVariable struct {
}
// Org_Federation_CustomMessageArgument is argument for "org.federation.CustomMessage" message.
type FederationService_Org_Federation_CustomMessageArgument struct {
ErrorInfo *grpcfedcel.Error
FederationService_Org_Federation_CustomMessageVariable
}
// Org_Federation_GetPost2ResponseVariable represents variable definitions in "org.federation.GetPost2Response".
type FederationService_Org_Federation_GetPost2ResponseVariable struct {
Code code.Code
Code2 code.Code
}
// Org_Federation_GetPost2ResponseArgument is argument for "org.federation.GetPost2Response" message.
type FederationService_Org_Federation_GetPost2ResponseArgument struct {
Id string
FederationService_Org_Federation_GetPost2ResponseVariable
}
// Org_Federation_GetPostResponseVariable represents variable definitions in "org.federation.GetPostResponse".
type FederationService_Org_Federation_GetPostResponseVariable struct {
Post *Post
}
// Org_Federation_GetPostResponseArgument is argument for "org.federation.GetPostResponse" message.
type FederationService_Org_Federation_GetPostResponseArgument struct {
Id string
FederationService_Org_Federation_GetPostResponseVariable
}
// Org_Federation_LocalizedMessageVariable represents variable definitions in "org.federation.LocalizedMessage".
type FederationService_Org_Federation_LocalizedMessageVariable struct {
}
// Org_Federation_LocalizedMessageArgument is argument for "org.federation.LocalizedMessage" message.
type FederationService_Org_Federation_LocalizedMessageArgument struct {
Value string
FederationService_Org_Federation_LocalizedMessageVariable
}
// Org_Federation_PostVariable represents variable definitions in "org.federation.Post".
type FederationService_Org_Federation_PostVariable struct {
Code int64
Id string
LocalizedMsg *LocalizedMessage
Post *post.Post
Res *post.GetPostResponse
XDef0ErrDetail0Msg0 *CustomMessage
}
// Org_Federation_PostArgument is argument for "org.federation.Post" message.
type FederationService_Org_Federation_PostArgument struct {
Id string
FederationService_Org_Federation_PostVariable
}
// Org_Federation_ZVariable represents variable definitions in "org.federation.Z".
type FederationService_Org_Federation_ZVariable struct {
Code int64
}
// Org_Federation_ZArgument is argument for "org.federation.Z" message.
type FederationService_Org_Federation_ZArgument struct {
ErrorInfo *grpcfedcel.Error
FederationService_Org_Federation_ZVariable
}
// FederationServiceConfig configuration required to initialize the service that use GRPC Federation.
type FederationServiceConfig struct {
// Client provides a factory that creates the gRPC Client needed to invoke methods of the gRPC Service on which the Federation Service depends.
// If this interface is not provided, an error is returned during initialization.
Client FederationServiceClientFactory // required
// ErrorHandler Federation Service often needs to convert errors received from downstream services.
// If an error occurs during method execution in the Federation Service, this error handler is called and the returned error is treated as a final error.
ErrorHandler grpcfed.ErrorHandler
// Logger sets the logger used to output Debug/Info/Error information.
Logger *slog.Logger
}
// FederationServiceClientFactory provides a factory that creates the gRPC Client needed to invoke methods of the gRPC Service on which the Federation Service depends.
type FederationServiceClientFactory interface {
// Post_PostServiceClient create a gRPC Client to be used to call methods in post.PostService.
Post_PostServiceClient(FederationServiceClientConfig) (post.PostServiceClient, error)
}
// FederationServiceClientConfig helper to create gRPC client.
// Hints for creating a gRPC Client.
type FederationServiceClientConfig struct {
// Service FQDN ( `.` ) of the service on Protocol Buffers.
Service string
}
// FederationServiceDependentClientSet has a gRPC client for all services on which the federation service depends.
// This is provided as an argument when implementing the custom resolver.
type FederationServiceDependentClientSet struct {
Post_PostServiceClient post.PostServiceClient
}
// FederationServiceResolver provides an interface to directly implement message resolver and field resolver not defined in Protocol Buffers.
type FederationServiceResolver interface {
}
// FederationServiceCELPluginWasmConfig type alias for grpcfedcel.WasmConfig.
type FederationServiceCELPluginWasmConfig = grpcfedcel.WasmConfig
// FederationServiceCELPluginConfig hints for loading a WebAssembly based plugin.
type FederationServiceCELPluginConfig struct {
CacheDir string
}
// FederationServiceUnimplementedResolver a structure implemented to satisfy the Resolver interface.
// An Unimplemented error is always returned.
// This is intended for use when there are many Resolver interfaces that do not need to be implemented,
// by embedding them in a resolver structure that you have created.
type FederationServiceUnimplementedResolver struct{}
const (
FederationService_DependentMethod_Post_PostService_GetPost = "/post.PostService/GetPost"
)
// FederationService represents Federation Service.
type FederationService struct {
UnimplementedFederationServiceServer
cfg FederationServiceConfig
logger *slog.Logger
isLogLevelDebug bool
errorHandler grpcfed.ErrorHandler
celCacheMap *grpcfed.CELCacheMap
tracer trace.Tracer
celTypeHelper *grpcfed.CELTypeHelper
celEnvOpts []grpcfed.CELEnvOption
celPlugins []*grpcfedcel.CELPlugin
client *FederationServiceDependentClientSet
}
// NewFederationService creates FederationService instance by FederationServiceConfig.
func NewFederationService(cfg FederationServiceConfig) (*FederationService, error) {
if cfg.Client == nil {
return nil, grpcfed.ErrClientConfig
}
Post_PostServiceClient, err := cfg.Client.Post_PostServiceClient(FederationServiceClientConfig{
Service: "post.PostService",
})
if err != nil {
return nil, err
}
logger := cfg.Logger
if logger == nil {
logger = slog.New(slog.NewJSONHandler(io.Discard, nil))
}
tracer := otel.Tracer("org.federation.FederationService")
ctx := grpcfed.WithLogger(context.Background(), logger)
ctx = grpcfed.WithTracer(ctx, tracer)
errorHandler := cfg.ErrorHandler
if errorHandler == nil {
errorHandler = func(ctx context.Context, methodName string, err error) error { return err }
}
celTypeHelperFieldMap := grpcfed.CELTypeHelperFieldMap{
"grpc.federation.private.org.federation.CustomMessageArgument": {
"error_info": grpcfed.NewCELFieldType(grpcfed.NewCELObjectType("grpc.federation.private.Error"), "ErrorInfo"),
},
"grpc.federation.private.org.federation.GetPost2ResponseArgument": {
"id": grpcfed.NewCELFieldType(grpcfed.CELStringType, "Id"),
},
"grpc.federation.private.org.federation.GetPostResponseArgument": {
"id": grpcfed.NewCELFieldType(grpcfed.CELStringType, "Id"),
},
"grpc.federation.private.org.federation.LocalizedMessageArgument": {
"value": grpcfed.NewCELFieldType(grpcfed.CELStringType, "Value"),
},
"grpc.federation.private.org.federation.PostArgument": {
"id": grpcfed.NewCELFieldType(grpcfed.CELStringType, "Id"),
},
"grpc.federation.private.org.federation.ZArgument": {
"error_info": grpcfed.NewCELFieldType(grpcfed.NewCELObjectType("grpc.federation.private.Error"), "ErrorInfo"),
},
}
celTypeHelper := grpcfed.NewCELTypeHelper("org.federation", celTypeHelperFieldMap)
var celEnvOpts []grpcfed.CELEnvOption
celEnvOpts = append(celEnvOpts, grpcfed.NewDefaultEnvOptions(celTypeHelper)...)
celEnvOpts = append(celEnvOpts, grpcfed.GRPCErrorAccessorOptions(celTypeHelper, "post.GetPostResponse")...)
svc := &FederationService{
cfg: cfg,
logger: logger,
isLogLevelDebug: logger.Enabled(context.Background(), slog.LevelDebug),
errorHandler: errorHandler,
celEnvOpts: celEnvOpts,
celTypeHelper: celTypeHelper,
celCacheMap: grpcfed.NewCELCacheMap(),
tracer: tracer,
client: &FederationServiceDependentClientSet{
Post_PostServiceClient: Post_PostServiceClient,
},
}
return svc, nil
}
// CleanupFederationService cleanup all resources to prevent goroutine leaks.
func CleanupFederationService(ctx context.Context, svc *FederationService) {
svc.cleanup(ctx)
}
func (s *FederationService) cleanup(ctx context.Context) {
for _, plugin := range s.celPlugins {
plugin.Close()
}
}
// GetPost implements "org.federation.FederationService/GetPost" method.
func (s *FederationService) GetPost(ctx context.Context, req *GetPostRequest) (res *GetPostResponse, e error) {
ctx, span := s.tracer.Start(ctx, "org.federation.FederationService/GetPost")
defer span.End()
ctx = grpcfed.WithLogger(ctx, s.logger)
ctx = grpcfed.WithCELCacheMap(ctx, s.celCacheMap)
defer func() {
if r := recover(); r != nil {
e = grpcfed.RecoverError(r, grpcfed.StackTrace())
grpcfed.OutputErrorLog(ctx, e)
}
}()
defer func() {
for _, celPlugin := range s.celPlugins {
celPlugin.Cleanup()
}
}()
res, err := s.resolve_Org_Federation_GetPostResponse(ctx, &FederationService_Org_Federation_GetPostResponseArgument{
Id: req.GetId(),
})
if err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
grpcfed.OutputErrorLog(ctx, err)
return nil, err
}
return res, nil
}
// GetPost2 implements "org.federation.FederationService/GetPost2" method.
func (s *FederationService) GetPost2(ctx context.Context, req *GetPost2Request) (res *GetPost2Response, e error) {
ctx, span := s.tracer.Start(ctx, "org.federation.FederationService/GetPost2")
defer span.End()
ctx = grpcfed.WithLogger(ctx, s.logger)
ctx = grpcfed.WithCELCacheMap(ctx, s.celCacheMap)
defer func() {
if r := recover(); r != nil {
e = grpcfed.RecoverError(r, grpcfed.StackTrace())
grpcfed.OutputErrorLog(ctx, e)
}
}()
defer func() {
for _, celPlugin := range s.celPlugins {
celPlugin.Cleanup()
}
}()
res, err := s.resolve_Org_Federation_GetPost2Response(ctx, &FederationService_Org_Federation_GetPost2ResponseArgument{
Id: req.GetId(),
})
if err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
grpcfed.OutputErrorLog(ctx, err)
return nil, err
}
return res, nil
}
// resolve_Org_Federation_CustomMessage resolve "org.federation.CustomMessage" message.
func (s *FederationService) resolve_Org_Federation_CustomMessage(ctx context.Context, req *FederationService_Org_Federation_CustomMessageArgument) (*CustomMessage, error) {
ctx, span := s.tracer.Start(ctx, "org.federation.CustomMessage")
defer span.End()
ctx = grpcfed.WithLogger(ctx, grpcfed.Logger(ctx), grpcfed.LogAttrs(ctx)...)
grpcfed.Logger(ctx).DebugContext(ctx, "resolve org.federation.CustomMessage", slog.Any("message_args", s.logvalue_Org_Federation_CustomMessageArgument(req)))
type localValueType struct {
*grpcfed.LocalValue
vars struct {
}
}
value := &localValueType{LocalValue: grpcfed.NewLocalValue(ctx, s.celEnvOpts, "grpc.federation.private.org.federation.CustomMessageArgument", req)}
ctx = grpcfed.WithLocalValue(ctx, value.LocalValue)
// create a message value to be returned.
ret := &CustomMessage{}
// field binding section.
// (grpc.federation.field).by = "'custom error message:' + $.error_info.message"
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[string]{
Value: value,
Expr: `'custom error message:' + $.error_info.message`,
CacheIndex: 1,
Setter: func(v string) error {
ret.Msg = v
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
grpcfed.Logger(ctx).DebugContext(ctx, "resolved org.federation.CustomMessage", slog.Any("org.federation.CustomMessage", s.logvalue_Org_Federation_CustomMessage(ret)))
return ret, nil
}
// resolve_Org_Federation_GetPost2Response resolve "org.federation.GetPost2Response" message.
func (s *FederationService) resolve_Org_Federation_GetPost2Response(ctx context.Context, req *FederationService_Org_Federation_GetPost2ResponseArgument) (*GetPost2Response, error) {
ctx, span := s.tracer.Start(ctx, "org.federation.GetPost2Response")
defer span.End()
ctx = grpcfed.WithLogger(ctx, grpcfed.Logger(ctx), grpcfed.LogAttrs(ctx)...)
grpcfed.Logger(ctx).DebugContext(ctx, "resolve org.federation.GetPost2Response", slog.Any("message_args", s.logvalue_Org_Federation_GetPost2ResponseArgument(req)))
type localValueType struct {
*grpcfed.LocalValue
vars struct {
Code code.Code
Code2 code.Code
Msg string
Msg2 string
XDef0 *post.GetPostResponse
}
}
value := &localValueType{LocalValue: grpcfed.NewLocalValue(ctx, s.celEnvOpts, "grpc.federation.private.org.federation.GetPost2ResponseArgument", req)}
ctx = grpcfed.WithLocalValue(ctx, value.LocalValue)
/*
def {
name: "_def0"
call {
method: "post.PostService/GetPost"
request { field: "id", by: "$.id" }
}
}
*/
def__def0 := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[*post.GetPostResponse, *localValueType]{
Name: `_def0`,
Type: grpcfed.CELObjectType("post.GetPostResponse"),
Setter: func(value *localValueType, v *post.GetPostResponse) error {
value.vars.XDef0 = v
return nil
},
Message: func(ctx context.Context, value *localValueType) (any, error) {
args := &post.GetPostRequest{}
// { field: "id", by: "$.id" }
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[string]{
Value: value,
Expr: `$.id`,
CacheIndex: 2,
Setter: func(v string) error {
args.Id = v
return nil
},
}); err != nil {
return nil, err
}
grpcfed.Logger(ctx).DebugContext(ctx, "call post.PostService/GetPost", slog.Any("post.GetPostRequest", s.logvalue_Post_GetPostRequest(args)))
ret, err := s.client.Post_PostServiceClient.GetPost(ctx, args)
if err != nil {
grpcErr := grpcfed.ToGRPCError(ctx, err)
ctx = grpcfed.WithGRPCError(ctx, grpcErr)
var (
defaultMsg string
defaultCode grpcfed.Code
defaultDetails []grpcfed.ProtoMessage
)
if stat, exists := grpcfed.GRPCStatusFromError(err); exists {
defaultMsg = stat.Message()
defaultCode = stat.Code()
details := stat.Details()
defaultDetails = make([]grpcfed.ProtoMessage, 0, len(details))
for _, detail := range details {
msg, ok := detail.(grpcfed.ProtoMessage)
if ok {
defaultDetails = append(defaultDetails, msg)
}
}
_ = defaultMsg
_ = defaultCode
_ = defaultDetails
}
type localStatusType struct {
status *grpcfed.Status
logLevel slog.Level
}
stat, handleErr := func() (*localStatusType, error) {
var stat *grpcfed.Status
{
/*
def {
name: "code"
by: "google.rpc.Code.from(error.code)"
}
*/
def_code := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[code.Code, *localValueType]{
Name: `code`,
Type: grpcfed.CELIntType,
Setter: func(value *localValueType, v code.Code) error {
value.vars.Code = v
return nil
},
By: `google.rpc.Code.from(error.code)`,
ByCacheIndex: 3,
})
}
/*
def {
name: "msg"
by: "error.message"
}
*/
def_msg := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[string, *localValueType]{
Name: `msg`,
Type: grpcfed.CELStringType,
Setter: func(value *localValueType, v string) error {
value.vars.Msg = v
return nil
},
By: `error.message`,
ByCacheIndex: 4,
})
}
// A tree view of message dependencies is shown below.
/*
code ─┐
msg ─┤
*/
eg, ctx1 := grpcfed.ErrorGroupWithContext(ctx)
grpcfed.GoWithRecover(eg, func() (any, error) {
if err := def_code(ctx1); err != nil {
grpcfed.RecordErrorToSpan(ctx1, err)
return nil, err
}
return nil, nil
})
grpcfed.GoWithRecover(eg, func() (any, error) {
if err := def_msg(ctx1); err != nil {
grpcfed.RecordErrorToSpan(ctx1, err)
return nil, err
}
return nil, nil
})
if err := eg.Wait(); err != nil {
return nil, err
}
if err := grpcfed.If(ctx, &grpcfed.IfParam[*localValueType]{
Value: value,
Expr: `code == google.rpc.Code.FAILED_PRECONDITION`,
CacheIndex: 5,
Body: func(value *localValueType) error {
var errorMessage string
if defaultMsg != "" {
errorMessage = defaultMsg
} else {
errorMessage = "error"
}
var code grpcfed.Code
code = defaultCode
status := grpcfed.NewGRPCStatus(code, errorMessage)
statusWithDetails, err := status.WithDetails(defaultDetails...)
if err != nil {
grpcfed.Logger(ctx).ErrorContext(ctx, "failed setting error details", slog.String("error", err.Error()))
stat = status
} else {
stat = statusWithDetails
}
return nil
},
}); err != nil {
return nil, err
}
if stat != nil {
return &localStatusType{status: stat, logLevel: slog.LevelWarn}, nil
}
}
{
/*
def {
name: "code2"
by: "google.rpc.Code.from(error.code)"
}
*/
def_code2 := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[code.Code, *localValueType]{
Name: `code2`,
Type: grpcfed.CELIntType,
Setter: func(value *localValueType, v code.Code) error {
value.vars.Code2 = v
return nil
},
By: `google.rpc.Code.from(error.code)`,
ByCacheIndex: 6,
})
}
/*
def {
name: "msg2"
by: "error.message"
}
*/
def_msg2 := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[string, *localValueType]{
Name: `msg2`,
Type: grpcfed.CELStringType,
Setter: func(value *localValueType, v string) error {
value.vars.Msg2 = v
return nil
},
By: `error.message`,
ByCacheIndex: 7,
})
}
// A tree view of message dependencies is shown below.
/*
code2 ─┐
msg2 ─┤
*/
eg, ctx1 := grpcfed.ErrorGroupWithContext(ctx)
grpcfed.GoWithRecover(eg, func() (any, error) {
if err := def_code2(ctx1); err != nil {
grpcfed.RecordErrorToSpan(ctx1, err)
return nil, err
}
return nil, nil
})
grpcfed.GoWithRecover(eg, func() (any, error) {
if err := def_msg2(ctx1); err != nil {
grpcfed.RecordErrorToSpan(ctx1, err)
return nil, err
}
return nil, nil
})
if err := eg.Wait(); err != nil {
return nil, err
}
if err := grpcfed.If(ctx, &grpcfed.IfParam[*localValueType]{
Value: value,
Expr: `code2 == google.rpc.Code.INTERNAL`,
CacheIndex: 8,
Body: func(value *localValueType) error {
var errorMessage string
if defaultMsg != "" {
errorMessage = defaultMsg
} else {
errorMessage = "error"
}
var code grpcfed.Code
code = defaultCode
status := grpcfed.NewGRPCStatus(code, errorMessage)
statusWithDetails, err := status.WithDetails(defaultDetails...)
if err != nil {
grpcfed.Logger(ctx).ErrorContext(ctx, "failed setting error details", slog.String("error", err.Error()))
stat = status
} else {
stat = statusWithDetails
}
return nil
},
}); err != nil {
return nil, err
}
if stat != nil {
return &localStatusType{status: stat, logLevel: slog.LevelError}, nil
}
}
return nil, nil
}()
if handleErr != nil {
grpcfed.Logger(ctx).ErrorContext(ctx, "failed to handle error", slog.String("error", handleErr.Error()))
// If it fails during error handling, return the original error.
if err := s.errorHandler(ctx, FederationService_DependentMethod_Post_PostService_GetPost, err); err != nil {
return nil, grpcfed.NewErrorWithLogAttrs(err, slog.LevelError, grpcfed.LogAttrs(ctx))
}
} else if stat != nil {
if err := s.errorHandler(ctx, FederationService_DependentMethod_Post_PostService_GetPost, stat.status.Err()); err != nil {
return nil, grpcfed.NewErrorWithLogAttrs(err, stat.logLevel, grpcfed.LogAttrs(ctx))
}
} else {
if err := s.errorHandler(ctx, FederationService_DependentMethod_Post_PostService_GetPost, err); err != nil {
return nil, grpcfed.NewErrorWithLogAttrs(err, slog.LevelError, grpcfed.LogAttrs(ctx))
}
}
value.SetGRPCError(ret, grpcErr)
}
return ret, nil
},
})
}
if err := def__def0(ctx); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
// assign named parameters to message arguments to pass to the custom resolver.
req.FederationService_Org_Federation_GetPost2ResponseVariable.Code = value.vars.Code
req.FederationService_Org_Federation_GetPost2ResponseVariable.Code2 = value.vars.Code2
// create a message value to be returned.
ret := &GetPost2Response{}
grpcfed.Logger(ctx).DebugContext(ctx, "resolved org.federation.GetPost2Response", slog.Any("org.federation.GetPost2Response", s.logvalue_Org_Federation_GetPost2Response(ret)))
return ret, nil
}
// resolve_Org_Federation_GetPostResponse resolve "org.federation.GetPostResponse" message.
func (s *FederationService) resolve_Org_Federation_GetPostResponse(ctx context.Context, req *FederationService_Org_Federation_GetPostResponseArgument) (*GetPostResponse, error) {
ctx, span := s.tracer.Start(ctx, "org.federation.GetPostResponse")
defer span.End()
ctx = grpcfed.WithLogger(ctx, grpcfed.Logger(ctx), grpcfed.LogAttrs(ctx)...)
grpcfed.Logger(ctx).DebugContext(ctx, "resolve org.federation.GetPostResponse", slog.Any("message_args", s.logvalue_Org_Federation_GetPostResponseArgument(req)))
type localValueType struct {
*grpcfed.LocalValue
vars struct {
Post *Post
}
}
value := &localValueType{LocalValue: grpcfed.NewLocalValue(ctx, s.celEnvOpts, "grpc.federation.private.org.federation.GetPostResponseArgument", req)}
ctx = grpcfed.WithLocalValue(ctx, value.LocalValue)
/*
def {
name: "post"
message {
name: "Post"
args { name: "id", by: "$.id" }
}
}
*/
def_post := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[*Post, *localValueType]{
Name: `post`,
Type: grpcfed.CELObjectType("org.federation.Post"),
Setter: func(value *localValueType, v *Post) error {
value.vars.Post = v
return nil
},
Message: func(ctx context.Context, value *localValueType) (any, error) {
args := &FederationService_Org_Federation_PostArgument{}
// { name: "id", by: "$.id" }
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[string]{
Value: value,
Expr: `$.id`,
CacheIndex: 9,
Setter: func(v string) error {
args.Id = v
return nil
},
}); err != nil {
return nil, err
}
ret, err := s.resolve_Org_Federation_Post(ctx, args)
if err != nil {
return nil, err
}
return ret, nil
},
})
}
if err := def_post(ctx); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
// assign named parameters to message arguments to pass to the custom resolver.
req.FederationService_Org_Federation_GetPostResponseVariable.Post = value.vars.Post
// create a message value to be returned.
ret := &GetPostResponse{}
// field binding section.
// (grpc.federation.field).by = "post"
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[*Post]{
Value: value,
Expr: `post`,
CacheIndex: 10,
Setter: func(v *Post) error {
ret.Post = v
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
grpcfed.Logger(ctx).DebugContext(ctx, "resolved org.federation.GetPostResponse", slog.Any("org.federation.GetPostResponse", s.logvalue_Org_Federation_GetPostResponse(ret)))
return ret, nil
}
// resolve_Org_Federation_LocalizedMessage resolve "org.federation.LocalizedMessage" message.
func (s *FederationService) resolve_Org_Federation_LocalizedMessage(ctx context.Context, req *FederationService_Org_Federation_LocalizedMessageArgument) (*LocalizedMessage, error) {
ctx, span := s.tracer.Start(ctx, "org.federation.LocalizedMessage")
defer span.End()
ctx = grpcfed.WithLogger(ctx, grpcfed.Logger(ctx), grpcfed.LogAttrs(ctx)...)
grpcfed.Logger(ctx).DebugContext(ctx, "resolve org.federation.LocalizedMessage", slog.Any("message_args", s.logvalue_Org_Federation_LocalizedMessageArgument(req)))
type localValueType struct {
*grpcfed.LocalValue
vars struct {
}
}
value := &localValueType{LocalValue: grpcfed.NewLocalValue(ctx, s.celEnvOpts, "grpc.federation.private.org.federation.LocalizedMessageArgument", req)}
ctx = grpcfed.WithLocalValue(ctx, value.LocalValue)
// create a message value to be returned.
ret := &LocalizedMessage{}
// field binding section.
// (grpc.federation.field).by = "'localized value:' + $.value"
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[string]{
Value: value,
Expr: `'localized value:' + $.value`,
CacheIndex: 11,
Setter: func(v string) error {
ret.Value = v
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
grpcfed.Logger(ctx).DebugContext(ctx, "resolved org.federation.LocalizedMessage", slog.Any("org.federation.LocalizedMessage", s.logvalue_Org_Federation_LocalizedMessage(ret)))
return ret, nil
}
// resolve_Org_Federation_Post resolve "org.federation.Post" message.
func (s *FederationService) resolve_Org_Federation_Post(ctx context.Context, req *FederationService_Org_Federation_PostArgument) (*Post, error) {
ctx, span := s.tracer.Start(ctx, "org.federation.Post")
defer span.End()
ctx = grpcfed.WithLogger(ctx, grpcfed.Logger(ctx), grpcfed.LogAttrs(ctx)...)
grpcfed.Logger(ctx).DebugContext(ctx, "resolve org.federation.Post", slog.Any("message_args", s.logvalue_Org_Federation_PostArgument(req)))
type localValueType struct {
*grpcfed.LocalValue
vars struct {
Code int64
Id string
LocalizedMsg *LocalizedMessage
Post *post.Post
Res *post.GetPostResponse
XDef0Def1 *Z
XDef0ErrDetail0Def1 *Z
XDef0ErrDetail0Msg0 *CustomMessage
}
}
value := &localValueType{LocalValue: grpcfed.NewLocalValue(ctx, s.celEnvOpts, "grpc.federation.private.org.federation.PostArgument", req)}
ctx = grpcfed.WithLocalValue(ctx, value.LocalValue)
/*
def {
name: "res"
call {
method: "post.PostService/GetPost"
request { field: "id", by: "$.id" }
}
}
*/
def_res := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[*post.GetPostResponse, *localValueType]{
Name: `res`,
Type: grpcfed.CELObjectType("post.GetPostResponse"),
Setter: func(value *localValueType, v *post.GetPostResponse) error {
value.vars.Res = v
return nil
},
Message: func(ctx context.Context, value *localValueType) (any, error) {
args := &post.GetPostRequest{}
// { field: "id", by: "$.id" }
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[string]{
Value: value,
Expr: `$.id`,
CacheIndex: 12,
Setter: func(v string) error {
args.Id = v
return nil
},
}); err != nil {
return nil, err
}
grpcfed.Logger(ctx).DebugContext(ctx, "call post.PostService/GetPost", slog.Any("post.GetPostRequest", s.logvalue_Post_GetPostRequest(args)))
ret, err := s.client.Post_PostServiceClient.GetPost(ctx, args)
if err != nil {
grpcErr := grpcfed.ToGRPCError(ctx, err)
ctx = grpcfed.WithGRPCError(ctx, grpcErr)
var (
defaultMsg string
defaultCode grpcfed.Code
defaultDetails []grpcfed.ProtoMessage
)
if stat, exists := grpcfed.GRPCStatusFromError(err); exists {
defaultMsg = stat.Message()
defaultCode = stat.Code()
details := stat.Details()
defaultDetails = make([]grpcfed.ProtoMessage, 0, len(details))
for _, detail := range details {
msg, ok := detail.(grpcfed.ProtoMessage)
if ok {
defaultDetails = append(defaultDetails, msg)
}
}
_ = defaultMsg
_ = defaultCode
_ = defaultDetails
}
type localStatusType struct {
status *grpcfed.Status
logLevel slog.Level
}
stat, handleErr := func() (*localStatusType, error) {
var stat *grpcfed.Status
{
/*
def {
name: "id"
by: "$.id"
}
*/
def_id := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[string, *localValueType]{
Name: `id`,
Type: grpcfed.CELStringType,
Setter: func(value *localValueType, v string) error {
value.vars.Id = v
return nil
},
By: `$.id`,
ByCacheIndex: 13,
})
}
/*
def {
name: "_def0_def1"
message {
name: "Z"
args { name: "error_info", by: "error" }
}
}
*/
def__def0_def1 := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[*Z, *localValueType]{
Name: `_def0_def1`,
Type: grpcfed.CELObjectType("org.federation.Z"),
Setter: func(value *localValueType, v *Z) error {
value.vars.XDef0Def1 = v
return nil
},
Message: func(ctx context.Context, value *localValueType) (any, error) {
args := &FederationService_Org_Federation_ZArgument{}
// { name: "error_info", by: "error" }
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[*grpcfedcel.Error]{
Value: value,
Expr: `error`,
CacheIndex: 14,
Setter: func(v *grpcfedcel.Error) error {
args.ErrorInfo = v
return nil
},
}); err != nil {
return nil, err
}
ret, err := s.resolve_Org_Federation_Z(ctx, args)
if err != nil {
return nil, err
}
return ret, nil
},
})
}
// A tree view of message dependencies is shown below.
/*
_def0_def1 ─┐
id ─┤
*/
eg, ctx1 := grpcfed.ErrorGroupWithContext(ctx)
grpcfed.GoWithRecover(eg, func() (any, error) {
if err := def__def0_def1(ctx1); err != nil {
grpcfed.RecordErrorToSpan(ctx1, err)
return nil, err
}
return nil, nil
})
grpcfed.GoWithRecover(eg, func() (any, error) {
if err := def_id(ctx1); err != nil {
grpcfed.RecordErrorToSpan(ctx1, err)
return nil, err
}
return nil, nil
})
if err := eg.Wait(); err != nil {
return nil, err
}
if err := grpcfed.If(ctx, &grpcfed.IfParam[*localValueType]{
Value: value,
Expr: `error.precondition_failures[?0].violations[?0].subject == optional.of('bar') && error.localized_messages[?0].message == optional.of('hello') && error.custom_messages[?0].id == optional.of('xxx')`,
CacheIndex: 15,
Body: func(value *localValueType) error {
errmsg, err := grpcfed.EvalCEL(ctx, &grpcfed.EvalCELRequest{
Value: value,
Expr: `'this is custom error message'`,
OutType: reflect.TypeOf(""),
CacheIndex: 16,
})
if err != nil {
return err
}
errorMessage := errmsg.(string)
var details []grpcfed.ProtoMessage
if _, err := func() (any, error) {
/*
def {
name: "localized_msg"
message {
name: "LocalizedMessage"
args { name: "value", by: "id" }
}
}
*/
def_localized_msg := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[*LocalizedMessage, *localValueType]{
Name: `localized_msg`,
Type: grpcfed.CELObjectType("org.federation.LocalizedMessage"),
Setter: func(value *localValueType, v *LocalizedMessage) error {
value.vars.LocalizedMsg = v
return nil
},
Message: func(ctx context.Context, value *localValueType) (any, error) {
args := &FederationService_Org_Federation_LocalizedMessageArgument{}
// { name: "value", by: "id" }
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[string]{
Value: value,
Expr: `id`,
CacheIndex: 17,
Setter: func(v string) error {
args.Value = v
return nil
},
}); err != nil {
return nil, err
}
ret, err := s.resolve_Org_Federation_LocalizedMessage(ctx, args)
if err != nil {
return nil, err
}
return ret, nil
},
})
}
/*
def {
name: "_def0_err_detail0_def1"
message {
name: "Z"
args { name: "error_info", by: "error" }
}
}
*/
def__def0_err_detail0_def1 := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[*Z, *localValueType]{
Name: `_def0_err_detail0_def1`,
Type: grpcfed.CELObjectType("org.federation.Z"),
Setter: func(value *localValueType, v *Z) error {
value.vars.XDef0ErrDetail0Def1 = v
return nil
},
Message: func(ctx context.Context, value *localValueType) (any, error) {
args := &FederationService_Org_Federation_ZArgument{}
// { name: "error_info", by: "error" }
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[*grpcfedcel.Error]{
Value: value,
Expr: `error`,
CacheIndex: 18,
Setter: func(v *grpcfedcel.Error) error {
args.ErrorInfo = v
return nil
},
}); err != nil {
return nil, err
}
ret, err := s.resolve_Org_Federation_Z(ctx, args)
if err != nil {
return nil, err
}
return ret, nil
},
})
}
// A tree view of message dependencies is shown below.
/*
_def0_err_detail0_def1 ─┐
localized_msg ─┤
*/
eg, ctx1 := grpcfed.ErrorGroupWithContext(ctx)
grpcfed.GoWithRecover(eg, func() (any, error) {
if err := def__def0_err_detail0_def1(ctx1); err != nil {
grpcfed.RecordErrorToSpan(ctx1, err)
return nil, err
}
return nil, nil
})
grpcfed.GoWithRecover(eg, func() (any, error) {
if err := def_localized_msg(ctx1); err != nil {
grpcfed.RecordErrorToSpan(ctx1, err)
return nil, err
}
return nil, nil
})
if err := eg.Wait(); err != nil {
return nil, err
}
return nil, nil
}(); err != nil {
return err
}
if err := grpcfed.If(ctx, &grpcfed.IfParam[*localValueType]{
Value: value,
Expr: `true`,
CacheIndex: 19,
Body: func(value *localValueType) error {
if _, err := func() (any, error) {
/*
def {
name: "_def0_err_detail0_msg0"
message {
name: "CustomMessage"
args { name: "error_info", by: "error" }
}
}
*/
def__def0_err_detail0_msg0 := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[*CustomMessage, *localValueType]{
Name: `_def0_err_detail0_msg0`,
Type: grpcfed.CELObjectType("org.federation.CustomMessage"),
Setter: func(value *localValueType, v *CustomMessage) error {
value.vars.XDef0ErrDetail0Msg0 = v
return nil
},
Message: func(ctx context.Context, value *localValueType) (any, error) {
args := &FederationService_Org_Federation_CustomMessageArgument{}
// { name: "error_info", by: "error" }
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[*grpcfedcel.Error]{
Value: value,
Expr: `error`,
CacheIndex: 20,
Setter: func(v *grpcfedcel.Error) error {
args.ErrorInfo = v
return nil
},
}); err != nil {
return nil, err
}
ret, err := s.resolve_Org_Federation_CustomMessage(ctx, args)
if err != nil {
return nil, err
}
return ret, nil
},
})
}
if err := def__def0_err_detail0_msg0(ctx); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
return nil, nil
}(); err != nil {
return err
}
if detail := grpcfed.CustomMessage(ctx, &grpcfed.CustomMessageParam{
Value: value,
MessageValueName: "_def0_err_detail0_msg0",
CacheIndex: 21,
MessageIndex: 0,
}); detail != nil {
details = append(details, detail)
}
{
detail, err := grpcfed.EvalCEL(ctx, &grpcfed.EvalCELRequest{
Value: value,
Expr: `post.Post{id: 'foo'}`,
OutType: reflect.TypeOf((*post.Post)(nil)),
CacheIndex: 22,
})
if err != nil {
grpcfed.Logger(ctx).ErrorContext(ctx, "failed setting error details", slog.String("error", err.Error()))
}
if detail != nil {
details = append(details, detail.(grpcfed.ProtoMessage))
}
}
if detail := grpcfed.PreconditionFailure(ctx, value, []*grpcfed.PreconditionFailureViolation{
{
Type: `'some-type'`,
Subject: `'some-subject'`,
Desc: `'some-description'`,
TypeCacheIndex: 23,
SubjectCacheIndex: 24,
DescCacheIndex: 25,
},
}); detail != nil {
details = append(details, detail)
}
if detail := grpcfed.LocalizedMessage(ctx, &grpcfed.LocalizedMessageParam{
Value: value,
Locale: "en-US",
Message: `localized_msg.value`,
CacheIndex: 26,
}); detail != nil {
details = append(details, detail)
}
return nil
},
}); err != nil {
return err
}
var code grpcfed.Code
code = grpcfed.FailedPreconditionCode
status := grpcfed.NewGRPCStatus(code, errorMessage)
statusWithDetails, err := status.WithDetails(details...)
if err != nil {
grpcfed.Logger(ctx).ErrorContext(ctx, "failed setting error details", slog.String("error", err.Error()))
stat = status
} else {
stat = statusWithDetails
}
return nil
},
}); err != nil {
return nil, err
}
if stat != nil {
return &localStatusType{status: stat, logLevel: slog.LevelError}, nil
}
}
{
if err := grpcfed.If(ctx, &grpcfed.IfParam[*localValueType]{
Value: value,
Expr: `error.code == google.rpc.Code.INVALID_ARGUMENT`,
CacheIndex: 27,
Body: func(value *localValueType) error {
errmsg, err := grpcfed.EvalCEL(ctx, &grpcfed.EvalCELRequest{
Value: value,
Expr: `'this is custom log level'`,
OutType: reflect.TypeOf(""),
CacheIndex: 28,
})
if err != nil {
return err
}
errorMessage := errmsg.(string)
var code grpcfed.Code
code = grpcfed.InvalidArgumentCode
status := grpcfed.NewGRPCStatus(code, errorMessage)
statusWithDetails, err := status.WithDetails(defaultDetails...)
if err != nil {
grpcfed.Logger(ctx).ErrorContext(ctx, "failed setting error details", slog.String("error", err.Error()))
stat = status
} else {
stat = statusWithDetails
}
return nil
},
}); err != nil {
return nil, err
}
if stat != nil {
return &localStatusType{status: stat, logLevel: slog.LevelWarn}, nil
}
}
{
if err := grpcfed.If(ctx, &grpcfed.IfParam[*localValueType]{
Value: value,
Expr: `error.code == google.rpc.Code.UNIMPLEMENTED`,
CacheIndex: 29,
Body: func(value *localValueType) error {
stat = grpcfed.NewGRPCStatus(grpcfed.OKCode, "ignore error")
if err := grpcfed.IgnoreAndResponse(ctx, value, grpcfed.Def[*post.GetPostResponse, *localValueType]{
Name: "res",
Type: grpcfed.CELObjectType("post.GetPostResponse"),
Setter: func(value *localValueType, v *post.GetPostResponse) error {
ret = v // assign customized response to the result value.
return nil
},
By: `post.GetPostResponse{post: post.Post{id: 'anonymous'}}`,
ByCacheIndex: 30,
}); err != nil {
grpcfed.Logger(ctx).ErrorContext(ctx, "failed to set response when ignored", slog.String("error", err.Error()))
return nil
}
return nil
},
}); err != nil {
return nil, err
}
if stat != nil {
return &localStatusType{status: stat, logLevel: slog.LevelError}, nil
}
}
{
if err := grpcfed.If(ctx, &grpcfed.IfParam[*localValueType]{
Value: value,
Expr: `true`,
CacheIndex: 31,
Body: func(value *localValueType) error {
stat = grpcfed.NewGRPCStatus(grpcfed.OKCode, "ignore error")
ret = &post.GetPostResponse{}
return nil
},
}); err != nil {
return nil, err
}
if stat != nil {
return &localStatusType{status: stat, logLevel: slog.LevelError}, nil
}
}
{
if err := grpcfed.If(ctx, &grpcfed.IfParam[*localValueType]{
Value: value,
Expr: `true`,
CacheIndex: 32,
Body: func(value *localValueType) error {
var errorMessage string
if defaultMsg != "" {
errorMessage = defaultMsg
} else {
errorMessage = "error"
}
var code grpcfed.Code
code = grpcfed.CancelledCode
status := grpcfed.NewGRPCStatus(code, errorMessage)
statusWithDetails, err := status.WithDetails(defaultDetails...)
if err != nil {
grpcfed.Logger(ctx).ErrorContext(ctx, "failed setting error details", slog.String("error", err.Error()))
stat = status
} else {
stat = statusWithDetails
}
return nil
},
}); err != nil {
return nil, err
}
if stat != nil {
return &localStatusType{status: stat, logLevel: slog.LevelError}, nil
}
}
return nil, nil
}()
if handleErr != nil {
grpcfed.Logger(ctx).ErrorContext(ctx, "failed to handle error", slog.String("error", handleErr.Error()))
// If it fails during error handling, return the original error.
if err := s.errorHandler(ctx, FederationService_DependentMethod_Post_PostService_GetPost, err); err != nil {
return nil, grpcfed.NewErrorWithLogAttrs(err, slog.LevelError, grpcfed.LogAttrs(ctx))
}
} else if stat != nil {
if err := s.errorHandler(ctx, FederationService_DependentMethod_Post_PostService_GetPost, stat.status.Err()); err != nil {
return nil, grpcfed.NewErrorWithLogAttrs(err, stat.logLevel, grpcfed.LogAttrs(ctx))
}
} else {
if err := s.errorHandler(ctx, FederationService_DependentMethod_Post_PostService_GetPost, err); err != nil {
return nil, grpcfed.NewErrorWithLogAttrs(err, slog.LevelError, grpcfed.LogAttrs(ctx))
}
}
value.SetGRPCError(ret, grpcErr)
}
return ret, nil
},
})
}
/*
def {
name: "post"
autobind: true
by: "res.post"
}
*/
def_post := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[*post.Post, *localValueType]{
Name: `post`,
Type: grpcfed.CELObjectType("post.Post"),
Setter: func(value *localValueType, v *post.Post) error {
value.vars.Post = v
return nil
},
By: `res.post`,
ByCacheIndex: 33,
})
}
/*
def {
name: "code"
if: "res.hasIgnoredError()"
by: "res.ignoredError().code"
}
*/
def_code := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[int64, *localValueType]{
If: `res.hasIgnoredError()`,
IfCacheIndex: 34,
Name: `code`,
Type: grpcfed.CELIntType,
Setter: func(value *localValueType, v int64) error {
value.vars.Code = v
return nil
},
By: `res.ignoredError().code`,
ByCacheIndex: 35,
})
}
// A tree view of message dependencies is shown below.
/*
res ─┐
code ─┐
res ─┐ │
post ─┤
*/
eg, ctx1 := grpcfed.ErrorGroupWithContext(ctx)
grpcfed.GoWithRecover(eg, func() (any, error) {
if err := def_res(ctx1); err != nil {
grpcfed.RecordErrorToSpan(ctx1, err)
return nil, err
}
if err := def_code(ctx1); err != nil {
grpcfed.RecordErrorToSpan(ctx1, err)
return nil, err
}
return nil, nil
})
grpcfed.GoWithRecover(eg, func() (any, error) {
if err := def_res(ctx1); err != nil {
grpcfed.RecordErrorToSpan(ctx1, err)
return nil, err
}
if err := def_post(ctx1); err != nil {
grpcfed.RecordErrorToSpan(ctx1, err)
return nil, err
}
return nil, nil
})
if err := eg.Wait(); err != nil {
return nil, err
}
// assign named parameters to message arguments to pass to the custom resolver.
req.FederationService_Org_Federation_PostVariable.Code = value.vars.Code
req.FederationService_Org_Federation_PostVariable.Id = value.vars.Id
req.FederationService_Org_Federation_PostVariable.LocalizedMsg = value.vars.LocalizedMsg
req.FederationService_Org_Federation_PostVariable.Post = value.vars.Post
req.FederationService_Org_Federation_PostVariable.Res = value.vars.Res
req.FederationService_Org_Federation_PostVariable.XDef0ErrDetail0Msg0 = value.vars.XDef0ErrDetail0Msg0
// create a message value to be returned.
ret := &Post{}
// field binding section.
ret.Id = value.vars.Post.GetId() // { name: "post", autobind: true }
ret.Title = value.vars.Post.GetTitle() // { name: "post", autobind: true }
// (grpc.federation.field).by = "code"
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[int32]{
Value: value,
Expr: `code`,
CacheIndex: 36,
Setter: func(v int32) error {
ret.Code = v
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
grpcfed.Logger(ctx).DebugContext(ctx, "resolved org.federation.Post", slog.Any("org.federation.Post", s.logvalue_Org_Federation_Post(ret)))
return ret, nil
}
// resolve_Org_Federation_Z resolve "org.federation.Z" message.
func (s *FederationService) resolve_Org_Federation_Z(ctx context.Context, req *FederationService_Org_Federation_ZArgument) (*Z, error) {
ctx, span := s.tracer.Start(ctx, "org.federation.Z")
defer span.End()
ctx = grpcfed.WithLogger(ctx, grpcfed.Logger(ctx), grpcfed.LogAttrs(ctx)...)
grpcfed.Logger(ctx).DebugContext(ctx, "resolve org.federation.Z", slog.Any("message_args", s.logvalue_Org_Federation_ZArgument(req)))
type localValueType struct {
*grpcfed.LocalValue
vars struct {
Code int64
}
}
value := &localValueType{LocalValue: grpcfed.NewLocalValue(ctx, s.celEnvOpts, "grpc.federation.private.org.federation.ZArgument", req)}
ctx = grpcfed.WithLocalValue(ctx, value.LocalValue)
/*
def {
name: "code"
by: "$.error_info.code"
}
*/
def_code := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[int64, *localValueType]{
Name: `code`,
Type: grpcfed.CELIntType,
Setter: func(value *localValueType, v int64) error {
value.vars.Code = v
return nil
},
By: `$.error_info.code`,
ByCacheIndex: 37,
})
}
if err := def_code(ctx); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
// assign named parameters to message arguments to pass to the custom resolver.
req.FederationService_Org_Federation_ZVariable.Code = value.vars.Code
// create a message value to be returned.
ret := &Z{}
// field binding section.
// (grpc.federation.field).by = "code"
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[int32]{
Value: value,
Expr: `code`,
CacheIndex: 38,
Setter: func(v int32) error {
ret.Code = v
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
grpcfed.Logger(ctx).DebugContext(ctx, "resolved org.federation.Z", slog.Any("org.federation.Z", s.logvalue_Org_Federation_Z(ret)))
return ret, nil
}
// cast_int64__to__int32 cast from "int64" to "int32".
func (s *FederationService) cast_int64__to__int32(from int64) (int32, error) {
ret, err := grpcfed.Int64ToInt32(from)
if err != nil {
return ret, err
}
return ret, nil
}
func (s *FederationService) logvalue_Grpc_Federation_Private_Error(v *grpcfedcel.Error) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue()
}
func (s *FederationService) logvalue_Org_Federation_CustomMessage(v *CustomMessage) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.String("msg", v.GetMsg()),
)
}
func (s *FederationService) logvalue_Org_Federation_CustomMessageArgument(v *FederationService_Org_Federation_CustomMessageArgument) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.Any("error_info", s.logvalue_Grpc_Federation_Private_Error(v.ErrorInfo)),
)
}
func (s *FederationService) logvalue_Org_Federation_GetPost2Response(v *GetPost2Response) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue()
}
func (s *FederationService) logvalue_Org_Federation_GetPost2ResponseArgument(v *FederationService_Org_Federation_GetPost2ResponseArgument) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.String("id", v.Id),
)
}
func (s *FederationService) logvalue_Org_Federation_GetPostResponse(v *GetPostResponse) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.Any("post", s.logvalue_Org_Federation_Post(v.GetPost())),
)
}
func (s *FederationService) logvalue_Org_Federation_GetPostResponseArgument(v *FederationService_Org_Federation_GetPostResponseArgument) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.String("id", v.Id),
)
}
func (s *FederationService) logvalue_Org_Federation_LocalizedMessage(v *LocalizedMessage) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.String("value", v.GetValue()),
)
}
func (s *FederationService) logvalue_Org_Federation_LocalizedMessageArgument(v *FederationService_Org_Federation_LocalizedMessageArgument) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.String("value", v.Value),
)
}
func (s *FederationService) logvalue_Org_Federation_Post(v *Post) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.String("id", v.GetId()),
slog.String("title", v.GetTitle()),
slog.Int64("code", int64(v.GetCode())),
)
}
func (s *FederationService) logvalue_Org_Federation_PostArgument(v *FederationService_Org_Federation_PostArgument) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.String("id", v.Id),
)
}
func (s *FederationService) logvalue_Org_Federation_Z(v *Z) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.Int64("code", int64(v.GetCode())),
)
}
func (s *FederationService) logvalue_Org_Federation_ZArgument(v *FederationService_Org_Federation_ZArgument) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.Any("error_info", s.logvalue_Grpc_Federation_Private_Error(v.ErrorInfo)),
)
}
func (s *FederationService) logvalue_Post_GetPostRequest(v *post.GetPostRequest) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.String("id", v.GetId()),
)
}
================================================
FILE: _examples/17_error_handler/go.mod
================================================
module example
go 1.24.0
replace github.com/mercari/grpc-federation => ../../
require (
github.com/google/go-cmp v0.7.0
github.com/mercari/grpc-federation v0.0.0-00010101000000-000000000000
go.opentelemetry.io/otel v1.24.0
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.21.0
go.opentelemetry.io/otel/sdk v1.24.0
go.opentelemetry.io/otel/trace v1.24.0
go.uber.org/goleak v1.3.0
google.golang.org/genproto/googleapis/rpc v0.0.0-20240826202546-f6391c0de4c7
google.golang.org/grpc v1.65.0
google.golang.org/protobuf v1.34.2
)
require (
cel.dev/expr v0.19.1 // indirect
github.com/antlr4-go/antlr/v4 v4.13.0 // indirect
github.com/cenkalti/backoff/v4 v4.2.1 // indirect
github.com/go-logr/logr v1.4.1 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
github.com/goccy/wasi-go v0.3.2 // indirect
github.com/google/cel-go v0.23.1 // indirect
github.com/google/uuid v1.6.0 // indirect
github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0 // indirect
github.com/kelseyhightower/envconfig v1.4.0 // indirect
github.com/stealthrocket/wazergo v0.19.1 // indirect
github.com/stoewer/go-strcase v1.3.0 // indirect
github.com/tetratelabs/wazero v1.10.1 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.21.0 // indirect
go.opentelemetry.io/otel/metric v1.24.0 // indirect
go.opentelemetry.io/proto/otlp v1.0.0 // indirect
golang.org/x/exp v0.0.0-20250506013437-ce4c2cf36ca6 // indirect
golang.org/x/net v0.38.0 // indirect
golang.org/x/sync v0.14.0 // indirect
golang.org/x/sys v0.37.0 // indirect
golang.org/x/text v0.23.0 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20240826202546-f6391c0de4c7 // indirect
)
================================================
FILE: _examples/17_error_handler/go.sum
================================================
cel.dev/expr v0.19.1 h1:NciYrtDRIR0lNCnH1LFJegdjspNx9fI59O7TWcua/W4=
cel.dev/expr v0.19.1/go.mod h1:MrpN08Q+lEBs+bGYdLxxHkZoUSsCp0nSKTs0nTymJgw=
github.com/antlr4-go/antlr/v4 v4.13.0 h1:lxCg3LAv+EUK6t1i0y1V6/SLeUi0eKEKdhQAlS8TVTI=
github.com/antlr4-go/antlr/v4 v4.13.0/go.mod h1:pfChB/xh/Unjila75QW7+VU4TSnWnnk9UTnmpPaOR2g=
github.com/cenkalti/backoff/v4 v4.2.1 h1:y4OZtCnogmCPw98Zjyt5a6+QwPLGkiQsYW5oUqylYbM=
github.com/cenkalti/backoff/v4 v4.2.1/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A=
github.com/go-logr/logr v1.4.1 h1:pKouT5E8xu9zeFC39JXRDukb6JFQPXM5p5I91188VAQ=
github.com/go-logr/logr v1.4.1/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY=
github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag=
github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE=
github.com/goccy/wasi-go v0.3.2 h1:wAvGXmqCkfcp0B0AwIp5Ya53hzDwkKm9W8iuT3nCCz0=
github.com/goccy/wasi-go v0.3.2/go.mod h1:nIKD204n9xa4Z20UV+XA483kIr9TAl2vXr+X5qVAO5M=
github.com/golang/glog v1.2.1 h1:OptwRhECazUx5ix5TTWC3EZhsZEHWcYWY4FQHTIubm4=
github.com/golang/glog v1.2.1/go.mod h1:6AhwSGph0fcJtXVM/PEHPqZlFeoLxhs7/t5UDAwmO+w=
github.com/google/cel-go v0.23.1 h1:91ThhEZlBcE5rB2adBVXqvDoqdL8BG2oyhd0bK1I/r4=
github.com/google/cel-go v0.23.1/go.mod h1:52Pb6QsDbC5kvgxvZhiL9QX1oZEkcUF/ZqaPx1J5Wwo=
github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8=
github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU=
github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0 h1:YBftPWNWd4WwGqtY2yeZL2ef8rHAxPBD8KFhJpmcqms=
github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0/go.mod h1:YN5jB8ie0yfIUg6VvR9Kz84aCaG7AsGZnLjhHbUqwPg=
github.com/kelseyhightower/envconfig v1.4.0 h1:Im6hONhd3pLkfDFsbRgu68RDNkGF1r3dvMUtDTo2cv8=
github.com/kelseyhightower/envconfig v1.4.0/go.mod h1:cccZRl6mQpaq41TPp5QxidR+Sa3axMbJDNb//FQX6Gg=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/stealthrocket/wazergo v0.19.1 h1:BPrITETPgSFwiytwmToO0MbUC/+RGC39JScz1JmmG6c=
github.com/stealthrocket/wazergo v0.19.1/go.mod h1:riI0hxw4ndZA5e6z7PesHg2BtTftcZaMxRcoiGGipTs=
github.com/stoewer/go-strcase v1.3.0 h1:g0eASXYtp+yvN9fK8sH94oCIk0fau9uV1/ZdJ0AVEzs=
github.com/stoewer/go-strcase v1.3.0/go.mod h1:fAH5hQ5pehh+j3nZfvwdk2RgEgQjAoM8wodgtPmh1xo=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=
github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo=
github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk=
github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
github.com/tetratelabs/wazero v1.10.1 h1:2DugeJf6VVk58KTPszlNfeeN8AhhpwcZqkJj2wwFuH8=
github.com/tetratelabs/wazero v1.10.1/go.mod h1:DRm5twOQ5Gr1AoEdSi0CLjDQF1J9ZAuyqFIjl1KKfQU=
go.opentelemetry.io/otel v1.24.0 h1:0LAOdjNmQeSTzGBzduGe/rU4tZhMwL5rWgtp9Ku5Jfo=
go.opentelemetry.io/otel v1.24.0/go.mod h1:W7b9Ozg4nkF5tWI5zsXkaKKDjdVjpD4oAt9Qi/MArHo=
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.21.0 h1:cl5P5/GIfFh4t6xyruOgJP5QiA1pw4fYYdv6nc6CBWw=
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.21.0/go.mod h1:zgBdWWAu7oEEMC06MMKc5NLbA/1YDXV1sMpSqEeLQLg=
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.21.0 h1:tIqheXEFWAZ7O8A7m+J0aPTmpJN3YQ7qetUAdkkkKpk=
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.21.0/go.mod h1:nUeKExfxAQVbiVFn32YXpXZZHZ61Cc3s3Rn1pDBGAb0=
go.opentelemetry.io/otel/metric v1.24.0 h1:6EhoGWWK28x1fbpA4tYTOWBkPefTDQnb8WSGXlc88kI=
go.opentelemetry.io/otel/metric v1.24.0/go.mod h1:VYhLe1rFfxuTXLgj4CBiyz+9WYBA8pNGJgDcSFRKBco=
go.opentelemetry.io/otel/sdk v1.24.0 h1:YMPPDNymmQN3ZgczicBY3B6sf9n62Dlj9pWD3ucgoDw=
go.opentelemetry.io/otel/sdk v1.24.0/go.mod h1:KVrIYw6tEubO9E96HQpcmpTKDVn9gdv35HoYiQWGDFg=
go.opentelemetry.io/otel/trace v1.24.0 h1:CsKnnL4dUAr/0llH9FKuc698G04IrpWV0MQA/Y1YELI=
go.opentelemetry.io/otel/trace v1.24.0/go.mod h1:HPc3Xr/cOApsBI154IU0OI0HJexz+aw5uPdbs3UCjNU=
go.opentelemetry.io/proto/otlp v1.0.0 h1:T0TX0tmXU8a3CbNXzEKGeU5mIVOdf0oykP+u2lIVU/I=
go.opentelemetry.io/proto/otlp v1.0.0/go.mod h1:Sy6pihPLfYHkr3NkUbEhGHFhINUSI/v80hjKIs5JXpM=
go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto=
go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE=
golang.org/x/exp v0.0.0-20250506013437-ce4c2cf36ca6 h1:y5zboxd6LQAqYIhHnB48p0ByQ/GnQx2BE33L8BOHQkI=
golang.org/x/exp v0.0.0-20250506013437-ce4c2cf36ca6/go.mod h1:U6Lno4MTRCDY+Ba7aCcauB9T60gsv5s4ralQzP72ZoQ=
golang.org/x/net v0.38.0 h1:vRMAPTMaeGqVhG5QyLJHqNDwecKTomGeqbnfZyKlBI8=
golang.org/x/net v0.38.0/go.mod h1:ivrbrMbzFq5J41QOQh0siUuly180yBYtLp+CKbEaFx8=
golang.org/x/sync v0.14.0 h1:woo0S4Yywslg6hp4eUFjTVOyKt0RookbpAHG4c1HmhQ=
golang.org/x/sync v0.14.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA=
golang.org/x/sys v0.37.0 h1:fdNQudmxPjkdUTPnLn5mdQv7Zwvbvpaxqs831goi9kQ=
golang.org/x/sys v0.37.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks=
golang.org/x/text v0.23.0 h1:D71I7dUrlY+VX0gQShAThNGHFxZ13dGLBHQLVl1mJlY=
golang.org/x/text v0.23.0/go.mod h1:/BLNzu4aZCJ1+kcD0DNRotWKage4q2rGVAg4o22unh4=
google.golang.org/genproto/googleapis/api v0.0.0-20240826202546-f6391c0de4c7 h1:YcyjlL1PRr2Q17/I0dPk2JmYS5CDXfcdb2Z3YRioEbw=
google.golang.org/genproto/googleapis/api v0.0.0-20240826202546-f6391c0de4c7/go.mod h1:OCdP9MfskevB/rbYvHTsXTtKC+3bHWajPdoKgjcYkfo=
google.golang.org/genproto/googleapis/rpc v0.0.0-20240826202546-f6391c0de4c7 h1:2035KHhUv+EpyB+hWgJnaWKJOdX1E95w2S8Rr4uWKTs=
google.golang.org/genproto/googleapis/rpc v0.0.0-20240826202546-f6391c0de4c7/go.mod h1:UqMtugtsSgubUsoxbuAoiCXvqvErP7Gf0so0mK9tHxU=
google.golang.org/grpc v1.65.0 h1:bs/cUb4lp1G5iImFFd3u5ixQzweKizoZJAwBNLR42lc=
google.golang.org/grpc v1.65.0/go.mod h1:WgYC2ypjlB0EiQi6wdKixMqukr6lBc0Vo+oOgjrM5ZQ=
google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg=
google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
================================================
FILE: _examples/17_error_handler/grpc/federation/federation.pb.go
================================================
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.33.0
// protoc (unknown)
// source: grpc/federation/federation.proto
package federation
import (
_ "github.com/mercari/grpc-federation/grpc/federation/cel"
code "google.golang.org/genproto/googleapis/rpc/code"
errdetails "google.golang.org/genproto/googleapis/rpc/errdetails"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
descriptorpb "google.golang.org/protobuf/types/descriptorpb"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
// TypeKind is primitive kind list.
type TypeKind int32
const (
// UNKNOWN represents unexpected value.
TypeKind_UNKNOWN TypeKind = 0
// STRING is used to convert the input value to `string` type.
TypeKind_STRING TypeKind = 1
// BOOL is used to convert the input value to `bool` type.
TypeKind_BOOL TypeKind = 2
// INT64 is used to convert the input value to `int64` type.
TypeKind_INT64 TypeKind = 3
// UINT64 is used to convert the input value to `uint64` type.
TypeKind_UINT64 TypeKind = 4
// DOUBLE is used to convert the input value to `double` type.
TypeKind_DOUBLE TypeKind = 5
// DURATION is used to convert the input value to the `google.protobuf.Duration` type.
TypeKind_DURATION TypeKind = 6
)
// Enum value maps for TypeKind.
var (
TypeKind_name = map[int32]string{
0: "UNKNOWN",
1: "STRING",
2: "BOOL",
3: "INT64",
4: "UINT64",
5: "DOUBLE",
6: "DURATION",
}
TypeKind_value = map[string]int32{
"UNKNOWN": 0,
"STRING": 1,
"BOOL": 2,
"INT64": 3,
"UINT64": 4,
"DOUBLE": 5,
"DURATION": 6,
}
)
func (x TypeKind) Enum() *TypeKind {
p := new(TypeKind)
*p = x
return p
}
func (x TypeKind) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (TypeKind) Descriptor() protoreflect.EnumDescriptor {
return file_grpc_federation_federation_proto_enumTypes[0].Descriptor()
}
func (TypeKind) Type() protoreflect.EnumType {
return &file_grpc_federation_federation_proto_enumTypes[0]
}
func (x TypeKind) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use TypeKind.Descriptor instead.
func (TypeKind) EnumDescriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{0}
}
// LogLevel is the importance or severity of a log event.
type GRPCError_LogLevel int32
const (
// UNKNOWN represents unexpected value.
GRPCError_UNKNOWN GRPCError_LogLevel = 0
// DEBUG is used for detailed information that is useful during development and debugging.
GRPCError_DEBUG GRPCError_LogLevel = 1
// INFO logs are used to provide information about the normal functioning of the application.
GRPCError_INFO GRPCError_LogLevel = 2
// WARN signifies a potential problem or warning that does not necessarily stop the program from working but may lead to issues in the future.
GRPCError_WARN GRPCError_LogLevel = 3
// ERROR indicates a serious issue that has caused a failure in the application.
GRPCError_ERROR GRPCError_LogLevel = 4
)
// Enum value maps for GRPCError_LogLevel.
var (
GRPCError_LogLevel_name = map[int32]string{
0: "UNKNOWN",
1: "DEBUG",
2: "INFO",
3: "WARN",
4: "ERROR",
}
GRPCError_LogLevel_value = map[string]int32{
"UNKNOWN": 0,
"DEBUG": 1,
"INFO": 2,
"WARN": 3,
"ERROR": 4,
}
)
func (x GRPCError_LogLevel) Enum() *GRPCError_LogLevel {
p := new(GRPCError_LogLevel)
*p = x
return p
}
func (x GRPCError_LogLevel) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (GRPCError_LogLevel) Descriptor() protoreflect.EnumDescriptor {
return file_grpc_federation_federation_proto_enumTypes[1].Descriptor()
}
func (GRPCError_LogLevel) Type() protoreflect.EnumType {
return &file_grpc_federation_federation_proto_enumTypes[1]
}
func (x GRPCError_LogLevel) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use GRPCError_LogLevel.Descriptor instead.
func (GRPCError_LogLevel) EnumDescriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{24, 0}
}
type FileRule struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Plugin *CELPlugin `protobuf:"bytes,1,opt,name=plugin,proto3" json:"plugin,omitempty"`
// import can be used to resolve methods, messages, etc. that are referenced in gRPC Federation rules.
Import []string `protobuf:"bytes,2,rep,name=import,proto3" json:"import,omitempty"`
}
func (x *FileRule) Reset() {
*x = FileRule{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *FileRule) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*FileRule) ProtoMessage() {}
func (x *FileRule) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use FileRule.ProtoReflect.Descriptor instead.
func (*FileRule) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{0}
}
func (x *FileRule) GetPlugin() *CELPlugin {
if x != nil {
return x.Plugin
}
return nil
}
func (x *FileRule) GetImport() []string {
if x != nil {
return x.Import
}
return nil
}
type EnumRule struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// alias mapping between enums defined in other packages and enums defined on the federation service side.
// The alias is the FQDN ( . ) to the enum.
// If this definition exists, type conversion is automatically performed before the enum value assignment operation.
// If a enum with this option has a value that is not present in the enum specified by alias, and the alias option is not specified for that value, an error is occurred.
// You can specify multiple aliases. In that case, only values common to all aliases will be considered.
// Specifying a value that is not included in either alias will result in an error.
Alias []string `protobuf:"bytes,1,rep,name=alias,proto3" json:"alias,omitempty"`
}
func (x *EnumRule) Reset() {
*x = EnumRule{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *EnumRule) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*EnumRule) ProtoMessage() {}
func (x *EnumRule) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use EnumRule.ProtoReflect.Descriptor instead.
func (*EnumRule) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{1}
}
func (x *EnumRule) GetAlias() []string {
if x != nil {
return x.Alias
}
return nil
}
type EnumValueRule struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// specifies the default value of the enum.
// All values other than those specified in alias will be default values.
Default *bool `protobuf:"varint,1,opt,name=default,proto3,oneof" json:"default,omitempty"`
// alias can be used when alias is specified in grpc.federation.enum option,
// and specifies the value name to be referenced among the enums specified in alias of enum option.
// multiple value names can be specified for alias.
Alias []string `protobuf:"bytes,2,rep,name=alias,proto3" json:"alias,omitempty"`
// attr is used to hold multiple name-value pairs corresponding to an enum value.
// The values specified by the name must be consistently specified for all enum values.
// The values stored using this feature can be retrieved using the `attr()` method of the enum API.
Attr []*EnumValueAttribute `protobuf:"bytes,3,rep,name=attr,proto3" json:"attr,omitempty"`
// noalias exclude from the target of alias.
// This option cannot be specified simultaneously with `default` or `alias`.
Noalias *bool `protobuf:"varint,4,opt,name=noalias,proto3,oneof" json:"noalias,omitempty"`
}
func (x *EnumValueRule) Reset() {
*x = EnumValueRule{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *EnumValueRule) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*EnumValueRule) ProtoMessage() {}
func (x *EnumValueRule) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use EnumValueRule.ProtoReflect.Descriptor instead.
func (*EnumValueRule) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{2}
}
func (x *EnumValueRule) GetDefault() bool {
if x != nil && x.Default != nil {
return *x.Default
}
return false
}
func (x *EnumValueRule) GetAlias() []string {
if x != nil {
return x.Alias
}
return nil
}
func (x *EnumValueRule) GetAttr() []*EnumValueAttribute {
if x != nil {
return x.Attr
}
return nil
}
func (x *EnumValueRule) GetNoalias() bool {
if x != nil && x.Noalias != nil {
return *x.Noalias
}
return false
}
type EnumValueAttribute struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// name is the attribute key.
// This value is used to search for values using the `attr()` method.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// value represents the value corresponding to `name`.
Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
}
func (x *EnumValueAttribute) Reset() {
*x = EnumValueAttribute{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *EnumValueAttribute) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*EnumValueAttribute) ProtoMessage() {}
func (x *EnumValueAttribute) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[3]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use EnumValueAttribute.ProtoReflect.Descriptor instead.
func (*EnumValueAttribute) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{3}
}
func (x *EnumValueAttribute) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *EnumValueAttribute) GetValue() string {
if x != nil {
return x.Value
}
return ""
}
type OneofRule struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
}
func (x *OneofRule) Reset() {
*x = OneofRule{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *OneofRule) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*OneofRule) ProtoMessage() {}
func (x *OneofRule) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[4]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use OneofRule.ProtoReflect.Descriptor instead.
func (*OneofRule) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{4}
}
// ServiceRule define gRPC Federation rules for the service.
type ServiceRule struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// env defines the environment variable.
Env *Env `protobuf:"bytes,1,opt,name=env,proto3" json:"env,omitempty"`
// var defines the service-level variables.
Var []*ServiceVariable `protobuf:"bytes,2,rep,name=var,proto3" json:"var,omitempty"`
}
func (x *ServiceRule) Reset() {
*x = ServiceRule{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[5]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ServiceRule) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ServiceRule) ProtoMessage() {}
func (x *ServiceRule) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[5]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ServiceRule.ProtoReflect.Descriptor instead.
func (*ServiceRule) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{5}
}
func (x *ServiceRule) GetEnv() *Env {
if x != nil {
return x.Env
}
return nil
}
func (x *ServiceRule) GetVar() []*ServiceVariable {
if x != nil {
return x.Var
}
return nil
}
// Env is used when setting environment variables.
// There are two ways to configure it.
type Env struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// var is used to directly list environment variables.
Var []*EnvVar `protobuf:"bytes,1,rep,name=var,proto3" json:"var,omitempty"`
// message is used to reference an already defined Protocol Buffers' message for defining environment variables.
// If you want to set detailed options for the fields of the message, use the `env` option in FieldRule.
Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
}
func (x *Env) Reset() {
*x = Env{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[6]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Env) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Env) ProtoMessage() {}
func (x *Env) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[6]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Env.ProtoReflect.Descriptor instead.
func (*Env) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{6}
}
func (x *Env) GetVar() []*EnvVar {
if x != nil {
return x.Var
}
return nil
}
func (x *Env) GetMessage() string {
if x != nil {
return x.Message
}
return ""
}
// ServiceVariable define variables at the service level.
// This definition is executed at server startup, after the initialization of Env.
// The defined variables can be used across all messages that the service depends on.
type ServiceVariable struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// name is a variable name.
// This name can be referenced in all CELs related to the service by using `grpc.federation.var.` prefix.
Name *string `protobuf:"bytes,1,opt,name=name,proto3,oneof" json:"name,omitempty"`
// if specify the condition for evaluating expr.
// this value evaluated by CEL and it must return a boolean value.
// If the result of evaluation is `false`, the value assigned to name is the default value of the result of evaluation of `expr`.
If *string `protobuf:"bytes,2,opt,name=if,proto3,oneof" json:"if,omitempty"`
// expr specify the value to be assigned to name.
//
// Types that are assignable to Expr:
//
// *ServiceVariable_By
// *ServiceVariable_Map
// *ServiceVariable_Message
// *ServiceVariable_Validation
// *ServiceVariable_Enum
// *ServiceVariable_Switch
Expr isServiceVariable_Expr `protobuf_oneof:"expr"`
}
func (x *ServiceVariable) Reset() {
*x = ServiceVariable{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[7]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ServiceVariable) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ServiceVariable) ProtoMessage() {}
func (x *ServiceVariable) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[7]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ServiceVariable.ProtoReflect.Descriptor instead.
func (*ServiceVariable) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{7}
}
func (x *ServiceVariable) GetName() string {
if x != nil && x.Name != nil {
return *x.Name
}
return ""
}
func (x *ServiceVariable) GetIf() string {
if x != nil && x.If != nil {
return *x.If
}
return ""
}
func (m *ServiceVariable) GetExpr() isServiceVariable_Expr {
if m != nil {
return m.Expr
}
return nil
}
func (x *ServiceVariable) GetBy() string {
if x, ok := x.GetExpr().(*ServiceVariable_By); ok {
return x.By
}
return ""
}
func (x *ServiceVariable) GetMap() *MapExpr {
if x, ok := x.GetExpr().(*ServiceVariable_Map); ok {
return x.Map
}
return nil
}
func (x *ServiceVariable) GetMessage() *MessageExpr {
if x, ok := x.GetExpr().(*ServiceVariable_Message); ok {
return x.Message
}
return nil
}
func (x *ServiceVariable) GetValidation() *ServiceVariableValidationExpr {
if x, ok := x.GetExpr().(*ServiceVariable_Validation); ok {
return x.Validation
}
return nil
}
func (x *ServiceVariable) GetEnum() *EnumExpr {
if x, ok := x.GetExpr().(*ServiceVariable_Enum); ok {
return x.Enum
}
return nil
}
func (x *ServiceVariable) GetSwitch() *SwitchExpr {
if x, ok := x.GetExpr().(*ServiceVariable_Switch); ok {
return x.Switch
}
return nil
}
type isServiceVariable_Expr interface {
isServiceVariable_Expr()
}
type ServiceVariable_By struct {
// `by` evaluates with CEL.
By string `protobuf:"bytes,11,opt,name=by,proto3,oneof"`
}
type ServiceVariable_Map struct {
// map apply map operation for the specified repeated type.
Map *MapExpr `protobuf:"bytes,12,opt,name=map,proto3,oneof"`
}
type ServiceVariable_Message struct {
// message gets with message arguments.
Message *MessageExpr `protobuf:"bytes,13,opt,name=message,proto3,oneof"`
}
type ServiceVariable_Validation struct {
// validation defines the validation rule and message.
Validation *ServiceVariableValidationExpr `protobuf:"bytes,14,opt,name=validation,proto3,oneof"`
}
type ServiceVariable_Enum struct {
// enum gets with cel value.
Enum *EnumExpr `protobuf:"bytes,15,opt,name=enum,proto3,oneof"`
}
type ServiceVariable_Switch struct {
// switch provides conditional evaluation with multiple branches.
Switch *SwitchExpr `protobuf:"bytes,16,opt,name=switch,proto3,oneof"`
}
func (*ServiceVariable_By) isServiceVariable_Expr() {}
func (*ServiceVariable_Map) isServiceVariable_Expr() {}
func (*ServiceVariable_Message) isServiceVariable_Expr() {}
func (*ServiceVariable_Validation) isServiceVariable_Expr() {}
func (*ServiceVariable_Enum) isServiceVariable_Expr() {}
func (*ServiceVariable_Switch) isServiceVariable_Expr() {}
// ServiceVariableValidationExpr represents validation rule and error message.
type ServiceVariableValidationExpr struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// if specifies condition in CEL. If the condition is true, it returns error.
// The return value must always be of type boolean.
If string `protobuf:"bytes,1,opt,name=if,proto3" json:"if,omitempty"`
// message is a error message in CEL.
Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
}
func (x *ServiceVariableValidationExpr) Reset() {
*x = ServiceVariableValidationExpr{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[8]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ServiceVariableValidationExpr) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ServiceVariableValidationExpr) ProtoMessage() {}
func (x *ServiceVariableValidationExpr) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[8]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ServiceVariableValidationExpr.ProtoReflect.Descriptor instead.
func (*ServiceVariableValidationExpr) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{8}
}
func (x *ServiceVariableValidationExpr) GetIf() string {
if x != nil {
return x.If
}
return ""
}
func (x *ServiceVariableValidationExpr) GetMessage() string {
if x != nil {
return x.Message
}
return ""
}
// EnvVar represents an environment variable.
type EnvVar struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// name is an environment variable name.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// type is an environment variable type.
Type *EnvType `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"`
// option is an additional option for parsing environment variable.
Option *EnvVarOption `protobuf:"bytes,3,opt,name=option,proto3,oneof" json:"option,omitempty"`
}
func (x *EnvVar) Reset() {
*x = EnvVar{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[9]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *EnvVar) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*EnvVar) ProtoMessage() {}
func (x *EnvVar) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[9]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use EnvVar.ProtoReflect.Descriptor instead.
func (*EnvVar) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{9}
}
func (x *EnvVar) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *EnvVar) GetType() *EnvType {
if x != nil {
return x.Type
}
return nil
}
func (x *EnvVar) GetOption() *EnvVarOption {
if x != nil {
return x.Option
}
return nil
}
// EnvType represents type information for environment variable.
type EnvType struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Types that are assignable to Type:
//
// *EnvType_Kind
// *EnvType_Repeated
// *EnvType_Map
Type isEnvType_Type `protobuf_oneof:"type"`
}
func (x *EnvType) Reset() {
*x = EnvType{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[10]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *EnvType) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*EnvType) ProtoMessage() {}
func (x *EnvType) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[10]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use EnvType.ProtoReflect.Descriptor instead.
func (*EnvType) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{10}
}
func (m *EnvType) GetType() isEnvType_Type {
if m != nil {
return m.Type
}
return nil
}
func (x *EnvType) GetKind() TypeKind {
if x, ok := x.GetType().(*EnvType_Kind); ok {
return x.Kind
}
return TypeKind_UNKNOWN
}
func (x *EnvType) GetRepeated() *EnvType {
if x, ok := x.GetType().(*EnvType_Repeated); ok {
return x.Repeated
}
return nil
}
func (x *EnvType) GetMap() *EnvMapType {
if x, ok := x.GetType().(*EnvType_Map); ok {
return x.Map
}
return nil
}
type isEnvType_Type interface {
isEnvType_Type()
}
type EnvType_Kind struct {
// kind is used when the type is a primitive type.
Kind TypeKind `protobuf:"varint,1,opt,name=kind,proto3,enum=grpc.federation.TypeKind,oneof"`
}
type EnvType_Repeated struct {
// repeated is used when the type is a repeated type.
Repeated *EnvType `protobuf:"bytes,2,opt,name=repeated,proto3,oneof"`
}
type EnvType_Map struct {
// map is used when the type is a map type.
Map *EnvMapType `protobuf:"bytes,3,opt,name=map,proto3,oneof"`
}
func (*EnvType_Kind) isEnvType_Type() {}
func (*EnvType_Repeated) isEnvType_Type() {}
func (*EnvType_Map) isEnvType_Type() {}
// EnvMapType represents map type.
type EnvMapType struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// key represents map's key type.
Key *EnvType `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
// value represents map's value type.
Value *EnvType `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
}
func (x *EnvMapType) Reset() {
*x = EnvMapType{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[11]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *EnvMapType) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*EnvMapType) ProtoMessage() {}
func (x *EnvMapType) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[11]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use EnvMapType.ProtoReflect.Descriptor instead.
func (*EnvMapType) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{11}
}
func (x *EnvMapType) GetKey() *EnvType {
if x != nil {
return x.Key
}
return nil
}
func (x *EnvMapType) GetValue() *EnvType {
if x != nil {
return x.Value
}
return nil
}
// EnvVarOption represents additional option for environment variable.
// The option work with the `envconfig` library in Go language.
// For detailed specifications, please refer to the library's documentation ( https://pkg.go.dev/github.com/kelseyhightower/envconfig#section-readme ).
type EnvVarOption struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// alternate use this option if you want to use an environment variable with a different name than the value specified in `EnvVar.name`.
Alternate *string `protobuf:"bytes,1,opt,name=alternate,proto3,oneof" json:"alternate,omitempty"`
// default specify the value to use as a fallback if the specified environment variable is not found.
Default *string `protobuf:"bytes,2,opt,name=default,proto3,oneof" json:"default,omitempty"`
// required require the environment variable to exist.
// If it does not exist, an error will occur at startup.
Required *bool `protobuf:"varint,3,opt,name=required,proto3,oneof" json:"required,omitempty"`
// ignored if ignored is true, it does nothing even if the environment variable exists.
Ignored *bool `protobuf:"varint,4,opt,name=ignored,proto3,oneof" json:"ignored,omitempty"`
}
func (x *EnvVarOption) Reset() {
*x = EnvVarOption{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[12]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *EnvVarOption) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*EnvVarOption) ProtoMessage() {}
func (x *EnvVarOption) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[12]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use EnvVarOption.ProtoReflect.Descriptor instead.
func (*EnvVarOption) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{12}
}
func (x *EnvVarOption) GetAlternate() string {
if x != nil && x.Alternate != nil {
return *x.Alternate
}
return ""
}
func (x *EnvVarOption) GetDefault() string {
if x != nil && x.Default != nil {
return *x.Default
}
return ""
}
func (x *EnvVarOption) GetRequired() bool {
if x != nil && x.Required != nil {
return *x.Required
}
return false
}
func (x *EnvVarOption) GetIgnored() bool {
if x != nil && x.Ignored != nil {
return *x.Ignored
}
return false
}
type MethodRule struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// the time to timeout. If the specified time period elapses, DEADLINE_EXCEEDED status is returned.
// If you want to handle this error, you need to implement a custom error handler in Go.
// The format is the same as Go's time.Duration format. See https://pkg.go.dev/time#ParseDuration.
Timeout *string `protobuf:"bytes,1,opt,name=timeout,proto3,oneof" json:"timeout,omitempty"`
// response specify the name of the message you want to use to create the response value.
// If you specify a reserved type like `google.protobuf.Empty` as the response, you cannot define gRPC Federation options.
// In such cases, you can specify a separate message to create the response value.
// The specified response message must contain fields with the same names and types as all the fields in the original response.
Response *string `protobuf:"bytes,2,opt,name=response,proto3,oneof" json:"response,omitempty"`
}
func (x *MethodRule) Reset() {
*x = MethodRule{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[13]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *MethodRule) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*MethodRule) ProtoMessage() {}
func (x *MethodRule) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[13]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use MethodRule.ProtoReflect.Descriptor instead.
func (*MethodRule) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{13}
}
func (x *MethodRule) GetTimeout() string {
if x != nil && x.Timeout != nil {
return *x.Timeout
}
return ""
}
func (x *MethodRule) GetResponse() string {
if x != nil && x.Response != nil {
return *x.Response
}
return ""
}
// MessageRule define gRPC Federation rules for the message.
type MessageRule struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// def specify variables to be used in field binding by `grpc.federation.field` option.
Def []*VariableDefinition `protobuf:"bytes,1,rep,name=def,proto3" json:"def,omitempty"`
// if custom_resolver is true, the resolver for this message is implemented by Go.
// If there are any values retrieved by resolver or messages, they are passed as arguments for custom resolver.
// Each field of the message returned by the custom resolver is automatically bound.
// If you want to change the binding process for a particular field, set `custom_resolver=true` option for that field.
CustomResolver *bool `protobuf:"varint,2,opt,name=custom_resolver,json=customResolver,proto3,oneof" json:"custom_resolver,omitempty"`
// alias mapping between messages defined in other packages and messages defined on the federation service side.
// The alias is the FQDN ( . ) to the message.
// If this definition exists, type conversion is automatically performed before the field assignment operation.
// If a message with this option has a field that is not present in the message specified by alias, and the alias option is not specified for that field, an error is occurred.
// You can specify multiple aliases. In that case, only fields common to all aliases will be considered.
// Specifying a field that is not included in either alias will result in an error.
Alias []string `protobuf:"bytes,3,rep,name=alias,proto3" json:"alias,omitempty"`
}
func (x *MessageRule) Reset() {
*x = MessageRule{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[14]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *MessageRule) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*MessageRule) ProtoMessage() {}
func (x *MessageRule) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[14]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use MessageRule.ProtoReflect.Descriptor instead.
func (*MessageRule) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{14}
}
func (x *MessageRule) GetDef() []*VariableDefinition {
if x != nil {
return x.Def
}
return nil
}
func (x *MessageRule) GetCustomResolver() bool {
if x != nil && x.CustomResolver != nil {
return *x.CustomResolver
}
return false
}
func (x *MessageRule) GetAlias() []string {
if x != nil {
return x.Alias
}
return nil
}
// VariableDefinition represents variable definition.
type VariableDefinition struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// name is a variable name.
// This name can be referenced in all CELs defined after itself in the same message.
// It can also be referenced in `grpc.federation.field` option.
Name *string `protobuf:"bytes,1,opt,name=name,proto3,oneof" json:"name,omitempty"`
// if specify the condition for evaluating expr.
// this value evaluated by CEL and it must return a boolean value.
// If the result of evaluation is `false`, the value assigned to name is the default value of the result of evaluation of `expr`.
If *string `protobuf:"bytes,2,opt,name=if,proto3,oneof" json:"if,omitempty"`
// autobind if the result value of `expr` is a message type,
// the value of a field with the same name and type as the field name of its own message is automatically assigned to the value of the field in the message.
// If multiple autobinds are used at the same message,
// you must explicitly use the `grpc.federation.field` option to do the binding yourself, since duplicate field names cannot be correctly determined as one.
Autobind *bool `protobuf:"varint,3,opt,name=autobind,proto3,oneof" json:"autobind,omitempty"`
// expr specify the value to be assigned to name.
//
// Types that are assignable to Expr:
//
// *VariableDefinition_By
// *VariableDefinition_Map
// *VariableDefinition_Message
// *VariableDefinition_Call
// *VariableDefinition_Validation
// *VariableDefinition_Enum
// *VariableDefinition_Switch
Expr isVariableDefinition_Expr `protobuf_oneof:"expr"`
}
func (x *VariableDefinition) Reset() {
*x = VariableDefinition{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[15]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *VariableDefinition) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*VariableDefinition) ProtoMessage() {}
func (x *VariableDefinition) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[15]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use VariableDefinition.ProtoReflect.Descriptor instead.
func (*VariableDefinition) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{15}
}
func (x *VariableDefinition) GetName() string {
if x != nil && x.Name != nil {
return *x.Name
}
return ""
}
func (x *VariableDefinition) GetIf() string {
if x != nil && x.If != nil {
return *x.If
}
return ""
}
func (x *VariableDefinition) GetAutobind() bool {
if x != nil && x.Autobind != nil {
return *x.Autobind
}
return false
}
func (m *VariableDefinition) GetExpr() isVariableDefinition_Expr {
if m != nil {
return m.Expr
}
return nil
}
func (x *VariableDefinition) GetBy() string {
if x, ok := x.GetExpr().(*VariableDefinition_By); ok {
return x.By
}
return ""
}
func (x *VariableDefinition) GetMap() *MapExpr {
if x, ok := x.GetExpr().(*VariableDefinition_Map); ok {
return x.Map
}
return nil
}
func (x *VariableDefinition) GetMessage() *MessageExpr {
if x, ok := x.GetExpr().(*VariableDefinition_Message); ok {
return x.Message
}
return nil
}
func (x *VariableDefinition) GetCall() *CallExpr {
if x, ok := x.GetExpr().(*VariableDefinition_Call); ok {
return x.Call
}
return nil
}
func (x *VariableDefinition) GetValidation() *ValidationExpr {
if x, ok := x.GetExpr().(*VariableDefinition_Validation); ok {
return x.Validation
}
return nil
}
func (x *VariableDefinition) GetEnum() *EnumExpr {
if x, ok := x.GetExpr().(*VariableDefinition_Enum); ok {
return x.Enum
}
return nil
}
func (x *VariableDefinition) GetSwitch() *SwitchExpr {
if x, ok := x.GetExpr().(*VariableDefinition_Switch); ok {
return x.Switch
}
return nil
}
type isVariableDefinition_Expr interface {
isVariableDefinition_Expr()
}
type VariableDefinition_By struct {
// `by` evaluates with CEL.
By string `protobuf:"bytes,11,opt,name=by,proto3,oneof"`
}
type VariableDefinition_Map struct {
// map apply map operation for the specified repeated type.
Map *MapExpr `protobuf:"bytes,12,opt,name=map,proto3,oneof"`
}
type VariableDefinition_Message struct {
// message gets with message arguments.
Message *MessageExpr `protobuf:"bytes,13,opt,name=message,proto3,oneof"`
}
type VariableDefinition_Call struct {
// call specifies how to call gRPC method.
Call *CallExpr `protobuf:"bytes,14,opt,name=call,proto3,oneof"`
}
type VariableDefinition_Validation struct {
// validation defines the validation rule and error.
Validation *ValidationExpr `protobuf:"bytes,15,opt,name=validation,proto3,oneof"`
}
type VariableDefinition_Enum struct {
// enum gets with cel value.
Enum *EnumExpr `protobuf:"bytes,16,opt,name=enum,proto3,oneof"`
}
type VariableDefinition_Switch struct {
// switch provides conditional evaluation with multiple branches.
Switch *SwitchExpr `protobuf:"bytes,17,opt,name=switch,proto3,oneof"`
}
func (*VariableDefinition_By) isVariableDefinition_Expr() {}
func (*VariableDefinition_Map) isVariableDefinition_Expr() {}
func (*VariableDefinition_Message) isVariableDefinition_Expr() {}
func (*VariableDefinition_Call) isVariableDefinition_Expr() {}
func (*VariableDefinition_Validation) isVariableDefinition_Expr() {}
func (*VariableDefinition_Enum) isVariableDefinition_Expr() {}
func (*VariableDefinition_Switch) isVariableDefinition_Expr() {}
// MapExpr apply map operation for the specified repeated type.
type MapExpr struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// iterator define iterator variable.
// When evaluating CEL in `expr`, we can refer to the name defined in iterator.
Iterator *Iterator `protobuf:"bytes,1,opt,name=iterator,proto3" json:"iterator,omitempty"`
// expr creates map elements using iterator variable.
//
// Types that are assignable to Expr:
//
// *MapExpr_By
// *MapExpr_Message
// *MapExpr_Enum
Expr isMapExpr_Expr `protobuf_oneof:"expr"`
}
func (x *MapExpr) Reset() {
*x = MapExpr{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[16]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *MapExpr) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*MapExpr) ProtoMessage() {}
func (x *MapExpr) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[16]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use MapExpr.ProtoReflect.Descriptor instead.
func (*MapExpr) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{16}
}
func (x *MapExpr) GetIterator() *Iterator {
if x != nil {
return x.Iterator
}
return nil
}
func (m *MapExpr) GetExpr() isMapExpr_Expr {
if m != nil {
return m.Expr
}
return nil
}
func (x *MapExpr) GetBy() string {
if x, ok := x.GetExpr().(*MapExpr_By); ok {
return x.By
}
return ""
}
func (x *MapExpr) GetMessage() *MessageExpr {
if x, ok := x.GetExpr().(*MapExpr_Message); ok {
return x.Message
}
return nil
}
func (x *MapExpr) GetEnum() *EnumExpr {
if x, ok := x.GetExpr().(*MapExpr_Enum); ok {
return x.Enum
}
return nil
}
type isMapExpr_Expr interface {
isMapExpr_Expr()
}
type MapExpr_By struct {
// `by` evaluates with CEL.
// this can refer to the variable declared by `iterator`.
By string `protobuf:"bytes,11,opt,name=by,proto3,oneof"`
}
type MapExpr_Message struct {
// message gets with message arguments, and it is made an element of the map.
// The result type of MapExpr is the repeated type of the specified message.
Message *MessageExpr `protobuf:"bytes,12,opt,name=message,proto3,oneof"`
}
type MapExpr_Enum struct {
// enum creates enum value for each element of the map.
// The result type of MapExpr is the repeated type of the specified enum.
Enum *EnumExpr `protobuf:"bytes,13,opt,name=enum,proto3,oneof"`
}
func (*MapExpr_By) isMapExpr_Expr() {}
func (*MapExpr_Message) isMapExpr_Expr() {}
func (*MapExpr_Enum) isMapExpr_Expr() {}
// Iterator represents iterator variable.
type Iterator struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// variable name.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// src the value that will be the source for creating the iterator.
// src must be a repeated type.
Src string `protobuf:"bytes,2,opt,name=src,proto3" json:"src,omitempty"`
}
func (x *Iterator) Reset() {
*x = Iterator{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[17]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Iterator) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Iterator) ProtoMessage() {}
func (x *Iterator) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[17]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Iterator.ProtoReflect.Descriptor instead.
func (*Iterator) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{17}
}
func (x *Iterator) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *Iterator) GetSrc() string {
if x != nil {
return x.Src
}
return ""
}
// MessageExpr represents dependent message.
type MessageExpr struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// name specify the message name by FQDN. format is `.`.
// can be omitted when referring to messages in the same package.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// args specify the parameters needed to get the message. This is called the "message arguments".
Args []*Argument `protobuf:"bytes,2,rep,name=args,proto3" json:"args,omitempty"`
}
func (x *MessageExpr) Reset() {
*x = MessageExpr{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[18]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *MessageExpr) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*MessageExpr) ProtoMessage() {}
func (x *MessageExpr) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[18]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use MessageExpr.ProtoReflect.Descriptor instead.
func (*MessageExpr) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{18}
}
func (x *MessageExpr) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *MessageExpr) GetArgs() []*Argument {
if x != nil {
return x.Args
}
return nil
}
// EnumExpr represents dependent enum.
type EnumExpr struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// name specify the enum name by FQDN. format is `.`.
// can be omitted when referring to enum in the same package.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// `by` evaluates with CEL.
By string `protobuf:"bytes,2,opt,name=by,proto3" json:"by,omitempty"`
}
func (x *EnumExpr) Reset() {
*x = EnumExpr{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[19]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *EnumExpr) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*EnumExpr) ProtoMessage() {}
func (x *EnumExpr) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[19]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use EnumExpr.ProtoReflect.Descriptor instead.
func (*EnumExpr) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{19}
}
func (x *EnumExpr) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *EnumExpr) GetBy() string {
if x != nil {
return x.By
}
return ""
}
// CallExpr represents how to call gRPC method.
type CallExpr struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// method specify the FQDN for the gRPC method. format is `./`.
Method string `protobuf:"bytes,1,opt,name=method,proto3" json:"method,omitempty"`
// request specify request parameters for the gRPC method.
Request []*MethodRequest `protobuf:"bytes,2,rep,name=request,proto3" json:"request,omitempty"`
// the time to timeout. If the specified time period elapses, DEADLINE_EXCEEDED status is returned.
// If you want to handle this error, you need to implement a custom error handler in Go.
// The format is the same as Go's time.Duration format. See https://pkg.go.dev/time#ParseDuration.
Timeout *string `protobuf:"bytes,3,opt,name=timeout,proto3,oneof" json:"timeout,omitempty"`
// retry specifies the retry policy if the method call fails.
Retry *RetryPolicy `protobuf:"bytes,4,opt,name=retry,proto3,oneof" json:"retry,omitempty"`
// error evaluated when an error occurs during a method call.
// Multiple errors can be defined and are evaluated in the order in which they are described.
// If an error occurs while creating an gRPC status error, original error will be returned.
Error []*GRPCError `protobuf:"bytes,5,rep,name=error,proto3" json:"error,omitempty"`
// option is the gRPC's call option (https://pkg.go.dev/google.golang.org/grpc#CallOption).
Option *GRPCCallOption `protobuf:"bytes,6,opt,name=option,proto3,oneof" json:"option,omitempty"`
// metadata specify outgoing metadata with CEL value.
// The specified type must always be of type map.
Metadata *string `protobuf:"bytes,7,opt,name=metadata,proto3,oneof" json:"metadata,omitempty"`
}
func (x *CallExpr) Reset() {
*x = CallExpr{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[20]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *CallExpr) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CallExpr) ProtoMessage() {}
func (x *CallExpr) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[20]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use CallExpr.ProtoReflect.Descriptor instead.
func (*CallExpr) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{20}
}
func (x *CallExpr) GetMethod() string {
if x != nil {
return x.Method
}
return ""
}
func (x *CallExpr) GetRequest() []*MethodRequest {
if x != nil {
return x.Request
}
return nil
}
func (x *CallExpr) GetTimeout() string {
if x != nil && x.Timeout != nil {
return *x.Timeout
}
return ""
}
func (x *CallExpr) GetRetry() *RetryPolicy {
if x != nil {
return x.Retry
}
return nil
}
func (x *CallExpr) GetError() []*GRPCError {
if x != nil {
return x.Error
}
return nil
}
func (x *CallExpr) GetOption() *GRPCCallOption {
if x != nil {
return x.Option
}
return nil
}
func (x *CallExpr) GetMetadata() string {
if x != nil && x.Metadata != nil {
return *x.Metadata
}
return ""
}
// SwitchExpr represents a switch statement. At least one "case", and "default", must be defined. All
// case.if expressions must evaluate to a boolean value. All case.by expressions, and default.by, must
// evaluate to the same type (the return type of the switch).
//
// When executed, the case.if expressions are evaluated in order, and, for the first case whose
// case.if expression evaluates to true, its case.by is evaluated to make the return value of the
// SwitchExpr.
// If no case.if evaluates to true, default.by is evaluated to make the return value.
type SwitchExpr struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Cases for the switch expression.
Case []*SwitchCaseExpr `protobuf:"bytes,1,rep,name=case,proto3" json:"case,omitempty"`
// The default case, if none of the "case.if" expressions evaluate to true.
Default *SwitchDefaultExpr `protobuf:"bytes,2,opt,name=default,proto3" json:"default,omitempty"`
}
func (x *SwitchExpr) Reset() {
*x = SwitchExpr{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[21]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *SwitchExpr) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*SwitchExpr) ProtoMessage() {}
func (x *SwitchExpr) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[21]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use SwitchExpr.ProtoReflect.Descriptor instead.
func (*SwitchExpr) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{21}
}
func (x *SwitchExpr) GetCase() []*SwitchCaseExpr {
if x != nil {
return x.Case
}
return nil
}
func (x *SwitchExpr) GetDefault() *SwitchDefaultExpr {
if x != nil {
return x.Default
}
return nil
}
// SwitchCaseExpr represents a single case for a switch expression.
type SwitchCaseExpr struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// if specify the condition for evaluating expr.
// this value evaluated by CEL and it must return a boolean value.
If string `protobuf:"bytes,1,opt,name=if,proto3" json:"if,omitempty"`
// def define variables in current scope.
Def []*VariableDefinition `protobuf:"bytes,2,rep,name=def,proto3" json:"def,omitempty"`
// expr specify the value to return for the case.
//
// Types that are assignable to Expr:
//
// *SwitchCaseExpr_By
Expr isSwitchCaseExpr_Expr `protobuf_oneof:"expr"`
}
func (x *SwitchCaseExpr) Reset() {
*x = SwitchCaseExpr{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[22]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *SwitchCaseExpr) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*SwitchCaseExpr) ProtoMessage() {}
func (x *SwitchCaseExpr) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[22]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use SwitchCaseExpr.ProtoReflect.Descriptor instead.
func (*SwitchCaseExpr) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{22}
}
func (x *SwitchCaseExpr) GetIf() string {
if x != nil {
return x.If
}
return ""
}
func (x *SwitchCaseExpr) GetDef() []*VariableDefinition {
if x != nil {
return x.Def
}
return nil
}
func (m *SwitchCaseExpr) GetExpr() isSwitchCaseExpr_Expr {
if m != nil {
return m.Expr
}
return nil
}
func (x *SwitchCaseExpr) GetBy() string {
if x, ok := x.GetExpr().(*SwitchCaseExpr_By); ok {
return x.By
}
return ""
}
type isSwitchCaseExpr_Expr interface {
isSwitchCaseExpr_Expr()
}
type SwitchCaseExpr_By struct {
// `by` evaluates with CEL.
By string `protobuf:"bytes,11,opt,name=by,proto3,oneof"`
}
func (*SwitchCaseExpr_By) isSwitchCaseExpr_Expr() {}
// SwitchDefaultExpr represents the default case for a switch expression.
type SwitchDefaultExpr struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// def define variables in current scope.
Def []*VariableDefinition `protobuf:"bytes,1,rep,name=def,proto3" json:"def,omitempty"`
// expr specify the value to return for the default case.
//
// Types that are assignable to Expr:
//
// *SwitchDefaultExpr_By
Expr isSwitchDefaultExpr_Expr `protobuf_oneof:"expr"`
}
func (x *SwitchDefaultExpr) Reset() {
*x = SwitchDefaultExpr{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[23]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *SwitchDefaultExpr) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*SwitchDefaultExpr) ProtoMessage() {}
func (x *SwitchDefaultExpr) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[23]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use SwitchDefaultExpr.ProtoReflect.Descriptor instead.
func (*SwitchDefaultExpr) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{23}
}
func (x *SwitchDefaultExpr) GetDef() []*VariableDefinition {
if x != nil {
return x.Def
}
return nil
}
func (m *SwitchDefaultExpr) GetExpr() isSwitchDefaultExpr_Expr {
if m != nil {
return m.Expr
}
return nil
}
func (x *SwitchDefaultExpr) GetBy() string {
if x, ok := x.GetExpr().(*SwitchDefaultExpr_By); ok {
return x.By
}
return ""
}
type isSwitchDefaultExpr_Expr interface {
isSwitchDefaultExpr_Expr()
}
type SwitchDefaultExpr_By struct {
// `by` evaluates with CEL.
By string `protobuf:"bytes,11,opt,name=by,proto3,oneof"`
}
func (*SwitchDefaultExpr_By) isSwitchDefaultExpr_Expr() {}
// GRPCError create gRPC status value.
type GRPCError struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// def define variables in current scope.
Def []*VariableDefinition `protobuf:"bytes,1,rep,name=def,proto3" json:"def,omitempty"`
// if specifies condition in CEL. If the condition is true, it returns defined error information.
// If this field is omitted, it is always treated as 'true' and returns defined error information.
// The return value must always be of type boolean.
If *string `protobuf:"bytes,2,opt,name=if,proto3,oneof" json:"if,omitempty"`
// code is a gRPC status code.
Code *code.Code `protobuf:"varint,3,opt,name=code,proto3,enum=google.rpc.Code,oneof" json:"code,omitempty"`
// message is a gRPC status message.
// If omitted, the message will be auto-generated from the configurations.
Message *string `protobuf:"bytes,4,opt,name=message,proto3,oneof" json:"message,omitempty"`
// details is a list of error details.
// If returns error, the corresponding error details are set.
Details []*GRPCErrorDetail `protobuf:"bytes,5,rep,name=details,proto3" json:"details,omitempty"`
// ignore ignore the error if the condition in the "if" field is true and "ignore" field is set to true.
// When an error is ignored, the returned response is always null value.
// If you want to return a response that is not null, please use `ignore_and_response` feature.
// Therefore, `ignore` and `ignore_and_response` cannot be specified same.
Ignore *bool `protobuf:"varint,6,opt,name=ignore,proto3,oneof" json:"ignore,omitempty"`
// ignore_and_response ignore the error if the condition in the "if" field is true and it returns response specified in CEL.
// The evaluation value of CEL must always be the same as the response message type.
// `ignore` and `ignore_and_response` cannot be specified same.
IgnoreAndResponse *string `protobuf:"bytes,7,opt,name=ignore_and_response,json=ignoreAndResponse,proto3,oneof" json:"ignore_and_response,omitempty"`
// log_level can be configured to output logs as any log level.
// If DEBUG is specified for the log_level, logs are output as debug logs.
// default value is ERROR.
LogLevel *GRPCError_LogLevel `protobuf:"varint,8,opt,name=log_level,json=logLevel,proto3,enum=grpc.federation.GRPCError_LogLevel,oneof" json:"log_level,omitempty"`
}
func (x *GRPCError) Reset() {
*x = GRPCError{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[24]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GRPCError) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GRPCError) ProtoMessage() {}
func (x *GRPCError) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[24]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GRPCError.ProtoReflect.Descriptor instead.
func (*GRPCError) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{24}
}
func (x *GRPCError) GetDef() []*VariableDefinition {
if x != nil {
return x.Def
}
return nil
}
func (x *GRPCError) GetIf() string {
if x != nil && x.If != nil {
return *x.If
}
return ""
}
func (x *GRPCError) GetCode() code.Code {
if x != nil && x.Code != nil {
return *x.Code
}
return code.Code(0)
}
func (x *GRPCError) GetMessage() string {
if x != nil && x.Message != nil {
return *x.Message
}
return ""
}
func (x *GRPCError) GetDetails() []*GRPCErrorDetail {
if x != nil {
return x.Details
}
return nil
}
func (x *GRPCError) GetIgnore() bool {
if x != nil && x.Ignore != nil {
return *x.Ignore
}
return false
}
func (x *GRPCError) GetIgnoreAndResponse() string {
if x != nil && x.IgnoreAndResponse != nil {
return *x.IgnoreAndResponse
}
return ""
}
func (x *GRPCError) GetLogLevel() GRPCError_LogLevel {
if x != nil && x.LogLevel != nil {
return *x.LogLevel
}
return GRPCError_UNKNOWN
}
type GRPCErrorDetail struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// if specifies condition rule in CEL. If the condition is true, gRPC error detail is added to the error.
If string `protobuf:"bytes,1,opt,name=if,proto3" json:"if,omitempty"`
// def define variables in current scope.
Def []*VariableDefinition `protobuf:"bytes,2,rep,name=def,proto3" json:"def,omitempty"`
// message represents arbitrary messages to describe the detail of the error.
Message []*MessageExpr `protobuf:"bytes,3,rep,name=message,proto3" json:"message,omitempty"`
// error_info describes the cause of the error with structured details.
ErrorInfo []*errdetails.ErrorInfo `protobuf:"bytes,4,rep,name=error_info,json=errorInfo,proto3" json:"error_info,omitempty"`
// retry_info describes when the clients can retry a failed request.
RetryInfo []*errdetails.RetryInfo `protobuf:"bytes,5,rep,name=retry_info,json=retryInfo,proto3" json:"retry_info,omitempty"`
// debug_info describes additional debugging info.
DebugInfo []*errdetails.DebugInfo `protobuf:"bytes,6,rep,name=debug_info,json=debugInfo,proto3" json:"debug_info,omitempty"`
// quota_failure describes how a quota check failed.
QuotaFailure []*errdetails.QuotaFailure `protobuf:"bytes,7,rep,name=quota_failure,json=quotaFailure,proto3" json:"quota_failure,omitempty"`
// precondition_failure describes what preconditions have failed.
PreconditionFailure []*errdetails.PreconditionFailure `protobuf:"bytes,8,rep,name=precondition_failure,json=preconditionFailure,proto3" json:"precondition_failure,omitempty"`
// bad_request describes violations in a client request.
BadRequest []*errdetails.BadRequest `protobuf:"bytes,9,rep,name=bad_request,json=badRequest,proto3" json:"bad_request,omitempty"`
// request_info contains metadata about the request that clients can attach.
RequestInfo []*errdetails.RequestInfo `protobuf:"bytes,10,rep,name=request_info,json=requestInfo,proto3" json:"request_info,omitempty"`
// resource_info describes the resource that is being accessed.
ResourceInfo []*errdetails.ResourceInfo `protobuf:"bytes,11,rep,name=resource_info,json=resourceInfo,proto3" json:"resource_info,omitempty"`
// help provides links to documentation or for performing an out of band action.
Help []*errdetails.Help `protobuf:"bytes,12,rep,name=help,proto3" json:"help,omitempty"`
// localized_message provides a localized error message that is safe to return to the user.
LocalizedMessage []*errdetails.LocalizedMessage `protobuf:"bytes,13,rep,name=localized_message,json=localizedMessage,proto3" json:"localized_message,omitempty"`
// by specify a message in CEL to express the details of the error.
By []string `protobuf:"bytes,14,rep,name=by,proto3" json:"by,omitempty"`
}
func (x *GRPCErrorDetail) Reset() {
*x = GRPCErrorDetail{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[25]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GRPCErrorDetail) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GRPCErrorDetail) ProtoMessage() {}
func (x *GRPCErrorDetail) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[25]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GRPCErrorDetail.ProtoReflect.Descriptor instead.
func (*GRPCErrorDetail) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{25}
}
func (x *GRPCErrorDetail) GetIf() string {
if x != nil {
return x.If
}
return ""
}
func (x *GRPCErrorDetail) GetDef() []*VariableDefinition {
if x != nil {
return x.Def
}
return nil
}
func (x *GRPCErrorDetail) GetMessage() []*MessageExpr {
if x != nil {
return x.Message
}
return nil
}
func (x *GRPCErrorDetail) GetErrorInfo() []*errdetails.ErrorInfo {
if x != nil {
return x.ErrorInfo
}
return nil
}
func (x *GRPCErrorDetail) GetRetryInfo() []*errdetails.RetryInfo {
if x != nil {
return x.RetryInfo
}
return nil
}
func (x *GRPCErrorDetail) GetDebugInfo() []*errdetails.DebugInfo {
if x != nil {
return x.DebugInfo
}
return nil
}
func (x *GRPCErrorDetail) GetQuotaFailure() []*errdetails.QuotaFailure {
if x != nil {
return x.QuotaFailure
}
return nil
}
func (x *GRPCErrorDetail) GetPreconditionFailure() []*errdetails.PreconditionFailure {
if x != nil {
return x.PreconditionFailure
}
return nil
}
func (x *GRPCErrorDetail) GetBadRequest() []*errdetails.BadRequest {
if x != nil {
return x.BadRequest
}
return nil
}
func (x *GRPCErrorDetail) GetRequestInfo() []*errdetails.RequestInfo {
if x != nil {
return x.RequestInfo
}
return nil
}
func (x *GRPCErrorDetail) GetResourceInfo() []*errdetails.ResourceInfo {
if x != nil {
return x.ResourceInfo
}
return nil
}
func (x *GRPCErrorDetail) GetHelp() []*errdetails.Help {
if x != nil {
return x.Help
}
return nil
}
func (x *GRPCErrorDetail) GetLocalizedMessage() []*errdetails.LocalizedMessage {
if x != nil {
return x.LocalizedMessage
}
return nil
}
func (x *GRPCErrorDetail) GetBy() []string {
if x != nil {
return x.By
}
return nil
}
// GRPCCallOption configures a gRPC Call before it starts or extracts information from a gRPC Call after it completes.
type GRPCCallOption struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// set the content-subtype. For example, if content-subtype is "json", the Content-Type over the wire will be "application/grpc+json".
// The content-subtype is converted to lowercase before being included in Content-Type.
// See Content-Type on https://github.com/grpc/grpc/blob/master/doc/PROTOCOL-HTTP2.md#requests for more details.
// If no such codec is found, the call will result in an error with code INTERNAL.
ContentSubtype *string `protobuf:"bytes,1,opt,name=content_subtype,json=contentSubtype,proto3,oneof" json:"content_subtype,omitempty"`
// header retrieves the header metadata for a unary RPC.
// In order to obtain the metadata, you must specify a variable of type map in the header.
// e.g.)
// def [
//
// { name: "hdr" by: "grpc.federation.metadata.new()" }
// { call { method: "pkg.Method" option { header: "hdr" } } }
//
// ]
Header *string `protobuf:"bytes,2,opt,name=header,proto3,oneof" json:"header,omitempty"`
// max_call_recv_msg_size sets the maximum message size in bytes the client can receive.
// If this is not set, gRPC uses the default 4MB.
MaxCallRecvMsgSize *int64 `protobuf:"varint,3,opt,name=max_call_recv_msg_size,json=maxCallRecvMsgSize,proto3,oneof" json:"max_call_recv_msg_size,omitempty"`
// max_call_send_msg_size sets the maximum message size in bytes the client can send.
// If this is not set, gRPC uses the default maximum number of int32 range.
MaxCallSendMsgSize *int64 `protobuf:"varint,4,opt,name=max_call_send_msg_size,json=maxCallSendMsgSize,proto3,oneof" json:"max_call_send_msg_size,omitempty"`
// static_method specifies that a call is being made to a method that is static,
// which means the method is known at compile time and doesn't change at runtime.
// This can be used as a signal to stats plugins that this method is safe to include as a key to a measurement.
StaticMethod *bool `protobuf:"varint,5,opt,name=static_method,json=staticMethod,proto3,oneof" json:"static_method,omitempty"`
// trailer retrieves the trailer metadata for a unary RPC.
// In order to obtain the metadata, you must specify a variable of type map in the trailer.
// e.g.)
// def [
//
// { name: "trl" by: "grpc.federation.metadata.new()" }
// { call { method: "pkg.Method" option { trailer: "trl" } } }
//
// ]
Trailer *string `protobuf:"bytes,6,opt,name=trailer,proto3,oneof" json:"trailer,omitempty"`
// wait_for_ready configures the RPC's behavior when the client is in TRANSIENT_FAILURE,
// which occurs when all addresses fail to connect.
// If wait_for_ready is false, the RPC will fail immediately.
// Otherwise, the client will wait until a connection becomes available or the RPC's deadline is reached.
// By default, RPCs do not "wait for ready".
WaitForReady *bool `protobuf:"varint,7,opt,name=wait_for_ready,json=waitForReady,proto3,oneof" json:"wait_for_ready,omitempty"`
}
func (x *GRPCCallOption) Reset() {
*x = GRPCCallOption{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[26]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GRPCCallOption) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GRPCCallOption) ProtoMessage() {}
func (x *GRPCCallOption) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[26]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GRPCCallOption.ProtoReflect.Descriptor instead.
func (*GRPCCallOption) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{26}
}
func (x *GRPCCallOption) GetContentSubtype() string {
if x != nil && x.ContentSubtype != nil {
return *x.ContentSubtype
}
return ""
}
func (x *GRPCCallOption) GetHeader() string {
if x != nil && x.Header != nil {
return *x.Header
}
return ""
}
func (x *GRPCCallOption) GetMaxCallRecvMsgSize() int64 {
if x != nil && x.MaxCallRecvMsgSize != nil {
return *x.MaxCallRecvMsgSize
}
return 0
}
func (x *GRPCCallOption) GetMaxCallSendMsgSize() int64 {
if x != nil && x.MaxCallSendMsgSize != nil {
return *x.MaxCallSendMsgSize
}
return 0
}
func (x *GRPCCallOption) GetStaticMethod() bool {
if x != nil && x.StaticMethod != nil {
return *x.StaticMethod
}
return false
}
func (x *GRPCCallOption) GetTrailer() string {
if x != nil && x.Trailer != nil {
return *x.Trailer
}
return ""
}
func (x *GRPCCallOption) GetWaitForReady() bool {
if x != nil && x.WaitForReady != nil {
return *x.WaitForReady
}
return false
}
// Validation represents a validation rule against variables defined within the current scope.
type ValidationExpr struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// name is a unique name for the validation.
// If set, the validation error type will be Error.
// If omitted, the validation error type will be ValidationError.
Name *string `protobuf:"bytes,1,opt,name=name,proto3,oneof" json:"name,omitempty"`
// error defines the actual validation rules and an error to returned if the validation fails.
Error *GRPCError `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"`
}
func (x *ValidationExpr) Reset() {
*x = ValidationExpr{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[27]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ValidationExpr) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ValidationExpr) ProtoMessage() {}
func (x *ValidationExpr) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[27]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ValidationExpr.ProtoReflect.Descriptor instead.
func (*ValidationExpr) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{27}
}
func (x *ValidationExpr) GetName() string {
if x != nil && x.Name != nil {
return *x.Name
}
return ""
}
func (x *ValidationExpr) GetError() *GRPCError {
if x != nil {
return x.Error
}
return nil
}
// RetryPolicy define the retry policy if the method call fails.
type RetryPolicy struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Types that are assignable to Policy:
//
// *RetryPolicy_Constant
// *RetryPolicy_Exponential
Policy isRetryPolicy_Policy `protobuf_oneof:"policy"`
// if specifies condition in CEL. If the condition is true, run the retry process according to the policy.
// If this field is omitted, it is always treated as 'true' and run the retry process.
// The return value must always be of type boolean.
If string `protobuf:"bytes,3,opt,name=if,proto3" json:"if,omitempty"`
}
func (x *RetryPolicy) Reset() {
*x = RetryPolicy{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[28]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *RetryPolicy) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*RetryPolicy) ProtoMessage() {}
func (x *RetryPolicy) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[28]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use RetryPolicy.ProtoReflect.Descriptor instead.
func (*RetryPolicy) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{28}
}
func (m *RetryPolicy) GetPolicy() isRetryPolicy_Policy {
if m != nil {
return m.Policy
}
return nil
}
func (x *RetryPolicy) GetConstant() *RetryPolicyConstant {
if x, ok := x.GetPolicy().(*RetryPolicy_Constant); ok {
return x.Constant
}
return nil
}
func (x *RetryPolicy) GetExponential() *RetryPolicyExponential {
if x, ok := x.GetPolicy().(*RetryPolicy_Exponential); ok {
return x.Exponential
}
return nil
}
func (x *RetryPolicy) GetIf() string {
if x != nil {
return x.If
}
return ""
}
type isRetryPolicy_Policy interface {
isRetryPolicy_Policy()
}
type RetryPolicy_Constant struct {
// retry according to the "constant" policy.
Constant *RetryPolicyConstant `protobuf:"bytes,1,opt,name=constant,proto3,oneof"`
}
type RetryPolicy_Exponential struct {
// retry according to the "exponential backoff" policy.
// The following Go library is used in the implementation,
// so please refer to the library documentation for how to specify each parameter.
// https://pkg.go.dev/github.com/cenkalti/backoff/v4#section-readme.
Exponential *RetryPolicyExponential `protobuf:"bytes,2,opt,name=exponential,proto3,oneof"`
}
func (*RetryPolicy_Constant) isRetryPolicy_Policy() {}
func (*RetryPolicy_Exponential) isRetryPolicy_Policy() {}
// RetryPolicyConstant define "constant" based retry policy.
type RetryPolicyConstant struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// interval value. ( default value is 1s ).
Interval *string `protobuf:"bytes,1,opt,name=interval,proto3,oneof" json:"interval,omitempty"`
// max retry count. ( default value is 5. If zero is specified, it never stops )
MaxRetries *uint64 `protobuf:"varint,2,opt,name=max_retries,json=maxRetries,proto3,oneof" json:"max_retries,omitempty"`
}
func (x *RetryPolicyConstant) Reset() {
*x = RetryPolicyConstant{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[29]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *RetryPolicyConstant) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*RetryPolicyConstant) ProtoMessage() {}
func (x *RetryPolicyConstant) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[29]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use RetryPolicyConstant.ProtoReflect.Descriptor instead.
func (*RetryPolicyConstant) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{29}
}
func (x *RetryPolicyConstant) GetInterval() string {
if x != nil && x.Interval != nil {
return *x.Interval
}
return ""
}
func (x *RetryPolicyConstant) GetMaxRetries() uint64 {
if x != nil && x.MaxRetries != nil {
return *x.MaxRetries
}
return 0
}
// RetryPolicyExponential define "exponential backoff" based retry policy.
type RetryPolicyExponential struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// initial interval value. ( default value is "500ms" ).
InitialInterval *string `protobuf:"bytes,1,opt,name=initial_interval,json=initialInterval,proto3,oneof" json:"initial_interval,omitempty"`
// randomization factor value. ( default value is 0.5 ).
RandomizationFactor *float64 `protobuf:"fixed64,2,opt,name=randomization_factor,json=randomizationFactor,proto3,oneof" json:"randomization_factor,omitempty"`
// multiplier. ( default value is 1.5 ).
Multiplier *float64 `protobuf:"fixed64,3,opt,name=multiplier,proto3,oneof" json:"multiplier,omitempty"`
// max interval value. ( default value is "60s" ).
MaxInterval *string `protobuf:"bytes,4,opt,name=max_interval,json=maxInterval,proto3,oneof" json:"max_interval,omitempty"`
// max retry count. ( default value is 5. If zero is specified, it never stops ).
MaxRetries *uint64 `protobuf:"varint,5,opt,name=max_retries,json=maxRetries,proto3,oneof" json:"max_retries,omitempty"`
}
func (x *RetryPolicyExponential) Reset() {
*x = RetryPolicyExponential{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[30]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *RetryPolicyExponential) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*RetryPolicyExponential) ProtoMessage() {}
func (x *RetryPolicyExponential) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[30]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use RetryPolicyExponential.ProtoReflect.Descriptor instead.
func (*RetryPolicyExponential) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{30}
}
func (x *RetryPolicyExponential) GetInitialInterval() string {
if x != nil && x.InitialInterval != nil {
return *x.InitialInterval
}
return ""
}
func (x *RetryPolicyExponential) GetRandomizationFactor() float64 {
if x != nil && x.RandomizationFactor != nil {
return *x.RandomizationFactor
}
return 0
}
func (x *RetryPolicyExponential) GetMultiplier() float64 {
if x != nil && x.Multiplier != nil {
return *x.Multiplier
}
return 0
}
func (x *RetryPolicyExponential) GetMaxInterval() string {
if x != nil && x.MaxInterval != nil {
return *x.MaxInterval
}
return ""
}
func (x *RetryPolicyExponential) GetMaxRetries() uint64 {
if x != nil && x.MaxRetries != nil {
return *x.MaxRetries
}
return 0
}
// MethodRequest define parameters to be used for gRPC method request.
type MethodRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// field name of the request message.
Field string `protobuf:"bytes,1,opt,name=field,proto3" json:"field,omitempty"`
// by used to refer to a name or message argument defined in a MessageRule, use `$.` to refer to the message argument.
// Use CEL (https://github.com/google/cel-spec) to evaluate the expression.
// Variables are already defined in MessageRule can be used.
By *string `protobuf:"bytes,2,opt,name=by,proto3,oneof" json:"by,omitempty"`
// if describes the condition to be assigned to field.
// The return value must be of type bool.
// Use CEL (https://github.com/google/cel-spec) to evaluate the expression.
// Variables are already defined in MessageRule can be used.
// If the field is a 'oneof' field, it must be specified.
If *string `protobuf:"bytes,3,opt,name=if,proto3,oneof" json:"if,omitempty"`
}
func (x *MethodRequest) Reset() {
*x = MethodRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[31]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *MethodRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*MethodRequest) ProtoMessage() {}
func (x *MethodRequest) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[31]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use MethodRequest.ProtoReflect.Descriptor instead.
func (*MethodRequest) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{31}
}
func (x *MethodRequest) GetField() string {
if x != nil {
return x.Field
}
return ""
}
func (x *MethodRequest) GetBy() string {
if x != nil && x.By != nil {
return *x.By
}
return ""
}
func (x *MethodRequest) GetIf() string {
if x != nil && x.If != nil {
return *x.If
}
return ""
}
// MethodResponse define which value of the method response is referenced.
type MethodResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// name specify the unique name that can be used in a `MessageRule` / `FieldRule` for the same message for a specific field in the response.
Name *string `protobuf:"bytes,1,opt,name=name,proto3,oneof" json:"name,omitempty"`
// field name in response message.
Field *string `protobuf:"bytes,2,opt,name=field,proto3,oneof" json:"field,omitempty"`
// autobind if the value referenced by `field` is a message type,
// the value of a field with the same name and type as the field name of its own message is automatically assigned to the value of the field in the message.
// If multiple autobinds are used at the same message,
// you must explicitly use the `grpc.federation.field` option to do the binding yourself, since duplicate field names cannot be correctly determined as one.
Autobind *bool `protobuf:"varint,3,opt,name=autobind,proto3,oneof" json:"autobind,omitempty"`
}
func (x *MethodResponse) Reset() {
*x = MethodResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[32]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *MethodResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*MethodResponse) ProtoMessage() {}
func (x *MethodResponse) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[32]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use MethodResponse.ProtoReflect.Descriptor instead.
func (*MethodResponse) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{32}
}
func (x *MethodResponse) GetName() string {
if x != nil && x.Name != nil {
return *x.Name
}
return ""
}
func (x *MethodResponse) GetField() string {
if x != nil && x.Field != nil {
return *x.Field
}
return ""
}
func (x *MethodResponse) GetAutobind() bool {
if x != nil && x.Autobind != nil {
return *x.Autobind
}
return false
}
// Argument define message argument.
type Argument struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// name of the message argument.
// Use this name to refer to the message argument.
// For example, if `foo` is specified as the name, it is referenced by `$.foo`.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// by used to refer to a name or message argument defined in a MessageRule, use `$.` to refer to the message argument.
// Use CEL (https://github.com/google/cel-spec) to evaluate the expression.
// Variables are already defined in MessageRule can be used.
By *string `protobuf:"bytes,2,opt,name=by,proto3,oneof" json:"by,omitempty"`
// inline like by, it refers to the specified value and expands all fields beyond it.
// For this reason, the referenced value must always be of message type.
Inline *string `protobuf:"bytes,3,opt,name=inline,proto3,oneof" json:"inline,omitempty"`
}
func (x *Argument) Reset() {
*x = Argument{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[33]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Argument) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Argument) ProtoMessage() {}
func (x *Argument) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[33]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Argument.ProtoReflect.Descriptor instead.
func (*Argument) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{33}
}
func (x *Argument) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *Argument) GetBy() string {
if x != nil && x.By != nil {
return *x.By
}
return ""
}
func (x *Argument) GetInline() string {
if x != nil && x.Inline != nil {
return *x.Inline
}
return ""
}
// FieldRule define gRPC Federation rules for the field of message.
type FieldRule struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// If custom_resolver is true, the field binding process is to be implemented in Go.
// If there are any values retrieved by grpc.federation.message option, they are passed as arguments for custom resolver.
CustomResolver *bool `protobuf:"varint,1,opt,name=custom_resolver,json=customResolver,proto3,oneof" json:"custom_resolver,omitempty"`
// by used to refer to a name or message argument defined in a MessageRule, use `$.` to refer to the message argument.
// Use CEL (https://github.com/google/cel-spec) to evaluate the expression.
// Variables are already defined in MessageRule can be used.
By *string `protobuf:"bytes,2,opt,name=by,proto3,oneof" json:"by,omitempty"`
// alias can be used when alias is specified in grpc.federation.message option,
// and specifies the field name to be referenced among the messages specified in alias of message option.
// If the specified field has the same type or can be converted automatically, its value is assigned.
Alias *string `protobuf:"bytes,3,opt,name=alias,proto3,oneof" json:"alias,omitempty"`
// use to evaluate any one of fields. this field only available in oneof.
Oneof *FieldOneof `protobuf:"bytes,4,opt,name=oneof,proto3" json:"oneof,omitempty"`
// when defining an environment variable, use it for fields where you want to set additional options.
Env *EnvVarOption `protobuf:"bytes,5,opt,name=env,proto3" json:"env,omitempty"`
}
func (x *FieldRule) Reset() {
*x = FieldRule{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[34]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *FieldRule) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*FieldRule) ProtoMessage() {}
func (x *FieldRule) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[34]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use FieldRule.ProtoReflect.Descriptor instead.
func (*FieldRule) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{34}
}
func (x *FieldRule) GetCustomResolver() bool {
if x != nil && x.CustomResolver != nil {
return *x.CustomResolver
}
return false
}
func (x *FieldRule) GetBy() string {
if x != nil && x.By != nil {
return *x.By
}
return ""
}
func (x *FieldRule) GetAlias() string {
if x != nil && x.Alias != nil {
return *x.Alias
}
return ""
}
func (x *FieldRule) GetOneof() *FieldOneof {
if x != nil {
return x.Oneof
}
return nil
}
func (x *FieldRule) GetEnv() *EnvVarOption {
if x != nil {
return x.Env
}
return nil
}
// FieldOneof evaluate "messages" or other field only if expr is true and assign to the oneof field.
// This feature only available in oneof.
type FieldOneof struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// cond specify either `expr` or `default`. Only one `default` can be set per oneof.
//
// Types that are assignable to Cond:
//
// *FieldOneof_If
// *FieldOneof_Default
Cond isFieldOneof_Cond `protobuf_oneof:"cond"`
// def specify variables to be used in current oneof field's scope for field binding.
Def []*VariableDefinition `protobuf:"bytes,3,rep,name=def,proto3" json:"def,omitempty"`
// by used to refer to a name or message argument defined in a MessageRule, use `$.` to refer to the message argument.
// Use CEL (https://github.com/google/cel-spec) to evaluate the expression.
// Variables are already defined in MessageRule and FieldOneOf can be used.
By string `protobuf:"bytes,4,opt,name=by,proto3" json:"by,omitempty"`
}
func (x *FieldOneof) Reset() {
*x = FieldOneof{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[35]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *FieldOneof) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*FieldOneof) ProtoMessage() {}
func (x *FieldOneof) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[35]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use FieldOneof.ProtoReflect.Descriptor instead.
func (*FieldOneof) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{35}
}
func (m *FieldOneof) GetCond() isFieldOneof_Cond {
if m != nil {
return m.Cond
}
return nil
}
func (x *FieldOneof) GetIf() string {
if x, ok := x.GetCond().(*FieldOneof_If); ok {
return x.If
}
return ""
}
func (x *FieldOneof) GetDefault() bool {
if x, ok := x.GetCond().(*FieldOneof_Default); ok {
return x.Default
}
return false
}
func (x *FieldOneof) GetDef() []*VariableDefinition {
if x != nil {
return x.Def
}
return nil
}
func (x *FieldOneof) GetBy() string {
if x != nil {
return x.By
}
return ""
}
type isFieldOneof_Cond interface {
isFieldOneof_Cond()
}
type FieldOneof_If struct {
// if describes the condition to be assigned to field.
// The return value must be of type bool.
// Use CEL (https://github.com/google/cel-spec) to evaluate the expression.
// Variables are already defined in MessageRule can be used.
If string `protobuf:"bytes,1,opt,name=if,proto3,oneof"`
}
type FieldOneof_Default struct {
// default used to assign a value when none of the other fields match any of the specified expressions.
// Only one value can be defined per oneof.
Default bool `protobuf:"varint,2,opt,name=default,proto3,oneof"`
}
func (*FieldOneof_If) isFieldOneof_Cond() {}
func (*FieldOneof_Default) isFieldOneof_Cond() {}
// CELPlugin define schema of CEL plugin.
type CELPlugin struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Export []*CELPluginExport `protobuf:"bytes,1,rep,name=export,proto3" json:"export,omitempty"`
}
func (x *CELPlugin) Reset() {
*x = CELPlugin{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[36]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *CELPlugin) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CELPlugin) ProtoMessage() {}
func (x *CELPlugin) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[36]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use CELPlugin.ProtoReflect.Descriptor instead.
func (*CELPlugin) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{36}
}
func (x *CELPlugin) GetExport() []*CELPluginExport {
if x != nil {
return x.Export
}
return nil
}
// CELPluginExport describe the schema to be exposed as a CEL plugin.
type CELPluginExport struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// name is the plugin name.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// desc is the description of plugin.
// This description is used as documentation at code generation.
Desc string `protobuf:"bytes,2,opt,name=desc,proto3" json:"desc,omitempty"`
// types describe the message type you want to expose.
Types []*CELReceiverType `protobuf:"bytes,3,rep,name=types,proto3" json:"types,omitempty"`
// functions describe the definition of the function you want to expose.
Functions []*CELFunction `protobuf:"bytes,4,rep,name=functions,proto3" json:"functions,omitempty"`
// variables describe the definition of the variable you want to expose.
Variables []*CELVariable `protobuf:"bytes,5,rep,name=variables,proto3" json:"variables,omitempty"`
Capability *CELPluginCapability `protobuf:"bytes,6,opt,name=capability,proto3" json:"capability,omitempty"`
}
func (x *CELPluginExport) Reset() {
*x = CELPluginExport{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[37]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *CELPluginExport) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CELPluginExport) ProtoMessage() {}
func (x *CELPluginExport) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[37]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use CELPluginExport.ProtoReflect.Descriptor instead.
func (*CELPluginExport) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{37}
}
func (x *CELPluginExport) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *CELPluginExport) GetDesc() string {
if x != nil {
return x.Desc
}
return ""
}
func (x *CELPluginExport) GetTypes() []*CELReceiverType {
if x != nil {
return x.Types
}
return nil
}
func (x *CELPluginExport) GetFunctions() []*CELFunction {
if x != nil {
return x.Functions
}
return nil
}
func (x *CELPluginExport) GetVariables() []*CELVariable {
if x != nil {
return x.Variables
}
return nil
}
func (x *CELPluginExport) GetCapability() *CELPluginCapability {
if x != nil {
return x.Capability
}
return nil
}
// CELPluginCapability controls the permissions granted to the WebAssembly plugin.
type CELPluginCapability struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// env is the capability for environment variable.
Env *CELPluginEnvCapability `protobuf:"bytes,1,opt,name=env,proto3,oneof" json:"env,omitempty"`
// file_system is the capability for file system.
FileSystem *CELPluginFileSystemCapability `protobuf:"bytes,2,opt,name=file_system,json=fileSystem,proto3,oneof" json:"file_system,omitempty"`
// network is the capability for network.
Network *CELPluginNetworkCapability `protobuf:"bytes,3,opt,name=network,proto3,oneof" json:"network,omitempty"`
}
func (x *CELPluginCapability) Reset() {
*x = CELPluginCapability{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[38]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *CELPluginCapability) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CELPluginCapability) ProtoMessage() {}
func (x *CELPluginCapability) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[38]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use CELPluginCapability.ProtoReflect.Descriptor instead.
func (*CELPluginCapability) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{38}
}
func (x *CELPluginCapability) GetEnv() *CELPluginEnvCapability {
if x != nil {
return x.Env
}
return nil
}
func (x *CELPluginCapability) GetFileSystem() *CELPluginFileSystemCapability {
if x != nil {
return x.FileSystem
}
return nil
}
func (x *CELPluginCapability) GetNetwork() *CELPluginNetworkCapability {
if x != nil {
return x.Network
}
return nil
}
// CELPluginEnvCapability controls access to the environment variable.
type CELPluginEnvCapability struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// all allows access to all environment variables.
All bool `protobuf:"varint,1,opt,name=all,proto3" json:"all,omitempty"`
// specifies accessible names. If "all" is true, it takes precedence.
Names []string `protobuf:"bytes,2,rep,name=names,proto3" json:"names,omitempty"`
}
func (x *CELPluginEnvCapability) Reset() {
*x = CELPluginEnvCapability{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[39]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *CELPluginEnvCapability) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CELPluginEnvCapability) ProtoMessage() {}
func (x *CELPluginEnvCapability) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[39]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use CELPluginEnvCapability.ProtoReflect.Descriptor instead.
func (*CELPluginEnvCapability) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{39}
}
func (x *CELPluginEnvCapability) GetAll() bool {
if x != nil {
return x.All
}
return false
}
func (x *CELPluginEnvCapability) GetNames() []string {
if x != nil {
return x.Names
}
return nil
}
// CELPluginFileSystemCapability controls access to the file system.
type CELPluginFileSystemCapability struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// mount_path specifies the file path of the host to mount.
// If not specified, the root directory will be used.
MountPath string `protobuf:"bytes,1,opt,name=mount_path,json=mountPath,proto3" json:"mount_path,omitempty"`
}
func (x *CELPluginFileSystemCapability) Reset() {
*x = CELPluginFileSystemCapability{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[40]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *CELPluginFileSystemCapability) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CELPluginFileSystemCapability) ProtoMessage() {}
func (x *CELPluginFileSystemCapability) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[40]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use CELPluginFileSystemCapability.ProtoReflect.Descriptor instead.
func (*CELPluginFileSystemCapability) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{40}
}
func (x *CELPluginFileSystemCapability) GetMountPath() string {
if x != nil {
return x.MountPath
}
return ""
}
// CELPluginNetworkCapability sets permissions related to network access.
// This is an experimental feature.
type CELPluginNetworkCapability struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
}
func (x *CELPluginNetworkCapability) Reset() {
*x = CELPluginNetworkCapability{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[41]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *CELPluginNetworkCapability) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CELPluginNetworkCapability) ProtoMessage() {}
func (x *CELPluginNetworkCapability) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[41]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use CELPluginNetworkCapability.ProtoReflect.Descriptor instead.
func (*CELPluginNetworkCapability) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{41}
}
// CELFunction represents the CEL function definition.
type CELFunction struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// name is the function name.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// desc is the description of function.
// This description is used as documentation at code generation.
Desc string `protobuf:"bytes,2,opt,name=desc,proto3" json:"desc,omitempty"`
// args describe the definition of the function argument.
Args []*CELFunctionArgument `protobuf:"bytes,3,rep,name=args,proto3" json:"args,omitempty"`
// return describe the definition of return type of function.
Return *CELType `protobuf:"bytes,4,opt,name=return,proto3" json:"return,omitempty"`
}
func (x *CELFunction) Reset() {
*x = CELFunction{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[42]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *CELFunction) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CELFunction) ProtoMessage() {}
func (x *CELFunction) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[42]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use CELFunction.ProtoReflect.Descriptor instead.
func (*CELFunction) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{42}
}
func (x *CELFunction) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *CELFunction) GetDesc() string {
if x != nil {
return x.Desc
}
return ""
}
func (x *CELFunction) GetArgs() []*CELFunctionArgument {
if x != nil {
return x.Args
}
return nil
}
func (x *CELFunction) GetReturn() *CELType {
if x != nil {
return x.Return
}
return nil
}
// CELReceiverType represents methods tied to the message.
type CELReceiverType struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// name is the message name.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// desc is the description of plugin.
// This description is used as documentation at code generation.
Desc string `protobuf:"bytes,2,opt,name=desc,proto3" json:"desc,omitempty"`
// methods describe the definition of the method for the message.
Methods []*CELFunction `protobuf:"bytes,3,rep,name=methods,proto3" json:"methods,omitempty"`
}
func (x *CELReceiverType) Reset() {
*x = CELReceiverType{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[43]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *CELReceiverType) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CELReceiverType) ProtoMessage() {}
func (x *CELReceiverType) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[43]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use CELReceiverType.ProtoReflect.Descriptor instead.
func (*CELReceiverType) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{43}
}
func (x *CELReceiverType) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *CELReceiverType) GetDesc() string {
if x != nil {
return x.Desc
}
return ""
}
func (x *CELReceiverType) GetMethods() []*CELFunction {
if x != nil {
return x.Methods
}
return nil
}
// CELFunctionArgument represents the function argument.
type CELFunctionArgument struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// name is the argument value name.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// desc is the description of plugin.
// This description is used as documentation at code generation.
Desc string `protobuf:"bytes,2,opt,name=desc,proto3" json:"desc,omitempty"`
// type is the argument type.
Type *CELType `protobuf:"bytes,3,opt,name=type,proto3" json:"type,omitempty"`
}
func (x *CELFunctionArgument) Reset() {
*x = CELFunctionArgument{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[44]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *CELFunctionArgument) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CELFunctionArgument) ProtoMessage() {}
func (x *CELFunctionArgument) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[44]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use CELFunctionArgument.ProtoReflect.Descriptor instead.
func (*CELFunctionArgument) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{44}
}
func (x *CELFunctionArgument) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *CELFunctionArgument) GetDesc() string {
if x != nil {
return x.Desc
}
return ""
}
func (x *CELFunctionArgument) GetType() *CELType {
if x != nil {
return x.Type
}
return nil
}
// CELType represents type information for CEL plugin interface.
type CELType struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Types that are assignable to Type:
//
// *CELType_Kind
// *CELType_Repeated
// *CELType_Map
// *CELType_Message
// *CELType_Enum
Type isCELType_Type `protobuf_oneof:"type"`
}
func (x *CELType) Reset() {
*x = CELType{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[45]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *CELType) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CELType) ProtoMessage() {}
func (x *CELType) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[45]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use CELType.ProtoReflect.Descriptor instead.
func (*CELType) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{45}
}
func (m *CELType) GetType() isCELType_Type {
if m != nil {
return m.Type
}
return nil
}
func (x *CELType) GetKind() TypeKind {
if x, ok := x.GetType().(*CELType_Kind); ok {
return x.Kind
}
return TypeKind_UNKNOWN
}
func (x *CELType) GetRepeated() *CELType {
if x, ok := x.GetType().(*CELType_Repeated); ok {
return x.Repeated
}
return nil
}
func (x *CELType) GetMap() *CELMapType {
if x, ok := x.GetType().(*CELType_Map); ok {
return x.Map
}
return nil
}
func (x *CELType) GetMessage() string {
if x, ok := x.GetType().(*CELType_Message); ok {
return x.Message
}
return ""
}
func (x *CELType) GetEnum() string {
if x, ok := x.GetType().(*CELType_Enum); ok {
return x.Enum
}
return ""
}
type isCELType_Type interface {
isCELType_Type()
}
type CELType_Kind struct {
// kind is used when the type is a primitive type.
Kind TypeKind `protobuf:"varint,1,opt,name=kind,proto3,enum=grpc.federation.TypeKind,oneof"`
}
type CELType_Repeated struct {
// repeated is used when the type is a repeated type.
Repeated *CELType `protobuf:"bytes,2,opt,name=repeated,proto3,oneof"`
}
type CELType_Map struct {
// map is used when the type is a map type.
Map *CELMapType `protobuf:"bytes,3,opt,name=map,proto3,oneof"`
}
type CELType_Message struct {
// message is a fqdn to the message type.
Message string `protobuf:"bytes,4,opt,name=message,proto3,oneof"`
}
type CELType_Enum struct {
// enum is a fqdn to the enum type.
Enum string `protobuf:"bytes,5,opt,name=enum,proto3,oneof"`
}
func (*CELType_Kind) isCELType_Type() {}
func (*CELType_Repeated) isCELType_Type() {}
func (*CELType_Map) isCELType_Type() {}
func (*CELType_Message) isCELType_Type() {}
func (*CELType_Enum) isCELType_Type() {}
// CELMapType represents map type.
type CELMapType struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// key represents map's key type.
Key *CELType `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
// value represents map's value type.
Value *CELType `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
}
func (x *CELMapType) Reset() {
*x = CELMapType{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[46]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *CELMapType) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CELMapType) ProtoMessage() {}
func (x *CELMapType) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[46]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use CELMapType.ProtoReflect.Descriptor instead.
func (*CELMapType) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{46}
}
func (x *CELMapType) GetKey() *CELType {
if x != nil {
return x.Key
}
return nil
}
func (x *CELMapType) GetValue() *CELType {
if x != nil {
return x.Value
}
return nil
}
// CELVariable represents CEL variable.
type CELVariable struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// name is the variable name.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// desc is the description of plugin.
// This description is used as documentation at code generation.
Desc string `protobuf:"bytes,2,opt,name=desc,proto3" json:"desc,omitempty"`
// type is the variable type.
Type *CELType `protobuf:"bytes,3,opt,name=type,proto3" json:"type,omitempty"`
}
func (x *CELVariable) Reset() {
*x = CELVariable{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[47]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *CELVariable) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CELVariable) ProtoMessage() {}
func (x *CELVariable) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[47]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use CELVariable.ProtoReflect.Descriptor instead.
func (*CELVariable) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{47}
}
func (x *CELVariable) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *CELVariable) GetDesc() string {
if x != nil {
return x.Desc
}
return ""
}
func (x *CELVariable) GetType() *CELType {
if x != nil {
return x.Type
}
return nil
}
var file_grpc_federation_federation_proto_extTypes = []protoimpl.ExtensionInfo{
{
ExtendedType: (*descriptorpb.FileOptions)(nil),
ExtensionType: (*FileRule)(nil),
Field: 1187,
Name: "grpc.federation.file",
Tag: "bytes,1187,opt,name=file",
Filename: "grpc/federation/federation.proto",
},
{
ExtendedType: (*descriptorpb.ServiceOptions)(nil),
ExtensionType: (*ServiceRule)(nil),
Field: 1187,
Name: "grpc.federation.service",
Tag: "bytes,1187,opt,name=service",
Filename: "grpc/federation/federation.proto",
},
{
ExtendedType: (*descriptorpb.MethodOptions)(nil),
ExtensionType: (*MethodRule)(nil),
Field: 1187,
Name: "grpc.federation.method",
Tag: "bytes,1187,opt,name=method",
Filename: "grpc/federation/federation.proto",
},
{
ExtendedType: (*descriptorpb.MessageOptions)(nil),
ExtensionType: (*MessageRule)(nil),
Field: 1187,
Name: "grpc.federation.message",
Tag: "bytes,1187,opt,name=message",
Filename: "grpc/federation/federation.proto",
},
{
ExtendedType: (*descriptorpb.FieldOptions)(nil),
ExtensionType: (*FieldRule)(nil),
Field: 1187,
Name: "grpc.federation.field",
Tag: "bytes,1187,opt,name=field",
Filename: "grpc/federation/federation.proto",
},
{
ExtendedType: (*descriptorpb.EnumOptions)(nil),
ExtensionType: (*EnumRule)(nil),
Field: 1187,
Name: "grpc.federation.enum",
Tag: "bytes,1187,opt,name=enum",
Filename: "grpc/federation/federation.proto",
},
{
ExtendedType: (*descriptorpb.EnumValueOptions)(nil),
ExtensionType: (*EnumValueRule)(nil),
Field: 1187,
Name: "grpc.federation.enum_value",
Tag: "bytes,1187,opt,name=enum_value",
Filename: "grpc/federation/federation.proto",
},
{
ExtendedType: (*descriptorpb.OneofOptions)(nil),
ExtensionType: (*OneofRule)(nil),
Field: 1187,
Name: "grpc.federation.oneof",
Tag: "bytes,1187,opt,name=oneof",
Filename: "grpc/federation/federation.proto",
},
}
// Extension fields to descriptorpb.FileOptions.
var (
// optional grpc.federation.FileRule file = 1187;
E_File = &file_grpc_federation_federation_proto_extTypes[0]
)
// Extension fields to descriptorpb.ServiceOptions.
var (
// optional grpc.federation.ServiceRule service = 1187;
E_Service = &file_grpc_federation_federation_proto_extTypes[1]
)
// Extension fields to descriptorpb.MethodOptions.
var (
// optional grpc.federation.MethodRule method = 1187;
E_Method = &file_grpc_federation_federation_proto_extTypes[2]
)
// Extension fields to descriptorpb.MessageOptions.
var (
// optional grpc.federation.MessageRule message = 1187;
E_Message = &file_grpc_federation_federation_proto_extTypes[3]
)
// Extension fields to descriptorpb.FieldOptions.
var (
// optional grpc.federation.FieldRule field = 1187;
E_Field = &file_grpc_federation_federation_proto_extTypes[4]
)
// Extension fields to descriptorpb.EnumOptions.
var (
// optional grpc.federation.EnumRule enum = 1187;
E_Enum = &file_grpc_federation_federation_proto_extTypes[5]
)
// Extension fields to descriptorpb.EnumValueOptions.
var (
// optional grpc.federation.EnumValueRule enum_value = 1187;
E_EnumValue = &file_grpc_federation_federation_proto_extTypes[6]
)
// Extension fields to descriptorpb.OneofOptions.
var (
// optional grpc.federation.OneofRule oneof = 1187;
E_Oneof = &file_grpc_federation_federation_proto_extTypes[7]
)
var File_grpc_federation_federation_proto protoreflect.FileDescriptor
var file_grpc_federation_federation_proto_rawDesc = []byte{
0x0a, 0x20, 0x67, 0x72, 0x70, 0x63, 0x2f, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f,
0x6e, 0x2f, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f,
0x74, 0x6f, 0x12, 0x0f, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74,
0x69, 0x6f, 0x6e, 0x1a, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x2e,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x15, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x72, 0x70,
0x63, 0x2f, 0x63, 0x6f, 0x64, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f,
0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x72, 0x70, 0x63, 0x2f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x64,
0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x67, 0x72,
0x70, 0x63, 0x2f, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x70, 0x72,
0x69, 0x76, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1a, 0x67, 0x72, 0x70,
0x63, 0x2f, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x74, 0x69, 0x6d,
0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x56, 0x0a, 0x08, 0x46, 0x69, 0x6c, 0x65, 0x52,
0x75, 0x6c, 0x65, 0x12, 0x32, 0x0a, 0x06, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x18, 0x01, 0x20,
0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72,
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x43, 0x45, 0x4c, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x52,
0x06, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x69, 0x6d, 0x70, 0x6f, 0x72,
0x74, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x69, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x22,
0x20, 0x0a, 0x08, 0x45, 0x6e, 0x75, 0x6d, 0x52, 0x75, 0x6c, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x61,
0x6c, 0x69, 0x61, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x61, 0x6c, 0x69, 0x61,
0x73, 0x22, 0xb4, 0x01, 0x0a, 0x0d, 0x45, 0x6e, 0x75, 0x6d, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52,
0x75, 0x6c, 0x65, 0x12, 0x1d, 0x0a, 0x07, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x18, 0x01,
0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x07, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x88,
0x01, 0x01, 0x12, 0x14, 0x0a, 0x05, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28,
0x09, 0x52, 0x05, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x12, 0x37, 0x0a, 0x04, 0x61, 0x74, 0x74, 0x72,
0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65,
0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x56, 0x61, 0x6c,
0x75, 0x65, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x52, 0x04, 0x61, 0x74, 0x74,
0x72, 0x12, 0x1d, 0x0a, 0x07, 0x6e, 0x6f, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x18, 0x04, 0x20, 0x01,
0x28, 0x08, 0x48, 0x01, 0x52, 0x07, 0x6e, 0x6f, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x88, 0x01, 0x01,
0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x42, 0x0a, 0x0a, 0x08,
0x5f, 0x6e, 0x6f, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x22, 0x3e, 0x0a, 0x12, 0x45, 0x6e, 0x75, 0x6d,
0x56, 0x61, 0x6c, 0x75, 0x65, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 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, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28,
0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x0b, 0x0a, 0x09, 0x4f, 0x6e, 0x65, 0x6f,
0x66, 0x52, 0x75, 0x6c, 0x65, 0x22, 0x69, 0x0a, 0x0b, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65,
0x52, 0x75, 0x6c, 0x65, 0x12, 0x26, 0x0a, 0x03, 0x65, 0x6e, 0x76, 0x18, 0x01, 0x20, 0x01, 0x28,
0x0b, 0x32, 0x14, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74,
0x69, 0x6f, 0x6e, 0x2e, 0x45, 0x6e, 0x76, 0x52, 0x03, 0x65, 0x6e, 0x76, 0x12, 0x32, 0x0a, 0x03,
0x76, 0x61, 0x72, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x67, 0x72, 0x70, 0x63,
0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x53, 0x65, 0x72, 0x76,
0x69, 0x63, 0x65, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x03, 0x76, 0x61, 0x72,
0x22, 0x4a, 0x0a, 0x03, 0x45, 0x6e, 0x76, 0x12, 0x29, 0x0a, 0x03, 0x76, 0x61, 0x72, 0x18, 0x01,
0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65,
0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x45, 0x6e, 0x76, 0x56, 0x61, 0x72, 0x52, 0x03, 0x76,
0x61, 0x72, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20,
0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x8b, 0x03, 0x0a,
0x0f, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65,
0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01,
0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x13, 0x0a, 0x02, 0x69, 0x66, 0x18,
0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x02, 0x52, 0x02, 0x69, 0x66, 0x88, 0x01, 0x01, 0x12, 0x10,
0x0a, 0x02, 0x62, 0x79, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x02, 0x62, 0x79,
0x12, 0x2c, 0x0a, 0x03, 0x6d, 0x61, 0x70, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e,
0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e,
0x4d, 0x61, 0x70, 0x45, 0x78, 0x70, 0x72, 0x48, 0x00, 0x52, 0x03, 0x6d, 0x61, 0x70, 0x12, 0x38,
0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32,
0x1c, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f,
0x6e, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x45, 0x78, 0x70, 0x72, 0x48, 0x00, 0x52,
0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x50, 0x0a, 0x0a, 0x76, 0x61, 0x6c, 0x69,
0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x67,
0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x53,
0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x56, 0x61,
0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x78, 0x70, 0x72, 0x48, 0x00, 0x52, 0x0a,
0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2f, 0x0a, 0x04, 0x65, 0x6e,
0x75, 0x6d, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e,
0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x45,
0x78, 0x70, 0x72, 0x48, 0x00, 0x52, 0x04, 0x65, 0x6e, 0x75, 0x6d, 0x12, 0x35, 0x0a, 0x06, 0x73,
0x77, 0x69, 0x74, 0x63, 0x68, 0x18, 0x10, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x72,
0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x53, 0x77,
0x69, 0x74, 0x63, 0x68, 0x45, 0x78, 0x70, 0x72, 0x48, 0x00, 0x52, 0x06, 0x73, 0x77, 0x69, 0x74,
0x63, 0x68, 0x42, 0x06, 0x0a, 0x04, 0x65, 0x78, 0x70, 0x72, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e,
0x61, 0x6d, 0x65, 0x42, 0x05, 0x0a, 0x03, 0x5f, 0x69, 0x66, 0x22, 0x49, 0x0a, 0x1d, 0x53, 0x65,
0x72, 0x76, 0x69, 0x63, 0x65, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x56, 0x61, 0x6c,
0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x78, 0x70, 0x72, 0x12, 0x0e, 0x0a, 0x02, 0x69,
0x66, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x66, 0x12, 0x18, 0x0a, 0x07, 0x6d,
0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65,
0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x91, 0x01, 0x0a, 0x06, 0x45, 0x6e, 0x76, 0x56, 0x61, 0x72,
0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04,
0x6e, 0x61, 0x6d, 0x65, 0x12, 0x2c, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01,
0x28, 0x0b, 0x32, 0x18, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61,
0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x45, 0x6e, 0x76, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79,
0x70, 0x65, 0x12, 0x3a, 0x0a, 0x06, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01,
0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61,
0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x45, 0x6e, 0x76, 0x56, 0x61, 0x72, 0x4f, 0x70, 0x74, 0x69, 0x6f,
0x6e, 0x48, 0x00, 0x52, 0x06, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x88, 0x01, 0x01, 0x42, 0x09,
0x0a, 0x07, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xab, 0x01, 0x0a, 0x07, 0x45, 0x6e,
0x76, 0x54, 0x79, 0x70, 0x65, 0x12, 0x2f, 0x0a, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x18, 0x01, 0x20,
0x01, 0x28, 0x0e, 0x32, 0x19, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72,
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x4b, 0x69, 0x6e, 0x64, 0x48, 0x00,
0x52, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x12, 0x36, 0x0a, 0x08, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74,
0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e,
0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x45, 0x6e, 0x76, 0x54, 0x79,
0x70, 0x65, 0x48, 0x00, 0x52, 0x08, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x12, 0x2f,
0x0a, 0x03, 0x6d, 0x61, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x72,
0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x45, 0x6e,
0x76, 0x4d, 0x61, 0x70, 0x54, 0x79, 0x70, 0x65, 0x48, 0x00, 0x52, 0x03, 0x6d, 0x61, 0x70, 0x42,
0x06, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x22, 0x68, 0x0a, 0x0a, 0x45, 0x6e, 0x76, 0x4d, 0x61,
0x70, 0x54, 0x79, 0x70, 0x65, 0x12, 0x2a, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01,
0x28, 0x0b, 0x32, 0x18, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61,
0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x45, 0x6e, 0x76, 0x54, 0x79, 0x70, 0x65, 0x52, 0x03, 0x6b, 0x65,
0x79, 0x12, 0x2e, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b,
0x32, 0x18, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69,
0x6f, 0x6e, 0x2e, 0x45, 0x6e, 0x76, 0x54, 0x79, 0x70, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75,
0x65, 0x22, 0xc3, 0x01, 0x0a, 0x0c, 0x45, 0x6e, 0x76, 0x56, 0x61, 0x72, 0x4f, 0x70, 0x74, 0x69,
0x6f, 0x6e, 0x12, 0x21, 0x0a, 0x09, 0x61, 0x6c, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x74, 0x65, 0x18,
0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x09, 0x61, 0x6c, 0x74, 0x65, 0x72, 0x6e, 0x61,
0x74, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1d, 0x0a, 0x07, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74,
0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x07, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c,
0x74, 0x88, 0x01, 0x01, 0x12, 0x1f, 0x0a, 0x08, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64,
0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x48, 0x02, 0x52, 0x08, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72,
0x65, 0x64, 0x88, 0x01, 0x01, 0x12, 0x1d, 0x0a, 0x07, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x64,
0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x48, 0x03, 0x52, 0x07, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65,
0x64, 0x88, 0x01, 0x01, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x61, 0x6c, 0x74, 0x65, 0x72, 0x6e, 0x61,
0x74, 0x65, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x42, 0x0b,
0x0a, 0x09, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x42, 0x0a, 0x0a, 0x08, 0x5f,
0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x64, 0x22, 0x65, 0x0a, 0x0a, 0x4d, 0x65, 0x74, 0x68, 0x6f,
0x64, 0x52, 0x75, 0x6c, 0x65, 0x12, 0x1d, 0x0a, 0x07, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74,
0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x07, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75,
0x74, 0x88, 0x01, 0x01, 0x12, 0x1f, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e,
0x73, 0x65, 0x88, 0x01, 0x01, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75,
0x74, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x9c,
0x01, 0x0a, 0x0b, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x75, 0x6c, 0x65, 0x12, 0x35,
0x0a, 0x03, 0x64, 0x65, 0x66, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x67, 0x72,
0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x56, 0x61,
0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e,
0x52, 0x03, 0x64, 0x65, 0x66, 0x12, 0x2c, 0x0a, 0x0f, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x5f,
0x72, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00,
0x52, 0x0e, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x52, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x72,
0x88, 0x01, 0x01, 0x12, 0x14, 0x0a, 0x05, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x18, 0x03, 0x20, 0x03,
0x28, 0x09, 0x52, 0x05, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x42, 0x12, 0x0a, 0x10, 0x5f, 0x63, 0x75,
0x73, 0x74, 0x6f, 0x6d, 0x5f, 0x72, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x72, 0x22, 0xde, 0x03,
0x0a, 0x12, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69,
0x74, 0x69, 0x6f, 0x6e, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01,
0x28, 0x09, 0x48, 0x01, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x13, 0x0a,
0x02, 0x69, 0x66, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x02, 0x52, 0x02, 0x69, 0x66, 0x88,
0x01, 0x01, 0x12, 0x1f, 0x0a, 0x08, 0x61, 0x75, 0x74, 0x6f, 0x62, 0x69, 0x6e, 0x64, 0x18, 0x03,
0x20, 0x01, 0x28, 0x08, 0x48, 0x03, 0x52, 0x08, 0x61, 0x75, 0x74, 0x6f, 0x62, 0x69, 0x6e, 0x64,
0x88, 0x01, 0x01, 0x12, 0x10, 0x0a, 0x02, 0x62, 0x79, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x48,
0x00, 0x52, 0x02, 0x62, 0x79, 0x12, 0x2c, 0x0a, 0x03, 0x6d, 0x61, 0x70, 0x18, 0x0c, 0x20, 0x01,
0x28, 0x0b, 0x32, 0x18, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61,
0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x4d, 0x61, 0x70, 0x45, 0x78, 0x70, 0x72, 0x48, 0x00, 0x52, 0x03,
0x6d, 0x61, 0x70, 0x12, 0x38, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x0d,
0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65,
0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x45, 0x78,
0x70, 0x72, 0x48, 0x00, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x2f, 0x0a,
0x04, 0x63, 0x61, 0x6c, 0x6c, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x72,
0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x43, 0x61,
0x6c, 0x6c, 0x45, 0x78, 0x70, 0x72, 0x48, 0x00, 0x52, 0x04, 0x63, 0x61, 0x6c, 0x6c, 0x12, 0x41,
0x0a, 0x0a, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x0f, 0x20, 0x01,
0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61,
0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45,
0x78, 0x70, 0x72, 0x48, 0x00, 0x52, 0x0a, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f,
0x6e, 0x12, 0x2f, 0x0a, 0x04, 0x65, 0x6e, 0x75, 0x6d, 0x18, 0x10, 0x20, 0x01, 0x28, 0x0b, 0x32,
0x19, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f,
0x6e, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x45, 0x78, 0x70, 0x72, 0x48, 0x00, 0x52, 0x04, 0x65, 0x6e,
0x75, 0x6d, 0x12, 0x35, 0x0a, 0x06, 0x73, 0x77, 0x69, 0x74, 0x63, 0x68, 0x18, 0x11, 0x20, 0x01,
0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61,
0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x53, 0x77, 0x69, 0x74, 0x63, 0x68, 0x45, 0x78, 0x70, 0x72, 0x48,
0x00, 0x52, 0x06, 0x73, 0x77, 0x69, 0x74, 0x63, 0x68, 0x42, 0x06, 0x0a, 0x04, 0x65, 0x78, 0x70,
0x72, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x05, 0x0a, 0x03, 0x5f, 0x69,
0x66, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x61, 0x75, 0x74, 0x6f, 0x62, 0x69, 0x6e, 0x64, 0x22, 0xc5,
0x01, 0x0a, 0x07, 0x4d, 0x61, 0x70, 0x45, 0x78, 0x70, 0x72, 0x12, 0x35, 0x0a, 0x08, 0x69, 0x74,
0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67,
0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x49,
0x74, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x08, 0x69, 0x74, 0x65, 0x72, 0x61, 0x74, 0x6f,
0x72, 0x12, 0x10, 0x0a, 0x02, 0x62, 0x79, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52,
0x02, 0x62, 0x79, 0x12, 0x38, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x0c,
0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65,
0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x45, 0x78,
0x70, 0x72, 0x48, 0x00, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x2f, 0x0a,
0x04, 0x65, 0x6e, 0x75, 0x6d, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x72,
0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x45, 0x6e,
0x75, 0x6d, 0x45, 0x78, 0x70, 0x72, 0x48, 0x00, 0x52, 0x04, 0x65, 0x6e, 0x75, 0x6d, 0x42, 0x06,
0x0a, 0x04, 0x65, 0x78, 0x70, 0x72, 0x22, 0x30, 0x0a, 0x08, 0x49, 0x74, 0x65, 0x72, 0x61, 0x74,
0x6f, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x73, 0x72, 0x63, 0x18, 0x02, 0x20,
0x01, 0x28, 0x09, 0x52, 0x03, 0x73, 0x72, 0x63, 0x22, 0x50, 0x0a, 0x0b, 0x4d, 0x65, 0x73, 0x73,
0x61, 0x67, 0x65, 0x45, 0x78, 0x70, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18,
0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x2d, 0x0a, 0x04, 0x61,
0x72, 0x67, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x72, 0x70, 0x63,
0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x41, 0x72, 0x67, 0x75,
0x6d, 0x65, 0x6e, 0x74, 0x52, 0x04, 0x61, 0x72, 0x67, 0x73, 0x22, 0x2e, 0x0a, 0x08, 0x45, 0x6e,
0x75, 0x6d, 0x45, 0x78, 0x70, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01,
0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x62, 0x79,
0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x62, 0x79, 0x22, 0xf3, 0x02, 0x0a, 0x08, 0x43,
0x61, 0x6c, 0x6c, 0x45, 0x78, 0x70, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f,
0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12,
0x38, 0x0a, 0x07, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b,
0x32, 0x1e, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69,
0x6f, 0x6e, 0x2e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
0x52, 0x07, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x07, 0x74, 0x69, 0x6d,
0x65, 0x6f, 0x75, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x07, 0x74, 0x69,
0x6d, 0x65, 0x6f, 0x75, 0x74, 0x88, 0x01, 0x01, 0x12, 0x37, 0x0a, 0x05, 0x72, 0x65, 0x74, 0x72,
0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66,
0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x52, 0x65, 0x74, 0x72, 0x79, 0x50,
0x6f, 0x6c, 0x69, 0x63, 0x79, 0x48, 0x01, 0x52, 0x05, 0x72, 0x65, 0x74, 0x72, 0x79, 0x88, 0x01,
0x01, 0x12, 0x30, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b,
0x32, 0x1a, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69,
0x6f, 0x6e, 0x2e, 0x47, 0x52, 0x50, 0x43, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x05, 0x65, 0x72,
0x72, 0x6f, 0x72, 0x12, 0x3c, 0x0a, 0x06, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x06, 0x20,
0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72,
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x47, 0x52, 0x50, 0x43, 0x43, 0x61, 0x6c, 0x6c, 0x4f, 0x70,
0x74, 0x69, 0x6f, 0x6e, 0x48, 0x02, 0x52, 0x06, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x88, 0x01,
0x01, 0x12, 0x1f, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x07, 0x20,
0x01, 0x28, 0x09, 0x48, 0x03, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x88,
0x01, 0x01, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x42, 0x08,
0x0a, 0x06, 0x5f, 0x72, 0x65, 0x74, 0x72, 0x79, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6f, 0x70, 0x74,
0x69, 0x6f, 0x6e, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61,
0x22, 0x7f, 0x0a, 0x0a, 0x53, 0x77, 0x69, 0x74, 0x63, 0x68, 0x45, 0x78, 0x70, 0x72, 0x12, 0x33,
0x0a, 0x04, 0x63, 0x61, 0x73, 0x65, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x67,
0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x53,
0x77, 0x69, 0x74, 0x63, 0x68, 0x43, 0x61, 0x73, 0x65, 0x45, 0x78, 0x70, 0x72, 0x52, 0x04, 0x63,
0x61, 0x73, 0x65, 0x12, 0x3c, 0x0a, 0x07, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x18, 0x02,
0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65,
0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x53, 0x77, 0x69, 0x74, 0x63, 0x68, 0x44, 0x65, 0x66,
0x61, 0x75, 0x6c, 0x74, 0x45, 0x78, 0x70, 0x72, 0x52, 0x07, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c,
0x74, 0x22, 0x71, 0x0a, 0x0e, 0x53, 0x77, 0x69, 0x74, 0x63, 0x68, 0x43, 0x61, 0x73, 0x65, 0x45,
0x78, 0x70, 0x72, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x66, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
0x02, 0x69, 0x66, 0x12, 0x35, 0x0a, 0x03, 0x64, 0x65, 0x66, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b,
0x32, 0x23, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69,
0x6f, 0x6e, 0x2e, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x44, 0x65, 0x66, 0x69, 0x6e,
0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x03, 0x64, 0x65, 0x66, 0x12, 0x10, 0x0a, 0x02, 0x62, 0x79,
0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x02, 0x62, 0x79, 0x42, 0x06, 0x0a, 0x04,
0x65, 0x78, 0x70, 0x72, 0x22, 0x64, 0x0a, 0x11, 0x53, 0x77, 0x69, 0x74, 0x63, 0x68, 0x44, 0x65,
0x66, 0x61, 0x75, 0x6c, 0x74, 0x45, 0x78, 0x70, 0x72, 0x12, 0x35, 0x0a, 0x03, 0x64, 0x65, 0x66,
0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65,
0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c,
0x65, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x03, 0x64, 0x65, 0x66,
0x12, 0x10, 0x0a, 0x02, 0x62, 0x79, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x02,
0x62, 0x79, 0x42, 0x06, 0x0a, 0x04, 0x65, 0x78, 0x70, 0x72, 0x22, 0x86, 0x04, 0x0a, 0x09, 0x47,
0x52, 0x50, 0x43, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x35, 0x0a, 0x03, 0x64, 0x65, 0x66, 0x18,
0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64,
0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65,
0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x03, 0x64, 0x65, 0x66, 0x12,
0x13, 0x0a, 0x02, 0x69, 0x66, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x02, 0x69,
0x66, 0x88, 0x01, 0x01, 0x12, 0x29, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x03, 0x20, 0x01,
0x28, 0x0e, 0x32, 0x10, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x72, 0x70, 0x63, 0x2e,
0x43, 0x6f, 0x64, 0x65, 0x48, 0x01, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x88, 0x01, 0x01, 0x12,
0x1d, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09,
0x48, 0x02, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x88, 0x01, 0x01, 0x12, 0x3a,
0x0a, 0x07, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32,
0x20, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f,
0x6e, 0x2e, 0x47, 0x52, 0x50, 0x43, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x44, 0x65, 0x74, 0x61, 0x69,
0x6c, 0x52, 0x07, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x12, 0x1b, 0x0a, 0x06, 0x69, 0x67,
0x6e, 0x6f, 0x72, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x48, 0x03, 0x52, 0x06, 0x69, 0x67,
0x6e, 0x6f, 0x72, 0x65, 0x88, 0x01, 0x01, 0x12, 0x33, 0x0a, 0x13, 0x69, 0x67, 0x6e, 0x6f, 0x72,
0x65, 0x5f, 0x61, 0x6e, 0x64, 0x5f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x07,
0x20, 0x01, 0x28, 0x09, 0x48, 0x04, 0x52, 0x11, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x41, 0x6e,
0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x88, 0x01, 0x01, 0x12, 0x45, 0x0a, 0x09,
0x6c, 0x6f, 0x67, 0x5f, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0e, 0x32,
0x23, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f,
0x6e, 0x2e, 0x47, 0x52, 0x50, 0x43, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x2e, 0x4c, 0x6f, 0x67, 0x4c,
0x65, 0x76, 0x65, 0x6c, 0x48, 0x05, 0x52, 0x08, 0x6c, 0x6f, 0x67, 0x4c, 0x65, 0x76, 0x65, 0x6c,
0x88, 0x01, 0x01, 0x22, 0x41, 0x0a, 0x08, 0x4c, 0x6f, 0x67, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x12,
0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05,
0x44, 0x45, 0x42, 0x55, 0x47, 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, 0x49, 0x4e, 0x46, 0x4f, 0x10,
0x02, 0x12, 0x08, 0x0a, 0x04, 0x57, 0x41, 0x52, 0x4e, 0x10, 0x03, 0x12, 0x09, 0x0a, 0x05, 0x45,
0x52, 0x52, 0x4f, 0x52, 0x10, 0x04, 0x42, 0x05, 0x0a, 0x03, 0x5f, 0x69, 0x66, 0x42, 0x07, 0x0a,
0x05, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61,
0x67, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x42, 0x16, 0x0a,
0x14, 0x5f, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x5f, 0x61, 0x6e, 0x64, 0x5f, 0x72, 0x65, 0x73,
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x6c, 0x6f, 0x67, 0x5f, 0x6c, 0x65,
0x76, 0x65, 0x6c, 0x22, 0xfa, 0x05, 0x0a, 0x0f, 0x47, 0x52, 0x50, 0x43, 0x45, 0x72, 0x72, 0x6f,
0x72, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x66, 0x18, 0x01, 0x20,
0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x66, 0x12, 0x35, 0x0a, 0x03, 0x64, 0x65, 0x66, 0x18, 0x02,
0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65,
0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x44,
0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x03, 0x64, 0x65, 0x66, 0x12, 0x36,
0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32,
0x1c, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f,
0x6e, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x45, 0x78, 0x70, 0x72, 0x52, 0x07, 0x6d,
0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x34, 0x0a, 0x0a, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f,
0x69, 0x6e, 0x66, 0x6f, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x67, 0x6f, 0x6f,
0x67, 0x6c, 0x65, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x49, 0x6e, 0x66,
0x6f, 0x52, 0x09, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x34, 0x0a, 0x0a,
0x72, 0x65, 0x74, 0x72, 0x79, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b,
0x32, 0x15, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x52, 0x65,
0x74, 0x72, 0x79, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x09, 0x72, 0x65, 0x74, 0x72, 0x79, 0x49, 0x6e,
0x66, 0x6f, 0x12, 0x34, 0x0a, 0x0a, 0x64, 0x65, 0x62, 0x75, 0x67, 0x5f, 0x69, 0x6e, 0x66, 0x6f,
0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e,
0x72, 0x70, 0x63, 0x2e, 0x44, 0x65, 0x62, 0x75, 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x09, 0x64,
0x65, 0x62, 0x75, 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x3d, 0x0a, 0x0d, 0x71, 0x75, 0x6f, 0x74,
0x61, 0x5f, 0x66, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32,
0x18, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x51, 0x75, 0x6f,
0x74, 0x61, 0x46, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x52, 0x0c, 0x71, 0x75, 0x6f, 0x74, 0x61,
0x46, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x12, 0x52, 0x0a, 0x14, 0x70, 0x72, 0x65, 0x63, 0x6f,
0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x66, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x18,
0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x72,
0x70, 0x63, 0x2e, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x46,
0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x52, 0x13, 0x70, 0x72, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x69,
0x74, 0x69, 0x6f, 0x6e, 0x46, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x12, 0x37, 0x0a, 0x0b, 0x62,
0x61, 0x64, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b,
0x32, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x42, 0x61,
0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x0a, 0x62, 0x61, 0x64, 0x52, 0x65, 0x71,
0x75, 0x65, 0x73, 0x74, 0x12, 0x3a, 0x0a, 0x0c, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f,
0x69, 0x6e, 0x66, 0x6f, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f,
0x67, 0x6c, 0x65, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x49,
0x6e, 0x66, 0x6f, 0x52, 0x0b, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, 0x6e, 0x66, 0x6f,
0x12, 0x3d, 0x0a, 0x0d, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x69, 0x6e, 0x66,
0x6f, 0x18, 0x0b, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,
0x2e, 0x72, 0x70, 0x63, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x6e, 0x66,
0x6f, 0x52, 0x0c, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12,
0x24, 0x0a, 0x04, 0x68, 0x65, 0x6c, 0x70, 0x18, 0x0c, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e,
0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x48, 0x65, 0x6c, 0x70, 0x52,
0x04, 0x68, 0x65, 0x6c, 0x70, 0x12, 0x49, 0x0a, 0x11, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x69, 0x7a,
0x65, 0x64, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x0d, 0x20, 0x03, 0x28, 0x0b,
0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x6f,
0x63, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x10,
0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65,
0x12, 0x0e, 0x0a, 0x02, 0x62, 0x79, 0x18, 0x0e, 0x20, 0x03, 0x28, 0x09, 0x52, 0x02, 0x62, 0x79,
0x22, 0xc7, 0x03, 0x0a, 0x0e, 0x47, 0x52, 0x50, 0x43, 0x43, 0x61, 0x6c, 0x6c, 0x4f, 0x70, 0x74,
0x69, 0x6f, 0x6e, 0x12, 0x2c, 0x0a, 0x0f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x5f, 0x73,
0x75, 0x62, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0e,
0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x53, 0x75, 0x62, 0x74, 0x79, 0x70, 0x65, 0x88, 0x01,
0x01, 0x12, 0x1b, 0x0a, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28,
0x09, 0x48, 0x01, 0x52, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x88, 0x01, 0x01, 0x12, 0x37,
0x0a, 0x16, 0x6d, 0x61, 0x78, 0x5f, 0x63, 0x61, 0x6c, 0x6c, 0x5f, 0x72, 0x65, 0x63, 0x76, 0x5f,
0x6d, 0x73, 0x67, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x48, 0x02,
0x52, 0x12, 0x6d, 0x61, 0x78, 0x43, 0x61, 0x6c, 0x6c, 0x52, 0x65, 0x63, 0x76, 0x4d, 0x73, 0x67,
0x53, 0x69, 0x7a, 0x65, 0x88, 0x01, 0x01, 0x12, 0x37, 0x0a, 0x16, 0x6d, 0x61, 0x78, 0x5f, 0x63,
0x61, 0x6c, 0x6c, 0x5f, 0x73, 0x65, 0x6e, 0x64, 0x5f, 0x6d, 0x73, 0x67, 0x5f, 0x73, 0x69, 0x7a,
0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x48, 0x03, 0x52, 0x12, 0x6d, 0x61, 0x78, 0x43, 0x61,
0x6c, 0x6c, 0x53, 0x65, 0x6e, 0x64, 0x4d, 0x73, 0x67, 0x53, 0x69, 0x7a, 0x65, 0x88, 0x01, 0x01,
0x12, 0x28, 0x0a, 0x0d, 0x73, 0x74, 0x61, 0x74, 0x69, 0x63, 0x5f, 0x6d, 0x65, 0x74, 0x68, 0x6f,
0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x48, 0x04, 0x52, 0x0c, 0x73, 0x74, 0x61, 0x74, 0x69,
0x63, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x88, 0x01, 0x01, 0x12, 0x1d, 0x0a, 0x07, 0x74, 0x72,
0x61, 0x69, 0x6c, 0x65, 0x72, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x48, 0x05, 0x52, 0x07, 0x74,
0x72, 0x61, 0x69, 0x6c, 0x65, 0x72, 0x88, 0x01, 0x01, 0x12, 0x29, 0x0a, 0x0e, 0x77, 0x61, 0x69,
0x74, 0x5f, 0x66, 0x6f, 0x72, 0x5f, 0x72, 0x65, 0x61, 0x64, 0x79, 0x18, 0x07, 0x20, 0x01, 0x28,
0x08, 0x48, 0x06, 0x52, 0x0c, 0x77, 0x61, 0x69, 0x74, 0x46, 0x6f, 0x72, 0x52, 0x65, 0x61, 0x64,
0x79, 0x88, 0x01, 0x01, 0x42, 0x12, 0x0a, 0x10, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74,
0x5f, 0x73, 0x75, 0x62, 0x74, 0x79, 0x70, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x68, 0x65, 0x61,
0x64, 0x65, 0x72, 0x42, 0x19, 0x0a, 0x17, 0x5f, 0x6d, 0x61, 0x78, 0x5f, 0x63, 0x61, 0x6c, 0x6c,
0x5f, 0x72, 0x65, 0x63, 0x76, 0x5f, 0x6d, 0x73, 0x67, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x42, 0x19,
0x0a, 0x17, 0x5f, 0x6d, 0x61, 0x78, 0x5f, 0x63, 0x61, 0x6c, 0x6c, 0x5f, 0x73, 0x65, 0x6e, 0x64,
0x5f, 0x6d, 0x73, 0x67, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x42, 0x10, 0x0a, 0x0e, 0x5f, 0x73, 0x74,
0x61, 0x74, 0x69, 0x63, 0x5f, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x42, 0x0a, 0x0a, 0x08, 0x5f,
0x74, 0x72, 0x61, 0x69, 0x6c, 0x65, 0x72, 0x42, 0x11, 0x0a, 0x0f, 0x5f, 0x77, 0x61, 0x69, 0x74,
0x5f, 0x66, 0x6f, 0x72, 0x5f, 0x72, 0x65, 0x61, 0x64, 0x79, 0x22, 0x64, 0x0a, 0x0e, 0x56, 0x61,
0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x78, 0x70, 0x72, 0x12, 0x17, 0x0a, 0x04,
0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61,
0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x30, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x02,
0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65,
0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x47, 0x52, 0x50, 0x43, 0x45, 0x72, 0x72, 0x6f, 0x72,
0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65,
0x22, 0xb8, 0x01, 0x0a, 0x0b, 0x52, 0x65, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79,
0x12, 0x42, 0x0a, 0x08, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01,
0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61,
0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x52, 0x65, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79,
0x43, 0x6f, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x08, 0x63, 0x6f, 0x6e, 0x73,
0x74, 0x61, 0x6e, 0x74, 0x12, 0x4b, 0x0a, 0x0b, 0x65, 0x78, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74,
0x69, 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x67, 0x72, 0x70, 0x63,
0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x52, 0x65, 0x74, 0x72,
0x79, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x45, 0x78, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x69,
0x61, 0x6c, 0x48, 0x00, 0x52, 0x0b, 0x65, 0x78, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x69, 0x61,
0x6c, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x66, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69,
0x66, 0x42, 0x08, 0x0a, 0x06, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x22, 0x79, 0x0a, 0x13, 0x52,
0x65, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x61,
0x6e, 0x74, 0x12, 0x1f, 0x0a, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x01,
0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c,
0x88, 0x01, 0x01, 0x12, 0x24, 0x0a, 0x0b, 0x6d, 0x61, 0x78, 0x5f, 0x72, 0x65, 0x74, 0x72, 0x69,
0x65, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x48, 0x01, 0x52, 0x0a, 0x6d, 0x61, 0x78, 0x52,
0x65, 0x74, 0x72, 0x69, 0x65, 0x73, 0x88, 0x01, 0x01, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x69, 0x6e,
0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x6d, 0x61, 0x78, 0x5f, 0x72,
0x65, 0x74, 0x72, 0x69, 0x65, 0x73, 0x22, 0xd1, 0x02, 0x0a, 0x16, 0x52, 0x65, 0x74, 0x72, 0x79,
0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x45, 0x78, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x69, 0x61,
0x6c, 0x12, 0x2e, 0x0a, 0x10, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x5f, 0x69, 0x6e, 0x74,
0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0f, 0x69,
0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x88, 0x01,
0x01, 0x12, 0x36, 0x0a, 0x14, 0x72, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x69, 0x7a, 0x61, 0x74, 0x69,
0x6f, 0x6e, 0x5f, 0x66, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x01, 0x48,
0x01, 0x52, 0x13, 0x72, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e,
0x46, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x88, 0x01, 0x01, 0x12, 0x23, 0x0a, 0x0a, 0x6d, 0x75, 0x6c,
0x74, 0x69, 0x70, 0x6c, 0x69, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x01, 0x48, 0x02, 0x52,
0x0a, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x69, 0x65, 0x72, 0x88, 0x01, 0x01, 0x12, 0x26,
0x0a, 0x0c, 0x6d, 0x61, 0x78, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x04,
0x20, 0x01, 0x28, 0x09, 0x48, 0x03, 0x52, 0x0b, 0x6d, 0x61, 0x78, 0x49, 0x6e, 0x74, 0x65, 0x72,
0x76, 0x61, 0x6c, 0x88, 0x01, 0x01, 0x12, 0x24, 0x0a, 0x0b, 0x6d, 0x61, 0x78, 0x5f, 0x72, 0x65,
0x74, 0x72, 0x69, 0x65, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x48, 0x04, 0x52, 0x0a, 0x6d,
0x61, 0x78, 0x52, 0x65, 0x74, 0x72, 0x69, 0x65, 0x73, 0x88, 0x01, 0x01, 0x42, 0x13, 0x0a, 0x11,
0x5f, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61,
0x6c, 0x42, 0x17, 0x0a, 0x15, 0x5f, 0x72, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x69, 0x7a, 0x61, 0x74,
0x69, 0x6f, 0x6e, 0x5f, 0x66, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x6d,
0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x69, 0x65, 0x72, 0x42, 0x0f, 0x0a, 0x0d, 0x5f, 0x6d, 0x61,
0x78, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x6d,
0x61, 0x78, 0x5f, 0x72, 0x65, 0x74, 0x72, 0x69, 0x65, 0x73, 0x22, 0x5d, 0x0a, 0x0d, 0x4d, 0x65,
0x74, 0x68, 0x6f, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x66,
0x69, 0x65, 0x6c, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x66, 0x69, 0x65, 0x6c,
0x64, 0x12, 0x13, 0x0a, 0x02, 0x62, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52,
0x02, 0x62, 0x79, 0x88, 0x01, 0x01, 0x12, 0x13, 0x0a, 0x02, 0x69, 0x66, 0x18, 0x03, 0x20, 0x01,
0x28, 0x09, 0x48, 0x01, 0x52, 0x02, 0x69, 0x66, 0x88, 0x01, 0x01, 0x42, 0x05, 0x0a, 0x03, 0x5f,
0x62, 0x79, 0x42, 0x05, 0x0a, 0x03, 0x5f, 0x69, 0x66, 0x22, 0x85, 0x01, 0x0a, 0x0e, 0x4d, 0x65,
0x74, 0x68, 0x6f, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x17, 0x0a, 0x04,
0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61,
0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x18, 0x02,
0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x05, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x88, 0x01, 0x01,
0x12, 0x1f, 0x0a, 0x08, 0x61, 0x75, 0x74, 0x6f, 0x62, 0x69, 0x6e, 0x64, 0x18, 0x03, 0x20, 0x01,
0x28, 0x08, 0x48, 0x02, 0x52, 0x08, 0x61, 0x75, 0x74, 0x6f, 0x62, 0x69, 0x6e, 0x64, 0x88, 0x01,
0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x66,
0x69, 0x65, 0x6c, 0x64, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x61, 0x75, 0x74, 0x6f, 0x62, 0x69, 0x6e,
0x64, 0x22, 0x62, 0x0a, 0x08, 0x41, 0x72, 0x67, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x12, 0x0a,
0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d,
0x65, 0x12, 0x13, 0x0a, 0x02, 0x62, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52,
0x02, 0x62, 0x79, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x69, 0x6e, 0x6c, 0x69, 0x6e, 0x65,
0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x06, 0x69, 0x6e, 0x6c, 0x69, 0x6e, 0x65,
0x88, 0x01, 0x01, 0x42, 0x05, 0x0a, 0x03, 0x5f, 0x62, 0x79, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x69,
0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x22, 0xf2, 0x01, 0x0a, 0x09, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x52,
0x75, 0x6c, 0x65, 0x12, 0x2c, 0x0a, 0x0f, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x5f, 0x72, 0x65,
0x73, 0x6f, 0x6c, 0x76, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x0e,
0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x52, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x72, 0x88, 0x01,
0x01, 0x12, 0x13, 0x0a, 0x02, 0x62, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52,
0x02, 0x62, 0x79, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x18,
0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x02, 0x52, 0x05, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x88, 0x01,
0x01, 0x12, 0x31, 0x0a, 0x05, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b,
0x32, 0x1b, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69,
0x6f, 0x6e, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x6e, 0x65, 0x6f, 0x66, 0x52, 0x05, 0x6f,
0x6e, 0x65, 0x6f, 0x66, 0x12, 0x2f, 0x0a, 0x03, 0x65, 0x6e, 0x76, 0x18, 0x05, 0x20, 0x01, 0x28,
0x0b, 0x32, 0x1d, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74,
0x69, 0x6f, 0x6e, 0x2e, 0x45, 0x6e, 0x76, 0x56, 0x61, 0x72, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e,
0x52, 0x03, 0x65, 0x6e, 0x76, 0x42, 0x12, 0x0a, 0x10, 0x5f, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d,
0x5f, 0x72, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x72, 0x42, 0x05, 0x0a, 0x03, 0x5f, 0x62, 0x79,
0x42, 0x08, 0x0a, 0x06, 0x5f, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x22, 0x89, 0x01, 0x0a, 0x0a, 0x46,
0x69, 0x65, 0x6c, 0x64, 0x4f, 0x6e, 0x65, 0x6f, 0x66, 0x12, 0x10, 0x0a, 0x02, 0x69, 0x66, 0x18,
0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x02, 0x69, 0x66, 0x12, 0x1a, 0x0a, 0x07, 0x64,
0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x07,
0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x12, 0x35, 0x0a, 0x03, 0x64, 0x65, 0x66, 0x18, 0x03,
0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65,
0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x44,
0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x03, 0x64, 0x65, 0x66, 0x12, 0x0e,
0x0a, 0x02, 0x62, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x62, 0x79, 0x42, 0x06,
0x0a, 0x04, 0x63, 0x6f, 0x6e, 0x64, 0x22, 0x45, 0x0a, 0x09, 0x43, 0x45, 0x4c, 0x50, 0x6c, 0x75,
0x67, 0x69, 0x6e, 0x12, 0x38, 0x0a, 0x06, 0x65, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x01, 0x20,
0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72,
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x43, 0x45, 0x4c, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x45,
0x78, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x06, 0x65, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x22, 0xaf, 0x02,
0x0a, 0x0f, 0x43, 0x45, 0x4c, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x45, 0x78, 0x70, 0x6f, 0x72,
0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x65, 0x73, 0x63, 0x18, 0x02, 0x20,
0x01, 0x28, 0x09, 0x52, 0x04, 0x64, 0x65, 0x73, 0x63, 0x12, 0x36, 0x0a, 0x05, 0x74, 0x79, 0x70,
0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e,
0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x43, 0x45, 0x4c, 0x52, 0x65,
0x63, 0x65, 0x69, 0x76, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x52, 0x05, 0x74, 0x79, 0x70, 0x65,
0x73, 0x12, 0x3a, 0x0a, 0x09, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x04,
0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65,
0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x43, 0x45, 0x4c, 0x46, 0x75, 0x6e, 0x63, 0x74, 0x69,
0x6f, 0x6e, 0x52, 0x09, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x3a, 0x0a,
0x09, 0x76, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b,
0x32, 0x1c, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69,
0x6f, 0x6e, 0x2e, 0x43, 0x45, 0x4c, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x09,
0x76, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x12, 0x44, 0x0a, 0x0a, 0x63, 0x61, 0x70,
0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e,
0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e,
0x43, 0x45, 0x4c, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c,
0x69, 0x74, 0x79, 0x52, 0x0a, 0x63, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x22,
0x9b, 0x02, 0x0a, 0x13, 0x43, 0x45, 0x4c, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x43, 0x61, 0x70,
0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x12, 0x3e, 0x0a, 0x03, 0x65, 0x6e, 0x76, 0x18, 0x01,
0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65,
0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x43, 0x45, 0x4c, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e,
0x45, 0x6e, 0x76, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x48, 0x00, 0x52,
0x03, 0x65, 0x6e, 0x76, 0x88, 0x01, 0x01, 0x12, 0x54, 0x0a, 0x0b, 0x66, 0x69, 0x6c, 0x65, 0x5f,
0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x67,
0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x43,
0x45, 0x4c, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x46, 0x69, 0x6c, 0x65, 0x53, 0x79, 0x73, 0x74,
0x65, 0x6d, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x48, 0x01, 0x52, 0x0a,
0x66, 0x69, 0x6c, 0x65, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x88, 0x01, 0x01, 0x12, 0x4a, 0x0a,
0x07, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b,
0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e,
0x2e, 0x43, 0x45, 0x4c, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72,
0x6b, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x48, 0x02, 0x52, 0x07, 0x6e,
0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x88, 0x01, 0x01, 0x42, 0x06, 0x0a, 0x04, 0x5f, 0x65, 0x6e,
0x76, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x73, 0x79, 0x73, 0x74, 0x65,
0x6d, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x22, 0x40, 0x0a,
0x16, 0x43, 0x45, 0x4c, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x45, 0x6e, 0x76, 0x43, 0x61, 0x70,
0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x61, 0x6c, 0x6c, 0x18, 0x01,
0x20, 0x01, 0x28, 0x08, 0x52, 0x03, 0x61, 0x6c, 0x6c, 0x12, 0x14, 0x0a, 0x05, 0x6e, 0x61, 0x6d,
0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x22,
0x3e, 0x0a, 0x1d, 0x43, 0x45, 0x4c, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x46, 0x69, 0x6c, 0x65,
0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79,
0x12, 0x1d, 0x0a, 0x0a, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01,
0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x50, 0x61, 0x74, 0x68, 0x22,
0x1c, 0x0a, 0x1a, 0x43, 0x45, 0x4c, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x4e, 0x65, 0x74, 0x77,
0x6f, 0x72, 0x6b, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x22, 0xa1, 0x01,
0x0a, 0x0b, 0x43, 0x45, 0x4c, 0x46, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a,
0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d,
0x65, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x65, 0x73, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52,
0x04, 0x64, 0x65, 0x73, 0x63, 0x12, 0x38, 0x0a, 0x04, 0x61, 0x72, 0x67, 0x73, 0x18, 0x03, 0x20,
0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72,
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x43, 0x45, 0x4c, 0x46, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f,
0x6e, 0x41, 0x72, 0x67, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x04, 0x61, 0x72, 0x67, 0x73, 0x12,
0x30, 0x0a, 0x06, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32,
0x18, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f,
0x6e, 0x2e, 0x43, 0x45, 0x4c, 0x54, 0x79, 0x70, 0x65, 0x52, 0x06, 0x72, 0x65, 0x74, 0x75, 0x72,
0x6e, 0x22, 0x71, 0x0a, 0x0f, 0x43, 0x45, 0x4c, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x72,
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, 0x12, 0x0a, 0x04, 0x64, 0x65, 0x73, 0x63,
0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x64, 0x65, 0x73, 0x63, 0x12, 0x36, 0x0a, 0x07,
0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e,
0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e,
0x43, 0x45, 0x4c, 0x46, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x6d, 0x65, 0x74,
0x68, 0x6f, 0x64, 0x73, 0x22, 0x6b, 0x0a, 0x13, 0x43, 0x45, 0x4c, 0x46, 0x75, 0x6e, 0x63, 0x74,
0x69, 0x6f, 0x6e, 0x41, 0x72, 0x67, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e,
0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12,
0x12, 0x0a, 0x04, 0x64, 0x65, 0x73, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x64,
0x65, 0x73, 0x63, 0x12, 0x2c, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28,
0x0b, 0x32, 0x18, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74,
0x69, 0x6f, 0x6e, 0x2e, 0x43, 0x45, 0x4c, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70,
0x65, 0x22, 0xdd, 0x01, 0x0a, 0x07, 0x43, 0x45, 0x4c, 0x54, 0x79, 0x70, 0x65, 0x12, 0x2f, 0x0a,
0x04, 0x6b, 0x69, 0x6e, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x19, 0x2e, 0x67, 0x72,
0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x54, 0x79,
0x70, 0x65, 0x4b, 0x69, 0x6e, 0x64, 0x48, 0x00, 0x52, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x12, 0x36,
0x0a, 0x08, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b,
0x32, 0x18, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69,
0x6f, 0x6e, 0x2e, 0x43, 0x45, 0x4c, 0x54, 0x79, 0x70, 0x65, 0x48, 0x00, 0x52, 0x08, 0x72, 0x65,
0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x12, 0x2f, 0x0a, 0x03, 0x6d, 0x61, 0x70, 0x18, 0x03, 0x20,
0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72,
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x43, 0x45, 0x4c, 0x4d, 0x61, 0x70, 0x54, 0x79, 0x70, 0x65,
0x48, 0x00, 0x52, 0x03, 0x6d, 0x61, 0x70, 0x12, 0x1a, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61,
0x67, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73,
0x61, 0x67, 0x65, 0x12, 0x14, 0x0a, 0x04, 0x65, 0x6e, 0x75, 0x6d, 0x18, 0x05, 0x20, 0x01, 0x28,
0x09, 0x48, 0x00, 0x52, 0x04, 0x65, 0x6e, 0x75, 0x6d, 0x42, 0x06, 0x0a, 0x04, 0x74, 0x79, 0x70,
0x65, 0x22, 0x68, 0x0a, 0x0a, 0x43, 0x45, 0x4c, 0x4d, 0x61, 0x70, 0x54, 0x79, 0x70, 0x65, 0x12,
0x2a, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x67,
0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x43,
0x45, 0x4c, 0x54, 0x79, 0x70, 0x65, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x2e, 0x0a, 0x05, 0x76,
0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x67, 0x72, 0x70,
0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x43, 0x45, 0x4c,
0x54, 0x79, 0x70, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x63, 0x0a, 0x0b, 0x43,
0x45, 0x4c, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61,
0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x12,
0x0a, 0x04, 0x64, 0x65, 0x73, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x64, 0x65,
0x73, 0x63, 0x12, 0x2c, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b,
0x32, 0x18, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69,
0x6f, 0x6e, 0x2e, 0x43, 0x45, 0x4c, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65,
0x2a, 0x5e, 0x0a, 0x08, 0x54, 0x79, 0x70, 0x65, 0x4b, 0x69, 0x6e, 0x64, 0x12, 0x0b, 0x0a, 0x07,
0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x53, 0x54, 0x52,
0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, 0x42, 0x4f, 0x4f, 0x4c, 0x10, 0x02, 0x12,
0x09, 0x0a, 0x05, 0x49, 0x4e, 0x54, 0x36, 0x34, 0x10, 0x03, 0x12, 0x0a, 0x0a, 0x06, 0x55, 0x49,
0x4e, 0x54, 0x36, 0x34, 0x10, 0x04, 0x12, 0x0a, 0x0a, 0x06, 0x44, 0x4f, 0x55, 0x42, 0x4c, 0x45,
0x10, 0x05, 0x12, 0x0c, 0x0a, 0x08, 0x44, 0x55, 0x52, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x06,
0x3a, 0x4c, 0x0a, 0x04, 0x66, 0x69, 0x6c, 0x65, 0x12, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c,
0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x4f,
0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xa3, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e,
0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e,
0x46, 0x69, 0x6c, 0x65, 0x52, 0x75, 0x6c, 0x65, 0x52, 0x04, 0x66, 0x69, 0x6c, 0x65, 0x3a, 0x58,
0x0a, 0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x1f, 0x2e, 0x67, 0x6f, 0x6f, 0x67,
0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x65, 0x72, 0x76,
0x69, 0x63, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xa3, 0x09, 0x20, 0x01, 0x28,
0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74,
0x69, 0x6f, 0x6e, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x75, 0x6c, 0x65, 0x52,
0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x3a, 0x54, 0x0a, 0x06, 0x6d, 0x65, 0x74, 0x68,
0x6f, 0x64, 0x12, 0x1e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f,
0x6e, 0x73, 0x18, 0xa3, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x72, 0x70, 0x63,
0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x4d, 0x65, 0x74, 0x68,
0x6f, 0x64, 0x52, 0x75, 0x6c, 0x65, 0x52, 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x3a, 0x58,
0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x1f, 0x2e, 0x67, 0x6f, 0x6f, 0x67,
0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4d, 0x65, 0x73, 0x73,
0x61, 0x67, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xa3, 0x09, 0x20, 0x01, 0x28,
0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74,
0x69, 0x6f, 0x6e, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x75, 0x6c, 0x65, 0x52,
0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x3a, 0x50, 0x0a, 0x05, 0x66, 0x69, 0x65, 0x6c,
0x64, 0x12, 0x1d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73,
0x18, 0xa3, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66,
0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x52,
0x75, 0x6c, 0x65, 0x52, 0x05, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x3a, 0x4c, 0x0a, 0x04, 0x65, 0x6e,
0x75, 0x6d, 0x12, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73,
0x18, 0xa3, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66,
0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x52, 0x75,
0x6c, 0x65, 0x52, 0x04, 0x65, 0x6e, 0x75, 0x6d, 0x3a, 0x61, 0x0a, 0x0a, 0x65, 0x6e, 0x75, 0x6d,
0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x21, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x56, 0x61, 0x6c,
0x75, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xa3, 0x09, 0x20, 0x01, 0x28, 0x0b,
0x32, 0x1e, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69,
0x6f, 0x6e, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x75, 0x6c, 0x65,
0x52, 0x09, 0x65, 0x6e, 0x75, 0x6d, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x50, 0x0a, 0x05, 0x6f,
0x6e, 0x65, 0x6f, 0x66, 0x12, 0x1d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4f, 0x6e, 0x65, 0x6f, 0x66, 0x4f, 0x70, 0x74, 0x69,
0x6f, 0x6e, 0x73, 0x18, 0xa3, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x72, 0x70,
0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x4f, 0x6e, 0x65,
0x6f, 0x66, 0x52, 0x75, 0x6c, 0x65, 0x52, 0x05, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x42, 0xc2, 0x01,
0x0a, 0x13, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72,
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x0f, 0x46, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f,
0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3d, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62,
0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6d, 0x65, 0x72, 0x63, 0x61, 0x72, 0x69, 0x2f, 0x67, 0x72, 0x70,
0x63, 0x2d, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x67, 0x72, 0x70,
0x63, 0x2f, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x3b, 0x66, 0x65, 0x64,
0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0xa2, 0x02, 0x03, 0x47, 0x46, 0x58, 0xaa, 0x02, 0x0f,
0x47, 0x72, 0x70, 0x63, 0x2e, 0x46, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0xca,
0x02, 0x0f, 0x47, 0x72, 0x70, 0x63, 0x5c, 0x46, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f,
0x6e, 0xe2, 0x02, 0x1b, 0x47, 0x72, 0x70, 0x63, 0x5c, 0x46, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74,
0x69, 0x6f, 0x6e, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea,
0x02, 0x10, 0x47, 0x72, 0x70, 0x63, 0x3a, 0x3a, 0x46, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69,
0x6f, 0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_grpc_federation_federation_proto_rawDescOnce sync.Once
file_grpc_federation_federation_proto_rawDescData = file_grpc_federation_federation_proto_rawDesc
)
func file_grpc_federation_federation_proto_rawDescGZIP() []byte {
file_grpc_federation_federation_proto_rawDescOnce.Do(func() {
file_grpc_federation_federation_proto_rawDescData = protoimpl.X.CompressGZIP(file_grpc_federation_federation_proto_rawDescData)
})
return file_grpc_federation_federation_proto_rawDescData
}
var file_grpc_federation_federation_proto_enumTypes = make([]protoimpl.EnumInfo, 2)
var file_grpc_federation_federation_proto_msgTypes = make([]protoimpl.MessageInfo, 48)
var file_grpc_federation_federation_proto_goTypes = []interface{}{
(TypeKind)(0), // 0: grpc.federation.TypeKind
(GRPCError_LogLevel)(0), // 1: grpc.federation.GRPCError.LogLevel
(*FileRule)(nil), // 2: grpc.federation.FileRule
(*EnumRule)(nil), // 3: grpc.federation.EnumRule
(*EnumValueRule)(nil), // 4: grpc.federation.EnumValueRule
(*EnumValueAttribute)(nil), // 5: grpc.federation.EnumValueAttribute
(*OneofRule)(nil), // 6: grpc.federation.OneofRule
(*ServiceRule)(nil), // 7: grpc.federation.ServiceRule
(*Env)(nil), // 8: grpc.federation.Env
(*ServiceVariable)(nil), // 9: grpc.federation.ServiceVariable
(*ServiceVariableValidationExpr)(nil), // 10: grpc.federation.ServiceVariableValidationExpr
(*EnvVar)(nil), // 11: grpc.federation.EnvVar
(*EnvType)(nil), // 12: grpc.federation.EnvType
(*EnvMapType)(nil), // 13: grpc.federation.EnvMapType
(*EnvVarOption)(nil), // 14: grpc.federation.EnvVarOption
(*MethodRule)(nil), // 15: grpc.federation.MethodRule
(*MessageRule)(nil), // 16: grpc.federation.MessageRule
(*VariableDefinition)(nil), // 17: grpc.federation.VariableDefinition
(*MapExpr)(nil), // 18: grpc.federation.MapExpr
(*Iterator)(nil), // 19: grpc.federation.Iterator
(*MessageExpr)(nil), // 20: grpc.federation.MessageExpr
(*EnumExpr)(nil), // 21: grpc.federation.EnumExpr
(*CallExpr)(nil), // 22: grpc.federation.CallExpr
(*SwitchExpr)(nil), // 23: grpc.federation.SwitchExpr
(*SwitchCaseExpr)(nil), // 24: grpc.federation.SwitchCaseExpr
(*SwitchDefaultExpr)(nil), // 25: grpc.federation.SwitchDefaultExpr
(*GRPCError)(nil), // 26: grpc.federation.GRPCError
(*GRPCErrorDetail)(nil), // 27: grpc.federation.GRPCErrorDetail
(*GRPCCallOption)(nil), // 28: grpc.federation.GRPCCallOption
(*ValidationExpr)(nil), // 29: grpc.federation.ValidationExpr
(*RetryPolicy)(nil), // 30: grpc.federation.RetryPolicy
(*RetryPolicyConstant)(nil), // 31: grpc.federation.RetryPolicyConstant
(*RetryPolicyExponential)(nil), // 32: grpc.federation.RetryPolicyExponential
(*MethodRequest)(nil), // 33: grpc.federation.MethodRequest
(*MethodResponse)(nil), // 34: grpc.federation.MethodResponse
(*Argument)(nil), // 35: grpc.federation.Argument
(*FieldRule)(nil), // 36: grpc.federation.FieldRule
(*FieldOneof)(nil), // 37: grpc.federation.FieldOneof
(*CELPlugin)(nil), // 38: grpc.federation.CELPlugin
(*CELPluginExport)(nil), // 39: grpc.federation.CELPluginExport
(*CELPluginCapability)(nil), // 40: grpc.federation.CELPluginCapability
(*CELPluginEnvCapability)(nil), // 41: grpc.federation.CELPluginEnvCapability
(*CELPluginFileSystemCapability)(nil), // 42: grpc.federation.CELPluginFileSystemCapability
(*CELPluginNetworkCapability)(nil), // 43: grpc.federation.CELPluginNetworkCapability
(*CELFunction)(nil), // 44: grpc.federation.CELFunction
(*CELReceiverType)(nil), // 45: grpc.federation.CELReceiverType
(*CELFunctionArgument)(nil), // 46: grpc.federation.CELFunctionArgument
(*CELType)(nil), // 47: grpc.federation.CELType
(*CELMapType)(nil), // 48: grpc.federation.CELMapType
(*CELVariable)(nil), // 49: grpc.federation.CELVariable
(code.Code)(0), // 50: google.rpc.Code
(*errdetails.ErrorInfo)(nil), // 51: google.rpc.ErrorInfo
(*errdetails.RetryInfo)(nil), // 52: google.rpc.RetryInfo
(*errdetails.DebugInfo)(nil), // 53: google.rpc.DebugInfo
(*errdetails.QuotaFailure)(nil), // 54: google.rpc.QuotaFailure
(*errdetails.PreconditionFailure)(nil), // 55: google.rpc.PreconditionFailure
(*errdetails.BadRequest)(nil), // 56: google.rpc.BadRequest
(*errdetails.RequestInfo)(nil), // 57: google.rpc.RequestInfo
(*errdetails.ResourceInfo)(nil), // 58: google.rpc.ResourceInfo
(*errdetails.Help)(nil), // 59: google.rpc.Help
(*errdetails.LocalizedMessage)(nil), // 60: google.rpc.LocalizedMessage
(*descriptorpb.FileOptions)(nil), // 61: google.protobuf.FileOptions
(*descriptorpb.ServiceOptions)(nil), // 62: google.protobuf.ServiceOptions
(*descriptorpb.MethodOptions)(nil), // 63: google.protobuf.MethodOptions
(*descriptorpb.MessageOptions)(nil), // 64: google.protobuf.MessageOptions
(*descriptorpb.FieldOptions)(nil), // 65: google.protobuf.FieldOptions
(*descriptorpb.EnumOptions)(nil), // 66: google.protobuf.EnumOptions
(*descriptorpb.EnumValueOptions)(nil), // 67: google.protobuf.EnumValueOptions
(*descriptorpb.OneofOptions)(nil), // 68: google.protobuf.OneofOptions
}
var file_grpc_federation_federation_proto_depIdxs = []int32{
38, // 0: grpc.federation.FileRule.plugin:type_name -> grpc.federation.CELPlugin
5, // 1: grpc.federation.EnumValueRule.attr:type_name -> grpc.federation.EnumValueAttribute
8, // 2: grpc.federation.ServiceRule.env:type_name -> grpc.federation.Env
9, // 3: grpc.federation.ServiceRule.var:type_name -> grpc.federation.ServiceVariable
11, // 4: grpc.federation.Env.var:type_name -> grpc.federation.EnvVar
18, // 5: grpc.federation.ServiceVariable.map:type_name -> grpc.federation.MapExpr
20, // 6: grpc.federation.ServiceVariable.message:type_name -> grpc.federation.MessageExpr
10, // 7: grpc.federation.ServiceVariable.validation:type_name -> grpc.federation.ServiceVariableValidationExpr
21, // 8: grpc.federation.ServiceVariable.enum:type_name -> grpc.federation.EnumExpr
23, // 9: grpc.federation.ServiceVariable.switch:type_name -> grpc.federation.SwitchExpr
12, // 10: grpc.federation.EnvVar.type:type_name -> grpc.federation.EnvType
14, // 11: grpc.federation.EnvVar.option:type_name -> grpc.federation.EnvVarOption
0, // 12: grpc.federation.EnvType.kind:type_name -> grpc.federation.TypeKind
12, // 13: grpc.federation.EnvType.repeated:type_name -> grpc.federation.EnvType
13, // 14: grpc.federation.EnvType.map:type_name -> grpc.federation.EnvMapType
12, // 15: grpc.federation.EnvMapType.key:type_name -> grpc.federation.EnvType
12, // 16: grpc.federation.EnvMapType.value:type_name -> grpc.federation.EnvType
17, // 17: grpc.federation.MessageRule.def:type_name -> grpc.federation.VariableDefinition
18, // 18: grpc.federation.VariableDefinition.map:type_name -> grpc.federation.MapExpr
20, // 19: grpc.federation.VariableDefinition.message:type_name -> grpc.federation.MessageExpr
22, // 20: grpc.federation.VariableDefinition.call:type_name -> grpc.federation.CallExpr
29, // 21: grpc.federation.VariableDefinition.validation:type_name -> grpc.federation.ValidationExpr
21, // 22: grpc.federation.VariableDefinition.enum:type_name -> grpc.federation.EnumExpr
23, // 23: grpc.federation.VariableDefinition.switch:type_name -> grpc.federation.SwitchExpr
19, // 24: grpc.federation.MapExpr.iterator:type_name -> grpc.federation.Iterator
20, // 25: grpc.federation.MapExpr.message:type_name -> grpc.federation.MessageExpr
21, // 26: grpc.federation.MapExpr.enum:type_name -> grpc.federation.EnumExpr
35, // 27: grpc.federation.MessageExpr.args:type_name -> grpc.federation.Argument
33, // 28: grpc.federation.CallExpr.request:type_name -> grpc.federation.MethodRequest
30, // 29: grpc.federation.CallExpr.retry:type_name -> grpc.federation.RetryPolicy
26, // 30: grpc.federation.CallExpr.error:type_name -> grpc.federation.GRPCError
28, // 31: grpc.federation.CallExpr.option:type_name -> grpc.federation.GRPCCallOption
24, // 32: grpc.federation.SwitchExpr.case:type_name -> grpc.federation.SwitchCaseExpr
25, // 33: grpc.federation.SwitchExpr.default:type_name -> grpc.federation.SwitchDefaultExpr
17, // 34: grpc.federation.SwitchCaseExpr.def:type_name -> grpc.federation.VariableDefinition
17, // 35: grpc.federation.SwitchDefaultExpr.def:type_name -> grpc.federation.VariableDefinition
17, // 36: grpc.federation.GRPCError.def:type_name -> grpc.federation.VariableDefinition
50, // 37: grpc.federation.GRPCError.code:type_name -> google.rpc.Code
27, // 38: grpc.federation.GRPCError.details:type_name -> grpc.federation.GRPCErrorDetail
1, // 39: grpc.federation.GRPCError.log_level:type_name -> grpc.federation.GRPCError.LogLevel
17, // 40: grpc.federation.GRPCErrorDetail.def:type_name -> grpc.federation.VariableDefinition
20, // 41: grpc.federation.GRPCErrorDetail.message:type_name -> grpc.federation.MessageExpr
51, // 42: grpc.federation.GRPCErrorDetail.error_info:type_name -> google.rpc.ErrorInfo
52, // 43: grpc.federation.GRPCErrorDetail.retry_info:type_name -> google.rpc.RetryInfo
53, // 44: grpc.federation.GRPCErrorDetail.debug_info:type_name -> google.rpc.DebugInfo
54, // 45: grpc.federation.GRPCErrorDetail.quota_failure:type_name -> google.rpc.QuotaFailure
55, // 46: grpc.federation.GRPCErrorDetail.precondition_failure:type_name -> google.rpc.PreconditionFailure
56, // 47: grpc.federation.GRPCErrorDetail.bad_request:type_name -> google.rpc.BadRequest
57, // 48: grpc.federation.GRPCErrorDetail.request_info:type_name -> google.rpc.RequestInfo
58, // 49: grpc.federation.GRPCErrorDetail.resource_info:type_name -> google.rpc.ResourceInfo
59, // 50: grpc.federation.GRPCErrorDetail.help:type_name -> google.rpc.Help
60, // 51: grpc.federation.GRPCErrorDetail.localized_message:type_name -> google.rpc.LocalizedMessage
26, // 52: grpc.federation.ValidationExpr.error:type_name -> grpc.federation.GRPCError
31, // 53: grpc.federation.RetryPolicy.constant:type_name -> grpc.federation.RetryPolicyConstant
32, // 54: grpc.federation.RetryPolicy.exponential:type_name -> grpc.federation.RetryPolicyExponential
37, // 55: grpc.federation.FieldRule.oneof:type_name -> grpc.federation.FieldOneof
14, // 56: grpc.federation.FieldRule.env:type_name -> grpc.federation.EnvVarOption
17, // 57: grpc.federation.FieldOneof.def:type_name -> grpc.federation.VariableDefinition
39, // 58: grpc.federation.CELPlugin.export:type_name -> grpc.federation.CELPluginExport
45, // 59: grpc.federation.CELPluginExport.types:type_name -> grpc.federation.CELReceiverType
44, // 60: grpc.federation.CELPluginExport.functions:type_name -> grpc.federation.CELFunction
49, // 61: grpc.federation.CELPluginExport.variables:type_name -> grpc.federation.CELVariable
40, // 62: grpc.federation.CELPluginExport.capability:type_name -> grpc.federation.CELPluginCapability
41, // 63: grpc.federation.CELPluginCapability.env:type_name -> grpc.federation.CELPluginEnvCapability
42, // 64: grpc.federation.CELPluginCapability.file_system:type_name -> grpc.federation.CELPluginFileSystemCapability
43, // 65: grpc.federation.CELPluginCapability.network:type_name -> grpc.federation.CELPluginNetworkCapability
46, // 66: grpc.federation.CELFunction.args:type_name -> grpc.federation.CELFunctionArgument
47, // 67: grpc.federation.CELFunction.return:type_name -> grpc.federation.CELType
44, // 68: grpc.federation.CELReceiverType.methods:type_name -> grpc.federation.CELFunction
47, // 69: grpc.federation.CELFunctionArgument.type:type_name -> grpc.federation.CELType
0, // 70: grpc.federation.CELType.kind:type_name -> grpc.federation.TypeKind
47, // 71: grpc.federation.CELType.repeated:type_name -> grpc.federation.CELType
48, // 72: grpc.federation.CELType.map:type_name -> grpc.federation.CELMapType
47, // 73: grpc.federation.CELMapType.key:type_name -> grpc.federation.CELType
47, // 74: grpc.federation.CELMapType.value:type_name -> grpc.federation.CELType
47, // 75: grpc.federation.CELVariable.type:type_name -> grpc.federation.CELType
61, // 76: grpc.federation.file:extendee -> google.protobuf.FileOptions
62, // 77: grpc.federation.service:extendee -> google.protobuf.ServiceOptions
63, // 78: grpc.federation.method:extendee -> google.protobuf.MethodOptions
64, // 79: grpc.federation.message:extendee -> google.protobuf.MessageOptions
65, // 80: grpc.federation.field:extendee -> google.protobuf.FieldOptions
66, // 81: grpc.federation.enum:extendee -> google.protobuf.EnumOptions
67, // 82: grpc.federation.enum_value:extendee -> google.protobuf.EnumValueOptions
68, // 83: grpc.federation.oneof:extendee -> google.protobuf.OneofOptions
2, // 84: grpc.federation.file:type_name -> grpc.federation.FileRule
7, // 85: grpc.federation.service:type_name -> grpc.federation.ServiceRule
15, // 86: grpc.federation.method:type_name -> grpc.federation.MethodRule
16, // 87: grpc.federation.message:type_name -> grpc.federation.MessageRule
36, // 88: grpc.federation.field:type_name -> grpc.federation.FieldRule
3, // 89: grpc.federation.enum:type_name -> grpc.federation.EnumRule
4, // 90: grpc.federation.enum_value:type_name -> grpc.federation.EnumValueRule
6, // 91: grpc.federation.oneof:type_name -> grpc.federation.OneofRule
92, // [92:92] is the sub-list for method output_type
92, // [92:92] is the sub-list for method input_type
84, // [84:92] is the sub-list for extension type_name
76, // [76:84] is the sub-list for extension extendee
0, // [0:76] is the sub-list for field type_name
}
func init() { file_grpc_federation_federation_proto_init() }
func file_grpc_federation_federation_proto_init() {
if File_grpc_federation_federation_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_grpc_federation_federation_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*FileRule); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*EnumRule); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*EnumValueRule); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*EnumValueAttribute); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*OneofRule); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ServiceRule); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Env); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ServiceVariable); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ServiceVariableValidationExpr); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*EnvVar); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*EnvType); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*EnvMapType); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*EnvVarOption); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*MethodRule); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*MessageRule); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*VariableDefinition); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*MapExpr); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Iterator); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*MessageExpr); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*EnumExpr); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CallExpr); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*SwitchExpr); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*SwitchCaseExpr); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*SwitchDefaultExpr); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GRPCError); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GRPCErrorDetail); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GRPCCallOption); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ValidationExpr); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[28].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*RetryPolicy); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[29].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*RetryPolicyConstant); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[30].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*RetryPolicyExponential); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[31].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*MethodRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[32].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*MethodResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[33].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Argument); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[34].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*FieldRule); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[35].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*FieldOneof); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[36].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CELPlugin); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[37].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CELPluginExport); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[38].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CELPluginCapability); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[39].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CELPluginEnvCapability); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[40].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CELPluginFileSystemCapability); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[41].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CELPluginNetworkCapability); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[42].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CELFunction); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[43].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CELReceiverType); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[44].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CELFunctionArgument); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[45].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CELType); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[46].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CELMapType); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[47].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CELVariable); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
file_grpc_federation_federation_proto_msgTypes[2].OneofWrappers = []interface{}{}
file_grpc_federation_federation_proto_msgTypes[7].OneofWrappers = []interface{}{
(*ServiceVariable_By)(nil),
(*ServiceVariable_Map)(nil),
(*ServiceVariable_Message)(nil),
(*ServiceVariable_Validation)(nil),
(*ServiceVariable_Enum)(nil),
(*ServiceVariable_Switch)(nil),
}
file_grpc_federation_federation_proto_msgTypes[9].OneofWrappers = []interface{}{}
file_grpc_federation_federation_proto_msgTypes[10].OneofWrappers = []interface{}{
(*EnvType_Kind)(nil),
(*EnvType_Repeated)(nil),
(*EnvType_Map)(nil),
}
file_grpc_federation_federation_proto_msgTypes[12].OneofWrappers = []interface{}{}
file_grpc_federation_federation_proto_msgTypes[13].OneofWrappers = []interface{}{}
file_grpc_federation_federation_proto_msgTypes[14].OneofWrappers = []interface{}{}
file_grpc_federation_federation_proto_msgTypes[15].OneofWrappers = []interface{}{
(*VariableDefinition_By)(nil),
(*VariableDefinition_Map)(nil),
(*VariableDefinition_Message)(nil),
(*VariableDefinition_Call)(nil),
(*VariableDefinition_Validation)(nil),
(*VariableDefinition_Enum)(nil),
(*VariableDefinition_Switch)(nil),
}
file_grpc_federation_federation_proto_msgTypes[16].OneofWrappers = []interface{}{
(*MapExpr_By)(nil),
(*MapExpr_Message)(nil),
(*MapExpr_Enum)(nil),
}
file_grpc_federation_federation_proto_msgTypes[20].OneofWrappers = []interface{}{}
file_grpc_federation_federation_proto_msgTypes[22].OneofWrappers = []interface{}{
(*SwitchCaseExpr_By)(nil),
}
file_grpc_federation_federation_proto_msgTypes[23].OneofWrappers = []interface{}{
(*SwitchDefaultExpr_By)(nil),
}
file_grpc_federation_federation_proto_msgTypes[24].OneofWrappers = []interface{}{}
file_grpc_federation_federation_proto_msgTypes[26].OneofWrappers = []interface{}{}
file_grpc_federation_federation_proto_msgTypes[27].OneofWrappers = []interface{}{}
file_grpc_federation_federation_proto_msgTypes[28].OneofWrappers = []interface{}{
(*RetryPolicy_Constant)(nil),
(*RetryPolicy_Exponential)(nil),
}
file_grpc_federation_federation_proto_msgTypes[29].OneofWrappers = []interface{}{}
file_grpc_federation_federation_proto_msgTypes[30].OneofWrappers = []interface{}{}
file_grpc_federation_federation_proto_msgTypes[31].OneofWrappers = []interface{}{}
file_grpc_federation_federation_proto_msgTypes[32].OneofWrappers = []interface{}{}
file_grpc_federation_federation_proto_msgTypes[33].OneofWrappers = []interface{}{}
file_grpc_federation_federation_proto_msgTypes[34].OneofWrappers = []interface{}{}
file_grpc_federation_federation_proto_msgTypes[35].OneofWrappers = []interface{}{
(*FieldOneof_If)(nil),
(*FieldOneof_Default)(nil),
}
file_grpc_federation_federation_proto_msgTypes[38].OneofWrappers = []interface{}{}
file_grpc_federation_federation_proto_msgTypes[45].OneofWrappers = []interface{}{
(*CELType_Kind)(nil),
(*CELType_Repeated)(nil),
(*CELType_Map)(nil),
(*CELType_Message)(nil),
(*CELType_Enum)(nil),
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_grpc_federation_federation_proto_rawDesc,
NumEnums: 2,
NumMessages: 48,
NumExtensions: 8,
NumServices: 0,
},
GoTypes: file_grpc_federation_federation_proto_goTypes,
DependencyIndexes: file_grpc_federation_federation_proto_depIdxs,
EnumInfos: file_grpc_federation_federation_proto_enumTypes,
MessageInfos: file_grpc_federation_federation_proto_msgTypes,
ExtensionInfos: file_grpc_federation_federation_proto_extTypes,
}.Build()
File_grpc_federation_federation_proto = out.File
file_grpc_federation_federation_proto_rawDesc = nil
file_grpc_federation_federation_proto_goTypes = nil
file_grpc_federation_federation_proto_depIdxs = nil
}
================================================
FILE: _examples/17_error_handler/grpc/federation/generator.pb.go
================================================
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.33.0
// protoc (unknown)
// source: grpc/federation/generator.proto
package plugin
import (
code "google.golang.org/genproto/googleapis/rpc/code"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
durationpb "google.golang.org/protobuf/types/known/durationpb"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
type ActionType int32
const (
ActionType_GENERATE_ACTION ActionType = 0
ActionType_KEEP_ACTION ActionType = 1
ActionType_CREATE_ACTION ActionType = 2
ActionType_DELETE_ACTION ActionType = 3
ActionType_UPDATE_ACTION ActionType = 4
)
// Enum value maps for ActionType.
var (
ActionType_name = map[int32]string{
0: "GENERATE_ACTION",
1: "KEEP_ACTION",
2: "CREATE_ACTION",
3: "DELETE_ACTION",
4: "UPDATE_ACTION",
}
ActionType_value = map[string]int32{
"GENERATE_ACTION": 0,
"KEEP_ACTION": 1,
"CREATE_ACTION": 2,
"DELETE_ACTION": 3,
"UPDATE_ACTION": 4,
}
)
func (x ActionType) Enum() *ActionType {
p := new(ActionType)
*p = x
return p
}
func (x ActionType) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (ActionType) Descriptor() protoreflect.EnumDescriptor {
return file_grpc_federation_generator_proto_enumTypes[0].Descriptor()
}
func (ActionType) Type() protoreflect.EnumType {
return &file_grpc_federation_generator_proto_enumTypes[0]
}
func (x ActionType) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use ActionType.Descriptor instead.
func (ActionType) EnumDescriptor() ([]byte, []int) {
return file_grpc_federation_generator_proto_rawDescGZIP(), []int{0}
}
type OutputFilePathMode int32
const (
OutputFilePathMode_OUTPUT_FILE_PATH_MODE_UNSPECIFIED OutputFilePathMode = 0
OutputFilePathMode_OUTPUT_FILE_PATH_MODE_IMPORT OutputFilePathMode = 1
OutputFilePathMode_OUTPUT_FILE_PATH_MODE_MODULE_PREFIX OutputFilePathMode = 2
OutputFilePathMode_OUTPUT_FILE_PATH_MODE_SOURCE_RELATIVE OutputFilePathMode = 3
)
// Enum value maps for OutputFilePathMode.
var (
OutputFilePathMode_name = map[int32]string{
0: "OUTPUT_FILE_PATH_MODE_UNSPECIFIED",
1: "OUTPUT_FILE_PATH_MODE_IMPORT",
2: "OUTPUT_FILE_PATH_MODE_MODULE_PREFIX",
3: "OUTPUT_FILE_PATH_MODE_SOURCE_RELATIVE",
}
OutputFilePathMode_value = map[string]int32{
"OUTPUT_FILE_PATH_MODE_UNSPECIFIED": 0,
"OUTPUT_FILE_PATH_MODE_IMPORT": 1,
"OUTPUT_FILE_PATH_MODE_MODULE_PREFIX": 2,
"OUTPUT_FILE_PATH_MODE_SOURCE_RELATIVE": 3,
}
)
func (x OutputFilePathMode) Enum() *OutputFilePathMode {
p := new(OutputFilePathMode)
*p = x
return p
}
func (x OutputFilePathMode) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (OutputFilePathMode) Descriptor() protoreflect.EnumDescriptor {
return file_grpc_federation_generator_proto_enumTypes[1].Descriptor()
}
func (OutputFilePathMode) Type() protoreflect.EnumType {
return &file_grpc_federation_generator_proto_enumTypes[1]
}
func (x OutputFilePathMode) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use OutputFilePathMode.Descriptor instead.
func (OutputFilePathMode) EnumDescriptor() ([]byte, []int) {
return file_grpc_federation_generator_proto_rawDescGZIP(), []int{1}
}
type TypeKind int32
const (
TypeKind_UNKNOWN_TYPE TypeKind = 0
TypeKind_DOUBLE_TYPE TypeKind = 1
TypeKind_FLOAT_TYPE TypeKind = 2
TypeKind_INT64_TYPE TypeKind = 3
TypeKind_UINT64_TYPE TypeKind = 4
TypeKind_INT32_TYPE TypeKind = 5
TypeKind_FIXED64_TYPE TypeKind = 6
TypeKind_FIXED32_TYPE TypeKind = 7
TypeKind_BOOL_TYPE TypeKind = 8
TypeKind_STRING_TYPE TypeKind = 9
TypeKind_GROUP_TYPE TypeKind = 10
TypeKind_MESSAGE_TYPE TypeKind = 11
TypeKind_BYTES_TYPE TypeKind = 12
TypeKind_UINT32_TYPE TypeKind = 13
TypeKind_ENUM_TYPE TypeKind = 14
TypeKind_SFIXED32_TYPE TypeKind = 15
TypeKind_SFIXED64_TYPE TypeKind = 16
TypeKind_SINT32_TYPE TypeKind = 17
TypeKind_SINT64_TYPE TypeKind = 18
)
// Enum value maps for TypeKind.
var (
TypeKind_name = map[int32]string{
0: "UNKNOWN_TYPE",
1: "DOUBLE_TYPE",
2: "FLOAT_TYPE",
3: "INT64_TYPE",
4: "UINT64_TYPE",
5: "INT32_TYPE",
6: "FIXED64_TYPE",
7: "FIXED32_TYPE",
8: "BOOL_TYPE",
9: "STRING_TYPE",
10: "GROUP_TYPE",
11: "MESSAGE_TYPE",
12: "BYTES_TYPE",
13: "UINT32_TYPE",
14: "ENUM_TYPE",
15: "SFIXED32_TYPE",
16: "SFIXED64_TYPE",
17: "SINT32_TYPE",
18: "SINT64_TYPE",
}
TypeKind_value = map[string]int32{
"UNKNOWN_TYPE": 0,
"DOUBLE_TYPE": 1,
"FLOAT_TYPE": 2,
"INT64_TYPE": 3,
"UINT64_TYPE": 4,
"INT32_TYPE": 5,
"FIXED64_TYPE": 6,
"FIXED32_TYPE": 7,
"BOOL_TYPE": 8,
"STRING_TYPE": 9,
"GROUP_TYPE": 10,
"MESSAGE_TYPE": 11,
"BYTES_TYPE": 12,
"UINT32_TYPE": 13,
"ENUM_TYPE": 14,
"SFIXED32_TYPE": 15,
"SFIXED64_TYPE": 16,
"SINT32_TYPE": 17,
"SINT64_TYPE": 18,
}
)
func (x TypeKind) Enum() *TypeKind {
p := new(TypeKind)
*p = x
return p
}
func (x TypeKind) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (TypeKind) Descriptor() protoreflect.EnumDescriptor {
return file_grpc_federation_generator_proto_enumTypes[2].Descriptor()
}
func (TypeKind) Type() protoreflect.EnumType {
return &file_grpc_federation_generator_proto_enumTypes[2]
}
func (x TypeKind) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use TypeKind.Descriptor instead.
func (TypeKind) EnumDescriptor() ([]byte, []int) {
return file_grpc_federation_generator_proto_rawDescGZIP(), []int{2}
}
type ProtoCodeGeneratorResponse_Feature int32
const (
ProtoCodeGeneratorResponse_FEATURE_NONE ProtoCodeGeneratorResponse_Feature = 0
ProtoCodeGeneratorResponse_FEATURE_PROTO3_OPTIONAL ProtoCodeGeneratorResponse_Feature = 1
ProtoCodeGeneratorResponse_FEATURE_SUPPORTS_EDITIONS ProtoCodeGeneratorResponse_Feature = 2
)
// Enum value maps for ProtoCodeGeneratorResponse_Feature.
var (
ProtoCodeGeneratorResponse_Feature_name = map[int32]string{
0: "FEATURE_NONE",
1: "FEATURE_PROTO3_OPTIONAL",
2: "FEATURE_SUPPORTS_EDITIONS",
}
ProtoCodeGeneratorResponse_Feature_value = map[string]int32{
"FEATURE_NONE": 0,
"FEATURE_PROTO3_OPTIONAL": 1,
"FEATURE_SUPPORTS_EDITIONS": 2,
}
)
func (x ProtoCodeGeneratorResponse_Feature) Enum() *ProtoCodeGeneratorResponse_Feature {
p := new(ProtoCodeGeneratorResponse_Feature)
*p = x
return p
}
func (x ProtoCodeGeneratorResponse_Feature) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (ProtoCodeGeneratorResponse_Feature) Descriptor() protoreflect.EnumDescriptor {
return file_grpc_federation_generator_proto_enumTypes[3].Descriptor()
}
func (ProtoCodeGeneratorResponse_Feature) Type() protoreflect.EnumType {
return &file_grpc_federation_generator_proto_enumTypes[3]
}
func (x ProtoCodeGeneratorResponse_Feature) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use ProtoCodeGeneratorResponse_Feature.Descriptor instead.
func (ProtoCodeGeneratorResponse_Feature) EnumDescriptor() ([]byte, []int) {
return file_grpc_federation_generator_proto_rawDescGZIP(), []int{0, 0}
}
type ProtoCodeGeneratorResponse_GeneratedCodeInfo_Annotation_Semantic int32
const (
ProtoCodeGeneratorResponse_GeneratedCodeInfo_Annotation_NONE ProtoCodeGeneratorResponse_GeneratedCodeInfo_Annotation_Semantic = 0
ProtoCodeGeneratorResponse_GeneratedCodeInfo_Annotation_SET ProtoCodeGeneratorResponse_GeneratedCodeInfo_Annotation_Semantic = 1
ProtoCodeGeneratorResponse_GeneratedCodeInfo_Annotation_ALIAS ProtoCodeGeneratorResponse_GeneratedCodeInfo_Annotation_Semantic = 2
)
// Enum value maps for ProtoCodeGeneratorResponse_GeneratedCodeInfo_Annotation_Semantic.
var (
ProtoCodeGeneratorResponse_GeneratedCodeInfo_Annotation_Semantic_name = map[int32]string{
0: "NONE",
1: "SET",
2: "ALIAS",
}
ProtoCodeGeneratorResponse_GeneratedCodeInfo_Annotation_Semantic_value = map[string]int32{
"NONE": 0,
"SET": 1,
"ALIAS": 2,
}
)
func (x ProtoCodeGeneratorResponse_GeneratedCodeInfo_Annotation_Semantic) Enum() *ProtoCodeGeneratorResponse_GeneratedCodeInfo_Annotation_Semantic {
p := new(ProtoCodeGeneratorResponse_GeneratedCodeInfo_Annotation_Semantic)
*p = x
return p
}
func (x ProtoCodeGeneratorResponse_GeneratedCodeInfo_Annotation_Semantic) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (ProtoCodeGeneratorResponse_GeneratedCodeInfo_Annotation_Semantic) Descriptor() protoreflect.EnumDescriptor {
return file_grpc_federation_generator_proto_enumTypes[4].Descriptor()
}
func (ProtoCodeGeneratorResponse_GeneratedCodeInfo_Annotation_Semantic) Type() protoreflect.EnumType {
return &file_grpc_federation_generator_proto_enumTypes[4]
}
func (x ProtoCodeGeneratorResponse_GeneratedCodeInfo_Annotation_Semantic) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use ProtoCodeGeneratorResponse_GeneratedCodeInfo_Annotation_Semantic.Descriptor instead.
func (ProtoCodeGeneratorResponse_GeneratedCodeInfo_Annotation_Semantic) EnumDescriptor() ([]byte, []int) {
return file_grpc_federation_generator_proto_rawDescGZIP(), []int{0, 0, 0, 0}
}
type ProtoCodeGeneratorResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Error *string `protobuf:"bytes,1,opt,name=error,proto3,oneof" json:"error,omitempty"`
SupportedFeatures *uint64 `protobuf:"varint,2,opt,name=supported_features,json=supportedFeatures,proto3,oneof" json:"supported_features,omitempty"`
MinimumEdition *int32 `protobuf:"varint,3,opt,name=minimum_edition,json=minimumEdition,proto3,oneof" json:"minimum_edition,omitempty"`
MaximumEdition *int32 `protobuf:"varint,4,opt,name=maximum_edition,json=maximumEdition,proto3,oneof" json:"maximum_edition,omitempty"`
File []*ProtoCodeGeneratorResponse_File `protobuf:"bytes,15,rep,name=file,proto3" json:"file,omitempty"`
}
func (x *ProtoCodeGeneratorResponse) Reset() {
*x = ProtoCodeGeneratorResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_generator_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ProtoCodeGeneratorResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ProtoCodeGeneratorResponse) ProtoMessage() {}
func (x *ProtoCodeGeneratorResponse) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_generator_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ProtoCodeGeneratorResponse.ProtoReflect.Descriptor instead.
func (*ProtoCodeGeneratorResponse) Descriptor() ([]byte, []int) {
return file_grpc_federation_generator_proto_rawDescGZIP(), []int{0}
}
func (x *ProtoCodeGeneratorResponse) GetError() string {
if x != nil && x.Error != nil {
return *x.Error
}
return ""
}
func (x *ProtoCodeGeneratorResponse) GetSupportedFeatures() uint64 {
if x != nil && x.SupportedFeatures != nil {
return *x.SupportedFeatures
}
return 0
}
func (x *ProtoCodeGeneratorResponse) GetMinimumEdition() int32 {
if x != nil && x.MinimumEdition != nil {
return *x.MinimumEdition
}
return 0
}
func (x *ProtoCodeGeneratorResponse) GetMaximumEdition() int32 {
if x != nil && x.MaximumEdition != nil {
return *x.MaximumEdition
}
return 0
}
func (x *ProtoCodeGeneratorResponse) GetFile() []*ProtoCodeGeneratorResponse_File {
if x != nil {
return x.File
}
return nil
}
// CodeGeneratorRequest.
type CodeGeneratorRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Type ActionType `protobuf:"varint,1,opt,name=type,proto3,enum=grpc.federation.generator.plugin.ActionType" json:"type,omitempty"`
ProtoPath string `protobuf:"bytes,2,opt,name=proto_path,json=protoPath,proto3" json:"proto_path,omitempty"`
// Deprecated: Marked as deprecated in grpc/federation/generator.proto.
OutDir string `protobuf:"bytes,3,opt,name=out_dir,json=outDir,proto3" json:"out_dir,omitempty"`
Files []*ProtoCodeGeneratorResponse_File `protobuf:"bytes,4,rep,name=files,proto3" json:"files,omitempty"`
GrpcFederationFileIds []string `protobuf:"bytes,5,rep,name=grpc_federation_file_ids,json=grpcFederationFileIds,proto3" json:"grpc_federation_file_ids,omitempty"`
Reference *Reference `protobuf:"bytes,6,opt,name=reference,proto3" json:"reference,omitempty"`
OutputFilePathConfig *OutputFilePathConfig `protobuf:"bytes,7,opt,name=output_file_path_config,json=outputFilePathConfig,proto3" json:"output_file_path_config,omitempty"`
}
func (x *CodeGeneratorRequest) Reset() {
*x = CodeGeneratorRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_generator_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *CodeGeneratorRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CodeGeneratorRequest) ProtoMessage() {}
func (x *CodeGeneratorRequest) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_generator_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use CodeGeneratorRequest.ProtoReflect.Descriptor instead.
func (*CodeGeneratorRequest) Descriptor() ([]byte, []int) {
return file_grpc_federation_generator_proto_rawDescGZIP(), []int{1}
}
func (x *CodeGeneratorRequest) GetType() ActionType {
if x != nil {
return x.Type
}
return ActionType_GENERATE_ACTION
}
func (x *CodeGeneratorRequest) GetProtoPath() string {
if x != nil {
return x.ProtoPath
}
return ""
}
// Deprecated: Marked as deprecated in grpc/federation/generator.proto.
func (x *CodeGeneratorRequest) GetOutDir() string {
if x != nil {
return x.OutDir
}
return ""
}
func (x *CodeGeneratorRequest) GetFiles() []*ProtoCodeGeneratorResponse_File {
if x != nil {
return x.Files
}
return nil
}
func (x *CodeGeneratorRequest) GetGrpcFederationFileIds() []string {
if x != nil {
return x.GrpcFederationFileIds
}
return nil
}
func (x *CodeGeneratorRequest) GetReference() *Reference {
if x != nil {
return x.Reference
}
return nil
}
func (x *CodeGeneratorRequest) GetOutputFilePathConfig() *OutputFilePathConfig {
if x != nil {
return x.OutputFilePathConfig
}
return nil
}
type OutputFilePathConfig struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Mode OutputFilePathMode `protobuf:"varint,1,opt,name=mode,proto3,enum=grpc.federation.generator.plugin.OutputFilePathMode" json:"mode,omitempty"`
Prefix string `protobuf:"bytes,2,opt,name=prefix,proto3" json:"prefix,omitempty"`
FilePath string `protobuf:"bytes,3,opt,name=file_path,json=filePath,proto3" json:"file_path,omitempty"`
ImportPaths []string `protobuf:"bytes,4,rep,name=import_paths,json=importPaths,proto3" json:"import_paths,omitempty"`
}
func (x *OutputFilePathConfig) Reset() {
*x = OutputFilePathConfig{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_generator_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *OutputFilePathConfig) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*OutputFilePathConfig) ProtoMessage() {}
func (x *OutputFilePathConfig) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_generator_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use OutputFilePathConfig.ProtoReflect.Descriptor instead.
func (*OutputFilePathConfig) Descriptor() ([]byte, []int) {
return file_grpc_federation_generator_proto_rawDescGZIP(), []int{2}
}
func (x *OutputFilePathConfig) GetMode() OutputFilePathMode {
if x != nil {
return x.Mode
}
return OutputFilePathMode_OUTPUT_FILE_PATH_MODE_UNSPECIFIED
}
func (x *OutputFilePathConfig) GetPrefix() string {
if x != nil {
return x.Prefix
}
return ""
}
func (x *OutputFilePathConfig) GetFilePath() string {
if x != nil {
return x.FilePath
}
return ""
}
func (x *OutputFilePathConfig) GetImportPaths() []string {
if x != nil {
return x.ImportPaths
}
return nil
}
type Reference struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
FileMap map[string]*File `protobuf:"bytes,1,rep,name=file_map,json=fileMap,proto3" json:"file_map,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
ServiceMap map[string]*Service `protobuf:"bytes,2,rep,name=service_map,json=serviceMap,proto3" json:"service_map,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
MethodMap map[string]*Method `protobuf:"bytes,3,rep,name=method_map,json=methodMap,proto3" json:"method_map,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
MessageMap map[string]*Message `protobuf:"bytes,4,rep,name=message_map,json=messageMap,proto3" json:"message_map,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
FieldMap map[string]*Field `protobuf:"bytes,5,rep,name=field_map,json=fieldMap,proto3" json:"field_map,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
EnumMap map[string]*Enum `protobuf:"bytes,6,rep,name=enum_map,json=enumMap,proto3" json:"enum_map,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
EnumValueMap map[string]*EnumValue `protobuf:"bytes,7,rep,name=enum_value_map,json=enumValueMap,proto3" json:"enum_value_map,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
OneofMap map[string]*Oneof `protobuf:"bytes,8,rep,name=oneof_map,json=oneofMap,proto3" json:"oneof_map,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
CelPluginMap map[string]*CELPlugin `protobuf:"bytes,9,rep,name=cel_plugin_map,json=celPluginMap,proto3" json:"cel_plugin_map,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
GraphMap map[string]*MessageDependencyGraph `protobuf:"bytes,10,rep,name=graph_map,json=graphMap,proto3" json:"graph_map,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
VariableDefinitionMap map[string]*VariableDefinition `protobuf:"bytes,11,rep,name=variable_definition_map,json=variableDefinitionMap,proto3" json:"variable_definition_map,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
VariableDefinitionGroupMap map[string]*VariableDefinitionGroup `protobuf:"bytes,12,rep,name=variable_definition_group_map,json=variableDefinitionGroupMap,proto3" json:"variable_definition_group_map,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
GraphNodeMap map[string]*MessageDependencyGraphNode `protobuf:"bytes,13,rep,name=graph_node_map,json=graphNodeMap,proto3" json:"graph_node_map,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
}
func (x *Reference) Reset() {
*x = Reference{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_generator_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Reference) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Reference) ProtoMessage() {}
func (x *Reference) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_generator_proto_msgTypes[3]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Reference.ProtoReflect.Descriptor instead.
func (*Reference) Descriptor() ([]byte, []int) {
return file_grpc_federation_generator_proto_rawDescGZIP(), []int{3}
}
func (x *Reference) GetFileMap() map[string]*File {
if x != nil {
return x.FileMap
}
return nil
}
func (x *Reference) GetServiceMap() map[string]*Service {
if x != nil {
return x.ServiceMap
}
return nil
}
func (x *Reference) GetMethodMap() map[string]*Method {
if x != nil {
return x.MethodMap
}
return nil
}
func (x *Reference) GetMessageMap() map[string]*Message {
if x != nil {
return x.MessageMap
}
return nil
}
func (x *Reference) GetFieldMap() map[string]*Field {
if x != nil {
return x.FieldMap
}
return nil
}
func (x *Reference) GetEnumMap() map[string]*Enum {
if x != nil {
return x.EnumMap
}
return nil
}
func (x *Reference) GetEnumValueMap() map[string]*EnumValue {
if x != nil {
return x.EnumValueMap
}
return nil
}
func (x *Reference) GetOneofMap() map[string]*Oneof {
if x != nil {
return x.OneofMap
}
return nil
}
func (x *Reference) GetCelPluginMap() map[string]*CELPlugin {
if x != nil {
return x.CelPluginMap
}
return nil
}
func (x *Reference) GetGraphMap() map[string]*MessageDependencyGraph {
if x != nil {
return x.GraphMap
}
return nil
}
func (x *Reference) GetVariableDefinitionMap() map[string]*VariableDefinition {
if x != nil {
return x.VariableDefinitionMap
}
return nil
}
func (x *Reference) GetVariableDefinitionGroupMap() map[string]*VariableDefinitionGroup {
if x != nil {
return x.VariableDefinitionGroupMap
}
return nil
}
func (x *Reference) GetGraphNodeMap() map[string]*MessageDependencyGraphNode {
if x != nil {
return x.GraphNodeMap
}
return nil
}
type File struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
Package *Package `protobuf:"bytes,2,opt,name=package,proto3" json:"package,omitempty"`
GoPackage *GoPackage `protobuf:"bytes,3,opt,name=go_package,json=goPackage,proto3" json:"go_package,omitempty"`
Name string `protobuf:"bytes,4,opt,name=name,proto3" json:"name,omitempty"`
ServiceIds []string `protobuf:"bytes,5,rep,name=service_ids,json=serviceIds,proto3" json:"service_ids,omitempty"`
MessageIds []string `protobuf:"bytes,6,rep,name=message_ids,json=messageIds,proto3" json:"message_ids,omitempty"`
EnumIds []string `protobuf:"bytes,7,rep,name=enum_ids,json=enumIds,proto3" json:"enum_ids,omitempty"`
CelPluginIds []string `protobuf:"bytes,8,rep,name=cel_plugin_ids,json=celPluginIds,proto3" json:"cel_plugin_ids,omitempty"`
ImportFileIds []string `protobuf:"bytes,9,rep,name=import_file_ids,json=importFileIds,proto3" json:"import_file_ids,omitempty"`
}
func (x *File) Reset() {
*x = File{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_generator_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *File) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*File) ProtoMessage() {}
func (x *File) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_generator_proto_msgTypes[4]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use File.ProtoReflect.Descriptor instead.
func (*File) Descriptor() ([]byte, []int) {
return file_grpc_federation_generator_proto_rawDescGZIP(), []int{4}
}
func (x *File) GetId() string {
if x != nil {
return x.Id
}
return ""
}
func (x *File) GetPackage() *Package {
if x != nil {
return x.Package
}
return nil
}
func (x *File) GetGoPackage() *GoPackage {
if x != nil {
return x.GoPackage
}
return nil
}
func (x *File) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *File) GetServiceIds() []string {
if x != nil {
return x.ServiceIds
}
return nil
}
func (x *File) GetMessageIds() []string {
if x != nil {
return x.MessageIds
}
return nil
}
func (x *File) GetEnumIds() []string {
if x != nil {
return x.EnumIds
}
return nil
}
func (x *File) GetCelPluginIds() []string {
if x != nil {
return x.CelPluginIds
}
return nil
}
func (x *File) GetImportFileIds() []string {
if x != nil {
return x.ImportFileIds
}
return nil
}
type Package struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
FileIds []string `protobuf:"bytes,2,rep,name=file_ids,json=fileIds,proto3" json:"file_ids,omitempty"`
}
func (x *Package) Reset() {
*x = Package{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_generator_proto_msgTypes[5]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Package) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Package) ProtoMessage() {}
func (x *Package) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_generator_proto_msgTypes[5]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Package.ProtoReflect.Descriptor instead.
func (*Package) Descriptor() ([]byte, []int) {
return file_grpc_federation_generator_proto_rawDescGZIP(), []int{5}
}
func (x *Package) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *Package) GetFileIds() []string {
if x != nil {
return x.FileIds
}
return nil
}
type GoPackage struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
ImportPath string `protobuf:"bytes,2,opt,name=import_path,json=importPath,proto3" json:"import_path,omitempty"`
AliasName string `protobuf:"bytes,3,opt,name=alias_name,json=aliasName,proto3" json:"alias_name,omitempty"`
}
func (x *GoPackage) Reset() {
*x = GoPackage{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_generator_proto_msgTypes[6]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GoPackage) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GoPackage) ProtoMessage() {}
func (x *GoPackage) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_generator_proto_msgTypes[6]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GoPackage.ProtoReflect.Descriptor instead.
func (*GoPackage) Descriptor() ([]byte, []int) {
return file_grpc_federation_generator_proto_rawDescGZIP(), []int{6}
}
func (x *GoPackage) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *GoPackage) GetImportPath() string {
if x != nil {
return x.ImportPath
}
return ""
}
func (x *GoPackage) GetAliasName() string {
if x != nil {
return x.AliasName
}
return ""
}
type Service struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
MethodIds []string `protobuf:"bytes,3,rep,name=method_ids,json=methodIds,proto3" json:"method_ids,omitempty"`
FileId string `protobuf:"bytes,4,opt,name=file_id,json=fileId,proto3" json:"file_id,omitempty"`
MessageIds []string `protobuf:"bytes,5,rep,name=message_ids,json=messageIds,proto3" json:"message_ids,omitempty"`
MessageArgIds []string `protobuf:"bytes,6,rep,name=message_arg_ids,json=messageArgIds,proto3" json:"message_arg_ids,omitempty"`
CelPluginIds []string `protobuf:"bytes,7,rep,name=cel_plugin_ids,json=celPluginIds,proto3" json:"cel_plugin_ids,omitempty"`
Rule *ServiceRule `protobuf:"bytes,8,opt,name=rule,proto3" json:"rule,omitempty"`
}
func (x *Service) Reset() {
*x = Service{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_generator_proto_msgTypes[7]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Service) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Service) ProtoMessage() {}
func (x *Service) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_generator_proto_msgTypes[7]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Service.ProtoReflect.Descriptor instead.
func (*Service) Descriptor() ([]byte, []int) {
return file_grpc_federation_generator_proto_rawDescGZIP(), []int{7}
}
func (x *Service) GetId() string {
if x != nil {
return x.Id
}
return ""
}
func (x *Service) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *Service) GetMethodIds() []string {
if x != nil {
return x.MethodIds
}
return nil
}
func (x *Service) GetFileId() string {
if x != nil {
return x.FileId
}
return ""
}
func (x *Service) GetMessageIds() []string {
if x != nil {
return x.MessageIds
}
return nil
}
func (x *Service) GetMessageArgIds() []string {
if x != nil {
return x.MessageArgIds
}
return nil
}
func (x *Service) GetCelPluginIds() []string {
if x != nil {
return x.CelPluginIds
}
return nil
}
func (x *Service) GetRule() *ServiceRule {
if x != nil {
return x.Rule
}
return nil
}
type ServiceRule struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Env *Env `protobuf:"bytes,1,opt,name=env,proto3" json:"env,omitempty"`
Vars []*ServiceVariable `protobuf:"bytes,2,rep,name=vars,proto3" json:"vars,omitempty"`
}
func (x *ServiceRule) Reset() {
*x = ServiceRule{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_generator_proto_msgTypes[8]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ServiceRule) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ServiceRule) ProtoMessage() {}
func (x *ServiceRule) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_generator_proto_msgTypes[8]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ServiceRule.ProtoReflect.Descriptor instead.
func (*ServiceRule) Descriptor() ([]byte, []int) {
return file_grpc_federation_generator_proto_rawDescGZIP(), []int{8}
}
func (x *ServiceRule) GetEnv() *Env {
if x != nil {
return x.Env
}
return nil
}
func (x *ServiceRule) GetVars() []*ServiceVariable {
if x != nil {
return x.Vars
}
return nil
}
type Env struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Vars []*EnvVar `protobuf:"bytes,1,rep,name=vars,proto3" json:"vars,omitempty"`
}
func (x *Env) Reset() {
*x = Env{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_generator_proto_msgTypes[9]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Env) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Env) ProtoMessage() {}
func (x *Env) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_generator_proto_msgTypes[9]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Env.ProtoReflect.Descriptor instead.
func (*Env) Descriptor() ([]byte, []int) {
return file_grpc_federation_generator_proto_rawDescGZIP(), []int{9}
}
func (x *Env) GetVars() []*EnvVar {
if x != nil {
return x.Vars
}
return nil
}
type EnvVar struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
Type *Type `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"`
Option *EnvVarOption `protobuf:"bytes,3,opt,name=option,proto3" json:"option,omitempty"`
}
func (x *EnvVar) Reset() {
*x = EnvVar{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_generator_proto_msgTypes[10]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *EnvVar) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*EnvVar) ProtoMessage() {}
func (x *EnvVar) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_generator_proto_msgTypes[10]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use EnvVar.ProtoReflect.Descriptor instead.
func (*EnvVar) Descriptor() ([]byte, []int) {
return file_grpc_federation_generator_proto_rawDescGZIP(), []int{10}
}
func (x *EnvVar) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *EnvVar) GetType() *Type {
if x != nil {
return x.Type
}
return nil
}
func (x *EnvVar) GetOption() *EnvVarOption {
if x != nil {
return x.Option
}
return nil
}
type EnvVarOption struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Alternate string `protobuf:"bytes,1,opt,name=alternate,proto3" json:"alternate,omitempty"`
Default string `protobuf:"bytes,2,opt,name=default,proto3" json:"default,omitempty"`
Required bool `protobuf:"varint,3,opt,name=required,proto3" json:"required,omitempty"`
Ignored bool `protobuf:"varint,4,opt,name=ignored,proto3" json:"ignored,omitempty"`
}
func (x *EnvVarOption) Reset() {
*x = EnvVarOption{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_generator_proto_msgTypes[11]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *EnvVarOption) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*EnvVarOption) ProtoMessage() {}
func (x *EnvVarOption) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_generator_proto_msgTypes[11]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use EnvVarOption.ProtoReflect.Descriptor instead.
func (*EnvVarOption) Descriptor() ([]byte, []int) {
return file_grpc_federation_generator_proto_rawDescGZIP(), []int{11}
}
func (x *EnvVarOption) GetAlternate() string {
if x != nil {
return x.Alternate
}
return ""
}
func (x *EnvVarOption) GetDefault() string {
if x != nil {
return x.Default
}
return ""
}
func (x *EnvVarOption) GetRequired() bool {
if x != nil {
return x.Required
}
return false
}
func (x *EnvVarOption) GetIgnored() bool {
if x != nil {
return x.Ignored
}
return false
}
type ServiceVariable struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
If *CELValue `protobuf:"bytes,2,opt,name=if,proto3" json:"if,omitempty"`
Expr *ServiceVariableExpr `protobuf:"bytes,3,opt,name=expr,proto3" json:"expr,omitempty"`
}
func (x *ServiceVariable) Reset() {
*x = ServiceVariable{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_generator_proto_msgTypes[12]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ServiceVariable) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ServiceVariable) ProtoMessage() {}
func (x *ServiceVariable) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_generator_proto_msgTypes[12]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ServiceVariable.ProtoReflect.Descriptor instead.
func (*ServiceVariable) Descriptor() ([]byte, []int) {
return file_grpc_federation_generator_proto_rawDescGZIP(), []int{12}
}
func (x *ServiceVariable) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *ServiceVariable) GetIf() *CELValue {
if x != nil {
return x.If
}
return nil
}
func (x *ServiceVariable) GetExpr() *ServiceVariableExpr {
if x != nil {
return x.Expr
}
return nil
}
type ServiceVariableExpr struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Type *Type `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"`
// Types that are assignable to Expr:
//
// *ServiceVariableExpr_By
// *ServiceVariableExpr_Map
// *ServiceVariableExpr_Message
// *ServiceVariableExpr_Validation
// *ServiceVariableExpr_Enum
// *ServiceVariableExpr_Switch
Expr isServiceVariableExpr_Expr `protobuf_oneof:"expr"`
}
func (x *ServiceVariableExpr) Reset() {
*x = ServiceVariableExpr{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_generator_proto_msgTypes[13]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ServiceVariableExpr) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ServiceVariableExpr) ProtoMessage() {}
func (x *ServiceVariableExpr) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_generator_proto_msgTypes[13]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ServiceVariableExpr.ProtoReflect.Descriptor instead.
func (*ServiceVariableExpr) Descriptor() ([]byte, []int) {
return file_grpc_federation_generator_proto_rawDescGZIP(), []int{13}
}
func (x *ServiceVariableExpr) GetType() *Type {
if x != nil {
return x.Type
}
return nil
}
func (m *ServiceVariableExpr) GetExpr() isServiceVariableExpr_Expr {
if m != nil {
return m.Expr
}
return nil
}
func (x *ServiceVariableExpr) GetBy() *CELValue {
if x, ok := x.GetExpr().(*ServiceVariableExpr_By); ok {
return x.By
}
return nil
}
func (x *ServiceVariableExpr) GetMap() *MapExpr {
if x, ok := x.GetExpr().(*ServiceVariableExpr_Map); ok {
return x.Map
}
return nil
}
func (x *ServiceVariableExpr) GetMessage() *MessageExpr {
if x, ok := x.GetExpr().(*ServiceVariableExpr_Message); ok {
return x.Message
}
return nil
}
func (x *ServiceVariableExpr) GetValidation() *ServiceVariableValidationExpr {
if x, ok := x.GetExpr().(*ServiceVariableExpr_Validation); ok {
return x.Validation
}
return nil
}
func (x *ServiceVariableExpr) GetEnum() *EnumExpr {
if x, ok := x.GetExpr().(*ServiceVariableExpr_Enum); ok {
return x.Enum
}
return nil
}
func (x *ServiceVariableExpr) GetSwitch() *SwitchExpr {
if x, ok := x.GetExpr().(*ServiceVariableExpr_Switch); ok {
return x.Switch
}
return nil
}
type isServiceVariableExpr_Expr interface {
isServiceVariableExpr_Expr()
}
type ServiceVariableExpr_By struct {
By *CELValue `protobuf:"bytes,2,opt,name=by,proto3,oneof"`
}
type ServiceVariableExpr_Map struct {
Map *MapExpr `protobuf:"bytes,3,opt,name=map,proto3,oneof"`
}
type ServiceVariableExpr_Message struct {
Message *MessageExpr `protobuf:"bytes,4,opt,name=message,proto3,oneof"`
}
type ServiceVariableExpr_Validation struct {
Validation *ServiceVariableValidationExpr `protobuf:"bytes,5,opt,name=validation,proto3,oneof"`
}
type ServiceVariableExpr_Enum struct {
Enum *EnumExpr `protobuf:"bytes,6,opt,name=enum,proto3,oneof"`
}
type ServiceVariableExpr_Switch struct {
Switch *SwitchExpr `protobuf:"bytes,7,opt,name=switch,proto3,oneof"`
}
func (*ServiceVariableExpr_By) isServiceVariableExpr_Expr() {}
func (*ServiceVariableExpr_Map) isServiceVariableExpr_Expr() {}
func (*ServiceVariableExpr_Message) isServiceVariableExpr_Expr() {}
func (*ServiceVariableExpr_Validation) isServiceVariableExpr_Expr() {}
func (*ServiceVariableExpr_Enum) isServiceVariableExpr_Expr() {}
func (*ServiceVariableExpr_Switch) isServiceVariableExpr_Expr() {}
type ServiceVariableValidationExpr struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
If *CELValue `protobuf:"bytes,1,opt,name=if,proto3" json:"if,omitempty"`
Message *CELValue `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
}
func (x *ServiceVariableValidationExpr) Reset() {
*x = ServiceVariableValidationExpr{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_generator_proto_msgTypes[14]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ServiceVariableValidationExpr) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ServiceVariableValidationExpr) ProtoMessage() {}
func (x *ServiceVariableValidationExpr) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_generator_proto_msgTypes[14]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ServiceVariableValidationExpr.ProtoReflect.Descriptor instead.
func (*ServiceVariableValidationExpr) Descriptor() ([]byte, []int) {
return file_grpc_federation_generator_proto_rawDescGZIP(), []int{14}
}
func (x *ServiceVariableValidationExpr) GetIf() *CELValue {
if x != nil {
return x.If
}
return nil
}
func (x *ServiceVariableValidationExpr) GetMessage() *CELValue {
if x != nil {
return x.Message
}
return nil
}
type Method struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
RequestId string `protobuf:"bytes,3,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"`
ResponseId string `protobuf:"bytes,4,opt,name=response_id,json=responseId,proto3" json:"response_id,omitempty"`
ServiceId string `protobuf:"bytes,5,opt,name=service_id,json=serviceId,proto3" json:"service_id,omitempty"`
Rule *MethodRule `protobuf:"bytes,6,opt,name=rule,proto3" json:"rule,omitempty"`
}
func (x *Method) Reset() {
*x = Method{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_generator_proto_msgTypes[15]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Method) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Method) ProtoMessage() {}
func (x *Method) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_generator_proto_msgTypes[15]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Method.ProtoReflect.Descriptor instead.
func (*Method) Descriptor() ([]byte, []int) {
return file_grpc_federation_generator_proto_rawDescGZIP(), []int{15}
}
func (x *Method) GetId() string {
if x != nil {
return x.Id
}
return ""
}
func (x *Method) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *Method) GetRequestId() string {
if x != nil {
return x.RequestId
}
return ""
}
func (x *Method) GetResponseId() string {
if x != nil {
return x.ResponseId
}
return ""
}
func (x *Method) GetServiceId() string {
if x != nil {
return x.ServiceId
}
return ""
}
func (x *Method) GetRule() *MethodRule {
if x != nil {
return x.Rule
}
return nil
}
type MethodRule struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Timeout *durationpb.Duration `protobuf:"bytes,1,opt,name=timeout,proto3" json:"timeout,omitempty"`
ResponseId string `protobuf:"bytes,2,opt,name=response_id,json=responseId,proto3" json:"response_id,omitempty"`
}
func (x *MethodRule) Reset() {
*x = MethodRule{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_generator_proto_msgTypes[16]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *MethodRule) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*MethodRule) ProtoMessage() {}
func (x *MethodRule) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_generator_proto_msgTypes[16]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use MethodRule.ProtoReflect.Descriptor instead.
func (*MethodRule) Descriptor() ([]byte, []int) {
return file_grpc_federation_generator_proto_rawDescGZIP(), []int{16}
}
func (x *MethodRule) GetTimeout() *durationpb.Duration {
if x != nil {
return x.Timeout
}
return nil
}
func (x *MethodRule) GetResponseId() string {
if x != nil {
return x.ResponseId
}
return ""
}
type Message struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
IsMapEntry bool `protobuf:"varint,3,opt,name=is_map_entry,json=isMapEntry,proto3" json:"is_map_entry,omitempty"`
FileId string `protobuf:"bytes,4,opt,name=file_id,json=fileId,proto3" json:"file_id,omitempty"`
ParentMessageId string `protobuf:"bytes,5,opt,name=parent_message_id,json=parentMessageId,proto3" json:"parent_message_id,omitempty"`
NestedMessageIds []string `protobuf:"bytes,6,rep,name=nested_message_ids,json=nestedMessageIds,proto3" json:"nested_message_ids,omitempty"`
EnumIds []string `protobuf:"bytes,7,rep,name=enum_ids,json=enumIds,proto3" json:"enum_ids,omitempty"`
FieldIds []string `protobuf:"bytes,8,rep,name=field_ids,json=fieldIds,proto3" json:"field_ids,omitempty"`
OneofIds []string `protobuf:"bytes,9,rep,name=oneof_ids,json=oneofIds,proto3" json:"oneof_ids,omitempty"`
Rule *MessageRule `protobuf:"bytes,10,opt,name=rule,proto3" json:"rule,omitempty"`
}
func (x *Message) Reset() {
*x = Message{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_generator_proto_msgTypes[17]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Message) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Message) ProtoMessage() {}
func (x *Message) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_generator_proto_msgTypes[17]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Message.ProtoReflect.Descriptor instead.
func (*Message) Descriptor() ([]byte, []int) {
return file_grpc_federation_generator_proto_rawDescGZIP(), []int{17}
}
func (x *Message) GetId() string {
if x != nil {
return x.Id
}
return ""
}
func (x *Message) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *Message) GetIsMapEntry() bool {
if x != nil {
return x.IsMapEntry
}
return false
}
func (x *Message) GetFileId() string {
if x != nil {
return x.FileId
}
return ""
}
func (x *Message) GetParentMessageId() string {
if x != nil {
return x.ParentMessageId
}
return ""
}
func (x *Message) GetNestedMessageIds() []string {
if x != nil {
return x.NestedMessageIds
}
return nil
}
func (x *Message) GetEnumIds() []string {
if x != nil {
return x.EnumIds
}
return nil
}
func (x *Message) GetFieldIds() []string {
if x != nil {
return x.FieldIds
}
return nil
}
func (x *Message) GetOneofIds() []string {
if x != nil {
return x.OneofIds
}
return nil
}
func (x *Message) GetRule() *MessageRule {
if x != nil {
return x.Rule
}
return nil
}
type MessageRule struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
MessageArgumentId string `protobuf:"bytes,1,opt,name=message_argument_id,json=messageArgumentId,proto3" json:"message_argument_id,omitempty"`
CustomResolver bool `protobuf:"varint,2,opt,name=custom_resolver,json=customResolver,proto3" json:"custom_resolver,omitempty"`
AliasIds []string `protobuf:"bytes,3,rep,name=alias_ids,json=aliasIds,proto3" json:"alias_ids,omitempty"`
DefSet *VariableDefinitionSet `protobuf:"bytes,4,opt,name=def_set,json=defSet,proto3" json:"def_set,omitempty"`
}
func (x *MessageRule) Reset() {
*x = MessageRule{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_generator_proto_msgTypes[18]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *MessageRule) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*MessageRule) ProtoMessage() {}
func (x *MessageRule) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_generator_proto_msgTypes[18]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use MessageRule.ProtoReflect.Descriptor instead.
func (*MessageRule) Descriptor() ([]byte, []int) {
return file_grpc_federation_generator_proto_rawDescGZIP(), []int{18}
}
func (x *MessageRule) GetMessageArgumentId() string {
if x != nil {
return x.MessageArgumentId
}
return ""
}
func (x *MessageRule) GetCustomResolver() bool {
if x != nil {
return x.CustomResolver
}
return false
}
func (x *MessageRule) GetAliasIds() []string {
if x != nil {
return x.AliasIds
}
return nil
}
func (x *MessageRule) GetDefSet() *VariableDefinitionSet {
if x != nil {
return x.DefSet
}
return nil
}
type VariableDefinitionSet struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
VariableDefinitionIds []string `protobuf:"bytes,1,rep,name=variable_definition_ids,json=variableDefinitionIds,proto3" json:"variable_definition_ids,omitempty"`
VariableDefinitionGroupIds []string `protobuf:"bytes,2,rep,name=variable_definition_group_ids,json=variableDefinitionGroupIds,proto3" json:"variable_definition_group_ids,omitempty"`
DependencyGraphId string `protobuf:"bytes,3,opt,name=dependency_graph_id,json=dependencyGraphId,proto3" json:"dependency_graph_id,omitempty"`
}
func (x *VariableDefinitionSet) Reset() {
*x = VariableDefinitionSet{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_generator_proto_msgTypes[19]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *VariableDefinitionSet) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*VariableDefinitionSet) ProtoMessage() {}
func (x *VariableDefinitionSet) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_generator_proto_msgTypes[19]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use VariableDefinitionSet.ProtoReflect.Descriptor instead.
func (*VariableDefinitionSet) Descriptor() ([]byte, []int) {
return file_grpc_federation_generator_proto_rawDescGZIP(), []int{19}
}
func (x *VariableDefinitionSet) GetVariableDefinitionIds() []string {
if x != nil {
return x.VariableDefinitionIds
}
return nil
}
func (x *VariableDefinitionSet) GetVariableDefinitionGroupIds() []string {
if x != nil {
return x.VariableDefinitionGroupIds
}
return nil
}
func (x *VariableDefinitionSet) GetDependencyGraphId() string {
if x != nil {
return x.DependencyGraphId
}
return ""
}
type VariableDefinition struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
Index int64 `protobuf:"varint,2,opt,name=index,proto3" json:"index,omitempty"`
Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"`
If *CELValue `protobuf:"bytes,4,opt,name=if,proto3" json:"if,omitempty"`
AutoBind bool `protobuf:"varint,5,opt,name=auto_bind,json=autoBind,proto3" json:"auto_bind,omitempty"`
Used bool `protobuf:"varint,6,opt,name=used,proto3" json:"used,omitempty"`
Expr *VariableExpr `protobuf:"bytes,7,opt,name=expr,proto3" json:"expr,omitempty"`
}
func (x *VariableDefinition) Reset() {
*x = VariableDefinition{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_generator_proto_msgTypes[20]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *VariableDefinition) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*VariableDefinition) ProtoMessage() {}
func (x *VariableDefinition) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_generator_proto_msgTypes[20]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use VariableDefinition.ProtoReflect.Descriptor instead.
func (*VariableDefinition) Descriptor() ([]byte, []int) {
return file_grpc_federation_generator_proto_rawDescGZIP(), []int{20}
}
func (x *VariableDefinition) GetId() string {
if x != nil {
return x.Id
}
return ""
}
func (x *VariableDefinition) GetIndex() int64 {
if x != nil {
return x.Index
}
return 0
}
func (x *VariableDefinition) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *VariableDefinition) GetIf() *CELValue {
if x != nil {
return x.If
}
return nil
}
func (x *VariableDefinition) GetAutoBind() bool {
if x != nil {
return x.AutoBind
}
return false
}
func (x *VariableDefinition) GetUsed() bool {
if x != nil {
return x.Used
}
return false
}
func (x *VariableDefinition) GetExpr() *VariableExpr {
if x != nil {
return x.Expr
}
return nil
}
type Field struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
Type *Type `protobuf:"bytes,3,opt,name=type,proto3" json:"type,omitempty"`
OneofId string `protobuf:"bytes,4,opt,name=oneof_id,json=oneofId,proto3" json:"oneof_id,omitempty"`
Rule *FieldRule `protobuf:"bytes,5,opt,name=rule,proto3" json:"rule,omitempty"`
MessageId string `protobuf:"bytes,6,opt,name=message_id,json=messageId,proto3" json:"message_id,omitempty"`
}
func (x *Field) Reset() {
*x = Field{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_generator_proto_msgTypes[21]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Field) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Field) ProtoMessage() {}
func (x *Field) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_generator_proto_msgTypes[21]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Field.ProtoReflect.Descriptor instead.
func (*Field) Descriptor() ([]byte, []int) {
return file_grpc_federation_generator_proto_rawDescGZIP(), []int{21}
}
func (x *Field) GetId() string {
if x != nil {
return x.Id
}
return ""
}
func (x *Field) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *Field) GetType() *Type {
if x != nil {
return x.Type
}
return nil
}
func (x *Field) GetOneofId() string {
if x != nil {
return x.OneofId
}
return ""
}
func (x *Field) GetRule() *FieldRule {
if x != nil {
return x.Rule
}
return nil
}
func (x *Field) GetMessageId() string {
if x != nil {
return x.MessageId
}
return ""
}
type FieldRule struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Value *Value `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"`
CustomResolver bool `protobuf:"varint,2,opt,name=custom_resolver,json=customResolver,proto3" json:"custom_resolver,omitempty"`
MessageCustomResolver bool `protobuf:"varint,3,opt,name=message_custom_resolver,json=messageCustomResolver,proto3" json:"message_custom_resolver,omitempty"`
AliasIds []string `protobuf:"bytes,4,rep,name=alias_ids,json=aliasIds,proto3" json:"alias_ids,omitempty"`
AutoBindField *AutoBindField `protobuf:"bytes,5,opt,name=auto_bind_field,json=autoBindField,proto3" json:"auto_bind_field,omitempty"`
OneofRule *FieldOneofRule `protobuf:"bytes,6,opt,name=oneof_rule,json=oneofRule,proto3" json:"oneof_rule,omitempty"`
}
func (x *FieldRule) Reset() {
*x = FieldRule{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_generator_proto_msgTypes[22]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *FieldRule) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*FieldRule) ProtoMessage() {}
func (x *FieldRule) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_generator_proto_msgTypes[22]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use FieldRule.ProtoReflect.Descriptor instead.
func (*FieldRule) Descriptor() ([]byte, []int) {
return file_grpc_federation_generator_proto_rawDescGZIP(), []int{22}
}
func (x *FieldRule) GetValue() *Value {
if x != nil {
return x.Value
}
return nil
}
func (x *FieldRule) GetCustomResolver() bool {
if x != nil {
return x.CustomResolver
}
return false
}
func (x *FieldRule) GetMessageCustomResolver() bool {
if x != nil {
return x.MessageCustomResolver
}
return false
}
func (x *FieldRule) GetAliasIds() []string {
if x != nil {
return x.AliasIds
}
return nil
}
func (x *FieldRule) GetAutoBindField() *AutoBindField {
if x != nil {
return x.AutoBindField
}
return nil
}
func (x *FieldRule) GetOneofRule() *FieldOneofRule {
if x != nil {
return x.OneofRule
}
return nil
}
type AutoBindField struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
VariableDefinitionId string `protobuf:"bytes,1,opt,name=variable_definition_id,json=variableDefinitionId,proto3" json:"variable_definition_id,omitempty"`
FieldId string `protobuf:"bytes,2,opt,name=field_id,json=fieldId,proto3" json:"field_id,omitempty"`
}
func (x *AutoBindField) Reset() {
*x = AutoBindField{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_generator_proto_msgTypes[23]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *AutoBindField) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*AutoBindField) ProtoMessage() {}
func (x *AutoBindField) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_generator_proto_msgTypes[23]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use AutoBindField.ProtoReflect.Descriptor instead.
func (*AutoBindField) Descriptor() ([]byte, []int) {
return file_grpc_federation_generator_proto_rawDescGZIP(), []int{23}
}
func (x *AutoBindField) GetVariableDefinitionId() string {
if x != nil {
return x.VariableDefinitionId
}
return ""
}
func (x *AutoBindField) GetFieldId() string {
if x != nil {
return x.FieldId
}
return ""
}
type FieldOneofRule struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
If *CELValue `protobuf:"bytes,1,opt,name=if,proto3" json:"if,omitempty"`
Default bool `protobuf:"varint,2,opt,name=default,proto3" json:"default,omitempty"`
By *CELValue `protobuf:"bytes,3,opt,name=by,proto3" json:"by,omitempty"`
DefSet *VariableDefinitionSet `protobuf:"bytes,4,opt,name=def_set,json=defSet,proto3" json:"def_set,omitempty"`
}
func (x *FieldOneofRule) Reset() {
*x = FieldOneofRule{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_generator_proto_msgTypes[24]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *FieldOneofRule) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*FieldOneofRule) ProtoMessage() {}
func (x *FieldOneofRule) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_generator_proto_msgTypes[24]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use FieldOneofRule.ProtoReflect.Descriptor instead.
func (*FieldOneofRule) Descriptor() ([]byte, []int) {
return file_grpc_federation_generator_proto_rawDescGZIP(), []int{24}
}
func (x *FieldOneofRule) GetIf() *CELValue {
if x != nil {
return x.If
}
return nil
}
func (x *FieldOneofRule) GetDefault() bool {
if x != nil {
return x.Default
}
return false
}
func (x *FieldOneofRule) GetBy() *CELValue {
if x != nil {
return x.By
}
return nil
}
func (x *FieldOneofRule) GetDefSet() *VariableDefinitionSet {
if x != nil {
return x.DefSet
}
return nil
}
type VariableDefinitionGroup struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
// Types that are assignable to Group:
//
// *VariableDefinitionGroup_Sequential
// *VariableDefinitionGroup_Concurrent
Group isVariableDefinitionGroup_Group `protobuf_oneof:"group"`
}
func (x *VariableDefinitionGroup) Reset() {
*x = VariableDefinitionGroup{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_generator_proto_msgTypes[25]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *VariableDefinitionGroup) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*VariableDefinitionGroup) ProtoMessage() {}
func (x *VariableDefinitionGroup) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_generator_proto_msgTypes[25]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use VariableDefinitionGroup.ProtoReflect.Descriptor instead.
func (*VariableDefinitionGroup) Descriptor() ([]byte, []int) {
return file_grpc_federation_generator_proto_rawDescGZIP(), []int{25}
}
func (x *VariableDefinitionGroup) GetId() string {
if x != nil {
return x.Id
}
return ""
}
func (m *VariableDefinitionGroup) GetGroup() isVariableDefinitionGroup_Group {
if m != nil {
return m.Group
}
return nil
}
func (x *VariableDefinitionGroup) GetSequential() *SequentialVariableDefinitionGroup {
if x, ok := x.GetGroup().(*VariableDefinitionGroup_Sequential); ok {
return x.Sequential
}
return nil
}
func (x *VariableDefinitionGroup) GetConcurrent() *ConcurrentVariableDefinitionGroup {
if x, ok := x.GetGroup().(*VariableDefinitionGroup_Concurrent); ok {
return x.Concurrent
}
return nil
}
type isVariableDefinitionGroup_Group interface {
isVariableDefinitionGroup_Group()
}
type VariableDefinitionGroup_Sequential struct {
Sequential *SequentialVariableDefinitionGroup `protobuf:"bytes,2,opt,name=sequential,proto3,oneof"`
}
type VariableDefinitionGroup_Concurrent struct {
Concurrent *ConcurrentVariableDefinitionGroup `protobuf:"bytes,3,opt,name=concurrent,proto3,oneof"`
}
func (*VariableDefinitionGroup_Sequential) isVariableDefinitionGroup_Group() {}
func (*VariableDefinitionGroup_Concurrent) isVariableDefinitionGroup_Group() {}
type SequentialVariableDefinitionGroup struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Start string `protobuf:"bytes,1,opt,name=start,proto3" json:"start,omitempty"`
End string `protobuf:"bytes,2,opt,name=end,proto3" json:"end,omitempty"`
}
func (x *SequentialVariableDefinitionGroup) Reset() {
*x = SequentialVariableDefinitionGroup{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_generator_proto_msgTypes[26]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *SequentialVariableDefinitionGroup) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*SequentialVariableDefinitionGroup) ProtoMessage() {}
func (x *SequentialVariableDefinitionGroup) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_generator_proto_msgTypes[26]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use SequentialVariableDefinitionGroup.ProtoReflect.Descriptor instead.
func (*SequentialVariableDefinitionGroup) Descriptor() ([]byte, []int) {
return file_grpc_federation_generator_proto_rawDescGZIP(), []int{26}
}
func (x *SequentialVariableDefinitionGroup) GetStart() string {
if x != nil {
return x.Start
}
return ""
}
func (x *SequentialVariableDefinitionGroup) GetEnd() string {
if x != nil {
return x.End
}
return ""
}
type ConcurrentVariableDefinitionGroup struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Starts []string `protobuf:"bytes,1,rep,name=starts,proto3" json:"starts,omitempty"`
End string `protobuf:"bytes,2,opt,name=end,proto3" json:"end,omitempty"`
}
func (x *ConcurrentVariableDefinitionGroup) Reset() {
*x = ConcurrentVariableDefinitionGroup{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_generator_proto_msgTypes[27]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ConcurrentVariableDefinitionGroup) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ConcurrentVariableDefinitionGroup) ProtoMessage() {}
func (x *ConcurrentVariableDefinitionGroup) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_generator_proto_msgTypes[27]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ConcurrentVariableDefinitionGroup.ProtoReflect.Descriptor instead.
func (*ConcurrentVariableDefinitionGroup) Descriptor() ([]byte, []int) {
return file_grpc_federation_generator_proto_rawDescGZIP(), []int{27}
}
func (x *ConcurrentVariableDefinitionGroup) GetStarts() []string {
if x != nil {
return x.Starts
}
return nil
}
func (x *ConcurrentVariableDefinitionGroup) GetEnd() string {
if x != nil {
return x.End
}
return ""
}
type MessageDependencyGraph struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
RootNodeIds []string `protobuf:"bytes,2,rep,name=root_node_ids,json=rootNodeIds,proto3" json:"root_node_ids,omitempty"`
}
func (x *MessageDependencyGraph) Reset() {
*x = MessageDependencyGraph{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_generator_proto_msgTypes[28]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *MessageDependencyGraph) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*MessageDependencyGraph) ProtoMessage() {}
func (x *MessageDependencyGraph) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_generator_proto_msgTypes[28]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use MessageDependencyGraph.ProtoReflect.Descriptor instead.
func (*MessageDependencyGraph) Descriptor() ([]byte, []int) {
return file_grpc_federation_generator_proto_rawDescGZIP(), []int{28}
}
func (x *MessageDependencyGraph) GetId() string {
if x != nil {
return x.Id
}
return ""
}
func (x *MessageDependencyGraph) GetRootNodeIds() []string {
if x != nil {
return x.RootNodeIds
}
return nil
}
type MessageDependencyGraphNode struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
ChildIds []string `protobuf:"bytes,2,rep,name=child_ids,json=childIds,proto3" json:"child_ids,omitempty"`
BaseMessageId string `protobuf:"bytes,3,opt,name=base_message_id,json=baseMessageId,proto3" json:"base_message_id,omitempty"`
VariableDefinitionId string `protobuf:"bytes,4,opt,name=variable_definition_id,json=variableDefinitionId,proto3" json:"variable_definition_id,omitempty"`
}
func (x *MessageDependencyGraphNode) Reset() {
*x = MessageDependencyGraphNode{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_generator_proto_msgTypes[29]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *MessageDependencyGraphNode) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*MessageDependencyGraphNode) ProtoMessage() {}
func (x *MessageDependencyGraphNode) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_generator_proto_msgTypes[29]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use MessageDependencyGraphNode.ProtoReflect.Descriptor instead.
func (*MessageDependencyGraphNode) Descriptor() ([]byte, []int) {
return file_grpc_federation_generator_proto_rawDescGZIP(), []int{29}
}
func (x *MessageDependencyGraphNode) GetId() string {
if x != nil {
return x.Id
}
return ""
}
func (x *MessageDependencyGraphNode) GetChildIds() []string {
if x != nil {
return x.ChildIds
}
return nil
}
func (x *MessageDependencyGraphNode) GetBaseMessageId() string {
if x != nil {
return x.BaseMessageId
}
return ""
}
func (x *MessageDependencyGraphNode) GetVariableDefinitionId() string {
if x != nil {
return x.VariableDefinitionId
}
return ""
}
type VariableExpr struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Type *Type `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"`
// Types that are assignable to Expr:
//
// *VariableExpr_By
// *VariableExpr_Map
// *VariableExpr_Call
// *VariableExpr_Message
// *VariableExpr_Validation
// *VariableExpr_Enum
// *VariableExpr_Switch
Expr isVariableExpr_Expr `protobuf_oneof:"expr"`
}
func (x *VariableExpr) Reset() {
*x = VariableExpr{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_generator_proto_msgTypes[30]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *VariableExpr) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*VariableExpr) ProtoMessage() {}
func (x *VariableExpr) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_generator_proto_msgTypes[30]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use VariableExpr.ProtoReflect.Descriptor instead.
func (*VariableExpr) Descriptor() ([]byte, []int) {
return file_grpc_federation_generator_proto_rawDescGZIP(), []int{30}
}
func (x *VariableExpr) GetType() *Type {
if x != nil {
return x.Type
}
return nil
}
func (m *VariableExpr) GetExpr() isVariableExpr_Expr {
if m != nil {
return m.Expr
}
return nil
}
func (x *VariableExpr) GetBy() *CELValue {
if x, ok := x.GetExpr().(*VariableExpr_By); ok {
return x.By
}
return nil
}
func (x *VariableExpr) GetMap() *MapExpr {
if x, ok := x.GetExpr().(*VariableExpr_Map); ok {
return x.Map
}
return nil
}
func (x *VariableExpr) GetCall() *CallExpr {
if x, ok := x.GetExpr().(*VariableExpr_Call); ok {
return x.Call
}
return nil
}
func (x *VariableExpr) GetMessage() *MessageExpr {
if x, ok := x.GetExpr().(*VariableExpr_Message); ok {
return x.Message
}
return nil
}
func (x *VariableExpr) GetValidation() *ValidationExpr {
if x, ok := x.GetExpr().(*VariableExpr_Validation); ok {
return x.Validation
}
return nil
}
func (x *VariableExpr) GetEnum() *EnumExpr {
if x, ok := x.GetExpr().(*VariableExpr_Enum); ok {
return x.Enum
}
return nil
}
func (x *VariableExpr) GetSwitch() *SwitchExpr {
if x, ok := x.GetExpr().(*VariableExpr_Switch); ok {
return x.Switch
}
return nil
}
type isVariableExpr_Expr interface {
isVariableExpr_Expr()
}
type VariableExpr_By struct {
By *CELValue `protobuf:"bytes,2,opt,name=by,proto3,oneof"`
}
type VariableExpr_Map struct {
Map *MapExpr `protobuf:"bytes,3,opt,name=map,proto3,oneof"`
}
type VariableExpr_Call struct {
Call *CallExpr `protobuf:"bytes,4,opt,name=call,proto3,oneof"`
}
type VariableExpr_Message struct {
Message *MessageExpr `protobuf:"bytes,5,opt,name=message,proto3,oneof"`
}
type VariableExpr_Validation struct {
Validation *ValidationExpr `protobuf:"bytes,6,opt,name=validation,proto3,oneof"`
}
type VariableExpr_Enum struct {
Enum *EnumExpr `protobuf:"bytes,7,opt,name=enum,proto3,oneof"`
}
type VariableExpr_Switch struct {
Switch *SwitchExpr `protobuf:"bytes,8,opt,name=switch,proto3,oneof"`
}
func (*VariableExpr_By) isVariableExpr_Expr() {}
func (*VariableExpr_Map) isVariableExpr_Expr() {}
func (*VariableExpr_Call) isVariableExpr_Expr() {}
func (*VariableExpr_Message) isVariableExpr_Expr() {}
func (*VariableExpr_Validation) isVariableExpr_Expr() {}
func (*VariableExpr_Enum) isVariableExpr_Expr() {}
func (*VariableExpr_Switch) isVariableExpr_Expr() {}
type Type struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Kind TypeKind `protobuf:"varint,1,opt,name=kind,proto3,enum=grpc.federation.generator.plugin.TypeKind" json:"kind,omitempty"`
Repeated bool `protobuf:"varint,2,opt,name=repeated,proto3" json:"repeated,omitempty"`
IsNull bool `protobuf:"varint,3,opt,name=is_null,json=isNull,proto3" json:"is_null,omitempty"`
// Types that are assignable to Ref:
//
// *Type_MessageId
// *Type_EnumId
// *Type_OneofFieldId
Ref isType_Ref `protobuf_oneof:"ref"`
}
func (x *Type) Reset() {
*x = Type{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_generator_proto_msgTypes[31]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Type) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Type) ProtoMessage() {}
func (x *Type) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_generator_proto_msgTypes[31]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Type.ProtoReflect.Descriptor instead.
func (*Type) Descriptor() ([]byte, []int) {
return file_grpc_federation_generator_proto_rawDescGZIP(), []int{31}
}
func (x *Type) GetKind() TypeKind {
if x != nil {
return x.Kind
}
return TypeKind_UNKNOWN_TYPE
}
func (x *Type) GetRepeated() bool {
if x != nil {
return x.Repeated
}
return false
}
func (x *Type) GetIsNull() bool {
if x != nil {
return x.IsNull
}
return false
}
func (m *Type) GetRef() isType_Ref {
if m != nil {
return m.Ref
}
return nil
}
func (x *Type) GetMessageId() string {
if x, ok := x.GetRef().(*Type_MessageId); ok {
return x.MessageId
}
return ""
}
func (x *Type) GetEnumId() string {
if x, ok := x.GetRef().(*Type_EnumId); ok {
return x.EnumId
}
return ""
}
func (x *Type) GetOneofFieldId() string {
if x, ok := x.GetRef().(*Type_OneofFieldId); ok {
return x.OneofFieldId
}
return ""
}
type isType_Ref interface {
isType_Ref()
}
type Type_MessageId struct {
MessageId string `protobuf:"bytes,4,opt,name=message_id,json=messageId,proto3,oneof"`
}
type Type_EnumId struct {
EnumId string `protobuf:"bytes,5,opt,name=enum_id,json=enumId,proto3,oneof"`
}
type Type_OneofFieldId struct {
OneofFieldId string `protobuf:"bytes,6,opt,name=oneof_field_id,json=oneofFieldId,proto3,oneof"`
}
func (*Type_MessageId) isType_Ref() {}
func (*Type_EnumId) isType_Ref() {}
func (*Type_OneofFieldId) isType_Ref() {}
type CELValue struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Expr string `protobuf:"bytes,1,opt,name=expr,proto3" json:"expr,omitempty"`
Out *Type `protobuf:"bytes,2,opt,name=out,proto3" json:"out,omitempty"`
}
func (x *CELValue) Reset() {
*x = CELValue{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_generator_proto_msgTypes[32]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *CELValue) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CELValue) ProtoMessage() {}
func (x *CELValue) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_generator_proto_msgTypes[32]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use CELValue.ProtoReflect.Descriptor instead.
func (*CELValue) Descriptor() ([]byte, []int) {
return file_grpc_federation_generator_proto_rawDescGZIP(), []int{32}
}
func (x *CELValue) GetExpr() string {
if x != nil {
return x.Expr
}
return ""
}
func (x *CELValue) GetOut() *Type {
if x != nil {
return x.Out
}
return nil
}
type MapExpr struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Iterator *Iterator `protobuf:"bytes,1,opt,name=iterator,proto3" json:"iterator,omitempty"`
Expr *MapIteratorExpr `protobuf:"bytes,2,opt,name=expr,proto3" json:"expr,omitempty"`
}
func (x *MapExpr) Reset() {
*x = MapExpr{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_generator_proto_msgTypes[33]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *MapExpr) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*MapExpr) ProtoMessage() {}
func (x *MapExpr) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_generator_proto_msgTypes[33]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use MapExpr.ProtoReflect.Descriptor instead.
func (*MapExpr) Descriptor() ([]byte, []int) {
return file_grpc_federation_generator_proto_rawDescGZIP(), []int{33}
}
func (x *MapExpr) GetIterator() *Iterator {
if x != nil {
return x.Iterator
}
return nil
}
func (x *MapExpr) GetExpr() *MapIteratorExpr {
if x != nil {
return x.Expr
}
return nil
}
type Iterator struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
SourceId string `protobuf:"bytes,2,opt,name=source_id,json=sourceId,proto3" json:"source_id,omitempty"`
}
func (x *Iterator) Reset() {
*x = Iterator{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_generator_proto_msgTypes[34]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Iterator) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Iterator) ProtoMessage() {}
func (x *Iterator) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_generator_proto_msgTypes[34]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Iterator.ProtoReflect.Descriptor instead.
func (*Iterator) Descriptor() ([]byte, []int) {
return file_grpc_federation_generator_proto_rawDescGZIP(), []int{34}
}
func (x *Iterator) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *Iterator) GetSourceId() string {
if x != nil {
return x.SourceId
}
return ""
}
type MapIteratorExpr struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Type *Type `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"`
// Types that are assignable to Expr:
//
// *MapIteratorExpr_By
// *MapIteratorExpr_Message
// *MapIteratorExpr_Enum
Expr isMapIteratorExpr_Expr `protobuf_oneof:"expr"`
}
func (x *MapIteratorExpr) Reset() {
*x = MapIteratorExpr{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_generator_proto_msgTypes[35]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *MapIteratorExpr) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*MapIteratorExpr) ProtoMessage() {}
func (x *MapIteratorExpr) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_generator_proto_msgTypes[35]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use MapIteratorExpr.ProtoReflect.Descriptor instead.
func (*MapIteratorExpr) Descriptor() ([]byte, []int) {
return file_grpc_federation_generator_proto_rawDescGZIP(), []int{35}
}
func (x *MapIteratorExpr) GetType() *Type {
if x != nil {
return x.Type
}
return nil
}
func (m *MapIteratorExpr) GetExpr() isMapIteratorExpr_Expr {
if m != nil {
return m.Expr
}
return nil
}
func (x *MapIteratorExpr) GetBy() *CELValue {
if x, ok := x.GetExpr().(*MapIteratorExpr_By); ok {
return x.By
}
return nil
}
func (x *MapIteratorExpr) GetMessage() *MessageExpr {
if x, ok := x.GetExpr().(*MapIteratorExpr_Message); ok {
return x.Message
}
return nil
}
func (x *MapIteratorExpr) GetEnum() *EnumExpr {
if x, ok := x.GetExpr().(*MapIteratorExpr_Enum); ok {
return x.Enum
}
return nil
}
type isMapIteratorExpr_Expr interface {
isMapIteratorExpr_Expr()
}
type MapIteratorExpr_By struct {
By *CELValue `protobuf:"bytes,2,opt,name=by,proto3,oneof"`
}
type MapIteratorExpr_Message struct {
Message *MessageExpr `protobuf:"bytes,3,opt,name=message,proto3,oneof"`
}
type MapIteratorExpr_Enum struct {
Enum *EnumExpr `protobuf:"bytes,4,opt,name=enum,proto3,oneof"`
}
func (*MapIteratorExpr_By) isMapIteratorExpr_Expr() {}
func (*MapIteratorExpr_Message) isMapIteratorExpr_Expr() {}
func (*MapIteratorExpr_Enum) isMapIteratorExpr_Expr() {}
type CallExpr struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
MethodId string `protobuf:"bytes,1,opt,name=method_id,json=methodId,proto3" json:"method_id,omitempty"`
Request *Request `protobuf:"bytes,2,opt,name=request,proto3" json:"request,omitempty"`
Timeout *durationpb.Duration `protobuf:"bytes,3,opt,name=timeout,proto3" json:"timeout,omitempty"`
Retry *RetryPolicy `protobuf:"bytes,4,opt,name=retry,proto3" json:"retry,omitempty"`
Errors []*GRPCError `protobuf:"bytes,5,rep,name=errors,proto3" json:"errors,omitempty"`
Option *GRPCCallOption `protobuf:"bytes,6,opt,name=option,proto3" json:"option,omitempty"`
Metadata *CELValue `protobuf:"bytes,7,opt,name=metadata,proto3" json:"metadata,omitempty"`
}
func (x *CallExpr) Reset() {
*x = CallExpr{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_generator_proto_msgTypes[36]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *CallExpr) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CallExpr) ProtoMessage() {}
func (x *CallExpr) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_generator_proto_msgTypes[36]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use CallExpr.ProtoReflect.Descriptor instead.
func (*CallExpr) Descriptor() ([]byte, []int) {
return file_grpc_federation_generator_proto_rawDescGZIP(), []int{36}
}
func (x *CallExpr) GetMethodId() string {
if x != nil {
return x.MethodId
}
return ""
}
func (x *CallExpr) GetRequest() *Request {
if x != nil {
return x.Request
}
return nil
}
func (x *CallExpr) GetTimeout() *durationpb.Duration {
if x != nil {
return x.Timeout
}
return nil
}
func (x *CallExpr) GetRetry() *RetryPolicy {
if x != nil {
return x.Retry
}
return nil
}
func (x *CallExpr) GetErrors() []*GRPCError {
if x != nil {
return x.Errors
}
return nil
}
func (x *CallExpr) GetOption() *GRPCCallOption {
if x != nil {
return x.Option
}
return nil
}
func (x *CallExpr) GetMetadata() *CELValue {
if x != nil {
return x.Metadata
}
return nil
}
type RetryPolicy struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Types that are assignable to Policy:
//
// *RetryPolicy_Constant
// *RetryPolicy_Exponential
Policy isRetryPolicy_Policy `protobuf_oneof:"policy"`
If *CELValue `protobuf:"bytes,3,opt,name=if,proto3" json:"if,omitempty"`
}
func (x *RetryPolicy) Reset() {
*x = RetryPolicy{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_generator_proto_msgTypes[37]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *RetryPolicy) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*RetryPolicy) ProtoMessage() {}
func (x *RetryPolicy) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_generator_proto_msgTypes[37]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use RetryPolicy.ProtoReflect.Descriptor instead.
func (*RetryPolicy) Descriptor() ([]byte, []int) {
return file_grpc_federation_generator_proto_rawDescGZIP(), []int{37}
}
func (m *RetryPolicy) GetPolicy() isRetryPolicy_Policy {
if m != nil {
return m.Policy
}
return nil
}
func (x *RetryPolicy) GetConstant() *RetryPolicyConstant {
if x, ok := x.GetPolicy().(*RetryPolicy_Constant); ok {
return x.Constant
}
return nil
}
func (x *RetryPolicy) GetExponential() *RetryPolicyExponential {
if x, ok := x.GetPolicy().(*RetryPolicy_Exponential); ok {
return x.Exponential
}
return nil
}
func (x *RetryPolicy) GetIf() *CELValue {
if x != nil {
return x.If
}
return nil
}
type isRetryPolicy_Policy interface {
isRetryPolicy_Policy()
}
type RetryPolicy_Constant struct {
Constant *RetryPolicyConstant `protobuf:"bytes,1,opt,name=constant,proto3,oneof"`
}
type RetryPolicy_Exponential struct {
Exponential *RetryPolicyExponential `protobuf:"bytes,2,opt,name=exponential,proto3,oneof"`
}
func (*RetryPolicy_Constant) isRetryPolicy_Policy() {}
func (*RetryPolicy_Exponential) isRetryPolicy_Policy() {}
type RetryPolicyConstant struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Interval *durationpb.Duration `protobuf:"bytes,1,opt,name=interval,proto3" json:"interval,omitempty"`
MaxRetries uint64 `protobuf:"varint,2,opt,name=max_retries,json=maxRetries,proto3" json:"max_retries,omitempty"`
}
func (x *RetryPolicyConstant) Reset() {
*x = RetryPolicyConstant{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_generator_proto_msgTypes[38]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *RetryPolicyConstant) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*RetryPolicyConstant) ProtoMessage() {}
func (x *RetryPolicyConstant) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_generator_proto_msgTypes[38]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use RetryPolicyConstant.ProtoReflect.Descriptor instead.
func (*RetryPolicyConstant) Descriptor() ([]byte, []int) {
return file_grpc_federation_generator_proto_rawDescGZIP(), []int{38}
}
func (x *RetryPolicyConstant) GetInterval() *durationpb.Duration {
if x != nil {
return x.Interval
}
return nil
}
func (x *RetryPolicyConstant) GetMaxRetries() uint64 {
if x != nil {
return x.MaxRetries
}
return 0
}
type RetryPolicyExponential struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
InitialInterval *durationpb.Duration `protobuf:"bytes,1,opt,name=initial_interval,json=initialInterval,proto3" json:"initial_interval,omitempty"`
RandomizationFactor float64 `protobuf:"fixed64,2,opt,name=randomization_factor,json=randomizationFactor,proto3" json:"randomization_factor,omitempty"`
Multiplier float64 `protobuf:"fixed64,3,opt,name=multiplier,proto3" json:"multiplier,omitempty"`
MaxInterval *durationpb.Duration `protobuf:"bytes,4,opt,name=max_interval,json=maxInterval,proto3" json:"max_interval,omitempty"`
MaxRetries uint64 `protobuf:"varint,5,opt,name=max_retries,json=maxRetries,proto3" json:"max_retries,omitempty"`
MaxElapsedTime *durationpb.Duration `protobuf:"bytes,6,opt,name=max_elapsed_time,json=maxElapsedTime,proto3" json:"max_elapsed_time,omitempty"`
}
func (x *RetryPolicyExponential) Reset() {
*x = RetryPolicyExponential{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_generator_proto_msgTypes[39]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *RetryPolicyExponential) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*RetryPolicyExponential) ProtoMessage() {}
func (x *RetryPolicyExponential) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_generator_proto_msgTypes[39]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use RetryPolicyExponential.ProtoReflect.Descriptor instead.
func (*RetryPolicyExponential) Descriptor() ([]byte, []int) {
return file_grpc_federation_generator_proto_rawDescGZIP(), []int{39}
}
func (x *RetryPolicyExponential) GetInitialInterval() *durationpb.Duration {
if x != nil {
return x.InitialInterval
}
return nil
}
func (x *RetryPolicyExponential) GetRandomizationFactor() float64 {
if x != nil {
return x.RandomizationFactor
}
return 0
}
func (x *RetryPolicyExponential) GetMultiplier() float64 {
if x != nil {
return x.Multiplier
}
return 0
}
func (x *RetryPolicyExponential) GetMaxInterval() *durationpb.Duration {
if x != nil {
return x.MaxInterval
}
return nil
}
func (x *RetryPolicyExponential) GetMaxRetries() uint64 {
if x != nil {
return x.MaxRetries
}
return 0
}
func (x *RetryPolicyExponential) GetMaxElapsedTime() *durationpb.Duration {
if x != nil {
return x.MaxElapsedTime
}
return nil
}
type Request struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Args []*Argument `protobuf:"bytes,1,rep,name=args,proto3" json:"args,omitempty"`
TypeId string `protobuf:"bytes,2,opt,name=type_id,json=typeId,proto3" json:"type_id,omitempty"`
}
func (x *Request) Reset() {
*x = Request{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_generator_proto_msgTypes[40]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Request) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Request) ProtoMessage() {}
func (x *Request) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_generator_proto_msgTypes[40]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Request.ProtoReflect.Descriptor instead.
func (*Request) Descriptor() ([]byte, []int) {
return file_grpc_federation_generator_proto_rawDescGZIP(), []int{40}
}
func (x *Request) GetArgs() []*Argument {
if x != nil {
return x.Args
}
return nil
}
func (x *Request) GetTypeId() string {
if x != nil {
return x.TypeId
}
return ""
}
type MessageExpr struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
MessageId string `protobuf:"bytes,1,opt,name=message_id,json=messageId,proto3" json:"message_id,omitempty"`
Args []*Argument `protobuf:"bytes,2,rep,name=args,proto3" json:"args,omitempty"`
}
func (x *MessageExpr) Reset() {
*x = MessageExpr{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_generator_proto_msgTypes[41]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *MessageExpr) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*MessageExpr) ProtoMessage() {}
func (x *MessageExpr) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_generator_proto_msgTypes[41]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use MessageExpr.ProtoReflect.Descriptor instead.
func (*MessageExpr) Descriptor() ([]byte, []int) {
return file_grpc_federation_generator_proto_rawDescGZIP(), []int{41}
}
func (x *MessageExpr) GetMessageId() string {
if x != nil {
return x.MessageId
}
return ""
}
func (x *MessageExpr) GetArgs() []*Argument {
if x != nil {
return x.Args
}
return nil
}
type EnumExpr struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
EnumId string `protobuf:"bytes,1,opt,name=enum_id,json=enumId,proto3" json:"enum_id,omitempty"`
By *CELValue `protobuf:"bytes,2,opt,name=by,proto3" json:"by,omitempty"`
}
func (x *EnumExpr) Reset() {
*x = EnumExpr{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_generator_proto_msgTypes[42]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *EnumExpr) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*EnumExpr) ProtoMessage() {}
func (x *EnumExpr) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_generator_proto_msgTypes[42]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use EnumExpr.ProtoReflect.Descriptor instead.
func (*EnumExpr) Descriptor() ([]byte, []int) {
return file_grpc_federation_generator_proto_rawDescGZIP(), []int{42}
}
func (x *EnumExpr) GetEnumId() string {
if x != nil {
return x.EnumId
}
return ""
}
func (x *EnumExpr) GetBy() *CELValue {
if x != nil {
return x.By
}
return nil
}
type Argument struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
Type *Type `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"`
Value *Value `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"`
If *CELValue `protobuf:"bytes,4,opt,name=if,proto3" json:"if,omitempty"`
}
func (x *Argument) Reset() {
*x = Argument{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_generator_proto_msgTypes[43]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Argument) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Argument) ProtoMessage() {}
func (x *Argument) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_generator_proto_msgTypes[43]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Argument.ProtoReflect.Descriptor instead.
func (*Argument) Descriptor() ([]byte, []int) {
return file_grpc_federation_generator_proto_rawDescGZIP(), []int{43}
}
func (x *Argument) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *Argument) GetType() *Type {
if x != nil {
return x.Type
}
return nil
}
func (x *Argument) GetValue() *Value {
if x != nil {
return x.Value
}
return nil
}
func (x *Argument) GetIf() *CELValue {
if x != nil {
return x.If
}
return nil
}
type Value struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Inline bool `protobuf:"varint,1,opt,name=inline,proto3" json:"inline,omitempty"`
Cel *CELValue `protobuf:"bytes,2,opt,name=cel,proto3" json:"cel,omitempty"`
}
func (x *Value) Reset() {
*x = Value{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_generator_proto_msgTypes[44]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Value) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Value) ProtoMessage() {}
func (x *Value) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_generator_proto_msgTypes[44]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Value.ProtoReflect.Descriptor instead.
func (*Value) Descriptor() ([]byte, []int) {
return file_grpc_federation_generator_proto_rawDescGZIP(), []int{44}
}
func (x *Value) GetInline() bool {
if x != nil {
return x.Inline
}
return false
}
func (x *Value) GetCel() *CELValue {
if x != nil {
return x.Cel
}
return nil
}
type SwitchExpr struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Type *Type `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"`
Cases []*SwitchCase `protobuf:"bytes,2,rep,name=cases,proto3" json:"cases,omitempty"`
Default *SwitchDefault `protobuf:"bytes,3,opt,name=default,proto3" json:"default,omitempty"`
}
func (x *SwitchExpr) Reset() {
*x = SwitchExpr{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_generator_proto_msgTypes[45]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *SwitchExpr) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*SwitchExpr) ProtoMessage() {}
func (x *SwitchExpr) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_generator_proto_msgTypes[45]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use SwitchExpr.ProtoReflect.Descriptor instead.
func (*SwitchExpr) Descriptor() ([]byte, []int) {
return file_grpc_federation_generator_proto_rawDescGZIP(), []int{45}
}
func (x *SwitchExpr) GetType() *Type {
if x != nil {
return x.Type
}
return nil
}
func (x *SwitchExpr) GetCases() []*SwitchCase {
if x != nil {
return x.Cases
}
return nil
}
func (x *SwitchExpr) GetDefault() *SwitchDefault {
if x != nil {
return x.Default
}
return nil
}
type SwitchCase struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
If *CELValue `protobuf:"bytes,1,opt,name=if,proto3" json:"if,omitempty"`
By *CELValue `protobuf:"bytes,2,opt,name=by,proto3" json:"by,omitempty"`
DefSet *VariableDefinitionSet `protobuf:"bytes,3,opt,name=def_set,json=defSet,proto3" json:"def_set,omitempty"`
}
func (x *SwitchCase) Reset() {
*x = SwitchCase{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_generator_proto_msgTypes[46]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *SwitchCase) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*SwitchCase) ProtoMessage() {}
func (x *SwitchCase) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_generator_proto_msgTypes[46]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use SwitchCase.ProtoReflect.Descriptor instead.
func (*SwitchCase) Descriptor() ([]byte, []int) {
return file_grpc_federation_generator_proto_rawDescGZIP(), []int{46}
}
func (x *SwitchCase) GetIf() *CELValue {
if x != nil {
return x.If
}
return nil
}
func (x *SwitchCase) GetBy() *CELValue {
if x != nil {
return x.By
}
return nil
}
func (x *SwitchCase) GetDefSet() *VariableDefinitionSet {
if x != nil {
return x.DefSet
}
return nil
}
type SwitchDefault struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
By *CELValue `protobuf:"bytes,1,opt,name=by,proto3" json:"by,omitempty"`
DefSet *VariableDefinitionSet `protobuf:"bytes,2,opt,name=def_set,json=defSet,proto3" json:"def_set,omitempty"`
}
func (x *SwitchDefault) Reset() {
*x = SwitchDefault{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_generator_proto_msgTypes[47]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *SwitchDefault) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*SwitchDefault) ProtoMessage() {}
func (x *SwitchDefault) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_generator_proto_msgTypes[47]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use SwitchDefault.ProtoReflect.Descriptor instead.
func (*SwitchDefault) Descriptor() ([]byte, []int) {
return file_grpc_federation_generator_proto_rawDescGZIP(), []int{47}
}
func (x *SwitchDefault) GetBy() *CELValue {
if x != nil {
return x.By
}
return nil
}
func (x *SwitchDefault) GetDefSet() *VariableDefinitionSet {
if x != nil {
return x.DefSet
}
return nil
}
type ValidationExpr struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
Error *GRPCError `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"`
}
func (x *ValidationExpr) Reset() {
*x = ValidationExpr{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_generator_proto_msgTypes[48]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ValidationExpr) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ValidationExpr) ProtoMessage() {}
func (x *ValidationExpr) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_generator_proto_msgTypes[48]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ValidationExpr.ProtoReflect.Descriptor instead.
func (*ValidationExpr) Descriptor() ([]byte, []int) {
return file_grpc_federation_generator_proto_rawDescGZIP(), []int{48}
}
func (x *ValidationExpr) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *ValidationExpr) GetError() *GRPCError {
if x != nil {
return x.Error
}
return nil
}
type GRPCError struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
DefSet *VariableDefinitionSet `protobuf:"bytes,1,opt,name=def_set,json=defSet,proto3" json:"def_set,omitempty"`
If *CELValue `protobuf:"bytes,2,opt,name=if,proto3" json:"if,omitempty"`
Code *code.Code `protobuf:"varint,3,opt,name=code,proto3,enum=google.rpc.Code,oneof" json:"code,omitempty"`
Message *CELValue `protobuf:"bytes,4,opt,name=message,proto3" json:"message,omitempty"`
Details []*GRPCErrorDetail `protobuf:"bytes,5,rep,name=details,proto3" json:"details,omitempty"`
Ignore bool `protobuf:"varint,6,opt,name=ignore,proto3" json:"ignore,omitempty"`
IgnoreAndResponse *CELValue `protobuf:"bytes,7,opt,name=ignore_and_response,json=ignoreAndResponse,proto3" json:"ignore_and_response,omitempty"`
LogLevel int32 `protobuf:"varint,8,opt,name=log_level,json=logLevel,proto3" json:"log_level,omitempty"`
}
func (x *GRPCError) Reset() {
*x = GRPCError{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_generator_proto_msgTypes[49]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GRPCError) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GRPCError) ProtoMessage() {}
func (x *GRPCError) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_generator_proto_msgTypes[49]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GRPCError.ProtoReflect.Descriptor instead.
func (*GRPCError) Descriptor() ([]byte, []int) {
return file_grpc_federation_generator_proto_rawDescGZIP(), []int{49}
}
func (x *GRPCError) GetDefSet() *VariableDefinitionSet {
if x != nil {
return x.DefSet
}
return nil
}
func (x *GRPCError) GetIf() *CELValue {
if x != nil {
return x.If
}
return nil
}
func (x *GRPCError) GetCode() code.Code {
if x != nil && x.Code != nil {
return *x.Code
}
return code.Code(0)
}
func (x *GRPCError) GetMessage() *CELValue {
if x != nil {
return x.Message
}
return nil
}
func (x *GRPCError) GetDetails() []*GRPCErrorDetail {
if x != nil {
return x.Details
}
return nil
}
func (x *GRPCError) GetIgnore() bool {
if x != nil {
return x.Ignore
}
return false
}
func (x *GRPCError) GetIgnoreAndResponse() *CELValue {
if x != nil {
return x.IgnoreAndResponse
}
return nil
}
func (x *GRPCError) GetLogLevel() int32 {
if x != nil {
return x.LogLevel
}
return 0
}
type GRPCErrorDetail struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
DefSet *VariableDefinitionSet `protobuf:"bytes,1,opt,name=def_set,json=defSet,proto3" json:"def_set,omitempty"`
If *CELValue `protobuf:"bytes,2,opt,name=if,proto3" json:"if,omitempty"`
Messages *VariableDefinitionSet `protobuf:"bytes,3,opt,name=messages,proto3" json:"messages,omitempty"`
PreconditionFailures []*PreconditionFailure `protobuf:"bytes,4,rep,name=precondition_failures,json=preconditionFailures,proto3" json:"precondition_failures,omitempty"`
BadRequests []*BadRequest `protobuf:"bytes,5,rep,name=bad_requests,json=badRequests,proto3" json:"bad_requests,omitempty"`
LocalizedMessages []*LocalizedMessage `protobuf:"bytes,6,rep,name=localized_messages,json=localizedMessages,proto3" json:"localized_messages,omitempty"`
By []*CELValue `protobuf:"bytes,7,rep,name=by,proto3" json:"by,omitempty"`
}
func (x *GRPCErrorDetail) Reset() {
*x = GRPCErrorDetail{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_generator_proto_msgTypes[50]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GRPCErrorDetail) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GRPCErrorDetail) ProtoMessage() {}
func (x *GRPCErrorDetail) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_generator_proto_msgTypes[50]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GRPCErrorDetail.ProtoReflect.Descriptor instead.
func (*GRPCErrorDetail) Descriptor() ([]byte, []int) {
return file_grpc_federation_generator_proto_rawDescGZIP(), []int{50}
}
func (x *GRPCErrorDetail) GetDefSet() *VariableDefinitionSet {
if x != nil {
return x.DefSet
}
return nil
}
func (x *GRPCErrorDetail) GetIf() *CELValue {
if x != nil {
return x.If
}
return nil
}
func (x *GRPCErrorDetail) GetMessages() *VariableDefinitionSet {
if x != nil {
return x.Messages
}
return nil
}
func (x *GRPCErrorDetail) GetPreconditionFailures() []*PreconditionFailure {
if x != nil {
return x.PreconditionFailures
}
return nil
}
func (x *GRPCErrorDetail) GetBadRequests() []*BadRequest {
if x != nil {
return x.BadRequests
}
return nil
}
func (x *GRPCErrorDetail) GetLocalizedMessages() []*LocalizedMessage {
if x != nil {
return x.LocalizedMessages
}
return nil
}
func (x *GRPCErrorDetail) GetBy() []*CELValue {
if x != nil {
return x.By
}
return nil
}
type PreconditionFailure struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Violations []*PreconditionFailureViolation `protobuf:"bytes,1,rep,name=violations,proto3" json:"violations,omitempty"`
}
func (x *PreconditionFailure) Reset() {
*x = PreconditionFailure{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_generator_proto_msgTypes[51]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *PreconditionFailure) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*PreconditionFailure) ProtoMessage() {}
func (x *PreconditionFailure) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_generator_proto_msgTypes[51]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use PreconditionFailure.ProtoReflect.Descriptor instead.
func (*PreconditionFailure) Descriptor() ([]byte, []int) {
return file_grpc_federation_generator_proto_rawDescGZIP(), []int{51}
}
func (x *PreconditionFailure) GetViolations() []*PreconditionFailureViolation {
if x != nil {
return x.Violations
}
return nil
}
type PreconditionFailureViolation struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Type *CELValue `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"`
Subject *CELValue `protobuf:"bytes,2,opt,name=subject,proto3" json:"subject,omitempty"`
Description *CELValue `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"`
}
func (x *PreconditionFailureViolation) Reset() {
*x = PreconditionFailureViolation{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_generator_proto_msgTypes[52]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *PreconditionFailureViolation) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*PreconditionFailureViolation) ProtoMessage() {}
func (x *PreconditionFailureViolation) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_generator_proto_msgTypes[52]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use PreconditionFailureViolation.ProtoReflect.Descriptor instead.
func (*PreconditionFailureViolation) Descriptor() ([]byte, []int) {
return file_grpc_federation_generator_proto_rawDescGZIP(), []int{52}
}
func (x *PreconditionFailureViolation) GetType() *CELValue {
if x != nil {
return x.Type
}
return nil
}
func (x *PreconditionFailureViolation) GetSubject() *CELValue {
if x != nil {
return x.Subject
}
return nil
}
func (x *PreconditionFailureViolation) GetDescription() *CELValue {
if x != nil {
return x.Description
}
return nil
}
type BadRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
FieldViolations []*BadRequestFieldViolation `protobuf:"bytes,1,rep,name=field_violations,json=fieldViolations,proto3" json:"field_violations,omitempty"`
}
func (x *BadRequest) Reset() {
*x = BadRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_generator_proto_msgTypes[53]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *BadRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*BadRequest) ProtoMessage() {}
func (x *BadRequest) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_generator_proto_msgTypes[53]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use BadRequest.ProtoReflect.Descriptor instead.
func (*BadRequest) Descriptor() ([]byte, []int) {
return file_grpc_federation_generator_proto_rawDescGZIP(), []int{53}
}
func (x *BadRequest) GetFieldViolations() []*BadRequestFieldViolation {
if x != nil {
return x.FieldViolations
}
return nil
}
type BadRequestFieldViolation struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Field *CELValue `protobuf:"bytes,1,opt,name=field,proto3" json:"field,omitempty"`
Description *CELValue `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"`
}
func (x *BadRequestFieldViolation) Reset() {
*x = BadRequestFieldViolation{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_generator_proto_msgTypes[54]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *BadRequestFieldViolation) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*BadRequestFieldViolation) ProtoMessage() {}
func (x *BadRequestFieldViolation) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_generator_proto_msgTypes[54]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use BadRequestFieldViolation.ProtoReflect.Descriptor instead.
func (*BadRequestFieldViolation) Descriptor() ([]byte, []int) {
return file_grpc_federation_generator_proto_rawDescGZIP(), []int{54}
}
func (x *BadRequestFieldViolation) GetField() *CELValue {
if x != nil {
return x.Field
}
return nil
}
func (x *BadRequestFieldViolation) GetDescription() *CELValue {
if x != nil {
return x.Description
}
return nil
}
type LocalizedMessage struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Locale string `protobuf:"bytes,1,opt,name=locale,proto3" json:"locale,omitempty"`
Message *CELValue `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
}
func (x *LocalizedMessage) Reset() {
*x = LocalizedMessage{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_generator_proto_msgTypes[55]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *LocalizedMessage) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*LocalizedMessage) ProtoMessage() {}
func (x *LocalizedMessage) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_generator_proto_msgTypes[55]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use LocalizedMessage.ProtoReflect.Descriptor instead.
func (*LocalizedMessage) Descriptor() ([]byte, []int) {
return file_grpc_federation_generator_proto_rawDescGZIP(), []int{55}
}
func (x *LocalizedMessage) GetLocale() string {
if x != nil {
return x.Locale
}
return ""
}
func (x *LocalizedMessage) GetMessage() *CELValue {
if x != nil {
return x.Message
}
return nil
}
type GRPCCallOption struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
ContentSubtype *string `protobuf:"bytes,1,opt,name=content_subtype,json=contentSubtype,proto3,oneof" json:"content_subtype,omitempty"`
HeaderId *string `protobuf:"bytes,2,opt,name=header_id,json=headerId,proto3,oneof" json:"header_id,omitempty"`
MaxCallRecvMsgSize *int64 `protobuf:"varint,3,opt,name=max_call_recv_msg_size,json=maxCallRecvMsgSize,proto3,oneof" json:"max_call_recv_msg_size,omitempty"`
MaxCallSendMsgSize *int64 `protobuf:"varint,4,opt,name=max_call_send_msg_size,json=maxCallSendMsgSize,proto3,oneof" json:"max_call_send_msg_size,omitempty"`
StaticMethod *bool `protobuf:"varint,5,opt,name=static_method,json=staticMethod,proto3,oneof" json:"static_method,omitempty"`
TrailerId *string `protobuf:"bytes,6,opt,name=trailer_id,json=trailerId,proto3,oneof" json:"trailer_id,omitempty"`
WaitForReady *bool `protobuf:"varint,7,opt,name=wait_for_ready,json=waitForReady,proto3,oneof" json:"wait_for_ready,omitempty"`
}
func (x *GRPCCallOption) Reset() {
*x = GRPCCallOption{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_generator_proto_msgTypes[56]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GRPCCallOption) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GRPCCallOption) ProtoMessage() {}
func (x *GRPCCallOption) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_generator_proto_msgTypes[56]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GRPCCallOption.ProtoReflect.Descriptor instead.
func (*GRPCCallOption) Descriptor() ([]byte, []int) {
return file_grpc_federation_generator_proto_rawDescGZIP(), []int{56}
}
func (x *GRPCCallOption) GetContentSubtype() string {
if x != nil && x.ContentSubtype != nil {
return *x.ContentSubtype
}
return ""
}
func (x *GRPCCallOption) GetHeaderId() string {
if x != nil && x.HeaderId != nil {
return *x.HeaderId
}
return ""
}
func (x *GRPCCallOption) GetMaxCallRecvMsgSize() int64 {
if x != nil && x.MaxCallRecvMsgSize != nil {
return *x.MaxCallRecvMsgSize
}
return 0
}
func (x *GRPCCallOption) GetMaxCallSendMsgSize() int64 {
if x != nil && x.MaxCallSendMsgSize != nil {
return *x.MaxCallSendMsgSize
}
return 0
}
func (x *GRPCCallOption) GetStaticMethod() bool {
if x != nil && x.StaticMethod != nil {
return *x.StaticMethod
}
return false
}
func (x *GRPCCallOption) GetTrailerId() string {
if x != nil && x.TrailerId != nil {
return *x.TrailerId
}
return ""
}
func (x *GRPCCallOption) GetWaitForReady() bool {
if x != nil && x.WaitForReady != nil {
return *x.WaitForReady
}
return false
}
type Oneof struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
MessageId string `protobuf:"bytes,3,opt,name=message_id,json=messageId,proto3" json:"message_id,omitempty"`
FieldIds []string `protobuf:"bytes,4,rep,name=field_ids,json=fieldIds,proto3" json:"field_ids,omitempty"`
}
func (x *Oneof) Reset() {
*x = Oneof{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_generator_proto_msgTypes[57]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Oneof) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Oneof) ProtoMessage() {}
func (x *Oneof) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_generator_proto_msgTypes[57]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Oneof.ProtoReflect.Descriptor instead.
func (*Oneof) Descriptor() ([]byte, []int) {
return file_grpc_federation_generator_proto_rawDescGZIP(), []int{57}
}
func (x *Oneof) GetId() string {
if x != nil {
return x.Id
}
return ""
}
func (x *Oneof) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *Oneof) GetMessageId() string {
if x != nil {
return x.MessageId
}
return ""
}
func (x *Oneof) GetFieldIds() []string {
if x != nil {
return x.FieldIds
}
return nil
}
type Enum struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
ValueIds []string `protobuf:"bytes,3,rep,name=value_ids,json=valueIds,proto3" json:"value_ids,omitempty"`
MessageId string `protobuf:"bytes,4,opt,name=message_id,json=messageId,proto3" json:"message_id,omitempty"`
FileId string `protobuf:"bytes,5,opt,name=file_id,json=fileId,proto3" json:"file_id,omitempty"`
Rule *EnumRule `protobuf:"bytes,6,opt,name=rule,proto3" json:"rule,omitempty"`
}
func (x *Enum) Reset() {
*x = Enum{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_generator_proto_msgTypes[58]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Enum) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Enum) ProtoMessage() {}
func (x *Enum) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_generator_proto_msgTypes[58]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Enum.ProtoReflect.Descriptor instead.
func (*Enum) Descriptor() ([]byte, []int) {
return file_grpc_federation_generator_proto_rawDescGZIP(), []int{58}
}
func (x *Enum) GetId() string {
if x != nil {
return x.Id
}
return ""
}
func (x *Enum) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *Enum) GetValueIds() []string {
if x != nil {
return x.ValueIds
}
return nil
}
func (x *Enum) GetMessageId() string {
if x != nil {
return x.MessageId
}
return ""
}
func (x *Enum) GetFileId() string {
if x != nil {
return x.FileId
}
return ""
}
func (x *Enum) GetRule() *EnumRule {
if x != nil {
return x.Rule
}
return nil
}
type EnumValue struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
EnumId string `protobuf:"bytes,3,opt,name=enum_id,json=enumId,proto3" json:"enum_id,omitempty"`
Rule *EnumValueRule `protobuf:"bytes,4,opt,name=rule,proto3" json:"rule,omitempty"`
}
func (x *EnumValue) Reset() {
*x = EnumValue{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_generator_proto_msgTypes[59]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *EnumValue) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*EnumValue) ProtoMessage() {}
func (x *EnumValue) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_generator_proto_msgTypes[59]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use EnumValue.ProtoReflect.Descriptor instead.
func (*EnumValue) Descriptor() ([]byte, []int) {
return file_grpc_federation_generator_proto_rawDescGZIP(), []int{59}
}
func (x *EnumValue) GetId() string {
if x != nil {
return x.Id
}
return ""
}
func (x *EnumValue) GetValue() string {
if x != nil {
return x.Value
}
return ""
}
func (x *EnumValue) GetEnumId() string {
if x != nil {
return x.EnumId
}
return ""
}
func (x *EnumValue) GetRule() *EnumValueRule {
if x != nil {
return x.Rule
}
return nil
}
type EnumRule struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
AliasIds []string `protobuf:"bytes,1,rep,name=alias_ids,json=aliasIds,proto3" json:"alias_ids,omitempty"`
}
func (x *EnumRule) Reset() {
*x = EnumRule{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_generator_proto_msgTypes[60]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *EnumRule) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*EnumRule) ProtoMessage() {}
func (x *EnumRule) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_generator_proto_msgTypes[60]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use EnumRule.ProtoReflect.Descriptor instead.
func (*EnumRule) Descriptor() ([]byte, []int) {
return file_grpc_federation_generator_proto_rawDescGZIP(), []int{60}
}
func (x *EnumRule) GetAliasIds() []string {
if x != nil {
return x.AliasIds
}
return nil
}
type EnumValueRule struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Default bool `protobuf:"varint,1,opt,name=default,proto3" json:"default,omitempty"`
Aliases []*EnumValueAlias `protobuf:"bytes,2,rep,name=aliases,proto3" json:"aliases,omitempty"`
Attrs []*EnumValueAttribute `protobuf:"bytes,3,rep,name=attrs,proto3" json:"attrs,omitempty"`
Noalias bool `protobuf:"varint,4,opt,name=noalias,proto3" json:"noalias,omitempty"`
}
func (x *EnumValueRule) Reset() {
*x = EnumValueRule{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_generator_proto_msgTypes[61]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *EnumValueRule) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*EnumValueRule) ProtoMessage() {}
func (x *EnumValueRule) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_generator_proto_msgTypes[61]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use EnumValueRule.ProtoReflect.Descriptor instead.
func (*EnumValueRule) Descriptor() ([]byte, []int) {
return file_grpc_federation_generator_proto_rawDescGZIP(), []int{61}
}
func (x *EnumValueRule) GetDefault() bool {
if x != nil {
return x.Default
}
return false
}
func (x *EnumValueRule) GetAliases() []*EnumValueAlias {
if x != nil {
return x.Aliases
}
return nil
}
func (x *EnumValueRule) GetAttrs() []*EnumValueAttribute {
if x != nil {
return x.Attrs
}
return nil
}
func (x *EnumValueRule) GetNoalias() bool {
if x != nil {
return x.Noalias
}
return false
}
type EnumValueAlias struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
EnumAliasId string `protobuf:"bytes,1,opt,name=enum_alias_id,json=enumAliasId,proto3" json:"enum_alias_id,omitempty"`
AliasIds []string `protobuf:"bytes,2,rep,name=alias_ids,json=aliasIds,proto3" json:"alias_ids,omitempty"`
}
func (x *EnumValueAlias) Reset() {
*x = EnumValueAlias{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_generator_proto_msgTypes[62]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *EnumValueAlias) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*EnumValueAlias) ProtoMessage() {}
func (x *EnumValueAlias) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_generator_proto_msgTypes[62]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use EnumValueAlias.ProtoReflect.Descriptor instead.
func (*EnumValueAlias) Descriptor() ([]byte, []int) {
return file_grpc_federation_generator_proto_rawDescGZIP(), []int{62}
}
func (x *EnumValueAlias) GetEnumAliasId() string {
if x != nil {
return x.EnumAliasId
}
return ""
}
func (x *EnumValueAlias) GetAliasIds() []string {
if x != nil {
return x.AliasIds
}
return nil
}
type EnumValueAttribute struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
}
func (x *EnumValueAttribute) Reset() {
*x = EnumValueAttribute{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_generator_proto_msgTypes[63]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *EnumValueAttribute) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*EnumValueAttribute) ProtoMessage() {}
func (x *EnumValueAttribute) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_generator_proto_msgTypes[63]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use EnumValueAttribute.ProtoReflect.Descriptor instead.
func (*EnumValueAttribute) Descriptor() ([]byte, []int) {
return file_grpc_federation_generator_proto_rawDescGZIP(), []int{63}
}
func (x *EnumValueAttribute) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *EnumValueAttribute) GetValue() string {
if x != nil {
return x.Value
}
return ""
}
type CELPlugin struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"`
Functions []*CELFunction `protobuf:"bytes,4,rep,name=functions,proto3" json:"functions,omitempty"`
}
func (x *CELPlugin) Reset() {
*x = CELPlugin{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_generator_proto_msgTypes[64]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *CELPlugin) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CELPlugin) ProtoMessage() {}
func (x *CELPlugin) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_generator_proto_msgTypes[64]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use CELPlugin.ProtoReflect.Descriptor instead.
func (*CELPlugin) Descriptor() ([]byte, []int) {
return file_grpc_federation_generator_proto_rawDescGZIP(), []int{64}
}
func (x *CELPlugin) GetId() string {
if x != nil {
return x.Id
}
return ""
}
func (x *CELPlugin) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *CELPlugin) GetDescription() string {
if x != nil {
return x.Description
}
return ""
}
func (x *CELPlugin) GetFunctions() []*CELFunction {
if x != nil {
return x.Functions
}
return nil
}
type CELFunction struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"`
Args []*Type `protobuf:"bytes,3,rep,name=args,proto3" json:"args,omitempty"`
Return *Type `protobuf:"bytes,4,opt,name=return,proto3" json:"return,omitempty"`
ReceiverId string `protobuf:"bytes,5,opt,name=receiver_id,json=receiverId,proto3" json:"receiver_id,omitempty"`
}
func (x *CELFunction) Reset() {
*x = CELFunction{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_generator_proto_msgTypes[65]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *CELFunction) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CELFunction) ProtoMessage() {}
func (x *CELFunction) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_generator_proto_msgTypes[65]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use CELFunction.ProtoReflect.Descriptor instead.
func (*CELFunction) Descriptor() ([]byte, []int) {
return file_grpc_federation_generator_proto_rawDescGZIP(), []int{65}
}
func (x *CELFunction) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *CELFunction) GetId() string {
if x != nil {
return x.Id
}
return ""
}
func (x *CELFunction) GetArgs() []*Type {
if x != nil {
return x.Args
}
return nil
}
func (x *CELFunction) GetReturn() *Type {
if x != nil {
return x.Return
}
return nil
}
func (x *CELFunction) GetReceiverId() string {
if x != nil {
return x.ReceiverId
}
return ""
}
type ProtoCodeGeneratorResponse_GeneratedCodeInfo struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Annotation []*ProtoCodeGeneratorResponse_GeneratedCodeInfo_Annotation `protobuf:"bytes,1,rep,name=annotation,proto3" json:"annotation,omitempty"`
}
func (x *ProtoCodeGeneratorResponse_GeneratedCodeInfo) Reset() {
*x = ProtoCodeGeneratorResponse_GeneratedCodeInfo{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_generator_proto_msgTypes[66]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ProtoCodeGeneratorResponse_GeneratedCodeInfo) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ProtoCodeGeneratorResponse_GeneratedCodeInfo) ProtoMessage() {}
func (x *ProtoCodeGeneratorResponse_GeneratedCodeInfo) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_generator_proto_msgTypes[66]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ProtoCodeGeneratorResponse_GeneratedCodeInfo.ProtoReflect.Descriptor instead.
func (*ProtoCodeGeneratorResponse_GeneratedCodeInfo) Descriptor() ([]byte, []int) {
return file_grpc_federation_generator_proto_rawDescGZIP(), []int{0, 0}
}
func (x *ProtoCodeGeneratorResponse_GeneratedCodeInfo) GetAnnotation() []*ProtoCodeGeneratorResponse_GeneratedCodeInfo_Annotation {
if x != nil {
return x.Annotation
}
return nil
}
type ProtoCodeGeneratorResponse_File struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Name *string `protobuf:"bytes,1,opt,name=name,proto3,oneof" json:"name,omitempty"`
InsertionPoint *string `protobuf:"bytes,2,opt,name=insertion_point,json=insertionPoint,proto3,oneof" json:"insertion_point,omitempty"`
Content *string `protobuf:"bytes,15,opt,name=content,proto3,oneof" json:"content,omitempty"`
GeneratedCodeInfo *ProtoCodeGeneratorResponse_GeneratedCodeInfo `protobuf:"bytes,16,opt,name=generated_code_info,json=generatedCodeInfo,proto3,oneof" json:"generated_code_info,omitempty"`
}
func (x *ProtoCodeGeneratorResponse_File) Reset() {
*x = ProtoCodeGeneratorResponse_File{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_generator_proto_msgTypes[67]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ProtoCodeGeneratorResponse_File) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ProtoCodeGeneratorResponse_File) ProtoMessage() {}
func (x *ProtoCodeGeneratorResponse_File) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_generator_proto_msgTypes[67]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ProtoCodeGeneratorResponse_File.ProtoReflect.Descriptor instead.
func (*ProtoCodeGeneratorResponse_File) Descriptor() ([]byte, []int) {
return file_grpc_federation_generator_proto_rawDescGZIP(), []int{0, 1}
}
func (x *ProtoCodeGeneratorResponse_File) GetName() string {
if x != nil && x.Name != nil {
return *x.Name
}
return ""
}
func (x *ProtoCodeGeneratorResponse_File) GetInsertionPoint() string {
if x != nil && x.InsertionPoint != nil {
return *x.InsertionPoint
}
return ""
}
func (x *ProtoCodeGeneratorResponse_File) GetContent() string {
if x != nil && x.Content != nil {
return *x.Content
}
return ""
}
func (x *ProtoCodeGeneratorResponse_File) GetGeneratedCodeInfo() *ProtoCodeGeneratorResponse_GeneratedCodeInfo {
if x != nil {
return x.GeneratedCodeInfo
}
return nil
}
type ProtoCodeGeneratorResponse_GeneratedCodeInfo_Annotation struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Path []int32 `protobuf:"varint,1,rep,packed,name=path,proto3" json:"path,omitempty"`
SourceFile *string `protobuf:"bytes,2,opt,name=source_file,json=sourceFile,proto3,oneof" json:"source_file,omitempty"`
Begin *int32 `protobuf:"varint,3,opt,name=begin,proto3,oneof" json:"begin,omitempty"`
End *int32 `protobuf:"varint,4,opt,name=end,proto3,oneof" json:"end,omitempty"`
Semantic *ProtoCodeGeneratorResponse_GeneratedCodeInfo_Annotation_Semantic `protobuf:"varint,5,opt,name=semantic,proto3,enum=grpc.federation.generator.plugin.ProtoCodeGeneratorResponse_GeneratedCodeInfo_Annotation_Semantic,oneof" json:"semantic,omitempty"`
}
func (x *ProtoCodeGeneratorResponse_GeneratedCodeInfo_Annotation) Reset() {
*x = ProtoCodeGeneratorResponse_GeneratedCodeInfo_Annotation{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_generator_proto_msgTypes[68]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ProtoCodeGeneratorResponse_GeneratedCodeInfo_Annotation) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ProtoCodeGeneratorResponse_GeneratedCodeInfo_Annotation) ProtoMessage() {}
func (x *ProtoCodeGeneratorResponse_GeneratedCodeInfo_Annotation) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_generator_proto_msgTypes[68]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ProtoCodeGeneratorResponse_GeneratedCodeInfo_Annotation.ProtoReflect.Descriptor instead.
func (*ProtoCodeGeneratorResponse_GeneratedCodeInfo_Annotation) Descriptor() ([]byte, []int) {
return file_grpc_federation_generator_proto_rawDescGZIP(), []int{0, 0, 0}
}
func (x *ProtoCodeGeneratorResponse_GeneratedCodeInfo_Annotation) GetPath() []int32 {
if x != nil {
return x.Path
}
return nil
}
func (x *ProtoCodeGeneratorResponse_GeneratedCodeInfo_Annotation) GetSourceFile() string {
if x != nil && x.SourceFile != nil {
return *x.SourceFile
}
return ""
}
func (x *ProtoCodeGeneratorResponse_GeneratedCodeInfo_Annotation) GetBegin() int32 {
if x != nil && x.Begin != nil {
return *x.Begin
}
return 0
}
func (x *ProtoCodeGeneratorResponse_GeneratedCodeInfo_Annotation) GetEnd() int32 {
if x != nil && x.End != nil {
return *x.End
}
return 0
}
func (x *ProtoCodeGeneratorResponse_GeneratedCodeInfo_Annotation) GetSemantic() ProtoCodeGeneratorResponse_GeneratedCodeInfo_Annotation_Semantic {
if x != nil && x.Semantic != nil {
return *x.Semantic
}
return ProtoCodeGeneratorResponse_GeneratedCodeInfo_Annotation_NONE
}
var File_grpc_federation_generator_proto protoreflect.FileDescriptor
var file_grpc_federation_generator_proto_rawDesc = []byte{
0x0a, 0x1f, 0x67, 0x72, 0x70, 0x63, 0x2f, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f,
0x6e, 0x2f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x12, 0x20, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69,
0x6f, 0x6e, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x6c, 0x75,
0x67, 0x69, 0x6e, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x1a, 0x15, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x72, 0x70, 0x63, 0x2f,
0x63, 0x6f, 0x64, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xe5, 0x09, 0x0a, 0x1a, 0x50,
0x72, 0x6f, 0x74, 0x6f, 0x43, 0x6f, 0x64, 0x65, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f,
0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x19, 0x0a, 0x05, 0x65, 0x72, 0x72,
0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f,
0x72, 0x88, 0x01, 0x01, 0x12, 0x32, 0x0a, 0x12, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x65,
0x64, 0x5f, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04,
0x48, 0x01, 0x52, 0x11, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x46, 0x65, 0x61,
0x74, 0x75, 0x72, 0x65, 0x73, 0x88, 0x01, 0x01, 0x12, 0x2c, 0x0a, 0x0f, 0x6d, 0x69, 0x6e, 0x69,
0x6d, 0x75, 0x6d, 0x5f, 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28,
0x05, 0x48, 0x02, 0x52, 0x0e, 0x6d, 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x45, 0x64, 0x69, 0x74,
0x69, 0x6f, 0x6e, 0x88, 0x01, 0x01, 0x12, 0x2c, 0x0a, 0x0f, 0x6d, 0x61, 0x78, 0x69, 0x6d, 0x75,
0x6d, 0x5f, 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x48,
0x03, 0x52, 0x0e, 0x6d, 0x61, 0x78, 0x69, 0x6d, 0x75, 0x6d, 0x45, 0x64, 0x69, 0x74, 0x69, 0x6f,
0x6e, 0x88, 0x01, 0x01, 0x12, 0x55, 0x0a, 0x04, 0x66, 0x69, 0x6c, 0x65, 0x18, 0x0f, 0x20, 0x03,
0x28, 0x0b, 0x32, 0x41, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61,
0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x70,
0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x43, 0x6f, 0x64, 0x65, 0x47,
0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
0x2e, 0x46, 0x69, 0x6c, 0x65, 0x52, 0x04, 0x66, 0x69, 0x6c, 0x65, 0x1a, 0xec, 0x03, 0x0a, 0x11,
0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x43, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66,
0x6f, 0x12, 0x79, 0x0a, 0x0a, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18,
0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x59, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64,
0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f,
0x72, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x43, 0x6f,
0x64, 0x65, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f,
0x6e, 0x73, 0x65, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x43, 0x6f, 0x64,
0x65, 0x49, 0x6e, 0x66, 0x6f, 0x2e, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e,
0x52, 0x0a, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0xdb, 0x02, 0x0a,
0x0a, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x04, 0x70,
0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x03, 0x28, 0x05, 0x42, 0x02, 0x10, 0x01, 0x52, 0x04, 0x70,
0x61, 0x74, 0x68, 0x12, 0x24, 0x0a, 0x0b, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x66, 0x69,
0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0a, 0x73, 0x6f, 0x75, 0x72,
0x63, 0x65, 0x46, 0x69, 0x6c, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x62, 0x65, 0x67,
0x69, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x48, 0x01, 0x52, 0x05, 0x62, 0x65, 0x67, 0x69,
0x6e, 0x88, 0x01, 0x01, 0x12, 0x15, 0x0a, 0x03, 0x65, 0x6e, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28,
0x05, 0x48, 0x02, 0x52, 0x03, 0x65, 0x6e, 0x64, 0x88, 0x01, 0x01, 0x12, 0x83, 0x01, 0x0a, 0x08,
0x73, 0x65, 0x6d, 0x61, 0x6e, 0x74, 0x69, 0x63, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x62,
0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e,
0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69,
0x6e, 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x43, 0x6f, 0x64, 0x65, 0x47, 0x65, 0x6e, 0x65, 0x72,
0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x47, 0x65, 0x6e,
0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x43, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x2e, 0x41,
0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x53, 0x65, 0x6d, 0x61, 0x6e, 0x74,
0x69, 0x63, 0x48, 0x03, 0x52, 0x08, 0x73, 0x65, 0x6d, 0x61, 0x6e, 0x74, 0x69, 0x63, 0x88, 0x01,
0x01, 0x22, 0x28, 0x0a, 0x08, 0x53, 0x65, 0x6d, 0x61, 0x6e, 0x74, 0x69, 0x63, 0x12, 0x08, 0x0a,
0x04, 0x4e, 0x4f, 0x4e, 0x45, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x53, 0x45, 0x54, 0x10, 0x01,
0x12, 0x09, 0x0a, 0x05, 0x41, 0x4c, 0x49, 0x41, 0x53, 0x10, 0x02, 0x42, 0x0e, 0x0a, 0x0c, 0x5f,
0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f,
0x62, 0x65, 0x67, 0x69, 0x6e, 0x42, 0x06, 0x0a, 0x04, 0x5f, 0x65, 0x6e, 0x64, 0x42, 0x0b, 0x0a,
0x09, 0x5f, 0x73, 0x65, 0x6d, 0x61, 0x6e, 0x74, 0x69, 0x63, 0x1a, 0xb3, 0x02, 0x0a, 0x04, 0x46,
0x69, 0x6c, 0x65, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28,
0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x2c, 0x0a, 0x0f,
0x69, 0x6e, 0x73, 0x65, 0x72, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18,
0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x0e, 0x69, 0x6e, 0x73, 0x65, 0x72, 0x74, 0x69,
0x6f, 0x6e, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x12, 0x1d, 0x0a, 0x07, 0x63, 0x6f,
0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x09, 0x48, 0x02, 0x52, 0x07, 0x63,
0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x12, 0x83, 0x01, 0x0a, 0x13, 0x67, 0x65,
0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x5f, 0x69, 0x6e, 0x66,
0x6f, 0x18, 0x10, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x4e, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66,
0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61,
0x74, 0x6f, 0x72, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x6f,
0x43, 0x6f, 0x64, 0x65, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x73,
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x43,
0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x48, 0x03, 0x52, 0x11, 0x67, 0x65, 0x6e, 0x65, 0x72,
0x61, 0x74, 0x65, 0x64, 0x43, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x88, 0x01, 0x01, 0x42,
0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x12, 0x0a, 0x10, 0x5f, 0x69, 0x6e, 0x73,
0x65, 0x72, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x42, 0x0a, 0x0a, 0x08,
0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x42, 0x16, 0x0a, 0x14, 0x5f, 0x67, 0x65, 0x6e,
0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x5f, 0x69, 0x6e, 0x66, 0x6f,
0x22, 0x57, 0x0a, 0x07, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x10, 0x0a, 0x0c, 0x46,
0x45, 0x41, 0x54, 0x55, 0x52, 0x45, 0x5f, 0x4e, 0x4f, 0x4e, 0x45, 0x10, 0x00, 0x12, 0x1b, 0x0a,
0x17, 0x46, 0x45, 0x41, 0x54, 0x55, 0x52, 0x45, 0x5f, 0x50, 0x52, 0x4f, 0x54, 0x4f, 0x33, 0x5f,
0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x41, 0x4c, 0x10, 0x01, 0x12, 0x1d, 0x0a, 0x19, 0x46, 0x45,
0x41, 0x54, 0x55, 0x52, 0x45, 0x5f, 0x53, 0x55, 0x50, 0x50, 0x4f, 0x52, 0x54, 0x53, 0x5f, 0x45,
0x44, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x53, 0x10, 0x02, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x65, 0x72,
0x72, 0x6f, 0x72, 0x42, 0x15, 0x0a, 0x13, 0x5f, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x65,
0x64, 0x5f, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x42, 0x12, 0x0a, 0x10, 0x5f, 0x6d,
0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x5f, 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x12,
0x0a, 0x10, 0x5f, 0x6d, 0x61, 0x78, 0x69, 0x6d, 0x75, 0x6d, 0x5f, 0x65, 0x64, 0x69, 0x74, 0x69,
0x6f, 0x6e, 0x22, 0xe0, 0x03, 0x0a, 0x14, 0x43, 0x6f, 0x64, 0x65, 0x47, 0x65, 0x6e, 0x65, 0x72,
0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x40, 0x0a, 0x04, 0x74,
0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2c, 0x2e, 0x67, 0x72, 0x70, 0x63,
0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x67, 0x65, 0x6e, 0x65,
0x72, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x41, 0x63, 0x74,
0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x1d, 0x0a,
0x0a, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28,
0x09, 0x52, 0x09, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x61, 0x74, 0x68, 0x12, 0x1b, 0x0a, 0x07,
0x6f, 0x75, 0x74, 0x5f, 0x64, 0x69, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x02, 0x18,
0x01, 0x52, 0x06, 0x6f, 0x75, 0x74, 0x44, 0x69, 0x72, 0x12, 0x57, 0x0a, 0x05, 0x66, 0x69, 0x6c,
0x65, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x41, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e,
0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72,
0x61, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x50, 0x72, 0x6f, 0x74,
0x6f, 0x43, 0x6f, 0x64, 0x65, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65,
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x52, 0x05, 0x66, 0x69, 0x6c,
0x65, 0x73, 0x12, 0x37, 0x0a, 0x18, 0x67, 0x72, 0x70, 0x63, 0x5f, 0x66, 0x65, 0x64, 0x65, 0x72,
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x05,
0x20, 0x03, 0x28, 0x09, 0x52, 0x15, 0x67, 0x72, 0x70, 0x63, 0x46, 0x65, 0x64, 0x65, 0x72, 0x61,
0x74, 0x69, 0x6f, 0x6e, 0x46, 0x69, 0x6c, 0x65, 0x49, 0x64, 0x73, 0x12, 0x49, 0x0a, 0x09, 0x72,
0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b,
0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e,
0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69,
0x6e, 0x2e, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x09, 0x72, 0x65, 0x66,
0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x6d, 0x0a, 0x17, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74,
0x5f, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69,
0x67, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x36, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66,
0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61,
0x74, 0x6f, 0x72, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x4f, 0x75, 0x74, 0x70, 0x75,
0x74, 0x46, 0x69, 0x6c, 0x65, 0x50, 0x61, 0x74, 0x68, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52,
0x14, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x46, 0x69, 0x6c, 0x65, 0x50, 0x61, 0x74, 0x68, 0x43,
0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, 0xb8, 0x01, 0x0a, 0x14, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74,
0x46, 0x69, 0x6c, 0x65, 0x50, 0x61, 0x74, 0x68, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x48,
0x0a, 0x04, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x34, 0x2e, 0x67,
0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x67,
0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e,
0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x46, 0x69, 0x6c, 0x65, 0x50, 0x61, 0x74, 0x68, 0x4d, 0x6f,
0x64, 0x65, 0x52, 0x04, 0x6d, 0x6f, 0x64, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x72, 0x65, 0x66,
0x69, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78,
0x12, 0x1b, 0x0a, 0x09, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x03, 0x20,
0x01, 0x28, 0x09, 0x52, 0x08, 0x66, 0x69, 0x6c, 0x65, 0x50, 0x61, 0x74, 0x68, 0x12, 0x21, 0x0a,
0x0c, 0x69, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x73, 0x18, 0x04, 0x20,
0x03, 0x28, 0x09, 0x52, 0x0b, 0x69, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x50, 0x61, 0x74, 0x68, 0x73,
0x22, 0xc1, 0x15, 0x0a, 0x09, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x53,
0x0a, 0x08, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x6d, 0x61, 0x70, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b,
0x32, 0x38, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69,
0x6f, 0x6e, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x6c, 0x75,
0x67, 0x69, 0x6e, 0x2e, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x2e, 0x46, 0x69,
0x6c, 0x65, 0x4d, 0x61, 0x70, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x07, 0x66, 0x69, 0x6c, 0x65,
0x4d, 0x61, 0x70, 0x12, 0x5c, 0x0a, 0x0b, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x6d,
0x61, 0x70, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3b, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e,
0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72,
0x61, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x52, 0x65, 0x66, 0x65,
0x72, 0x65, 0x6e, 0x63, 0x65, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4d, 0x61, 0x70,
0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0a, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4d, 0x61,
0x70, 0x12, 0x59, 0x0a, 0x0a, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x5f, 0x6d, 0x61, 0x70, 0x18,
0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3a, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64,
0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f,
0x72, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e,
0x63, 0x65, 0x2e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x4d, 0x61, 0x70, 0x45, 0x6e, 0x74, 0x72,
0x79, 0x52, 0x09, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x4d, 0x61, 0x70, 0x12, 0x5c, 0x0a, 0x0b,
0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x6d, 0x61, 0x70, 0x18, 0x04, 0x20, 0x03, 0x28,
0x0b, 0x32, 0x3b, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74,
0x69, 0x6f, 0x6e, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x6c,
0x75, 0x67, 0x69, 0x6e, 0x2e, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x2e, 0x4d,
0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x4d, 0x61, 0x70, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0a,
0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x4d, 0x61, 0x70, 0x12, 0x56, 0x0a, 0x09, 0x66, 0x69,
0x65, 0x6c, 0x64, 0x5f, 0x6d, 0x61, 0x70, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x39, 0x2e,
0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e,
0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e,
0x2e, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64,
0x4d, 0x61, 0x70, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x08, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x4d,
0x61, 0x70, 0x12, 0x53, 0x0a, 0x08, 0x65, 0x6e, 0x75, 0x6d, 0x5f, 0x6d, 0x61, 0x70, 0x18, 0x06,
0x20, 0x03, 0x28, 0x0b, 0x32, 0x38, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65,
0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72,
0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63,
0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x4d, 0x61, 0x70, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x07,
0x65, 0x6e, 0x75, 0x6d, 0x4d, 0x61, 0x70, 0x12, 0x63, 0x0a, 0x0e, 0x65, 0x6e, 0x75, 0x6d, 0x5f,
0x76, 0x61, 0x6c, 0x75, 0x65, 0x5f, 0x6d, 0x61, 0x70, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32,
0x3d, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f,
0x6e, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x6c, 0x75, 0x67,
0x69, 0x6e, 0x2e, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75,
0x6d, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x4d, 0x61, 0x70, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0c,
0x65, 0x6e, 0x75, 0x6d, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x4d, 0x61, 0x70, 0x12, 0x56, 0x0a, 0x09,
0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x5f, 0x6d, 0x61, 0x70, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32,
0x39, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f,
0x6e, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x6c, 0x75, 0x67,
0x69, 0x6e, 0x2e, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x2e, 0x4f, 0x6e, 0x65,
0x6f, 0x66, 0x4d, 0x61, 0x70, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x08, 0x6f, 0x6e, 0x65, 0x6f,
0x66, 0x4d, 0x61, 0x70, 0x12, 0x63, 0x0a, 0x0e, 0x63, 0x65, 0x6c, 0x5f, 0x70, 0x6c, 0x75, 0x67,
0x69, 0x6e, 0x5f, 0x6d, 0x61, 0x70, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3d, 0x2e, 0x67,
0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x67,
0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e,
0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x2e, 0x43, 0x65, 0x6c, 0x50, 0x6c, 0x75,
0x67, 0x69, 0x6e, 0x4d, 0x61, 0x70, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0c, 0x63, 0x65, 0x6c,
0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x4d, 0x61, 0x70, 0x12, 0x56, 0x0a, 0x09, 0x67, 0x72, 0x61,
0x70, 0x68, 0x5f, 0x6d, 0x61, 0x70, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x39, 0x2e, 0x67,
0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x67,
0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e,
0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x2e, 0x47, 0x72, 0x61, 0x70, 0x68, 0x4d,
0x61, 0x70, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x08, 0x67, 0x72, 0x61, 0x70, 0x68, 0x4d, 0x61,
0x70, 0x12, 0x7e, 0x0a, 0x17, 0x76, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x64, 0x65,
0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x70, 0x18, 0x0b, 0x20, 0x03,
0x28, 0x0b, 0x32, 0x46, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61,
0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x70,
0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x2e,
0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69,
0x6f, 0x6e, 0x4d, 0x61, 0x70, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x15, 0x76, 0x61, 0x72, 0x69,
0x61, 0x62, 0x6c, 0x65, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x61,
0x70, 0x12, 0x8e, 0x01, 0x0a, 0x1d, 0x76, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x64,
0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f,
0x6d, 0x61, 0x70, 0x18, 0x0c, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x4b, 0x2e, 0x67, 0x72, 0x70, 0x63,
0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x67, 0x65, 0x6e, 0x65,
0x72, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x52, 0x65, 0x66,
0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x2e, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x44,
0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x61,
0x70, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x1a, 0x76, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65,
0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d,
0x61, 0x70, 0x12, 0x63, 0x0a, 0x0e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x5f, 0x6e, 0x6f, 0x64, 0x65,
0x5f, 0x6d, 0x61, 0x70, 0x18, 0x0d, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3d, 0x2e, 0x67, 0x72, 0x70,
0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x67, 0x65, 0x6e,
0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x52, 0x65,
0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x2e, 0x47, 0x72, 0x61, 0x70, 0x68, 0x4e, 0x6f, 0x64,
0x65, 0x4d, 0x61, 0x70, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0c, 0x67, 0x72, 0x61, 0x70, 0x68,
0x4e, 0x6f, 0x64, 0x65, 0x4d, 0x61, 0x70, 0x1a, 0x62, 0x0a, 0x0c, 0x46, 0x69, 0x6c, 0x65, 0x4d,
0x61, 0x70, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01,
0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x3c, 0x0a, 0x05, 0x76, 0x61, 0x6c,
0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e,
0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72,
0x61, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x46, 0x69, 0x6c, 0x65,
0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x68, 0x0a, 0x0f, 0x53,
0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4d, 0x61, 0x70, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10,
0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79,
0x12, 0x3f, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32,
0x29, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f,
0x6e, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x6c, 0x75, 0x67,
0x69, 0x6e, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75,
0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x66, 0x0a, 0x0e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x4d,
0x61, 0x70, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01,
0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x3e, 0x0a, 0x05, 0x76, 0x61, 0x6c,
0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e,
0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72,
0x61, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x4d, 0x65, 0x74, 0x68,
0x6f, 0x64, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x68, 0x0a,
0x0f, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x4d, 0x61, 0x70, 0x45, 0x6e, 0x74, 0x72, 0x79,
0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b,
0x65, 0x79, 0x12, 0x3f, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28,
0x0b, 0x32, 0x29, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74,
0x69, 0x6f, 0x6e, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x6c,
0x75, 0x67, 0x69, 0x6e, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x05, 0x76, 0x61,
0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x64, 0x0a, 0x0d, 0x46, 0x69, 0x65, 0x6c, 0x64,
0x4d, 0x61, 0x70, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18,
0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x3d, 0x0a, 0x05, 0x76, 0x61,
0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x67, 0x72, 0x70, 0x63,
0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x67, 0x65, 0x6e, 0x65,
0x72, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x46, 0x69, 0x65,
0x6c, 0x64, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x62, 0x0a,
0x0c, 0x45, 0x6e, 0x75, 0x6d, 0x4d, 0x61, 0x70, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a,
0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12,
0x3c, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26,
0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e,
0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69,
0x6e, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38,
0x01, 0x1a, 0x6c, 0x0a, 0x11, 0x45, 0x6e, 0x75, 0x6d, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x4d, 0x61,
0x70, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20,
0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x41, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75,
0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66,
0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61,
0x74, 0x6f, 0x72, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x56,
0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a,
0x64, 0x0a, 0x0d, 0x4f, 0x6e, 0x65, 0x6f, 0x66, 0x4d, 0x61, 0x70, 0x45, 0x6e, 0x74, 0x72, 0x79,
0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b,
0x65, 0x79, 0x12, 0x3d, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28,
0x0b, 0x32, 0x27, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74,
0x69, 0x6f, 0x6e, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x6c,
0x75, 0x67, 0x69, 0x6e, 0x2e, 0x4f, 0x6e, 0x65, 0x6f, 0x66, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75,
0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x6c, 0x0a, 0x11, 0x43, 0x65, 0x6c, 0x50, 0x6c, 0x75, 0x67,
0x69, 0x6e, 0x4d, 0x61, 0x70, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65,
0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x41, 0x0a, 0x05,
0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x67, 0x72,
0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x67, 0x65,
0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x43,
0x45, 0x4c, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a,
0x02, 0x38, 0x01, 0x1a, 0x75, 0x0a, 0x0d, 0x47, 0x72, 0x61, 0x70, 0x68, 0x4d, 0x61, 0x70, 0x45,
0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28,
0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x4e, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18,
0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x38, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64,
0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f,
0x72, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65,
0x44, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x79, 0x47, 0x72, 0x61, 0x70, 0x68, 0x52,
0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x7e, 0x0a, 0x1a, 0x56, 0x61,
0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e,
0x4d, 0x61, 0x70, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18,
0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x4a, 0x0a, 0x05, 0x76, 0x61,
0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x67, 0x72, 0x70, 0x63,
0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x67, 0x65, 0x6e, 0x65,
0x72, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x56, 0x61, 0x72,
0x69, 0x61, 0x62, 0x6c, 0x65, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52,
0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x88, 0x01, 0x0a, 0x1f, 0x56,
0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f,
0x6e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x61, 0x70, 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, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f,
0x6e, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x6c, 0x75, 0x67,
0x69, 0x6e, 0x2e, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x44, 0x65, 0x66, 0x69, 0x6e,
0x69, 0x74, 0x69, 0x6f, 0x6e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75,
0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x7d, 0x0a, 0x11, 0x47, 0x72, 0x61, 0x70, 0x68, 0x4e, 0x6f,
0x64, 0x65, 0x4d, 0x61, 0x70, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65,
0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x52, 0x0a, 0x05,
0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3c, 0x2e, 0x67, 0x72,
0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x67, 0x65,
0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x4d,
0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x44, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x79,
0x47, 0x72, 0x61, 0x70, 0x68, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65,
0x3a, 0x02, 0x38, 0x01, 0x22, 0xe6, 0x02, 0x0a, 0x04, 0x46, 0x69, 0x6c, 0x65, 0x12, 0x0e, 0x0a,
0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x43, 0x0a,
0x07, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29,
0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e,
0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69,
0x6e, 0x2e, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x52, 0x07, 0x70, 0x61, 0x63, 0x6b, 0x61,
0x67, 0x65, 0x12, 0x4a, 0x0a, 0x0a, 0x67, 0x6f, 0x5f, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65,
0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65,
0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74,
0x6f, 0x72, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x47, 0x6f, 0x50, 0x61, 0x63, 0x6b,
0x61, 0x67, 0x65, 0x52, 0x09, 0x67, 0x6f, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x12, 0x12,
0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61,
0x6d, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x69, 0x64,
0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65,
0x49, 0x64, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x69,
0x64, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67,
0x65, 0x49, 0x64, 0x73, 0x12, 0x19, 0x0a, 0x08, 0x65, 0x6e, 0x75, 0x6d, 0x5f, 0x69, 0x64, 0x73,
0x18, 0x07, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x65, 0x6e, 0x75, 0x6d, 0x49, 0x64, 0x73, 0x12,
0x24, 0x0a, 0x0e, 0x63, 0x65, 0x6c, 0x5f, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x5f, 0x69, 0x64,
0x73, 0x18, 0x08, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0c, 0x63, 0x65, 0x6c, 0x50, 0x6c, 0x75, 0x67,
0x69, 0x6e, 0x49, 0x64, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x69, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x5f,
0x66, 0x69, 0x6c, 0x65, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x09, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0d,
0x69, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x46, 0x69, 0x6c, 0x65, 0x49, 0x64, 0x73, 0x22, 0x38, 0x0a,
0x07, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65,
0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x19, 0x0a, 0x08,
0x66, 0x69, 0x6c, 0x65, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07,
0x66, 0x69, 0x6c, 0x65, 0x49, 0x64, 0x73, 0x22, 0x5f, 0x0a, 0x09, 0x47, 0x6f, 0x50, 0x61, 0x63,
0x6b, 0x61, 0x67, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01,
0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x69, 0x6d, 0x70, 0x6f,
0x72, 0x74, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x69,
0x6d, 0x70, 0x6f, 0x72, 0x74, 0x50, 0x61, 0x74, 0x68, 0x12, 0x1d, 0x0a, 0x0a, 0x61, 0x6c, 0x69,
0x61, 0x73, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x61,
0x6c, 0x69, 0x61, 0x73, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x97, 0x02, 0x0a, 0x07, 0x53, 0x65, 0x72,
0x76, 0x69, 0x63, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01,
0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x6d, 0x65, 0x74, 0x68,
0x6f, 0x64, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x6d, 0x65,
0x74, 0x68, 0x6f, 0x64, 0x49, 0x64, 0x73, 0x12, 0x17, 0x0a, 0x07, 0x66, 0x69, 0x6c, 0x65, 0x5f,
0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x66, 0x69, 0x6c, 0x65, 0x49, 0x64,
0x12, 0x1f, 0x0a, 0x0b, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x69, 0x64, 0x73, 0x18,
0x05, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x49, 0x64,
0x73, 0x12, 0x26, 0x0a, 0x0f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x61, 0x72, 0x67,
0x5f, 0x69, 0x64, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0d, 0x6d, 0x65, 0x73, 0x73,
0x61, 0x67, 0x65, 0x41, 0x72, 0x67, 0x49, 0x64, 0x73, 0x12, 0x24, 0x0a, 0x0e, 0x63, 0x65, 0x6c,
0x5f, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28,
0x09, 0x52, 0x0c, 0x63, 0x65, 0x6c, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x49, 0x64, 0x73, 0x12,
0x41, 0x0a, 0x04, 0x72, 0x75, 0x6c, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2d, 0x2e,
0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e,
0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e,
0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x75, 0x6c, 0x65, 0x52, 0x04, 0x72, 0x75,
0x6c, 0x65, 0x22, 0x8d, 0x01, 0x0a, 0x0b, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x75,
0x6c, 0x65, 0x12, 0x37, 0x0a, 0x03, 0x65, 0x6e, 0x76, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32,
0x25, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f,
0x6e, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x6c, 0x75, 0x67,
0x69, 0x6e, 0x2e, 0x45, 0x6e, 0x76, 0x52, 0x03, 0x65, 0x6e, 0x76, 0x12, 0x45, 0x0a, 0x04, 0x76,
0x61, 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x67, 0x72, 0x70, 0x63,
0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x67, 0x65, 0x6e, 0x65,
0x72, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x53, 0x65, 0x72,
0x76, 0x69, 0x63, 0x65, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x04, 0x76, 0x61,
0x72, 0x73, 0x22, 0x43, 0x0a, 0x03, 0x45, 0x6e, 0x76, 0x12, 0x3c, 0x0a, 0x04, 0x76, 0x61, 0x72,
0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66,
0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61,
0x74, 0x6f, 0x72, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x45, 0x6e, 0x76, 0x56, 0x61,
0x72, 0x52, 0x04, 0x76, 0x61, 0x72, 0x73, 0x22, 0xa0, 0x01, 0x0a, 0x06, 0x45, 0x6e, 0x76, 0x56,
0x61, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x3a, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02,
0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65,
0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72,
0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79,
0x70, 0x65, 0x12, 0x46, 0x0a, 0x06, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01,
0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61,
0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x70,
0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x45, 0x6e, 0x76, 0x56, 0x61, 0x72, 0x4f, 0x70, 0x74, 0x69,
0x6f, 0x6e, 0x52, 0x06, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x7c, 0x0a, 0x0c, 0x45, 0x6e,
0x76, 0x56, 0x61, 0x72, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1c, 0x0a, 0x09, 0x61, 0x6c,
0x74, 0x65, 0x72, 0x6e, 0x61, 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x61,
0x6c, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x74, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x64, 0x65, 0x66, 0x61,
0x75, 0x6c, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x64, 0x65, 0x66, 0x61, 0x75,
0x6c, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x18, 0x03,
0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x12, 0x18,
0x0a, 0x07, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52,
0x07, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x64, 0x22, 0xac, 0x01, 0x0a, 0x0f, 0x53, 0x65, 0x72,
0x76, 0x69, 0x63, 0x65, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x12, 0x0a, 0x04,
0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65,
0x12, 0x3a, 0x0a, 0x02, 0x69, 0x66, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x67,
0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x67,
0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e,
0x43, 0x45, 0x4c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x02, 0x69, 0x66, 0x12, 0x49, 0x0a, 0x04,
0x65, 0x78, 0x70, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x35, 0x2e, 0x67, 0x72, 0x70,
0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x67, 0x65, 0x6e,
0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x53, 0x65,
0x72, 0x76, 0x69, 0x63, 0x65, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x45, 0x78, 0x70,
0x72, 0x52, 0x04, 0x65, 0x78, 0x70, 0x72, 0x22, 0x8e, 0x04, 0x0a, 0x13, 0x53, 0x65, 0x72, 0x76,
0x69, 0x63, 0x65, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x45, 0x78, 0x70, 0x72, 0x12,
0x3a, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e,
0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e,
0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e,
0x2e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x3c, 0x0a, 0x02, 0x62,
0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66,
0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61,
0x74, 0x6f, 0x72, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x43, 0x45, 0x4c, 0x56, 0x61,
0x6c, 0x75, 0x65, 0x48, 0x00, 0x52, 0x02, 0x62, 0x79, 0x12, 0x3d, 0x0a, 0x03, 0x6d, 0x61, 0x70,
0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65,
0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74,
0x6f, 0x72, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x4d, 0x61, 0x70, 0x45, 0x78, 0x70,
0x72, 0x48, 0x00, 0x52, 0x03, 0x6d, 0x61, 0x70, 0x12, 0x49, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73,
0x61, 0x67, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x67, 0x72, 0x70, 0x63,
0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x67, 0x65, 0x6e, 0x65,
0x72, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x4d, 0x65, 0x73,
0x73, 0x61, 0x67, 0x65, 0x45, 0x78, 0x70, 0x72, 0x48, 0x00, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73,
0x61, 0x67, 0x65, 0x12, 0x61, 0x0a, 0x0a, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f,
0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3f, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66,
0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61,
0x74, 0x6f, 0x72, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69,
0x63, 0x65, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61,
0x74, 0x69, 0x6f, 0x6e, 0x45, 0x78, 0x70, 0x72, 0x48, 0x00, 0x52, 0x0a, 0x76, 0x61, 0x6c, 0x69,
0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x40, 0x0a, 0x04, 0x65, 0x6e, 0x75, 0x6d, 0x18, 0x06,
0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65,
0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72,
0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x45, 0x78, 0x70, 0x72,
0x48, 0x00, 0x52, 0x04, 0x65, 0x6e, 0x75, 0x6d, 0x12, 0x46, 0x0a, 0x06, 0x73, 0x77, 0x69, 0x74,
0x63, 0x68, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e,
0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72,
0x61, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x53, 0x77, 0x69, 0x74,
0x63, 0x68, 0x45, 0x78, 0x70, 0x72, 0x48, 0x00, 0x52, 0x06, 0x73, 0x77, 0x69, 0x74, 0x63, 0x68,
0x42, 0x06, 0x0a, 0x04, 0x65, 0x78, 0x70, 0x72, 0x22, 0xa1, 0x01, 0x0a, 0x1d, 0x53, 0x65, 0x72,
0x76, 0x69, 0x63, 0x65, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x56, 0x61, 0x6c, 0x69,
0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x78, 0x70, 0x72, 0x12, 0x3a, 0x0a, 0x02, 0x69, 0x66,
0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65,
0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74,
0x6f, 0x72, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x43, 0x45, 0x4c, 0x56, 0x61, 0x6c,
0x75, 0x65, 0x52, 0x02, 0x69, 0x66, 0x12, 0x44, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67,
0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66,
0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61,
0x74, 0x6f, 0x72, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x43, 0x45, 0x4c, 0x56, 0x61,
0x6c, 0x75, 0x65, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0xcd, 0x01, 0x0a,
0x06, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20,
0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18,
0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x72,
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52,
0x09, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x72, 0x65,
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52,
0x0a, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x73,
0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52,
0x09, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x49, 0x64, 0x12, 0x40, 0x0a, 0x04, 0x72, 0x75,
0x6c, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e,
0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72,
0x61, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x4d, 0x65, 0x74, 0x68,
0x6f, 0x64, 0x52, 0x75, 0x6c, 0x65, 0x52, 0x04, 0x72, 0x75, 0x6c, 0x65, 0x22, 0x62, 0x0a, 0x0a,
0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x52, 0x75, 0x6c, 0x65, 0x12, 0x33, 0x0a, 0x07, 0x74, 0x69,
0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f,
0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75,
0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12,
0x1f, 0x0a, 0x0b, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x02,
0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x49, 0x64,
0x22, 0xda, 0x02, 0x0a, 0x07, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x0e, 0x0a, 0x02,
0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04,
0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65,
0x12, 0x20, 0x0a, 0x0c, 0x69, 0x73, 0x5f, 0x6d, 0x61, 0x70, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79,
0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x69, 0x73, 0x4d, 0x61, 0x70, 0x45, 0x6e, 0x74,
0x72, 0x79, 0x12, 0x17, 0x0a, 0x07, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20,
0x01, 0x28, 0x09, 0x52, 0x06, 0x66, 0x69, 0x6c, 0x65, 0x49, 0x64, 0x12, 0x2a, 0x0a, 0x11, 0x70,
0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x69, 0x64,
0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x4d, 0x65,
0x73, 0x73, 0x61, 0x67, 0x65, 0x49, 0x64, 0x12, 0x2c, 0x0a, 0x12, 0x6e, 0x65, 0x73, 0x74, 0x65,
0x64, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x06, 0x20,
0x03, 0x28, 0x09, 0x52, 0x10, 0x6e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61,
0x67, 0x65, 0x49, 0x64, 0x73, 0x12, 0x19, 0x0a, 0x08, 0x65, 0x6e, 0x75, 0x6d, 0x5f, 0x69, 0x64,
0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x65, 0x6e, 0x75, 0x6d, 0x49, 0x64, 0x73,
0x12, 0x1b, 0x0a, 0x09, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x08, 0x20,
0x03, 0x28, 0x09, 0x52, 0x08, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x49, 0x64, 0x73, 0x12, 0x1b, 0x0a,
0x09, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x09, 0x20, 0x03, 0x28, 0x09,
0x52, 0x08, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x49, 0x64, 0x73, 0x12, 0x41, 0x0a, 0x04, 0x72, 0x75,
0x6c, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e,
0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72,
0x61, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x4d, 0x65, 0x73, 0x73,
0x61, 0x67, 0x65, 0x52, 0x75, 0x6c, 0x65, 0x52, 0x04, 0x72, 0x75, 0x6c, 0x65, 0x22, 0xd5, 0x01,
0x0a, 0x0b, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x75, 0x6c, 0x65, 0x12, 0x2e, 0x0a,
0x13, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x61, 0x72, 0x67, 0x75, 0x6d, 0x65, 0x6e,
0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x6d, 0x65, 0x73, 0x73,
0x61, 0x67, 0x65, 0x41, 0x72, 0x67, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x27, 0x0a,
0x0f, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x5f, 0x72, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x72,
0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x52, 0x65,
0x73, 0x6f, 0x6c, 0x76, 0x65, 0x72, 0x12, 0x1b, 0x0a, 0x09, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x5f,
0x69, 0x64, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x61, 0x6c, 0x69, 0x61, 0x73,
0x49, 0x64, 0x73, 0x12, 0x50, 0x0a, 0x07, 0x64, 0x65, 0x66, 0x5f, 0x73, 0x65, 0x74, 0x18, 0x04,
0x20, 0x01, 0x28, 0x0b, 0x32, 0x37, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65,
0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72,
0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65,
0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, 0x06, 0x64,
0x65, 0x66, 0x53, 0x65, 0x74, 0x22, 0xc2, 0x01, 0x0a, 0x15, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62,
0x6c, 0x65, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x12,
0x36, 0x0a, 0x17, 0x76, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x64, 0x65, 0x66, 0x69,
0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09,
0x52, 0x15, 0x76, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69,
0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x73, 0x12, 0x41, 0x0a, 0x1d, 0x76, 0x61, 0x72, 0x69, 0x61,
0x62, 0x6c, 0x65, 0x5f, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x67,
0x72, 0x6f, 0x75, 0x70, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x1a,
0x76, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69,
0x6f, 0x6e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x64, 0x73, 0x12, 0x2e, 0x0a, 0x13, 0x64, 0x65,
0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x79, 0x5f, 0x67, 0x72, 0x61, 0x70, 0x68, 0x5f, 0x69,
0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x64, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65,
0x6e, 0x63, 0x79, 0x47, 0x72, 0x61, 0x70, 0x68, 0x49, 0x64, 0x22, 0xff, 0x01, 0x0a, 0x12, 0x56,
0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f,
0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69,
0x64, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03,
0x52, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18,
0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x3a, 0x0a, 0x02, 0x69,
0x66, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66,
0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61,
0x74, 0x6f, 0x72, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x43, 0x45, 0x4c, 0x56, 0x61,
0x6c, 0x75, 0x65, 0x52, 0x02, 0x69, 0x66, 0x12, 0x1b, 0x0a, 0x09, 0x61, 0x75, 0x74, 0x6f, 0x5f,
0x62, 0x69, 0x6e, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x61, 0x75, 0x74, 0x6f,
0x42, 0x69, 0x6e, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x73, 0x65, 0x64, 0x18, 0x06, 0x20, 0x01,
0x28, 0x08, 0x52, 0x04, 0x75, 0x73, 0x65, 0x64, 0x12, 0x42, 0x0a, 0x04, 0x65, 0x78, 0x70, 0x72,
0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65,
0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74,
0x6f, 0x72, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62,
0x6c, 0x65, 0x45, 0x78, 0x70, 0x72, 0x52, 0x04, 0x65, 0x78, 0x70, 0x72, 0x22, 0xe2, 0x01, 0x0a,
0x05, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01,
0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02,
0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x3a, 0x0a, 0x04, 0x74, 0x79,
0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e,
0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72,
0x61, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x54, 0x79, 0x70, 0x65,
0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x5f,
0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x49,
0x64, 0x12, 0x3f, 0x0a, 0x04, 0x72, 0x75, 0x6c, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32,
0x2b, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f,
0x6e, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x6c, 0x75, 0x67,
0x69, 0x6e, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x52, 0x75, 0x6c, 0x65, 0x52, 0x04, 0x72, 0x75,
0x6c, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x69, 0x64,
0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x49,
0x64, 0x22, 0xf2, 0x02, 0x0a, 0x09, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x52, 0x75, 0x6c, 0x65, 0x12,
0x3d, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27,
0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e,
0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69,
0x6e, 0x2e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x27,
0x0a, 0x0f, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x5f, 0x72, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65,
0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x52,
0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x72, 0x12, 0x36, 0x0a, 0x17, 0x6d, 0x65, 0x73, 0x73, 0x61,
0x67, 0x65, 0x5f, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x5f, 0x72, 0x65, 0x73, 0x6f, 0x6c, 0x76,
0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x15, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67,
0x65, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x52, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x72, 0x12,
0x1b, 0x0a, 0x09, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x04, 0x20, 0x03,
0x28, 0x09, 0x52, 0x08, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x49, 0x64, 0x73, 0x12, 0x57, 0x0a, 0x0f,
0x61, 0x75, 0x74, 0x6f, 0x5f, 0x62, 0x69, 0x6e, 0x64, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x18,
0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64,
0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f,
0x72, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x41, 0x75, 0x74, 0x6f, 0x42, 0x69, 0x6e,
0x64, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x52, 0x0d, 0x61, 0x75, 0x74, 0x6f, 0x42, 0x69, 0x6e, 0x64,
0x46, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x4f, 0x0a, 0x0a, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x5f, 0x72,
0x75, 0x6c, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x67, 0x72, 0x70, 0x63,
0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x67, 0x65, 0x6e, 0x65,
0x72, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x46, 0x69, 0x65,
0x6c, 0x64, 0x4f, 0x6e, 0x65, 0x6f, 0x66, 0x52, 0x75, 0x6c, 0x65, 0x52, 0x09, 0x6f, 0x6e, 0x65,
0x6f, 0x66, 0x52, 0x75, 0x6c, 0x65, 0x22, 0x60, 0x0a, 0x0d, 0x41, 0x75, 0x74, 0x6f, 0x42, 0x69,
0x6e, 0x64, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x34, 0x0a, 0x16, 0x76, 0x61, 0x72, 0x69, 0x61,
0x62, 0x6c, 0x65, 0x5f, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69,
0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x14, 0x76, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c,
0x65, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x19, 0x0a,
0x08, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52,
0x07, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x49, 0x64, 0x22, 0xf4, 0x01, 0x0a, 0x0e, 0x46, 0x69, 0x65,
0x6c, 0x64, 0x4f, 0x6e, 0x65, 0x6f, 0x66, 0x52, 0x75, 0x6c, 0x65, 0x12, 0x3a, 0x0a, 0x02, 0x69,
0x66, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66,
0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61,
0x74, 0x6f, 0x72, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x43, 0x45, 0x4c, 0x56, 0x61,
0x6c, 0x75, 0x65, 0x52, 0x02, 0x69, 0x66, 0x12, 0x18, 0x0a, 0x07, 0x64, 0x65, 0x66, 0x61, 0x75,
0x6c, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c,
0x74, 0x12, 0x3a, 0x0a, 0x02, 0x62, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e,
0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e,
0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e,
0x2e, 0x43, 0x45, 0x4c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x02, 0x62, 0x79, 0x12, 0x50, 0x0a,
0x07, 0x64, 0x65, 0x66, 0x5f, 0x73, 0x65, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x37,
0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e,
0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69,
0x6e, 0x2e, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69,
0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, 0x06, 0x64, 0x65, 0x66, 0x53, 0x65, 0x74, 0x22,
0x80, 0x02, 0x0a, 0x17, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x44, 0x65, 0x66, 0x69,
0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x0e, 0x0a, 0x02, 0x69,
0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x65, 0x0a, 0x0a, 0x73,
0x65, 0x71, 0x75, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32,
0x43, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f,
0x6e, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x6c, 0x75, 0x67,
0x69, 0x6e, 0x2e, 0x53, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x56, 0x61, 0x72,
0x69, 0x61, 0x62, 0x6c, 0x65, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x47,
0x72, 0x6f, 0x75, 0x70, 0x48, 0x00, 0x52, 0x0a, 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x74, 0x69,
0x61, 0x6c, 0x12, 0x65, 0x0a, 0x0a, 0x63, 0x6f, 0x6e, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74,
0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x43, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65,
0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74,
0x6f, 0x72, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x43, 0x6f, 0x6e, 0x63, 0x75, 0x72,
0x72, 0x65, 0x6e, 0x74, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x44, 0x65, 0x66, 0x69,
0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x48, 0x00, 0x52, 0x0a, 0x63,
0x6f, 0x6e, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x67, 0x72, 0x6f,
0x75, 0x70, 0x22, 0x4b, 0x0a, 0x21, 0x53, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c,
0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69,
0x6f, 0x6e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74,
0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x12, 0x10, 0x0a,
0x03, 0x65, 0x6e, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x65, 0x6e, 0x64, 0x22,
0x4d, 0x0a, 0x21, 0x43, 0x6f, 0x6e, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x56, 0x61, 0x72,
0x69, 0x61, 0x62, 0x6c, 0x65, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x47,
0x72, 0x6f, 0x75, 0x70, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x72, 0x74, 0x73, 0x18, 0x01,
0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x73, 0x74, 0x61, 0x72, 0x74, 0x73, 0x12, 0x10, 0x0a, 0x03,
0x65, 0x6e, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x65, 0x6e, 0x64, 0x22, 0x4c,
0x0a, 0x16, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x44, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65,
0x6e, 0x63, 0x79, 0x47, 0x72, 0x61, 0x70, 0x68, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01,
0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x22, 0x0a, 0x0d, 0x72, 0x6f, 0x6f, 0x74,
0x5f, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52,
0x0b, 0x72, 0x6f, 0x6f, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x64, 0x73, 0x22, 0xa7, 0x01, 0x0a,
0x1a, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x44, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e,
0x63, 0x79, 0x47, 0x72, 0x61, 0x70, 0x68, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69,
0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x63,
0x68, 0x69, 0x6c, 0x64, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08,
0x63, 0x68, 0x69, 0x6c, 0x64, 0x49, 0x64, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x62, 0x61, 0x73, 0x65,
0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28,
0x09, 0x52, 0x0d, 0x62, 0x61, 0x73, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x49, 0x64,
0x12, 0x34, 0x0a, 0x16, 0x76, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x64, 0x65, 0x66,
0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09,
0x52, 0x14, 0x76, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69,
0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x22, 0xba, 0x04, 0x0a, 0x0c, 0x56, 0x61, 0x72, 0x69, 0x61,
0x62, 0x6c, 0x65, 0x45, 0x78, 0x70, 0x72, 0x12, 0x3a, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18,
0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64,
0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f,
0x72, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74,
0x79, 0x70, 0x65, 0x12, 0x3c, 0x0a, 0x02, 0x62, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32,
0x2a, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f,
0x6e, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x6c, 0x75, 0x67,
0x69, 0x6e, 0x2e, 0x43, 0x45, 0x4c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x48, 0x00, 0x52, 0x02, 0x62,
0x79, 0x12, 0x3d, 0x0a, 0x03, 0x6d, 0x61, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29,
0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e,
0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69,
0x6e, 0x2e, 0x4d, 0x61, 0x70, 0x45, 0x78, 0x70, 0x72, 0x48, 0x00, 0x52, 0x03, 0x6d, 0x61, 0x70,
0x12, 0x40, 0x0a, 0x04, 0x63, 0x61, 0x6c, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a,
0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e,
0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69,
0x6e, 0x2e, 0x43, 0x61, 0x6c, 0x6c, 0x45, 0x78, 0x70, 0x72, 0x48, 0x00, 0x52, 0x04, 0x63, 0x61,
0x6c, 0x6c, 0x12, 0x49, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x05, 0x20,
0x01, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72,
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x2e,
0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x45, 0x78,
0x70, 0x72, 0x48, 0x00, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x52, 0x0a,
0x0a, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28,
0x0b, 0x32, 0x30, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74,
0x69, 0x6f, 0x6e, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x6c,
0x75, 0x67, 0x69, 0x6e, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45,
0x78, 0x70, 0x72, 0x48, 0x00, 0x52, 0x0a, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f,
0x6e, 0x12, 0x40, 0x0a, 0x04, 0x65, 0x6e, 0x75, 0x6d, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32,
0x2a, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f,
0x6e, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x6c, 0x75, 0x67,
0x69, 0x6e, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x45, 0x78, 0x70, 0x72, 0x48, 0x00, 0x52, 0x04, 0x65,
0x6e, 0x75, 0x6d, 0x12, 0x46, 0x0a, 0x06, 0x73, 0x77, 0x69, 0x74, 0x63, 0x68, 0x18, 0x08, 0x20,
0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72,
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x2e,
0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x53, 0x77, 0x69, 0x74, 0x63, 0x68, 0x45, 0x78, 0x70,
0x72, 0x48, 0x00, 0x52, 0x06, 0x73, 0x77, 0x69, 0x74, 0x63, 0x68, 0x42, 0x06, 0x0a, 0x04, 0x65,
0x78, 0x70, 0x72, 0x22, 0xe6, 0x01, 0x0a, 0x04, 0x54, 0x79, 0x70, 0x65, 0x12, 0x3e, 0x0a, 0x04,
0x6b, 0x69, 0x6e, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2a, 0x2e, 0x67, 0x72, 0x70,
0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x67, 0x65, 0x6e,
0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x54, 0x79,
0x70, 0x65, 0x4b, 0x69, 0x6e, 0x64, 0x52, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x12, 0x1a, 0x0a, 0x08,
0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08,
0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x12, 0x17, 0x0a, 0x07, 0x69, 0x73, 0x5f, 0x6e,
0x75, 0x6c, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x69, 0x73, 0x4e, 0x75, 0x6c,
0x6c, 0x12, 0x1f, 0x0a, 0x0a, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x69, 0x64, 0x18,
0x04, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x09, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65,
0x49, 0x64, 0x12, 0x19, 0x0a, 0x07, 0x65, 0x6e, 0x75, 0x6d, 0x5f, 0x69, 0x64, 0x18, 0x05, 0x20,
0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x06, 0x65, 0x6e, 0x75, 0x6d, 0x49, 0x64, 0x12, 0x26, 0x0a,
0x0e, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x69, 0x64, 0x18,
0x06, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0c, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x46, 0x69,
0x65, 0x6c, 0x64, 0x49, 0x64, 0x42, 0x05, 0x0a, 0x03, 0x72, 0x65, 0x66, 0x22, 0x58, 0x0a, 0x08,
0x43, 0x45, 0x4c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x65, 0x78, 0x70, 0x72,
0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x65, 0x78, 0x70, 0x72, 0x12, 0x38, 0x0a, 0x03,
0x6f, 0x75, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x67, 0x72, 0x70, 0x63,
0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x67, 0x65, 0x6e, 0x65,
0x72, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x54, 0x79, 0x70,
0x65, 0x52, 0x03, 0x6f, 0x75, 0x74, 0x22, 0x98, 0x01, 0x0a, 0x07, 0x4d, 0x61, 0x70, 0x45, 0x78,
0x70, 0x72, 0x12, 0x46, 0x0a, 0x08, 0x69, 0x74, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x01,
0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65,
0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72,
0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x49, 0x74, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72,
0x52, 0x08, 0x69, 0x74, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x45, 0x0a, 0x04, 0x65, 0x78,
0x70, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e,
0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72,
0x61, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x4d, 0x61, 0x70, 0x49,
0x74, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x45, 0x78, 0x70, 0x72, 0x52, 0x04, 0x65, 0x78, 0x70,
0x72, 0x22, 0x3b, 0x0a, 0x08, 0x49, 0x74, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x12, 0x0a,
0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d,
0x65, 0x12, 0x1b, 0x0a, 0x09, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x02,
0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x64, 0x22, 0xa0,
0x02, 0x0a, 0x0f, 0x4d, 0x61, 0x70, 0x49, 0x74, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x45, 0x78,
0x70, 0x72, 0x12, 0x3a, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b,
0x32, 0x26, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69,
0x6f, 0x6e, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x6c, 0x75,
0x67, 0x69, 0x6e, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x3c,
0x0a, 0x02, 0x62, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x67, 0x72, 0x70,
0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x67, 0x65, 0x6e,
0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x43, 0x45,
0x4c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x48, 0x00, 0x52, 0x02, 0x62, 0x79, 0x12, 0x49, 0x0a, 0x07,
0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2d, 0x2e,
0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e,
0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e,
0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x45, 0x78, 0x70, 0x72, 0x48, 0x00, 0x52, 0x07,
0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x40, 0x0a, 0x04, 0x65, 0x6e, 0x75, 0x6d, 0x18,
0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64,
0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f,
0x72, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x45, 0x78, 0x70,
0x72, 0x48, 0x00, 0x52, 0x04, 0x65, 0x6e, 0x75, 0x6d, 0x42, 0x06, 0x0a, 0x04, 0x65, 0x78, 0x70,
0x72, 0x22, 0xbd, 0x03, 0x0a, 0x08, 0x43, 0x61, 0x6c, 0x6c, 0x45, 0x78, 0x70, 0x72, 0x12, 0x1b,
0x0a, 0x09, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28,
0x09, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x49, 0x64, 0x12, 0x43, 0x0a, 0x07, 0x72,
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x67,
0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x67,
0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e,
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x07, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
0x12, 0x33, 0x0a, 0x07, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28,
0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x74, 0x69,
0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, 0x43, 0x0a, 0x05, 0x72, 0x65, 0x74, 0x72, 0x79, 0x18, 0x04,
0x20, 0x01, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65,
0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72,
0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x52, 0x65, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x6c,
0x69, 0x63, 0x79, 0x52, 0x05, 0x72, 0x65, 0x74, 0x72, 0x79, 0x12, 0x43, 0x0a, 0x06, 0x65, 0x72,
0x72, 0x6f, 0x72, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x67, 0x72, 0x70,
0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x67, 0x65, 0x6e,
0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x47, 0x52,
0x50, 0x43, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x06, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x12,
0x48, 0x0a, 0x06, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32,
0x30, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f,
0x6e, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x6c, 0x75, 0x67,
0x69, 0x6e, 0x2e, 0x47, 0x52, 0x50, 0x43, 0x43, 0x61, 0x6c, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f,
0x6e, 0x52, 0x06, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x46, 0x0a, 0x08, 0x6d, 0x65, 0x74,
0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x67, 0x72,
0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x67, 0x65,
0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x43,
0x45, 0x4c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74,
0x61, 0x22, 0x86, 0x02, 0x0a, 0x0b, 0x52, 0x65, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x6c, 0x69, 0x63,
0x79, 0x12, 0x53, 0x0a, 0x08, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x18, 0x01, 0x20,
0x01, 0x28, 0x0b, 0x32, 0x35, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72,
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x2e,
0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x52, 0x65, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x6c, 0x69,
0x63, 0x79, 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x08, 0x63, 0x6f,
0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x12, 0x5c, 0x0a, 0x0b, 0x65, 0x78, 0x70, 0x6f, 0x6e, 0x65,
0x6e, 0x74, 0x69, 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x38, 0x2e, 0x67, 0x72,
0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x67, 0x65,
0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x52,
0x65, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x45, 0x78, 0x70, 0x6f, 0x6e, 0x65,
0x6e, 0x74, 0x69, 0x61, 0x6c, 0x48, 0x00, 0x52, 0x0b, 0x65, 0x78, 0x70, 0x6f, 0x6e, 0x65, 0x6e,
0x74, 0x69, 0x61, 0x6c, 0x12, 0x3a, 0x0a, 0x02, 0x69, 0x66, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b,
0x32, 0x2a, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69,
0x6f, 0x6e, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x6c, 0x75,
0x67, 0x69, 0x6e, 0x2e, 0x43, 0x45, 0x4c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x02, 0x69, 0x66,
0x42, 0x08, 0x0a, 0x06, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x22, 0x6d, 0x0a, 0x13, 0x52, 0x65,
0x74, 0x72, 0x79, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x61, 0x6e,
0x74, 0x12, 0x35, 0x0a, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x01, 0x20,
0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f,
0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x08,
0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x12, 0x1f, 0x0a, 0x0b, 0x6d, 0x61, 0x78, 0x5f,
0x72, 0x65, 0x74, 0x72, 0x69, 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0a, 0x6d,
0x61, 0x78, 0x52, 0x65, 0x74, 0x72, 0x69, 0x65, 0x73, 0x22, 0xd5, 0x02, 0x0a, 0x16, 0x52, 0x65,
0x74, 0x72, 0x79, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x45, 0x78, 0x70, 0x6f, 0x6e, 0x65, 0x6e,
0x74, 0x69, 0x61, 0x6c, 0x12, 0x44, 0x0a, 0x10, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x5f,
0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19,
0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66,
0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0f, 0x69, 0x6e, 0x69, 0x74, 0x69,
0x61, 0x6c, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x12, 0x31, 0x0a, 0x14, 0x72, 0x61,
0x6e, 0x64, 0x6f, 0x6d, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x66, 0x61, 0x63, 0x74,
0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x01, 0x52, 0x13, 0x72, 0x61, 0x6e, 0x64, 0x6f, 0x6d,
0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x46, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x12, 0x1e, 0x0a,
0x0a, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x69, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28,
0x01, 0x52, 0x0a, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x69, 0x65, 0x72, 0x12, 0x3c, 0x0a,
0x0c, 0x6d, 0x61, 0x78, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x04, 0x20,
0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f,
0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0b,
0x6d, 0x61, 0x78, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x12, 0x1f, 0x0a, 0x0b, 0x6d,
0x61, 0x78, 0x5f, 0x72, 0x65, 0x74, 0x72, 0x69, 0x65, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04,
0x52, 0x0a, 0x6d, 0x61, 0x78, 0x52, 0x65, 0x74, 0x72, 0x69, 0x65, 0x73, 0x12, 0x43, 0x0a, 0x10,
0x6d, 0x61, 0x78, 0x5f, 0x65, 0x6c, 0x61, 0x70, 0x73, 0x65, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65,
0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f,
0x6e, 0x52, 0x0e, 0x6d, 0x61, 0x78, 0x45, 0x6c, 0x61, 0x70, 0x73, 0x65, 0x64, 0x54, 0x69, 0x6d,
0x65, 0x22, 0x62, 0x0a, 0x07, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3e, 0x0a, 0x04,
0x61, 0x72, 0x67, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x67, 0x72, 0x70,
0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x67, 0x65, 0x6e,
0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x41, 0x72,
0x67, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x04, 0x61, 0x72, 0x67, 0x73, 0x12, 0x17, 0x0a, 0x07,
0x74, 0x79, 0x70, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x74,
0x79, 0x70, 0x65, 0x49, 0x64, 0x22, 0x6c, 0x0a, 0x0b, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65,
0x45, 0x78, 0x70, 0x72, 0x12, 0x1d, 0x0a, 0x0a, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f,
0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67,
0x65, 0x49, 0x64, 0x12, 0x3e, 0x0a, 0x04, 0x61, 0x72, 0x67, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28,
0x0b, 0x32, 0x2a, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74,
0x69, 0x6f, 0x6e, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x6c,
0x75, 0x67, 0x69, 0x6e, 0x2e, 0x41, 0x72, 0x67, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x04, 0x61,
0x72, 0x67, 0x73, 0x22, 0x5f, 0x0a, 0x08, 0x45, 0x6e, 0x75, 0x6d, 0x45, 0x78, 0x70, 0x72, 0x12,
0x17, 0x0a, 0x07, 0x65, 0x6e, 0x75, 0x6d, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
0x52, 0x06, 0x65, 0x6e, 0x75, 0x6d, 0x49, 0x64, 0x12, 0x3a, 0x0a, 0x02, 0x62, 0x79, 0x18, 0x02,
0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65,
0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72,
0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x43, 0x45, 0x4c, 0x56, 0x61, 0x6c, 0x75, 0x65,
0x52, 0x02, 0x62, 0x79, 0x22, 0xd5, 0x01, 0x0a, 0x08, 0x41, 0x72, 0x67, 0x75, 0x6d, 0x65, 0x6e,
0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x3a, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20,
0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72,
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x2e,
0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70,
0x65, 0x12, 0x3d, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b,
0x32, 0x27, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69,
0x6f, 0x6e, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x6c, 0x75,
0x67, 0x69, 0x6e, 0x2e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65,
0x12, 0x3a, 0x0a, 0x02, 0x69, 0x66, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x67,
0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x67,
0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e,
0x43, 0x45, 0x4c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x02, 0x69, 0x66, 0x22, 0x5d, 0x0a, 0x05,
0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x69, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x18,
0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x69, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x12, 0x3c, 0x0a,
0x03, 0x63, 0x65, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x67, 0x72, 0x70,
0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x67, 0x65, 0x6e,
0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x43, 0x45,
0x4c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x03, 0x63, 0x65, 0x6c, 0x22, 0xd7, 0x01, 0x0a, 0x0a,
0x53, 0x77, 0x69, 0x74, 0x63, 0x68, 0x45, 0x78, 0x70, 0x72, 0x12, 0x3a, 0x0a, 0x04, 0x74, 0x79,
0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e,
0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72,
0x61, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x54, 0x79, 0x70, 0x65,
0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x42, 0x0a, 0x05, 0x63, 0x61, 0x73, 0x65, 0x73, 0x18,
0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64,
0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f,
0x72, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x53, 0x77, 0x69, 0x74, 0x63, 0x68, 0x43,
0x61, 0x73, 0x65, 0x52, 0x05, 0x63, 0x61, 0x73, 0x65, 0x73, 0x12, 0x49, 0x0a, 0x07, 0x64, 0x65,
0x66, 0x61, 0x75, 0x6c, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x67, 0x72,
0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x67, 0x65,
0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x53,
0x77, 0x69, 0x74, 0x63, 0x68, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x52, 0x07, 0x64, 0x65,
0x66, 0x61, 0x75, 0x6c, 0x74, 0x22, 0xd6, 0x01, 0x0a, 0x0a, 0x53, 0x77, 0x69, 0x74, 0x63, 0x68,
0x43, 0x61, 0x73, 0x65, 0x12, 0x3a, 0x0a, 0x02, 0x69, 0x66, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b,
0x32, 0x2a, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69,
0x6f, 0x6e, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x6c, 0x75,
0x67, 0x69, 0x6e, 0x2e, 0x43, 0x45, 0x4c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x02, 0x69, 0x66,
0x12, 0x3a, 0x0a, 0x02, 0x62, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x67,
0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x67,
0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e,
0x43, 0x45, 0x4c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x02, 0x62, 0x79, 0x12, 0x50, 0x0a, 0x07,
0x64, 0x65, 0x66, 0x5f, 0x73, 0x65, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x37, 0x2e,
0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e,
0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e,
0x2e, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74,
0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, 0x06, 0x64, 0x65, 0x66, 0x53, 0x65, 0x74, 0x22, 0x9d,
0x01, 0x0a, 0x0d, 0x53, 0x77, 0x69, 0x74, 0x63, 0x68, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74,
0x12, 0x3a, 0x0a, 0x02, 0x62, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x67,
0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x67,
0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e,
0x43, 0x45, 0x4c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x02, 0x62, 0x79, 0x12, 0x50, 0x0a, 0x07,
0x64, 0x65, 0x66, 0x5f, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x37, 0x2e,
0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e,
0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e,
0x2e, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74,
0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, 0x06, 0x64, 0x65, 0x66, 0x53, 0x65, 0x74, 0x22, 0x67,
0x0a, 0x0e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x78, 0x70, 0x72,
0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04,
0x6e, 0x61, 0x6d, 0x65, 0x12, 0x41, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x02, 0x20,
0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72,
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x2e,
0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x47, 0x52, 0x50, 0x43, 0x45, 0x72, 0x72, 0x6f, 0x72,
0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x22, 0xf1, 0x03, 0x0a, 0x09, 0x47, 0x52, 0x50, 0x43,
0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x50, 0x0a, 0x07, 0x64, 0x65, 0x66, 0x5f, 0x73, 0x65, 0x74,
0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x37, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65,
0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74,
0x6f, 0x72, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62,
0x6c, 0x65, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52,
0x06, 0x64, 0x65, 0x66, 0x53, 0x65, 0x74, 0x12, 0x3a, 0x0a, 0x02, 0x69, 0x66, 0x18, 0x02, 0x20,
0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72,
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x2e,
0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x43, 0x45, 0x4c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52,
0x02, 0x69, 0x66, 0x12, 0x29, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28,
0x0e, 0x32, 0x10, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x43,
0x6f, 0x64, 0x65, 0x48, 0x00, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x88, 0x01, 0x01, 0x12, 0x44,
0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32,
0x2a, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f,
0x6e, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x6c, 0x75, 0x67,
0x69, 0x6e, 0x2e, 0x43, 0x45, 0x4c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x07, 0x6d, 0x65, 0x73,
0x73, 0x61, 0x67, 0x65, 0x12, 0x4b, 0x0a, 0x07, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x18,
0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64,
0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f,
0x72, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x47, 0x52, 0x50, 0x43, 0x45, 0x72, 0x72,
0x6f, 0x72, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x52, 0x07, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c,
0x73, 0x12, 0x16, 0x0a, 0x06, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28,
0x08, 0x52, 0x06, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x12, 0x5a, 0x0a, 0x13, 0x69, 0x67, 0x6e,
0x6f, 0x72, 0x65, 0x5f, 0x61, 0x6e, 0x64, 0x5f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65,
0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74,
0x6f, 0x72, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x43, 0x45, 0x4c, 0x56, 0x61, 0x6c,
0x75, 0x65, 0x52, 0x11, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x41, 0x6e, 0x64, 0x52, 0x65, 0x73,
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x6c, 0x6f, 0x67, 0x5f, 0x6c, 0x65, 0x76,
0x65, 0x6c, 0x18, 0x08, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x6c, 0x6f, 0x67, 0x4c, 0x65, 0x76,
0x65, 0x6c, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x22, 0xd0, 0x04, 0x0a, 0x0f,
0x47, 0x52, 0x50, 0x43, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x12,
0x50, 0x0a, 0x07, 0x64, 0x65, 0x66, 0x5f, 0x73, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b,
0x32, 0x37, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69,
0x6f, 0x6e, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x6c, 0x75,
0x67, 0x69, 0x6e, 0x2e, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x44, 0x65, 0x66, 0x69,
0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, 0x06, 0x64, 0x65, 0x66, 0x53, 0x65,
0x74, 0x12, 0x3a, 0x0a, 0x02, 0x69, 0x66, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e,
0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e,
0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e,
0x2e, 0x43, 0x45, 0x4c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x02, 0x69, 0x66, 0x12, 0x53, 0x0a,
0x08, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32,
0x37, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f,
0x6e, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x6c, 0x75, 0x67,
0x69, 0x6e, 0x2e, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x44, 0x65, 0x66, 0x69, 0x6e,
0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, 0x08, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67,
0x65, 0x73, 0x12, 0x6a, 0x0a, 0x15, 0x70, 0x72, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69,
0x6f, 0x6e, 0x5f, 0x66, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28,
0x0b, 0x32, 0x35, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74,
0x69, 0x6f, 0x6e, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x6c,
0x75, 0x67, 0x69, 0x6e, 0x2e, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f,
0x6e, 0x46, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x52, 0x14, 0x70, 0x72, 0x65, 0x63, 0x6f, 0x6e,
0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x46, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x73, 0x12, 0x4f,
0x0a, 0x0c, 0x62, 0x61, 0x64, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x18, 0x05,
0x20, 0x03, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65,
0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72,
0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x42, 0x61, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65,
0x73, 0x74, 0x52, 0x0b, 0x62, 0x61, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x12,
0x61, 0x0a, 0x12, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x5f, 0x6d, 0x65, 0x73,
0x73, 0x61, 0x67, 0x65, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x67, 0x72,
0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x67, 0x65,
0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x4c,
0x6f, 0x63, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52,
0x11, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67,
0x65, 0x73, 0x12, 0x3a, 0x0a, 0x02, 0x62, 0x79, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2a,
0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e,
0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69,
0x6e, 0x2e, 0x43, 0x45, 0x4c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x02, 0x62, 0x79, 0x22, 0x75,
0x0a, 0x13, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x46, 0x61,
0x69, 0x6c, 0x75, 0x72, 0x65, 0x12, 0x5e, 0x0a, 0x0a, 0x76, 0x69, 0x6f, 0x6c, 0x61, 0x74, 0x69,
0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3e, 0x2e, 0x67, 0x72, 0x70, 0x63,
0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x67, 0x65, 0x6e, 0x65,
0x72, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x50, 0x72, 0x65,
0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x46, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65,
0x56, 0x69, 0x6f, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x76, 0x69, 0x6f, 0x6c, 0x61,
0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0xf2, 0x01, 0x0a, 0x1c, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6e,
0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x46, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x56, 0x69, 0x6f,
0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x3e, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01,
0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65,
0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72,
0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x43, 0x45, 0x4c, 0x56, 0x61, 0x6c, 0x75, 0x65,
0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x44, 0x0a, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63,
0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66,
0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61,
0x74, 0x6f, 0x72, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x43, 0x45, 0x4c, 0x56, 0x61,
0x6c, 0x75, 0x65, 0x52, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x4c, 0x0a, 0x0b,
0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28,
0x0b, 0x32, 0x2a, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74,
0x69, 0x6f, 0x6e, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x6c,
0x75, 0x67, 0x69, 0x6e, 0x2e, 0x43, 0x45, 0x4c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0b, 0x64,
0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x73, 0x0a, 0x0a, 0x42, 0x61,
0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x65, 0x0a, 0x10, 0x66, 0x69, 0x65, 0x6c,
0x64, 0x5f, 0x76, 0x69, 0x6f, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03,
0x28, 0x0b, 0x32, 0x3a, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61,
0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x70,
0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x42, 0x61, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
0x46, 0x69, 0x65, 0x6c, 0x64, 0x56, 0x69, 0x6f, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0f,
0x66, 0x69, 0x65, 0x6c, 0x64, 0x56, 0x69, 0x6f, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22,
0xaa, 0x01, 0x0a, 0x18, 0x42, 0x61, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x46, 0x69,
0x65, 0x6c, 0x64, 0x56, 0x69, 0x6f, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x40, 0x0a, 0x05,
0x66, 0x69, 0x65, 0x6c, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x67, 0x72,
0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x67, 0x65,
0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x43,
0x45, 0x4c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x4c,
0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20,
0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72,
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x2e,
0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x43, 0x45, 0x4c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52,
0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x70, 0x0a, 0x10,
0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65,
0x12, 0x16, 0x0a, 0x06, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
0x52, 0x06, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x65, 0x12, 0x44, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73,
0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x67, 0x72, 0x70, 0x63,
0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x67, 0x65, 0x6e, 0x65,
0x72, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x43, 0x45, 0x4c,
0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0xd7,
0x03, 0x0a, 0x0e, 0x47, 0x52, 0x50, 0x43, 0x43, 0x61, 0x6c, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f,
0x6e, 0x12, 0x2c, 0x0a, 0x0f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x5f, 0x73, 0x75, 0x62,
0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0e, 0x63, 0x6f,
0x6e, 0x74, 0x65, 0x6e, 0x74, 0x53, 0x75, 0x62, 0x74, 0x79, 0x70, 0x65, 0x88, 0x01, 0x01, 0x12,
0x20, 0x0a, 0x09, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01,
0x28, 0x09, 0x48, 0x01, 0x52, 0x08, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x49, 0x64, 0x88, 0x01,
0x01, 0x12, 0x37, 0x0a, 0x16, 0x6d, 0x61, 0x78, 0x5f, 0x63, 0x61, 0x6c, 0x6c, 0x5f, 0x72, 0x65,
0x63, 0x76, 0x5f, 0x6d, 0x73, 0x67, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28,
0x03, 0x48, 0x02, 0x52, 0x12, 0x6d, 0x61, 0x78, 0x43, 0x61, 0x6c, 0x6c, 0x52, 0x65, 0x63, 0x76,
0x4d, 0x73, 0x67, 0x53, 0x69, 0x7a, 0x65, 0x88, 0x01, 0x01, 0x12, 0x37, 0x0a, 0x16, 0x6d, 0x61,
0x78, 0x5f, 0x63, 0x61, 0x6c, 0x6c, 0x5f, 0x73, 0x65, 0x6e, 0x64, 0x5f, 0x6d, 0x73, 0x67, 0x5f,
0x73, 0x69, 0x7a, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x48, 0x03, 0x52, 0x12, 0x6d, 0x61,
0x78, 0x43, 0x61, 0x6c, 0x6c, 0x53, 0x65, 0x6e, 0x64, 0x4d, 0x73, 0x67, 0x53, 0x69, 0x7a, 0x65,
0x88, 0x01, 0x01, 0x12, 0x28, 0x0a, 0x0d, 0x73, 0x74, 0x61, 0x74, 0x69, 0x63, 0x5f, 0x6d, 0x65,
0x74, 0x68, 0x6f, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x48, 0x04, 0x52, 0x0c, 0x73, 0x74,
0x61, 0x74, 0x69, 0x63, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x88, 0x01, 0x01, 0x12, 0x22, 0x0a,
0x0a, 0x74, 0x72, 0x61, 0x69, 0x6c, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28,
0x09, 0x48, 0x05, 0x52, 0x09, 0x74, 0x72, 0x61, 0x69, 0x6c, 0x65, 0x72, 0x49, 0x64, 0x88, 0x01,
0x01, 0x12, 0x29, 0x0a, 0x0e, 0x77, 0x61, 0x69, 0x74, 0x5f, 0x66, 0x6f, 0x72, 0x5f, 0x72, 0x65,
0x61, 0x64, 0x79, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x48, 0x06, 0x52, 0x0c, 0x77, 0x61, 0x69,
0x74, 0x46, 0x6f, 0x72, 0x52, 0x65, 0x61, 0x64, 0x79, 0x88, 0x01, 0x01, 0x42, 0x12, 0x0a, 0x10,
0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x5f, 0x73, 0x75, 0x62, 0x74, 0x79, 0x70, 0x65,
0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x42, 0x19,
0x0a, 0x17, 0x5f, 0x6d, 0x61, 0x78, 0x5f, 0x63, 0x61, 0x6c, 0x6c, 0x5f, 0x72, 0x65, 0x63, 0x76,
0x5f, 0x6d, 0x73, 0x67, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x42, 0x19, 0x0a, 0x17, 0x5f, 0x6d, 0x61,
0x78, 0x5f, 0x63, 0x61, 0x6c, 0x6c, 0x5f, 0x73, 0x65, 0x6e, 0x64, 0x5f, 0x6d, 0x73, 0x67, 0x5f,
0x73, 0x69, 0x7a, 0x65, 0x42, 0x10, 0x0a, 0x0e, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x69, 0x63, 0x5f,
0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x74, 0x72, 0x61, 0x69, 0x6c,
0x65, 0x72, 0x5f, 0x69, 0x64, 0x42, 0x11, 0x0a, 0x0f, 0x5f, 0x77, 0x61, 0x69, 0x74, 0x5f, 0x66,
0x6f, 0x72, 0x5f, 0x72, 0x65, 0x61, 0x64, 0x79, 0x22, 0x67, 0x0a, 0x05, 0x4f, 0x6e, 0x65, 0x6f,
0x66, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69,
0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52,
0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65,
0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6d, 0x65, 0x73, 0x73, 0x61,
0x67, 0x65, 0x49, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x69, 0x64,
0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x49, 0x64,
0x73, 0x22, 0xbf, 0x01, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64,
0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61,
0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1b,
0x0a, 0x09, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28,
0x09, 0x52, 0x08, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x49, 0x64, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x6d,
0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52,
0x09, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x49, 0x64, 0x12, 0x17, 0x0a, 0x07, 0x66, 0x69,
0x6c, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x66, 0x69, 0x6c,
0x65, 0x49, 0x64, 0x12, 0x3e, 0x0a, 0x04, 0x72, 0x75, 0x6c, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28,
0x0b, 0x32, 0x2a, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74,
0x69, 0x6f, 0x6e, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x6c,
0x75, 0x67, 0x69, 0x6e, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x52, 0x75, 0x6c, 0x65, 0x52, 0x04, 0x72,
0x75, 0x6c, 0x65, 0x22, 0x8f, 0x01, 0x0a, 0x09, 0x45, 0x6e, 0x75, 0x6d, 0x56, 0x61, 0x6c, 0x75,
0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69,
0x64, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09,
0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x17, 0x0a, 0x07, 0x65, 0x6e, 0x75, 0x6d, 0x5f,
0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x65, 0x6e, 0x75, 0x6d, 0x49, 0x64,
0x12, 0x43, 0x0a, 0x04, 0x72, 0x75, 0x6c, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2f,
0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e,
0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69,
0x6e, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x75, 0x6c, 0x65, 0x52,
0x04, 0x72, 0x75, 0x6c, 0x65, 0x22, 0x27, 0x0a, 0x08, 0x45, 0x6e, 0x75, 0x6d, 0x52, 0x75, 0x6c,
0x65, 0x12, 0x1b, 0x0a, 0x09, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x01,
0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x49, 0x64, 0x73, 0x22, 0xdb,
0x01, 0x0a, 0x0d, 0x45, 0x6e, 0x75, 0x6d, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x75, 0x6c, 0x65,
0x12, 0x18, 0x0a, 0x07, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28,
0x08, 0x52, 0x07, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x12, 0x4a, 0x0a, 0x07, 0x61, 0x6c,
0x69, 0x61, 0x73, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x67, 0x72,
0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x67, 0x65,
0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x45,
0x6e, 0x75, 0x6d, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x52, 0x07, 0x61,
0x6c, 0x69, 0x61, 0x73, 0x65, 0x73, 0x12, 0x4a, 0x0a, 0x05, 0x61, 0x74, 0x74, 0x72, 0x73, 0x18,
0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64,
0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f,
0x72, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x56, 0x61, 0x6c,
0x75, 0x65, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x52, 0x05, 0x61, 0x74, 0x74,
0x72, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x6e, 0x6f, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x18, 0x04, 0x20,
0x01, 0x28, 0x08, 0x52, 0x07, 0x6e, 0x6f, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x22, 0x51, 0x0a, 0x0e,
0x45, 0x6e, 0x75, 0x6d, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x12, 0x22,
0x0a, 0x0d, 0x65, 0x6e, 0x75, 0x6d, 0x5f, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x5f, 0x69, 0x64, 0x18,
0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x65, 0x6e, 0x75, 0x6d, 0x41, 0x6c, 0x69, 0x61, 0x73,
0x49, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x5f, 0x69, 0x64, 0x73, 0x18,
0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x49, 0x64, 0x73, 0x22,
0x3e, 0x0a, 0x12, 0x45, 0x6e, 0x75, 0x6d, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x41, 0x74, 0x74, 0x72,
0x69, 0x62, 0x75, 0x74, 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, 0x76, 0x61, 0x6c,
0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22,
0x9e, 0x01, 0x0a, 0x09, 0x43, 0x45, 0x4c, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x12, 0x0e, 0x0a,
0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a,
0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d,
0x65, 0x12, 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, 0x4b, 0x0a, 0x09, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73,
0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65,
0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74,
0x6f, 0x72, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x43, 0x45, 0x4c, 0x46, 0x75, 0x6e,
0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x09, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73,
0x22, 0xce, 0x01, 0x0a, 0x0b, 0x43, 0x45, 0x4c, 0x46, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e,
0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04,
0x6e, 0x61, 0x6d, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09,
0x52, 0x02, 0x69, 0x64, 0x12, 0x3a, 0x0a, 0x04, 0x61, 0x72, 0x67, 0x73, 0x18, 0x03, 0x20, 0x03,
0x28, 0x0b, 0x32, 0x26, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61,
0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x70,
0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x61, 0x72, 0x67, 0x73,
0x12, 0x3e, 0x0a, 0x06, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b,
0x32, 0x26, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69,
0x6f, 0x6e, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x6c, 0x75,
0x67, 0x69, 0x6e, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x06, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e,
0x12, 0x1f, 0x0a, 0x0b, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18,
0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x72, 0x49,
0x64, 0x2a, 0x6b, 0x0a, 0x0a, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12,
0x13, 0x0a, 0x0f, 0x47, 0x45, 0x4e, 0x45, 0x52, 0x41, 0x54, 0x45, 0x5f, 0x41, 0x43, 0x54, 0x49,
0x4f, 0x4e, 0x10, 0x00, 0x12, 0x0f, 0x0a, 0x0b, 0x4b, 0x45, 0x45, 0x50, 0x5f, 0x41, 0x43, 0x54,
0x49, 0x4f, 0x4e, 0x10, 0x01, 0x12, 0x11, 0x0a, 0x0d, 0x43, 0x52, 0x45, 0x41, 0x54, 0x45, 0x5f,
0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x02, 0x12, 0x11, 0x0a, 0x0d, 0x44, 0x45, 0x4c, 0x45,
0x54, 0x45, 0x5f, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x03, 0x12, 0x11, 0x0a, 0x0d, 0x55,
0x50, 0x44, 0x41, 0x54, 0x45, 0x5f, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x04, 0x2a, 0xb1,
0x01, 0x0a, 0x12, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x46, 0x69, 0x6c, 0x65, 0x50, 0x61, 0x74,
0x68, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x25, 0x0a, 0x21, 0x4f, 0x55, 0x54, 0x50, 0x55, 0x54, 0x5f,
0x46, 0x49, 0x4c, 0x45, 0x5f, 0x50, 0x41, 0x54, 0x48, 0x5f, 0x4d, 0x4f, 0x44, 0x45, 0x5f, 0x55,
0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x20, 0x0a, 0x1c,
0x4f, 0x55, 0x54, 0x50, 0x55, 0x54, 0x5f, 0x46, 0x49, 0x4c, 0x45, 0x5f, 0x50, 0x41, 0x54, 0x48,
0x5f, 0x4d, 0x4f, 0x44, 0x45, 0x5f, 0x49, 0x4d, 0x50, 0x4f, 0x52, 0x54, 0x10, 0x01, 0x12, 0x27,
0x0a, 0x23, 0x4f, 0x55, 0x54, 0x50, 0x55, 0x54, 0x5f, 0x46, 0x49, 0x4c, 0x45, 0x5f, 0x50, 0x41,
0x54, 0x48, 0x5f, 0x4d, 0x4f, 0x44, 0x45, 0x5f, 0x4d, 0x4f, 0x44, 0x55, 0x4c, 0x45, 0x5f, 0x50,
0x52, 0x45, 0x46, 0x49, 0x58, 0x10, 0x02, 0x12, 0x29, 0x0a, 0x25, 0x4f, 0x55, 0x54, 0x50, 0x55,
0x54, 0x5f, 0x46, 0x49, 0x4c, 0x45, 0x5f, 0x50, 0x41, 0x54, 0x48, 0x5f, 0x4d, 0x4f, 0x44, 0x45,
0x5f, 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45, 0x5f, 0x52, 0x45, 0x4c, 0x41, 0x54, 0x49, 0x56, 0x45,
0x10, 0x03, 0x2a, 0xcc, 0x02, 0x0a, 0x08, 0x54, 0x79, 0x70, 0x65, 0x4b, 0x69, 0x6e, 0x64, 0x12,
0x10, 0x0a, 0x0c, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x10,
0x00, 0x12, 0x0f, 0x0a, 0x0b, 0x44, 0x4f, 0x55, 0x42, 0x4c, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45,
0x10, 0x01, 0x12, 0x0e, 0x0a, 0x0a, 0x46, 0x4c, 0x4f, 0x41, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45,
0x10, 0x02, 0x12, 0x0e, 0x0a, 0x0a, 0x49, 0x4e, 0x54, 0x36, 0x34, 0x5f, 0x54, 0x59, 0x50, 0x45,
0x10, 0x03, 0x12, 0x0f, 0x0a, 0x0b, 0x55, 0x49, 0x4e, 0x54, 0x36, 0x34, 0x5f, 0x54, 0x59, 0x50,
0x45, 0x10, 0x04, 0x12, 0x0e, 0x0a, 0x0a, 0x49, 0x4e, 0x54, 0x33, 0x32, 0x5f, 0x54, 0x59, 0x50,
0x45, 0x10, 0x05, 0x12, 0x10, 0x0a, 0x0c, 0x46, 0x49, 0x58, 0x45, 0x44, 0x36, 0x34, 0x5f, 0x54,
0x59, 0x50, 0x45, 0x10, 0x06, 0x12, 0x10, 0x0a, 0x0c, 0x46, 0x49, 0x58, 0x45, 0x44, 0x33, 0x32,
0x5f, 0x54, 0x59, 0x50, 0x45, 0x10, 0x07, 0x12, 0x0d, 0x0a, 0x09, 0x42, 0x4f, 0x4f, 0x4c, 0x5f,
0x54, 0x59, 0x50, 0x45, 0x10, 0x08, 0x12, 0x0f, 0x0a, 0x0b, 0x53, 0x54, 0x52, 0x49, 0x4e, 0x47,
0x5f, 0x54, 0x59, 0x50, 0x45, 0x10, 0x09, 0x12, 0x0e, 0x0a, 0x0a, 0x47, 0x52, 0x4f, 0x55, 0x50,
0x5f, 0x54, 0x59, 0x50, 0x45, 0x10, 0x0a, 0x12, 0x10, 0x0a, 0x0c, 0x4d, 0x45, 0x53, 0x53, 0x41,
0x47, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x10, 0x0b, 0x12, 0x0e, 0x0a, 0x0a, 0x42, 0x59, 0x54,
0x45, 0x53, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x10, 0x0c, 0x12, 0x0f, 0x0a, 0x0b, 0x55, 0x49, 0x4e,
0x54, 0x33, 0x32, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x10, 0x0d, 0x12, 0x0d, 0x0a, 0x09, 0x45, 0x4e,
0x55, 0x4d, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x10, 0x0e, 0x12, 0x11, 0x0a, 0x0d, 0x53, 0x46, 0x49,
0x58, 0x45, 0x44, 0x33, 0x32, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x10, 0x0f, 0x12, 0x11, 0x0a, 0x0d,
0x53, 0x46, 0x49, 0x58, 0x45, 0x44, 0x36, 0x34, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x10, 0x10, 0x12,
0x0f, 0x0a, 0x0b, 0x53, 0x49, 0x4e, 0x54, 0x33, 0x32, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x10, 0x11,
0x12, 0x0f, 0x0a, 0x0b, 0x53, 0x49, 0x4e, 0x54, 0x36, 0x34, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x10,
0x12, 0x42, 0xa8, 0x02, 0x0a, 0x24, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66,
0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61,
0x74, 0x6f, 0x72, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x42, 0x0e, 0x47, 0x65, 0x6e, 0x65,
0x72, 0x61, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x4a, 0x67, 0x69,
0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6d, 0x65, 0x72, 0x63, 0x61, 0x72, 0x69,
0x2f, 0x67, 0x72, 0x70, 0x63, 0x2d, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e,
0x2f, 0x67, 0x72, 0x70, 0x63, 0x2f, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e,
0x2f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x2f, 0x70, 0x6c, 0x75, 0x67, 0x69,
0x6e, 0x3b, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0xa2, 0x02, 0x04, 0x47, 0x46, 0x47, 0x50, 0xaa,
0x02, 0x20, 0x47, 0x72, 0x70, 0x63, 0x2e, 0x46, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f,
0x6e, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x50, 0x6c, 0x75, 0x67,
0x69, 0x6e, 0xca, 0x02, 0x21, 0x47, 0x72, 0x70, 0x63, 0x5c, 0x46, 0x65, 0x64, 0x65, 0x72, 0x61,
0x74, 0x69, 0x6f, 0x6e, 0x5c, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x5c,
0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0xe2, 0x02, 0x2d, 0x47, 0x72, 0x70, 0x63, 0x5c, 0x46, 0x65,
0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5c, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74,
0x6f, 0x72, 0x5f, 0x5c, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65,
0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x23, 0x47, 0x72, 0x70, 0x63, 0x3a, 0x3a, 0x46,
0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x3a, 0x47, 0x65, 0x6e, 0x65, 0x72,
0x61, 0x74, 0x6f, 0x72, 0x3a, 0x3a, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x62, 0x06, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x33,
}
var (
file_grpc_federation_generator_proto_rawDescOnce sync.Once
file_grpc_federation_generator_proto_rawDescData = file_grpc_federation_generator_proto_rawDesc
)
func file_grpc_federation_generator_proto_rawDescGZIP() []byte {
file_grpc_federation_generator_proto_rawDescOnce.Do(func() {
file_grpc_federation_generator_proto_rawDescData = protoimpl.X.CompressGZIP(file_grpc_federation_generator_proto_rawDescData)
})
return file_grpc_federation_generator_proto_rawDescData
}
var file_grpc_federation_generator_proto_enumTypes = make([]protoimpl.EnumInfo, 5)
var file_grpc_federation_generator_proto_msgTypes = make([]protoimpl.MessageInfo, 82)
var file_grpc_federation_generator_proto_goTypes = []interface{}{
(ActionType)(0), // 0: grpc.federation.generator.plugin.ActionType
(OutputFilePathMode)(0), // 1: grpc.federation.generator.plugin.OutputFilePathMode
(TypeKind)(0), // 2: grpc.federation.generator.plugin.TypeKind
(ProtoCodeGeneratorResponse_Feature)(0), // 3: grpc.federation.generator.plugin.ProtoCodeGeneratorResponse.Feature
(ProtoCodeGeneratorResponse_GeneratedCodeInfo_Annotation_Semantic)(0), // 4: grpc.federation.generator.plugin.ProtoCodeGeneratorResponse.GeneratedCodeInfo.Annotation.Semantic
(*ProtoCodeGeneratorResponse)(nil), // 5: grpc.federation.generator.plugin.ProtoCodeGeneratorResponse
(*CodeGeneratorRequest)(nil), // 6: grpc.federation.generator.plugin.CodeGeneratorRequest
(*OutputFilePathConfig)(nil), // 7: grpc.federation.generator.plugin.OutputFilePathConfig
(*Reference)(nil), // 8: grpc.federation.generator.plugin.Reference
(*File)(nil), // 9: grpc.federation.generator.plugin.File
(*Package)(nil), // 10: grpc.federation.generator.plugin.Package
(*GoPackage)(nil), // 11: grpc.federation.generator.plugin.GoPackage
(*Service)(nil), // 12: grpc.federation.generator.plugin.Service
(*ServiceRule)(nil), // 13: grpc.federation.generator.plugin.ServiceRule
(*Env)(nil), // 14: grpc.federation.generator.plugin.Env
(*EnvVar)(nil), // 15: grpc.federation.generator.plugin.EnvVar
(*EnvVarOption)(nil), // 16: grpc.federation.generator.plugin.EnvVarOption
(*ServiceVariable)(nil), // 17: grpc.federation.generator.plugin.ServiceVariable
(*ServiceVariableExpr)(nil), // 18: grpc.federation.generator.plugin.ServiceVariableExpr
(*ServiceVariableValidationExpr)(nil), // 19: grpc.federation.generator.plugin.ServiceVariableValidationExpr
(*Method)(nil), // 20: grpc.federation.generator.plugin.Method
(*MethodRule)(nil), // 21: grpc.federation.generator.plugin.MethodRule
(*Message)(nil), // 22: grpc.federation.generator.plugin.Message
(*MessageRule)(nil), // 23: grpc.federation.generator.plugin.MessageRule
(*VariableDefinitionSet)(nil), // 24: grpc.federation.generator.plugin.VariableDefinitionSet
(*VariableDefinition)(nil), // 25: grpc.federation.generator.plugin.VariableDefinition
(*Field)(nil), // 26: grpc.federation.generator.plugin.Field
(*FieldRule)(nil), // 27: grpc.federation.generator.plugin.FieldRule
(*AutoBindField)(nil), // 28: grpc.federation.generator.plugin.AutoBindField
(*FieldOneofRule)(nil), // 29: grpc.federation.generator.plugin.FieldOneofRule
(*VariableDefinitionGroup)(nil), // 30: grpc.federation.generator.plugin.VariableDefinitionGroup
(*SequentialVariableDefinitionGroup)(nil), // 31: grpc.federation.generator.plugin.SequentialVariableDefinitionGroup
(*ConcurrentVariableDefinitionGroup)(nil), // 32: grpc.federation.generator.plugin.ConcurrentVariableDefinitionGroup
(*MessageDependencyGraph)(nil), // 33: grpc.federation.generator.plugin.MessageDependencyGraph
(*MessageDependencyGraphNode)(nil), // 34: grpc.federation.generator.plugin.MessageDependencyGraphNode
(*VariableExpr)(nil), // 35: grpc.federation.generator.plugin.VariableExpr
(*Type)(nil), // 36: grpc.federation.generator.plugin.Type
(*CELValue)(nil), // 37: grpc.federation.generator.plugin.CELValue
(*MapExpr)(nil), // 38: grpc.federation.generator.plugin.MapExpr
(*Iterator)(nil), // 39: grpc.federation.generator.plugin.Iterator
(*MapIteratorExpr)(nil), // 40: grpc.federation.generator.plugin.MapIteratorExpr
(*CallExpr)(nil), // 41: grpc.federation.generator.plugin.CallExpr
(*RetryPolicy)(nil), // 42: grpc.federation.generator.plugin.RetryPolicy
(*RetryPolicyConstant)(nil), // 43: grpc.federation.generator.plugin.RetryPolicyConstant
(*RetryPolicyExponential)(nil), // 44: grpc.federation.generator.plugin.RetryPolicyExponential
(*Request)(nil), // 45: grpc.federation.generator.plugin.Request
(*MessageExpr)(nil), // 46: grpc.federation.generator.plugin.MessageExpr
(*EnumExpr)(nil), // 47: grpc.federation.generator.plugin.EnumExpr
(*Argument)(nil), // 48: grpc.federation.generator.plugin.Argument
(*Value)(nil), // 49: grpc.federation.generator.plugin.Value
(*SwitchExpr)(nil), // 50: grpc.federation.generator.plugin.SwitchExpr
(*SwitchCase)(nil), // 51: grpc.federation.generator.plugin.SwitchCase
(*SwitchDefault)(nil), // 52: grpc.federation.generator.plugin.SwitchDefault
(*ValidationExpr)(nil), // 53: grpc.federation.generator.plugin.ValidationExpr
(*GRPCError)(nil), // 54: grpc.federation.generator.plugin.GRPCError
(*GRPCErrorDetail)(nil), // 55: grpc.federation.generator.plugin.GRPCErrorDetail
(*PreconditionFailure)(nil), // 56: grpc.federation.generator.plugin.PreconditionFailure
(*PreconditionFailureViolation)(nil), // 57: grpc.federation.generator.plugin.PreconditionFailureViolation
(*BadRequest)(nil), // 58: grpc.federation.generator.plugin.BadRequest
(*BadRequestFieldViolation)(nil), // 59: grpc.federation.generator.plugin.BadRequestFieldViolation
(*LocalizedMessage)(nil), // 60: grpc.federation.generator.plugin.LocalizedMessage
(*GRPCCallOption)(nil), // 61: grpc.federation.generator.plugin.GRPCCallOption
(*Oneof)(nil), // 62: grpc.federation.generator.plugin.Oneof
(*Enum)(nil), // 63: grpc.federation.generator.plugin.Enum
(*EnumValue)(nil), // 64: grpc.federation.generator.plugin.EnumValue
(*EnumRule)(nil), // 65: grpc.federation.generator.plugin.EnumRule
(*EnumValueRule)(nil), // 66: grpc.federation.generator.plugin.EnumValueRule
(*EnumValueAlias)(nil), // 67: grpc.federation.generator.plugin.EnumValueAlias
(*EnumValueAttribute)(nil), // 68: grpc.federation.generator.plugin.EnumValueAttribute
(*CELPlugin)(nil), // 69: grpc.federation.generator.plugin.CELPlugin
(*CELFunction)(nil), // 70: grpc.federation.generator.plugin.CELFunction
(*ProtoCodeGeneratorResponse_GeneratedCodeInfo)(nil), // 71: grpc.federation.generator.plugin.ProtoCodeGeneratorResponse.GeneratedCodeInfo
(*ProtoCodeGeneratorResponse_File)(nil), // 72: grpc.federation.generator.plugin.ProtoCodeGeneratorResponse.File
(*ProtoCodeGeneratorResponse_GeneratedCodeInfo_Annotation)(nil), // 73: grpc.federation.generator.plugin.ProtoCodeGeneratorResponse.GeneratedCodeInfo.Annotation
nil, // 74: grpc.federation.generator.plugin.Reference.FileMapEntry
nil, // 75: grpc.federation.generator.plugin.Reference.ServiceMapEntry
nil, // 76: grpc.federation.generator.plugin.Reference.MethodMapEntry
nil, // 77: grpc.federation.generator.plugin.Reference.MessageMapEntry
nil, // 78: grpc.federation.generator.plugin.Reference.FieldMapEntry
nil, // 79: grpc.federation.generator.plugin.Reference.EnumMapEntry
nil, // 80: grpc.federation.generator.plugin.Reference.EnumValueMapEntry
nil, // 81: grpc.federation.generator.plugin.Reference.OneofMapEntry
nil, // 82: grpc.federation.generator.plugin.Reference.CelPluginMapEntry
nil, // 83: grpc.federation.generator.plugin.Reference.GraphMapEntry
nil, // 84: grpc.federation.generator.plugin.Reference.VariableDefinitionMapEntry
nil, // 85: grpc.federation.generator.plugin.Reference.VariableDefinitionGroupMapEntry
nil, // 86: grpc.federation.generator.plugin.Reference.GraphNodeMapEntry
(*durationpb.Duration)(nil), // 87: google.protobuf.Duration
(code.Code)(0), // 88: google.rpc.Code
}
var file_grpc_federation_generator_proto_depIdxs = []int32{
72, // 0: grpc.federation.generator.plugin.ProtoCodeGeneratorResponse.file:type_name -> grpc.federation.generator.plugin.ProtoCodeGeneratorResponse.File
0, // 1: grpc.federation.generator.plugin.CodeGeneratorRequest.type:type_name -> grpc.federation.generator.plugin.ActionType
72, // 2: grpc.federation.generator.plugin.CodeGeneratorRequest.files:type_name -> grpc.federation.generator.plugin.ProtoCodeGeneratorResponse.File
8, // 3: grpc.federation.generator.plugin.CodeGeneratorRequest.reference:type_name -> grpc.federation.generator.plugin.Reference
7, // 4: grpc.federation.generator.plugin.CodeGeneratorRequest.output_file_path_config:type_name -> grpc.federation.generator.plugin.OutputFilePathConfig
1, // 5: grpc.federation.generator.plugin.OutputFilePathConfig.mode:type_name -> grpc.federation.generator.plugin.OutputFilePathMode
74, // 6: grpc.federation.generator.plugin.Reference.file_map:type_name -> grpc.federation.generator.plugin.Reference.FileMapEntry
75, // 7: grpc.federation.generator.plugin.Reference.service_map:type_name -> grpc.federation.generator.plugin.Reference.ServiceMapEntry
76, // 8: grpc.federation.generator.plugin.Reference.method_map:type_name -> grpc.federation.generator.plugin.Reference.MethodMapEntry
77, // 9: grpc.federation.generator.plugin.Reference.message_map:type_name -> grpc.federation.generator.plugin.Reference.MessageMapEntry
78, // 10: grpc.federation.generator.plugin.Reference.field_map:type_name -> grpc.federation.generator.plugin.Reference.FieldMapEntry
79, // 11: grpc.federation.generator.plugin.Reference.enum_map:type_name -> grpc.federation.generator.plugin.Reference.EnumMapEntry
80, // 12: grpc.federation.generator.plugin.Reference.enum_value_map:type_name -> grpc.federation.generator.plugin.Reference.EnumValueMapEntry
81, // 13: grpc.federation.generator.plugin.Reference.oneof_map:type_name -> grpc.federation.generator.plugin.Reference.OneofMapEntry
82, // 14: grpc.federation.generator.plugin.Reference.cel_plugin_map:type_name -> grpc.federation.generator.plugin.Reference.CelPluginMapEntry
83, // 15: grpc.federation.generator.plugin.Reference.graph_map:type_name -> grpc.federation.generator.plugin.Reference.GraphMapEntry
84, // 16: grpc.federation.generator.plugin.Reference.variable_definition_map:type_name -> grpc.federation.generator.plugin.Reference.VariableDefinitionMapEntry
85, // 17: grpc.federation.generator.plugin.Reference.variable_definition_group_map:type_name -> grpc.federation.generator.plugin.Reference.VariableDefinitionGroupMapEntry
86, // 18: grpc.federation.generator.plugin.Reference.graph_node_map:type_name -> grpc.federation.generator.plugin.Reference.GraphNodeMapEntry
10, // 19: grpc.federation.generator.plugin.File.package:type_name -> grpc.federation.generator.plugin.Package
11, // 20: grpc.federation.generator.plugin.File.go_package:type_name -> grpc.federation.generator.plugin.GoPackage
13, // 21: grpc.federation.generator.plugin.Service.rule:type_name -> grpc.federation.generator.plugin.ServiceRule
14, // 22: grpc.federation.generator.plugin.ServiceRule.env:type_name -> grpc.federation.generator.plugin.Env
17, // 23: grpc.federation.generator.plugin.ServiceRule.vars:type_name -> grpc.federation.generator.plugin.ServiceVariable
15, // 24: grpc.federation.generator.plugin.Env.vars:type_name -> grpc.federation.generator.plugin.EnvVar
36, // 25: grpc.federation.generator.plugin.EnvVar.type:type_name -> grpc.federation.generator.plugin.Type
16, // 26: grpc.federation.generator.plugin.EnvVar.option:type_name -> grpc.federation.generator.plugin.EnvVarOption
37, // 27: grpc.federation.generator.plugin.ServiceVariable.if:type_name -> grpc.federation.generator.plugin.CELValue
18, // 28: grpc.federation.generator.plugin.ServiceVariable.expr:type_name -> grpc.federation.generator.plugin.ServiceVariableExpr
36, // 29: grpc.federation.generator.plugin.ServiceVariableExpr.type:type_name -> grpc.federation.generator.plugin.Type
37, // 30: grpc.federation.generator.plugin.ServiceVariableExpr.by:type_name -> grpc.federation.generator.plugin.CELValue
38, // 31: grpc.federation.generator.plugin.ServiceVariableExpr.map:type_name -> grpc.federation.generator.plugin.MapExpr
46, // 32: grpc.federation.generator.plugin.ServiceVariableExpr.message:type_name -> grpc.federation.generator.plugin.MessageExpr
19, // 33: grpc.federation.generator.plugin.ServiceVariableExpr.validation:type_name -> grpc.federation.generator.plugin.ServiceVariableValidationExpr
47, // 34: grpc.federation.generator.plugin.ServiceVariableExpr.enum:type_name -> grpc.federation.generator.plugin.EnumExpr
50, // 35: grpc.federation.generator.plugin.ServiceVariableExpr.switch:type_name -> grpc.federation.generator.plugin.SwitchExpr
37, // 36: grpc.federation.generator.plugin.ServiceVariableValidationExpr.if:type_name -> grpc.federation.generator.plugin.CELValue
37, // 37: grpc.federation.generator.plugin.ServiceVariableValidationExpr.message:type_name -> grpc.federation.generator.plugin.CELValue
21, // 38: grpc.federation.generator.plugin.Method.rule:type_name -> grpc.federation.generator.plugin.MethodRule
87, // 39: grpc.federation.generator.plugin.MethodRule.timeout:type_name -> google.protobuf.Duration
23, // 40: grpc.federation.generator.plugin.Message.rule:type_name -> grpc.federation.generator.plugin.MessageRule
24, // 41: grpc.federation.generator.plugin.MessageRule.def_set:type_name -> grpc.federation.generator.plugin.VariableDefinitionSet
37, // 42: grpc.federation.generator.plugin.VariableDefinition.if:type_name -> grpc.federation.generator.plugin.CELValue
35, // 43: grpc.federation.generator.plugin.VariableDefinition.expr:type_name -> grpc.federation.generator.plugin.VariableExpr
36, // 44: grpc.federation.generator.plugin.Field.type:type_name -> grpc.federation.generator.plugin.Type
27, // 45: grpc.federation.generator.plugin.Field.rule:type_name -> grpc.federation.generator.plugin.FieldRule
49, // 46: grpc.federation.generator.plugin.FieldRule.value:type_name -> grpc.federation.generator.plugin.Value
28, // 47: grpc.federation.generator.plugin.FieldRule.auto_bind_field:type_name -> grpc.federation.generator.plugin.AutoBindField
29, // 48: grpc.federation.generator.plugin.FieldRule.oneof_rule:type_name -> grpc.federation.generator.plugin.FieldOneofRule
37, // 49: grpc.federation.generator.plugin.FieldOneofRule.if:type_name -> grpc.federation.generator.plugin.CELValue
37, // 50: grpc.federation.generator.plugin.FieldOneofRule.by:type_name -> grpc.federation.generator.plugin.CELValue
24, // 51: grpc.federation.generator.plugin.FieldOneofRule.def_set:type_name -> grpc.federation.generator.plugin.VariableDefinitionSet
31, // 52: grpc.federation.generator.plugin.VariableDefinitionGroup.sequential:type_name -> grpc.federation.generator.plugin.SequentialVariableDefinitionGroup
32, // 53: grpc.federation.generator.plugin.VariableDefinitionGroup.concurrent:type_name -> grpc.federation.generator.plugin.ConcurrentVariableDefinitionGroup
36, // 54: grpc.federation.generator.plugin.VariableExpr.type:type_name -> grpc.federation.generator.plugin.Type
37, // 55: grpc.federation.generator.plugin.VariableExpr.by:type_name -> grpc.federation.generator.plugin.CELValue
38, // 56: grpc.federation.generator.plugin.VariableExpr.map:type_name -> grpc.federation.generator.plugin.MapExpr
41, // 57: grpc.federation.generator.plugin.VariableExpr.call:type_name -> grpc.federation.generator.plugin.CallExpr
46, // 58: grpc.federation.generator.plugin.VariableExpr.message:type_name -> grpc.federation.generator.plugin.MessageExpr
53, // 59: grpc.federation.generator.plugin.VariableExpr.validation:type_name -> grpc.federation.generator.plugin.ValidationExpr
47, // 60: grpc.federation.generator.plugin.VariableExpr.enum:type_name -> grpc.federation.generator.plugin.EnumExpr
50, // 61: grpc.federation.generator.plugin.VariableExpr.switch:type_name -> grpc.federation.generator.plugin.SwitchExpr
2, // 62: grpc.federation.generator.plugin.Type.kind:type_name -> grpc.federation.generator.plugin.TypeKind
36, // 63: grpc.federation.generator.plugin.CELValue.out:type_name -> grpc.federation.generator.plugin.Type
39, // 64: grpc.federation.generator.plugin.MapExpr.iterator:type_name -> grpc.federation.generator.plugin.Iterator
40, // 65: grpc.federation.generator.plugin.MapExpr.expr:type_name -> grpc.federation.generator.plugin.MapIteratorExpr
36, // 66: grpc.federation.generator.plugin.MapIteratorExpr.type:type_name -> grpc.federation.generator.plugin.Type
37, // 67: grpc.federation.generator.plugin.MapIteratorExpr.by:type_name -> grpc.federation.generator.plugin.CELValue
46, // 68: grpc.federation.generator.plugin.MapIteratorExpr.message:type_name -> grpc.federation.generator.plugin.MessageExpr
47, // 69: grpc.federation.generator.plugin.MapIteratorExpr.enum:type_name -> grpc.federation.generator.plugin.EnumExpr
45, // 70: grpc.federation.generator.plugin.CallExpr.request:type_name -> grpc.federation.generator.plugin.Request
87, // 71: grpc.federation.generator.plugin.CallExpr.timeout:type_name -> google.protobuf.Duration
42, // 72: grpc.federation.generator.plugin.CallExpr.retry:type_name -> grpc.federation.generator.plugin.RetryPolicy
54, // 73: grpc.federation.generator.plugin.CallExpr.errors:type_name -> grpc.federation.generator.plugin.GRPCError
61, // 74: grpc.federation.generator.plugin.CallExpr.option:type_name -> grpc.federation.generator.plugin.GRPCCallOption
37, // 75: grpc.federation.generator.plugin.CallExpr.metadata:type_name -> grpc.federation.generator.plugin.CELValue
43, // 76: grpc.federation.generator.plugin.RetryPolicy.constant:type_name -> grpc.federation.generator.plugin.RetryPolicyConstant
44, // 77: grpc.federation.generator.plugin.RetryPolicy.exponential:type_name -> grpc.federation.generator.plugin.RetryPolicyExponential
37, // 78: grpc.federation.generator.plugin.RetryPolicy.if:type_name -> grpc.federation.generator.plugin.CELValue
87, // 79: grpc.federation.generator.plugin.RetryPolicyConstant.interval:type_name -> google.protobuf.Duration
87, // 80: grpc.federation.generator.plugin.RetryPolicyExponential.initial_interval:type_name -> google.protobuf.Duration
87, // 81: grpc.federation.generator.plugin.RetryPolicyExponential.max_interval:type_name -> google.protobuf.Duration
87, // 82: grpc.federation.generator.plugin.RetryPolicyExponential.max_elapsed_time:type_name -> google.protobuf.Duration
48, // 83: grpc.federation.generator.plugin.Request.args:type_name -> grpc.federation.generator.plugin.Argument
48, // 84: grpc.federation.generator.plugin.MessageExpr.args:type_name -> grpc.federation.generator.plugin.Argument
37, // 85: grpc.federation.generator.plugin.EnumExpr.by:type_name -> grpc.federation.generator.plugin.CELValue
36, // 86: grpc.federation.generator.plugin.Argument.type:type_name -> grpc.federation.generator.plugin.Type
49, // 87: grpc.federation.generator.plugin.Argument.value:type_name -> grpc.federation.generator.plugin.Value
37, // 88: grpc.federation.generator.plugin.Argument.if:type_name -> grpc.federation.generator.plugin.CELValue
37, // 89: grpc.federation.generator.plugin.Value.cel:type_name -> grpc.federation.generator.plugin.CELValue
36, // 90: grpc.federation.generator.plugin.SwitchExpr.type:type_name -> grpc.federation.generator.plugin.Type
51, // 91: grpc.federation.generator.plugin.SwitchExpr.cases:type_name -> grpc.federation.generator.plugin.SwitchCase
52, // 92: grpc.federation.generator.plugin.SwitchExpr.default:type_name -> grpc.federation.generator.plugin.SwitchDefault
37, // 93: grpc.federation.generator.plugin.SwitchCase.if:type_name -> grpc.federation.generator.plugin.CELValue
37, // 94: grpc.federation.generator.plugin.SwitchCase.by:type_name -> grpc.federation.generator.plugin.CELValue
24, // 95: grpc.federation.generator.plugin.SwitchCase.def_set:type_name -> grpc.federation.generator.plugin.VariableDefinitionSet
37, // 96: grpc.federation.generator.plugin.SwitchDefault.by:type_name -> grpc.federation.generator.plugin.CELValue
24, // 97: grpc.federation.generator.plugin.SwitchDefault.def_set:type_name -> grpc.federation.generator.plugin.VariableDefinitionSet
54, // 98: grpc.federation.generator.plugin.ValidationExpr.error:type_name -> grpc.federation.generator.plugin.GRPCError
24, // 99: grpc.federation.generator.plugin.GRPCError.def_set:type_name -> grpc.federation.generator.plugin.VariableDefinitionSet
37, // 100: grpc.federation.generator.plugin.GRPCError.if:type_name -> grpc.federation.generator.plugin.CELValue
88, // 101: grpc.federation.generator.plugin.GRPCError.code:type_name -> google.rpc.Code
37, // 102: grpc.federation.generator.plugin.GRPCError.message:type_name -> grpc.federation.generator.plugin.CELValue
55, // 103: grpc.federation.generator.plugin.GRPCError.details:type_name -> grpc.federation.generator.plugin.GRPCErrorDetail
37, // 104: grpc.federation.generator.plugin.GRPCError.ignore_and_response:type_name -> grpc.federation.generator.plugin.CELValue
24, // 105: grpc.federation.generator.plugin.GRPCErrorDetail.def_set:type_name -> grpc.federation.generator.plugin.VariableDefinitionSet
37, // 106: grpc.federation.generator.plugin.GRPCErrorDetail.if:type_name -> grpc.federation.generator.plugin.CELValue
24, // 107: grpc.federation.generator.plugin.GRPCErrorDetail.messages:type_name -> grpc.federation.generator.plugin.VariableDefinitionSet
56, // 108: grpc.federation.generator.plugin.GRPCErrorDetail.precondition_failures:type_name -> grpc.federation.generator.plugin.PreconditionFailure
58, // 109: grpc.federation.generator.plugin.GRPCErrorDetail.bad_requests:type_name -> grpc.federation.generator.plugin.BadRequest
60, // 110: grpc.federation.generator.plugin.GRPCErrorDetail.localized_messages:type_name -> grpc.federation.generator.plugin.LocalizedMessage
37, // 111: grpc.federation.generator.plugin.GRPCErrorDetail.by:type_name -> grpc.federation.generator.plugin.CELValue
57, // 112: grpc.federation.generator.plugin.PreconditionFailure.violations:type_name -> grpc.federation.generator.plugin.PreconditionFailureViolation
37, // 113: grpc.federation.generator.plugin.PreconditionFailureViolation.type:type_name -> grpc.federation.generator.plugin.CELValue
37, // 114: grpc.federation.generator.plugin.PreconditionFailureViolation.subject:type_name -> grpc.federation.generator.plugin.CELValue
37, // 115: grpc.federation.generator.plugin.PreconditionFailureViolation.description:type_name -> grpc.federation.generator.plugin.CELValue
59, // 116: grpc.federation.generator.plugin.BadRequest.field_violations:type_name -> grpc.federation.generator.plugin.BadRequestFieldViolation
37, // 117: grpc.federation.generator.plugin.BadRequestFieldViolation.field:type_name -> grpc.federation.generator.plugin.CELValue
37, // 118: grpc.federation.generator.plugin.BadRequestFieldViolation.description:type_name -> grpc.federation.generator.plugin.CELValue
37, // 119: grpc.federation.generator.plugin.LocalizedMessage.message:type_name -> grpc.federation.generator.plugin.CELValue
65, // 120: grpc.federation.generator.plugin.Enum.rule:type_name -> grpc.federation.generator.plugin.EnumRule
66, // 121: grpc.federation.generator.plugin.EnumValue.rule:type_name -> grpc.federation.generator.plugin.EnumValueRule
67, // 122: grpc.federation.generator.plugin.EnumValueRule.aliases:type_name -> grpc.federation.generator.plugin.EnumValueAlias
68, // 123: grpc.federation.generator.plugin.EnumValueRule.attrs:type_name -> grpc.federation.generator.plugin.EnumValueAttribute
70, // 124: grpc.federation.generator.plugin.CELPlugin.functions:type_name -> grpc.federation.generator.plugin.CELFunction
36, // 125: grpc.federation.generator.plugin.CELFunction.args:type_name -> grpc.federation.generator.plugin.Type
36, // 126: grpc.federation.generator.plugin.CELFunction.return:type_name -> grpc.federation.generator.plugin.Type
73, // 127: grpc.federation.generator.plugin.ProtoCodeGeneratorResponse.GeneratedCodeInfo.annotation:type_name -> grpc.federation.generator.plugin.ProtoCodeGeneratorResponse.GeneratedCodeInfo.Annotation
71, // 128: grpc.federation.generator.plugin.ProtoCodeGeneratorResponse.File.generated_code_info:type_name -> grpc.federation.generator.plugin.ProtoCodeGeneratorResponse.GeneratedCodeInfo
4, // 129: grpc.federation.generator.plugin.ProtoCodeGeneratorResponse.GeneratedCodeInfo.Annotation.semantic:type_name -> grpc.federation.generator.plugin.ProtoCodeGeneratorResponse.GeneratedCodeInfo.Annotation.Semantic
9, // 130: grpc.federation.generator.plugin.Reference.FileMapEntry.value:type_name -> grpc.federation.generator.plugin.File
12, // 131: grpc.federation.generator.plugin.Reference.ServiceMapEntry.value:type_name -> grpc.federation.generator.plugin.Service
20, // 132: grpc.federation.generator.plugin.Reference.MethodMapEntry.value:type_name -> grpc.federation.generator.plugin.Method
22, // 133: grpc.federation.generator.plugin.Reference.MessageMapEntry.value:type_name -> grpc.federation.generator.plugin.Message
26, // 134: grpc.federation.generator.plugin.Reference.FieldMapEntry.value:type_name -> grpc.federation.generator.plugin.Field
63, // 135: grpc.federation.generator.plugin.Reference.EnumMapEntry.value:type_name -> grpc.federation.generator.plugin.Enum
64, // 136: grpc.federation.generator.plugin.Reference.EnumValueMapEntry.value:type_name -> grpc.federation.generator.plugin.EnumValue
62, // 137: grpc.federation.generator.plugin.Reference.OneofMapEntry.value:type_name -> grpc.federation.generator.plugin.Oneof
69, // 138: grpc.federation.generator.plugin.Reference.CelPluginMapEntry.value:type_name -> grpc.federation.generator.plugin.CELPlugin
33, // 139: grpc.federation.generator.plugin.Reference.GraphMapEntry.value:type_name -> grpc.federation.generator.plugin.MessageDependencyGraph
25, // 140: grpc.federation.generator.plugin.Reference.VariableDefinitionMapEntry.value:type_name -> grpc.federation.generator.plugin.VariableDefinition
30, // 141: grpc.federation.generator.plugin.Reference.VariableDefinitionGroupMapEntry.value:type_name -> grpc.federation.generator.plugin.VariableDefinitionGroup
34, // 142: grpc.federation.generator.plugin.Reference.GraphNodeMapEntry.value:type_name -> grpc.federation.generator.plugin.MessageDependencyGraphNode
143, // [143:143] is the sub-list for method output_type
143, // [143:143] is the sub-list for method input_type
143, // [143:143] is the sub-list for extension type_name
143, // [143:143] is the sub-list for extension extendee
0, // [0:143] is the sub-list for field type_name
}
func init() { file_grpc_federation_generator_proto_init() }
func file_grpc_federation_generator_proto_init() {
if File_grpc_federation_generator_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_grpc_federation_generator_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ProtoCodeGeneratorResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_generator_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CodeGeneratorRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_generator_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*OutputFilePathConfig); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_generator_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Reference); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_generator_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*File); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_generator_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Package); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_generator_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GoPackage); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_generator_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Service); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_generator_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ServiceRule); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_generator_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Env); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_generator_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*EnvVar); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_generator_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*EnvVarOption); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_generator_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ServiceVariable); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_generator_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ServiceVariableExpr); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_generator_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ServiceVariableValidationExpr); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_generator_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Method); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_generator_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*MethodRule); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_generator_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Message); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_generator_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*MessageRule); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_generator_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*VariableDefinitionSet); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_generator_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*VariableDefinition); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_generator_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Field); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_generator_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*FieldRule); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_generator_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*AutoBindField); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_generator_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*FieldOneofRule); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_generator_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*VariableDefinitionGroup); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_generator_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*SequentialVariableDefinitionGroup); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_generator_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ConcurrentVariableDefinitionGroup); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_generator_proto_msgTypes[28].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*MessageDependencyGraph); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_generator_proto_msgTypes[29].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*MessageDependencyGraphNode); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_generator_proto_msgTypes[30].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*VariableExpr); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_generator_proto_msgTypes[31].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Type); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_generator_proto_msgTypes[32].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CELValue); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_generator_proto_msgTypes[33].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*MapExpr); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_generator_proto_msgTypes[34].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Iterator); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_generator_proto_msgTypes[35].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*MapIteratorExpr); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_generator_proto_msgTypes[36].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CallExpr); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_generator_proto_msgTypes[37].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*RetryPolicy); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_generator_proto_msgTypes[38].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*RetryPolicyConstant); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_generator_proto_msgTypes[39].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*RetryPolicyExponential); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_generator_proto_msgTypes[40].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Request); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_generator_proto_msgTypes[41].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*MessageExpr); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_generator_proto_msgTypes[42].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*EnumExpr); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_generator_proto_msgTypes[43].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Argument); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_generator_proto_msgTypes[44].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Value); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_generator_proto_msgTypes[45].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*SwitchExpr); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_generator_proto_msgTypes[46].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*SwitchCase); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_generator_proto_msgTypes[47].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*SwitchDefault); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_generator_proto_msgTypes[48].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ValidationExpr); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_generator_proto_msgTypes[49].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GRPCError); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_generator_proto_msgTypes[50].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GRPCErrorDetail); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_generator_proto_msgTypes[51].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*PreconditionFailure); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_generator_proto_msgTypes[52].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*PreconditionFailureViolation); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_generator_proto_msgTypes[53].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*BadRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_generator_proto_msgTypes[54].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*BadRequestFieldViolation); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_generator_proto_msgTypes[55].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*LocalizedMessage); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_generator_proto_msgTypes[56].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GRPCCallOption); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_generator_proto_msgTypes[57].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Oneof); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_generator_proto_msgTypes[58].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Enum); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_generator_proto_msgTypes[59].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*EnumValue); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_generator_proto_msgTypes[60].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*EnumRule); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_generator_proto_msgTypes[61].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*EnumValueRule); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_generator_proto_msgTypes[62].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*EnumValueAlias); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_generator_proto_msgTypes[63].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*EnumValueAttribute); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_generator_proto_msgTypes[64].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CELPlugin); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_generator_proto_msgTypes[65].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CELFunction); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_generator_proto_msgTypes[66].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ProtoCodeGeneratorResponse_GeneratedCodeInfo); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_generator_proto_msgTypes[67].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ProtoCodeGeneratorResponse_File); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_generator_proto_msgTypes[68].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ProtoCodeGeneratorResponse_GeneratedCodeInfo_Annotation); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
file_grpc_federation_generator_proto_msgTypes[0].OneofWrappers = []interface{}{}
file_grpc_federation_generator_proto_msgTypes[13].OneofWrappers = []interface{}{
(*ServiceVariableExpr_By)(nil),
(*ServiceVariableExpr_Map)(nil),
(*ServiceVariableExpr_Message)(nil),
(*ServiceVariableExpr_Validation)(nil),
(*ServiceVariableExpr_Enum)(nil),
(*ServiceVariableExpr_Switch)(nil),
}
file_grpc_federation_generator_proto_msgTypes[25].OneofWrappers = []interface{}{
(*VariableDefinitionGroup_Sequential)(nil),
(*VariableDefinitionGroup_Concurrent)(nil),
}
file_grpc_federation_generator_proto_msgTypes[30].OneofWrappers = []interface{}{
(*VariableExpr_By)(nil),
(*VariableExpr_Map)(nil),
(*VariableExpr_Call)(nil),
(*VariableExpr_Message)(nil),
(*VariableExpr_Validation)(nil),
(*VariableExpr_Enum)(nil),
(*VariableExpr_Switch)(nil),
}
file_grpc_federation_generator_proto_msgTypes[31].OneofWrappers = []interface{}{
(*Type_MessageId)(nil),
(*Type_EnumId)(nil),
(*Type_OneofFieldId)(nil),
}
file_grpc_federation_generator_proto_msgTypes[35].OneofWrappers = []interface{}{
(*MapIteratorExpr_By)(nil),
(*MapIteratorExpr_Message)(nil),
(*MapIteratorExpr_Enum)(nil),
}
file_grpc_federation_generator_proto_msgTypes[37].OneofWrappers = []interface{}{
(*RetryPolicy_Constant)(nil),
(*RetryPolicy_Exponential)(nil),
}
file_grpc_federation_generator_proto_msgTypes[49].OneofWrappers = []interface{}{}
file_grpc_federation_generator_proto_msgTypes[56].OneofWrappers = []interface{}{}
file_grpc_federation_generator_proto_msgTypes[67].OneofWrappers = []interface{}{}
file_grpc_federation_generator_proto_msgTypes[68].OneofWrappers = []interface{}{}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_grpc_federation_generator_proto_rawDesc,
NumEnums: 5,
NumMessages: 82,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_grpc_federation_generator_proto_goTypes,
DependencyIndexes: file_grpc_federation_generator_proto_depIdxs,
EnumInfos: file_grpc_federation_generator_proto_enumTypes,
MessageInfos: file_grpc_federation_generator_proto_msgTypes,
}.Build()
File_grpc_federation_generator_proto = out.File
file_grpc_federation_generator_proto_rawDesc = nil
file_grpc_federation_generator_proto_goTypes = nil
file_grpc_federation_generator_proto_depIdxs = nil
}
================================================
FILE: _examples/17_error_handler/grpc/federation/plugin.pb.go
================================================
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.33.0
// protoc (unknown)
// source: grpc/federation/plugin.proto
package plugin
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
_ "google.golang.org/protobuf/types/descriptorpb"
anypb "google.golang.org/protobuf/types/known/anypb"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
type CELPluginRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Method string `protobuf:"bytes,1,opt,name=method,proto3" json:"method,omitempty"`
Metadata []*CELPluginGRPCMetadata `protobuf:"bytes,2,rep,name=metadata,proto3" json:"metadata,omitempty"`
Args []*CELPluginValue `protobuf:"bytes,3,rep,name=args,proto3" json:"args,omitempty"`
}
func (x *CELPluginRequest) Reset() {
*x = CELPluginRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_plugin_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *CELPluginRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CELPluginRequest) ProtoMessage() {}
func (x *CELPluginRequest) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_plugin_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use CELPluginRequest.ProtoReflect.Descriptor instead.
func (*CELPluginRequest) Descriptor() ([]byte, []int) {
return file_grpc_federation_plugin_proto_rawDescGZIP(), []int{0}
}
func (x *CELPluginRequest) GetMethod() string {
if x != nil {
return x.Method
}
return ""
}
func (x *CELPluginRequest) GetMetadata() []*CELPluginGRPCMetadata {
if x != nil {
return x.Metadata
}
return nil
}
func (x *CELPluginRequest) GetArgs() []*CELPluginValue {
if x != nil {
return x.Args
}
return nil
}
type CELPluginResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Value *CELPluginValue `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"`
Error string `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"`
}
func (x *CELPluginResponse) Reset() {
*x = CELPluginResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_plugin_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *CELPluginResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CELPluginResponse) ProtoMessage() {}
func (x *CELPluginResponse) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_plugin_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use CELPluginResponse.ProtoReflect.Descriptor instead.
func (*CELPluginResponse) Descriptor() ([]byte, []int) {
return file_grpc_federation_plugin_proto_rawDescGZIP(), []int{1}
}
func (x *CELPluginResponse) GetValue() *CELPluginValue {
if x != nil {
return x.Value
}
return nil
}
func (x *CELPluginResponse) GetError() string {
if x != nil {
return x.Error
}
return ""
}
type CELPluginGRPCMetadata struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
Values []string `protobuf:"bytes,2,rep,name=values,proto3" json:"values,omitempty"`
}
func (x *CELPluginGRPCMetadata) Reset() {
*x = CELPluginGRPCMetadata{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_plugin_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *CELPluginGRPCMetadata) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CELPluginGRPCMetadata) ProtoMessage() {}
func (x *CELPluginGRPCMetadata) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_plugin_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use CELPluginGRPCMetadata.ProtoReflect.Descriptor instead.
func (*CELPluginGRPCMetadata) Descriptor() ([]byte, []int) {
return file_grpc_federation_plugin_proto_rawDescGZIP(), []int{2}
}
func (x *CELPluginGRPCMetadata) GetKey() string {
if x != nil {
return x.Key
}
return ""
}
func (x *CELPluginGRPCMetadata) GetValues() []string {
if x != nil {
return x.Values
}
return nil
}
type CELPluginValue struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Types that are assignable to Value:
//
// *CELPluginValue_Int64
// *CELPluginValue_Uint64
// *CELPluginValue_Double
// *CELPluginValue_String_
// *CELPluginValue_Bytes
// *CELPluginValue_Bool
// *CELPluginValue_Ptr
// *CELPluginValue_Message
// *CELPluginValue_List
Value isCELPluginValue_Value `protobuf_oneof:"value"`
}
func (x *CELPluginValue) Reset() {
*x = CELPluginValue{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_plugin_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *CELPluginValue) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CELPluginValue) ProtoMessage() {}
func (x *CELPluginValue) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_plugin_proto_msgTypes[3]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use CELPluginValue.ProtoReflect.Descriptor instead.
func (*CELPluginValue) Descriptor() ([]byte, []int) {
return file_grpc_federation_plugin_proto_rawDescGZIP(), []int{3}
}
func (m *CELPluginValue) GetValue() isCELPluginValue_Value {
if m != nil {
return m.Value
}
return nil
}
func (x *CELPluginValue) GetInt64() int64 {
if x, ok := x.GetValue().(*CELPluginValue_Int64); ok {
return x.Int64
}
return 0
}
func (x *CELPluginValue) GetUint64() uint64 {
if x, ok := x.GetValue().(*CELPluginValue_Uint64); ok {
return x.Uint64
}
return 0
}
func (x *CELPluginValue) GetDouble() float64 {
if x, ok := x.GetValue().(*CELPluginValue_Double); ok {
return x.Double
}
return 0
}
func (x *CELPluginValue) GetString_() string {
if x, ok := x.GetValue().(*CELPluginValue_String_); ok {
return x.String_
}
return ""
}
func (x *CELPluginValue) GetBytes() []byte {
if x, ok := x.GetValue().(*CELPluginValue_Bytes); ok {
return x.Bytes
}
return nil
}
func (x *CELPluginValue) GetBool() bool {
if x, ok := x.GetValue().(*CELPluginValue_Bool); ok {
return x.Bool
}
return false
}
func (x *CELPluginValue) GetPtr() uint64 {
if x, ok := x.GetValue().(*CELPluginValue_Ptr); ok {
return x.Ptr
}
return 0
}
func (x *CELPluginValue) GetMessage() *anypb.Any {
if x, ok := x.GetValue().(*CELPluginValue_Message); ok {
return x.Message
}
return nil
}
func (x *CELPluginValue) GetList() *CELPluginListValue {
if x, ok := x.GetValue().(*CELPluginValue_List); ok {
return x.List
}
return nil
}
type isCELPluginValue_Value interface {
isCELPluginValue_Value()
}
type CELPluginValue_Int64 struct {
Int64 int64 `protobuf:"varint,1,opt,name=int64,proto3,oneof"`
}
type CELPluginValue_Uint64 struct {
Uint64 uint64 `protobuf:"varint,2,opt,name=uint64,proto3,oneof"`
}
type CELPluginValue_Double struct {
Double float64 `protobuf:"fixed64,3,opt,name=double,proto3,oneof"`
}
type CELPluginValue_String_ struct {
String_ string `protobuf:"bytes,4,opt,name=string,proto3,oneof"`
}
type CELPluginValue_Bytes struct {
Bytes []byte `protobuf:"bytes,5,opt,name=bytes,proto3,oneof"`
}
type CELPluginValue_Bool struct {
Bool bool `protobuf:"varint,6,opt,name=bool,proto3,oneof"`
}
type CELPluginValue_Ptr struct {
Ptr uint64 `protobuf:"varint,7,opt,name=ptr,proto3,oneof"`
}
type CELPluginValue_Message struct {
Message *anypb.Any `protobuf:"bytes,8,opt,name=message,proto3,oneof"`
}
type CELPluginValue_List struct {
List *CELPluginListValue `protobuf:"bytes,9,opt,name=list,proto3,oneof"`
}
func (*CELPluginValue_Int64) isCELPluginValue_Value() {}
func (*CELPluginValue_Uint64) isCELPluginValue_Value() {}
func (*CELPluginValue_Double) isCELPluginValue_Value() {}
func (*CELPluginValue_String_) isCELPluginValue_Value() {}
func (*CELPluginValue_Bytes) isCELPluginValue_Value() {}
func (*CELPluginValue_Bool) isCELPluginValue_Value() {}
func (*CELPluginValue_Ptr) isCELPluginValue_Value() {}
func (*CELPluginValue_Message) isCELPluginValue_Value() {}
func (*CELPluginValue_List) isCELPluginValue_Value() {}
type CELPluginListValue struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Values []*CELPluginValue `protobuf:"bytes,1,rep,name=values,proto3" json:"values,omitempty"`
}
func (x *CELPluginListValue) Reset() {
*x = CELPluginListValue{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_plugin_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *CELPluginListValue) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CELPluginListValue) ProtoMessage() {}
func (x *CELPluginListValue) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_plugin_proto_msgTypes[4]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use CELPluginListValue.ProtoReflect.Descriptor instead.
func (*CELPluginListValue) Descriptor() ([]byte, []int) {
return file_grpc_federation_plugin_proto_rawDescGZIP(), []int{4}
}
func (x *CELPluginListValue) GetValues() []*CELPluginValue {
if x != nil {
return x.Values
}
return nil
}
var File_grpc_federation_plugin_proto protoreflect.FileDescriptor
var file_grpc_federation_plugin_proto_rawDesc = []byte{
0x0a, 0x1c, 0x67, 0x72, 0x70, 0x63, 0x2f, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f,
0x6e, 0x2f, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0f,
0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x1a,
0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66,
0x2f, 0x61, 0x6e, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x20, 0x67, 0x6f, 0x6f, 0x67,
0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x65, 0x73, 0x63,
0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xa3, 0x01, 0x0a,
0x10, 0x43, 0x45, 0x4c, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
0x74, 0x12, 0x16, 0x0a, 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28,
0x09, 0x52, 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, 0x42, 0x0a, 0x08, 0x6d, 0x65, 0x74,
0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x67, 0x72,
0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x43, 0x45,
0x4c, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x47, 0x52, 0x50, 0x43, 0x4d, 0x65, 0x74, 0x61, 0x64,
0x61, 0x74, 0x61, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x33, 0x0a,
0x04, 0x61, 0x72, 0x67, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x67, 0x72,
0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x43, 0x45,
0x4c, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x04, 0x61, 0x72,
0x67, 0x73, 0x22, 0x60, 0x0a, 0x11, 0x43, 0x45, 0x4c, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x52,
0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x35, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65,
0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65,
0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x43, 0x45, 0x4c, 0x50, 0x6c, 0x75, 0x67,
0x69, 0x6e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x14,
0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65,
0x72, 0x72, 0x6f, 0x72, 0x22, 0x41, 0x0a, 0x15, 0x43, 0x45, 0x4c, 0x50, 0x6c, 0x75, 0x67, 0x69,
0x6e, 0x47, 0x52, 0x50, 0x43, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x10, 0x0a,
0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12,
0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52,
0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x22, 0xae, 0x02, 0x0a, 0x0e, 0x43, 0x45, 0x4c, 0x50,
0x6c, 0x75, 0x67, 0x69, 0x6e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x16, 0x0a, 0x05, 0x69, 0x6e,
0x74, 0x36, 0x34, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x48, 0x00, 0x52, 0x05, 0x69, 0x6e, 0x74,
0x36, 0x34, 0x12, 0x18, 0x0a, 0x06, 0x75, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x18, 0x02, 0x20, 0x01,
0x28, 0x04, 0x48, 0x00, 0x52, 0x06, 0x75, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x12, 0x18, 0x0a, 0x06,
0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x01, 0x48, 0x00, 0x52, 0x06,
0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x12, 0x18, 0x0a, 0x06, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67,
0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x06, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67,
0x12, 0x16, 0x0a, 0x05, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0c, 0x48,
0x00, 0x52, 0x05, 0x62, 0x79, 0x74, 0x65, 0x73, 0x12, 0x14, 0x0a, 0x04, 0x62, 0x6f, 0x6f, 0x6c,
0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x04, 0x62, 0x6f, 0x6f, 0x6c, 0x12, 0x12,
0x0a, 0x03, 0x70, 0x74, 0x72, 0x18, 0x07, 0x20, 0x01, 0x28, 0x04, 0x48, 0x00, 0x52, 0x03, 0x70,
0x74, 0x72, 0x12, 0x30, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x08, 0x20,
0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f,
0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x48, 0x00, 0x52, 0x07, 0x6d, 0x65, 0x73,
0x73, 0x61, 0x67, 0x65, 0x12, 0x39, 0x0a, 0x04, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x09, 0x20, 0x01,
0x28, 0x0b, 0x32, 0x23, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61,
0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x43, 0x45, 0x4c, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x4c, 0x69,
0x73, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x48, 0x00, 0x52, 0x04, 0x6c, 0x69, 0x73, 0x74, 0x42,
0x07, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x4d, 0x0a, 0x12, 0x43, 0x45, 0x4c, 0x50,
0x6c, 0x75, 0x67, 0x69, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x37,
0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f,
0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e,
0x2e, 0x43, 0x45, 0x4c, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52,
0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x42, 0xc5, 0x01, 0x0a, 0x13, 0x63, 0x6f, 0x6d, 0x2e,
0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42,
0x0b, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x44,
0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6d, 0x65, 0x72, 0x63, 0x61,
0x72, 0x69, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2d, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69,
0x6f, 0x6e, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2f, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69,
0x6f, 0x6e, 0x2f, 0x63, 0x65, 0x6c, 0x2f, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x3b, 0x70, 0x6c,
0x75, 0x67, 0x69, 0x6e, 0xa2, 0x02, 0x03, 0x47, 0x46, 0x58, 0xaa, 0x02, 0x0f, 0x47, 0x72, 0x70,
0x63, 0x2e, 0x46, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0xca, 0x02, 0x0f, 0x47,
0x72, 0x70, 0x63, 0x5c, 0x46, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0xe2, 0x02,
0x1b, 0x47, 0x72, 0x70, 0x63, 0x5c, 0x46, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e,
0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x10, 0x47,
0x72, 0x70, 0x63, 0x3a, 0x3a, 0x46, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x62,
0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_grpc_federation_plugin_proto_rawDescOnce sync.Once
file_grpc_federation_plugin_proto_rawDescData = file_grpc_federation_plugin_proto_rawDesc
)
func file_grpc_federation_plugin_proto_rawDescGZIP() []byte {
file_grpc_federation_plugin_proto_rawDescOnce.Do(func() {
file_grpc_federation_plugin_proto_rawDescData = protoimpl.X.CompressGZIP(file_grpc_federation_plugin_proto_rawDescData)
})
return file_grpc_federation_plugin_proto_rawDescData
}
var file_grpc_federation_plugin_proto_msgTypes = make([]protoimpl.MessageInfo, 5)
var file_grpc_federation_plugin_proto_goTypes = []interface{}{
(*CELPluginRequest)(nil), // 0: grpc.federation.CELPluginRequest
(*CELPluginResponse)(nil), // 1: grpc.federation.CELPluginResponse
(*CELPluginGRPCMetadata)(nil), // 2: grpc.federation.CELPluginGRPCMetadata
(*CELPluginValue)(nil), // 3: grpc.federation.CELPluginValue
(*CELPluginListValue)(nil), // 4: grpc.federation.CELPluginListValue
(*anypb.Any)(nil), // 5: google.protobuf.Any
}
var file_grpc_federation_plugin_proto_depIdxs = []int32{
2, // 0: grpc.federation.CELPluginRequest.metadata:type_name -> grpc.federation.CELPluginGRPCMetadata
3, // 1: grpc.federation.CELPluginRequest.args:type_name -> grpc.federation.CELPluginValue
3, // 2: grpc.federation.CELPluginResponse.value:type_name -> grpc.federation.CELPluginValue
5, // 3: grpc.federation.CELPluginValue.message:type_name -> google.protobuf.Any
4, // 4: grpc.federation.CELPluginValue.list:type_name -> grpc.federation.CELPluginListValue
3, // 5: grpc.federation.CELPluginListValue.values:type_name -> grpc.federation.CELPluginValue
6, // [6:6] is the sub-list for method output_type
6, // [6:6] is the sub-list for method input_type
6, // [6:6] is the sub-list for extension type_name
6, // [6:6] is the sub-list for extension extendee
0, // [0:6] is the sub-list for field type_name
}
func init() { file_grpc_federation_plugin_proto_init() }
func file_grpc_federation_plugin_proto_init() {
if File_grpc_federation_plugin_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_grpc_federation_plugin_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CELPluginRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_plugin_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CELPluginResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_plugin_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CELPluginGRPCMetadata); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_plugin_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CELPluginValue); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_plugin_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CELPluginListValue); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
file_grpc_federation_plugin_proto_msgTypes[3].OneofWrappers = []interface{}{
(*CELPluginValue_Int64)(nil),
(*CELPluginValue_Uint64)(nil),
(*CELPluginValue_Double)(nil),
(*CELPluginValue_String_)(nil),
(*CELPluginValue_Bytes)(nil),
(*CELPluginValue_Bool)(nil),
(*CELPluginValue_Ptr)(nil),
(*CELPluginValue_Message)(nil),
(*CELPluginValue_List)(nil),
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_grpc_federation_plugin_proto_rawDesc,
NumEnums: 0,
NumMessages: 5,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_grpc_federation_plugin_proto_goTypes,
DependencyIndexes: file_grpc_federation_plugin_proto_depIdxs,
MessageInfos: file_grpc_federation_plugin_proto_msgTypes,
}.Build()
File_grpc_federation_plugin_proto = out.File
file_grpc_federation_plugin_proto_rawDesc = nil
file_grpc_federation_plugin_proto_goTypes = nil
file_grpc_federation_plugin_proto_depIdxs = nil
}
================================================
FILE: _examples/17_error_handler/main_test.go
================================================
package main_test
import (
"context"
"log/slog"
"net"
"os"
"testing"
"github.com/google/go-cmp/cmp"
"github.com/google/go-cmp/cmp/cmpopts"
"go.opentelemetry.io/otel"
"go.opentelemetry.io/otel/attribute"
"go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc"
"go.opentelemetry.io/otel/propagation"
"go.opentelemetry.io/otel/sdk/resource"
sdktrace "go.opentelemetry.io/otel/sdk/trace"
semconv "go.opentelemetry.io/otel/semconv/v1.4.0"
"go.uber.org/goleak"
"google.golang.org/genproto/googleapis/rpc/errdetails"
"google.golang.org/grpc"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/credentials/insecure"
"google.golang.org/grpc/status"
"google.golang.org/grpc/test/bufconn"
"google.golang.org/protobuf/protoadapt"
"example/federation"
"example/post"
)
const bufSize = 1024
var (
listener *bufconn.Listener
postClient post.PostServiceClient
)
type clientConfig struct{}
func (c *clientConfig) Post_PostServiceClient(cfg federation.FederationServiceClientConfig) (post.PostServiceClient, error) {
return postClient, nil
}
type PostServer struct {
*post.UnimplementedPostServiceServer
}
var getPostError error
func (s *PostServer) GetPost(ctx context.Context, req *post.GetPostRequest) (*post.GetPostResponse, error) {
return nil, getPostError
}
func dialer(ctx context.Context, address string) (net.Conn, error) {
return listener.Dial()
}
func TestFederation(t *testing.T) {
defer goleak.VerifyNone(t)
ctx := context.Background()
listener = bufconn.Listen(bufSize)
if os.Getenv("ENABLE_JAEGER") != "" {
exporter, err := otlptracegrpc.New(ctx, otlptracegrpc.WithInsecure())
if err != nil {
t.Fatal(err)
}
tp := sdktrace.NewTracerProvider(
sdktrace.WithBatcher(exporter),
sdktrace.WithResource(
resource.NewWithAttributes(
semconv.SchemaURL,
semconv.ServiceNameKey.String("example17/error_handler"),
semconv.ServiceVersionKey.String("1.0.0"),
attribute.String("environment", "dev"),
),
),
sdktrace.WithSampler(sdktrace.AlwaysSample()),
)
defer tp.Shutdown(ctx)
otel.SetTextMapPropagator(propagation.TraceContext{})
otel.SetTracerProvider(tp)
}
conn, err := grpc.DialContext(
ctx, "",
grpc.WithContextDialer(dialer),
grpc.WithTransportCredentials(insecure.NewCredentials()),
)
if err != nil {
t.Fatal(err)
}
defer conn.Close()
postClient = post.NewPostServiceClient(conn)
grpcServer := grpc.NewServer()
defer grpcServer.Stop()
logger := slog.New(slog.NewJSONHandler(os.Stdout, &slog.HandlerOptions{
Level: slog.LevelDebug,
}))
federationServer, err := federation.NewFederationService(federation.FederationServiceConfig{
Client: new(clientConfig),
Logger: logger,
})
if err != nil {
t.Fatal(err)
}
defer federation.CleanupFederationService(ctx, federationServer)
post.RegisterPostServiceServer(grpcServer, &PostServer{})
federation.RegisterFederationServiceServer(grpcServer, federationServer)
go func() {
if err := grpcServer.Serve(listener); err != nil {
t.Fatal(err)
}
}()
client := federation.NewFederationServiceClient(conn)
t.Run("custom error", func(t *testing.T) {
st := status.New(codes.FailedPrecondition, "failed to create post message")
var details []protoadapt.MessageV1
details = append(details, &errdetails.PreconditionFailure{
Violations: []*errdetails.PreconditionFailure_Violation{
{
Type: "foo",
Subject: "bar",
Description: "baz",
},
},
})
details = append(details, &errdetails.LocalizedMessage{
Locale: "en-US",
Message: "hello",
})
details = append(details, &post.Post{Id: "xxx"})
stWithDetails, _ := st.WithDetails(details...)
getPostError = stWithDetails.Err()
_, err := client.GetPost(ctx, &federation.GetPostRequest{Id: "x"})
if err == nil {
t.Fatal("expected error")
}
s, ok := status.FromError(err)
if !ok {
t.Fatalf("failed to extract gRPC Status from the error: %v", err)
}
if s.Message() != `this is custom error message` {
t.Fatalf("got unexpected error: %v", err)
}
var detailNum int
for _, detail := range s.Details() {
if _, ok := detail.(protoadapt.MessageV1); !ok {
t.Fatalf("failed to get proto message from error details: %T", detail)
}
detailNum++
}
if detailNum != 4 {
t.Fatalf("failed to get error details. got detail num: %d", detailNum)
}
})
t.Run("ignore error and response", func(t *testing.T) {
st := status.New(codes.Unimplemented, "unimplemented error")
getPostError = st.Err()
res, err := client.GetPost(ctx, &federation.GetPostRequest{Id: ""})
if err != nil {
t.Fatal(err)
}
if diff := cmp.Diff(res,
&federation.GetPostResponse{
Post: &federation.Post{
Id: "anonymous",
Code: int32(codes.Unimplemented),
},
},
cmpopts.IgnoreUnexported(
federation.GetPostResponse{},
federation.Post{},
),
); diff != "" {
t.Errorf("(-got, +want)\n%s", diff)
}
})
t.Run("ignore error", func(t *testing.T) {
st := status.New(codes.FailedPrecondition, "failed to create post message")
getPostError = st.Err()
res, err := client.GetPost(ctx, &federation.GetPostRequest{Id: ""})
if err != nil {
t.Fatal(err)
}
if diff := cmp.Diff(res,
&federation.GetPostResponse{
Post: &federation.Post{
Code: int32(codes.FailedPrecondition),
},
},
cmpopts.IgnoreUnexported(
federation.GetPostResponse{},
federation.Post{},
),
); diff != "" {
t.Errorf("(-got, +want)\n%s", diff)
}
})
t.Run("custom log level", func(t *testing.T) {
st := status.New(codes.InvalidArgument, "failed to create post message")
getPostError = st.Err()
_, err := client.GetPost(ctx, &federation.GetPostRequest{Id: "y"})
if err == nil {
t.Fatal("expected error")
}
s, ok := status.FromError(err)
if !ok {
t.Fatalf("failed to extract gRPC Status from the error: %v", err)
}
if s.Message() != `this is custom log level` {
t.Fatalf("got unexpected error: %v", err)
}
})
t.Run("pass through default error", func(t *testing.T) {
code := codes.FailedPrecondition
msg := "this is default error message"
detail := &errdetails.PreconditionFailure{
Violations: []*errdetails.PreconditionFailure_Violation{
{
Type: "x",
Subject: "y",
Description: "z",
},
},
}
st, _ := status.New(code, msg).WithDetails(detail)
getPostError = st.Err()
_, err := client.GetPost2(ctx, &federation.GetPost2Request{Id: "y"})
if err == nil {
t.Fatal("expected error")
}
s, ok := status.FromError(err)
if !ok {
t.Fatalf("failed to extract gRPC Status from the error: %v", err)
}
if s.Code() != code {
t.Fatalf("got unexpected error: %v", err)
}
if s.Message() != msg {
t.Fatalf("got unexpected error: %v", err)
}
if len(s.Details()) != 1 {
t.Fatalf("got unexpected error: %v", err)
}
if diff := cmp.Diff(s.Details()[0], detail,
cmpopts.IgnoreUnexported(
errdetails.PreconditionFailure{},
errdetails.PreconditionFailure_Violation{},
),
); diff != "" {
t.Errorf("(-got, +want)\n%s", diff)
}
})
}
================================================
FILE: _examples/17_error_handler/post/post.pb.go
================================================
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.33.0
// protoc (unknown)
// source: post/post.proto
package post
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
type GetPostRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
}
func (x *GetPostRequest) Reset() {
*x = GetPostRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_post_post_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GetPostRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetPostRequest) ProtoMessage() {}
func (x *GetPostRequest) ProtoReflect() protoreflect.Message {
mi := &file_post_post_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GetPostRequest.ProtoReflect.Descriptor instead.
func (*GetPostRequest) Descriptor() ([]byte, []int) {
return file_post_post_proto_rawDescGZIP(), []int{0}
}
func (x *GetPostRequest) GetId() string {
if x != nil {
return x.Id
}
return ""
}
type GetPostResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Post *Post `protobuf:"bytes,1,opt,name=post,proto3" json:"post,omitempty"`
}
func (x *GetPostResponse) Reset() {
*x = GetPostResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_post_post_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GetPostResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetPostResponse) ProtoMessage() {}
func (x *GetPostResponse) ProtoReflect() protoreflect.Message {
mi := &file_post_post_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GetPostResponse.ProtoReflect.Descriptor instead.
func (*GetPostResponse) Descriptor() ([]byte, []int) {
return file_post_post_proto_rawDescGZIP(), []int{1}
}
func (x *GetPostResponse) GetPost() *Post {
if x != nil {
return x.Post
}
return nil
}
type Post struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
Title string `protobuf:"bytes,2,opt,name=title,proto3" json:"title,omitempty"`
Content string `protobuf:"bytes,3,opt,name=content,proto3" json:"content,omitempty"`
UserId string `protobuf:"bytes,4,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
}
func (x *Post) Reset() {
*x = Post{}
if protoimpl.UnsafeEnabled {
mi := &file_post_post_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Post) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Post) ProtoMessage() {}
func (x *Post) ProtoReflect() protoreflect.Message {
mi := &file_post_post_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Post.ProtoReflect.Descriptor instead.
func (*Post) Descriptor() ([]byte, []int) {
return file_post_post_proto_rawDescGZIP(), []int{2}
}
func (x *Post) GetId() string {
if x != nil {
return x.Id
}
return ""
}
func (x *Post) GetTitle() string {
if x != nil {
return x.Title
}
return ""
}
func (x *Post) GetContent() string {
if x != nil {
return x.Content
}
return ""
}
func (x *Post) GetUserId() string {
if x != nil {
return x.UserId
}
return ""
}
var File_post_post_proto protoreflect.FileDescriptor
var file_post_post_proto_rawDesc = []byte{
0x0a, 0x0f, 0x70, 0x6f, 0x73, 0x74, 0x2f, 0x70, 0x6f, 0x73, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x12, 0x04, 0x70, 0x6f, 0x73, 0x74, 0x22, 0x20, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x50, 0x6f,
0x73, 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, 0x31, 0x0a, 0x0f, 0x47, 0x65, 0x74,
0x50, 0x6f, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1e, 0x0a, 0x04,
0x70, 0x6f, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x70, 0x6f, 0x73,
0x74, 0x2e, 0x50, 0x6f, 0x73, 0x74, 0x52, 0x04, 0x70, 0x6f, 0x73, 0x74, 0x22, 0x5f, 0x0a, 0x04,
0x50, 0x6f, 0x73, 0x74, 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, 0x18, 0x0a, 0x07, 0x63, 0x6f,
0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6e,
0x74, 0x65, 0x6e, 0x74, 0x12, 0x17, 0x0a, 0x07, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18,
0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x32, 0x47, 0x0a,
0x0b, 0x50, 0x6f, 0x73, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x38, 0x0a, 0x07,
0x47, 0x65, 0x74, 0x50, 0x6f, 0x73, 0x74, 0x12, 0x14, 0x2e, 0x70, 0x6f, 0x73, 0x74, 0x2e, 0x47,
0x65, 0x74, 0x50, 0x6f, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e,
0x70, 0x6f, 0x73, 0x74, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x6f, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70,
0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x58, 0x0a, 0x08, 0x63, 0x6f, 0x6d, 0x2e, 0x70, 0x6f,
0x73, 0x74, 0x42, 0x09, 0x50, 0x6f, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a,
0x11, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2f, 0x70, 0x6f, 0x73, 0x74, 0x3b, 0x70, 0x6f,
0x73, 0x74, 0xa2, 0x02, 0x03, 0x50, 0x58, 0x58, 0xaa, 0x02, 0x04, 0x50, 0x6f, 0x73, 0x74, 0xca,
0x02, 0x04, 0x50, 0x6f, 0x73, 0x74, 0xe2, 0x02, 0x10, 0x50, 0x6f, 0x73, 0x74, 0x5c, 0x47, 0x50,
0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x04, 0x50, 0x6f, 0x73, 0x74,
0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_post_post_proto_rawDescOnce sync.Once
file_post_post_proto_rawDescData = file_post_post_proto_rawDesc
)
func file_post_post_proto_rawDescGZIP() []byte {
file_post_post_proto_rawDescOnce.Do(func() {
file_post_post_proto_rawDescData = protoimpl.X.CompressGZIP(file_post_post_proto_rawDescData)
})
return file_post_post_proto_rawDescData
}
var file_post_post_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
var file_post_post_proto_goTypes = []interface{}{
(*GetPostRequest)(nil), // 0: post.GetPostRequest
(*GetPostResponse)(nil), // 1: post.GetPostResponse
(*Post)(nil), // 2: post.Post
}
var file_post_post_proto_depIdxs = []int32{
2, // 0: post.GetPostResponse.post:type_name -> post.Post
0, // 1: post.PostService.GetPost:input_type -> post.GetPostRequest
1, // 2: post.PostService.GetPost:output_type -> post.GetPostResponse
2, // [2:3] is the sub-list for method output_type
1, // [1:2] is the sub-list for method input_type
1, // [1:1] is the sub-list for extension type_name
1, // [1:1] is the sub-list for extension extendee
0, // [0:1] is the sub-list for field type_name
}
func init() { file_post_post_proto_init() }
func file_post_post_proto_init() {
if File_post_post_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_post_post_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetPostRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_post_post_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetPostResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_post_post_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Post); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_post_post_proto_rawDesc,
NumEnums: 0,
NumMessages: 3,
NumExtensions: 0,
NumServices: 1,
},
GoTypes: file_post_post_proto_goTypes,
DependencyIndexes: file_post_post_proto_depIdxs,
MessageInfos: file_post_post_proto_msgTypes,
}.Build()
File_post_post_proto = out.File
file_post_post_proto_rawDesc = nil
file_post_post_proto_goTypes = nil
file_post_post_proto_depIdxs = nil
}
================================================
FILE: _examples/17_error_handler/post/post_grpc.pb.go
================================================
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.3.0
// - protoc (unknown)
// source: post/post.proto
package post
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 (
PostService_GetPost_FullMethodName = "/post.PostService/GetPost"
)
// PostServiceClient is the client API for PostService 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 PostServiceClient interface {
GetPost(ctx context.Context, in *GetPostRequest, opts ...grpc.CallOption) (*GetPostResponse, error)
}
type postServiceClient struct {
cc grpc.ClientConnInterface
}
func NewPostServiceClient(cc grpc.ClientConnInterface) PostServiceClient {
return &postServiceClient{cc}
}
func (c *postServiceClient) GetPost(ctx context.Context, in *GetPostRequest, opts ...grpc.CallOption) (*GetPostResponse, error) {
out := new(GetPostResponse)
err := c.cc.Invoke(ctx, PostService_GetPost_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// PostServiceServer is the server API for PostService service.
// All implementations must embed UnimplementedPostServiceServer
// for forward compatibility
type PostServiceServer interface {
GetPost(context.Context, *GetPostRequest) (*GetPostResponse, error)
mustEmbedUnimplementedPostServiceServer()
}
// UnimplementedPostServiceServer must be embedded to have forward compatible implementations.
type UnimplementedPostServiceServer struct {
}
func (UnimplementedPostServiceServer) GetPost(context.Context, *GetPostRequest) (*GetPostResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetPost not implemented")
}
func (UnimplementedPostServiceServer) mustEmbedUnimplementedPostServiceServer() {}
// UnsafePostServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to PostServiceServer will
// result in compilation errors.
type UnsafePostServiceServer interface {
mustEmbedUnimplementedPostServiceServer()
}
func RegisterPostServiceServer(s grpc.ServiceRegistrar, srv PostServiceServer) {
s.RegisterService(&PostService_ServiceDesc, srv)
}
func _PostService_GetPost_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetPostRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(PostServiceServer).GetPost(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: PostService_GetPost_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(PostServiceServer).GetPost(ctx, req.(*GetPostRequest))
}
return interceptor(ctx, in, info, handler)
}
// PostService_ServiceDesc is the grpc.ServiceDesc for PostService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var PostService_ServiceDesc = grpc.ServiceDesc{
ServiceName: "post.PostService",
HandlerType: (*PostServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "GetPost",
Handler: _PostService_GetPost_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "post/post.proto",
}
================================================
FILE: _examples/17_error_handler/proto/buf.yaml
================================================
version: v1
breaking:
use:
- FILE
lint:
use:
- DEFAULT
================================================
FILE: _examples/17_error_handler/proto/federation/federation.proto
================================================
syntax = "proto3";
package org.federation;
import "grpc/federation/federation.proto";
option go_package = "example/federation;federation";
option (grpc.federation.file)= {
import: ["post/post.proto"]
};
service FederationService {
option (grpc.federation.service) = {};
rpc GetPost(GetPostRequest) returns (GetPostResponse) {};
rpc GetPost2(GetPost2Request) returns (GetPost2Response) {};
}
message GetPostRequest {
string id = 1;
}
message GetPostResponse {
option (grpc.federation.message) = {
def {
name: "post"
message {
name: "Post"
args { name: "id", by: "$.id" }
}
}
};
org.federation.Post post = 1 [(grpc.federation.field).by = "post"];
}
message Z {
option (grpc.federation.message) = {
def { name: "code" by: "$.error_info.code" }
};
int32 code = 1 [(grpc.federation.field).by = "code"];
}
message Post {
option (grpc.federation.message) = {
def [
{
name: "res"
call {
method: "post.PostService/GetPost"
request { field: "id" by: "$.id" }
error {
def { name: "id" by: "$.id" }
def { message { name: "Z" args { name: "error_info" by: "error" } }}
if: "error.precondition_failures[?0].violations[?0].subject == optional.of('bar') && error.localized_messages[?0].message == optional.of('hello') && error.custom_messages[?0].id == optional.of('xxx')"
code: FAILED_PRECONDITION
message: "'this is custom error message'"
details {
def { name: "localized_msg" message { name: "LocalizedMessage" args { name: "value" by: "id" } } }
def { message { name: "Z" args { name: "error_info" by: "error" } }}
message { name: "CustomMessage" args { name: "error_info" by: "error" } }
by: "post.Post{id: 'foo'}"
precondition_failure {
violations {
type: "'some-type'"
subject: "'some-subject'"
description: "'some-description'"
}
}
localized_message {
locale: "en-US"
message: "localized_msg.value"
}
}
}
error {
log_level: WARN
if: "error.code == google.rpc.Code.INVALID_ARGUMENT"
code: INVALID_ARGUMENT
message: "'this is custom log level'"
}
error {
if: "error.code == google.rpc.Code.UNIMPLEMENTED"
ignore_and_response: "post.GetPostResponse{post: post.Post{id: 'anonymous'}}"
}
error {
ignore: true
}
error {
code: CANCELLED
}
}
},
{ name: "post" by: "res.post" autobind: true },
{ if: "res.hasIgnoredError()" name: "code" by: "res.ignoredError().code" }
]
};
string id = 1;
string title = 2;
int32 code = 3 [(grpc.federation.field).by = "code"];
}
message LocalizedMessage {
string value = 1 [(grpc.federation.field).by = "'localized value:' + $.value"];
}
message CustomMessage {
string msg = 1 [(grpc.federation.field).by = "'custom error message:' + $.error_info.message"];
}
message GetPost2Request {
string id = 1;
}
message GetPost2Response {
option (grpc.federation.message) = {
def {
call {
method: "post.PostService/GetPost"
request { field: "id" by: "$.id" }
error {
def [
{ name: "code" by: "google.rpc.Code.from(error.code)" },
{ name: "msg" by: "error.message" }
]
if: "code == google.rpc.Code.FAILED_PRECONDITION"
log_level: WARN
}
error {
def [
{ name: "code2" by: "google.rpc.Code.from(error.code)" },
{ name: "msg2" by: "error.message" }
]
if: "code2 == google.rpc.Code.INTERNAL"
log_level: ERROR
}
}
}
};
}
================================================
FILE: _examples/17_error_handler/proto/post/post.proto
================================================
syntax = "proto3";
package post;
option go_package = "example/post;post";
service PostService {
rpc GetPost(GetPostRequest) returns (GetPostResponse) {};
}
message GetPostRequest {
string id = 1;
}
message GetPostResponse {
Post post = 1;
}
message Post {
string id = 1;
string title = 2;
string content = 3;
string user_id = 4;
}
================================================
FILE: _examples/18_load/.gitignore
================================================
grpc/federation
*.wasm
================================================
FILE: _examples/18_load/Makefile
================================================
MAKEFILE_DIR := $(dir $(lastword $(MAKEFILE_LIST)))
GOBIN := $(MAKEFILE_DIR)/../../bin
PATH := $(GOBIN):$(PATH)
JAEGER_IMAGE := jaegertracing/all-in-one:latest
.PHONY: generate
generate:
$(GOBIN)/buf generate
.PHONY: lint
lint:
@$(GOBIN)/grpc-federation-linter -Iproto -Iproto_deps ./proto/federation/federation.proto
.PHONY: test
test: build/wasm
go test -race ./ -count=1
.PHONY: grpc-federation/generate
grpc-federation/generate:
@$(GOBIN)/grpc-federation-generator ./proto/federation/federation.proto
.PHONY: grpc-federation/watch
grpc-federation/watch:
@$(GOBIN)/grpc-federation-generator -w
.PHONY: jaeger/start
jaeger/start:
@docker run \
-e COLLECTOR_OTLP_ENABLED=true \
-p 16686:16686 \
-p 4317:4317 \
-p 4318:4318 \
-d \
$(JAEGER_IMAGE)
.PHONY: jaeger/stop
jaeger/stop:
@docker stop $(shell docker ps -q --filter ancestor=$(JAEGER_IMAGE))
build/wasm:
GOOS=wasip1 GOARCH=wasm go build -ldflags "-w -s" -o account.wasm ./cmd/plugin
.PHONY: bench
bench:
go test -bench=. -run Benchmark -benchmem -cpuprofile cpu.out --memprofile mem.out
.PHONY: bench/graph
bench/graph: bench
go tool pprof --svg cpu.out
go tool pprof --svg mem.out
================================================
FILE: _examples/18_load/buf.gen.yaml
================================================
version: v1
managed:
enabled: true
plugins:
- plugin: go
out: .
opt: paths=source_relative
- plugin: go-grpc
out: .
opt: paths=source_relative
- plugin: grpc-federation
out: .
opt:
- paths=source_relative
- import_paths=proto
================================================
FILE: _examples/18_load/buf.work.yaml
================================================
version: v1
directories:
- proto
- proto_deps
================================================
FILE: _examples/18_load/cmd/plugin/main.go
================================================
package main
import (
"context"
pluginpb "example/plugin"
"fmt"
"google.golang.org/grpc/metadata"
)
type plugin struct{}
func (_ *plugin) Example_Account_GetId(ctx context.Context) (string, error) {
md, ok := metadata.FromIncomingContext(ctx)
if !ok {
return "", fmt.Errorf("failed to get metadata")
}
values := md["id"]
if len(values) == 0 {
return "", fmt.Errorf("failed to find id key in metadata")
}
return values[0], nil
}
func (_ *plugin) Example_Account_GetId2(ctx context.Context, ext string) (string, error) {
md, ok := metadata.FromIncomingContext(ctx)
if !ok {
return "", fmt.Errorf("failed to get metadata")
}
values := md["id"]
if len(values) == 0 {
return "", fmt.Errorf("failed to find id key in metadata")
}
return values[0], nil
}
func main() {
pluginpb.RegisterAccountPlugin(&plugin{})
}
================================================
FILE: _examples/18_load/federation/federation.pb.go
================================================
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.33.0
// protoc (unknown)
// source: federation/federation.proto
package federation
import (
_ "github.com/mercari/grpc-federation/grpc/federation"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
type GetRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
}
func (x *GetRequest) Reset() {
*x = GetRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_federation_federation_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GetRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetRequest) ProtoMessage() {}
func (x *GetRequest) ProtoReflect() protoreflect.Message {
mi := &file_federation_federation_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GetRequest.ProtoReflect.Descriptor instead.
func (*GetRequest) Descriptor() ([]byte, []int) {
return file_federation_federation_proto_rawDescGZIP(), []int{0}
}
type GetResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
IdFromPlugin string `protobuf:"bytes,1,opt,name=id_from_plugin,json=idFromPlugin,proto3" json:"id_from_plugin,omitempty"`
IdFromMetadata string `protobuf:"bytes,2,opt,name=id_from_metadata,json=idFromMetadata,proto3" json:"id_from_metadata,omitempty"`
}
func (x *GetResponse) Reset() {
*x = GetResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_federation_federation_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GetResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetResponse) ProtoMessage() {}
func (x *GetResponse) ProtoReflect() protoreflect.Message {
mi := &file_federation_federation_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GetResponse.ProtoReflect.Descriptor instead.
func (*GetResponse) Descriptor() ([]byte, []int) {
return file_federation_federation_proto_rawDescGZIP(), []int{1}
}
func (x *GetResponse) GetIdFromPlugin() string {
if x != nil {
return x.IdFromPlugin
}
return ""
}
func (x *GetResponse) GetIdFromMetadata() string {
if x != nil {
return x.IdFromMetadata
}
return ""
}
var File_federation_federation_proto protoreflect.FileDescriptor
var file_federation_federation_proto_rawDesc = []byte{
0x0a, 0x1b, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x66, 0x65, 0x64,
0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0e, 0x6f,
0x72, 0x67, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x20, 0x67,
0x72, 0x70, 0x63, 0x2f, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x66,
0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22,
0x0c, 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0xfc, 0x01,
0x0a, 0x0b, 0x47, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x39, 0x0a,
0x0e, 0x69, 0x64, 0x5f, 0x66, 0x72, 0x6f, 0x6d, 0x5f, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x18,
0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x13, 0x9a, 0x4a, 0x10, 0x12, 0x0e, 0x69, 0x64, 0x5f, 0x66,
0x72, 0x6f, 0x6d, 0x5f, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x52, 0x0c, 0x69, 0x64, 0x46, 0x72,
0x6f, 0x6d, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x12, 0x3f, 0x0a, 0x10, 0x69, 0x64, 0x5f, 0x66,
0x72, 0x6f, 0x6d, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01,
0x28, 0x09, 0x42, 0x15, 0x9a, 0x4a, 0x12, 0x12, 0x10, 0x69, 0x64, 0x5f, 0x66, 0x72, 0x6f, 0x6d,
0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x0e, 0x69, 0x64, 0x46, 0x72, 0x6f,
0x6d, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x3a, 0x71, 0x9a, 0x4a, 0x6e, 0x0a, 0x2a,
0x0a, 0x0e, 0x69, 0x64, 0x5f, 0x66, 0x72, 0x6f, 0x6d, 0x5f, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e,
0x5a, 0x18, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e,
0x74, 0x2e, 0x67, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x28, 0x29, 0x0a, 0x40, 0x0a, 0x10, 0x69, 0x64,
0x5f, 0x66, 0x72, 0x6f, 0x6d, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x5a, 0x2c,
0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e,
0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x69, 0x6e, 0x63, 0x6f, 0x6d, 0x69, 0x6e,
0x67, 0x28, 0x29, 0x5b, 0x27, 0x69, 0x64, 0x27, 0x5d, 0x5b, 0x30, 0x5d, 0x32, 0x5a, 0x0a, 0x11,
0x46, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63,
0x65, 0x12, 0x40, 0x0a, 0x03, 0x47, 0x65, 0x74, 0x12, 0x1a, 0x2e, 0x6f, 0x72, 0x67, 0x2e, 0x66,
0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x71,
0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x6f, 0x72, 0x67, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72,
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
0x65, 0x22, 0x00, 0x1a, 0x03, 0x9a, 0x4a, 0x00, 0x42, 0xb5, 0x01, 0x9a, 0x4a, 0x15, 0x12, 0x13,
0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2f, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x0a, 0x12, 0x63, 0x6f, 0x6d, 0x2e, 0x6f, 0x72, 0x67, 0x2e, 0x66, 0x65, 0x64,
0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x0f, 0x46, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74,
0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x1d, 0x65, 0x78, 0x61, 0x6d,
0x70, 0x6c, 0x65, 0x2f, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x3b, 0x66,
0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0xa2, 0x02, 0x03, 0x4f, 0x46, 0x58, 0xaa,
0x02, 0x0e, 0x4f, 0x72, 0x67, 0x2e, 0x46, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e,
0xca, 0x02, 0x0e, 0x4f, 0x72, 0x67, 0x5c, 0x46, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f,
0x6e, 0xe2, 0x02, 0x1a, 0x4f, 0x72, 0x67, 0x5c, 0x46, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69,
0x6f, 0x6e, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02,
0x0f, 0x4f, 0x72, 0x67, 0x3a, 0x3a, 0x46, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e,
0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_federation_federation_proto_rawDescOnce sync.Once
file_federation_federation_proto_rawDescData = file_federation_federation_proto_rawDesc
)
func file_federation_federation_proto_rawDescGZIP() []byte {
file_federation_federation_proto_rawDescOnce.Do(func() {
file_federation_federation_proto_rawDescData = protoimpl.X.CompressGZIP(file_federation_federation_proto_rawDescData)
})
return file_federation_federation_proto_rawDescData
}
var file_federation_federation_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
var file_federation_federation_proto_goTypes = []interface{}{
(*GetRequest)(nil), // 0: org.federation.GetRequest
(*GetResponse)(nil), // 1: org.federation.GetResponse
}
var file_federation_federation_proto_depIdxs = []int32{
0, // 0: org.federation.FederationService.Get:input_type -> org.federation.GetRequest
1, // 1: org.federation.FederationService.Get:output_type -> org.federation.GetResponse
1, // [1:2] is the sub-list for method output_type
0, // [0:1] is the sub-list for method input_type
0, // [0:0] is the sub-list for extension type_name
0, // [0:0] is the sub-list for extension extendee
0, // [0:0] is the sub-list for field type_name
}
func init() { file_federation_federation_proto_init() }
func file_federation_federation_proto_init() {
if File_federation_federation_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_federation_federation_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_federation_federation_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_federation_federation_proto_rawDesc,
NumEnums: 0,
NumMessages: 2,
NumExtensions: 0,
NumServices: 1,
},
GoTypes: file_federation_federation_proto_goTypes,
DependencyIndexes: file_federation_federation_proto_depIdxs,
MessageInfos: file_federation_federation_proto_msgTypes,
}.Build()
File_federation_federation_proto = out.File
file_federation_federation_proto_rawDesc = nil
file_federation_federation_proto_goTypes = nil
file_federation_federation_proto_depIdxs = nil
}
================================================
FILE: _examples/18_load/federation/federation_grpc.pb.go
================================================
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.3.0
// - protoc (unknown)
// source: federation/federation.proto
package federation
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 (
FederationService_Get_FullMethodName = "/org.federation.FederationService/Get"
)
// FederationServiceClient is the client API for FederationService 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 FederationServiceClient interface {
Get(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*GetResponse, error)
}
type federationServiceClient struct {
cc grpc.ClientConnInterface
}
func NewFederationServiceClient(cc grpc.ClientConnInterface) FederationServiceClient {
return &federationServiceClient{cc}
}
func (c *federationServiceClient) Get(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*GetResponse, error) {
out := new(GetResponse)
err := c.cc.Invoke(ctx, FederationService_Get_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// FederationServiceServer is the server API for FederationService service.
// All implementations must embed UnimplementedFederationServiceServer
// for forward compatibility
type FederationServiceServer interface {
Get(context.Context, *GetRequest) (*GetResponse, error)
mustEmbedUnimplementedFederationServiceServer()
}
// UnimplementedFederationServiceServer must be embedded to have forward compatible implementations.
type UnimplementedFederationServiceServer struct {
}
func (UnimplementedFederationServiceServer) Get(context.Context, *GetRequest) (*GetResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method Get not implemented")
}
func (UnimplementedFederationServiceServer) mustEmbedUnimplementedFederationServiceServer() {}
// UnsafeFederationServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to FederationServiceServer will
// result in compilation errors.
type UnsafeFederationServiceServer interface {
mustEmbedUnimplementedFederationServiceServer()
}
func RegisterFederationServiceServer(s grpc.ServiceRegistrar, srv FederationServiceServer) {
s.RegisterService(&FederationService_ServiceDesc, srv)
}
func _FederationService_Get_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(FederationServiceServer).Get(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: FederationService_Get_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(FederationServiceServer).Get(ctx, req.(*GetRequest))
}
return interceptor(ctx, in, info, handler)
}
// FederationService_ServiceDesc is the grpc.ServiceDesc for FederationService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var FederationService_ServiceDesc = grpc.ServiceDesc{
ServiceName: "org.federation.FederationService",
HandlerType: (*FederationServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "Get",
Handler: _FederationService_Get_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "federation/federation.proto",
}
================================================
FILE: _examples/18_load/federation/federation_grpc_federation.pb.go
================================================
// Code generated by protoc-gen-grpc-federation. DO NOT EDIT!
// versions:
//
// protoc-gen-grpc-federation: (devel)
//
// source: federation/federation.proto
package federation
import (
"context"
"io"
"log/slog"
"reflect"
grpcfed "github.com/mercari/grpc-federation/grpc/federation"
grpcfedcel "github.com/mercari/grpc-federation/grpc/federation/cel"
"go.opentelemetry.io/otel"
"go.opentelemetry.io/otel/trace"
)
var (
_ = reflect.Invalid // to avoid "imported and not used error"
)
// Org_Federation_GetResponseVariable represents variable definitions in "org.federation.GetResponse".
type FederationService_Org_Federation_GetResponseVariable struct {
IdFromMetadata string
IdFromPlugin string
}
// Org_Federation_GetResponseArgument is argument for "org.federation.GetResponse" message.
type FederationService_Org_Federation_GetResponseArgument struct {
FederationService_Org_Federation_GetResponseVariable
}
// FederationServiceConfig configuration required to initialize the service that use GRPC Federation.
type FederationServiceConfig struct {
// CELPlugin If you use the plugin feature to extend the CEL API,
// you must write a plugin and output WebAssembly.
// In this field, configure to load wasm with the path to the WebAssembly file and the sha256 value.
CELPlugin *FederationServiceCELPluginConfig
// ErrorHandler Federation Service often needs to convert errors received from downstream services.
// If an error occurs during method execution in the Federation Service, this error handler is called and the returned error is treated as a final error.
ErrorHandler grpcfed.ErrorHandler
// Logger sets the logger used to output Debug/Info/Error information.
Logger *slog.Logger
}
// FederationServiceClientFactory provides a factory that creates the gRPC Client needed to invoke methods of the gRPC Service on which the Federation Service depends.
type FederationServiceClientFactory interface {
}
// FederationServiceClientConfig helper to create gRPC client.
// Hints for creating a gRPC Client.
type FederationServiceClientConfig struct {
// Service FQDN ( `.` ) of the service on Protocol Buffers.
Service string
}
// FederationServiceDependentClientSet has a gRPC client for all services on which the federation service depends.
// This is provided as an argument when implementing the custom resolver.
type FederationServiceDependentClientSet struct {
}
// FederationServiceResolver provides an interface to directly implement message resolver and field resolver not defined in Protocol Buffers.
type FederationServiceResolver interface {
}
// FederationServiceCELPluginWasmConfig type alias for grpcfedcel.WasmConfig.
type FederationServiceCELPluginWasmConfig = grpcfedcel.WasmConfig
// FederationServiceCELPluginConfig hints for loading a WebAssembly based plugin.
type FederationServiceCELPluginConfig struct {
Account FederationServiceCELPluginWasmConfig
CacheDir string
}
// FederationServiceUnimplementedResolver a structure implemented to satisfy the Resolver interface.
// An Unimplemented error is always returned.
// This is intended for use when there are many Resolver interfaces that do not need to be implemented,
// by embedding them in a resolver structure that you have created.
type FederationServiceUnimplementedResolver struct{}
// FederationService represents Federation Service.
type FederationService struct {
UnimplementedFederationServiceServer
cfg FederationServiceConfig
logger *slog.Logger
isLogLevelDebug bool
errorHandler grpcfed.ErrorHandler
celCacheMap *grpcfed.CELCacheMap
tracer trace.Tracer
celTypeHelper *grpcfed.CELTypeHelper
celEnvOpts []grpcfed.CELEnvOption
celPlugins []*grpcfedcel.CELPlugin
client *FederationServiceDependentClientSet
}
// NewFederationService creates FederationService instance by FederationServiceConfig.
func NewFederationService(cfg FederationServiceConfig) (*FederationService, error) {
if cfg.CELPlugin == nil {
return nil, grpcfed.ErrCELPluginConfig
}
logger := cfg.Logger
if logger == nil {
logger = slog.New(slog.NewJSONHandler(io.Discard, nil))
}
tracer := otel.Tracer("org.federation.FederationService")
ctx := grpcfed.WithLogger(context.Background(), logger)
ctx = grpcfed.WithTracer(ctx, tracer)
errorHandler := cfg.ErrorHandler
if errorHandler == nil {
errorHandler = func(ctx context.Context, methodName string, err error) error { return err }
}
celTypeHelperFieldMap := grpcfed.CELTypeHelperFieldMap{
"grpc.federation.private.org.federation.GetResponseArgument": {},
}
celTypeHelper := grpcfed.NewCELTypeHelper("org.federation", celTypeHelperFieldMap)
var celEnvOpts []grpcfed.CELEnvOption
celEnvOpts = append(celEnvOpts, grpcfed.NewDefaultEnvOptions(celTypeHelper)...)
var celPlugins []*grpcfedcel.CELPlugin
{
plugin, err := grpcfedcel.NewCELPlugin(ctx, grpcfedcel.CELPluginConfig{
Name: "account",
Wasm: cfg.CELPlugin.Account,
CacheDir: cfg.CELPlugin.CacheDir,
Functions: []*grpcfedcel.CELFunction{
{
Name: "example.account.get_id",
ID: "example_account_get_id_string",
Args: []*grpcfed.CELTypeDeclare{},
Return: grpcfed.CELStringType,
IsMethod: false,
},
{
Name: "example.account.get_id",
ID: "example_account_get_id_string_string",
Args: []*grpcfed.CELTypeDeclare{
grpcfed.CELStringType,
},
Return: grpcfed.CELStringType,
IsMethod: false,
},
},
Capability: &grpcfedcel.CELPluginCapability{},
})
if err != nil {
return nil, err
}
instance, err := plugin.CreateInstance(ctx, celTypeHelper.CELRegistry())
if err != nil {
return nil, err
}
if err := instance.ValidatePlugin(ctx); err != nil {
return nil, err
}
celPlugins = append(celPlugins, plugin)
celEnvOpts = append(celEnvOpts, grpcfed.CELLib(plugin))
}
svc := &FederationService{
cfg: cfg,
logger: logger,
isLogLevelDebug: logger.Enabled(context.Background(), slog.LevelDebug),
errorHandler: errorHandler,
celEnvOpts: celEnvOpts,
celTypeHelper: celTypeHelper,
celCacheMap: grpcfed.NewCELCacheMap(),
tracer: tracer,
celPlugins: celPlugins,
client: &FederationServiceDependentClientSet{},
}
return svc, nil
}
// CleanupFederationService cleanup all resources to prevent goroutine leaks.
func CleanupFederationService(ctx context.Context, svc *FederationService) {
svc.cleanup(ctx)
}
func (s *FederationService) cleanup(ctx context.Context) {
for _, plugin := range s.celPlugins {
plugin.Close()
}
}
// Get implements "org.federation.FederationService/Get" method.
func (s *FederationService) Get(ctx context.Context, req *GetRequest) (res *GetResponse, e error) {
ctx, span := s.tracer.Start(ctx, "org.federation.FederationService/Get")
defer span.End()
ctx = grpcfed.WithLogger(ctx, s.logger)
ctx = grpcfed.WithCELCacheMap(ctx, s.celCacheMap)
defer func() {
if r := recover(); r != nil {
e = grpcfed.RecoverError(r, grpcfed.StackTrace())
grpcfed.OutputErrorLog(ctx, e)
}
}()
defer func() {
for _, celPlugin := range s.celPlugins {
celPlugin.Cleanup()
}
}()
res, err := s.resolve_Org_Federation_GetResponse(ctx, &FederationService_Org_Federation_GetResponseArgument{})
if err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
grpcfed.OutputErrorLog(ctx, err)
return nil, err
}
return res, nil
}
// resolve_Org_Federation_GetResponse resolve "org.federation.GetResponse" message.
func (s *FederationService) resolve_Org_Federation_GetResponse(ctx context.Context, req *FederationService_Org_Federation_GetResponseArgument) (*GetResponse, error) {
ctx, span := s.tracer.Start(ctx, "org.federation.GetResponse")
defer span.End()
ctx = grpcfed.WithLogger(ctx, grpcfed.Logger(ctx), grpcfed.LogAttrs(ctx)...)
grpcfed.Logger(ctx).DebugContext(ctx, "resolve org.federation.GetResponse", slog.Any("message_args", s.logvalue_Org_Federation_GetResponseArgument(req)))
type localValueType struct {
*grpcfed.LocalValue
vars struct {
IdFromMetadata string
IdFromPlugin string
}
}
value := &localValueType{LocalValue: grpcfed.NewLocalValue(ctx, s.celEnvOpts, "grpc.federation.private.org.federation.GetResponseArgument", req)}
ctx = grpcfed.WithLocalValue(ctx, value.LocalValue)
/*
def {
name: "id_from_plugin"
by: "example.account.get_id()"
}
*/
def_id_from_plugin := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[string, *localValueType]{
Name: `id_from_plugin`,
Type: grpcfed.CELStringType,
Setter: func(value *localValueType, v string) error {
value.vars.IdFromPlugin = v
return nil
},
By: `example.account.get_id()`,
ByCacheIndex: 1,
})
}
/*
def {
name: "id_from_metadata"
by: "grpc.federation.metadata.incoming()['id'][0]"
}
*/
def_id_from_metadata := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[string, *localValueType]{
Name: `id_from_metadata`,
Type: grpcfed.CELStringType,
Setter: func(value *localValueType, v string) error {
value.vars.IdFromMetadata = v
return nil
},
By: `grpc.federation.metadata.incoming()['id'][0]`,
ByCacheIndex: 2,
})
}
// A tree view of message dependencies is shown below.
/*
id_from_metadata ─┐
id_from_plugin ─┤
*/
eg, ctx1 := grpcfed.ErrorGroupWithContext(ctx)
grpcfed.GoWithRecover(eg, func() (any, error) {
if err := def_id_from_metadata(ctx1); err != nil {
grpcfed.RecordErrorToSpan(ctx1, err)
return nil, err
}
return nil, nil
})
grpcfed.GoWithRecover(eg, func() (any, error) {
if err := def_id_from_plugin(ctx1); err != nil {
grpcfed.RecordErrorToSpan(ctx1, err)
return nil, err
}
return nil, nil
})
if err := eg.Wait(); err != nil {
return nil, err
}
// assign named parameters to message arguments to pass to the custom resolver.
req.FederationService_Org_Federation_GetResponseVariable.IdFromMetadata = value.vars.IdFromMetadata
req.FederationService_Org_Federation_GetResponseVariable.IdFromPlugin = value.vars.IdFromPlugin
// create a message value to be returned.
ret := &GetResponse{}
// field binding section.
// (grpc.federation.field).by = "id_from_plugin"
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[string]{
Value: value,
Expr: `id_from_plugin`,
CacheIndex: 3,
Setter: func(v string) error {
ret.IdFromPlugin = v
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
// (grpc.federation.field).by = "id_from_metadata"
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[string]{
Value: value,
Expr: `id_from_metadata`,
CacheIndex: 4,
Setter: func(v string) error {
ret.IdFromMetadata = v
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
grpcfed.Logger(ctx).DebugContext(ctx, "resolved org.federation.GetResponse", slog.Any("org.federation.GetResponse", s.logvalue_Org_Federation_GetResponse(ret)))
return ret, nil
}
func (s *FederationService) logvalue_Org_Federation_GetResponse(v *GetResponse) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.String("id_from_plugin", v.GetIdFromPlugin()),
slog.String("id_from_metadata", v.GetIdFromMetadata()),
)
}
func (s *FederationService) logvalue_Org_Federation_GetResponseArgument(v *FederationService_Org_Federation_GetResponseArgument) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue()
}
================================================
FILE: _examples/18_load/go.mod
================================================
module example
go 1.24.0
replace github.com/mercari/grpc-federation => ../../
require (
github.com/google/go-cmp v0.7.0
github.com/mercari/grpc-federation v0.0.0-00010101000000-000000000000
go.opentelemetry.io/otel v1.24.0
go.opentelemetry.io/otel/trace v1.24.0
go.uber.org/goleak v1.3.0
google.golang.org/genproto/googleapis/rpc v0.0.0-20240826202546-f6391c0de4c7
google.golang.org/grpc v1.65.0
google.golang.org/protobuf v1.34.2
)
require (
cel.dev/expr v0.19.1 // indirect
github.com/antlr4-go/antlr/v4 v4.13.0 // indirect
github.com/cenkalti/backoff/v4 v4.2.1 // indirect
github.com/go-logr/logr v1.4.1 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
github.com/goccy/wasi-go v0.3.2 // indirect
github.com/google/cel-go v0.23.1 // indirect
github.com/google/uuid v1.6.0 // indirect
github.com/kelseyhightower/envconfig v1.4.0 // indirect
github.com/stealthrocket/wazergo v0.19.1 // indirect
github.com/stoewer/go-strcase v1.3.0 // indirect
github.com/tetratelabs/wazero v1.10.1 // indirect
go.opentelemetry.io/otel/metric v1.24.0 // indirect
golang.org/x/exp v0.0.0-20250506013437-ce4c2cf36ca6 // indirect
golang.org/x/net v0.38.0 // indirect
golang.org/x/sync v0.14.0 // indirect
golang.org/x/sys v0.37.0 // indirect
golang.org/x/text v0.23.0 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20240826202546-f6391c0de4c7 // indirect
)
================================================
FILE: _examples/18_load/go.sum
================================================
cel.dev/expr v0.19.1 h1:NciYrtDRIR0lNCnH1LFJegdjspNx9fI59O7TWcua/W4=
cel.dev/expr v0.19.1/go.mod h1:MrpN08Q+lEBs+bGYdLxxHkZoUSsCp0nSKTs0nTymJgw=
github.com/antlr4-go/antlr/v4 v4.13.0 h1:lxCg3LAv+EUK6t1i0y1V6/SLeUi0eKEKdhQAlS8TVTI=
github.com/antlr4-go/antlr/v4 v4.13.0/go.mod h1:pfChB/xh/Unjila75QW7+VU4TSnWnnk9UTnmpPaOR2g=
github.com/cenkalti/backoff/v4 v4.2.1 h1:y4OZtCnogmCPw98Zjyt5a6+QwPLGkiQsYW5oUqylYbM=
github.com/cenkalti/backoff/v4 v4.2.1/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A=
github.com/go-logr/logr v1.4.1 h1:pKouT5E8xu9zeFC39JXRDukb6JFQPXM5p5I91188VAQ=
github.com/go-logr/logr v1.4.1/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY=
github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag=
github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE=
github.com/goccy/wasi-go v0.3.2 h1:wAvGXmqCkfcp0B0AwIp5Ya53hzDwkKm9W8iuT3nCCz0=
github.com/goccy/wasi-go v0.3.2/go.mod h1:nIKD204n9xa4Z20UV+XA483kIr9TAl2vXr+X5qVAO5M=
github.com/google/cel-go v0.23.1 h1:91ThhEZlBcE5rB2adBVXqvDoqdL8BG2oyhd0bK1I/r4=
github.com/google/cel-go v0.23.1/go.mod h1:52Pb6QsDbC5kvgxvZhiL9QX1oZEkcUF/ZqaPx1J5Wwo=
github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8=
github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU=
github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/kelseyhightower/envconfig v1.4.0 h1:Im6hONhd3pLkfDFsbRgu68RDNkGF1r3dvMUtDTo2cv8=
github.com/kelseyhightower/envconfig v1.4.0/go.mod h1:cccZRl6mQpaq41TPp5QxidR+Sa3axMbJDNb//FQX6Gg=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/stealthrocket/wazergo v0.19.1 h1:BPrITETPgSFwiytwmToO0MbUC/+RGC39JScz1JmmG6c=
github.com/stealthrocket/wazergo v0.19.1/go.mod h1:riI0hxw4ndZA5e6z7PesHg2BtTftcZaMxRcoiGGipTs=
github.com/stoewer/go-strcase v1.3.0 h1:g0eASXYtp+yvN9fK8sH94oCIk0fau9uV1/ZdJ0AVEzs=
github.com/stoewer/go-strcase v1.3.0/go.mod h1:fAH5hQ5pehh+j3nZfvwdk2RgEgQjAoM8wodgtPmh1xo=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=
github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo=
github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk=
github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
github.com/tetratelabs/wazero v1.10.1 h1:2DugeJf6VVk58KTPszlNfeeN8AhhpwcZqkJj2wwFuH8=
github.com/tetratelabs/wazero v1.10.1/go.mod h1:DRm5twOQ5Gr1AoEdSi0CLjDQF1J9ZAuyqFIjl1KKfQU=
go.opentelemetry.io/otel v1.24.0 h1:0LAOdjNmQeSTzGBzduGe/rU4tZhMwL5rWgtp9Ku5Jfo=
go.opentelemetry.io/otel v1.24.0/go.mod h1:W7b9Ozg4nkF5tWI5zsXkaKKDjdVjpD4oAt9Qi/MArHo=
go.opentelemetry.io/otel/metric v1.24.0 h1:6EhoGWWK28x1fbpA4tYTOWBkPefTDQnb8WSGXlc88kI=
go.opentelemetry.io/otel/metric v1.24.0/go.mod h1:VYhLe1rFfxuTXLgj4CBiyz+9WYBA8pNGJgDcSFRKBco=
go.opentelemetry.io/otel/trace v1.24.0 h1:CsKnnL4dUAr/0llH9FKuc698G04IrpWV0MQA/Y1YELI=
go.opentelemetry.io/otel/trace v1.24.0/go.mod h1:HPc3Xr/cOApsBI154IU0OI0HJexz+aw5uPdbs3UCjNU=
go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto=
go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE=
golang.org/x/exp v0.0.0-20250506013437-ce4c2cf36ca6 h1:y5zboxd6LQAqYIhHnB48p0ByQ/GnQx2BE33L8BOHQkI=
golang.org/x/exp v0.0.0-20250506013437-ce4c2cf36ca6/go.mod h1:U6Lno4MTRCDY+Ba7aCcauB9T60gsv5s4ralQzP72ZoQ=
golang.org/x/net v0.38.0 h1:vRMAPTMaeGqVhG5QyLJHqNDwecKTomGeqbnfZyKlBI8=
golang.org/x/net v0.38.0/go.mod h1:ivrbrMbzFq5J41QOQh0siUuly180yBYtLp+CKbEaFx8=
golang.org/x/sync v0.14.0 h1:woo0S4Yywslg6hp4eUFjTVOyKt0RookbpAHG4c1HmhQ=
golang.org/x/sync v0.14.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA=
golang.org/x/sys v0.37.0 h1:fdNQudmxPjkdUTPnLn5mdQv7Zwvbvpaxqs831goi9kQ=
golang.org/x/sys v0.37.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks=
golang.org/x/text v0.23.0 h1:D71I7dUrlY+VX0gQShAThNGHFxZ13dGLBHQLVl1mJlY=
golang.org/x/text v0.23.0/go.mod h1:/BLNzu4aZCJ1+kcD0DNRotWKage4q2rGVAg4o22unh4=
google.golang.org/genproto/googleapis/api v0.0.0-20240826202546-f6391c0de4c7 h1:YcyjlL1PRr2Q17/I0dPk2JmYS5CDXfcdb2Z3YRioEbw=
google.golang.org/genproto/googleapis/api v0.0.0-20240826202546-f6391c0de4c7/go.mod h1:OCdP9MfskevB/rbYvHTsXTtKC+3bHWajPdoKgjcYkfo=
google.golang.org/genproto/googleapis/rpc v0.0.0-20240826202546-f6391c0de4c7 h1:2035KHhUv+EpyB+hWgJnaWKJOdX1E95w2S8Rr4uWKTs=
google.golang.org/genproto/googleapis/rpc v0.0.0-20240826202546-f6391c0de4c7/go.mod h1:UqMtugtsSgubUsoxbuAoiCXvqvErP7Gf0so0mK9tHxU=
google.golang.org/grpc v1.65.0 h1:bs/cUb4lp1G5iImFFd3u5ixQzweKizoZJAwBNLR42lc=
google.golang.org/grpc v1.65.0/go.mod h1:WgYC2ypjlB0EiQi6wdKixMqukr6lBc0Vo+oOgjrM5ZQ=
google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg=
google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
================================================
FILE: _examples/18_load/main_test.go
================================================
package main_test
import (
"bytes"
"context"
"crypto/sha256"
_ "embed"
"encoding/hex"
"fmt"
"log/slog"
"net"
"os"
"sync"
"testing"
"github.com/google/go-cmp/cmp"
"github.com/google/go-cmp/cmp/cmpopts"
"go.uber.org/goleak"
"google.golang.org/grpc"
"google.golang.org/grpc/credentials/insecure"
"google.golang.org/grpc/metadata"
"google.golang.org/grpc/test/bufconn"
"example/federation"
)
const bufSize = 1024
var (
listener *bufconn.Listener
//go:embed account.wasm
wasm []byte
)
func dialer(ctx context.Context, address string) (net.Conn, error) {
return listener.Dial()
}
func toSha256(v []byte) string {
hash := sha256.Sum256(v)
return hex.EncodeToString(hash[:])
}
func TestCELEvaluation(t *testing.T) {
defer goleak.VerifyNone(t)
ctx := context.Background()
listener = bufconn.Listen(bufSize)
conn, err := grpc.DialContext(
ctx, "",
grpc.WithContextDialer(dialer),
grpc.WithTransportCredentials(insecure.NewCredentials()),
grpc.WithDefaultCallOptions(grpc.WaitForReady(true)),
)
if err != nil {
t.Fatal(err)
}
defer conn.Close()
grpcServer := grpc.NewServer()
defer grpcServer.Stop()
logger := slog.New(slog.NewJSONHandler(os.Stdout, &slog.HandlerOptions{
Level: slog.LevelDebug,
}))
federationServer, err := federation.NewFederationService(federation.FederationServiceConfig{
CELPlugin: &federation.FederationServiceCELPluginConfig{
Account: federation.FederationServiceCELPluginWasmConfig{
Reader: bytes.NewReader(wasm),
Sha256: toSha256(wasm),
},
},
Logger: logger,
})
if err != nil {
t.Fatal(err)
}
defer federation.CleanupFederationService(ctx, federationServer)
federation.RegisterFederationServiceServer(grpcServer, federationServer)
go func() {
if err := grpcServer.Serve(listener); err != nil {
t.Fatal(err)
}
}()
client := federation.NewFederationServiceClient(conn)
var wg sync.WaitGroup
for i := 0; i < 50; i++ {
i := i
wg.Add(1)
go func() {
defer wg.Done()
id := "foo" + fmt.Sprint(i)
ctx := metadata.AppendToOutgoingContext(context.Background(), "id", id)
res, err := client.Get(ctx, &federation.GetRequest{})
if err != nil {
t.Fatal(err)
}
if diff := cmp.Diff(res, &federation.GetResponse{
IdFromPlugin: id,
IdFromMetadata: id,
}, cmpopts.IgnoreUnexported(
federation.GetResponse{},
)); diff != "" {
t.Errorf("(-got, +want)\n%s", diff)
}
}()
}
wg.Wait()
}
func Benchmark_CELEvaluation(b *testing.B) {
ctx := context.Background()
listener = bufconn.Listen(bufSize)
conn, err := grpc.DialContext(
ctx, "",
grpc.WithContextDialer(dialer),
grpc.WithTransportCredentials(insecure.NewCredentials()),
grpc.WithDefaultCallOptions(grpc.WaitForReady(true)),
)
if err != nil {
b.Fatal(err)
}
defer conn.Close()
grpcServer := grpc.NewServer()
logger := slog.New(slog.NewJSONHandler(os.Stdout, &slog.HandlerOptions{
Level: slog.LevelDebug,
}))
federationServer, err := federation.NewFederationService(federation.FederationServiceConfig{
CELPlugin: &federation.FederationServiceCELPluginConfig{
Account: federation.FederationServiceCELPluginWasmConfig{
Reader: bytes.NewReader(wasm),
Sha256: toSha256(wasm),
},
},
Logger: logger,
})
if err != nil {
b.Fatal(err)
}
federation.RegisterFederationServiceServer(grpcServer, federationServer)
go func() {
if err := grpcServer.Serve(listener); err != nil {
b.Fatal(err)
}
}()
client := federation.NewFederationServiceClient(conn)
b.ReportAllocs()
var wg sync.WaitGroup
for n := 0; n < 1000; n++ {
n := n
wg.Add(1)
go func() {
defer wg.Done()
id := "foo" + fmt.Sprint(n)
ctx := metadata.AppendToOutgoingContext(context.Background(), "id", id)
res, err := client.Get(ctx, &federation.GetRequest{})
if err != nil {
b.Fatal(err)
}
if diff := cmp.Diff(res, &federation.GetResponse{
IdFromPlugin: id,
IdFromMetadata: id,
}, cmpopts.IgnoreUnexported(
federation.GetResponse{},
)); diff != "" {
b.Errorf("(-got, +want)\n%s", diff)
}
}()
}
wg.Wait()
}
================================================
FILE: _examples/18_load/plugin/plugin.pb.go
================================================
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.33.0
// protoc (unknown)
// source: plugin/plugin.proto
package pluginpb
import (
_ "github.com/mercari/grpc-federation/grpc/federation"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
var File_plugin_plugin_proto protoreflect.FileDescriptor
var file_plugin_plugin_proto_rawDesc = []byte{
0x0a, 0x13, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2f, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0f, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x61,
0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x1a, 0x20, 0x67, 0x72, 0x70, 0x63, 0x2f, 0x66, 0x65, 0x64,
0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69,
0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x42, 0x8f, 0x02, 0x9a, 0x4a, 0x74, 0x0a, 0x72,
0x0a, 0x70, 0x0a, 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x30, 0x0a, 0x06, 0x67,
0x65, 0x74, 0x5f, 0x69, 0x64, 0x12, 0x22, 0x67, 0x65, 0x74, 0x20, 0x69, 0x64, 0x20, 0x74, 0x65,
0x78, 0x74, 0x20, 0x66, 0x72, 0x6f, 0x6d, 0x20, 0x69, 0x6e, 0x63, 0x6f, 0x6d, 0x69, 0x6e, 0x67,
0x20, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x22, 0x02, 0x08, 0x01, 0x22, 0x33, 0x0a,
0x06, 0x67, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x12, 0x1a, 0x6f, 0x76, 0x65, 0x72, 0x6c, 0x6f, 0x61,
0x64, 0x20, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x67, 0x65, 0x74,
0x5f, 0x69, 0x64, 0x1a, 0x09, 0x0a, 0x03, 0x65, 0x78, 0x74, 0x1a, 0x02, 0x08, 0x01, 0x22, 0x02,
0x08, 0x01, 0x0a, 0x13, 0x63, 0x6f, 0x6d, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2e,
0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x42, 0x0b, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x50,
0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x17, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2f,
0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x3b, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x70, 0x62, 0xa2,
0x02, 0x03, 0x45, 0x41, 0x58, 0xaa, 0x02, 0x0f, 0x45, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2e,
0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0xca, 0x02, 0x0f, 0x45, 0x78, 0x61, 0x6d, 0x70, 0x6c,
0x65, 0x5c, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0xe2, 0x02, 0x1b, 0x45, 0x78, 0x61, 0x6d,
0x70, 0x6c, 0x65, 0x5c, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5c, 0x47, 0x50, 0x42, 0x4d,
0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x10, 0x45, 0x78, 0x61, 0x6d, 0x70, 0x6c,
0x65, 0x3a, 0x3a, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x33,
}
var file_plugin_plugin_proto_goTypes = []interface{}{}
var file_plugin_plugin_proto_depIdxs = []int32{
0, // [0:0] is the sub-list for method output_type
0, // [0:0] is the sub-list for method input_type
0, // [0:0] is the sub-list for extension type_name
0, // [0:0] is the sub-list for extension extendee
0, // [0:0] is the sub-list for field type_name
}
func init() { file_plugin_plugin_proto_init() }
func file_plugin_plugin_proto_init() {
if File_plugin_plugin_proto != nil {
return
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_plugin_plugin_proto_rawDesc,
NumEnums: 0,
NumMessages: 0,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_plugin_plugin_proto_goTypes,
DependencyIndexes: file_plugin_plugin_proto_depIdxs,
}.Build()
File_plugin_plugin_proto = out.File
file_plugin_plugin_proto_rawDesc = nil
file_plugin_plugin_proto_goTypes = nil
file_plugin_plugin_proto_depIdxs = nil
}
================================================
FILE: _examples/18_load/plugin/plugin_grpc_federation.pb.go
================================================
// Code generated by protoc-gen-grpc-federation. DO NOT EDIT!
// versions:
//
// protoc-gen-grpc-federation: (devel)
//
// source: plugin/plugin.proto
package pluginpb
import (
"context"
"fmt"
"reflect"
grpcfed "github.com/mercari/grpc-federation/grpc/federation"
)
var (
_ = reflect.Invalid // to avoid "imported and not used error"
)
type AccountPlugin interface {
Example_Account_GetId(context.Context) (string, error)
Example_Account_GetId2(context.Context, string) (string, error)
}
func RegisterAccountPlugin(plug AccountPlugin) {
grpcfed.PluginMainLoop(
grpcfed.CELPluginVersionSchema{
ProtocolVersion: grpcfed.CELPluginProtocolVersion,
FederationVersion: "(devel)",
Functions: []string{
"example_account_get_id_string",
"example_account_get_id_string_string",
},
},
func(ctx context.Context, req *grpcfed.CELPluginRequest) (*grpcfed.CELPluginResponse, error) {
switch req.GetMethod() {
case "example_account_get_id_string":
if len(req.GetArgs()) != 0 {
return nil, fmt.Errorf("%s: invalid argument number: %d. expected number is %d", req.GetMethod(), len(req.GetArgs()), 0)
}
ret, err := plug.Example_Account_GetId(ctx)
if err != nil {
return nil, err
}
return grpcfed.ToStringCELPluginResponse(ret)
case "example_account_get_id_string_string":
if len(req.GetArgs()) != 1 {
return nil, fmt.Errorf("%s: invalid argument number: %d. expected number is %d", req.GetMethod(), len(req.GetArgs()), 1)
}
arg0, err := grpcfed.ToString(req.GetArgs()[0])
if err != nil {
return nil, err
}
ret, err := plug.Example_Account_GetId2(ctx, arg0)
if err != nil {
return nil, err
}
return grpcfed.ToStringCELPluginResponse(ret)
}
return nil, fmt.Errorf("unexpected method name: %s", req.GetMethod())
},
)
}
================================================
FILE: _examples/18_load/proto/buf.yaml
================================================
version: v1
breaking:
use:
- FILE
lint:
use:
- DEFAULT
================================================
FILE: _examples/18_load/proto/federation/federation.proto
================================================
syntax = "proto3";
package org.federation;
import "grpc/federation/federation.proto";
option go_package = "example/federation;federation";
option (grpc.federation.file) = {
import: [
"plugin/plugin.proto"
]
};
service FederationService {
option (grpc.federation.service) = {};
rpc Get(GetRequest) returns (GetResponse) {};
}
message GetRequest {}
message GetResponse {
option (grpc.federation.message) = {
def { name: "id_from_plugin" by: "example.account.get_id()" }
def { name: "id_from_metadata" by: "grpc.federation.metadata.incoming()['id'][0]" }
};
string id_from_plugin = 1 [(grpc.federation.field).by = "id_from_plugin"];
string id_from_metadata = 2 [(grpc.federation.field).by = "id_from_metadata"];
}
================================================
FILE: _examples/18_load/proto/plugin/plugin.proto
================================================
syntax = "proto3";
package example.account;
import "grpc/federation/federation.proto";
option go_package = "example/plugin;pluginpb";
option (grpc.federation.file).plugin.export = {
name: "account"
functions: [
{
name: "get_id"
desc: "get id text from incoming metadata"
return { kind: STRING }
},
{
name: "get_id"
desc: "overload method for get_id"
args { name: "ext" type { kind: STRING } }
return { kind: STRING }
}
]
};
================================================
FILE: _examples/19_retry/.gitignore
================================================
grpc/federation
================================================
FILE: _examples/19_retry/.vscode/settings.json
================================================
{
"protoc": {
"options": [
"--proto_path=proto",
"--proto_path=proto_deps"
]
},
"grpc-federation": {
"path": "../../bin/grpc-federation-language-server",
"import-paths": [
"proto",
"proto_deps"
]
}
}
================================================
FILE: _examples/19_retry/Makefile
================================================
MAKEFILE_DIR := $(dir $(lastword $(MAKEFILE_LIST)))
GOBIN := $(MAKEFILE_DIR)/../../bin
PATH := $(GOBIN):$(PATH)
JAEGER_IMAGE := jaegertracing/all-in-one:latest
.PHONY: generate
generate:
$(GOBIN)/buf generate
.PHONY: lint
lint:
@$(GOBIN)/grpc-federation-linter -Iproto -Iproto_deps ./proto/federation/federation.proto
.PHONY: test
test:
go test -race ./ -count=1
.PHONY: grpc-federation/generate
grpc-federation/generate:
@$(GOBIN)/grpc-federation-generator ./proto/federation/federation.proto
.PHONY: grpc-federation/watch
grpc-federation/watch:
@$(GOBIN)/grpc-federation-generator -w
.PHONY: jaeger/start
jaeger/start:
@docker run \
-e COLLECTOR_OTLP_ENABLED=true \
-p 16686:16686 \
-p 4317:4317 \
-p 4318:4318 \
-d \
$(JAEGER_IMAGE)
.PHONY: jaeger/stop
jaeger/stop:
@docker stop $(shell docker ps -q --filter ancestor=$(JAEGER_IMAGE))
================================================
FILE: _examples/19_retry/buf.gen.yaml
================================================
version: v1
managed:
enabled: true
plugins:
- plugin: go
out: .
opt: paths=source_relative
- plugin: go-grpc
out: .
opt: paths=source_relative
- plugin: grpc-federation
out: .
opt:
- paths=source_relative
- import_paths=proto
================================================
FILE: _examples/19_retry/buf.work.yaml
================================================
version: v1
directories:
- proto
- proto_deps
================================================
FILE: _examples/19_retry/federation/federation.pb.go
================================================
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.33.0
// protoc (unknown)
// source: federation/federation.proto
package federation
import (
_ "github.com/mercari/grpc-federation/grpc/federation"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
_ "google.golang.org/protobuf/types/known/anypb"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
type GetPostRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
}
func (x *GetPostRequest) Reset() {
*x = GetPostRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_federation_federation_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GetPostRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetPostRequest) ProtoMessage() {}
func (x *GetPostRequest) ProtoReflect() protoreflect.Message {
mi := &file_federation_federation_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GetPostRequest.ProtoReflect.Descriptor instead.
func (*GetPostRequest) Descriptor() ([]byte, []int) {
return file_federation_federation_proto_rawDescGZIP(), []int{0}
}
func (x *GetPostRequest) GetId() string {
if x != nil {
return x.Id
}
return ""
}
type GetPostResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
}
func (x *GetPostResponse) Reset() {
*x = GetPostResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_federation_federation_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GetPostResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetPostResponse) ProtoMessage() {}
func (x *GetPostResponse) ProtoReflect() protoreflect.Message {
mi := &file_federation_federation_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GetPostResponse.ProtoReflect.Descriptor instead.
func (*GetPostResponse) Descriptor() ([]byte, []int) {
return file_federation_federation_proto_rawDescGZIP(), []int{1}
}
type Post struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
}
func (x *Post) Reset() {
*x = Post{}
if protoimpl.UnsafeEnabled {
mi := &file_federation_federation_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Post) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Post) ProtoMessage() {}
func (x *Post) ProtoReflect() protoreflect.Message {
mi := &file_federation_federation_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Post.ProtoReflect.Descriptor instead.
func (*Post) Descriptor() ([]byte, []int) {
return file_federation_federation_proto_rawDescGZIP(), []int{2}
}
var File_federation_federation_proto protoreflect.FileDescriptor
var file_federation_federation_proto_rawDesc = []byte{
0x0a, 0x1b, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x66, 0x65, 0x64,
0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0a, 0x66,
0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c,
0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6e, 0x79, 0x2e, 0x70,
0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x20, 0x67, 0x72, 0x70, 0x63, 0x2f, 0x66, 0x65, 0x64, 0x65, 0x72,
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e,
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x20, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x50, 0x6f, 0x73,
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, 0x32, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x50,
0x6f, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x3a, 0x1f, 0x9a, 0x4a, 0x1c,
0x0a, 0x1a, 0x0a, 0x04, 0x70, 0x6f, 0x73, 0x74, 0x6a, 0x12, 0x0a, 0x04, 0x50, 0x6f, 0x73, 0x74,
0x12, 0x0a, 0x0a, 0x02, 0x69, 0x64, 0x12, 0x04, 0x24, 0x2e, 0x69, 0x64, 0x22, 0x73, 0x0a, 0x04,
0x50, 0x6f, 0x73, 0x74, 0x3a, 0x6b, 0x9a, 0x4a, 0x68, 0x0a, 0x66, 0x72, 0x64, 0x0a, 0x18, 0x70,
0x6f, 0x73, 0x74, 0x2e, 0x50, 0x6f, 0x73, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f,
0x47, 0x65, 0x74, 0x50, 0x6f, 0x73, 0x74, 0x12, 0x0a, 0x0a, 0x02, 0x69, 0x64, 0x12, 0x04, 0x24,
0x2e, 0x69, 0x64, 0x1a, 0x03, 0x31, 0x30, 0x73, 0x22, 0x37, 0x1a, 0x2b, 0x65, 0x72, 0x72, 0x6f,
0x72, 0x2e, 0x63, 0x6f, 0x64, 0x65, 0x20, 0x21, 0x3d, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,
0x2e, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x6f, 0x64, 0x65, 0x2e, 0x55, 0x4e, 0x49, 0x4d, 0x50, 0x4c,
0x45, 0x4d, 0x45, 0x4e, 0x54, 0x45, 0x44, 0x0a, 0x08, 0x0a, 0x04, 0x33, 0x30, 0x6d, 0x73, 0x10,
0x03, 0x32, 0x5e, 0x0a, 0x11, 0x46, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53,
0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x44, 0x0a, 0x07, 0x47, 0x65, 0x74, 0x50, 0x6f, 0x73,
0x74, 0x12, 0x1a, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x47,
0x65, 0x74, 0x50, 0x6f, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e,
0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x6f,
0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x1a, 0x03, 0x9a, 0x4a,
0x00, 0x42, 0x9c, 0x01, 0x9a, 0x4a, 0x11, 0x12, 0x0f, 0x70, 0x6f, 0x73, 0x74, 0x2f, 0x70, 0x6f,
0x73, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x0a, 0x0e, 0x63, 0x6f, 0x6d, 0x2e, 0x66, 0x65,
0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x0f, 0x46, 0x65, 0x64, 0x65, 0x72, 0x61,
0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x1d, 0x65, 0x78, 0x61,
0x6d, 0x70, 0x6c, 0x65, 0x2f, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x3b,
0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0xa2, 0x02, 0x03, 0x46, 0x58, 0x58,
0xaa, 0x02, 0x0a, 0x46, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0xca, 0x02, 0x0a,
0x46, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0xe2, 0x02, 0x16, 0x46, 0x65, 0x64,
0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64,
0x61, 0x74, 0x61, 0xea, 0x02, 0x0a, 0x46, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e,
0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_federation_federation_proto_rawDescOnce sync.Once
file_federation_federation_proto_rawDescData = file_federation_federation_proto_rawDesc
)
func file_federation_federation_proto_rawDescGZIP() []byte {
file_federation_federation_proto_rawDescOnce.Do(func() {
file_federation_federation_proto_rawDescData = protoimpl.X.CompressGZIP(file_federation_federation_proto_rawDescData)
})
return file_federation_federation_proto_rawDescData
}
var file_federation_federation_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
var file_federation_federation_proto_goTypes = []interface{}{
(*GetPostRequest)(nil), // 0: federation.GetPostRequest
(*GetPostResponse)(nil), // 1: federation.GetPostResponse
(*Post)(nil), // 2: federation.Post
}
var file_federation_federation_proto_depIdxs = []int32{
0, // 0: federation.FederationService.GetPost:input_type -> federation.GetPostRequest
1, // 1: federation.FederationService.GetPost:output_type -> federation.GetPostResponse
1, // [1:2] is the sub-list for method output_type
0, // [0:1] is the sub-list for method input_type
0, // [0:0] is the sub-list for extension type_name
0, // [0:0] is the sub-list for extension extendee
0, // [0:0] is the sub-list for field type_name
}
func init() { file_federation_federation_proto_init() }
func file_federation_federation_proto_init() {
if File_federation_federation_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_federation_federation_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetPostRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_federation_federation_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetPostResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_federation_federation_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Post); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_federation_federation_proto_rawDesc,
NumEnums: 0,
NumMessages: 3,
NumExtensions: 0,
NumServices: 1,
},
GoTypes: file_federation_federation_proto_goTypes,
DependencyIndexes: file_federation_federation_proto_depIdxs,
MessageInfos: file_federation_federation_proto_msgTypes,
}.Build()
File_federation_federation_proto = out.File
file_federation_federation_proto_rawDesc = nil
file_federation_federation_proto_goTypes = nil
file_federation_federation_proto_depIdxs = nil
}
================================================
FILE: _examples/19_retry/federation/federation_grpc.pb.go
================================================
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.3.0
// - protoc (unknown)
// source: federation/federation.proto
package federation
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 (
FederationService_GetPost_FullMethodName = "/federation.FederationService/GetPost"
)
// FederationServiceClient is the client API for FederationService 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 FederationServiceClient interface {
GetPost(ctx context.Context, in *GetPostRequest, opts ...grpc.CallOption) (*GetPostResponse, error)
}
type federationServiceClient struct {
cc grpc.ClientConnInterface
}
func NewFederationServiceClient(cc grpc.ClientConnInterface) FederationServiceClient {
return &federationServiceClient{cc}
}
func (c *federationServiceClient) GetPost(ctx context.Context, in *GetPostRequest, opts ...grpc.CallOption) (*GetPostResponse, error) {
out := new(GetPostResponse)
err := c.cc.Invoke(ctx, FederationService_GetPost_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// FederationServiceServer is the server API for FederationService service.
// All implementations must embed UnimplementedFederationServiceServer
// for forward compatibility
type FederationServiceServer interface {
GetPost(context.Context, *GetPostRequest) (*GetPostResponse, error)
mustEmbedUnimplementedFederationServiceServer()
}
// UnimplementedFederationServiceServer must be embedded to have forward compatible implementations.
type UnimplementedFederationServiceServer struct {
}
func (UnimplementedFederationServiceServer) GetPost(context.Context, *GetPostRequest) (*GetPostResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetPost not implemented")
}
func (UnimplementedFederationServiceServer) mustEmbedUnimplementedFederationServiceServer() {}
// UnsafeFederationServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to FederationServiceServer will
// result in compilation errors.
type UnsafeFederationServiceServer interface {
mustEmbedUnimplementedFederationServiceServer()
}
func RegisterFederationServiceServer(s grpc.ServiceRegistrar, srv FederationServiceServer) {
s.RegisterService(&FederationService_ServiceDesc, srv)
}
func _FederationService_GetPost_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetPostRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(FederationServiceServer).GetPost(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: FederationService_GetPost_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(FederationServiceServer).GetPost(ctx, req.(*GetPostRequest))
}
return interceptor(ctx, in, info, handler)
}
// FederationService_ServiceDesc is the grpc.ServiceDesc for FederationService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var FederationService_ServiceDesc = grpc.ServiceDesc{
ServiceName: "federation.FederationService",
HandlerType: (*FederationServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "GetPost",
Handler: _FederationService_GetPost_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "federation/federation.proto",
}
================================================
FILE: _examples/19_retry/federation/federation_grpc_federation.pb.go
================================================
// Code generated by protoc-gen-grpc-federation. DO NOT EDIT!
// versions:
//
// protoc-gen-grpc-federation: (devel)
//
// source: federation/federation.proto
package federation
import (
"context"
"io"
"log/slog"
"reflect"
grpcfed "github.com/mercari/grpc-federation/grpc/federation"
grpcfedcel "github.com/mercari/grpc-federation/grpc/federation/cel"
"go.opentelemetry.io/otel"
"go.opentelemetry.io/otel/trace"
post "example/post"
)
var (
_ = reflect.Invalid // to avoid "imported and not used error"
)
// Federation_GetPostResponseVariable represents variable definitions in "federation.GetPostResponse".
type FederationService_Federation_GetPostResponseVariable struct {
}
// Federation_GetPostResponseArgument is argument for "federation.GetPostResponse" message.
type FederationService_Federation_GetPostResponseArgument struct {
Id string
FederationService_Federation_GetPostResponseVariable
}
// Federation_PostVariable represents variable definitions in "federation.Post".
type FederationService_Federation_PostVariable struct {
}
// Federation_PostArgument is argument for "federation.Post" message.
type FederationService_Federation_PostArgument struct {
Id string
FederationService_Federation_PostVariable
}
// FederationServiceConfig configuration required to initialize the service that use GRPC Federation.
type FederationServiceConfig struct {
// Client provides a factory that creates the gRPC Client needed to invoke methods of the gRPC Service on which the Federation Service depends.
// If this interface is not provided, an error is returned during initialization.
Client FederationServiceClientFactory // required
// ErrorHandler Federation Service often needs to convert errors received from downstream services.
// If an error occurs during method execution in the Federation Service, this error handler is called and the returned error is treated as a final error.
ErrorHandler grpcfed.ErrorHandler
// Logger sets the logger used to output Debug/Info/Error information.
Logger *slog.Logger
}
// FederationServiceClientFactory provides a factory that creates the gRPC Client needed to invoke methods of the gRPC Service on which the Federation Service depends.
type FederationServiceClientFactory interface {
// Post_PostServiceClient create a gRPC Client to be used to call methods in post.PostService.
Post_PostServiceClient(FederationServiceClientConfig) (post.PostServiceClient, error)
}
// FederationServiceClientConfig helper to create gRPC client.
// Hints for creating a gRPC Client.
type FederationServiceClientConfig struct {
// Service FQDN ( `.` ) of the service on Protocol Buffers.
Service string
}
// FederationServiceDependentClientSet has a gRPC client for all services on which the federation service depends.
// This is provided as an argument when implementing the custom resolver.
type FederationServiceDependentClientSet struct {
Post_PostServiceClient post.PostServiceClient
}
// FederationServiceResolver provides an interface to directly implement message resolver and field resolver not defined in Protocol Buffers.
type FederationServiceResolver interface {
}
// FederationServiceCELPluginWasmConfig type alias for grpcfedcel.WasmConfig.
type FederationServiceCELPluginWasmConfig = grpcfedcel.WasmConfig
// FederationServiceCELPluginConfig hints for loading a WebAssembly based plugin.
type FederationServiceCELPluginConfig struct {
CacheDir string
}
// FederationServiceUnimplementedResolver a structure implemented to satisfy the Resolver interface.
// An Unimplemented error is always returned.
// This is intended for use when there are many Resolver interfaces that do not need to be implemented,
// by embedding them in a resolver structure that you have created.
type FederationServiceUnimplementedResolver struct{}
const (
FederationService_DependentMethod_Post_PostService_GetPost = "/post.PostService/GetPost"
)
// FederationService represents Federation Service.
type FederationService struct {
UnimplementedFederationServiceServer
cfg FederationServiceConfig
logger *slog.Logger
isLogLevelDebug bool
errorHandler grpcfed.ErrorHandler
celCacheMap *grpcfed.CELCacheMap
tracer trace.Tracer
celTypeHelper *grpcfed.CELTypeHelper
celEnvOpts []grpcfed.CELEnvOption
celPlugins []*grpcfedcel.CELPlugin
client *FederationServiceDependentClientSet
}
// NewFederationService creates FederationService instance by FederationServiceConfig.
func NewFederationService(cfg FederationServiceConfig) (*FederationService, error) {
if cfg.Client == nil {
return nil, grpcfed.ErrClientConfig
}
Post_PostServiceClient, err := cfg.Client.Post_PostServiceClient(FederationServiceClientConfig{
Service: "post.PostService",
})
if err != nil {
return nil, err
}
logger := cfg.Logger
if logger == nil {
logger = slog.New(slog.NewJSONHandler(io.Discard, nil))
}
tracer := otel.Tracer("federation.FederationService")
ctx := grpcfed.WithLogger(context.Background(), logger)
ctx = grpcfed.WithTracer(ctx, tracer)
errorHandler := cfg.ErrorHandler
if errorHandler == nil {
errorHandler = func(ctx context.Context, methodName string, err error) error { return err }
}
celTypeHelperFieldMap := grpcfed.CELTypeHelperFieldMap{
"grpc.federation.private.federation.GetPostResponseArgument": {
"id": grpcfed.NewCELFieldType(grpcfed.CELStringType, "Id"),
},
"grpc.federation.private.federation.PostArgument": {
"id": grpcfed.NewCELFieldType(grpcfed.CELStringType, "Id"),
},
}
celTypeHelper := grpcfed.NewCELTypeHelper("federation", celTypeHelperFieldMap)
var celEnvOpts []grpcfed.CELEnvOption
celEnvOpts = append(celEnvOpts, grpcfed.NewDefaultEnvOptions(celTypeHelper)...)
celEnvOpts = append(celEnvOpts, grpcfed.GRPCErrorAccessorOptions(celTypeHelper, "post.GetPostResponse")...)
svc := &FederationService{
cfg: cfg,
logger: logger,
isLogLevelDebug: logger.Enabled(context.Background(), slog.LevelDebug),
errorHandler: errorHandler,
celEnvOpts: celEnvOpts,
celTypeHelper: celTypeHelper,
celCacheMap: grpcfed.NewCELCacheMap(),
tracer: tracer,
client: &FederationServiceDependentClientSet{
Post_PostServiceClient: Post_PostServiceClient,
},
}
return svc, nil
}
// CleanupFederationService cleanup all resources to prevent goroutine leaks.
func CleanupFederationService(ctx context.Context, svc *FederationService) {
svc.cleanup(ctx)
}
func (s *FederationService) cleanup(ctx context.Context) {
for _, plugin := range s.celPlugins {
plugin.Close()
}
}
// GetPost implements "federation.FederationService/GetPost" method.
func (s *FederationService) GetPost(ctx context.Context, req *GetPostRequest) (res *GetPostResponse, e error) {
ctx, span := s.tracer.Start(ctx, "federation.FederationService/GetPost")
defer span.End()
ctx = grpcfed.WithLogger(ctx, s.logger)
ctx = grpcfed.WithCELCacheMap(ctx, s.celCacheMap)
defer func() {
if r := recover(); r != nil {
e = grpcfed.RecoverError(r, grpcfed.StackTrace())
grpcfed.OutputErrorLog(ctx, e)
}
}()
defer func() {
for _, celPlugin := range s.celPlugins {
celPlugin.Cleanup()
}
}()
res, err := s.resolve_Federation_GetPostResponse(ctx, &FederationService_Federation_GetPostResponseArgument{
Id: req.GetId(),
})
if err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
grpcfed.OutputErrorLog(ctx, err)
return nil, err
}
return res, nil
}
// resolve_Federation_GetPostResponse resolve "federation.GetPostResponse" message.
func (s *FederationService) resolve_Federation_GetPostResponse(ctx context.Context, req *FederationService_Federation_GetPostResponseArgument) (*GetPostResponse, error) {
ctx, span := s.tracer.Start(ctx, "federation.GetPostResponse")
defer span.End()
ctx = grpcfed.WithLogger(ctx, grpcfed.Logger(ctx), grpcfed.LogAttrs(ctx)...)
grpcfed.Logger(ctx).DebugContext(ctx, "resolve federation.GetPostResponse", slog.Any("message_args", s.logvalue_Federation_GetPostResponseArgument(req)))
type localValueType struct {
*grpcfed.LocalValue
vars struct {
Post *Post
}
}
value := &localValueType{LocalValue: grpcfed.NewLocalValue(ctx, s.celEnvOpts, "grpc.federation.private.federation.GetPostResponseArgument", req)}
ctx = grpcfed.WithLocalValue(ctx, value.LocalValue)
/*
def {
name: "post"
message {
name: "Post"
args { name: "id", by: "$.id" }
}
}
*/
def_post := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[*Post, *localValueType]{
Name: `post`,
Type: grpcfed.CELObjectType("federation.Post"),
Setter: func(value *localValueType, v *Post) error {
value.vars.Post = v
return nil
},
Message: func(ctx context.Context, value *localValueType) (any, error) {
args := &FederationService_Federation_PostArgument{}
// { name: "id", by: "$.id" }
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[string]{
Value: value,
Expr: `$.id`,
CacheIndex: 1,
Setter: func(v string) error {
args.Id = v
return nil
},
}); err != nil {
return nil, err
}
ret, err := s.resolve_Federation_Post(ctx, args)
if err != nil {
return nil, err
}
return ret, nil
},
})
}
if err := def_post(ctx); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
// create a message value to be returned.
ret := &GetPostResponse{}
grpcfed.Logger(ctx).DebugContext(ctx, "resolved federation.GetPostResponse", slog.Any("federation.GetPostResponse", s.logvalue_Federation_GetPostResponse(ret)))
return ret, nil
}
// resolve_Federation_Post resolve "federation.Post" message.
func (s *FederationService) resolve_Federation_Post(ctx context.Context, req *FederationService_Federation_PostArgument) (*Post, error) {
ctx, span := s.tracer.Start(ctx, "federation.Post")
defer span.End()
ctx = grpcfed.WithLogger(ctx, grpcfed.Logger(ctx), grpcfed.LogAttrs(ctx)...)
grpcfed.Logger(ctx).DebugContext(ctx, "resolve federation.Post", slog.Any("message_args", s.logvalue_Federation_PostArgument(req)))
type localValueType struct {
*grpcfed.LocalValue
vars struct {
XDef0 *post.GetPostResponse
}
}
value := &localValueType{LocalValue: grpcfed.NewLocalValue(ctx, s.celEnvOpts, "grpc.federation.private.federation.PostArgument", req)}
ctx = grpcfed.WithLocalValue(ctx, value.LocalValue)
/*
def {
name: "_def0"
call {
method: "post.PostService/GetPost"
request { field: "id", by: "$.id" }
}
}
*/
def__def0 := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[*post.GetPostResponse, *localValueType]{
Name: `_def0`,
Type: grpcfed.CELObjectType("post.GetPostResponse"),
Setter: func(value *localValueType, v *post.GetPostResponse) error {
value.vars.XDef0 = v
return nil
},
Message: func(ctx context.Context, value *localValueType) (any, error) {
args := &post.GetPostRequest{}
// { field: "id", by: "$.id" }
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[string]{
Value: value,
Expr: `$.id`,
CacheIndex: 2,
Setter: func(v string) error {
args.Id = v
return nil
},
}); err != nil {
return nil, err
}
grpcfed.Logger(ctx).DebugContext(ctx, "call post.PostService/GetPost", slog.Any("post.GetPostRequest", s.logvalue_Post_GetPostRequest(args)))
ret, err := grpcfed.WithTimeout[post.GetPostResponse](ctx, "post.PostService/GetPost", 10000000000 /* 10s */, func(ctx context.Context) (*post.GetPostResponse, error) {
b := grpcfed.NewConstantBackOff(30000000) /* 30ms */
b = grpcfed.BackOffWithMaxRetries(b, 3)
b = grpcfed.BackOffWithContext(b, ctx)
return grpcfed.WithRetry(ctx, &grpcfed.RetryParam[post.GetPostResponse]{
Value: value,
If: `error.code != google.rpc.Code.UNIMPLEMENTED`,
CacheIndex: 3,
BackOff: b,
Body: func() (*post.GetPostResponse, error) {
return s.client.Post_PostServiceClient.GetPost(ctx, args)
},
})
})
if err != nil {
if err := s.errorHandler(ctx, FederationService_DependentMethod_Post_PostService_GetPost, err); err != nil {
return nil, grpcfed.NewErrorWithLogAttrs(err, slog.LevelError, grpcfed.LogAttrs(ctx))
}
}
return ret, nil
},
})
}
if err := def__def0(ctx); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
// create a message value to be returned.
ret := &Post{}
grpcfed.Logger(ctx).DebugContext(ctx, "resolved federation.Post", slog.Any("federation.Post", s.logvalue_Federation_Post(ret)))
return ret, nil
}
func (s *FederationService) logvalue_Federation_GetPostResponse(v *GetPostResponse) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue()
}
func (s *FederationService) logvalue_Federation_GetPostResponseArgument(v *FederationService_Federation_GetPostResponseArgument) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.String("id", v.Id),
)
}
func (s *FederationService) logvalue_Federation_Post(v *Post) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue()
}
func (s *FederationService) logvalue_Federation_PostArgument(v *FederationService_Federation_PostArgument) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.String("id", v.Id),
)
}
func (s *FederationService) logvalue_Post_GetPostRequest(v *post.GetPostRequest) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.String("id", v.GetId()),
)
}
func (s *FederationService) logvalue_Post_GetPostsRequest(v *post.GetPostsRequest) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.Any("ids", v.GetIds()),
)
}
================================================
FILE: _examples/19_retry/go.mod
================================================
module example
go 1.24.0
replace github.com/mercari/grpc-federation => ../../
require (
github.com/mercari/grpc-federation v0.0.0-00010101000000-000000000000
go.opentelemetry.io/otel v1.24.0
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.21.0
go.opentelemetry.io/otel/sdk v1.24.0
go.opentelemetry.io/otel/trace v1.24.0
go.uber.org/goleak v1.3.0
google.golang.org/genproto/googleapis/rpc v0.0.0-20240826202546-f6391c0de4c7
google.golang.org/grpc v1.65.0
google.golang.org/protobuf v1.34.2
)
require (
cel.dev/expr v0.19.1 // indirect
github.com/antlr4-go/antlr/v4 v4.13.0 // indirect
github.com/cenkalti/backoff/v4 v4.2.1 // indirect
github.com/go-logr/logr v1.4.1 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
github.com/goccy/wasi-go v0.3.2 // indirect
github.com/google/cel-go v0.23.1 // indirect
github.com/google/uuid v1.6.0 // indirect
github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0 // indirect
github.com/kelseyhightower/envconfig v1.4.0 // indirect
github.com/stealthrocket/wazergo v0.19.1 // indirect
github.com/stoewer/go-strcase v1.3.0 // indirect
github.com/tetratelabs/wazero v1.10.1 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.21.0 // indirect
go.opentelemetry.io/otel/metric v1.24.0 // indirect
go.opentelemetry.io/proto/otlp v1.0.0 // indirect
golang.org/x/exp v0.0.0-20250506013437-ce4c2cf36ca6 // indirect
golang.org/x/net v0.38.0 // indirect
golang.org/x/sync v0.14.0 // indirect
golang.org/x/sys v0.37.0 // indirect
golang.org/x/text v0.23.0 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20240826202546-f6391c0de4c7 // indirect
)
================================================
FILE: _examples/19_retry/go.sum
================================================
cel.dev/expr v0.19.1 h1:NciYrtDRIR0lNCnH1LFJegdjspNx9fI59O7TWcua/W4=
cel.dev/expr v0.19.1/go.mod h1:MrpN08Q+lEBs+bGYdLxxHkZoUSsCp0nSKTs0nTymJgw=
github.com/antlr4-go/antlr/v4 v4.13.0 h1:lxCg3LAv+EUK6t1i0y1V6/SLeUi0eKEKdhQAlS8TVTI=
github.com/antlr4-go/antlr/v4 v4.13.0/go.mod h1:pfChB/xh/Unjila75QW7+VU4TSnWnnk9UTnmpPaOR2g=
github.com/cenkalti/backoff/v4 v4.2.1 h1:y4OZtCnogmCPw98Zjyt5a6+QwPLGkiQsYW5oUqylYbM=
github.com/cenkalti/backoff/v4 v4.2.1/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A=
github.com/go-logr/logr v1.4.1 h1:pKouT5E8xu9zeFC39JXRDukb6JFQPXM5p5I91188VAQ=
github.com/go-logr/logr v1.4.1/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY=
github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag=
github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE=
github.com/goccy/wasi-go v0.3.2 h1:wAvGXmqCkfcp0B0AwIp5Ya53hzDwkKm9W8iuT3nCCz0=
github.com/goccy/wasi-go v0.3.2/go.mod h1:nIKD204n9xa4Z20UV+XA483kIr9TAl2vXr+X5qVAO5M=
github.com/golang/glog v1.2.1 h1:OptwRhECazUx5ix5TTWC3EZhsZEHWcYWY4FQHTIubm4=
github.com/golang/glog v1.2.1/go.mod h1:6AhwSGph0fcJtXVM/PEHPqZlFeoLxhs7/t5UDAwmO+w=
github.com/google/cel-go v0.23.1 h1:91ThhEZlBcE5rB2adBVXqvDoqdL8BG2oyhd0bK1I/r4=
github.com/google/cel-go v0.23.1/go.mod h1:52Pb6QsDbC5kvgxvZhiL9QX1oZEkcUF/ZqaPx1J5Wwo=
github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8=
github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU=
github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0 h1:YBftPWNWd4WwGqtY2yeZL2ef8rHAxPBD8KFhJpmcqms=
github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0/go.mod h1:YN5jB8ie0yfIUg6VvR9Kz84aCaG7AsGZnLjhHbUqwPg=
github.com/kelseyhightower/envconfig v1.4.0 h1:Im6hONhd3pLkfDFsbRgu68RDNkGF1r3dvMUtDTo2cv8=
github.com/kelseyhightower/envconfig v1.4.0/go.mod h1:cccZRl6mQpaq41TPp5QxidR+Sa3axMbJDNb//FQX6Gg=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/stealthrocket/wazergo v0.19.1 h1:BPrITETPgSFwiytwmToO0MbUC/+RGC39JScz1JmmG6c=
github.com/stealthrocket/wazergo v0.19.1/go.mod h1:riI0hxw4ndZA5e6z7PesHg2BtTftcZaMxRcoiGGipTs=
github.com/stoewer/go-strcase v1.3.0 h1:g0eASXYtp+yvN9fK8sH94oCIk0fau9uV1/ZdJ0AVEzs=
github.com/stoewer/go-strcase v1.3.0/go.mod h1:fAH5hQ5pehh+j3nZfvwdk2RgEgQjAoM8wodgtPmh1xo=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=
github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo=
github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk=
github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
github.com/tetratelabs/wazero v1.10.1 h1:2DugeJf6VVk58KTPszlNfeeN8AhhpwcZqkJj2wwFuH8=
github.com/tetratelabs/wazero v1.10.1/go.mod h1:DRm5twOQ5Gr1AoEdSi0CLjDQF1J9ZAuyqFIjl1KKfQU=
go.opentelemetry.io/otel v1.24.0 h1:0LAOdjNmQeSTzGBzduGe/rU4tZhMwL5rWgtp9Ku5Jfo=
go.opentelemetry.io/otel v1.24.0/go.mod h1:W7b9Ozg4nkF5tWI5zsXkaKKDjdVjpD4oAt9Qi/MArHo=
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.21.0 h1:cl5P5/GIfFh4t6xyruOgJP5QiA1pw4fYYdv6nc6CBWw=
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.21.0/go.mod h1:zgBdWWAu7oEEMC06MMKc5NLbA/1YDXV1sMpSqEeLQLg=
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.21.0 h1:tIqheXEFWAZ7O8A7m+J0aPTmpJN3YQ7qetUAdkkkKpk=
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.21.0/go.mod h1:nUeKExfxAQVbiVFn32YXpXZZHZ61Cc3s3Rn1pDBGAb0=
go.opentelemetry.io/otel/metric v1.24.0 h1:6EhoGWWK28x1fbpA4tYTOWBkPefTDQnb8WSGXlc88kI=
go.opentelemetry.io/otel/metric v1.24.0/go.mod h1:VYhLe1rFfxuTXLgj4CBiyz+9WYBA8pNGJgDcSFRKBco=
go.opentelemetry.io/otel/sdk v1.24.0 h1:YMPPDNymmQN3ZgczicBY3B6sf9n62Dlj9pWD3ucgoDw=
go.opentelemetry.io/otel/sdk v1.24.0/go.mod h1:KVrIYw6tEubO9E96HQpcmpTKDVn9gdv35HoYiQWGDFg=
go.opentelemetry.io/otel/trace v1.24.0 h1:CsKnnL4dUAr/0llH9FKuc698G04IrpWV0MQA/Y1YELI=
go.opentelemetry.io/otel/trace v1.24.0/go.mod h1:HPc3Xr/cOApsBI154IU0OI0HJexz+aw5uPdbs3UCjNU=
go.opentelemetry.io/proto/otlp v1.0.0 h1:T0TX0tmXU8a3CbNXzEKGeU5mIVOdf0oykP+u2lIVU/I=
go.opentelemetry.io/proto/otlp v1.0.0/go.mod h1:Sy6pihPLfYHkr3NkUbEhGHFhINUSI/v80hjKIs5JXpM=
go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto=
go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE=
golang.org/x/exp v0.0.0-20250506013437-ce4c2cf36ca6 h1:y5zboxd6LQAqYIhHnB48p0ByQ/GnQx2BE33L8BOHQkI=
golang.org/x/exp v0.0.0-20250506013437-ce4c2cf36ca6/go.mod h1:U6Lno4MTRCDY+Ba7aCcauB9T60gsv5s4ralQzP72ZoQ=
golang.org/x/net v0.38.0 h1:vRMAPTMaeGqVhG5QyLJHqNDwecKTomGeqbnfZyKlBI8=
golang.org/x/net v0.38.0/go.mod h1:ivrbrMbzFq5J41QOQh0siUuly180yBYtLp+CKbEaFx8=
golang.org/x/sync v0.14.0 h1:woo0S4Yywslg6hp4eUFjTVOyKt0RookbpAHG4c1HmhQ=
golang.org/x/sync v0.14.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA=
golang.org/x/sys v0.37.0 h1:fdNQudmxPjkdUTPnLn5mdQv7Zwvbvpaxqs831goi9kQ=
golang.org/x/sys v0.37.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks=
golang.org/x/text v0.23.0 h1:D71I7dUrlY+VX0gQShAThNGHFxZ13dGLBHQLVl1mJlY=
golang.org/x/text v0.23.0/go.mod h1:/BLNzu4aZCJ1+kcD0DNRotWKage4q2rGVAg4o22unh4=
google.golang.org/genproto/googleapis/api v0.0.0-20240826202546-f6391c0de4c7 h1:YcyjlL1PRr2Q17/I0dPk2JmYS5CDXfcdb2Z3YRioEbw=
google.golang.org/genproto/googleapis/api v0.0.0-20240826202546-f6391c0de4c7/go.mod h1:OCdP9MfskevB/rbYvHTsXTtKC+3bHWajPdoKgjcYkfo=
google.golang.org/genproto/googleapis/rpc v0.0.0-20240826202546-f6391c0de4c7 h1:2035KHhUv+EpyB+hWgJnaWKJOdX1E95w2S8Rr4uWKTs=
google.golang.org/genproto/googleapis/rpc v0.0.0-20240826202546-f6391c0de4c7/go.mod h1:UqMtugtsSgubUsoxbuAoiCXvqvErP7Gf0so0mK9tHxU=
google.golang.org/grpc v1.65.0 h1:bs/cUb4lp1G5iImFFd3u5ixQzweKizoZJAwBNLR42lc=
google.golang.org/grpc v1.65.0/go.mod h1:WgYC2ypjlB0EiQi6wdKixMqukr6lBc0Vo+oOgjrM5ZQ=
google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg=
google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
================================================
FILE: _examples/19_retry/main_test.go
================================================
package main_test
import (
"context"
"fmt"
"log/slog"
"net"
"os"
"testing"
"go.opentelemetry.io/otel"
"go.opentelemetry.io/otel/attribute"
"go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc"
"go.opentelemetry.io/otel/propagation"
"go.opentelemetry.io/otel/sdk/resource"
sdktrace "go.opentelemetry.io/otel/sdk/trace"
semconv "go.opentelemetry.io/otel/semconv/v1.4.0"
"go.uber.org/goleak"
"google.golang.org/grpc"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/credentials/insecure"
"google.golang.org/grpc/status"
"google.golang.org/grpc/test/bufconn"
"example/federation"
"example/post"
)
const bufSize = 1024
var (
listener *bufconn.Listener
postClient post.PostServiceClient
)
type clientConfig struct{}
func (c *clientConfig) Post_PostServiceClient(cfg federation.FederationServiceClientConfig) (post.PostServiceClient, error) {
return postClient, nil
}
type PostServer struct {
*post.UnimplementedPostServiceServer
}
var (
getPostErr error
calledCount int
)
func (s *PostServer) GetPost(ctx context.Context, req *post.GetPostRequest) (*post.GetPostResponse, error) {
calledCount++
return nil, getPostErr
}
func (s *PostServer) GetPosts(ctx context.Context, req *post.GetPostsRequest) (*post.GetPostsResponse, error) {
var posts []*post.Post
for _, id := range req.Ids {
posts = append(posts, &post.Post{
Id: id,
Title: "foo",
Content: "bar",
UserId: fmt.Sprintf("user:%s", id),
})
}
return &post.GetPostsResponse{Posts: posts}, nil
}
func dialer(ctx context.Context, address string) (net.Conn, error) {
return listener.Dial()
}
func TestFederation(t *testing.T) {
defer goleak.VerifyNone(t)
ctx := context.Background()
listener = bufconn.Listen(bufSize)
if os.Getenv("ENABLE_JAEGER") != "" {
exporter, err := otlptracegrpc.New(ctx, otlptracegrpc.WithInsecure())
if err != nil {
t.Fatal(err)
}
tp := sdktrace.NewTracerProvider(
sdktrace.WithBatcher(exporter),
sdktrace.WithResource(
resource.NewWithAttributes(
semconv.SchemaURL,
semconv.ServiceNameKey.String("example19/retry"),
semconv.ServiceVersionKey.String("1.0.0"),
attribute.String("environment", "dev"),
),
),
sdktrace.WithSampler(sdktrace.AlwaysSample()),
)
defer tp.Shutdown(ctx)
otel.SetTextMapPropagator(propagation.TraceContext{})
otel.SetTracerProvider(tp)
}
conn, err := grpc.DialContext(
ctx, "",
grpc.WithContextDialer(dialer),
grpc.WithTransportCredentials(insecure.NewCredentials()),
)
if err != nil {
t.Fatal(err)
}
defer conn.Close()
postClient = post.NewPostServiceClient(conn)
grpcServer := grpc.NewServer()
defer grpcServer.Stop()
logger := slog.New(slog.NewJSONHandler(os.Stdout, &slog.HandlerOptions{
Level: slog.LevelDebug,
}))
federationServer, err := federation.NewFederationService(federation.FederationServiceConfig{
Client: new(clientConfig),
Logger: logger,
})
if err != nil {
t.Fatal(err)
}
defer federation.CleanupFederationService(ctx, federationServer)
post.RegisterPostServiceServer(grpcServer, &PostServer{})
federation.RegisterFederationServiceServer(grpcServer, federationServer)
go func() {
if err := grpcServer.Serve(listener); err != nil {
t.Fatal(err)
}
}()
client := federation.NewFederationServiceClient(conn)
getPostErr = status.New(codes.Unimplemented, "unimplemented get post").Err()
if _, err := client.GetPost(ctx, &federation.GetPostRequest{Id: "foo"}); err != nil {
t.Logf("err: %v", err)
} else {
t.Fatal("expected error")
}
if calledCount != 1 {
t.Fatalf("failed to retry count. expected 1 but got %d", calledCount)
}
calledCount = 0
getPostErr = status.New(codes.Unavailable, "unavailable get post").Err()
if _, err := client.GetPost(ctx, &federation.GetPostRequest{Id: "foo"}); err != nil {
t.Logf("err: %v", err)
} else {
t.Fatal("expected error")
}
if calledCount != 4 {
t.Fatalf("failed to retry count. expected 4 but got %d", calledCount)
}
}
================================================
FILE: _examples/19_retry/post/post.pb.go
================================================
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.33.0
// protoc (unknown)
// source: post/post.proto
package post
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
type GetPostRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
}
func (x *GetPostRequest) Reset() {
*x = GetPostRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_post_post_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GetPostRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetPostRequest) ProtoMessage() {}
func (x *GetPostRequest) ProtoReflect() protoreflect.Message {
mi := &file_post_post_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GetPostRequest.ProtoReflect.Descriptor instead.
func (*GetPostRequest) Descriptor() ([]byte, []int) {
return file_post_post_proto_rawDescGZIP(), []int{0}
}
func (x *GetPostRequest) GetId() string {
if x != nil {
return x.Id
}
return ""
}
type GetPostResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Post *Post `protobuf:"bytes,1,opt,name=post,proto3" json:"post,omitempty"`
}
func (x *GetPostResponse) Reset() {
*x = GetPostResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_post_post_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GetPostResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetPostResponse) ProtoMessage() {}
func (x *GetPostResponse) ProtoReflect() protoreflect.Message {
mi := &file_post_post_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GetPostResponse.ProtoReflect.Descriptor instead.
func (*GetPostResponse) Descriptor() ([]byte, []int) {
return file_post_post_proto_rawDescGZIP(), []int{1}
}
func (x *GetPostResponse) GetPost() *Post {
if x != nil {
return x.Post
}
return nil
}
type GetPostsRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Ids []string `protobuf:"bytes,1,rep,name=ids,proto3" json:"ids,omitempty"`
}
func (x *GetPostsRequest) Reset() {
*x = GetPostsRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_post_post_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GetPostsRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetPostsRequest) ProtoMessage() {}
func (x *GetPostsRequest) ProtoReflect() protoreflect.Message {
mi := &file_post_post_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GetPostsRequest.ProtoReflect.Descriptor instead.
func (*GetPostsRequest) Descriptor() ([]byte, []int) {
return file_post_post_proto_rawDescGZIP(), []int{2}
}
func (x *GetPostsRequest) GetIds() []string {
if x != nil {
return x.Ids
}
return nil
}
type GetPostsResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Posts []*Post `protobuf:"bytes,1,rep,name=posts,proto3" json:"posts,omitempty"`
}
func (x *GetPostsResponse) Reset() {
*x = GetPostsResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_post_post_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GetPostsResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetPostsResponse) ProtoMessage() {}
func (x *GetPostsResponse) ProtoReflect() protoreflect.Message {
mi := &file_post_post_proto_msgTypes[3]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GetPostsResponse.ProtoReflect.Descriptor instead.
func (*GetPostsResponse) Descriptor() ([]byte, []int) {
return file_post_post_proto_rawDescGZIP(), []int{3}
}
func (x *GetPostsResponse) GetPosts() []*Post {
if x != nil {
return x.Posts
}
return nil
}
type Post struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
Title string `protobuf:"bytes,2,opt,name=title,proto3" json:"title,omitempty"`
Content string `protobuf:"bytes,3,opt,name=content,proto3" json:"content,omitempty"`
UserId string `protobuf:"bytes,4,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
}
func (x *Post) Reset() {
*x = Post{}
if protoimpl.UnsafeEnabled {
mi := &file_post_post_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Post) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Post) ProtoMessage() {}
func (x *Post) ProtoReflect() protoreflect.Message {
mi := &file_post_post_proto_msgTypes[4]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Post.ProtoReflect.Descriptor instead.
func (*Post) Descriptor() ([]byte, []int) {
return file_post_post_proto_rawDescGZIP(), []int{4}
}
func (x *Post) GetId() string {
if x != nil {
return x.Id
}
return ""
}
func (x *Post) GetTitle() string {
if x != nil {
return x.Title
}
return ""
}
func (x *Post) GetContent() string {
if x != nil {
return x.Content
}
return ""
}
func (x *Post) GetUserId() string {
if x != nil {
return x.UserId
}
return ""
}
var File_post_post_proto protoreflect.FileDescriptor
var file_post_post_proto_rawDesc = []byte{
0x0a, 0x0f, 0x70, 0x6f, 0x73, 0x74, 0x2f, 0x70, 0x6f, 0x73, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x12, 0x04, 0x70, 0x6f, 0x73, 0x74, 0x22, 0x20, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x50, 0x6f,
0x73, 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, 0x31, 0x0a, 0x0f, 0x47, 0x65, 0x74,
0x50, 0x6f, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1e, 0x0a, 0x04,
0x70, 0x6f, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x70, 0x6f, 0x73,
0x74, 0x2e, 0x50, 0x6f, 0x73, 0x74, 0x52, 0x04, 0x70, 0x6f, 0x73, 0x74, 0x22, 0x23, 0x0a, 0x0f,
0x47, 0x65, 0x74, 0x50, 0x6f, 0x73, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12,
0x10, 0x0a, 0x03, 0x69, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x03, 0x69, 0x64,
0x73, 0x22, 0x34, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x50, 0x6f, 0x73, 0x74, 0x73, 0x52, 0x65, 0x73,
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x20, 0x0a, 0x05, 0x70, 0x6f, 0x73, 0x74, 0x73, 0x18, 0x01,
0x20, 0x03, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x70, 0x6f, 0x73, 0x74, 0x2e, 0x50, 0x6f, 0x73, 0x74,
0x52, 0x05, 0x70, 0x6f, 0x73, 0x74, 0x73, 0x22, 0x5f, 0x0a, 0x04, 0x50, 0x6f, 0x73, 0x74, 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, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74,
0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12,
0x17, 0x0a, 0x07, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09,
0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x32, 0x84, 0x01, 0x0a, 0x0b, 0x50, 0x6f, 0x73,
0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x38, 0x0a, 0x07, 0x47, 0x65, 0x74, 0x50,
0x6f, 0x73, 0x74, 0x12, 0x14, 0x2e, 0x70, 0x6f, 0x73, 0x74, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x6f,
0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x70, 0x6f, 0x73, 0x74,
0x2e, 0x47, 0x65, 0x74, 0x50, 0x6f, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
0x22, 0x00, 0x12, 0x3b, 0x0a, 0x08, 0x47, 0x65, 0x74, 0x50, 0x6f, 0x73, 0x74, 0x73, 0x12, 0x15,
0x2e, 0x70, 0x6f, 0x73, 0x74, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x6f, 0x73, 0x74, 0x73, 0x52, 0x65,
0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x70, 0x6f, 0x73, 0x74, 0x2e, 0x47, 0x65, 0x74,
0x50, 0x6f, 0x73, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42,
0x58, 0x0a, 0x08, 0x63, 0x6f, 0x6d, 0x2e, 0x70, 0x6f, 0x73, 0x74, 0x42, 0x09, 0x50, 0x6f, 0x73,
0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x11, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c,
0x65, 0x2f, 0x70, 0x6f, 0x73, 0x74, 0x3b, 0x70, 0x6f, 0x73, 0x74, 0xa2, 0x02, 0x03, 0x50, 0x58,
0x58, 0xaa, 0x02, 0x04, 0x50, 0x6f, 0x73, 0x74, 0xca, 0x02, 0x04, 0x50, 0x6f, 0x73, 0x74, 0xe2,
0x02, 0x10, 0x50, 0x6f, 0x73, 0x74, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61,
0x74, 0x61, 0xea, 0x02, 0x04, 0x50, 0x6f, 0x73, 0x74, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f,
0x33,
}
var (
file_post_post_proto_rawDescOnce sync.Once
file_post_post_proto_rawDescData = file_post_post_proto_rawDesc
)
func file_post_post_proto_rawDescGZIP() []byte {
file_post_post_proto_rawDescOnce.Do(func() {
file_post_post_proto_rawDescData = protoimpl.X.CompressGZIP(file_post_post_proto_rawDescData)
})
return file_post_post_proto_rawDescData
}
var file_post_post_proto_msgTypes = make([]protoimpl.MessageInfo, 5)
var file_post_post_proto_goTypes = []interface{}{
(*GetPostRequest)(nil), // 0: post.GetPostRequest
(*GetPostResponse)(nil), // 1: post.GetPostResponse
(*GetPostsRequest)(nil), // 2: post.GetPostsRequest
(*GetPostsResponse)(nil), // 3: post.GetPostsResponse
(*Post)(nil), // 4: post.Post
}
var file_post_post_proto_depIdxs = []int32{
4, // 0: post.GetPostResponse.post:type_name -> post.Post
4, // 1: post.GetPostsResponse.posts:type_name -> post.Post
0, // 2: post.PostService.GetPost:input_type -> post.GetPostRequest
2, // 3: post.PostService.GetPosts:input_type -> post.GetPostsRequest
1, // 4: post.PostService.GetPost:output_type -> post.GetPostResponse
3, // 5: post.PostService.GetPosts:output_type -> post.GetPostsResponse
4, // [4:6] is the sub-list for method output_type
2, // [2:4] is the sub-list for method input_type
2, // [2:2] is the sub-list for extension type_name
2, // [2:2] is the sub-list for extension extendee
0, // [0:2] is the sub-list for field type_name
}
func init() { file_post_post_proto_init() }
func file_post_post_proto_init() {
if File_post_post_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_post_post_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetPostRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_post_post_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetPostResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_post_post_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetPostsRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_post_post_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetPostsResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_post_post_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Post); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_post_post_proto_rawDesc,
NumEnums: 0,
NumMessages: 5,
NumExtensions: 0,
NumServices: 1,
},
GoTypes: file_post_post_proto_goTypes,
DependencyIndexes: file_post_post_proto_depIdxs,
MessageInfos: file_post_post_proto_msgTypes,
}.Build()
File_post_post_proto = out.File
file_post_post_proto_rawDesc = nil
file_post_post_proto_goTypes = nil
file_post_post_proto_depIdxs = nil
}
================================================
FILE: _examples/19_retry/post/post_grpc.pb.go
================================================
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.3.0
// - protoc (unknown)
// source: post/post.proto
package post
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 (
PostService_GetPost_FullMethodName = "/post.PostService/GetPost"
PostService_GetPosts_FullMethodName = "/post.PostService/GetPosts"
)
// PostServiceClient is the client API for PostService 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 PostServiceClient interface {
GetPost(ctx context.Context, in *GetPostRequest, opts ...grpc.CallOption) (*GetPostResponse, error)
GetPosts(ctx context.Context, in *GetPostsRequest, opts ...grpc.CallOption) (*GetPostsResponse, error)
}
type postServiceClient struct {
cc grpc.ClientConnInterface
}
func NewPostServiceClient(cc grpc.ClientConnInterface) PostServiceClient {
return &postServiceClient{cc}
}
func (c *postServiceClient) GetPost(ctx context.Context, in *GetPostRequest, opts ...grpc.CallOption) (*GetPostResponse, error) {
out := new(GetPostResponse)
err := c.cc.Invoke(ctx, PostService_GetPost_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *postServiceClient) GetPosts(ctx context.Context, in *GetPostsRequest, opts ...grpc.CallOption) (*GetPostsResponse, error) {
out := new(GetPostsResponse)
err := c.cc.Invoke(ctx, PostService_GetPosts_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// PostServiceServer is the server API for PostService service.
// All implementations must embed UnimplementedPostServiceServer
// for forward compatibility
type PostServiceServer interface {
GetPost(context.Context, *GetPostRequest) (*GetPostResponse, error)
GetPosts(context.Context, *GetPostsRequest) (*GetPostsResponse, error)
mustEmbedUnimplementedPostServiceServer()
}
// UnimplementedPostServiceServer must be embedded to have forward compatible implementations.
type UnimplementedPostServiceServer struct {
}
func (UnimplementedPostServiceServer) GetPost(context.Context, *GetPostRequest) (*GetPostResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetPost not implemented")
}
func (UnimplementedPostServiceServer) GetPosts(context.Context, *GetPostsRequest) (*GetPostsResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetPosts not implemented")
}
func (UnimplementedPostServiceServer) mustEmbedUnimplementedPostServiceServer() {}
// UnsafePostServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to PostServiceServer will
// result in compilation errors.
type UnsafePostServiceServer interface {
mustEmbedUnimplementedPostServiceServer()
}
func RegisterPostServiceServer(s grpc.ServiceRegistrar, srv PostServiceServer) {
s.RegisterService(&PostService_ServiceDesc, srv)
}
func _PostService_GetPost_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetPostRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(PostServiceServer).GetPost(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: PostService_GetPost_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(PostServiceServer).GetPost(ctx, req.(*GetPostRequest))
}
return interceptor(ctx, in, info, handler)
}
func _PostService_GetPosts_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetPostsRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(PostServiceServer).GetPosts(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: PostService_GetPosts_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(PostServiceServer).GetPosts(ctx, req.(*GetPostsRequest))
}
return interceptor(ctx, in, info, handler)
}
// PostService_ServiceDesc is the grpc.ServiceDesc for PostService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var PostService_ServiceDesc = grpc.ServiceDesc{
ServiceName: "post.PostService",
HandlerType: (*PostServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "GetPost",
Handler: _PostService_GetPost_Handler,
},
{
MethodName: "GetPosts",
Handler: _PostService_GetPosts_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "post/post.proto",
}
================================================
FILE: _examples/19_retry/proto/buf.yaml
================================================
version: v1
breaking:
use:
- FILE
lint:
use:
- DEFAULT
================================================
FILE: _examples/19_retry/proto/federation/federation.proto
================================================
syntax = "proto3";
package federation;
import "google/protobuf/any.proto";
import "grpc/federation/federation.proto";
option go_package = "example/federation;federation";
option (grpc.federation.file)= {
import: ["post/post.proto"]
};
service FederationService {
option (grpc.federation.service) = {};
rpc GetPost(GetPostRequest) returns (GetPostResponse) {};
}
message GetPostRequest {
string id = 1;
}
message GetPostResponse {
option (.grpc.federation.message) = {
def {
name: "post"
message {
name: "Post"
args { name: "id", by: "$.id" }
}
}
};
}
message Post {
option (grpc.federation.message) = {
def {
call {
method: "post.PostService/GetPost"
request { field: "id", by: "$.id" }
timeout: "10s"
retry {
if: "error.code != google.rpc.Code.UNIMPLEMENTED"
constant {
interval: "30ms"
max_retries: 3
}
}
}
}
};
}
================================================
FILE: _examples/19_retry/proto/post/post.proto
================================================
syntax = "proto3";
package post;
option go_package = "example/post;post";
service PostService {
rpc GetPost(GetPostRequest) returns (GetPostResponse) {};
rpc GetPosts(GetPostsRequest) returns (GetPostsResponse) {};
}
message GetPostRequest {
string id = 1;
}
message GetPostResponse {
Post post = 1;
}
message GetPostsRequest {
repeated string ids = 1;
}
message GetPostsResponse {
repeated Post posts = 1;
}
message Post {
string id = 1;
string title = 2;
string content = 3;
string user_id = 4;
}
================================================
FILE: _examples/20_callopt/.gitignore
================================================
grpc/federation
================================================
FILE: _examples/20_callopt/Makefile
================================================
MAKEFILE_DIR := $(dir $(lastword $(MAKEFILE_LIST)))
GOBIN := $(MAKEFILE_DIR)/../../bin
PATH := $(GOBIN):$(PATH)
JAEGER_IMAGE := jaegertracing/all-in-one:latest
.PHONY: generate
generate:
$(GOBIN)/buf generate
.PHONY: lint
lint:
@$(GOBIN)/grpc-federation-linter -Iproto -Iproto_deps ./proto/federation/federation.proto
.PHONY: test
test:
go test -race ./ -count=1
.PHONY: grpc-federation/generate
grpc-federation/generate:
@$(GOBIN)/grpc-federation-generator ./proto/federation/federation.proto
.PHONY: grpc-federation/watch
grpc-federation/watch:
@$(GOBIN)/grpc-federation-generator -w
.PHONY: jaeger/start
jaeger/start:
@docker run \
-e COLLECTOR_OTLP_ENABLED=true \
-p 16686:16686 \
-p 4317:4317 \
-p 4318:4318 \
-d \
$(JAEGER_IMAGE)
.PHONY: jaeger/stop
jaeger/stop:
@docker stop $(shell docker ps -q --filter ancestor=$(JAEGER_IMAGE))
================================================
FILE: _examples/20_callopt/buf.gen.yaml
================================================
version: v1
managed:
enabled: true
plugins:
- plugin: go
out: .
opt: paths=source_relative
- plugin: go-grpc
out: .
opt: paths=source_relative
- plugin: grpc-federation
out: .
opt:
- paths=source_relative
- import_paths=proto
================================================
FILE: _examples/20_callopt/buf.work.yaml
================================================
version: v1
directories:
- proto
- proto_deps
================================================
FILE: _examples/20_callopt/federation/federation.pb.go
================================================
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.33.0
// protoc (unknown)
// source: federation/federation.proto
package federation
import (
_ "github.com/mercari/grpc-federation/grpc/federation"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
_ "google.golang.org/protobuf/types/descriptorpb"
_ "google.golang.org/protobuf/types/known/emptypb"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
type GetPostRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
}
func (x *GetPostRequest) Reset() {
*x = GetPostRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_federation_federation_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GetPostRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetPostRequest) ProtoMessage() {}
func (x *GetPostRequest) ProtoReflect() protoreflect.Message {
mi := &file_federation_federation_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GetPostRequest.ProtoReflect.Descriptor instead.
func (*GetPostRequest) Descriptor() ([]byte, []int) {
return file_federation_federation_proto_rawDescGZIP(), []int{0}
}
func (x *GetPostRequest) GetId() string {
if x != nil {
return x.Id
}
return ""
}
type GetPostResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Header []string `protobuf:"bytes,1,rep,name=header,proto3" json:"header,omitempty"`
Trailer []string `protobuf:"bytes,2,rep,name=trailer,proto3" json:"trailer,omitempty"`
}
func (x *GetPostResponse) Reset() {
*x = GetPostResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_federation_federation_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GetPostResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetPostResponse) ProtoMessage() {}
func (x *GetPostResponse) ProtoReflect() protoreflect.Message {
mi := &file_federation_federation_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GetPostResponse.ProtoReflect.Descriptor instead.
func (*GetPostResponse) Descriptor() ([]byte, []int) {
return file_federation_federation_proto_rawDescGZIP(), []int{1}
}
func (x *GetPostResponse) GetHeader() []string {
if x != nil {
return x.Header
}
return nil
}
func (x *GetPostResponse) GetTrailer() []string {
if x != nil {
return x.Trailer
}
return nil
}
var File_federation_federation_proto protoreflect.FileDescriptor
var file_federation_federation_proto_rawDesc = []byte{
0x0a, 0x1b, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x66, 0x65, 0x64,
0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0a, 0x66,
0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x20, 0x67, 0x72, 0x70, 0x63, 0x2f,
0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x66, 0x65, 0x64, 0x65, 0x72,
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x20, 0x67, 0x6f, 0x6f,
0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x65, 0x73,
0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x67,
0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x65,
0x6d, 0x70, 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x20, 0x0a, 0x0e, 0x47, 0x65,
0x74, 0x50, 0x6f, 0x73, 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, 0x99, 0x03, 0x0a,
0x0f, 0x47, 0x65, 0x74, 0x50, 0x6f, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
0x12, 0x33, 0x0a, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09,
0x42, 0x1b, 0x9a, 0x4a, 0x18, 0x12, 0x16, 0x68, 0x64, 0x72, 0x5f, 0x6b, 0x65, 0x79, 0x73, 0x2e,
0x73, 0x6f, 0x72, 0x74, 0x41, 0x73, 0x63, 0x28, 0x76, 0x2c, 0x20, 0x76, 0x29, 0x52, 0x06, 0x68,
0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x35, 0x0a, 0x07, 0x74, 0x72, 0x61, 0x69, 0x6c, 0x65, 0x72,
0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x42, 0x1b, 0x9a, 0x4a, 0x18, 0x12, 0x16, 0x74, 0x6c, 0x72,
0x5f, 0x6b, 0x65, 0x79, 0x73, 0x2e, 0x73, 0x6f, 0x72, 0x74, 0x41, 0x73, 0x63, 0x28, 0x76, 0x2c,
0x20, 0x76, 0x29, 0x52, 0x07, 0x74, 0x72, 0x61, 0x69, 0x6c, 0x65, 0x72, 0x3a, 0x99, 0x02, 0x9a,
0x4a, 0x95, 0x02, 0x0a, 0x25, 0x0a, 0x03, 0x68, 0x64, 0x72, 0x5a, 0x1e, 0x67, 0x72, 0x70, 0x63,
0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x6d, 0x65, 0x74, 0x61,
0x64, 0x61, 0x74, 0x61, 0x2e, 0x6e, 0x65, 0x77, 0x28, 0x29, 0x0a, 0x25, 0x0a, 0x03, 0x74, 0x6c,
0x72, 0x5a, 0x1e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69,
0x6f, 0x6e, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x6e, 0x65, 0x77, 0x28,
0x29, 0x0a, 0x27, 0x0a, 0x02, 0x6d, 0x64, 0x5a, 0x21, 0x7b, 0x27, 0x61, 0x75, 0x74, 0x68, 0x6f,
0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x27, 0x3a, 0x20, 0x5b, 0x27, 0x42, 0x65, 0x61,
0x72, 0x65, 0x72, 0x20, 0x78, 0x78, 0x78, 0x27, 0x5d, 0x7d, 0x0a, 0x4c, 0x0a, 0x03, 0x72, 0x65,
0x73, 0x72, 0x45, 0x0a, 0x18, 0x70, 0x6f, 0x73, 0x74, 0x2e, 0x50, 0x6f, 0x73, 0x74, 0x53, 0x65,
0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x47, 0x65, 0x74, 0x50, 0x6f, 0x73, 0x74, 0x12, 0x0a, 0x0a,
0x02, 0x69, 0x64, 0x12, 0x04, 0x24, 0x2e, 0x69, 0x64, 0x2a, 0x05, 0x0a, 0x03, 0x5a, 0x01, 0x31,
0x32, 0x12, 0x12, 0x03, 0x68, 0x64, 0x72, 0x18, 0x64, 0x20, 0x64, 0x28, 0x01, 0x32, 0x03, 0x74,
0x6c, 0x72, 0x38, 0x01, 0x3a, 0x02, 0x6d, 0x64, 0x0a, 0x26, 0x0a, 0x08, 0x68, 0x64, 0x72, 0x5f,
0x6b, 0x65, 0x79, 0x73, 0x12, 0x0b, 0x72, 0x65, 0x73, 0x20, 0x21, 0x3d, 0x20, 0x6e, 0x75, 0x6c,
0x6c, 0x5a, 0x0d, 0x68, 0x64, 0x72, 0x2e, 0x6d, 0x61, 0x70, 0x28, 0x6b, 0x2c, 0x20, 0x6b, 0x29,
0x0a, 0x26, 0x0a, 0x08, 0x74, 0x6c, 0x72, 0x5f, 0x6b, 0x65, 0x79, 0x73, 0x12, 0x0b, 0x72, 0x65,
0x73, 0x20, 0x21, 0x3d, 0x20, 0x6e, 0x75, 0x6c, 0x6c, 0x5a, 0x0d, 0x74, 0x6c, 0x72, 0x2e, 0x6d,
0x61, 0x70, 0x28, 0x6b, 0x2c, 0x20, 0x6b, 0x29, 0x32, 0x5e, 0x0a, 0x11, 0x46, 0x65, 0x64, 0x65,
0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x44, 0x0a,
0x07, 0x47, 0x65, 0x74, 0x50, 0x6f, 0x73, 0x74, 0x12, 0x1a, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72,
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x6f, 0x73, 0x74, 0x52, 0x65, 0x71,
0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f,
0x6e, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x6f, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
0x65, 0x22, 0x00, 0x1a, 0x03, 0x9a, 0x4a, 0x00, 0x42, 0x9c, 0x01, 0x9a, 0x4a, 0x11, 0x12, 0x0f,
0x70, 0x6f, 0x73, 0x74, 0x2f, 0x70, 0x6f, 0x73, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x0a,
0x0e, 0x63, 0x6f, 0x6d, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42,
0x0f, 0x46, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f,
0x50, 0x01, 0x5a, 0x1d, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2f, 0x66, 0x65, 0x64, 0x65,
0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x3b, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f,
0x6e, 0xa2, 0x02, 0x03, 0x46, 0x58, 0x58, 0xaa, 0x02, 0x0a, 0x46, 0x65, 0x64, 0x65, 0x72, 0x61,
0x74, 0x69, 0x6f, 0x6e, 0xca, 0x02, 0x0a, 0x46, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f,
0x6e, 0xe2, 0x02, 0x16, 0x46, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5c, 0x47,
0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0a, 0x46, 0x65, 0x64,
0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_federation_federation_proto_rawDescOnce sync.Once
file_federation_federation_proto_rawDescData = file_federation_federation_proto_rawDesc
)
func file_federation_federation_proto_rawDescGZIP() []byte {
file_federation_federation_proto_rawDescOnce.Do(func() {
file_federation_federation_proto_rawDescData = protoimpl.X.CompressGZIP(file_federation_federation_proto_rawDescData)
})
return file_federation_federation_proto_rawDescData
}
var file_federation_federation_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
var file_federation_federation_proto_goTypes = []interface{}{
(*GetPostRequest)(nil), // 0: federation.GetPostRequest
(*GetPostResponse)(nil), // 1: federation.GetPostResponse
}
var file_federation_federation_proto_depIdxs = []int32{
0, // 0: federation.FederationService.GetPost:input_type -> federation.GetPostRequest
1, // 1: federation.FederationService.GetPost:output_type -> federation.GetPostResponse
1, // [1:2] is the sub-list for method output_type
0, // [0:1] is the sub-list for method input_type
0, // [0:0] is the sub-list for extension type_name
0, // [0:0] is the sub-list for extension extendee
0, // [0:0] is the sub-list for field type_name
}
func init() { file_federation_federation_proto_init() }
func file_federation_federation_proto_init() {
if File_federation_federation_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_federation_federation_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetPostRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_federation_federation_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetPostResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_federation_federation_proto_rawDesc,
NumEnums: 0,
NumMessages: 2,
NumExtensions: 0,
NumServices: 1,
},
GoTypes: file_federation_federation_proto_goTypes,
DependencyIndexes: file_federation_federation_proto_depIdxs,
MessageInfos: file_federation_federation_proto_msgTypes,
}.Build()
File_federation_federation_proto = out.File
file_federation_federation_proto_rawDesc = nil
file_federation_federation_proto_goTypes = nil
file_federation_federation_proto_depIdxs = nil
}
================================================
FILE: _examples/20_callopt/federation/federation_grpc.pb.go
================================================
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.3.0
// - protoc (unknown)
// source: federation/federation.proto
package federation
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 (
FederationService_GetPost_FullMethodName = "/federation.FederationService/GetPost"
)
// FederationServiceClient is the client API for FederationService 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 FederationServiceClient interface {
GetPost(ctx context.Context, in *GetPostRequest, opts ...grpc.CallOption) (*GetPostResponse, error)
}
type federationServiceClient struct {
cc grpc.ClientConnInterface
}
func NewFederationServiceClient(cc grpc.ClientConnInterface) FederationServiceClient {
return &federationServiceClient{cc}
}
func (c *federationServiceClient) GetPost(ctx context.Context, in *GetPostRequest, opts ...grpc.CallOption) (*GetPostResponse, error) {
out := new(GetPostResponse)
err := c.cc.Invoke(ctx, FederationService_GetPost_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// FederationServiceServer is the server API for FederationService service.
// All implementations must embed UnimplementedFederationServiceServer
// for forward compatibility
type FederationServiceServer interface {
GetPost(context.Context, *GetPostRequest) (*GetPostResponse, error)
mustEmbedUnimplementedFederationServiceServer()
}
// UnimplementedFederationServiceServer must be embedded to have forward compatible implementations.
type UnimplementedFederationServiceServer struct {
}
func (UnimplementedFederationServiceServer) GetPost(context.Context, *GetPostRequest) (*GetPostResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetPost not implemented")
}
func (UnimplementedFederationServiceServer) mustEmbedUnimplementedFederationServiceServer() {}
// UnsafeFederationServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to FederationServiceServer will
// result in compilation errors.
type UnsafeFederationServiceServer interface {
mustEmbedUnimplementedFederationServiceServer()
}
func RegisterFederationServiceServer(s grpc.ServiceRegistrar, srv FederationServiceServer) {
s.RegisterService(&FederationService_ServiceDesc, srv)
}
func _FederationService_GetPost_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetPostRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(FederationServiceServer).GetPost(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: FederationService_GetPost_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(FederationServiceServer).GetPost(ctx, req.(*GetPostRequest))
}
return interceptor(ctx, in, info, handler)
}
// FederationService_ServiceDesc is the grpc.ServiceDesc for FederationService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var FederationService_ServiceDesc = grpc.ServiceDesc{
ServiceName: "federation.FederationService",
HandlerType: (*FederationServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "GetPost",
Handler: _FederationService_GetPost_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "federation/federation.proto",
}
================================================
FILE: _examples/20_callopt/federation/federation_grpc_federation.pb.go
================================================
// Code generated by protoc-gen-grpc-federation. DO NOT EDIT!
// versions:
//
// protoc-gen-grpc-federation: (devel)
//
// source: federation/federation.proto
package federation
import (
"context"
"io"
"log/slog"
"reflect"
grpcfed "github.com/mercari/grpc-federation/grpc/federation"
grpcfedcel "github.com/mercari/grpc-federation/grpc/federation/cel"
"go.opentelemetry.io/otel"
"go.opentelemetry.io/otel/trace"
post "example/post"
)
var (
_ = reflect.Invalid // to avoid "imported and not used error"
)
// Federation_GetPostResponseVariable represents variable definitions in "federation.GetPostResponse".
type FederationService_Federation_GetPostResponseVariable struct {
Hdr map[string][]string
HdrKeys []string
Md map[string][]string
Res *post.GetPostResponse
Tlr map[string][]string
TlrKeys []string
}
// Federation_GetPostResponseArgument is argument for "federation.GetPostResponse" message.
type FederationService_Federation_GetPostResponseArgument struct {
Id string
FederationService_Federation_GetPostResponseVariable
}
// FederationServiceConfig configuration required to initialize the service that use GRPC Federation.
type FederationServiceConfig struct {
// Client provides a factory that creates the gRPC Client needed to invoke methods of the gRPC Service on which the Federation Service depends.
// If this interface is not provided, an error is returned during initialization.
Client FederationServiceClientFactory // required
// ErrorHandler Federation Service often needs to convert errors received from downstream services.
// If an error occurs during method execution in the Federation Service, this error handler is called and the returned error is treated as a final error.
ErrorHandler grpcfed.ErrorHandler
// Logger sets the logger used to output Debug/Info/Error information.
Logger *slog.Logger
}
// FederationServiceClientFactory provides a factory that creates the gRPC Client needed to invoke methods of the gRPC Service on which the Federation Service depends.
type FederationServiceClientFactory interface {
// Post_PostServiceClient create a gRPC Client to be used to call methods in post.PostService.
Post_PostServiceClient(FederationServiceClientConfig) (post.PostServiceClient, error)
}
// FederationServiceClientConfig helper to create gRPC client.
// Hints for creating a gRPC Client.
type FederationServiceClientConfig struct {
// Service FQDN ( `.` ) of the service on Protocol Buffers.
Service string
}
// FederationServiceDependentClientSet has a gRPC client for all services on which the federation service depends.
// This is provided as an argument when implementing the custom resolver.
type FederationServiceDependentClientSet struct {
Post_PostServiceClient post.PostServiceClient
}
// FederationServiceResolver provides an interface to directly implement message resolver and field resolver not defined in Protocol Buffers.
type FederationServiceResolver interface {
}
// FederationServiceCELPluginWasmConfig type alias for grpcfedcel.WasmConfig.
type FederationServiceCELPluginWasmConfig = grpcfedcel.WasmConfig
// FederationServiceCELPluginConfig hints for loading a WebAssembly based plugin.
type FederationServiceCELPluginConfig struct {
CacheDir string
}
// FederationServiceUnimplementedResolver a structure implemented to satisfy the Resolver interface.
// An Unimplemented error is always returned.
// This is intended for use when there are many Resolver interfaces that do not need to be implemented,
// by embedding them in a resolver structure that you have created.
type FederationServiceUnimplementedResolver struct{}
const (
FederationService_DependentMethod_Post_PostService_GetPost = "/post.PostService/GetPost"
)
// FederationService represents Federation Service.
type FederationService struct {
UnimplementedFederationServiceServer
cfg FederationServiceConfig
logger *slog.Logger
isLogLevelDebug bool
errorHandler grpcfed.ErrorHandler
celCacheMap *grpcfed.CELCacheMap
tracer trace.Tracer
celTypeHelper *grpcfed.CELTypeHelper
celEnvOpts []grpcfed.CELEnvOption
celPlugins []*grpcfedcel.CELPlugin
client *FederationServiceDependentClientSet
}
// NewFederationService creates FederationService instance by FederationServiceConfig.
func NewFederationService(cfg FederationServiceConfig) (*FederationService, error) {
if cfg.Client == nil {
return nil, grpcfed.ErrClientConfig
}
Post_PostServiceClient, err := cfg.Client.Post_PostServiceClient(FederationServiceClientConfig{
Service: "post.PostService",
})
if err != nil {
return nil, err
}
logger := cfg.Logger
if logger == nil {
logger = slog.New(slog.NewJSONHandler(io.Discard, nil))
}
tracer := otel.Tracer("federation.FederationService")
ctx := grpcfed.WithLogger(context.Background(), logger)
ctx = grpcfed.WithTracer(ctx, tracer)
errorHandler := cfg.ErrorHandler
if errorHandler == nil {
errorHandler = func(ctx context.Context, methodName string, err error) error { return err }
}
celTypeHelperFieldMap := grpcfed.CELTypeHelperFieldMap{
"grpc.federation.private.federation.GetPostResponseArgument": {
"id": grpcfed.NewCELFieldType(grpcfed.CELStringType, "Id"),
},
}
celTypeHelper := grpcfed.NewCELTypeHelper("federation", celTypeHelperFieldMap)
var celEnvOpts []grpcfed.CELEnvOption
celEnvOpts = append(celEnvOpts, grpcfed.NewDefaultEnvOptions(celTypeHelper)...)
celEnvOpts = append(celEnvOpts, grpcfed.GRPCErrorAccessorOptions(celTypeHelper, "post.GetPostResponse")...)
svc := &FederationService{
cfg: cfg,
logger: logger,
isLogLevelDebug: logger.Enabled(context.Background(), slog.LevelDebug),
errorHandler: errorHandler,
celEnvOpts: celEnvOpts,
celTypeHelper: celTypeHelper,
celCacheMap: grpcfed.NewCELCacheMap(),
tracer: tracer,
client: &FederationServiceDependentClientSet{
Post_PostServiceClient: Post_PostServiceClient,
},
}
return svc, nil
}
// CleanupFederationService cleanup all resources to prevent goroutine leaks.
func CleanupFederationService(ctx context.Context, svc *FederationService) {
svc.cleanup(ctx)
}
func (s *FederationService) cleanup(ctx context.Context) {
for _, plugin := range s.celPlugins {
plugin.Close()
}
}
// GetPost implements "federation.FederationService/GetPost" method.
func (s *FederationService) GetPost(ctx context.Context, req *GetPostRequest) (res *GetPostResponse, e error) {
ctx, span := s.tracer.Start(ctx, "federation.FederationService/GetPost")
defer span.End()
ctx = grpcfed.WithLogger(ctx, s.logger)
ctx = grpcfed.WithCELCacheMap(ctx, s.celCacheMap)
defer func() {
if r := recover(); r != nil {
e = grpcfed.RecoverError(r, grpcfed.StackTrace())
grpcfed.OutputErrorLog(ctx, e)
}
}()
defer func() {
for _, celPlugin := range s.celPlugins {
celPlugin.Cleanup()
}
}()
res, err := s.resolve_Federation_GetPostResponse(ctx, &FederationService_Federation_GetPostResponseArgument{
Id: req.GetId(),
})
if err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
grpcfed.OutputErrorLog(ctx, err)
return nil, err
}
return res, nil
}
// resolve_Federation_GetPostResponse resolve "federation.GetPostResponse" message.
func (s *FederationService) resolve_Federation_GetPostResponse(ctx context.Context, req *FederationService_Federation_GetPostResponseArgument) (*GetPostResponse, error) {
ctx, span := s.tracer.Start(ctx, "federation.GetPostResponse")
defer span.End()
ctx = grpcfed.WithLogger(ctx, grpcfed.Logger(ctx), grpcfed.LogAttrs(ctx)...)
grpcfed.Logger(ctx).DebugContext(ctx, "resolve federation.GetPostResponse", slog.Any("message_args", s.logvalue_Federation_GetPostResponseArgument(req)))
type localValueType struct {
*grpcfed.LocalValue
vars struct {
Hdr map[string][]string
HdrKeys []string
Md map[string][]string
Res *post.GetPostResponse
Tlr map[string][]string
TlrKeys []string
XDef3Def0 int64
}
}
value := &localValueType{LocalValue: grpcfed.NewLocalValue(ctx, s.celEnvOpts, "grpc.federation.private.federation.GetPostResponseArgument", req)}
ctx = grpcfed.WithLocalValue(ctx, value.LocalValue)
/*
def {
name: "hdr"
by: "grpc.federation.metadata.new()"
}
*/
def_hdr := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[map[string][]string, *localValueType]{
Name: `hdr`,
Type: grpcfed.NewCELMapType(grpcfed.CELStringType, grpcfed.CELListType(grpcfed.CELStringType)),
Setter: func(value *localValueType, v map[string][]string) error {
value.vars.Hdr = v
return nil
},
By: `grpc.federation.metadata.new()`,
ByCacheIndex: 1,
})
}
/*
def {
name: "tlr"
by: "grpc.federation.metadata.new()"
}
*/
def_tlr := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[map[string][]string, *localValueType]{
Name: `tlr`,
Type: grpcfed.NewCELMapType(grpcfed.CELStringType, grpcfed.CELListType(grpcfed.CELStringType)),
Setter: func(value *localValueType, v map[string][]string) error {
value.vars.Tlr = v
return nil
},
By: `grpc.federation.metadata.new()`,
ByCacheIndex: 2,
})
}
/*
def {
name: "md"
by: "{'authorization': ['Bearer xxx']}"
}
*/
def_md := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[map[string][]string, *localValueType]{
Name: `md`,
Type: grpcfed.NewCELMapType(grpcfed.CELStringType, grpcfed.CELListType(grpcfed.CELStringType)),
Setter: func(value *localValueType, v map[string][]string) error {
value.vars.Md = v
return nil
},
By: `{'authorization': ['Bearer xxx']}`,
ByCacheIndex: 3,
})
}
/*
def {
name: "res"
call {
method: "post.PostService/GetPost"
request { field: "id", by: "$.id" }
}
}
*/
def_res := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[*post.GetPostResponse, *localValueType]{
Name: `res`,
Type: grpcfed.CELObjectType("post.GetPostResponse"),
Setter: func(value *localValueType, v *post.GetPostResponse) error {
value.vars.Res = v
return nil
},
Message: func(ctx context.Context, value *localValueType) (any, error) {
args := &post.GetPostRequest{}
// { field: "id", by: "$.id" }
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[string]{
Value: value,
Expr: `$.id`,
CacheIndex: 4,
Setter: func(v string) error {
args.Id = v
return nil
},
}); err != nil {
return nil, err
}
grpcfed.Logger(ctx).DebugContext(ctx, "call post.PostService/GetPost", slog.Any("post.GetPostRequest", s.logvalue_Post_GetPostRequest(args)))
md, err := grpcfed.EvalCEL(ctx, &grpcfed.EvalCELRequest{
Value: value,
Expr: `md`,
OutType: reflect.TypeOf(map[string][]string{}),
CacheIndex: 5,
})
if err != nil {
return nil, err
}
for k, v := range md.(map[string][]string) {
for _, vv := range v {
ctx = grpcfed.AppendToOutgoingContext(ctx, k, vv)
}
}
var callOpts []grpcfed.CallOption
var hdr grpcfed.GRPCMetadata
callOpts = append(callOpts, grpcfed.GRPCCallOptionHeader(&hdr))
var tlr grpcfed.GRPCMetadata
callOpts = append(callOpts, grpcfed.GRPCCallOptionTrailer(&tlr))
callOpts = append(callOpts, grpcfed.GRPCCallOptionMaxCallRecvMsgSize(100))
callOpts = append(callOpts, grpcfed.GRPCCallOptionMaxCallSendMsgSize(100))
callOpts = append(callOpts, grpcfed.GRPCCallOptionStaticMethod())
callOpts = append(callOpts, grpcfed.GRPCCallOptionWaitForReady(true))
ret, err := s.client.Post_PostServiceClient.GetPost(ctx, args, callOpts...)
value.WithLock(func() {
if value.vars.Hdr != nil {
for k, v := range hdr {
value.vars.Hdr[k] = v
}
}
if value.vars.Tlr != nil {
for k, v := range tlr {
value.vars.Tlr[k] = v
}
}
})
if err != nil {
grpcErr := grpcfed.ToGRPCError(ctx, err)
ctx = grpcfed.WithGRPCError(ctx, grpcErr)
var (
defaultMsg string
defaultCode grpcfed.Code
defaultDetails []grpcfed.ProtoMessage
)
if stat, exists := grpcfed.GRPCStatusFromError(err); exists {
defaultMsg = stat.Message()
defaultCode = stat.Code()
details := stat.Details()
defaultDetails = make([]grpcfed.ProtoMessage, 0, len(details))
for _, detail := range details {
msg, ok := detail.(grpcfed.ProtoMessage)
if ok {
defaultDetails = append(defaultDetails, msg)
}
}
_ = defaultMsg
_ = defaultCode
_ = defaultDetails
}
type localStatusType struct {
status *grpcfed.Status
logLevel slog.Level
}
stat, handleErr := func() (*localStatusType, error) {
var stat *grpcfed.Status
{
/*
def {
name: "_def3_def0"
by: "1"
}
*/
def__def3_def0 := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[int64, *localValueType]{
Name: `_def3_def0`,
Type: grpcfed.CELIntType,
Setter: func(value *localValueType, v int64) error {
value.vars.XDef3Def0 = v
return nil
},
By: `1`,
ByCacheIndex: 6,
})
}
if err := def__def3_def0(ctx); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
if err := grpcfed.If(ctx, &grpcfed.IfParam[*localValueType]{
Value: value,
Expr: `true`,
CacheIndex: 7,
Body: func(value *localValueType) error {
var errorMessage string
if defaultMsg != "" {
errorMessage = defaultMsg
} else {
errorMessage = "error"
}
var code grpcfed.Code
code = defaultCode
status := grpcfed.NewGRPCStatus(code, errorMessage)
statusWithDetails, err := status.WithDetails(defaultDetails...)
if err != nil {
grpcfed.Logger(ctx).ErrorContext(ctx, "failed setting error details", slog.String("error", err.Error()))
stat = status
} else {
stat = statusWithDetails
}
return nil
},
}); err != nil {
return nil, err
}
if stat != nil {
return &localStatusType{status: stat, logLevel: slog.LevelError}, nil
}
}
return nil, nil
}()
if handleErr != nil {
grpcfed.Logger(ctx).ErrorContext(ctx, "failed to handle error", slog.String("error", handleErr.Error()))
// If it fails during error handling, return the original error.
if err := s.errorHandler(ctx, FederationService_DependentMethod_Post_PostService_GetPost, err); err != nil {
return nil, grpcfed.NewErrorWithLogAttrs(err, slog.LevelError, grpcfed.LogAttrs(ctx))
}
} else if stat != nil {
if err := s.errorHandler(ctx, FederationService_DependentMethod_Post_PostService_GetPost, stat.status.Err()); err != nil {
return nil, grpcfed.NewErrorWithLogAttrs(err, stat.logLevel, grpcfed.LogAttrs(ctx))
}
} else {
if err := s.errorHandler(ctx, FederationService_DependentMethod_Post_PostService_GetPost, err); err != nil {
return nil, grpcfed.NewErrorWithLogAttrs(err, slog.LevelError, grpcfed.LogAttrs(ctx))
}
}
value.SetGRPCError(ret, grpcErr)
}
return ret, nil
},
})
}
/*
def {
name: "hdr_keys"
if: "res != null"
by: "hdr.map(k, k)"
}
*/
def_hdr_keys := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[[]string, *localValueType]{
If: `res != null`,
IfCacheIndex: 8,
Name: `hdr_keys`,
Type: grpcfed.CELListType(grpcfed.CELStringType),
Setter: func(value *localValueType, v []string) error {
value.vars.HdrKeys = v
return nil
},
By: `hdr.map(k, k)`,
ByCacheIndex: 9,
})
}
/*
def {
name: "tlr_keys"
if: "res != null"
by: "tlr.map(k, k)"
}
*/
def_tlr_keys := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[[]string, *localValueType]{
If: `res != null`,
IfCacheIndex: 10,
Name: `tlr_keys`,
Type: grpcfed.CELListType(grpcfed.CELStringType),
Setter: func(value *localValueType, v []string) error {
value.vars.TlrKeys = v
return nil
},
By: `tlr.map(k, k)`,
ByCacheIndex: 11,
})
}
// A tree view of message dependencies is shown below.
/*
hdr ─┐
hdr ─┐ │
md ─┤ │
tlr ─┤ │
res ─┤
hdr_keys ─┐
hdr ─┐ │
md ─┤ │
tlr ─┤ │
res ─┐ │
tlr ─┤ │
tlr_keys ─┤
*/
eg, ctx1 := grpcfed.ErrorGroupWithContext(ctx)
grpcfed.GoWithRecover(eg, func() (any, error) {
eg, ctx2 := grpcfed.ErrorGroupWithContext(ctx1)
grpcfed.GoWithRecover(eg, func() (any, error) {
if err := def_hdr(ctx2); err != nil {
grpcfed.RecordErrorToSpan(ctx2, err)
return nil, err
}
return nil, nil
})
grpcfed.GoWithRecover(eg, func() (any, error) {
eg, ctx3 := grpcfed.ErrorGroupWithContext(ctx2)
grpcfed.GoWithRecover(eg, func() (any, error) {
if err := def_hdr(ctx3); err != nil {
grpcfed.RecordErrorToSpan(ctx3, err)
return nil, err
}
return nil, nil
})
grpcfed.GoWithRecover(eg, func() (any, error) {
if err := def_md(ctx3); err != nil {
grpcfed.RecordErrorToSpan(ctx3, err)
return nil, err
}
return nil, nil
})
grpcfed.GoWithRecover(eg, func() (any, error) {
if err := def_tlr(ctx3); err != nil {
grpcfed.RecordErrorToSpan(ctx3, err)
return nil, err
}
return nil, nil
})
if err := eg.Wait(); err != nil {
return nil, err
}
if err := def_res(ctx2); err != nil {
grpcfed.RecordErrorToSpan(ctx2, err)
return nil, err
}
return nil, nil
})
if err := eg.Wait(); err != nil {
return nil, err
}
if err := def_hdr_keys(ctx1); err != nil {
grpcfed.RecordErrorToSpan(ctx1, err)
return nil, err
}
return nil, nil
})
grpcfed.GoWithRecover(eg, func() (any, error) {
eg, ctx2 := grpcfed.ErrorGroupWithContext(ctx1)
grpcfed.GoWithRecover(eg, func() (any, error) {
eg, ctx3 := grpcfed.ErrorGroupWithContext(ctx2)
grpcfed.GoWithRecover(eg, func() (any, error) {
if err := def_hdr(ctx3); err != nil {
grpcfed.RecordErrorToSpan(ctx3, err)
return nil, err
}
return nil, nil
})
grpcfed.GoWithRecover(eg, func() (any, error) {
if err := def_md(ctx3); err != nil {
grpcfed.RecordErrorToSpan(ctx3, err)
return nil, err
}
return nil, nil
})
grpcfed.GoWithRecover(eg, func() (any, error) {
if err := def_tlr(ctx3); err != nil {
grpcfed.RecordErrorToSpan(ctx3, err)
return nil, err
}
return nil, nil
})
if err := eg.Wait(); err != nil {
return nil, err
}
if err := def_res(ctx2); err != nil {
grpcfed.RecordErrorToSpan(ctx2, err)
return nil, err
}
return nil, nil
})
grpcfed.GoWithRecover(eg, func() (any, error) {
if err := def_tlr(ctx2); err != nil {
grpcfed.RecordErrorToSpan(ctx2, err)
return nil, err
}
return nil, nil
})
if err := eg.Wait(); err != nil {
return nil, err
}
if err := def_tlr_keys(ctx1); err != nil {
grpcfed.RecordErrorToSpan(ctx1, err)
return nil, err
}
return nil, nil
})
if err := eg.Wait(); err != nil {
return nil, err
}
// assign named parameters to message arguments to pass to the custom resolver.
req.FederationService_Federation_GetPostResponseVariable.Hdr = value.vars.Hdr
req.FederationService_Federation_GetPostResponseVariable.HdrKeys = value.vars.HdrKeys
req.FederationService_Federation_GetPostResponseVariable.Md = value.vars.Md
req.FederationService_Federation_GetPostResponseVariable.Res = value.vars.Res
req.FederationService_Federation_GetPostResponseVariable.Tlr = value.vars.Tlr
req.FederationService_Federation_GetPostResponseVariable.TlrKeys = value.vars.TlrKeys
// create a message value to be returned.
ret := &GetPostResponse{}
// field binding section.
// (grpc.federation.field).by = "hdr_keys.sortAsc(v, v)"
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[[]string]{
Value: value,
Expr: `hdr_keys.sortAsc(v, v)`,
CacheIndex: 12,
Setter: func(v []string) error {
ret.Header = v
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
// (grpc.federation.field).by = "tlr_keys.sortAsc(v, v)"
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[[]string]{
Value: value,
Expr: `tlr_keys.sortAsc(v, v)`,
CacheIndex: 13,
Setter: func(v []string) error {
ret.Trailer = v
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
grpcfed.Logger(ctx).DebugContext(ctx, "resolved federation.GetPostResponse", slog.Any("federation.GetPostResponse", s.logvalue_Federation_GetPostResponse(ret)))
return ret, nil
}
func (s *FederationService) logvalue_Federation_GetPostResponse(v *GetPostResponse) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.Any("header", v.GetHeader()),
slog.Any("trailer", v.GetTrailer()),
)
}
func (s *FederationService) logvalue_Federation_GetPostResponseArgument(v *FederationService_Federation_GetPostResponseArgument) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.String("id", v.Id),
)
}
func (s *FederationService) logvalue_Post_GetPostRequest(v *post.GetPostRequest) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.String("id", v.GetId()),
)
}
================================================
FILE: _examples/20_callopt/go.mod
================================================
module example
go 1.24.0
replace github.com/mercari/grpc-federation => ../../
require (
github.com/google/go-cmp v0.7.0
github.com/mercari/grpc-federation v0.0.0-00010101000000-000000000000
go.opentelemetry.io/otel v1.24.0
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.21.0
go.opentelemetry.io/otel/sdk v1.24.0
go.opentelemetry.io/otel/trace v1.24.0
go.uber.org/goleak v1.3.0
google.golang.org/genproto/googleapis/rpc v0.0.0-20240826202546-f6391c0de4c7
google.golang.org/grpc v1.65.0
google.golang.org/protobuf v1.34.2
)
require (
cel.dev/expr v0.19.1 // indirect
github.com/antlr4-go/antlr/v4 v4.13.0 // indirect
github.com/cenkalti/backoff/v4 v4.2.1 // indirect
github.com/go-logr/logr v1.4.1 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
github.com/goccy/wasi-go v0.3.2 // indirect
github.com/google/cel-go v0.23.1 // indirect
github.com/google/uuid v1.6.0 // indirect
github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0 // indirect
github.com/kelseyhightower/envconfig v1.4.0 // indirect
github.com/stealthrocket/wazergo v0.19.1 // indirect
github.com/stoewer/go-strcase v1.3.0 // indirect
github.com/tetratelabs/wazero v1.10.1 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.21.0 // indirect
go.opentelemetry.io/otel/metric v1.24.0 // indirect
go.opentelemetry.io/proto/otlp v1.0.0 // indirect
golang.org/x/exp v0.0.0-20250506013437-ce4c2cf36ca6 // indirect
golang.org/x/net v0.38.0 // indirect
golang.org/x/sync v0.14.0 // indirect
golang.org/x/sys v0.37.0 // indirect
golang.org/x/text v0.23.0 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20240826202546-f6391c0de4c7 // indirect
)
================================================
FILE: _examples/20_callopt/go.sum
================================================
cel.dev/expr v0.19.1 h1:NciYrtDRIR0lNCnH1LFJegdjspNx9fI59O7TWcua/W4=
cel.dev/expr v0.19.1/go.mod h1:MrpN08Q+lEBs+bGYdLxxHkZoUSsCp0nSKTs0nTymJgw=
github.com/antlr4-go/antlr/v4 v4.13.0 h1:lxCg3LAv+EUK6t1i0y1V6/SLeUi0eKEKdhQAlS8TVTI=
github.com/antlr4-go/antlr/v4 v4.13.0/go.mod h1:pfChB/xh/Unjila75QW7+VU4TSnWnnk9UTnmpPaOR2g=
github.com/cenkalti/backoff/v4 v4.2.1 h1:y4OZtCnogmCPw98Zjyt5a6+QwPLGkiQsYW5oUqylYbM=
github.com/cenkalti/backoff/v4 v4.2.1/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A=
github.com/go-logr/logr v1.4.1 h1:pKouT5E8xu9zeFC39JXRDukb6JFQPXM5p5I91188VAQ=
github.com/go-logr/logr v1.4.1/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY=
github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag=
github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE=
github.com/goccy/wasi-go v0.3.2 h1:wAvGXmqCkfcp0B0AwIp5Ya53hzDwkKm9W8iuT3nCCz0=
github.com/goccy/wasi-go v0.3.2/go.mod h1:nIKD204n9xa4Z20UV+XA483kIr9TAl2vXr+X5qVAO5M=
github.com/golang/glog v1.2.1 h1:OptwRhECazUx5ix5TTWC3EZhsZEHWcYWY4FQHTIubm4=
github.com/golang/glog v1.2.1/go.mod h1:6AhwSGph0fcJtXVM/PEHPqZlFeoLxhs7/t5UDAwmO+w=
github.com/google/cel-go v0.23.1 h1:91ThhEZlBcE5rB2adBVXqvDoqdL8BG2oyhd0bK1I/r4=
github.com/google/cel-go v0.23.1/go.mod h1:52Pb6QsDbC5kvgxvZhiL9QX1oZEkcUF/ZqaPx1J5Wwo=
github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8=
github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU=
github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0 h1:YBftPWNWd4WwGqtY2yeZL2ef8rHAxPBD8KFhJpmcqms=
github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0/go.mod h1:YN5jB8ie0yfIUg6VvR9Kz84aCaG7AsGZnLjhHbUqwPg=
github.com/kelseyhightower/envconfig v1.4.0 h1:Im6hONhd3pLkfDFsbRgu68RDNkGF1r3dvMUtDTo2cv8=
github.com/kelseyhightower/envconfig v1.4.0/go.mod h1:cccZRl6mQpaq41TPp5QxidR+Sa3axMbJDNb//FQX6Gg=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/stealthrocket/wazergo v0.19.1 h1:BPrITETPgSFwiytwmToO0MbUC/+RGC39JScz1JmmG6c=
github.com/stealthrocket/wazergo v0.19.1/go.mod h1:riI0hxw4ndZA5e6z7PesHg2BtTftcZaMxRcoiGGipTs=
github.com/stoewer/go-strcase v1.3.0 h1:g0eASXYtp+yvN9fK8sH94oCIk0fau9uV1/ZdJ0AVEzs=
github.com/stoewer/go-strcase v1.3.0/go.mod h1:fAH5hQ5pehh+j3nZfvwdk2RgEgQjAoM8wodgtPmh1xo=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=
github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo=
github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk=
github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
github.com/tetratelabs/wazero v1.10.1 h1:2DugeJf6VVk58KTPszlNfeeN8AhhpwcZqkJj2wwFuH8=
github.com/tetratelabs/wazero v1.10.1/go.mod h1:DRm5twOQ5Gr1AoEdSi0CLjDQF1J9ZAuyqFIjl1KKfQU=
go.opentelemetry.io/otel v1.24.0 h1:0LAOdjNmQeSTzGBzduGe/rU4tZhMwL5rWgtp9Ku5Jfo=
go.opentelemetry.io/otel v1.24.0/go.mod h1:W7b9Ozg4nkF5tWI5zsXkaKKDjdVjpD4oAt9Qi/MArHo=
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.21.0 h1:cl5P5/GIfFh4t6xyruOgJP5QiA1pw4fYYdv6nc6CBWw=
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.21.0/go.mod h1:zgBdWWAu7oEEMC06MMKc5NLbA/1YDXV1sMpSqEeLQLg=
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.21.0 h1:tIqheXEFWAZ7O8A7m+J0aPTmpJN3YQ7qetUAdkkkKpk=
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.21.0/go.mod h1:nUeKExfxAQVbiVFn32YXpXZZHZ61Cc3s3Rn1pDBGAb0=
go.opentelemetry.io/otel/metric v1.24.0 h1:6EhoGWWK28x1fbpA4tYTOWBkPefTDQnb8WSGXlc88kI=
go.opentelemetry.io/otel/metric v1.24.0/go.mod h1:VYhLe1rFfxuTXLgj4CBiyz+9WYBA8pNGJgDcSFRKBco=
go.opentelemetry.io/otel/sdk v1.24.0 h1:YMPPDNymmQN3ZgczicBY3B6sf9n62Dlj9pWD3ucgoDw=
go.opentelemetry.io/otel/sdk v1.24.0/go.mod h1:KVrIYw6tEubO9E96HQpcmpTKDVn9gdv35HoYiQWGDFg=
go.opentelemetry.io/otel/trace v1.24.0 h1:CsKnnL4dUAr/0llH9FKuc698G04IrpWV0MQA/Y1YELI=
go.opentelemetry.io/otel/trace v1.24.0/go.mod h1:HPc3Xr/cOApsBI154IU0OI0HJexz+aw5uPdbs3UCjNU=
go.opentelemetry.io/proto/otlp v1.0.0 h1:T0TX0tmXU8a3CbNXzEKGeU5mIVOdf0oykP+u2lIVU/I=
go.opentelemetry.io/proto/otlp v1.0.0/go.mod h1:Sy6pihPLfYHkr3NkUbEhGHFhINUSI/v80hjKIs5JXpM=
go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto=
go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE=
golang.org/x/exp v0.0.0-20250506013437-ce4c2cf36ca6 h1:y5zboxd6LQAqYIhHnB48p0ByQ/GnQx2BE33L8BOHQkI=
golang.org/x/exp v0.0.0-20250506013437-ce4c2cf36ca6/go.mod h1:U6Lno4MTRCDY+Ba7aCcauB9T60gsv5s4ralQzP72ZoQ=
golang.org/x/net v0.38.0 h1:vRMAPTMaeGqVhG5QyLJHqNDwecKTomGeqbnfZyKlBI8=
golang.org/x/net v0.38.0/go.mod h1:ivrbrMbzFq5J41QOQh0siUuly180yBYtLp+CKbEaFx8=
golang.org/x/sync v0.14.0 h1:woo0S4Yywslg6hp4eUFjTVOyKt0RookbpAHG4c1HmhQ=
golang.org/x/sync v0.14.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA=
golang.org/x/sys v0.37.0 h1:fdNQudmxPjkdUTPnLn5mdQv7Zwvbvpaxqs831goi9kQ=
golang.org/x/sys v0.37.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks=
golang.org/x/text v0.23.0 h1:D71I7dUrlY+VX0gQShAThNGHFxZ13dGLBHQLVl1mJlY=
golang.org/x/text v0.23.0/go.mod h1:/BLNzu4aZCJ1+kcD0DNRotWKage4q2rGVAg4o22unh4=
google.golang.org/genproto/googleapis/api v0.0.0-20240826202546-f6391c0de4c7 h1:YcyjlL1PRr2Q17/I0dPk2JmYS5CDXfcdb2Z3YRioEbw=
google.golang.org/genproto/googleapis/api v0.0.0-20240826202546-f6391c0de4c7/go.mod h1:OCdP9MfskevB/rbYvHTsXTtKC+3bHWajPdoKgjcYkfo=
google.golang.org/genproto/googleapis/rpc v0.0.0-20240826202546-f6391c0de4c7 h1:2035KHhUv+EpyB+hWgJnaWKJOdX1E95w2S8Rr4uWKTs=
google.golang.org/genproto/googleapis/rpc v0.0.0-20240826202546-f6391c0de4c7/go.mod h1:UqMtugtsSgubUsoxbuAoiCXvqvErP7Gf0so0mK9tHxU=
google.golang.org/grpc v1.65.0 h1:bs/cUb4lp1G5iImFFd3u5ixQzweKizoZJAwBNLR42lc=
google.golang.org/grpc v1.65.0/go.mod h1:WgYC2ypjlB0EiQi6wdKixMqukr6lBc0Vo+oOgjrM5ZQ=
google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg=
google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
================================================
FILE: _examples/20_callopt/grpc-federation.yaml
================================================
imports:
- proto
src:
- proto
out: .
plugins:
- plugin: go
opt: paths=source_relative
- plugin: go-grpc
opt: paths=source_relative
- plugin: grpc-federation
opt: paths=source_relative
================================================
FILE: _examples/20_callopt/main_test.go
================================================
package main_test
import (
"context"
"fmt"
"log/slog"
"net"
"os"
"testing"
"github.com/google/go-cmp/cmp"
"github.com/google/go-cmp/cmp/cmpopts"
"go.opentelemetry.io/otel"
"go.opentelemetry.io/otel/attribute"
"go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc"
"go.opentelemetry.io/otel/propagation"
"go.opentelemetry.io/otel/sdk/resource"
sdktrace "go.opentelemetry.io/otel/sdk/trace"
semconv "go.opentelemetry.io/otel/semconv/v1.4.0"
"go.uber.org/goleak"
"google.golang.org/grpc"
"google.golang.org/grpc/metadata"
"google.golang.org/grpc/test/bufconn"
"example/federation"
"example/post"
)
const bufSize = 1024
var (
listener *bufconn.Listener
postClient post.PostServiceClient
)
type clientConfig struct{}
func (c *clientConfig) Post_PostServiceClient(cfg federation.FederationServiceClientConfig) (post.PostServiceClient, error) {
return postClient, nil
}
type PostServer struct {
*post.UnimplementedPostServiceServer
}
func (s *PostServer) GetPost(ctx context.Context, req *post.GetPostRequest) (*post.GetPostResponse, error) {
md, ok := metadata.FromIncomingContext(ctx)
if !ok {
return nil, fmt.Errorf("failed to get incoming metadata")
}
hdr, exists := md["authorization"]
if !exists || len(hdr) == 0 || hdr[0] == "" {
return nil, fmt.Errorf("failed to get authorization header value")
}
if err := grpc.SendHeader(ctx, metadata.Pairs("x-custom-header", "header-value")); err != nil {
return nil, fmt.Errorf("failed to send header: %w", err)
}
grpc.SetTrailer(ctx, metadata.Pairs("x-custom-trailer", "trailer-value"))
return &post.GetPostResponse{
Post: &post.Post{
Id: req.Id,
Content: "foo",
},
}, nil
}
func dialer(ctx context.Context, address string) (net.Conn, error) {
return listener.Dial()
}
func TestFederation(t *testing.T) {
defer goleak.VerifyNone(t)
ctx := context.Background()
listener = bufconn.Listen(bufSize)
if os.Getenv("ENABLE_JAEGER") != "" {
exporter, err := otlptracegrpc.New(ctx, otlptracegrpc.WithInsecure())
if err != nil {
t.Fatal(err)
}
tp := sdktrace.NewTracerProvider(
sdktrace.WithBatcher(exporter),
sdktrace.WithResource(
resource.NewWithAttributes(
semconv.SchemaURL,
semconv.ServiceNameKey.String("example20/callopt"),
semconv.ServiceVersionKey.String("1.0.0"),
attribute.String("environment", "dev"),
),
),
sdktrace.WithSampler(sdktrace.AlwaysSample()),
)
defer tp.Shutdown(ctx)
otel.SetTextMapPropagator(propagation.TraceContext{})
otel.SetTracerProvider(tp)
}
conn, err := grpc.DialContext(ctx, "", grpc.WithContextDialer(dialer), grpc.WithInsecure())
if err != nil {
t.Fatal(err)
}
defer conn.Close()
postClient = post.NewPostServiceClient(conn)
grpcServer := grpc.NewServer()
defer grpcServer.Stop()
logger := slog.New(slog.NewJSONHandler(os.Stdout, &slog.HandlerOptions{
Level: slog.LevelDebug,
}))
federationServer, err := federation.NewFederationService(federation.FederationServiceConfig{
Client: new(clientConfig),
Logger: logger,
})
if err != nil {
t.Fatal(err)
}
defer federation.CleanupFederationService(ctx, federationServer)
post.RegisterPostServiceServer(grpcServer, &PostServer{})
federation.RegisterFederationServiceServer(grpcServer, federationServer)
go func() {
if err := grpcServer.Serve(listener); err != nil {
t.Fatal(err)
}
}()
client := federation.NewFederationServiceClient(conn)
t.Run("GetPost", func(t *testing.T) {
res, err := client.GetPost(ctx, &federation.GetPostRequest{
Id: "foo",
})
if err != nil {
t.Fatal(err)
}
if diff := cmp.Diff(res, &federation.GetPostResponse{
Header: []string{"content-type", "x-custom-header"},
Trailer: []string{"x-custom-trailer"},
}, cmpopts.IgnoreUnexported(
federation.GetPostResponse{},
)); diff != "" {
t.Errorf("(-got, +want)\n%s", diff)
}
})
}
================================================
FILE: _examples/20_callopt/post/post.pb.go
================================================
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.33.0
// protoc (unknown)
// source: post/post.proto
package post
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
type GetPostRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
}
func (x *GetPostRequest) Reset() {
*x = GetPostRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_post_post_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GetPostRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetPostRequest) ProtoMessage() {}
func (x *GetPostRequest) ProtoReflect() protoreflect.Message {
mi := &file_post_post_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GetPostRequest.ProtoReflect.Descriptor instead.
func (*GetPostRequest) Descriptor() ([]byte, []int) {
return file_post_post_proto_rawDescGZIP(), []int{0}
}
func (x *GetPostRequest) GetId() string {
if x != nil {
return x.Id
}
return ""
}
type GetPostResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Post *Post `protobuf:"bytes,1,opt,name=post,proto3" json:"post,omitempty"`
}
func (x *GetPostResponse) Reset() {
*x = GetPostResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_post_post_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GetPostResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetPostResponse) ProtoMessage() {}
func (x *GetPostResponse) ProtoReflect() protoreflect.Message {
mi := &file_post_post_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GetPostResponse.ProtoReflect.Descriptor instead.
func (*GetPostResponse) Descriptor() ([]byte, []int) {
return file_post_post_proto_rawDescGZIP(), []int{1}
}
func (x *GetPostResponse) GetPost() *Post {
if x != nil {
return x.Post
}
return nil
}
type Post struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
Content string `protobuf:"bytes,2,opt,name=content,proto3" json:"content,omitempty"`
}
func (x *Post) Reset() {
*x = Post{}
if protoimpl.UnsafeEnabled {
mi := &file_post_post_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Post) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Post) ProtoMessage() {}
func (x *Post) ProtoReflect() protoreflect.Message {
mi := &file_post_post_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Post.ProtoReflect.Descriptor instead.
func (*Post) Descriptor() ([]byte, []int) {
return file_post_post_proto_rawDescGZIP(), []int{2}
}
func (x *Post) GetId() string {
if x != nil {
return x.Id
}
return ""
}
func (x *Post) GetContent() string {
if x != nil {
return x.Content
}
return ""
}
var File_post_post_proto protoreflect.FileDescriptor
var file_post_post_proto_rawDesc = []byte{
0x0a, 0x0f, 0x70, 0x6f, 0x73, 0x74, 0x2f, 0x70, 0x6f, 0x73, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x12, 0x04, 0x70, 0x6f, 0x73, 0x74, 0x22, 0x20, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x50, 0x6f,
0x73, 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, 0x31, 0x0a, 0x0f, 0x47, 0x65, 0x74,
0x50, 0x6f, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1e, 0x0a, 0x04,
0x70, 0x6f, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x70, 0x6f, 0x73,
0x74, 0x2e, 0x50, 0x6f, 0x73, 0x74, 0x52, 0x04, 0x70, 0x6f, 0x73, 0x74, 0x22, 0x30, 0x0a, 0x04,
0x50, 0x6f, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
0x52, 0x02, 0x69, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18,
0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x32, 0x47,
0x0a, 0x0b, 0x50, 0x6f, 0x73, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x38, 0x0a,
0x07, 0x47, 0x65, 0x74, 0x50, 0x6f, 0x73, 0x74, 0x12, 0x14, 0x2e, 0x70, 0x6f, 0x73, 0x74, 0x2e,
0x47, 0x65, 0x74, 0x50, 0x6f, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15,
0x2e, 0x70, 0x6f, 0x73, 0x74, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x6f, 0x73, 0x74, 0x52, 0x65, 0x73,
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x58, 0x0a, 0x08, 0x63, 0x6f, 0x6d, 0x2e, 0x70,
0x6f, 0x73, 0x74, 0x42, 0x09, 0x50, 0x6f, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01,
0x5a, 0x11, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2f, 0x70, 0x6f, 0x73, 0x74, 0x3b, 0x70,
0x6f, 0x73, 0x74, 0xa2, 0x02, 0x03, 0x50, 0x58, 0x58, 0xaa, 0x02, 0x04, 0x50, 0x6f, 0x73, 0x74,
0xca, 0x02, 0x04, 0x50, 0x6f, 0x73, 0x74, 0xe2, 0x02, 0x10, 0x50, 0x6f, 0x73, 0x74, 0x5c, 0x47,
0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x04, 0x50, 0x6f, 0x73,
0x74, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_post_post_proto_rawDescOnce sync.Once
file_post_post_proto_rawDescData = file_post_post_proto_rawDesc
)
func file_post_post_proto_rawDescGZIP() []byte {
file_post_post_proto_rawDescOnce.Do(func() {
file_post_post_proto_rawDescData = protoimpl.X.CompressGZIP(file_post_post_proto_rawDescData)
})
return file_post_post_proto_rawDescData
}
var file_post_post_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
var file_post_post_proto_goTypes = []interface{}{
(*GetPostRequest)(nil), // 0: post.GetPostRequest
(*GetPostResponse)(nil), // 1: post.GetPostResponse
(*Post)(nil), // 2: post.Post
}
var file_post_post_proto_depIdxs = []int32{
2, // 0: post.GetPostResponse.post:type_name -> post.Post
0, // 1: post.PostService.GetPost:input_type -> post.GetPostRequest
1, // 2: post.PostService.GetPost:output_type -> post.GetPostResponse
2, // [2:3] is the sub-list for method output_type
1, // [1:2] is the sub-list for method input_type
1, // [1:1] is the sub-list for extension type_name
1, // [1:1] is the sub-list for extension extendee
0, // [0:1] is the sub-list for field type_name
}
func init() { file_post_post_proto_init() }
func file_post_post_proto_init() {
if File_post_post_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_post_post_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetPostRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_post_post_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetPostResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_post_post_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Post); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_post_post_proto_rawDesc,
NumEnums: 0,
NumMessages: 3,
NumExtensions: 0,
NumServices: 1,
},
GoTypes: file_post_post_proto_goTypes,
DependencyIndexes: file_post_post_proto_depIdxs,
MessageInfos: file_post_post_proto_msgTypes,
}.Build()
File_post_post_proto = out.File
file_post_post_proto_rawDesc = nil
file_post_post_proto_goTypes = nil
file_post_post_proto_depIdxs = nil
}
================================================
FILE: _examples/20_callopt/post/post_grpc.pb.go
================================================
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.3.0
// - protoc (unknown)
// source: post/post.proto
package post
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 (
PostService_GetPost_FullMethodName = "/post.PostService/GetPost"
)
// PostServiceClient is the client API for PostService 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 PostServiceClient interface {
GetPost(ctx context.Context, in *GetPostRequest, opts ...grpc.CallOption) (*GetPostResponse, error)
}
type postServiceClient struct {
cc grpc.ClientConnInterface
}
func NewPostServiceClient(cc grpc.ClientConnInterface) PostServiceClient {
return &postServiceClient{cc}
}
func (c *postServiceClient) GetPost(ctx context.Context, in *GetPostRequest, opts ...grpc.CallOption) (*GetPostResponse, error) {
out := new(GetPostResponse)
err := c.cc.Invoke(ctx, PostService_GetPost_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// PostServiceServer is the server API for PostService service.
// All implementations must embed UnimplementedPostServiceServer
// for forward compatibility
type PostServiceServer interface {
GetPost(context.Context, *GetPostRequest) (*GetPostResponse, error)
mustEmbedUnimplementedPostServiceServer()
}
// UnimplementedPostServiceServer must be embedded to have forward compatible implementations.
type UnimplementedPostServiceServer struct {
}
func (UnimplementedPostServiceServer) GetPost(context.Context, *GetPostRequest) (*GetPostResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetPost not implemented")
}
func (UnimplementedPostServiceServer) mustEmbedUnimplementedPostServiceServer() {}
// UnsafePostServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to PostServiceServer will
// result in compilation errors.
type UnsafePostServiceServer interface {
mustEmbedUnimplementedPostServiceServer()
}
func RegisterPostServiceServer(s grpc.ServiceRegistrar, srv PostServiceServer) {
s.RegisterService(&PostService_ServiceDesc, srv)
}
func _PostService_GetPost_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetPostRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(PostServiceServer).GetPost(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: PostService_GetPost_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(PostServiceServer).GetPost(ctx, req.(*GetPostRequest))
}
return interceptor(ctx, in, info, handler)
}
// PostService_ServiceDesc is the grpc.ServiceDesc for PostService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var PostService_ServiceDesc = grpc.ServiceDesc{
ServiceName: "post.PostService",
HandlerType: (*PostServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "GetPost",
Handler: _PostService_GetPost_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "post/post.proto",
}
================================================
FILE: _examples/20_callopt/proto/buf.yaml
================================================
version: v1
breaking:
use:
- FILE
lint:
use:
- DEFAULT
================================================
FILE: _examples/20_callopt/proto/federation/federation.proto
================================================
syntax = "proto3";
package federation;
import "grpc/federation/federation.proto";
import "google/protobuf/descriptor.proto";
import "google/protobuf/empty.proto";
option go_package = "example/federation;federation";
option (grpc.federation.file)= {
import: ["post/post.proto"]
};
service FederationService {
option (grpc.federation.service) = {};
rpc GetPost(GetPostRequest) returns (GetPostResponse) {};
}
message GetPostRequest {
string id = 1;
}
message GetPostResponse {
option (.grpc.federation.message) = {
def { name: "hdr" by: "grpc.federation.metadata.new()" }
def { name: "tlr" by: "grpc.federation.metadata.new()" }
def { name: "md" by: "{'authorization': ['Bearer xxx']}" }
def {
name: "res"
call {
method: "post.PostService/GetPost"
request { field: "id", by: "$.id" }
metadata: "md"
option {
header: "hdr"
trailer: "tlr"
static_method: true
wait_for_ready: true
max_call_recv_msg_size: 100
max_call_send_msg_size: 100
}
error {
def { by: "1" }
}
}
}
def {name: "hdr_keys" by: "hdr.map(k, k)" if: "res != null"}
def {name: "tlr_keys" by: "tlr.map(k, k)" if: "res != null"}
};
repeated string header = 1 [(grpc.federation.field).by = "hdr_keys.sortAsc(v, v)"];
repeated string trailer = 2 [(grpc.federation.field).by = "tlr_keys.sortAsc(v, v)"];
}
================================================
FILE: _examples/20_callopt/proto/post/post.proto
================================================
syntax = "proto3";
package post;
option go_package = "example/post;post";
service PostService {
rpc GetPost(GetPostRequest) returns (GetPostResponse) {};
}
message GetPostRequest {
string id = 1;
}
message GetPostResponse {
Post post = 1;
}
message Post {
string id = 1;
string content = 2;
}
================================================
FILE: _examples/21_wasm_net/.gitignore
================================================
grpc/federation
*.wasm
================================================
FILE: _examples/21_wasm_net/Makefile
================================================
MAKEFILE_DIR := $(dir $(lastword $(MAKEFILE_LIST)))
GOBIN := $(MAKEFILE_DIR)/../../bin
PATH := $(GOBIN):$(PATH)
JAEGER_IMAGE := jaegertracing/all-in-one:latest
.PHONY: generate
generate:
$(GOBIN)/buf generate
.PHONY: lint
lint:
@$(GOBIN)/grpc-federation-linter -Iproto -Iproto_deps ./proto/federation/federation.proto
.PHONY: test
test: build/wasm
go test -v ./ -count=1
.PHONY: grpc-federation/generate
grpc-federation/generate:
@$(GOBIN)/grpc-federation-generator ./proto/federation/federation.proto
.PHONY: grpc-federation/watch
grpc-federation/watch:
@$(GOBIN)/grpc-federation-generator -w
.PHONY: jaeger/start
jaeger/start:
@docker run \
-e COLLECTOR_OTLP_ENABLED=true \
-p 16686:16686 \
-p 4317:4317 \
-p 4318:4318 \
-d \
$(JAEGER_IMAGE)
.PHONY: jaeger/stop
jaeger/stop:
@docker stop $(shell docker ps -q --filter ancestor=$(JAEGER_IMAGE))
build/wasm:
GOOS=wasip1 GOARCH=wasm go build -ldflags "-w -s" -o net.wasm ./cmd/plugin
================================================
FILE: _examples/21_wasm_net/buf.gen.yaml
================================================
version: v1
managed:
enabled: true
plugins:
- plugin: go
out: .
opt: paths=source_relative
- plugin: go-grpc
out: .
opt: paths=source_relative
- plugin: grpc-federation
out: .
opt:
- paths=source_relative
- import_paths=proto
================================================
FILE: _examples/21_wasm_net/buf.work.yaml
================================================
version: v1
directories:
- proto
- proto_deps
================================================
FILE: _examples/21_wasm_net/cmd/plugin/main.go
================================================
package main
import (
"context"
"io"
"net/http"
"os"
pluginpb "example/plugin"
)
type plugin struct{}
func (_ *plugin) Example_Net_HttpGet(ctx context.Context, url string) (string, error) {
resp, err := http.Get(url)
if err != nil {
return "", err
}
defer resp.Body.Close()
b, err := io.ReadAll(resp.Body)
if err != nil {
return "", err
}
return string(b), nil
}
func (_ *plugin) Example_Net_GetFooEnv(_ context.Context) (string, error) {
return os.Getenv("FOO"), nil
}
func (_ *plugin) Example_Net_GetGOGCEnv(_ context.Context) (string, error) {
return os.Getenv("GOGC"), nil
}
func (_ *plugin) Example_Net_GetFileContent(_ context.Context, path string) (string, error) {
f, err := os.ReadFile(path)
if err != nil {
return "", err
}
return string(f), nil
}
func main() {
pluginpb.RegisterNetPlugin(new(plugin))
}
================================================
FILE: _examples/21_wasm_net/federation/federation.pb.go
================================================
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.33.0
// protoc (unknown)
// source: federation/federation.proto
package federation
import (
_ "github.com/mercari/grpc-federation/grpc/federation"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
type GetRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"`
Path string `protobuf:"bytes,2,opt,name=path,proto3" json:"path,omitempty"`
}
func (x *GetRequest) Reset() {
*x = GetRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_federation_federation_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GetRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetRequest) ProtoMessage() {}
func (x *GetRequest) ProtoReflect() protoreflect.Message {
mi := &file_federation_federation_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GetRequest.ProtoReflect.Descriptor instead.
func (*GetRequest) Descriptor() ([]byte, []int) {
return file_federation_federation_proto_rawDescGZIP(), []int{0}
}
func (x *GetRequest) GetUrl() string {
if x != nil {
return x.Url
}
return ""
}
func (x *GetRequest) GetPath() string {
if x != nil {
return x.Path
}
return ""
}
type GetResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Body string `protobuf:"bytes,1,opt,name=body,proto3" json:"body,omitempty"`
Foo string `protobuf:"bytes,2,opt,name=foo,proto3" json:"foo,omitempty"`
File string `protobuf:"bytes,3,opt,name=file,proto3" json:"file,omitempty"`
Gogc string `protobuf:"bytes,4,opt,name=gogc,proto3" json:"gogc,omitempty"`
}
func (x *GetResponse) Reset() {
*x = GetResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_federation_federation_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GetResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetResponse) ProtoMessage() {}
func (x *GetResponse) ProtoReflect() protoreflect.Message {
mi := &file_federation_federation_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GetResponse.ProtoReflect.Descriptor instead.
func (*GetResponse) Descriptor() ([]byte, []int) {
return file_federation_federation_proto_rawDescGZIP(), []int{1}
}
func (x *GetResponse) GetBody() string {
if x != nil {
return x.Body
}
return ""
}
func (x *GetResponse) GetFoo() string {
if x != nil {
return x.Foo
}
return ""
}
func (x *GetResponse) GetFile() string {
if x != nil {
return x.File
}
return ""
}
func (x *GetResponse) GetGogc() string {
if x != nil {
return x.Gogc
}
return ""
}
var File_federation_federation_proto protoreflect.FileDescriptor
var file_federation_federation_proto_rawDesc = []byte{
0x0a, 0x1b, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x66, 0x65, 0x64,
0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0e, 0x6f,
0x72, 0x67, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x20, 0x67,
0x72, 0x70, 0x63, 0x2f, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x66,
0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22,
0x32, 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x10, 0x0a,
0x03, 0x75, 0x72, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6c, 0x12,
0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70,
0x61, 0x74, 0x68, 0x22, 0x9f, 0x02, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f,
0x6e, 0x73, 0x65, 0x12, 0x1d, 0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28,
0x09, 0x42, 0x09, 0x9a, 0x4a, 0x06, 0x12, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x52, 0x04, 0x62, 0x6f,
0x64, 0x79, 0x12, 0x1a, 0x0a, 0x03, 0x66, 0x6f, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42,
0x08, 0x9a, 0x4a, 0x05, 0x12, 0x03, 0x66, 0x6f, 0x6f, 0x52, 0x03, 0x66, 0x6f, 0x6f, 0x12, 0x1d,
0x0a, 0x04, 0x66, 0x69, 0x6c, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x09, 0x9a, 0x4a,
0x06, 0x12, 0x04, 0x66, 0x69, 0x6c, 0x65, 0x52, 0x04, 0x66, 0x69, 0x6c, 0x65, 0x12, 0x1d, 0x0a,
0x04, 0x67, 0x6f, 0x67, 0x63, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x09, 0x9a, 0x4a, 0x06,
0x12, 0x04, 0x67, 0x6f, 0x67, 0x63, 0x52, 0x04, 0x67, 0x6f, 0x67, 0x63, 0x3a, 0x96, 0x01, 0x9a,
0x4a, 0x92, 0x01, 0x0a, 0x22, 0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x5a, 0x1a, 0x65, 0x78, 0x61,
0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x6e, 0x65, 0x74, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x47, 0x65, 0x74,
0x28, 0x24, 0x2e, 0x75, 0x72, 0x6c, 0x29, 0x0a, 0x1e, 0x0a, 0x03, 0x66, 0x6f, 0x6f, 0x5a, 0x17,
0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x6e, 0x65, 0x74, 0x2e, 0x67, 0x65, 0x74, 0x46,
0x6f, 0x6f, 0x45, 0x6e, 0x76, 0x28, 0x29, 0x0a, 0x20, 0x0a, 0x04, 0x67, 0x6f, 0x67, 0x63, 0x5a,
0x18, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x6e, 0x65, 0x74, 0x2e, 0x67, 0x65, 0x74,
0x47, 0x4f, 0x47, 0x43, 0x45, 0x6e, 0x76, 0x28, 0x29, 0x0a, 0x2a, 0x0a, 0x04, 0x66, 0x69, 0x6c,
0x65, 0x5a, 0x22, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x6e, 0x65, 0x74, 0x2e, 0x67,
0x65, 0x74, 0x46, 0x69, 0x6c, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x28, 0x24, 0x2e,
0x70, 0x61, 0x74, 0x68, 0x29, 0x32, 0x5a, 0x0a, 0x11, 0x46, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74,
0x69, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x40, 0x0a, 0x03, 0x47, 0x65,
0x74, 0x12, 0x1a, 0x2e, 0x6f, 0x72, 0x67, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69,
0x6f, 0x6e, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e,
0x6f, 0x72, 0x67, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x47,
0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x1a, 0x03, 0x9a, 0x4a,
0x00, 0x42, 0xb5, 0x01, 0x9a, 0x4a, 0x15, 0x12, 0x13, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2f,
0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x0a, 0x12, 0x63, 0x6f,
0x6d, 0x2e, 0x6f, 0x72, 0x67, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e,
0x42, 0x0f, 0x46, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74,
0x6f, 0x50, 0x01, 0x5a, 0x1d, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2f, 0x66, 0x65, 0x64,
0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x3b, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69,
0x6f, 0x6e, 0xa2, 0x02, 0x03, 0x4f, 0x46, 0x58, 0xaa, 0x02, 0x0e, 0x4f, 0x72, 0x67, 0x2e, 0x46,
0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0xca, 0x02, 0x0e, 0x4f, 0x72, 0x67, 0x5c,
0x46, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0xe2, 0x02, 0x1a, 0x4f, 0x72, 0x67,
0x5c, 0x46, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5c, 0x47, 0x50, 0x42, 0x4d,
0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0f, 0x4f, 0x72, 0x67, 0x3a, 0x3a, 0x46,
0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f,
0x33,
}
var (
file_federation_federation_proto_rawDescOnce sync.Once
file_federation_federation_proto_rawDescData = file_federation_federation_proto_rawDesc
)
func file_federation_federation_proto_rawDescGZIP() []byte {
file_federation_federation_proto_rawDescOnce.Do(func() {
file_federation_federation_proto_rawDescData = protoimpl.X.CompressGZIP(file_federation_federation_proto_rawDescData)
})
return file_federation_federation_proto_rawDescData
}
var file_federation_federation_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
var file_federation_federation_proto_goTypes = []interface{}{
(*GetRequest)(nil), // 0: org.federation.GetRequest
(*GetResponse)(nil), // 1: org.federation.GetResponse
}
var file_federation_federation_proto_depIdxs = []int32{
0, // 0: org.federation.FederationService.Get:input_type -> org.federation.GetRequest
1, // 1: org.federation.FederationService.Get:output_type -> org.federation.GetResponse
1, // [1:2] is the sub-list for method output_type
0, // [0:1] is the sub-list for method input_type
0, // [0:0] is the sub-list for extension type_name
0, // [0:0] is the sub-list for extension extendee
0, // [0:0] is the sub-list for field type_name
}
func init() { file_federation_federation_proto_init() }
func file_federation_federation_proto_init() {
if File_federation_federation_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_federation_federation_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_federation_federation_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_federation_federation_proto_rawDesc,
NumEnums: 0,
NumMessages: 2,
NumExtensions: 0,
NumServices: 1,
},
GoTypes: file_federation_federation_proto_goTypes,
DependencyIndexes: file_federation_federation_proto_depIdxs,
MessageInfos: file_federation_federation_proto_msgTypes,
}.Build()
File_federation_federation_proto = out.File
file_federation_federation_proto_rawDesc = nil
file_federation_federation_proto_goTypes = nil
file_federation_federation_proto_depIdxs = nil
}
================================================
FILE: _examples/21_wasm_net/federation/federation_grpc.pb.go
================================================
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.3.0
// - protoc (unknown)
// source: federation/federation.proto
package federation
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 (
FederationService_Get_FullMethodName = "/org.federation.FederationService/Get"
)
// FederationServiceClient is the client API for FederationService 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 FederationServiceClient interface {
Get(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*GetResponse, error)
}
type federationServiceClient struct {
cc grpc.ClientConnInterface
}
func NewFederationServiceClient(cc grpc.ClientConnInterface) FederationServiceClient {
return &federationServiceClient{cc}
}
func (c *federationServiceClient) Get(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*GetResponse, error) {
out := new(GetResponse)
err := c.cc.Invoke(ctx, FederationService_Get_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// FederationServiceServer is the server API for FederationService service.
// All implementations must embed UnimplementedFederationServiceServer
// for forward compatibility
type FederationServiceServer interface {
Get(context.Context, *GetRequest) (*GetResponse, error)
mustEmbedUnimplementedFederationServiceServer()
}
// UnimplementedFederationServiceServer must be embedded to have forward compatible implementations.
type UnimplementedFederationServiceServer struct {
}
func (UnimplementedFederationServiceServer) Get(context.Context, *GetRequest) (*GetResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method Get not implemented")
}
func (UnimplementedFederationServiceServer) mustEmbedUnimplementedFederationServiceServer() {}
// UnsafeFederationServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to FederationServiceServer will
// result in compilation errors.
type UnsafeFederationServiceServer interface {
mustEmbedUnimplementedFederationServiceServer()
}
func RegisterFederationServiceServer(s grpc.ServiceRegistrar, srv FederationServiceServer) {
s.RegisterService(&FederationService_ServiceDesc, srv)
}
func _FederationService_Get_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(FederationServiceServer).Get(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: FederationService_Get_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(FederationServiceServer).Get(ctx, req.(*GetRequest))
}
return interceptor(ctx, in, info, handler)
}
// FederationService_ServiceDesc is the grpc.ServiceDesc for FederationService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var FederationService_ServiceDesc = grpc.ServiceDesc{
ServiceName: "org.federation.FederationService",
HandlerType: (*FederationServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "Get",
Handler: _FederationService_Get_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "federation/federation.proto",
}
================================================
FILE: _examples/21_wasm_net/federation/federation_grpc_federation.pb.go
================================================
// Code generated by protoc-gen-grpc-federation. DO NOT EDIT!
// versions:
//
// protoc-gen-grpc-federation: (devel)
//
// source: federation/federation.proto
package federation
import (
"context"
"io"
"log/slog"
"reflect"
grpcfed "github.com/mercari/grpc-federation/grpc/federation"
grpcfedcel "github.com/mercari/grpc-federation/grpc/federation/cel"
"go.opentelemetry.io/otel"
"go.opentelemetry.io/otel/trace"
)
var (
_ = reflect.Invalid // to avoid "imported and not used error"
)
// Org_Federation_GetResponseVariable represents variable definitions in "org.federation.GetResponse".
type FederationService_Org_Federation_GetResponseVariable struct {
Body string
File string
Foo string
Gogc string
}
// Org_Federation_GetResponseArgument is argument for "org.federation.GetResponse" message.
type FederationService_Org_Federation_GetResponseArgument struct {
Path string
Url string
FederationService_Org_Federation_GetResponseVariable
}
// FederationServiceConfig configuration required to initialize the service that use GRPC Federation.
type FederationServiceConfig struct {
// CELPlugin If you use the plugin feature to extend the CEL API,
// you must write a plugin and output WebAssembly.
// In this field, configure to load wasm with the path to the WebAssembly file and the sha256 value.
CELPlugin *FederationServiceCELPluginConfig
// ErrorHandler Federation Service often needs to convert errors received from downstream services.
// If an error occurs during method execution in the Federation Service, this error handler is called and the returned error is treated as a final error.
ErrorHandler grpcfed.ErrorHandler
// Logger sets the logger used to output Debug/Info/Error information.
Logger *slog.Logger
}
// FederationServiceClientFactory provides a factory that creates the gRPC Client needed to invoke methods of the gRPC Service on which the Federation Service depends.
type FederationServiceClientFactory interface {
}
// FederationServiceClientConfig helper to create gRPC client.
// Hints for creating a gRPC Client.
type FederationServiceClientConfig struct {
// Service FQDN ( `.` ) of the service on Protocol Buffers.
Service string
}
// FederationServiceDependentClientSet has a gRPC client for all services on which the federation service depends.
// This is provided as an argument when implementing the custom resolver.
type FederationServiceDependentClientSet struct {
}
// FederationServiceResolver provides an interface to directly implement message resolver and field resolver not defined in Protocol Buffers.
type FederationServiceResolver interface {
}
// FederationServiceCELPluginWasmConfig type alias for grpcfedcel.WasmConfig.
type FederationServiceCELPluginWasmConfig = grpcfedcel.WasmConfig
// FederationServiceCELPluginConfig hints for loading a WebAssembly based plugin.
type FederationServiceCELPluginConfig struct {
Net FederationServiceCELPluginWasmConfig
CacheDir string
}
// FederationServiceUnimplementedResolver a structure implemented to satisfy the Resolver interface.
// An Unimplemented error is always returned.
// This is intended for use when there are many Resolver interfaces that do not need to be implemented,
// by embedding them in a resolver structure that you have created.
type FederationServiceUnimplementedResolver struct{}
// FederationService represents Federation Service.
type FederationService struct {
UnimplementedFederationServiceServer
cfg FederationServiceConfig
logger *slog.Logger
isLogLevelDebug bool
errorHandler grpcfed.ErrorHandler
celCacheMap *grpcfed.CELCacheMap
tracer trace.Tracer
celTypeHelper *grpcfed.CELTypeHelper
celEnvOpts []grpcfed.CELEnvOption
celPlugins []*grpcfedcel.CELPlugin
client *FederationServiceDependentClientSet
}
// NewFederationService creates FederationService instance by FederationServiceConfig.
func NewFederationService(cfg FederationServiceConfig) (*FederationService, error) {
if cfg.CELPlugin == nil {
return nil, grpcfed.ErrCELPluginConfig
}
logger := cfg.Logger
if logger == nil {
logger = slog.New(slog.NewJSONHandler(io.Discard, nil))
}
tracer := otel.Tracer("org.federation.FederationService")
ctx := grpcfed.WithLogger(context.Background(), logger)
ctx = grpcfed.WithTracer(ctx, tracer)
errorHandler := cfg.ErrorHandler
if errorHandler == nil {
errorHandler = func(ctx context.Context, methodName string, err error) error { return err }
}
celTypeHelperFieldMap := grpcfed.CELTypeHelperFieldMap{
"grpc.federation.private.org.federation.GetResponseArgument": {
"url": grpcfed.NewCELFieldType(grpcfed.CELStringType, "Url"),
"path": grpcfed.NewCELFieldType(grpcfed.CELStringType, "Path"),
},
}
celTypeHelper := grpcfed.NewCELTypeHelper("org.federation", celTypeHelperFieldMap)
var celEnvOpts []grpcfed.CELEnvOption
celEnvOpts = append(celEnvOpts, grpcfed.NewDefaultEnvOptions(celTypeHelper)...)
var celPlugins []*grpcfedcel.CELPlugin
{
plugin, err := grpcfedcel.NewCELPlugin(ctx, grpcfedcel.CELPluginConfig{
Name: "net",
Wasm: cfg.CELPlugin.Net,
CacheDir: cfg.CELPlugin.CacheDir,
Functions: []*grpcfedcel.CELFunction{
{
Name: "example.net.httpGet",
ID: "example_net_httpGet_string_string",
Args: []*grpcfed.CELTypeDeclare{
grpcfed.CELStringType,
},
Return: grpcfed.CELStringType,
IsMethod: false,
},
{
Name: "example.net.getFooEnv",
ID: "example_net_getFooEnv_string",
Args: []*grpcfed.CELTypeDeclare{},
Return: grpcfed.CELStringType,
IsMethod: false,
},
{
Name: "example.net.getGOGCEnv",
ID: "example_net_getGOGCEnv_string",
Args: []*grpcfed.CELTypeDeclare{},
Return: grpcfed.CELStringType,
IsMethod: false,
},
{
Name: "example.net.getFileContent",
ID: "example_net_getFileContent_string_string",
Args: []*grpcfed.CELTypeDeclare{
grpcfed.CELStringType,
},
Return: grpcfed.CELStringType,
IsMethod: false,
},
},
Capability: &grpcfedcel.CELPluginCapability{
Env: &grpcfedcel.CELPluginEnvCapability{
All: true,
Names: []string{},
},
FileSystem: &grpcfedcel.CELPluginFileSystemCapability{
MountPath: "/",
},
Network: &grpcfedcel.CELPluginNetworkCapability{},
},
})
if err != nil {
return nil, err
}
instance, err := plugin.CreateInstance(ctx, celTypeHelper.CELRegistry())
if err != nil {
return nil, err
}
if err := instance.ValidatePlugin(ctx); err != nil {
return nil, err
}
celPlugins = append(celPlugins, plugin)
celEnvOpts = append(celEnvOpts, grpcfed.CELLib(plugin))
}
svc := &FederationService{
cfg: cfg,
logger: logger,
isLogLevelDebug: logger.Enabled(context.Background(), slog.LevelDebug),
errorHandler: errorHandler,
celEnvOpts: celEnvOpts,
celTypeHelper: celTypeHelper,
celCacheMap: grpcfed.NewCELCacheMap(),
tracer: tracer,
celPlugins: celPlugins,
client: &FederationServiceDependentClientSet{},
}
return svc, nil
}
// CleanupFederationService cleanup all resources to prevent goroutine leaks.
func CleanupFederationService(ctx context.Context, svc *FederationService) {
svc.cleanup(ctx)
}
func (s *FederationService) cleanup(ctx context.Context) {
for _, plugin := range s.celPlugins {
plugin.Close()
}
}
// Get implements "org.federation.FederationService/Get" method.
func (s *FederationService) Get(ctx context.Context, req *GetRequest) (res *GetResponse, e error) {
ctx, span := s.tracer.Start(ctx, "org.federation.FederationService/Get")
defer span.End()
ctx = grpcfed.WithLogger(ctx, s.logger)
ctx = grpcfed.WithCELCacheMap(ctx, s.celCacheMap)
defer func() {
if r := recover(); r != nil {
e = grpcfed.RecoverError(r, grpcfed.StackTrace())
grpcfed.OutputErrorLog(ctx, e)
}
}()
defer func() {
for _, celPlugin := range s.celPlugins {
celPlugin.Cleanup()
}
}()
res, err := s.resolve_Org_Federation_GetResponse(ctx, &FederationService_Org_Federation_GetResponseArgument{
Url: req.GetUrl(),
Path: req.GetPath(),
})
if err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
grpcfed.OutputErrorLog(ctx, err)
return nil, err
}
return res, nil
}
// resolve_Org_Federation_GetResponse resolve "org.federation.GetResponse" message.
func (s *FederationService) resolve_Org_Federation_GetResponse(ctx context.Context, req *FederationService_Org_Federation_GetResponseArgument) (*GetResponse, error) {
ctx, span := s.tracer.Start(ctx, "org.federation.GetResponse")
defer span.End()
ctx = grpcfed.WithLogger(ctx, grpcfed.Logger(ctx), grpcfed.LogAttrs(ctx)...)
grpcfed.Logger(ctx).DebugContext(ctx, "resolve org.federation.GetResponse", slog.Any("message_args", s.logvalue_Org_Federation_GetResponseArgument(req)))
type localValueType struct {
*grpcfed.LocalValue
vars struct {
Body string
File string
Foo string
Gogc string
}
}
value := &localValueType{LocalValue: grpcfed.NewLocalValue(ctx, s.celEnvOpts, "grpc.federation.private.org.federation.GetResponseArgument", req)}
ctx = grpcfed.WithLocalValue(ctx, value.LocalValue)
/*
def {
name: "body"
by: "example.net.httpGet($.url)"
}
*/
def_body := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[string, *localValueType]{
Name: `body`,
Type: grpcfed.CELStringType,
Setter: func(value *localValueType, v string) error {
value.vars.Body = v
return nil
},
By: `example.net.httpGet($.url)`,
ByCacheIndex: 1,
})
}
/*
def {
name: "foo"
by: "example.net.getFooEnv()"
}
*/
def_foo := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[string, *localValueType]{
Name: `foo`,
Type: grpcfed.CELStringType,
Setter: func(value *localValueType, v string) error {
value.vars.Foo = v
return nil
},
By: `example.net.getFooEnv()`,
ByCacheIndex: 2,
})
}
/*
def {
name: "gogc"
by: "example.net.getGOGCEnv()"
}
*/
def_gogc := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[string, *localValueType]{
Name: `gogc`,
Type: grpcfed.CELStringType,
Setter: func(value *localValueType, v string) error {
value.vars.Gogc = v
return nil
},
By: `example.net.getGOGCEnv()`,
ByCacheIndex: 3,
})
}
/*
def {
name: "file"
by: "example.net.getFileContent($.path)"
}
*/
def_file := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[string, *localValueType]{
Name: `file`,
Type: grpcfed.CELStringType,
Setter: func(value *localValueType, v string) error {
value.vars.File = v
return nil
},
By: `example.net.getFileContent($.path)`,
ByCacheIndex: 4,
})
}
// A tree view of message dependencies is shown below.
/*
body ─┐
file ─┤
foo ─┤
gogc ─┤
*/
eg, ctx1 := grpcfed.ErrorGroupWithContext(ctx)
grpcfed.GoWithRecover(eg, func() (any, error) {
if err := def_body(ctx1); err != nil {
grpcfed.RecordErrorToSpan(ctx1, err)
return nil, err
}
return nil, nil
})
grpcfed.GoWithRecover(eg, func() (any, error) {
if err := def_file(ctx1); err != nil {
grpcfed.RecordErrorToSpan(ctx1, err)
return nil, err
}
return nil, nil
})
grpcfed.GoWithRecover(eg, func() (any, error) {
if err := def_foo(ctx1); err != nil {
grpcfed.RecordErrorToSpan(ctx1, err)
return nil, err
}
return nil, nil
})
grpcfed.GoWithRecover(eg, func() (any, error) {
if err := def_gogc(ctx1); err != nil {
grpcfed.RecordErrorToSpan(ctx1, err)
return nil, err
}
return nil, nil
})
if err := eg.Wait(); err != nil {
return nil, err
}
// assign named parameters to message arguments to pass to the custom resolver.
req.FederationService_Org_Federation_GetResponseVariable.Body = value.vars.Body
req.FederationService_Org_Federation_GetResponseVariable.File = value.vars.File
req.FederationService_Org_Federation_GetResponseVariable.Foo = value.vars.Foo
req.FederationService_Org_Federation_GetResponseVariable.Gogc = value.vars.Gogc
// create a message value to be returned.
ret := &GetResponse{}
// field binding section.
// (grpc.federation.field).by = "body"
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[string]{
Value: value,
Expr: `body`,
CacheIndex: 5,
Setter: func(v string) error {
ret.Body = v
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
// (grpc.federation.field).by = "foo"
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[string]{
Value: value,
Expr: `foo`,
CacheIndex: 6,
Setter: func(v string) error {
ret.Foo = v
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
// (grpc.federation.field).by = "file"
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[string]{
Value: value,
Expr: `file`,
CacheIndex: 7,
Setter: func(v string) error {
ret.File = v
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
// (grpc.federation.field).by = "gogc"
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[string]{
Value: value,
Expr: `gogc`,
CacheIndex: 8,
Setter: func(v string) error {
ret.Gogc = v
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
grpcfed.Logger(ctx).DebugContext(ctx, "resolved org.federation.GetResponse", slog.Any("org.federation.GetResponse", s.logvalue_Org_Federation_GetResponse(ret)))
return ret, nil
}
func (s *FederationService) logvalue_Org_Federation_GetResponse(v *GetResponse) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.String("body", v.GetBody()),
slog.String("foo", v.GetFoo()),
slog.String("file", v.GetFile()),
slog.String("gogc", v.GetGogc()),
)
}
func (s *FederationService) logvalue_Org_Federation_GetResponseArgument(v *FederationService_Org_Federation_GetResponseArgument) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.String("url", v.Url),
slog.String("path", v.Path),
)
}
================================================
FILE: _examples/21_wasm_net/go.mod
================================================
module example
go 1.24.0
replace github.com/mercari/grpc-federation => ../../
require (
github.com/mercari/grpc-federation v0.0.0-00010101000000-000000000000
go.opentelemetry.io/otel v1.24.0
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.21.0
go.opentelemetry.io/otel/sdk v1.24.0
go.opentelemetry.io/otel/trace v1.24.0
go.uber.org/goleak v1.3.0
google.golang.org/genproto/googleapis/rpc v0.0.0-20240826202546-f6391c0de4c7
google.golang.org/grpc v1.65.0
google.golang.org/protobuf v1.34.2
)
require (
cel.dev/expr v0.19.1 // indirect
github.com/antlr4-go/antlr/v4 v4.13.0 // indirect
github.com/cenkalti/backoff/v4 v4.2.1 // indirect
github.com/go-logr/logr v1.4.1 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
github.com/goccy/wasi-go v0.3.2 // indirect
github.com/goccy/wasi-go-net v0.3.0 // indirect
github.com/google/cel-go v0.23.1 // indirect
github.com/google/uuid v1.6.0 // indirect
github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0 // indirect
github.com/kelseyhightower/envconfig v1.4.0 // indirect
github.com/stealthrocket/wazergo v0.19.1 // indirect
github.com/stoewer/go-strcase v1.3.0 // indirect
github.com/stretchr/testify v1.10.0 // indirect
github.com/tetratelabs/wazero v1.10.1 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.21.0 // indirect
go.opentelemetry.io/otel/metric v1.24.0 // indirect
go.opentelemetry.io/proto/otlp v1.0.0 // indirect
golang.org/x/exp v0.0.0-20250506013437-ce4c2cf36ca6 // indirect
golang.org/x/net v0.38.0 // indirect
golang.org/x/sync v0.14.0 // indirect
golang.org/x/sys v0.37.0 // indirect
golang.org/x/text v0.23.0 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20240826202546-f6391c0de4c7 // indirect
)
================================================
FILE: _examples/21_wasm_net/go.sum
================================================
cel.dev/expr v0.19.1 h1:NciYrtDRIR0lNCnH1LFJegdjspNx9fI59O7TWcua/W4=
cel.dev/expr v0.19.1/go.mod h1:MrpN08Q+lEBs+bGYdLxxHkZoUSsCp0nSKTs0nTymJgw=
github.com/antlr4-go/antlr/v4 v4.13.0 h1:lxCg3LAv+EUK6t1i0y1V6/SLeUi0eKEKdhQAlS8TVTI=
github.com/antlr4-go/antlr/v4 v4.13.0/go.mod h1:pfChB/xh/Unjila75QW7+VU4TSnWnnk9UTnmpPaOR2g=
github.com/cenkalti/backoff/v4 v4.2.1 h1:y4OZtCnogmCPw98Zjyt5a6+QwPLGkiQsYW5oUqylYbM=
github.com/cenkalti/backoff/v4 v4.2.1/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A=
github.com/go-logr/logr v1.4.1 h1:pKouT5E8xu9zeFC39JXRDukb6JFQPXM5p5I91188VAQ=
github.com/go-logr/logr v1.4.1/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY=
github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag=
github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE=
github.com/goccy/wasi-go v0.3.2 h1:wAvGXmqCkfcp0B0AwIp5Ya53hzDwkKm9W8iuT3nCCz0=
github.com/goccy/wasi-go v0.3.2/go.mod h1:nIKD204n9xa4Z20UV+XA483kIr9TAl2vXr+X5qVAO5M=
github.com/goccy/wasi-go-net v0.3.0 h1:I7s6m0lrDBDslxVcEty2SQ7cbSllqXngKZPYav6aZ+A=
github.com/goccy/wasi-go-net v0.3.0/go.mod h1:TwJyFeFt+nPsjt0+640ccN/c/Y3ERaC91gybpOT59CM=
github.com/golang/glog v1.2.1 h1:OptwRhECazUx5ix5TTWC3EZhsZEHWcYWY4FQHTIubm4=
github.com/golang/glog v1.2.1/go.mod h1:6AhwSGph0fcJtXVM/PEHPqZlFeoLxhs7/t5UDAwmO+w=
github.com/google/cel-go v0.23.1 h1:91ThhEZlBcE5rB2adBVXqvDoqdL8BG2oyhd0bK1I/r4=
github.com/google/cel-go v0.23.1/go.mod h1:52Pb6QsDbC5kvgxvZhiL9QX1oZEkcUF/ZqaPx1J5Wwo=
github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8=
github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU=
github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0 h1:YBftPWNWd4WwGqtY2yeZL2ef8rHAxPBD8KFhJpmcqms=
github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0/go.mod h1:YN5jB8ie0yfIUg6VvR9Kz84aCaG7AsGZnLjhHbUqwPg=
github.com/kelseyhightower/envconfig v1.4.0 h1:Im6hONhd3pLkfDFsbRgu68RDNkGF1r3dvMUtDTo2cv8=
github.com/kelseyhightower/envconfig v1.4.0/go.mod h1:cccZRl6mQpaq41TPp5QxidR+Sa3axMbJDNb//FQX6Gg=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/stealthrocket/wazergo v0.19.1 h1:BPrITETPgSFwiytwmToO0MbUC/+RGC39JScz1JmmG6c=
github.com/stealthrocket/wazergo v0.19.1/go.mod h1:riI0hxw4ndZA5e6z7PesHg2BtTftcZaMxRcoiGGipTs=
github.com/stoewer/go-strcase v1.3.0 h1:g0eASXYtp+yvN9fK8sH94oCIk0fau9uV1/ZdJ0AVEzs=
github.com/stoewer/go-strcase v1.3.0/go.mod h1:fAH5hQ5pehh+j3nZfvwdk2RgEgQjAoM8wodgtPmh1xo=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=
github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo=
github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA=
github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
github.com/tetratelabs/wazero v1.10.1 h1:2DugeJf6VVk58KTPszlNfeeN8AhhpwcZqkJj2wwFuH8=
github.com/tetratelabs/wazero v1.10.1/go.mod h1:DRm5twOQ5Gr1AoEdSi0CLjDQF1J9ZAuyqFIjl1KKfQU=
go.opentelemetry.io/otel v1.24.0 h1:0LAOdjNmQeSTzGBzduGe/rU4tZhMwL5rWgtp9Ku5Jfo=
go.opentelemetry.io/otel v1.24.0/go.mod h1:W7b9Ozg4nkF5tWI5zsXkaKKDjdVjpD4oAt9Qi/MArHo=
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.21.0 h1:cl5P5/GIfFh4t6xyruOgJP5QiA1pw4fYYdv6nc6CBWw=
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.21.0/go.mod h1:zgBdWWAu7oEEMC06MMKc5NLbA/1YDXV1sMpSqEeLQLg=
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.21.0 h1:tIqheXEFWAZ7O8A7m+J0aPTmpJN3YQ7qetUAdkkkKpk=
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.21.0/go.mod h1:nUeKExfxAQVbiVFn32YXpXZZHZ61Cc3s3Rn1pDBGAb0=
go.opentelemetry.io/otel/metric v1.24.0 h1:6EhoGWWK28x1fbpA4tYTOWBkPefTDQnb8WSGXlc88kI=
go.opentelemetry.io/otel/metric v1.24.0/go.mod h1:VYhLe1rFfxuTXLgj4CBiyz+9WYBA8pNGJgDcSFRKBco=
go.opentelemetry.io/otel/sdk v1.24.0 h1:YMPPDNymmQN3ZgczicBY3B6sf9n62Dlj9pWD3ucgoDw=
go.opentelemetry.io/otel/sdk v1.24.0/go.mod h1:KVrIYw6tEubO9E96HQpcmpTKDVn9gdv35HoYiQWGDFg=
go.opentelemetry.io/otel/trace v1.24.0 h1:CsKnnL4dUAr/0llH9FKuc698G04IrpWV0MQA/Y1YELI=
go.opentelemetry.io/otel/trace v1.24.0/go.mod h1:HPc3Xr/cOApsBI154IU0OI0HJexz+aw5uPdbs3UCjNU=
go.opentelemetry.io/proto/otlp v1.0.0 h1:T0TX0tmXU8a3CbNXzEKGeU5mIVOdf0oykP+u2lIVU/I=
go.opentelemetry.io/proto/otlp v1.0.0/go.mod h1:Sy6pihPLfYHkr3NkUbEhGHFhINUSI/v80hjKIs5JXpM=
go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto=
go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE=
golang.org/x/exp v0.0.0-20250506013437-ce4c2cf36ca6 h1:y5zboxd6LQAqYIhHnB48p0ByQ/GnQx2BE33L8BOHQkI=
golang.org/x/exp v0.0.0-20250506013437-ce4c2cf36ca6/go.mod h1:U6Lno4MTRCDY+Ba7aCcauB9T60gsv5s4ralQzP72ZoQ=
golang.org/x/net v0.38.0 h1:vRMAPTMaeGqVhG5QyLJHqNDwecKTomGeqbnfZyKlBI8=
golang.org/x/net v0.38.0/go.mod h1:ivrbrMbzFq5J41QOQh0siUuly180yBYtLp+CKbEaFx8=
golang.org/x/sync v0.14.0 h1:woo0S4Yywslg6hp4eUFjTVOyKt0RookbpAHG4c1HmhQ=
golang.org/x/sync v0.14.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA=
golang.org/x/sys v0.37.0 h1:fdNQudmxPjkdUTPnLn5mdQv7Zwvbvpaxqs831goi9kQ=
golang.org/x/sys v0.37.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks=
golang.org/x/text v0.23.0 h1:D71I7dUrlY+VX0gQShAThNGHFxZ13dGLBHQLVl1mJlY=
golang.org/x/text v0.23.0/go.mod h1:/BLNzu4aZCJ1+kcD0DNRotWKage4q2rGVAg4o22unh4=
google.golang.org/genproto/googleapis/api v0.0.0-20240826202546-f6391c0de4c7 h1:YcyjlL1PRr2Q17/I0dPk2JmYS5CDXfcdb2Z3YRioEbw=
google.golang.org/genproto/googleapis/api v0.0.0-20240826202546-f6391c0de4c7/go.mod h1:OCdP9MfskevB/rbYvHTsXTtKC+3bHWajPdoKgjcYkfo=
google.golang.org/genproto/googleapis/rpc v0.0.0-20240826202546-f6391c0de4c7 h1:2035KHhUv+EpyB+hWgJnaWKJOdX1E95w2S8Rr4uWKTs=
google.golang.org/genproto/googleapis/rpc v0.0.0-20240826202546-f6391c0de4c7/go.mod h1:UqMtugtsSgubUsoxbuAoiCXvqvErP7Gf0so0mK9tHxU=
google.golang.org/grpc v1.65.0 h1:bs/cUb4lp1G5iImFFd3u5ixQzweKizoZJAwBNLR42lc=
google.golang.org/grpc v1.65.0/go.mod h1:WgYC2ypjlB0EiQi6wdKixMqukr6lBc0Vo+oOgjrM5ZQ=
google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg=
google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
================================================
FILE: _examples/21_wasm_net/main_test.go
================================================
package main_test
import (
"bytes"
"context"
"crypto/sha256"
_ "embed"
"encoding/hex"
"log/slog"
"net"
"os"
"path/filepath"
"testing"
"go.opentelemetry.io/otel"
"go.opentelemetry.io/otel/attribute"
"go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc"
"go.opentelemetry.io/otel/propagation"
"go.opentelemetry.io/otel/sdk/resource"
sdktrace "go.opentelemetry.io/otel/sdk/trace"
semconv "go.opentelemetry.io/otel/semconv/v1.4.0"
"go.uber.org/goleak"
"google.golang.org/grpc"
"google.golang.org/grpc/credentials/insecure"
"google.golang.org/grpc/test/bufconn"
"example/federation"
)
const bufSize = 1024
var (
listener *bufconn.Listener
//go:embed net.wasm
wasm []byte
)
func dialer(ctx context.Context, address string) (net.Conn, error) {
return listener.Dial()
}
func toSha256(v []byte) string {
hash := sha256.Sum256(v)
return hex.EncodeToString(hash[:])
}
func TestFederation(t *testing.T) {
defer goleak.VerifyNone(t)
ctx := context.Background()
listener = bufconn.Listen(bufSize)
envValue := "TEST_ENV_CAPABILITY"
t.Setenv("FOO", envValue)
t.Setenv("GOMAXPROCS", "2")
t.Setenv("GRPC_FEDERATION_PLUGIN_GOGC", "off")
testFileContent := `{"hello":"world"}`
testFilePath := filepath.Join(t.TempDir(), "test.json")
if err := os.WriteFile(testFilePath, []byte(testFileContent), 0o644); err != nil {
t.Fatal(err)
}
if os.Getenv("ENABLE_JAEGER") != "" {
exporter, err := otlptracegrpc.New(ctx, otlptracegrpc.WithInsecure())
if err != nil {
t.Fatal(err)
}
tp := sdktrace.NewTracerProvider(
sdktrace.WithBatcher(exporter),
sdktrace.WithResource(
resource.NewWithAttributes(
semconv.SchemaURL,
semconv.ServiceNameKey.String("example21/wasm_net"),
semconv.ServiceVersionKey.String("1.0.0"),
attribute.String("environment", "dev"),
),
),
sdktrace.WithSampler(sdktrace.AlwaysSample()),
)
defer tp.Shutdown(ctx)
otel.SetTextMapPropagator(propagation.TraceContext{})
otel.SetTracerProvider(tp)
}
conn, err := grpc.DialContext(
ctx, "",
grpc.WithContextDialer(dialer),
grpc.WithTransportCredentials(insecure.NewCredentials()),
grpc.WithDefaultCallOptions(grpc.WaitForReady(true)),
)
if err != nil {
t.Fatal(err)
}
defer conn.Close()
grpcServer := grpc.NewServer()
defer grpcServer.Stop()
logger := slog.New(slog.NewJSONHandler(os.Stdout, &slog.HandlerOptions{
Level: slog.LevelDebug,
}))
federationServer, err := federation.NewFederationService(federation.FederationServiceConfig{
CELPlugin: &federation.FederationServiceCELPluginConfig{
Net: federation.FederationServiceCELPluginWasmConfig{
Reader: bytes.NewReader(wasm),
Sha256: toSha256(wasm),
},
},
Logger: logger,
})
if err != nil {
t.Fatal(err)
}
defer federation.CleanupFederationService(ctx, federationServer)
federation.RegisterFederationServiceServer(grpcServer, federationServer)
go func() {
if err := grpcServer.Serve(listener); err != nil {
t.Fatal(err)
}
}()
client := federation.NewFederationServiceClient(conn)
res, err := client.Get(ctx, &federation.GetRequest{
Url: "https://example.com",
Path: testFilePath,
})
if err != nil {
t.Fatal(err)
}
if len(res.Body) == 0 {
t.Fatalf("failed to get body")
}
if res.Foo != envValue {
t.Fatalf("failed to get env value: %s", res.Foo)
}
if res.Gogc != "off" {
t.Fatalf("failed to get gogc value: %s", res.Gogc)
}
if res.File != testFileContent {
t.Fatalf("failed to get file content: %s", res.File)
}
}
================================================
FILE: _examples/21_wasm_net/plugin/plugin.pb.go
================================================
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.33.0
// protoc (unknown)
// source: plugin/plugin.proto
package pluginpb
import (
_ "github.com/mercari/grpc-federation/grpc/federation"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
var File_plugin_plugin_proto protoreflect.FileDescriptor
var file_plugin_plugin_proto_rawDesc = []byte{
0x0a, 0x13, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2f, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0b, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x6e,
0x65, 0x74, 0x1a, 0x20, 0x67, 0x72, 0x70, 0x63, 0x2f, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74,
0x69, 0x6f, 0x6e, 0x2f, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70,
0x72, 0x6f, 0x74, 0x6f, 0x42, 0x89, 0x02, 0x9a, 0x4a, 0x81, 0x01, 0x0a, 0x7f, 0x0a, 0x7d, 0x0a,
0x03, 0x6e, 0x65, 0x74, 0x22, 0x24, 0x0a, 0x07, 0x68, 0x74, 0x74, 0x70, 0x47, 0x65, 0x74, 0x1a,
0x15, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x12, 0x0a, 0x75, 0x72, 0x6c, 0x20, 0x73, 0x74, 0x72, 0x69,
0x6e, 0x67, 0x1a, 0x02, 0x08, 0x01, 0x22, 0x02, 0x08, 0x01, 0x22, 0x0f, 0x0a, 0x09, 0x67, 0x65,
0x74, 0x46, 0x6f, 0x6f, 0x45, 0x6e, 0x76, 0x22, 0x02, 0x08, 0x01, 0x22, 0x10, 0x0a, 0x0a, 0x67,
0x65, 0x74, 0x47, 0x4f, 0x47, 0x43, 0x45, 0x6e, 0x76, 0x22, 0x02, 0x08, 0x01, 0x22, 0x20, 0x0a,
0x0e, 0x67, 0x65, 0x74, 0x46, 0x69, 0x6c, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x1a,
0x0a, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x1a, 0x02, 0x08, 0x01, 0x22, 0x02, 0x08, 0x01, 0x32,
0x0b, 0x0a, 0x02, 0x08, 0x01, 0x12, 0x03, 0x0a, 0x01, 0x2f, 0x1a, 0x00, 0x0a, 0x0f, 0x63, 0x6f,
0x6d, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x6e, 0x65, 0x74, 0x42, 0x0b, 0x50,
0x6c, 0x75, 0x67, 0x69, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x17, 0x65, 0x78,
0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2f, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x3b, 0x70, 0x6c, 0x75,
0x67, 0x69, 0x6e, 0x70, 0x62, 0xa2, 0x02, 0x03, 0x45, 0x4e, 0x58, 0xaa, 0x02, 0x0b, 0x45, 0x78,
0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x4e, 0x65, 0x74, 0xca, 0x02, 0x0b, 0x45, 0x78, 0x61, 0x6d,
0x70, 0x6c, 0x65, 0x5c, 0x4e, 0x65, 0x74, 0xe2, 0x02, 0x17, 0x45, 0x78, 0x61, 0x6d, 0x70, 0x6c,
0x65, 0x5c, 0x4e, 0x65, 0x74, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74,
0x61, 0xea, 0x02, 0x0c, 0x45, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x3a, 0x3a, 0x4e, 0x65, 0x74,
0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var file_plugin_plugin_proto_goTypes = []interface{}{}
var file_plugin_plugin_proto_depIdxs = []int32{
0, // [0:0] is the sub-list for method output_type
0, // [0:0] is the sub-list for method input_type
0, // [0:0] is the sub-list for extension type_name
0, // [0:0] is the sub-list for extension extendee
0, // [0:0] is the sub-list for field type_name
}
func init() { file_plugin_plugin_proto_init() }
func file_plugin_plugin_proto_init() {
if File_plugin_plugin_proto != nil {
return
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_plugin_plugin_proto_rawDesc,
NumEnums: 0,
NumMessages: 0,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_plugin_plugin_proto_goTypes,
DependencyIndexes: file_plugin_plugin_proto_depIdxs,
}.Build()
File_plugin_plugin_proto = out.File
file_plugin_plugin_proto_rawDesc = nil
file_plugin_plugin_proto_goTypes = nil
file_plugin_plugin_proto_depIdxs = nil
}
================================================
FILE: _examples/21_wasm_net/plugin/plugin_grpc_federation.pb.go
================================================
// Code generated by protoc-gen-grpc-federation. DO NOT EDIT!
// versions:
//
// protoc-gen-grpc-federation: (devel)
//
// source: plugin/plugin.proto
package pluginpb
import (
"context"
"fmt"
"net/http"
"reflect"
grpcfed "github.com/mercari/grpc-federation/grpc/federation"
grpcfednet "github.com/mercari/grpc-federation/grpc/federation/net"
)
var (
_ = reflect.Invalid // to avoid "imported and not used error"
)
type NetPlugin interface {
Example_Net_HttpGet(context.Context, string) (string, error)
Example_Net_GetFooEnv(context.Context) (string, error)
Example_Net_GetGOGCEnv(context.Context) (string, error)
Example_Net_GetFileContent(context.Context, string) (string, error)
}
func init() {
http.DefaultTransport = grpcfednet.DefaultTransport()
}
func RegisterNetPlugin(plug NetPlugin) {
grpcfed.PluginMainLoop(
grpcfed.CELPluginVersionSchema{
ProtocolVersion: grpcfed.CELPluginProtocolVersion,
FederationVersion: "(devel)",
Functions: []string{
"example_net_httpGet_string_string",
"example_net_getFooEnv_string",
"example_net_getGOGCEnv_string",
"example_net_getFileContent_string_string",
},
},
func(ctx context.Context, req *grpcfed.CELPluginRequest) (*grpcfed.CELPluginResponse, error) {
switch req.GetMethod() {
case "example_net_httpGet_string_string":
if len(req.GetArgs()) != 1 {
return nil, fmt.Errorf("%s: invalid argument number: %d. expected number is %d", req.GetMethod(), len(req.GetArgs()), 1)
}
arg0, err := grpcfed.ToString(req.GetArgs()[0])
if err != nil {
return nil, err
}
ret, err := plug.Example_Net_HttpGet(ctx, arg0)
if err != nil {
return nil, err
}
return grpcfed.ToStringCELPluginResponse(ret)
case "example_net_getFooEnv_string":
if len(req.GetArgs()) != 0 {
return nil, fmt.Errorf("%s: invalid argument number: %d. expected number is %d", req.GetMethod(), len(req.GetArgs()), 0)
}
ret, err := plug.Example_Net_GetFooEnv(ctx)
if err != nil {
return nil, err
}
return grpcfed.ToStringCELPluginResponse(ret)
case "example_net_getGOGCEnv_string":
if len(req.GetArgs()) != 0 {
return nil, fmt.Errorf("%s: invalid argument number: %d. expected number is %d", req.GetMethod(), len(req.GetArgs()), 0)
}
ret, err := plug.Example_Net_GetGOGCEnv(ctx)
if err != nil {
return nil, err
}
return grpcfed.ToStringCELPluginResponse(ret)
case "example_net_getFileContent_string_string":
if len(req.GetArgs()) != 1 {
return nil, fmt.Errorf("%s: invalid argument number: %d. expected number is %d", req.GetMethod(), len(req.GetArgs()), 1)
}
arg0, err := grpcfed.ToString(req.GetArgs()[0])
if err != nil {
return nil, err
}
ret, err := plug.Example_Net_GetFileContent(ctx, arg0)
if err != nil {
return nil, err
}
return grpcfed.ToStringCELPluginResponse(ret)
}
return nil, fmt.Errorf("unexpected method name: %s", req.GetMethod())
},
)
}
================================================
FILE: _examples/21_wasm_net/proto/buf.yaml
================================================
version: v1
breaking:
use:
- FILE
lint:
use:
- DEFAULT
================================================
FILE: _examples/21_wasm_net/proto/federation/federation.proto
================================================
syntax = "proto3";
package org.federation;
import "grpc/federation/federation.proto";
option go_package = "example/federation;federation";
option (grpc.federation.file)= {
import: [
"plugin/plugin.proto"
]
};
service FederationService {
option (grpc.federation.service) = {};
rpc Get(GetRequest) returns (GetResponse) {};
}
message GetRequest {
string url = 1;
string path = 2;
}
message GetResponse {
option (grpc.federation.message) = {
def { name: "body" by: "example.net.httpGet($.url)" }
def { name: "foo" by: "example.net.getFooEnv()" }
def { name: "gogc" by: "example.net.getGOGCEnv()" }
def { name: "file" by: "example.net.getFileContent($.path)" }
};
string body = 1 [(grpc.federation.field).by = "body"];
string foo = 2 [(grpc.federation.field).by = "foo"];
string file = 3 [(grpc.federation.field).by = "file"];
string gogc = 4 [(grpc.federation.field).by = "gogc"];
}
================================================
FILE: _examples/21_wasm_net/proto/plugin/plugin.proto
================================================
syntax = "proto3";
package example.net;
import "grpc/federation/federation.proto";
option go_package = "example/plugin;pluginpb";
option (grpc.federation.file).plugin.export = {
name: "net"
capability {
network: {}
env { all: true }
file_system { mount_path: "/" }
}
functions: [
{
name: "httpGet"
args {
name: "url"
type { kind: STRING }
desc: "url string"
}
return { kind: STRING }
},
{
name: "getFooEnv"
return { kind: STRING }
},
{
name: "getGOGCEnv"
return { kind: STRING }
},
{
name: "getFileContent"
args {
name: "path"
type { kind: STRING }
}
return { kind: STRING }
}
]
};
================================================
FILE: _examples/22_switch/.gitignore
================================================
grpc/federation
================================================
FILE: _examples/22_switch/Makefile
================================================
MAKEFILE_DIR := $(dir $(lastword $(MAKEFILE_LIST)))
GOBIN := $(MAKEFILE_DIR)/../../bin
PATH := $(GOBIN):$(PATH)
JAEGER_IMAGE := jaegertracing/all-in-one:latest
.PHONY: generate
generate:
$(GOBIN)/buf generate
.PHONY: lint
lint:
@$(GOBIN)/grpc-federation-linter -Iproto -Iproto_deps ./proto/federation/federation.proto
.PHONY: test
test:
go test -race ./ -count=1
.PHONY: grpc-federation/generate
grpc-federation/generate:
@$(GOBIN)/grpc-federation-generator ./proto/federation/federation.proto
.PHONY: grpc-federation/watch
grpc-federation/watch:
@$(GOBIN)/grpc-federation-generator -w
.PHONY: jaeger/start
jaeger/start:
@docker run \
-e COLLECTOR_OTLP_ENABLED=true \
-p 16686:16686 \
-p 4317:4317 \
-p 4318:4318 \
-d \
$(JAEGER_IMAGE)
.PHONY: jaeger/stop
jaeger/stop:
@docker stop $(shell docker ps -q --filter ancestor=$(JAEGER_IMAGE))
================================================
FILE: _examples/22_switch/buf.gen.yaml
================================================
version: v1
managed:
enabled: true
plugins:
- plugin: go
out: .
opt: paths=source_relative
- plugin: go-grpc
out: .
opt: paths=source_relative
- plugin: grpc-federation
out: .
opt:
- paths=source_relative
- import_paths=proto
================================================
FILE: _examples/22_switch/buf.work.yaml
================================================
version: v1
directories:
- proto
- proto_deps
================================================
FILE: _examples/22_switch/federation/federation.pb.go
================================================
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.33.0
// protoc (unknown)
// source: federation/federation.proto
package federation
import (
_ "github.com/mercari/grpc-federation/grpc/federation"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
type GetPostRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
}
func (x *GetPostRequest) Reset() {
*x = GetPostRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_federation_federation_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GetPostRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetPostRequest) ProtoMessage() {}
func (x *GetPostRequest) ProtoReflect() protoreflect.Message {
mi := &file_federation_federation_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GetPostRequest.ProtoReflect.Descriptor instead.
func (*GetPostRequest) Descriptor() ([]byte, []int) {
return file_federation_federation_proto_rawDescGZIP(), []int{0}
}
func (x *GetPostRequest) GetId() string {
if x != nil {
return x.Id
}
return ""
}
type GetPostResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Svar int64 `protobuf:"varint,1,opt,name=svar,proto3" json:"svar,omitempty"`
Switch int64 `protobuf:"varint,2,opt,name=switch,proto3" json:"switch,omitempty"`
}
func (x *GetPostResponse) Reset() {
*x = GetPostResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_federation_federation_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GetPostResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetPostResponse) ProtoMessage() {}
func (x *GetPostResponse) ProtoReflect() protoreflect.Message {
mi := &file_federation_federation_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GetPostResponse.ProtoReflect.Descriptor instead.
func (*GetPostResponse) Descriptor() ([]byte, []int) {
return file_federation_federation_proto_rawDescGZIP(), []int{1}
}
func (x *GetPostResponse) GetSvar() int64 {
if x != nil {
return x.Svar
}
return 0
}
func (x *GetPostResponse) GetSwitch() int64 {
if x != nil {
return x.Switch
}
return 0
}
var File_federation_federation_proto protoreflect.FileDescriptor
var file_federation_federation_proto_rawDesc = []byte{
0x0a, 0x1b, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x66, 0x65, 0x64,
0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0e, 0x6f,
0x72, 0x67, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x20, 0x67,
0x72, 0x70, 0x63, 0x2f, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x66,
0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22,
0x20, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x50, 0x6f, 0x73, 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, 0xc9, 0x01, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x50, 0x6f, 0x73, 0x74, 0x52, 0x65, 0x73,
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x31, 0x0a, 0x04, 0x73, 0x76, 0x61, 0x72, 0x18, 0x01, 0x20,
0x01, 0x28, 0x03, 0x42, 0x1d, 0x9a, 0x4a, 0x1a, 0x12, 0x18, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66,
0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x61, 0x72, 0x2e, 0x73, 0x76,
0x61, 0x72, 0x52, 0x04, 0x73, 0x76, 0x61, 0x72, 0x12, 0x23, 0x0a, 0x06, 0x73, 0x77, 0x69, 0x74,
0x63, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x42, 0x0b, 0x9a, 0x4a, 0x08, 0x12, 0x06, 0x73,
0x77, 0x69, 0x74, 0x63, 0x68, 0x52, 0x06, 0x73, 0x77, 0x69, 0x74, 0x63, 0x68, 0x3a, 0x5e, 0x9a,
0x4a, 0x5b, 0x0a, 0x59, 0x0a, 0x06, 0x73, 0x77, 0x69, 0x74, 0x63, 0x68, 0x8a, 0x01, 0x4e, 0x0a,
0x13, 0x0a, 0x0e, 0x24, 0x2e, 0x69, 0x64, 0x20, 0x3d, 0x3d, 0x20, 0x27, 0x62, 0x6c, 0x75, 0x65,
0x27, 0x5a, 0x01, 0x33, 0x0a, 0x1e, 0x0a, 0x0d, 0x24, 0x2e, 0x69, 0x64, 0x20, 0x3d, 0x3d, 0x20,
0x27, 0x72, 0x65, 0x64, 0x27, 0x12, 0x08, 0x0a, 0x03, 0x72, 0x65, 0x64, 0x5a, 0x01, 0x34, 0x5a,
0x03, 0x72, 0x65, 0x64, 0x12, 0x17, 0x0a, 0x0c, 0x0a, 0x07, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c,
0x74, 0x5a, 0x01, 0x35, 0x5a, 0x07, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x32, 0xae, 0x01,
0x0a, 0x11, 0x46, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76,
0x69, 0x63, 0x65, 0x12, 0x4c, 0x0a, 0x07, 0x47, 0x65, 0x74, 0x50, 0x6f, 0x73, 0x74, 0x12, 0x1e,
0x2e, 0x6f, 0x72, 0x67, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e,
0x47, 0x65, 0x74, 0x50, 0x6f, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f,
0x2e, 0x6f, 0x72, 0x67, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e,
0x47, 0x65, 0x74, 0x50, 0x6f, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22,
0x00, 0x1a, 0x4b, 0x9a, 0x4a, 0x48, 0x0a, 0x11, 0x0a, 0x0f, 0x0a, 0x01, 0x61, 0x12, 0x02, 0x08,
0x01, 0x1a, 0x06, 0x12, 0x04, 0x6e, 0x6f, 0x6e, 0x65, 0x12, 0x33, 0x0a, 0x04, 0x73, 0x76, 0x61,
0x72, 0x82, 0x01, 0x2a, 0x0a, 0x23, 0x0a, 0x1e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64,
0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x65, 0x6e, 0x76, 0x2e, 0x61, 0x20, 0x3d, 0x3d,
0x20, 0x27, 0x72, 0x65, 0x64, 0x27, 0x5a, 0x01, 0x31, 0x12, 0x03, 0x5a, 0x01, 0x32, 0x42, 0x9d,
0x01, 0x0a, 0x12, 0x63, 0x6f, 0x6d, 0x2e, 0x6f, 0x72, 0x67, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72,
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x0f, 0x46, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f,
0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x1d, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c,
0x65, 0x2f, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x3b, 0x66, 0x65, 0x64,
0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0xa2, 0x02, 0x03, 0x4f, 0x46, 0x58, 0xaa, 0x02, 0x0e,
0x4f, 0x72, 0x67, 0x2e, 0x46, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0xca, 0x02,
0x0e, 0x4f, 0x72, 0x67, 0x5c, 0x46, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0xe2,
0x02, 0x1a, 0x4f, 0x72, 0x67, 0x5c, 0x46, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e,
0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0f, 0x4f,
0x72, 0x67, 0x3a, 0x3a, 0x46, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x62, 0x06,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_federation_federation_proto_rawDescOnce sync.Once
file_federation_federation_proto_rawDescData = file_federation_federation_proto_rawDesc
)
func file_federation_federation_proto_rawDescGZIP() []byte {
file_federation_federation_proto_rawDescOnce.Do(func() {
file_federation_federation_proto_rawDescData = protoimpl.X.CompressGZIP(file_federation_federation_proto_rawDescData)
})
return file_federation_federation_proto_rawDescData
}
var file_federation_federation_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
var file_federation_federation_proto_goTypes = []interface{}{
(*GetPostRequest)(nil), // 0: org.federation.GetPostRequest
(*GetPostResponse)(nil), // 1: org.federation.GetPostResponse
}
var file_federation_federation_proto_depIdxs = []int32{
0, // 0: org.federation.FederationService.GetPost:input_type -> org.federation.GetPostRequest
1, // 1: org.federation.FederationService.GetPost:output_type -> org.federation.GetPostResponse
1, // [1:2] is the sub-list for method output_type
0, // [0:1] is the sub-list for method input_type
0, // [0:0] is the sub-list for extension type_name
0, // [0:0] is the sub-list for extension extendee
0, // [0:0] is the sub-list for field type_name
}
func init() { file_federation_federation_proto_init() }
func file_federation_federation_proto_init() {
if File_federation_federation_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_federation_federation_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetPostRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_federation_federation_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetPostResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_federation_federation_proto_rawDesc,
NumEnums: 0,
NumMessages: 2,
NumExtensions: 0,
NumServices: 1,
},
GoTypes: file_federation_federation_proto_goTypes,
DependencyIndexes: file_federation_federation_proto_depIdxs,
MessageInfos: file_federation_federation_proto_msgTypes,
}.Build()
File_federation_federation_proto = out.File
file_federation_federation_proto_rawDesc = nil
file_federation_federation_proto_goTypes = nil
file_federation_federation_proto_depIdxs = nil
}
================================================
FILE: _examples/22_switch/federation/federation_grpc.pb.go
================================================
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.3.0
// - protoc (unknown)
// source: federation/federation.proto
package federation
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 (
FederationService_GetPost_FullMethodName = "/org.federation.FederationService/GetPost"
)
// FederationServiceClient is the client API for FederationService 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 FederationServiceClient interface {
GetPost(ctx context.Context, in *GetPostRequest, opts ...grpc.CallOption) (*GetPostResponse, error)
}
type federationServiceClient struct {
cc grpc.ClientConnInterface
}
func NewFederationServiceClient(cc grpc.ClientConnInterface) FederationServiceClient {
return &federationServiceClient{cc}
}
func (c *federationServiceClient) GetPost(ctx context.Context, in *GetPostRequest, opts ...grpc.CallOption) (*GetPostResponse, error) {
out := new(GetPostResponse)
err := c.cc.Invoke(ctx, FederationService_GetPost_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// FederationServiceServer is the server API for FederationService service.
// All implementations must embed UnimplementedFederationServiceServer
// for forward compatibility
type FederationServiceServer interface {
GetPost(context.Context, *GetPostRequest) (*GetPostResponse, error)
mustEmbedUnimplementedFederationServiceServer()
}
// UnimplementedFederationServiceServer must be embedded to have forward compatible implementations.
type UnimplementedFederationServiceServer struct {
}
func (UnimplementedFederationServiceServer) GetPost(context.Context, *GetPostRequest) (*GetPostResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetPost not implemented")
}
func (UnimplementedFederationServiceServer) mustEmbedUnimplementedFederationServiceServer() {}
// UnsafeFederationServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to FederationServiceServer will
// result in compilation errors.
type UnsafeFederationServiceServer interface {
mustEmbedUnimplementedFederationServiceServer()
}
func RegisterFederationServiceServer(s grpc.ServiceRegistrar, srv FederationServiceServer) {
s.RegisterService(&FederationService_ServiceDesc, srv)
}
func _FederationService_GetPost_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetPostRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(FederationServiceServer).GetPost(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: FederationService_GetPost_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(FederationServiceServer).GetPost(ctx, req.(*GetPostRequest))
}
return interceptor(ctx, in, info, handler)
}
// FederationService_ServiceDesc is the grpc.ServiceDesc for FederationService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var FederationService_ServiceDesc = grpc.ServiceDesc{
ServiceName: "org.federation.FederationService",
HandlerType: (*FederationServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "GetPost",
Handler: _FederationService_GetPost_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "federation/federation.proto",
}
================================================
FILE: _examples/22_switch/federation/federation_grpc_federation.pb.go
================================================
// Code generated by protoc-gen-grpc-federation. DO NOT EDIT!
// versions:
//
// protoc-gen-grpc-federation: (devel)
//
// source: federation/federation.proto
package federation
import (
"context"
"io"
"log/slog"
"reflect"
grpcfed "github.com/mercari/grpc-federation/grpc/federation"
grpcfedcel "github.com/mercari/grpc-federation/grpc/federation/cel"
"go.opentelemetry.io/otel"
"go.opentelemetry.io/otel/trace"
)
var (
_ = reflect.Invalid // to avoid "imported and not used error"
)
// Org_Federation_GetPostResponseVariable represents variable definitions in "org.federation.GetPostResponse".
type FederationService_Org_Federation_GetPostResponseVariable struct {
Default int64
Red int64
Switch int64
}
// Org_Federation_GetPostResponseArgument is argument for "org.federation.GetPostResponse" message.
type FederationService_Org_Federation_GetPostResponseArgument struct {
Id string
FederationService_Org_Federation_GetPostResponseVariable
}
// FederationServiceConfig configuration required to initialize the service that use GRPC Federation.
type FederationServiceConfig struct {
// ErrorHandler Federation Service often needs to convert errors received from downstream services.
// If an error occurs during method execution in the Federation Service, this error handler is called and the returned error is treated as a final error.
ErrorHandler grpcfed.ErrorHandler
// Logger sets the logger used to output Debug/Info/Error information.
Logger *slog.Logger
}
// FederationServiceClientFactory provides a factory that creates the gRPC Client needed to invoke methods of the gRPC Service on which the Federation Service depends.
type FederationServiceClientFactory interface {
}
// FederationServiceClientConfig helper to create gRPC client.
// Hints for creating a gRPC Client.
type FederationServiceClientConfig struct {
// Service FQDN ( `.` ) of the service on Protocol Buffers.
Service string
}
// FederationServiceDependentClientSet has a gRPC client for all services on which the federation service depends.
// This is provided as an argument when implementing the custom resolver.
type FederationServiceDependentClientSet struct {
}
// FederationServiceResolver provides an interface to directly implement message resolver and field resolver not defined in Protocol Buffers.
type FederationServiceResolver interface {
}
// FederationServiceCELPluginWasmConfig type alias for grpcfedcel.WasmConfig.
type FederationServiceCELPluginWasmConfig = grpcfedcel.WasmConfig
// FederationServiceCELPluginConfig hints for loading a WebAssembly based plugin.
type FederationServiceCELPluginConfig struct {
CacheDir string
}
// FederationServiceEnv keeps the values read from environment variables.
type FederationServiceEnv struct {
A string `envconfig:"A" default:"none"`
}
type keyFederationServiceEnv struct{}
// GetFederationServiceEnv gets environment variables.
func GetFederationServiceEnv(ctx context.Context) *FederationServiceEnv {
value := ctx.Value(keyFederationServiceEnv{})
if value == nil {
return nil
}
return value.(*FederationServiceEnv)
}
func withFederationServiceEnv(ctx context.Context, env *FederationServiceEnv) context.Context {
return context.WithValue(ctx, keyFederationServiceEnv{}, env)
}
// FederationServiceVariable keeps the initial values.
type FederationServiceVariable struct {
Svar int64
}
type keyFederationServiceVariable struct{}
// GetFederationServiceVariable gets initial variables.
func GetFederationServiceVariable(ctx context.Context) *FederationServiceVariable {
value := ctx.Value(keyFederationServiceVariable{})
if value == nil {
return nil
}
return value.(*FederationServiceVariable)
}
func withFederationServiceVariable(ctx context.Context, svcVar *FederationServiceVariable) context.Context {
return context.WithValue(ctx, keyFederationServiceVariable{}, svcVar)
}
// FederationServiceUnimplementedResolver a structure implemented to satisfy the Resolver interface.
// An Unimplemented error is always returned.
// This is intended for use when there are many Resolver interfaces that do not need to be implemented,
// by embedding them in a resolver structure that you have created.
type FederationServiceUnimplementedResolver struct{}
// FederationService represents Federation Service.
type FederationService struct {
UnimplementedFederationServiceServer
cfg FederationServiceConfig
logger *slog.Logger
isLogLevelDebug bool
errorHandler grpcfed.ErrorHandler
celCacheMap *grpcfed.CELCacheMap
tracer trace.Tracer
env *FederationServiceEnv
svcVar *FederationServiceVariable
celTypeHelper *grpcfed.CELTypeHelper
celEnvOpts []grpcfed.CELEnvOption
celPlugins []*grpcfedcel.CELPlugin
client *FederationServiceDependentClientSet
}
// NewFederationService creates FederationService instance by FederationServiceConfig.
func NewFederationService(cfg FederationServiceConfig) (*FederationService, error) {
logger := cfg.Logger
if logger == nil {
logger = slog.New(slog.NewJSONHandler(io.Discard, nil))
}
tracer := otel.Tracer("org.federation.FederationService")
ctx := grpcfed.WithLogger(context.Background(), logger)
ctx = grpcfed.WithTracer(ctx, tracer)
errorHandler := cfg.ErrorHandler
if errorHandler == nil {
errorHandler = func(ctx context.Context, methodName string, err error) error { return err }
}
celTypeHelperFieldMap := grpcfed.CELTypeHelperFieldMap{
"grpc.federation.private.org.federation.GetPostResponseArgument": {
"id": grpcfed.NewCELFieldType(grpcfed.CELStringType, "Id"),
},
"grpc.federation.private.Env": {
"a": grpcfed.NewCELFieldType(grpcfed.CELStringType, "A"),
},
"grpc.federation.private.ServiceVariable": {
"svar": grpcfed.NewCELFieldType(grpcfed.CELIntType, "Svar"),
},
}
celTypeHelper := grpcfed.NewCELTypeHelper("org.federation", celTypeHelperFieldMap)
var celEnvOpts []grpcfed.CELEnvOption
celEnvOpts = append(celEnvOpts, grpcfed.NewDefaultEnvOptions(celTypeHelper)...)
celEnvOpts = append(celEnvOpts, grpcfed.NewCELVariable("grpc.federation.env", grpcfed.CELObjectType("grpc.federation.private.Env")))
celEnvOpts = append(celEnvOpts, grpcfed.NewCELVariable("grpc.federation.var", grpcfed.CELObjectType("grpc.federation.private.ServiceVariable")))
var env FederationServiceEnv
if err := grpcfed.LoadEnv("", &env); err != nil {
return nil, err
}
svc := &FederationService{
cfg: cfg,
logger: logger,
isLogLevelDebug: logger.Enabled(context.Background(), slog.LevelDebug),
errorHandler: errorHandler,
celEnvOpts: celEnvOpts,
celTypeHelper: celTypeHelper,
celCacheMap: grpcfed.NewCELCacheMap(),
tracer: tracer,
env: &env,
svcVar: new(FederationServiceVariable),
client: &FederationServiceDependentClientSet{},
}
if err := svc.initServiceVariables(ctx); err != nil {
return nil, err
}
return svc, nil
}
// CleanupFederationService cleanup all resources to prevent goroutine leaks.
func CleanupFederationService(ctx context.Context, svc *FederationService) {
svc.cleanup(ctx)
}
func (s *FederationService) cleanup(ctx context.Context) {
for _, plugin := range s.celPlugins {
plugin.Close()
}
}
func (s *FederationService) initServiceVariables(ctx context.Context) error {
ctx = grpcfed.WithCELCacheMap(ctx, s.celCacheMap)
type localValueType struct {
*grpcfed.LocalValue
vars *FederationServiceVariable
}
value := &localValueType{
LocalValue: grpcfed.NewServiceVariableLocalValue(s.celEnvOpts),
vars: s.svcVar,
}
value.AddEnv(s.env)
value.AddServiceVariable(s.svcVar)
ctx = grpcfed.WithLocalValue(ctx, value.LocalValue)
/*
def {
name: "svar"
switch {
case {
if: "grpc.federation.env.a == 'red'"
by: "1"
}
default {
by: "2"
}
}
}
*/
def_svar := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[int64, *localValueType]{
Name: `svar`,
Type: grpcfed.CELIntType,
Setter: func(value *localValueType, v int64) error {
value.vars.Svar = v
return nil
},
Switch: func(ctx context.Context, value *localValueType) (any, error) {
cases := []*grpcfed.EvalSwitchCase[*localValueType]{}
cases = append(cases, &grpcfed.EvalSwitchCase[*localValueType]{
If: `grpc.federation.env.a == 'red'`,
IfCacheIndex: 1,
By: `1`,
ByCacheIndex: 2,
})
return grpcfed.EvalSwitch[int64](ctx, value, cases, &grpcfed.EvalSwitchDefault[*localValueType]{
By: `2`,
ByCacheIndex: 3,
})
},
})
}
if err := def_svar(ctx); err != nil {
return err
}
return nil
}
// GetPost implements "org.federation.FederationService/GetPost" method.
func (s *FederationService) GetPost(ctx context.Context, req *GetPostRequest) (res *GetPostResponse, e error) {
ctx, span := s.tracer.Start(ctx, "org.federation.FederationService/GetPost")
defer span.End()
ctx = withFederationServiceEnv(ctx, s.env)
ctx = withFederationServiceVariable(ctx, s.svcVar)
ctx = grpcfed.WithLogger(ctx, s.logger)
ctx = grpcfed.WithCELCacheMap(ctx, s.celCacheMap)
defer func() {
if r := recover(); r != nil {
e = grpcfed.RecoverError(r, grpcfed.StackTrace())
grpcfed.OutputErrorLog(ctx, e)
}
}()
defer func() {
for _, celPlugin := range s.celPlugins {
celPlugin.Cleanup()
}
}()
res, err := s.resolve_Org_Federation_GetPostResponse(ctx, &FederationService_Org_Federation_GetPostResponseArgument{
Id: req.GetId(),
})
if err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
grpcfed.OutputErrorLog(ctx, err)
return nil, err
}
return res, nil
}
// resolve_Org_Federation_GetPostResponse resolve "org.federation.GetPostResponse" message.
func (s *FederationService) resolve_Org_Federation_GetPostResponse(ctx context.Context, req *FederationService_Org_Federation_GetPostResponseArgument) (*GetPostResponse, error) {
ctx, span := s.tracer.Start(ctx, "org.federation.GetPostResponse")
defer span.End()
ctx = grpcfed.WithLogger(ctx, grpcfed.Logger(ctx), grpcfed.LogAttrs(ctx)...)
grpcfed.Logger(ctx).DebugContext(ctx, "resolve org.federation.GetPostResponse", slog.Any("message_args", s.logvalue_Org_Federation_GetPostResponseArgument(req)))
type localValueType struct {
*grpcfed.LocalValue
vars struct {
Default int64
Red int64
Switch int64
}
}
value := &localValueType{LocalValue: grpcfed.NewLocalValue(ctx, s.celEnvOpts, "grpc.federation.private.org.federation.GetPostResponseArgument", req)}
value.AddEnv(s.env)
value.AddServiceVariable(s.svcVar)
ctx = grpcfed.WithLocalValue(ctx, value.LocalValue)
/*
def {
name: "switch"
switch {
case {
if: "$.id == 'blue'"
by: "3"
}
case {
def {
name: "red"
by: "4"
}
if: "$.id == 'red'"
by: "red"
}
default {
def {
name: "default"
by: "5"
}
by: "default"
}
}
}
*/
def_switch := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[int64, *localValueType]{
Name: `switch`,
Type: grpcfed.CELIntType,
Setter: func(value *localValueType, v int64) error {
value.vars.Switch = v
return nil
},
Switch: func(ctx context.Context, value *localValueType) (any, error) {
cases := []*grpcfed.EvalSwitchCase[*localValueType]{}
cases = append(cases, &grpcfed.EvalSwitchCase[*localValueType]{
If: `$.id == 'blue'`,
IfCacheIndex: 4,
By: `3`,
ByCacheIndex: 5,
})
cases = append(cases, &grpcfed.EvalSwitchCase[*localValueType]{
Defs: func(ctx context.Context, value *localValueType) (any, error) {
/*
def {
name: "red"
by: "4"
}
*/
def_red := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[int64, *localValueType]{
Name: `red`,
Type: grpcfed.CELIntType,
Setter: func(value *localValueType, v int64) error {
value.vars.Red = v
return nil
},
By: `4`,
ByCacheIndex: 6,
})
}
if err := def_red(ctx); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
return nil, nil
},
If: `$.id == 'red'`,
IfCacheIndex: 7,
By: `red`,
ByCacheIndex: 8,
})
return grpcfed.EvalSwitch[int64](ctx, value, cases, &grpcfed.EvalSwitchDefault[*localValueType]{
Defs: func(ctx context.Context, value *localValueType) (any, error) {
/*
def {
name: "default"
by: "5"
}
*/
def_default := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[int64, *localValueType]{
Name: `default`,
Type: grpcfed.CELIntType,
Setter: func(value *localValueType, v int64) error {
value.vars.Default = v
return nil
},
By: `5`,
ByCacheIndex: 9,
})
}
if err := def_default(ctx); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
return nil, nil
},
By: `default`,
ByCacheIndex: 10,
})
},
})
}
if err := def_switch(ctx); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
// assign named parameters to message arguments to pass to the custom resolver.
req.FederationService_Org_Federation_GetPostResponseVariable.Default = value.vars.Default
req.FederationService_Org_Federation_GetPostResponseVariable.Red = value.vars.Red
req.FederationService_Org_Federation_GetPostResponseVariable.Switch = value.vars.Switch
// create a message value to be returned.
ret := &GetPostResponse{}
// field binding section.
// (grpc.federation.field).by = "grpc.federation.var.svar"
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[int64]{
Value: value,
Expr: `grpc.federation.var.svar`,
CacheIndex: 11,
Setter: func(v int64) error {
ret.Svar = v
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
// (grpc.federation.field).by = "switch"
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[int64]{
Value: value,
Expr: `switch`,
CacheIndex: 12,
Setter: func(v int64) error {
ret.Switch = v
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
grpcfed.Logger(ctx).DebugContext(ctx, "resolved org.federation.GetPostResponse", slog.Any("org.federation.GetPostResponse", s.logvalue_Org_Federation_GetPostResponse(ret)))
return ret, nil
}
func (s *FederationService) logvalue_Org_Federation_GetPostResponse(v *GetPostResponse) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.Int64("svar", v.GetSvar()),
slog.Int64("switch", v.GetSwitch()),
)
}
func (s *FederationService) logvalue_Org_Federation_GetPostResponseArgument(v *FederationService_Org_Federation_GetPostResponseArgument) slog.Value {
if !s.isLogLevelDebug {
return slog.GroupValue()
}
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.String("id", v.Id),
)
}
================================================
FILE: _examples/22_switch/go.mod
================================================
module example
go 1.24.0
replace github.com/mercari/grpc-federation => ../../
require (
github.com/google/go-cmp v0.7.0
github.com/mercari/grpc-federation v0.0.0-00010101000000-000000000000
go.opentelemetry.io/otel v1.24.0
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.21.0
go.opentelemetry.io/otel/sdk v1.24.0
go.opentelemetry.io/otel/trace v1.24.0
go.uber.org/goleak v1.3.0
google.golang.org/genproto/googleapis/rpc v0.0.0-20240826202546-f6391c0de4c7
google.golang.org/grpc v1.65.0
google.golang.org/protobuf v1.34.2
)
require (
cel.dev/expr v0.19.1 // indirect
github.com/antlr4-go/antlr/v4 v4.13.0 // indirect
github.com/cenkalti/backoff/v4 v4.2.1 // indirect
github.com/go-logr/logr v1.4.1 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
github.com/goccy/wasi-go v0.3.2 // indirect
github.com/google/cel-go v0.23.1 // indirect
github.com/google/uuid v1.6.0 // indirect
github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0 // indirect
github.com/kelseyhightower/envconfig v1.4.0 // indirect
github.com/stealthrocket/wazergo v0.19.1 // indirect
github.com/stoewer/go-strcase v1.3.0 // indirect
github.com/stretchr/testify v1.10.0 // indirect
github.com/tetratelabs/wazero v1.10.1 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.21.0 // indirect
go.opentelemetry.io/otel/metric v1.24.0 // indirect
go.opentelemetry.io/proto/otlp v1.0.0 // indirect
golang.org/x/exp v0.0.0-20250506013437-ce4c2cf36ca6 // indirect
golang.org/x/net v0.38.0 // indirect
golang.org/x/sync v0.14.0 // indirect
golang.org/x/sys v0.37.0 // indirect
golang.org/x/text v0.23.0 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20240826202546-f6391c0de4c7 // indirect
)
================================================
FILE: _examples/22_switch/go.sum
================================================
cel.dev/expr v0.19.1 h1:NciYrtDRIR0lNCnH1LFJegdjspNx9fI59O7TWcua/W4=
cel.dev/expr v0.19.1/go.mod h1:MrpN08Q+lEBs+bGYdLxxHkZoUSsCp0nSKTs0nTymJgw=
github.com/antlr4-go/antlr/v4 v4.13.0 h1:lxCg3LAv+EUK6t1i0y1V6/SLeUi0eKEKdhQAlS8TVTI=
github.com/antlr4-go/antlr/v4 v4.13.0/go.mod h1:pfChB/xh/Unjila75QW7+VU4TSnWnnk9UTnmpPaOR2g=
github.com/cenkalti/backoff/v4 v4.2.1 h1:y4OZtCnogmCPw98Zjyt5a6+QwPLGkiQsYW5oUqylYbM=
github.com/cenkalti/backoff/v4 v4.2.1/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A=
github.com/go-logr/logr v1.4.1 h1:pKouT5E8xu9zeFC39JXRDukb6JFQPXM5p5I91188VAQ=
github.com/go-logr/logr v1.4.1/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY=
github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag=
github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE=
github.com/goccy/wasi-go v0.3.2 h1:wAvGXmqCkfcp0B0AwIp5Ya53hzDwkKm9W8iuT3nCCz0=
github.com/goccy/wasi-go v0.3.2/go.mod h1:nIKD204n9xa4Z20UV+XA483kIr9TAl2vXr+X5qVAO5M=
github.com/golang/glog v1.2.1 h1:OptwRhECazUx5ix5TTWC3EZhsZEHWcYWY4FQHTIubm4=
github.com/golang/glog v1.2.1/go.mod h1:6AhwSGph0fcJtXVM/PEHPqZlFeoLxhs7/t5UDAwmO+w=
github.com/google/cel-go v0.23.1 h1:91ThhEZlBcE5rB2adBVXqvDoqdL8BG2oyhd0bK1I/r4=
github.com/google/cel-go v0.23.1/go.mod h1:52Pb6QsDbC5kvgxvZhiL9QX1oZEkcUF/ZqaPx1J5Wwo=
github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8=
github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU=
github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0 h1:YBftPWNWd4WwGqtY2yeZL2ef8rHAxPBD8KFhJpmcqms=
github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0/go.mod h1:YN5jB8ie0yfIUg6VvR9Kz84aCaG7AsGZnLjhHbUqwPg=
github.com/kelseyhightower/envconfig v1.4.0 h1:Im6hONhd3pLkfDFsbRgu68RDNkGF1r3dvMUtDTo2cv8=
github.com/kelseyhightower/envconfig v1.4.0/go.mod h1:cccZRl6mQpaq41TPp5QxidR+Sa3axMbJDNb//FQX6Gg=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/stealthrocket/wazergo v0.19.1 h1:BPrITETPgSFwiytwmToO0MbUC/+RGC39JScz1JmmG6c=
github.com/stealthrocket/wazergo v0.19.1/go.mod h1:riI0hxw4ndZA5e6z7PesHg2BtTftcZaMxRcoiGGipTs=
github.com/stoewer/go-strcase v1.3.0 h1:g0eASXYtp+yvN9fK8sH94oCIk0fau9uV1/ZdJ0AVEzs=
github.com/stoewer/go-strcase v1.3.0/go.mod h1:fAH5hQ5pehh+j3nZfvwdk2RgEgQjAoM8wodgtPmh1xo=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=
github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo=
github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA=
github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
github.com/tetratelabs/wazero v1.10.1 h1:2DugeJf6VVk58KTPszlNfeeN8AhhpwcZqkJj2wwFuH8=
github.com/tetratelabs/wazero v1.10.1/go.mod h1:DRm5twOQ5Gr1AoEdSi0CLjDQF1J9ZAuyqFIjl1KKfQU=
go.opentelemetry.io/otel v1.24.0 h1:0LAOdjNmQeSTzGBzduGe/rU4tZhMwL5rWgtp9Ku5Jfo=
go.opentelemetry.io/otel v1.24.0/go.mod h1:W7b9Ozg4nkF5tWI5zsXkaKKDjdVjpD4oAt9Qi/MArHo=
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.21.0 h1:cl5P5/GIfFh4t6xyruOgJP5QiA1pw4fYYdv6nc6CBWw=
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.21.0/go.mod h1:zgBdWWAu7oEEMC06MMKc5NLbA/1YDXV1sMpSqEeLQLg=
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.21.0 h1:tIqheXEFWAZ7O8A7m+J0aPTmpJN3YQ7qetUAdkkkKpk=
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.21.0/go.mod h1:nUeKExfxAQVbiVFn32YXpXZZHZ61Cc3s3Rn1pDBGAb0=
go.opentelemetry.io/otel/metric v1.24.0 h1:6EhoGWWK28x1fbpA4tYTOWBkPefTDQnb8WSGXlc88kI=
go.opentelemetry.io/otel/metric v1.24.0/go.mod h1:VYhLe1rFfxuTXLgj4CBiyz+9WYBA8pNGJgDcSFRKBco=
go.opentelemetry.io/otel/sdk v1.24.0 h1:YMPPDNymmQN3ZgczicBY3B6sf9n62Dlj9pWD3ucgoDw=
go.opentelemetry.io/otel/sdk v1.24.0/go.mod h1:KVrIYw6tEubO9E96HQpcmpTKDVn9gdv35HoYiQWGDFg=
go.opentelemetry.io/otel/trace v1.24.0 h1:CsKnnL4dUAr/0llH9FKuc698G04IrpWV0MQA/Y1YELI=
go.opentelemetry.io/otel/trace v1.24.0/go.mod h1:HPc3Xr/cOApsBI154IU0OI0HJexz+aw5uPdbs3UCjNU=
go.opentelemetry.io/proto/otlp v1.0.0 h1:T0TX0tmXU8a3CbNXzEKGeU5mIVOdf0oykP+u2lIVU/I=
go.opentelemetry.io/proto/otlp v1.0.0/go.mod h1:Sy6pihPLfYHkr3NkUbEhGHFhINUSI/v80hjKIs5JXpM=
go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto=
go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE=
golang.org/x/exp v0.0.0-20250506013437-ce4c2cf36ca6 h1:y5zboxd6LQAqYIhHnB48p0ByQ/GnQx2BE33L8BOHQkI=
golang.org/x/exp v0.0.0-20250506013437-ce4c2cf36ca6/go.mod h1:U6Lno4MTRCDY+Ba7aCcauB9T60gsv5s4ralQzP72ZoQ=
golang.org/x/net v0.38.0 h1:vRMAPTMaeGqVhG5QyLJHqNDwecKTomGeqbnfZyKlBI8=
golang.org/x/net v0.38.0/go.mod h1:ivrbrMbzFq5J41QOQh0siUuly180yBYtLp+CKbEaFx8=
golang.org/x/sync v0.14.0 h1:woo0S4Yywslg6hp4eUFjTVOyKt0RookbpAHG4c1HmhQ=
golang.org/x/sync v0.14.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA=
golang.org/x/sys v0.37.0 h1:fdNQudmxPjkdUTPnLn5mdQv7Zwvbvpaxqs831goi9kQ=
golang.org/x/sys v0.37.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks=
golang.org/x/text v0.23.0 h1:D71I7dUrlY+VX0gQShAThNGHFxZ13dGLBHQLVl1mJlY=
golang.org/x/text v0.23.0/go.mod h1:/BLNzu4aZCJ1+kcD0DNRotWKage4q2rGVAg4o22unh4=
google.golang.org/genproto/googleapis/api v0.0.0-20240826202546-f6391c0de4c7 h1:YcyjlL1PRr2Q17/I0dPk2JmYS5CDXfcdb2Z3YRioEbw=
google.golang.org/genproto/googleapis/api v0.0.0-20240826202546-f6391c0de4c7/go.mod h1:OCdP9MfskevB/rbYvHTsXTtKC+3bHWajPdoKgjcYkfo=
google.golang.org/genproto/googleapis/rpc v0.0.0-20240826202546-f6391c0de4c7 h1:2035KHhUv+EpyB+hWgJnaWKJOdX1E95w2S8Rr4uWKTs=
google.golang.org/genproto/googleapis/rpc v0.0.0-20240826202546-f6391c0de4c7/go.mod h1:UqMtugtsSgubUsoxbuAoiCXvqvErP7Gf0so0mK9tHxU=
google.golang.org/grpc v1.65.0 h1:bs/cUb4lp1G5iImFFd3u5ixQzweKizoZJAwBNLR42lc=
google.golang.org/grpc v1.65.0/go.mod h1:WgYC2ypjlB0EiQi6wdKixMqukr6lBc0Vo+oOgjrM5ZQ=
google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg=
google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
================================================
FILE: _examples/22_switch/grpc/federation/federation.pb.go
================================================
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.33.0
// protoc (unknown)
// source: grpc/federation/federation.proto
package federation
import (
_ "github.com/mercari/grpc-federation/grpc/federation/cel"
code "google.golang.org/genproto/googleapis/rpc/code"
errdetails "google.golang.org/genproto/googleapis/rpc/errdetails"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
descriptorpb "google.golang.org/protobuf/types/descriptorpb"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
// TypeKind is primitive kind list.
type TypeKind int32
const (
// UNKNOWN represents unexpected value.
TypeKind_UNKNOWN TypeKind = 0
// STRING is used to convert the input value to `string` type.
TypeKind_STRING TypeKind = 1
// BOOL is used to convert the input value to `bool` type.
TypeKind_BOOL TypeKind = 2
// INT64 is used to convert the input value to `int64` type.
TypeKind_INT64 TypeKind = 3
// UINT64 is used to convert the input value to `uint64` type.
TypeKind_UINT64 TypeKind = 4
// DOUBLE is used to convert the input value to `double` type.
TypeKind_DOUBLE TypeKind = 5
// DURATION is used to convert the input value to the `google.protobuf.Duration` type.
TypeKind_DURATION TypeKind = 6
)
// Enum value maps for TypeKind.
var (
TypeKind_name = map[int32]string{
0: "UNKNOWN",
1: "STRING",
2: "BOOL",
3: "INT64",
4: "UINT64",
5: "DOUBLE",
6: "DURATION",
}
TypeKind_value = map[string]int32{
"UNKNOWN": 0,
"STRING": 1,
"BOOL": 2,
"INT64": 3,
"UINT64": 4,
"DOUBLE": 5,
"DURATION": 6,
}
)
func (x TypeKind) Enum() *TypeKind {
p := new(TypeKind)
*p = x
return p
}
func (x TypeKind) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (TypeKind) Descriptor() protoreflect.EnumDescriptor {
return file_grpc_federation_federation_proto_enumTypes[0].Descriptor()
}
func (TypeKind) Type() protoreflect.EnumType {
return &file_grpc_federation_federation_proto_enumTypes[0]
}
func (x TypeKind) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use TypeKind.Descriptor instead.
func (TypeKind) EnumDescriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{0}
}
// LogLevel is the importance or severity of a log event.
type GRPCError_LogLevel int32
const (
// UNKNOWN represents unexpected value.
GRPCError_UNKNOWN GRPCError_LogLevel = 0
// DEBUG is used for detailed information that is useful during development and debugging.
GRPCError_DEBUG GRPCError_LogLevel = 1
// INFO logs are used to provide information about the normal functioning of the application.
GRPCError_INFO GRPCError_LogLevel = 2
// WARN signifies a potential problem or warning that does not necessarily stop the program from working but may lead to issues in the future.
GRPCError_WARN GRPCError_LogLevel = 3
// ERROR indicates a serious issue that has caused a failure in the application.
GRPCError_ERROR GRPCError_LogLevel = 4
)
// Enum value maps for GRPCError_LogLevel.
var (
GRPCError_LogLevel_name = map[int32]string{
0: "UNKNOWN",
1: "DEBUG",
2: "INFO",
3: "WARN",
4: "ERROR",
}
GRPCError_LogLevel_value = map[string]int32{
"UNKNOWN": 0,
"DEBUG": 1,
"INFO": 2,
"WARN": 3,
"ERROR": 4,
}
)
func (x GRPCError_LogLevel) Enum() *GRPCError_LogLevel {
p := new(GRPCError_LogLevel)
*p = x
return p
}
func (x GRPCError_LogLevel) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (GRPCError_LogLevel) Descriptor() protoreflect.EnumDescriptor {
return file_grpc_federation_federation_proto_enumTypes[1].Descriptor()
}
func (GRPCError_LogLevel) Type() protoreflect.EnumType {
return &file_grpc_federation_federation_proto_enumTypes[1]
}
func (x GRPCError_LogLevel) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use GRPCError_LogLevel.Descriptor instead.
func (GRPCError_LogLevel) EnumDescriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{24, 0}
}
type FileRule struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Plugin *CELPlugin `protobuf:"bytes,1,opt,name=plugin,proto3" json:"plugin,omitempty"`
// import can be used to resolve methods, messages, etc. that are referenced in gRPC Federation rules.
Import []string `protobuf:"bytes,2,rep,name=import,proto3" json:"import,omitempty"`
}
func (x *FileRule) Reset() {
*x = FileRule{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *FileRule) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*FileRule) ProtoMessage() {}
func (x *FileRule) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use FileRule.ProtoReflect.Descriptor instead.
func (*FileRule) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{0}
}
func (x *FileRule) GetPlugin() *CELPlugin {
if x != nil {
return x.Plugin
}
return nil
}
func (x *FileRule) GetImport() []string {
if x != nil {
return x.Import
}
return nil
}
type EnumRule struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// alias mapping between enums defined in other packages and enums defined on the federation service side.
// The alias is the FQDN ( . ) to the enum.
// If this definition exists, type conversion is automatically performed before the enum value assignment operation.
// If a enum with this option has a value that is not present in the enum specified by alias, and the alias option is not specified for that value, an error is occurred.
// You can specify multiple aliases. In that case, only values common to all aliases will be considered.
// Specifying a value that is not included in either alias will result in an error.
Alias []string `protobuf:"bytes,1,rep,name=alias,proto3" json:"alias,omitempty"`
}
func (x *EnumRule) Reset() {
*x = EnumRule{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *EnumRule) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*EnumRule) ProtoMessage() {}
func (x *EnumRule) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use EnumRule.ProtoReflect.Descriptor instead.
func (*EnumRule) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{1}
}
func (x *EnumRule) GetAlias() []string {
if x != nil {
return x.Alias
}
return nil
}
type EnumValueRule struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// specifies the default value of the enum.
// All values other than those specified in alias will be default values.
Default *bool `protobuf:"varint,1,opt,name=default,proto3,oneof" json:"default,omitempty"`
// alias can be used when alias is specified in grpc.federation.enum option,
// and specifies the value name to be referenced among the enums specified in alias of enum option.
// multiple value names can be specified for alias.
Alias []string `protobuf:"bytes,2,rep,name=alias,proto3" json:"alias,omitempty"`
// attr is used to hold multiple name-value pairs corresponding to an enum value.
// The values specified by the name must be consistently specified for all enum values.
// The values stored using this feature can be retrieved using the `attr()` method of the enum API.
Attr []*EnumValueAttribute `protobuf:"bytes,3,rep,name=attr,proto3" json:"attr,omitempty"`
// noalias exclude from the target of alias.
// This option cannot be specified simultaneously with `default` or `alias`.
Noalias *bool `protobuf:"varint,4,opt,name=noalias,proto3,oneof" json:"noalias,omitempty"`
}
func (x *EnumValueRule) Reset() {
*x = EnumValueRule{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *EnumValueRule) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*EnumValueRule) ProtoMessage() {}
func (x *EnumValueRule) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use EnumValueRule.ProtoReflect.Descriptor instead.
func (*EnumValueRule) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{2}
}
func (x *EnumValueRule) GetDefault() bool {
if x != nil && x.Default != nil {
return *x.Default
}
return false
}
func (x *EnumValueRule) GetAlias() []string {
if x != nil {
return x.Alias
}
return nil
}
func (x *EnumValueRule) GetAttr() []*EnumValueAttribute {
if x != nil {
return x.Attr
}
return nil
}
func (x *EnumValueRule) GetNoalias() bool {
if x != nil && x.Noalias != nil {
return *x.Noalias
}
return false
}
type EnumValueAttribute struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// name is the attribute key.
// This value is used to search for values using the `attr()` method.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// value represents the value corresponding to `name`.
Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
}
func (x *EnumValueAttribute) Reset() {
*x = EnumValueAttribute{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *EnumValueAttribute) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*EnumValueAttribute) ProtoMessage() {}
func (x *EnumValueAttribute) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[3]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use EnumValueAttribute.ProtoReflect.Descriptor instead.
func (*EnumValueAttribute) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{3}
}
func (x *EnumValueAttribute) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *EnumValueAttribute) GetValue() string {
if x != nil {
return x.Value
}
return ""
}
type OneofRule struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
}
func (x *OneofRule) Reset() {
*x = OneofRule{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *OneofRule) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*OneofRule) ProtoMessage() {}
func (x *OneofRule) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[4]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use OneofRule.ProtoReflect.Descriptor instead.
func (*OneofRule) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{4}
}
// ServiceRule define gRPC Federation rules for the service.
type ServiceRule struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// env defines the environment variable.
Env *Env `protobuf:"bytes,1,opt,name=env,proto3" json:"env,omitempty"`
// var defines the service-level variables.
Var []*ServiceVariable `protobuf:"bytes,2,rep,name=var,proto3" json:"var,omitempty"`
}
func (x *ServiceRule) Reset() {
*x = ServiceRule{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[5]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ServiceRule) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ServiceRule) ProtoMessage() {}
func (x *ServiceRule) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[5]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ServiceRule.ProtoReflect.Descriptor instead.
func (*ServiceRule) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{5}
}
func (x *ServiceRule) GetEnv() *Env {
if x != nil {
return x.Env
}
return nil
}
func (x *ServiceRule) GetVar() []*ServiceVariable {
if x != nil {
return x.Var
}
return nil
}
// Env is used when setting environment variables.
// There are two ways to configure it.
type Env struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// var is used to directly list environment variables.
Var []*EnvVar `protobuf:"bytes,1,rep,name=var,proto3" json:"var,omitempty"`
// message is used to reference an already defined Protocol Buffers' message for defining environment variables.
// If you want to set detailed options for the fields of the message, use the `env` option in FieldRule.
Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
}
func (x *Env) Reset() {
*x = Env{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[6]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Env) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Env) ProtoMessage() {}
func (x *Env) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[6]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Env.ProtoReflect.Descriptor instead.
func (*Env) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{6}
}
func (x *Env) GetVar() []*EnvVar {
if x != nil {
return x.Var
}
return nil
}
func (x *Env) GetMessage() string {
if x != nil {
return x.Message
}
return ""
}
// ServiceVariable define variables at the service level.
// This definition is executed at server startup, after the initialization of Env.
// The defined variables can be used across all messages that the service depends on.
type ServiceVariable struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// name is a variable name.
// This name can be referenced in all CELs related to the service by using `grpc.federation.var.` prefix.
Name *string `protobuf:"bytes,1,opt,name=name,proto3,oneof" json:"name,omitempty"`
// if specify the condition for evaluating expr.
// this value evaluated by CEL and it must return a boolean value.
// If the result of evaluation is `false`, the value assigned to name is the default value of the result of evaluation of `expr`.
If *string `protobuf:"bytes,2,opt,name=if,proto3,oneof" json:"if,omitempty"`
// expr specify the value to be assigned to name.
//
// Types that are assignable to Expr:
//
// *ServiceVariable_By
// *ServiceVariable_Map
// *ServiceVariable_Message
// *ServiceVariable_Validation
// *ServiceVariable_Enum
// *ServiceVariable_Switch
Expr isServiceVariable_Expr `protobuf_oneof:"expr"`
}
func (x *ServiceVariable) Reset() {
*x = ServiceVariable{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[7]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ServiceVariable) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ServiceVariable) ProtoMessage() {}
func (x *ServiceVariable) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[7]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ServiceVariable.ProtoReflect.Descriptor instead.
func (*ServiceVariable) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{7}
}
func (x *ServiceVariable) GetName() string {
if x != nil && x.Name != nil {
return *x.Name
}
return ""
}
func (x *ServiceVariable) GetIf() string {
if x != nil && x.If != nil {
return *x.If
}
return ""
}
func (m *ServiceVariable) GetExpr() isServiceVariable_Expr {
if m != nil {
return m.Expr
}
return nil
}
func (x *ServiceVariable) GetBy() string {
if x, ok := x.GetExpr().(*ServiceVariable_By); ok {
return x.By
}
return ""
}
func (x *ServiceVariable) GetMap() *MapExpr {
if x, ok := x.GetExpr().(*ServiceVariable_Map); ok {
return x.Map
}
return nil
}
func (x *ServiceVariable) GetMessage() *MessageExpr {
if x, ok := x.GetExpr().(*ServiceVariable_Message); ok {
return x.Message
}
return nil
}
func (x *ServiceVariable) GetValidation() *ServiceVariableValidationExpr {
if x, ok := x.GetExpr().(*ServiceVariable_Validation); ok {
return x.Validation
}
return nil
}
func (x *ServiceVariable) GetEnum() *EnumExpr {
if x, ok := x.GetExpr().(*ServiceVariable_Enum); ok {
return x.Enum
}
return nil
}
func (x *ServiceVariable) GetSwitch() *SwitchExpr {
if x, ok := x.GetExpr().(*ServiceVariable_Switch); ok {
return x.Switch
}
return nil
}
type isServiceVariable_Expr interface {
isServiceVariable_Expr()
}
type ServiceVariable_By struct {
// `by` evaluates with CEL.
By string `protobuf:"bytes,11,opt,name=by,proto3,oneof"`
}
type ServiceVariable_Map struct {
// map apply map operation for the specified repeated type.
Map *MapExpr `protobuf:"bytes,12,opt,name=map,proto3,oneof"`
}
type ServiceVariable_Message struct {
// message gets with message arguments.
Message *MessageExpr `protobuf:"bytes,13,opt,name=message,proto3,oneof"`
}
type ServiceVariable_Validation struct {
// validation defines the validation rule and message.
Validation *ServiceVariableValidationExpr `protobuf:"bytes,14,opt,name=validation,proto3,oneof"`
}
type ServiceVariable_Enum struct {
// enum gets with cel value.
Enum *EnumExpr `protobuf:"bytes,15,opt,name=enum,proto3,oneof"`
}
type ServiceVariable_Switch struct {
// switch provides conditional evaluation with multiple branches.
Switch *SwitchExpr `protobuf:"bytes,16,opt,name=switch,proto3,oneof"`
}
func (*ServiceVariable_By) isServiceVariable_Expr() {}
func (*ServiceVariable_Map) isServiceVariable_Expr() {}
func (*ServiceVariable_Message) isServiceVariable_Expr() {}
func (*ServiceVariable_Validation) isServiceVariable_Expr() {}
func (*ServiceVariable_Enum) isServiceVariable_Expr() {}
func (*ServiceVariable_Switch) isServiceVariable_Expr() {}
// ServiceVariableValidationExpr represents validation rule and error message.
type ServiceVariableValidationExpr struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// if specifies condition in CEL. If the condition is true, it returns error.
// The return value must always be of type boolean.
If string `protobuf:"bytes,1,opt,name=if,proto3" json:"if,omitempty"`
// message is a error message in CEL.
Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
}
func (x *ServiceVariableValidationExpr) Reset() {
*x = ServiceVariableValidationExpr{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[8]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ServiceVariableValidationExpr) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ServiceVariableValidationExpr) ProtoMessage() {}
func (x *ServiceVariableValidationExpr) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[8]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ServiceVariableValidationExpr.ProtoReflect.Descriptor instead.
func (*ServiceVariableValidationExpr) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{8}
}
func (x *ServiceVariableValidationExpr) GetIf() string {
if x != nil {
return x.If
}
return ""
}
func (x *ServiceVariableValidationExpr) GetMessage() string {
if x != nil {
return x.Message
}
return ""
}
// EnvVar represents an environment variable.
type EnvVar struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// name is an environment variable name.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// type is an environment variable type.
Type *EnvType `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"`
// option is an additional option for parsing environment variable.
Option *EnvVarOption `protobuf:"bytes,3,opt,name=option,proto3,oneof" json:"option,omitempty"`
}
func (x *EnvVar) Reset() {
*x = EnvVar{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[9]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *EnvVar) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*EnvVar) ProtoMessage() {}
func (x *EnvVar) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[9]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use EnvVar.ProtoReflect.Descriptor instead.
func (*EnvVar) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{9}
}
func (x *EnvVar) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *EnvVar) GetType() *EnvType {
if x != nil {
return x.Type
}
return nil
}
func (x *EnvVar) GetOption() *EnvVarOption {
if x != nil {
return x.Option
}
return nil
}
// EnvType represents type information for environment variable.
type EnvType struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Types that are assignable to Type:
//
// *EnvType_Kind
// *EnvType_Repeated
// *EnvType_Map
Type isEnvType_Type `protobuf_oneof:"type"`
}
func (x *EnvType) Reset() {
*x = EnvType{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[10]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *EnvType) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*EnvType) ProtoMessage() {}
func (x *EnvType) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[10]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use EnvType.ProtoReflect.Descriptor instead.
func (*EnvType) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{10}
}
func (m *EnvType) GetType() isEnvType_Type {
if m != nil {
return m.Type
}
return nil
}
func (x *EnvType) GetKind() TypeKind {
if x, ok := x.GetType().(*EnvType_Kind); ok {
return x.Kind
}
return TypeKind_UNKNOWN
}
func (x *EnvType) GetRepeated() *EnvType {
if x, ok := x.GetType().(*EnvType_Repeated); ok {
return x.Repeated
}
return nil
}
func (x *EnvType) GetMap() *EnvMapType {
if x, ok := x.GetType().(*EnvType_Map); ok {
return x.Map
}
return nil
}
type isEnvType_Type interface {
isEnvType_Type()
}
type EnvType_Kind struct {
// kind is used when the type is a primitive type.
Kind TypeKind `protobuf:"varint,1,opt,name=kind,proto3,enum=grpc.federation.TypeKind,oneof"`
}
type EnvType_Repeated struct {
// repeated is used when the type is a repeated type.
Repeated *EnvType `protobuf:"bytes,2,opt,name=repeated,proto3,oneof"`
}
type EnvType_Map struct {
// map is used when the type is a map type.
Map *EnvMapType `protobuf:"bytes,3,opt,name=map,proto3,oneof"`
}
func (*EnvType_Kind) isEnvType_Type() {}
func (*EnvType_Repeated) isEnvType_Type() {}
func (*EnvType_Map) isEnvType_Type() {}
// EnvMapType represents map type.
type EnvMapType struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// key represents map's key type.
Key *EnvType `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
// value represents map's value type.
Value *EnvType `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
}
func (x *EnvMapType) Reset() {
*x = EnvMapType{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[11]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *EnvMapType) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*EnvMapType) ProtoMessage() {}
func (x *EnvMapType) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[11]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use EnvMapType.ProtoReflect.Descriptor instead.
func (*EnvMapType) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{11}
}
func (x *EnvMapType) GetKey() *EnvType {
if x != nil {
return x.Key
}
return nil
}
func (x *EnvMapType) GetValue() *EnvType {
if x != nil {
return x.Value
}
return nil
}
// EnvVarOption represents additional option for environment variable.
// The option work with the `envconfig` library in Go language.
// For detailed specifications, please refer to the library's documentation ( https://pkg.go.dev/github.com/kelseyhightower/envconfig#section-readme ).
type EnvVarOption struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// alternate use this option if you want to use an environment variable with a different name than the value specified in `EnvVar.name`.
Alternate *string `protobuf:"bytes,1,opt,name=alternate,proto3,oneof" json:"alternate,omitempty"`
// default specify the value to use as a fallback if the specified environment variable is not found.
Default *string `protobuf:"bytes,2,opt,name=default,proto3,oneof" json:"default,omitempty"`
// required require the environment variable to exist.
// If it does not exist, an error will occur at startup.
Required *bool `protobuf:"varint,3,opt,name=required,proto3,oneof" json:"required,omitempty"`
// ignored if ignored is true, it does nothing even if the environment variable exists.
Ignored *bool `protobuf:"varint,4,opt,name=ignored,proto3,oneof" json:"ignored,omitempty"`
}
func (x *EnvVarOption) Reset() {
*x = EnvVarOption{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[12]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *EnvVarOption) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*EnvVarOption) ProtoMessage() {}
func (x *EnvVarOption) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[12]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use EnvVarOption.ProtoReflect.Descriptor instead.
func (*EnvVarOption) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{12}
}
func (x *EnvVarOption) GetAlternate() string {
if x != nil && x.Alternate != nil {
return *x.Alternate
}
return ""
}
func (x *EnvVarOption) GetDefault() string {
if x != nil && x.Default != nil {
return *x.Default
}
return ""
}
func (x *EnvVarOption) GetRequired() bool {
if x != nil && x.Required != nil {
return *x.Required
}
return false
}
func (x *EnvVarOption) GetIgnored() bool {
if x != nil && x.Ignored != nil {
return *x.Ignored
}
return false
}
type MethodRule struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// the time to timeout. If the specified time period elapses, DEADLINE_EXCEEDED status is returned.
// If you want to handle this error, you need to implement a custom error handler in Go.
// The format is the same as Go's time.Duration format. See https://pkg.go.dev/time#ParseDuration.
Timeout *string `protobuf:"bytes,1,opt,name=timeout,proto3,oneof" json:"timeout,omitempty"`
// response specify the name of the message you want to use to create the response value.
// If you specify a reserved type like `google.protobuf.Empty` as the response, you cannot define gRPC Federation options.
// In such cases, you can specify a separate message to create the response value.
// The specified response message must contain fields with the same names and types as all the fields in the original response.
Response *string `protobuf:"bytes,2,opt,name=response,proto3,oneof" json:"response,omitempty"`
}
func (x *MethodRule) Reset() {
*x = MethodRule{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[13]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *MethodRule) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*MethodRule) ProtoMessage() {}
func (x *MethodRule) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[13]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use MethodRule.ProtoReflect.Descriptor instead.
func (*MethodRule) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{13}
}
func (x *MethodRule) GetTimeout() string {
if x != nil && x.Timeout != nil {
return *x.Timeout
}
return ""
}
func (x *MethodRule) GetResponse() string {
if x != nil && x.Response != nil {
return *x.Response
}
return ""
}
// MessageRule define gRPC Federation rules for the message.
type MessageRule struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// def specify variables to be used in field binding by `grpc.federation.field` option.
Def []*VariableDefinition `protobuf:"bytes,1,rep,name=def,proto3" json:"def,omitempty"`
// if custom_resolver is true, the resolver for this message is implemented by Go.
// If there are any values retrieved by resolver or messages, they are passed as arguments for custom resolver.
// Each field of the message returned by the custom resolver is automatically bound.
// If you want to change the binding process for a particular field, set `custom_resolver=true` option for that field.
CustomResolver *bool `protobuf:"varint,2,opt,name=custom_resolver,json=customResolver,proto3,oneof" json:"custom_resolver,omitempty"`
// alias mapping between messages defined in other packages and messages defined on the federation service side.
// The alias is the FQDN ( . ) to the message.
// If this definition exists, type conversion is automatically performed before the field assignment operation.
// If a message with this option has a field that is not present in the message specified by alias, and the alias option is not specified for that field, an error is occurred.
// You can specify multiple aliases. In that case, only fields common to all aliases will be considered.
// Specifying a field that is not included in either alias will result in an error.
Alias []string `protobuf:"bytes,3,rep,name=alias,proto3" json:"alias,omitempty"`
}
func (x *MessageRule) Reset() {
*x = MessageRule{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[14]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *MessageRule) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*MessageRule) ProtoMessage() {}
func (x *MessageRule) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[14]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use MessageRule.ProtoReflect.Descriptor instead.
func (*MessageRule) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{14}
}
func (x *MessageRule) GetDef() []*VariableDefinition {
if x != nil {
return x.Def
}
return nil
}
func (x *MessageRule) GetCustomResolver() bool {
if x != nil && x.CustomResolver != nil {
return *x.CustomResolver
}
return false
}
func (x *MessageRule) GetAlias() []string {
if x != nil {
return x.Alias
}
return nil
}
// VariableDefinition represents variable definition.
type VariableDefinition struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// name is a variable name.
// This name can be referenced in all CELs defined after itself in the same message.
// It can also be referenced in `grpc.federation.field` option.
Name *string `protobuf:"bytes,1,opt,name=name,proto3,oneof" json:"name,omitempty"`
// if specify the condition for evaluating expr.
// this value evaluated by CEL and it must return a boolean value.
// If the result of evaluation is `false`, the value assigned to name is the default value of the result of evaluation of `expr`.
If *string `protobuf:"bytes,2,opt,name=if,proto3,oneof" json:"if,omitempty"`
// autobind if the result value of `expr` is a message type,
// the value of a field with the same name and type as the field name of its own message is automatically assigned to the value of the field in the message.
// If multiple autobinds are used at the same message,
// you must explicitly use the `grpc.federation.field` option to do the binding yourself, since duplicate field names cannot be correctly determined as one.
Autobind *bool `protobuf:"varint,3,opt,name=autobind,proto3,oneof" json:"autobind,omitempty"`
// expr specify the value to be assigned to name.
//
// Types that are assignable to Expr:
//
// *VariableDefinition_By
// *VariableDefinition_Map
// *VariableDefinition_Message
// *VariableDefinition_Call
// *VariableDefinition_Validation
// *VariableDefinition_Enum
// *VariableDefinition_Switch
Expr isVariableDefinition_Expr `protobuf_oneof:"expr"`
}
func (x *VariableDefinition) Reset() {
*x = VariableDefinition{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[15]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *VariableDefinition) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*VariableDefinition) ProtoMessage() {}
func (x *VariableDefinition) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[15]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use VariableDefinition.ProtoReflect.Descriptor instead.
func (*VariableDefinition) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{15}
}
func (x *VariableDefinition) GetName() string {
if x != nil && x.Name != nil {
return *x.Name
}
return ""
}
func (x *VariableDefinition) GetIf() string {
if x != nil && x.If != nil {
return *x.If
}
return ""
}
func (x *VariableDefinition) GetAutobind() bool {
if x != nil && x.Autobind != nil {
return *x.Autobind
}
return false
}
func (m *VariableDefinition) GetExpr() isVariableDefinition_Expr {
if m != nil {
return m.Expr
}
return nil
}
func (x *VariableDefinition) GetBy() string {
if x, ok := x.GetExpr().(*VariableDefinition_By); ok {
return x.By
}
return ""
}
func (x *VariableDefinition) GetMap() *MapExpr {
if x, ok := x.GetExpr().(*VariableDefinition_Map); ok {
return x.Map
}
return nil
}
func (x *VariableDefinition) GetMessage() *MessageExpr {
if x, ok := x.GetExpr().(*VariableDefinition_Message); ok {
return x.Message
}
return nil
}
func (x *VariableDefinition) GetCall() *CallExpr {
if x, ok := x.GetExpr().(*VariableDefinition_Call); ok {
return x.Call
}
return nil
}
func (x *VariableDefinition) GetValidation() *ValidationExpr {
if x, ok := x.GetExpr().(*VariableDefinition_Validation); ok {
return x.Validation
}
return nil
}
func (x *VariableDefinition) GetEnum() *EnumExpr {
if x, ok := x.GetExpr().(*VariableDefinition_Enum); ok {
return x.Enum
}
return nil
}
func (x *VariableDefinition) GetSwitch() *SwitchExpr {
if x, ok := x.GetExpr().(*VariableDefinition_Switch); ok {
return x.Switch
}
return nil
}
type isVariableDefinition_Expr interface {
isVariableDefinition_Expr()
}
type VariableDefinition_By struct {
// `by` evaluates with CEL.
By string `protobuf:"bytes,11,opt,name=by,proto3,oneof"`
}
type VariableDefinition_Map struct {
// map apply map operation for the specified repeated type.
Map *MapExpr `protobuf:"bytes,12,opt,name=map,proto3,oneof"`
}
type VariableDefinition_Message struct {
// message gets with message arguments.
Message *MessageExpr `protobuf:"bytes,13,opt,name=message,proto3,oneof"`
}
type VariableDefinition_Call struct {
// call specifies how to call gRPC method.
Call *CallExpr `protobuf:"bytes,14,opt,name=call,proto3,oneof"`
}
type VariableDefinition_Validation struct {
// validation defines the validation rule and error.
Validation *ValidationExpr `protobuf:"bytes,15,opt,name=validation,proto3,oneof"`
}
type VariableDefinition_Enum struct {
// enum gets with cel value.
Enum *EnumExpr `protobuf:"bytes,16,opt,name=enum,proto3,oneof"`
}
type VariableDefinition_Switch struct {
// switch provides conditional evaluation with multiple branches.
Switch *SwitchExpr `protobuf:"bytes,17,opt,name=switch,proto3,oneof"`
}
func (*VariableDefinition_By) isVariableDefinition_Expr() {}
func (*VariableDefinition_Map) isVariableDefinition_Expr() {}
func (*VariableDefinition_Message) isVariableDefinition_Expr() {}
func (*VariableDefinition_Call) isVariableDefinition_Expr() {}
func (*VariableDefinition_Validation) isVariableDefinition_Expr() {}
func (*VariableDefinition_Enum) isVariableDefinition_Expr() {}
func (*VariableDefinition_Switch) isVariableDefinition_Expr() {}
// MapExpr apply map operation for the specified repeated type.
type MapExpr struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// iterator define iterator variable.
// When evaluating CEL in `expr`, we can refer to the name defined in iterator.
Iterator *Iterator `protobuf:"bytes,1,opt,name=iterator,proto3" json:"iterator,omitempty"`
// expr creates map elements using iterator variable.
//
// Types that are assignable to Expr:
//
// *MapExpr_By
// *MapExpr_Message
// *MapExpr_Enum
Expr isMapExpr_Expr `protobuf_oneof:"expr"`
}
func (x *MapExpr) Reset() {
*x = MapExpr{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[16]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *MapExpr) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*MapExpr) ProtoMessage() {}
func (x *MapExpr) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[16]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use MapExpr.ProtoReflect.Descriptor instead.
func (*MapExpr) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{16}
}
func (x *MapExpr) GetIterator() *Iterator {
if x != nil {
return x.Iterator
}
return nil
}
func (m *MapExpr) GetExpr() isMapExpr_Expr {
if m != nil {
return m.Expr
}
return nil
}
func (x *MapExpr) GetBy() string {
if x, ok := x.GetExpr().(*MapExpr_By); ok {
return x.By
}
return ""
}
func (x *MapExpr) GetMessage() *MessageExpr {
if x, ok := x.GetExpr().(*MapExpr_Message); ok {
return x.Message
}
return nil
}
func (x *MapExpr) GetEnum() *EnumExpr {
if x, ok := x.GetExpr().(*MapExpr_Enum); ok {
return x.Enum
}
return nil
}
type isMapExpr_Expr interface {
isMapExpr_Expr()
}
type MapExpr_By struct {
// `by` evaluates with CEL.
// this can refer to the variable declared by `iterator`.
By string `protobuf:"bytes,11,opt,name=by,proto3,oneof"`
}
type MapExpr_Message struct {
// message gets with message arguments, and it is made an element of the map.
// The result type of MapExpr is the repeated type of the specified message.
Message *MessageExpr `protobuf:"bytes,12,opt,name=message,proto3,oneof"`
}
type MapExpr_Enum struct {
// enum creates enum value for each element of the map.
// The result type of MapExpr is the repeated type of the specified enum.
Enum *EnumExpr `protobuf:"bytes,13,opt,name=enum,proto3,oneof"`
}
func (*MapExpr_By) isMapExpr_Expr() {}
func (*MapExpr_Message) isMapExpr_Expr() {}
func (*MapExpr_Enum) isMapExpr_Expr() {}
// Iterator represents iterator variable.
type Iterator struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// variable name.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// src the value that will be the source for creating the iterator.
// src must be a repeated type.
Src string `protobuf:"bytes,2,opt,name=src,proto3" json:"src,omitempty"`
}
func (x *Iterator) Reset() {
*x = Iterator{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[17]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Iterator) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Iterator) ProtoMessage() {}
func (x *Iterator) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[17]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Iterator.ProtoReflect.Descriptor instead.
func (*Iterator) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{17}
}
func (x *Iterator) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *Iterator) GetSrc() string {
if x != nil {
return x.Src
}
return ""
}
// MessageExpr represents dependent message.
type MessageExpr struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// name specify the message name by FQDN. format is `.`.
// can be omitted when referring to messages in the same package.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// args specify the parameters needed to get the message. This is called the "message arguments".
Args []*Argument `protobuf:"bytes,2,rep,name=args,proto3" json:"args,omitempty"`
}
func (x *MessageExpr) Reset() {
*x = MessageExpr{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[18]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *MessageExpr) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*MessageExpr) ProtoMessage() {}
func (x *MessageExpr) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[18]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use MessageExpr.ProtoReflect.Descriptor instead.
func (*MessageExpr) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{18}
}
func (x *MessageExpr) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *MessageExpr) GetArgs() []*Argument {
if x != nil {
return x.Args
}
return nil
}
// EnumExpr represents dependent enum.
type EnumExpr struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// name specify the enum name by FQDN. format is `.`.
// can be omitted when referring to enum in the same package.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// `by` evaluates with CEL.
By string `protobuf:"bytes,2,opt,name=by,proto3" json:"by,omitempty"`
}
func (x *EnumExpr) Reset() {
*x = EnumExpr{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[19]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *EnumExpr) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*EnumExpr) ProtoMessage() {}
func (x *EnumExpr) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[19]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use EnumExpr.ProtoReflect.Descriptor instead.
func (*EnumExpr) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{19}
}
func (x *EnumExpr) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *EnumExpr) GetBy() string {
if x != nil {
return x.By
}
return ""
}
// CallExpr represents how to call gRPC method.
type CallExpr struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// method specify the FQDN for the gRPC method. format is `./`.
Method string `protobuf:"bytes,1,opt,name=method,proto3" json:"method,omitempty"`
// request specify request parameters for the gRPC method.
Request []*MethodRequest `protobuf:"bytes,2,rep,name=request,proto3" json:"request,omitempty"`
// the time to timeout. If the specified time period elapses, DEADLINE_EXCEEDED status is returned.
// If you want to handle this error, you need to implement a custom error handler in Go.
// The format is the same as Go's time.Duration format. See https://pkg.go.dev/time#ParseDuration.
Timeout *string `protobuf:"bytes,3,opt,name=timeout,proto3,oneof" json:"timeout,omitempty"`
// retry specifies the retry policy if the method call fails.
Retry *RetryPolicy `protobuf:"bytes,4,opt,name=retry,proto3,oneof" json:"retry,omitempty"`
// error evaluated when an error occurs during a method call.
// Multiple errors can be defined and are evaluated in the order in which they are described.
// If an error occurs while creating an gRPC status error, original error will be returned.
Error []*GRPCError `protobuf:"bytes,5,rep,name=error,proto3" json:"error,omitempty"`
// option is the gRPC's call option (https://pkg.go.dev/google.golang.org/grpc#CallOption).
Option *GRPCCallOption `protobuf:"bytes,6,opt,name=option,proto3,oneof" json:"option,omitempty"`
// metadata specify outgoing metadata with CEL value.
// The specified type must always be of type map.
Metadata *string `protobuf:"bytes,7,opt,name=metadata,proto3,oneof" json:"metadata,omitempty"`
}
func (x *CallExpr) Reset() {
*x = CallExpr{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[20]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *CallExpr) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CallExpr) ProtoMessage() {}
func (x *CallExpr) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[20]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use CallExpr.ProtoReflect.Descriptor instead.
func (*CallExpr) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{20}
}
func (x *CallExpr) GetMethod() string {
if x != nil {
return x.Method
}
return ""
}
func (x *CallExpr) GetRequest() []*MethodRequest {
if x != nil {
return x.Request
}
return nil
}
func (x *CallExpr) GetTimeout() string {
if x != nil && x.Timeout != nil {
return *x.Timeout
}
return ""
}
func (x *CallExpr) GetRetry() *RetryPolicy {
if x != nil {
return x.Retry
}
return nil
}
func (x *CallExpr) GetError() []*GRPCError {
if x != nil {
return x.Error
}
return nil
}
func (x *CallExpr) GetOption() *GRPCCallOption {
if x != nil {
return x.Option
}
return nil
}
func (x *CallExpr) GetMetadata() string {
if x != nil && x.Metadata != nil {
return *x.Metadata
}
return ""
}
// SwitchExpr represents a switch statement. At least one "case", and "default", must be defined. All
// case.if expressions must evaluate to a boolean value. All case.by expressions, and default.by, must
// evaluate to the same type (the return type of the switch).
//
// When executed, the case.if expressions are evaluated in order, and, for the first case whose
// case.if expression evaluates to true, its case.by is evaluated to make the return value of the
// SwitchExpr.
// If no case.if evaluates to true, default.by is evaluated to make the return value.
type SwitchExpr struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Cases for the switch expression.
Case []*SwitchCaseExpr `protobuf:"bytes,1,rep,name=case,proto3" json:"case,omitempty"`
// The default case, if none of the "case.if" expressions evaluate to true.
Default *SwitchDefaultExpr `protobuf:"bytes,2,opt,name=default,proto3" json:"default,omitempty"`
}
func (x *SwitchExpr) Reset() {
*x = SwitchExpr{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[21]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *SwitchExpr) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*SwitchExpr) ProtoMessage() {}
func (x *SwitchExpr) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[21]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use SwitchExpr.ProtoReflect.Descriptor instead.
func (*SwitchExpr) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{21}
}
func (x *SwitchExpr) GetCase() []*SwitchCaseExpr {
if x != nil {
return x.Case
}
return nil
}
func (x *SwitchExpr) GetDefault() *SwitchDefaultExpr {
if x != nil {
return x.Default
}
return nil
}
// SwitchCaseExpr represents a single case for a switch expression.
type SwitchCaseExpr struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// if specify the condition for evaluating expr.
// this value evaluated by CEL and it must return a boolean value.
If string `protobuf:"bytes,1,opt,name=if,proto3" json:"if,omitempty"`
// def define variables in current scope.
Def []*VariableDefinition `protobuf:"bytes,2,rep,name=def,proto3" json:"def,omitempty"`
// expr specify the value to return for the case.
//
// Types that are assignable to Expr:
//
// *SwitchCaseExpr_By
Expr isSwitchCaseExpr_Expr `protobuf_oneof:"expr"`
}
func (x *SwitchCaseExpr) Reset() {
*x = SwitchCaseExpr{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[22]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *SwitchCaseExpr) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*SwitchCaseExpr) ProtoMessage() {}
func (x *SwitchCaseExpr) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[22]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use SwitchCaseExpr.ProtoReflect.Descriptor instead.
func (*SwitchCaseExpr) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{22}
}
func (x *SwitchCaseExpr) GetIf() string {
if x != nil {
return x.If
}
return ""
}
func (x *SwitchCaseExpr) GetDef() []*VariableDefinition {
if x != nil {
return x.Def
}
return nil
}
func (m *SwitchCaseExpr) GetExpr() isSwitchCaseExpr_Expr {
if m != nil {
return m.Expr
}
return nil
}
func (x *SwitchCaseExpr) GetBy() string {
if x, ok := x.GetExpr().(*SwitchCaseExpr_By); ok {
return x.By
}
return ""
}
type isSwitchCaseExpr_Expr interface {
isSwitchCaseExpr_Expr()
}
type SwitchCaseExpr_By struct {
// `by` evaluates with CEL.
By string `protobuf:"bytes,11,opt,name=by,proto3,oneof"`
}
func (*SwitchCaseExpr_By) isSwitchCaseExpr_Expr() {}
// SwitchDefaultExpr represents the default case for a switch expression.
type SwitchDefaultExpr struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// def define variables in current scope.
Def []*VariableDefinition `protobuf:"bytes,1,rep,name=def,proto3" json:"def,omitempty"`
// expr specify the value to return for the default case.
//
// Types that are assignable to Expr:
//
// *SwitchDefaultExpr_By
Expr isSwitchDefaultExpr_Expr `protobuf_oneof:"expr"`
}
func (x *SwitchDefaultExpr) Reset() {
*x = SwitchDefaultExpr{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[23]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *SwitchDefaultExpr) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*SwitchDefaultExpr) ProtoMessage() {}
func (x *SwitchDefaultExpr) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[23]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use SwitchDefaultExpr.ProtoReflect.Descriptor instead.
func (*SwitchDefaultExpr) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{23}
}
func (x *SwitchDefaultExpr) GetDef() []*VariableDefinition {
if x != nil {
return x.Def
}
return nil
}
func (m *SwitchDefaultExpr) GetExpr() isSwitchDefaultExpr_Expr {
if m != nil {
return m.Expr
}
return nil
}
func (x *SwitchDefaultExpr) GetBy() string {
if x, ok := x.GetExpr().(*SwitchDefaultExpr_By); ok {
return x.By
}
return ""
}
type isSwitchDefaultExpr_Expr interface {
isSwitchDefaultExpr_Expr()
}
type SwitchDefaultExpr_By struct {
// `by` evaluates with CEL.
By string `protobuf:"bytes,11,opt,name=by,proto3,oneof"`
}
func (*SwitchDefaultExpr_By) isSwitchDefaultExpr_Expr() {}
// GRPCError create gRPC status value.
type GRPCError struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// def define variables in current scope.
Def []*VariableDefinition `protobuf:"bytes,1,rep,name=def,proto3" json:"def,omitempty"`
// if specifies condition in CEL. If the condition is true, it returns defined error information.
// If this field is omitted, it is always treated as 'true' and returns defined error information.
// The return value must always be of type boolean.
If *string `protobuf:"bytes,2,opt,name=if,proto3,oneof" json:"if,omitempty"`
// code is a gRPC status code.
Code *code.Code `protobuf:"varint,3,opt,name=code,proto3,enum=google.rpc.Code,oneof" json:"code,omitempty"`
// message is a gRPC status message.
// If omitted, the message will be auto-generated from the configurations.
Message *string `protobuf:"bytes,4,opt,name=message,proto3,oneof" json:"message,omitempty"`
// details is a list of error details.
// If returns error, the corresponding error details are set.
Details []*GRPCErrorDetail `protobuf:"bytes,5,rep,name=details,proto3" json:"details,omitempty"`
// ignore ignore the error if the condition in the "if" field is true and "ignore" field is set to true.
// When an error is ignored, the returned response is always null value.
// If you want to return a response that is not null, please use `ignore_and_response` feature.
// Therefore, `ignore` and `ignore_and_response` cannot be specified same.
Ignore *bool `protobuf:"varint,6,opt,name=ignore,proto3,oneof" json:"ignore,omitempty"`
// ignore_and_response ignore the error if the condition in the "if" field is true and it returns response specified in CEL.
// The evaluation value of CEL must always be the same as the response message type.
// `ignore` and `ignore_and_response` cannot be specified same.
IgnoreAndResponse *string `protobuf:"bytes,7,opt,name=ignore_and_response,json=ignoreAndResponse,proto3,oneof" json:"ignore_and_response,omitempty"`
// log_level can be configured to output logs as any log level.
// If DEBUG is specified for the log_level, logs are output as debug logs.
// default value is ERROR.
LogLevel *GRPCError_LogLevel `protobuf:"varint,8,opt,name=log_level,json=logLevel,proto3,enum=grpc.federation.GRPCError_LogLevel,oneof" json:"log_level,omitempty"`
}
func (x *GRPCError) Reset() {
*x = GRPCError{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[24]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GRPCError) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GRPCError) ProtoMessage() {}
func (x *GRPCError) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[24]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GRPCError.ProtoReflect.Descriptor instead.
func (*GRPCError) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{24}
}
func (x *GRPCError) GetDef() []*VariableDefinition {
if x != nil {
return x.Def
}
return nil
}
func (x *GRPCError) GetIf() string {
if x != nil && x.If != nil {
return *x.If
}
return ""
}
func (x *GRPCError) GetCode() code.Code {
if x != nil && x.Code != nil {
return *x.Code
}
return code.Code(0)
}
func (x *GRPCError) GetMessage() string {
if x != nil && x.Message != nil {
return *x.Message
}
return ""
}
func (x *GRPCError) GetDetails() []*GRPCErrorDetail {
if x != nil {
return x.Details
}
return nil
}
func (x *GRPCError) GetIgnore() bool {
if x != nil && x.Ignore != nil {
return *x.Ignore
}
return false
}
func (x *GRPCError) GetIgnoreAndResponse() string {
if x != nil && x.IgnoreAndResponse != nil {
return *x.IgnoreAndResponse
}
return ""
}
func (x *GRPCError) GetLogLevel() GRPCError_LogLevel {
if x != nil && x.LogLevel != nil {
return *x.LogLevel
}
return GRPCError_UNKNOWN
}
type GRPCErrorDetail struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// if specifies condition rule in CEL. If the condition is true, gRPC error detail is added to the error.
If string `protobuf:"bytes,1,opt,name=if,proto3" json:"if,omitempty"`
// def define variables in current scope.
Def []*VariableDefinition `protobuf:"bytes,2,rep,name=def,proto3" json:"def,omitempty"`
// message represents arbitrary messages to describe the detail of the error.
Message []*MessageExpr `protobuf:"bytes,3,rep,name=message,proto3" json:"message,omitempty"`
// error_info describes the cause of the error with structured details.
ErrorInfo []*errdetails.ErrorInfo `protobuf:"bytes,4,rep,name=error_info,json=errorInfo,proto3" json:"error_info,omitempty"`
// retry_info describes when the clients can retry a failed request.
RetryInfo []*errdetails.RetryInfo `protobuf:"bytes,5,rep,name=retry_info,json=retryInfo,proto3" json:"retry_info,omitempty"`
// debug_info describes additional debugging info.
DebugInfo []*errdetails.DebugInfo `protobuf:"bytes,6,rep,name=debug_info,json=debugInfo,proto3" json:"debug_info,omitempty"`
// quota_failure describes how a quota check failed.
QuotaFailure []*errdetails.QuotaFailure `protobuf:"bytes,7,rep,name=quota_failure,json=quotaFailure,proto3" json:"quota_failure,omitempty"`
// precondition_failure describes what preconditions have failed.
PreconditionFailure []*errdetails.PreconditionFailure `protobuf:"bytes,8,rep,name=precondition_failure,json=preconditionFailure,proto3" json:"precondition_failure,omitempty"`
// bad_request describes violations in a client request.
BadRequest []*errdetails.BadRequest `protobuf:"bytes,9,rep,name=bad_request,json=badRequest,proto3" json:"bad_request,omitempty"`
// request_info contains metadata about the request that clients can attach.
RequestInfo []*errdetails.RequestInfo `protobuf:"bytes,10,rep,name=request_info,json=requestInfo,proto3" json:"request_info,omitempty"`
// resource_info describes the resource that is being accessed.
ResourceInfo []*errdetails.ResourceInfo `protobuf:"bytes,11,rep,name=resource_info,json=resourceInfo,proto3" json:"resource_info,omitempty"`
// help provides links to documentation or for performing an out of band action.
Help []*errdetails.Help `protobuf:"bytes,12,rep,name=help,proto3" json:"help,omitempty"`
// localized_message provides a localized error message that is safe to return to the user.
LocalizedMessage []*errdetails.LocalizedMessage `protobuf:"bytes,13,rep,name=localized_message,json=localizedMessage,proto3" json:"localized_message,omitempty"`
// by specify a message in CEL to express the details of the error.
By []string `protobuf:"bytes,14,rep,name=by,proto3" json:"by,omitempty"`
}
func (x *GRPCErrorDetail) Reset() {
*x = GRPCErrorDetail{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[25]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GRPCErrorDetail) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GRPCErrorDetail) ProtoMessage() {}
func (x *GRPCErrorDetail) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[25]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GRPCErrorDetail.ProtoReflect.Descriptor instead.
func (*GRPCErrorDetail) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{25}
}
func (x *GRPCErrorDetail) GetIf() string {
if x != nil {
return x.If
}
return ""
}
func (x *GRPCErrorDetail) GetDef() []*VariableDefinition {
if x != nil {
return x.Def
}
return nil
}
func (x *GRPCErrorDetail) GetMessage() []*MessageExpr {
if x != nil {
return x.Message
}
return nil
}
func (x *GRPCErrorDetail) GetErrorInfo() []*errdetails.ErrorInfo {
if x != nil {
return x.ErrorInfo
}
return nil
}
func (x *GRPCErrorDetail) GetRetryInfo() []*errdetails.RetryInfo {
if x != nil {
return x.RetryInfo
}
return nil
}
func (x *GRPCErrorDetail) GetDebugInfo() []*errdetails.DebugInfo {
if x != nil {
return x.DebugInfo
}
return nil
}
func (x *GRPCErrorDetail) GetQuotaFailure() []*errdetails.QuotaFailure {
if x != nil {
return x.QuotaFailure
}
return nil
}
func (x *GRPCErrorDetail) GetPreconditionFailure() []*errdetails.PreconditionFailure {
if x != nil {
return x.PreconditionFailure
}
return nil
}
func (x *GRPCErrorDetail) GetBadRequest() []*errdetails.BadRequest {
if x != nil {
return x.BadRequest
}
return nil
}
func (x *GRPCErrorDetail) GetRequestInfo() []*errdetails.RequestInfo {
if x != nil {
return x.RequestInfo
}
return nil
}
func (x *GRPCErrorDetail) GetResourceInfo() []*errdetails.ResourceInfo {
if x != nil {
return x.ResourceInfo
}
return nil
}
func (x *GRPCErrorDetail) GetHelp() []*errdetails.Help {
if x != nil {
return x.Help
}
return nil
}
func (x *GRPCErrorDetail) GetLocalizedMessage() []*errdetails.LocalizedMessage {
if x != nil {
return x.LocalizedMessage
}
return nil
}
func (x *GRPCErrorDetail) GetBy() []string {
if x != nil {
return x.By
}
return nil
}
// GRPCCallOption configures a gRPC Call before it starts or extracts information from a gRPC Call after it completes.
type GRPCCallOption struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// set the content-subtype. For example, if content-subtype is "json", the Content-Type over the wire will be "application/grpc+json".
// The content-subtype is converted to lowercase before being included in Content-Type.
// See Content-Type on https://github.com/grpc/grpc/blob/master/doc/PROTOCOL-HTTP2.md#requests for more details.
// If no such codec is found, the call will result in an error with code INTERNAL.
ContentSubtype *string `protobuf:"bytes,1,opt,name=content_subtype,json=contentSubtype,proto3,oneof" json:"content_subtype,omitempty"`
// header retrieves the header metadata for a unary RPC.
// In order to obtain the metadata, you must specify a variable of type map in the header.
// e.g.)
// def [
//
// { name: "hdr" by: "grpc.federation.metadata.new()" }
// { call { method: "pkg.Method" option { header: "hdr" } } }
//
// ]
Header *string `protobuf:"bytes,2,opt,name=header,proto3,oneof" json:"header,omitempty"`
// max_call_recv_msg_size sets the maximum message size in bytes the client can receive.
// If this is not set, gRPC uses the default 4MB.
MaxCallRecvMsgSize *int64 `protobuf:"varint,3,opt,name=max_call_recv_msg_size,json=maxCallRecvMsgSize,proto3,oneof" json:"max_call_recv_msg_size,omitempty"`
// max_call_send_msg_size sets the maximum message size in bytes the client can send.
// If this is not set, gRPC uses the default maximum number of int32 range.
MaxCallSendMsgSize *int64 `protobuf:"varint,4,opt,name=max_call_send_msg_size,json=maxCallSendMsgSize,proto3,oneof" json:"max_call_send_msg_size,omitempty"`
// static_method specifies that a call is being made to a method that is static,
// which means the method is known at compile time and doesn't change at runtime.
// This can be used as a signal to stats plugins that this method is safe to include as a key to a measurement.
StaticMethod *bool `protobuf:"varint,5,opt,name=static_method,json=staticMethod,proto3,oneof" json:"static_method,omitempty"`
// trailer retrieves the trailer metadata for a unary RPC.
// In order to obtain the metadata, you must specify a variable of type map in the trailer.
// e.g.)
// def [
//
// { name: "trl" by: "grpc.federation.metadata.new()" }
// { call { method: "pkg.Method" option { trailer: "trl" } } }
//
// ]
Trailer *string `protobuf:"bytes,6,opt,name=trailer,proto3,oneof" json:"trailer,omitempty"`
// wait_for_ready configures the RPC's behavior when the client is in TRANSIENT_FAILURE,
// which occurs when all addresses fail to connect.
// If wait_for_ready is false, the RPC will fail immediately.
// Otherwise, the client will wait until a connection becomes available or the RPC's deadline is reached.
// By default, RPCs do not "wait for ready".
WaitForReady *bool `protobuf:"varint,7,opt,name=wait_for_ready,json=waitForReady,proto3,oneof" json:"wait_for_ready,omitempty"`
}
func (x *GRPCCallOption) Reset() {
*x = GRPCCallOption{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[26]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GRPCCallOption) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GRPCCallOption) ProtoMessage() {}
func (x *GRPCCallOption) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[26]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GRPCCallOption.ProtoReflect.Descriptor instead.
func (*GRPCCallOption) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{26}
}
func (x *GRPCCallOption) GetContentSubtype() string {
if x != nil && x.ContentSubtype != nil {
return *x.ContentSubtype
}
return ""
}
func (x *GRPCCallOption) GetHeader() string {
if x != nil && x.Header != nil {
return *x.Header
}
return ""
}
func (x *GRPCCallOption) GetMaxCallRecvMsgSize() int64 {
if x != nil && x.MaxCallRecvMsgSize != nil {
return *x.MaxCallRecvMsgSize
}
return 0
}
func (x *GRPCCallOption) GetMaxCallSendMsgSize() int64 {
if x != nil && x.MaxCallSendMsgSize != nil {
return *x.MaxCallSendMsgSize
}
return 0
}
func (x *GRPCCallOption) GetStaticMethod() bool {
if x != nil && x.StaticMethod != nil {
return *x.StaticMethod
}
return false
}
func (x *GRPCCallOption) GetTrailer() string {
if x != nil && x.Trailer != nil {
return *x.Trailer
}
return ""
}
func (x *GRPCCallOption) GetWaitForReady() bool {
if x != nil && x.WaitForReady != nil {
return *x.WaitForReady
}
return false
}
// Validation represents a validation rule against variables defined within the current scope.
type ValidationExpr struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// name is a unique name for the validation.
// If set, the validation error type will be Error.
// If omitted, the validation error type will be ValidationError.
Name *string `protobuf:"bytes,1,opt,name=name,proto3,oneof" json:"name,omitempty"`
// error defines the actual validation rules and an error to returned if the validation fails.
Error *GRPCError `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"`
}
func (x *ValidationExpr) Reset() {
*x = ValidationExpr{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[27]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ValidationExpr) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ValidationExpr) ProtoMessage() {}
func (x *ValidationExpr) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[27]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ValidationExpr.ProtoReflect.Descriptor instead.
func (*ValidationExpr) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{27}
}
func (x *ValidationExpr) GetName() string {
if x != nil && x.Name != nil {
return *x.Name
}
return ""
}
func (x *ValidationExpr) GetError() *GRPCError {
if x != nil {
return x.Error
}
return nil
}
// RetryPolicy define the retry policy if the method call fails.
type RetryPolicy struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Types that are assignable to Policy:
//
// *RetryPolicy_Constant
// *RetryPolicy_Exponential
Policy isRetryPolicy_Policy `protobuf_oneof:"policy"`
// if specifies condition in CEL. If the condition is true, run the retry process according to the policy.
// If this field is omitted, it is always treated as 'true' and run the retry process.
// The return value must always be of type boolean.
If string `protobuf:"bytes,3,opt,name=if,proto3" json:"if,omitempty"`
}
func (x *RetryPolicy) Reset() {
*x = RetryPolicy{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[28]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *RetryPolicy) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*RetryPolicy) ProtoMessage() {}
func (x *RetryPolicy) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[28]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use RetryPolicy.ProtoReflect.Descriptor instead.
func (*RetryPolicy) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{28}
}
func (m *RetryPolicy) GetPolicy() isRetryPolicy_Policy {
if m != nil {
return m.Policy
}
return nil
}
func (x *RetryPolicy) GetConstant() *RetryPolicyConstant {
if x, ok := x.GetPolicy().(*RetryPolicy_Constant); ok {
return x.Constant
}
return nil
}
func (x *RetryPolicy) GetExponential() *RetryPolicyExponential {
if x, ok := x.GetPolicy().(*RetryPolicy_Exponential); ok {
return x.Exponential
}
return nil
}
func (x *RetryPolicy) GetIf() string {
if x != nil {
return x.If
}
return ""
}
type isRetryPolicy_Policy interface {
isRetryPolicy_Policy()
}
type RetryPolicy_Constant struct {
// retry according to the "constant" policy.
Constant *RetryPolicyConstant `protobuf:"bytes,1,opt,name=constant,proto3,oneof"`
}
type RetryPolicy_Exponential struct {
// retry according to the "exponential backoff" policy.
// The following Go library is used in the implementation,
// so please refer to the library documentation for how to specify each parameter.
// https://pkg.go.dev/github.com/cenkalti/backoff/v4#section-readme.
Exponential *RetryPolicyExponential `protobuf:"bytes,2,opt,name=exponential,proto3,oneof"`
}
func (*RetryPolicy_Constant) isRetryPolicy_Policy() {}
func (*RetryPolicy_Exponential) isRetryPolicy_Policy() {}
// RetryPolicyConstant define "constant" based retry policy.
type RetryPolicyConstant struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// interval value. ( default value is 1s ).
Interval *string `protobuf:"bytes,1,opt,name=interval,proto3,oneof" json:"interval,omitempty"`
// max retry count. ( default value is 5. If zero is specified, it never stops )
MaxRetries *uint64 `protobuf:"varint,2,opt,name=max_retries,json=maxRetries,proto3,oneof" json:"max_retries,omitempty"`
}
func (x *RetryPolicyConstant) Reset() {
*x = RetryPolicyConstant{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[29]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *RetryPolicyConstant) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*RetryPolicyConstant) ProtoMessage() {}
func (x *RetryPolicyConstant) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[29]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use RetryPolicyConstant.ProtoReflect.Descriptor instead.
func (*RetryPolicyConstant) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{29}
}
func (x *RetryPolicyConstant) GetInterval() string {
if x != nil && x.Interval != nil {
return *x.Interval
}
return ""
}
func (x *RetryPolicyConstant) GetMaxRetries() uint64 {
if x != nil && x.MaxRetries != nil {
return *x.MaxRetries
}
return 0
}
// RetryPolicyExponential define "exponential backoff" based retry policy.
type RetryPolicyExponential struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// initial interval value. ( default value is "500ms" ).
InitialInterval *string `protobuf:"bytes,1,opt,name=initial_interval,json=initialInterval,proto3,oneof" json:"initial_interval,omitempty"`
// randomization factor value. ( default value is 0.5 ).
RandomizationFactor *float64 `protobuf:"fixed64,2,opt,name=randomization_factor,json=randomizationFactor,proto3,oneof" json:"randomization_factor,omitempty"`
// multiplier. ( default value is 1.5 ).
Multiplier *float64 `protobuf:"fixed64,3,opt,name=multiplier,proto3,oneof" json:"multiplier,omitempty"`
// max interval value. ( default value is "60s" ).
MaxInterval *string `protobuf:"bytes,4,opt,name=max_interval,json=maxInterval,proto3,oneof" json:"max_interval,omitempty"`
// max retry count. ( default value is 5. If zero is specified, it never stops ).
MaxRetries *uint64 `protobuf:"varint,5,opt,name=max_retries,json=maxRetries,proto3,oneof" json:"max_retries,omitempty"`
}
func (x *RetryPolicyExponential) Reset() {
*x = RetryPolicyExponential{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[30]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *RetryPolicyExponential) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*RetryPolicyExponential) ProtoMessage() {}
func (x *RetryPolicyExponential) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[30]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use RetryPolicyExponential.ProtoReflect.Descriptor instead.
func (*RetryPolicyExponential) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{30}
}
func (x *RetryPolicyExponential) GetInitialInterval() string {
if x != nil && x.InitialInterval != nil {
return *x.InitialInterval
}
return ""
}
func (x *RetryPolicyExponential) GetRandomizationFactor() float64 {
if x != nil && x.RandomizationFactor != nil {
return *x.RandomizationFactor
}
return 0
}
func (x *RetryPolicyExponential) GetMultiplier() float64 {
if x != nil && x.Multiplier != nil {
return *x.Multiplier
}
return 0
}
func (x *RetryPolicyExponential) GetMaxInterval() string {
if x != nil && x.MaxInterval != nil {
return *x.MaxInterval
}
return ""
}
func (x *RetryPolicyExponential) GetMaxRetries() uint64 {
if x != nil && x.MaxRetries != nil {
return *x.MaxRetries
}
return 0
}
// MethodRequest define parameters to be used for gRPC method request.
type MethodRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// field name of the request message.
Field string `protobuf:"bytes,1,opt,name=field,proto3" json:"field,omitempty"`
// by used to refer to a name or message argument defined in a MessageRule, use `$.` to refer to the message argument.
// Use CEL (https://github.com/google/cel-spec) to evaluate the expression.
// Variables are already defined in MessageRule can be used.
By *string `protobuf:"bytes,2,opt,name=by,proto3,oneof" json:"by,omitempty"`
// if describes the condition to be assigned to field.
// The return value must be of type bool.
// Use CEL (https://github.com/google/cel-spec) to evaluate the expression.
// Variables are already defined in MessageRule can be used.
// If the field is a 'oneof' field, it must be specified.
If *string `protobuf:"bytes,3,opt,name=if,proto3,oneof" json:"if,omitempty"`
}
func (x *MethodRequest) Reset() {
*x = MethodRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[31]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *MethodRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*MethodRequest) ProtoMessage() {}
func (x *MethodRequest) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[31]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use MethodRequest.ProtoReflect.Descriptor instead.
func (*MethodRequest) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{31}
}
func (x *MethodRequest) GetField() string {
if x != nil {
return x.Field
}
return ""
}
func (x *MethodRequest) GetBy() string {
if x != nil && x.By != nil {
return *x.By
}
return ""
}
func (x *MethodRequest) GetIf() string {
if x != nil && x.If != nil {
return *x.If
}
return ""
}
// MethodResponse define which value of the method response is referenced.
type MethodResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// name specify the unique name that can be used in a `MessageRule` / `FieldRule` for the same message for a specific field in the response.
Name *string `protobuf:"bytes,1,opt,name=name,proto3,oneof" json:"name,omitempty"`
// field name in response message.
Field *string `protobuf:"bytes,2,opt,name=field,proto3,oneof" json:"field,omitempty"`
// autobind if the value referenced by `field` is a message type,
// the value of a field with the same name and type as the field name of its own message is automatically assigned to the value of the field in the message.
// If multiple autobinds are used at the same message,
// you must explicitly use the `grpc.federation.field` option to do the binding yourself, since duplicate field names cannot be correctly determined as one.
Autobind *bool `protobuf:"varint,3,opt,name=autobind,proto3,oneof" json:"autobind,omitempty"`
}
func (x *MethodResponse) Reset() {
*x = MethodResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[32]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *MethodResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*MethodResponse) ProtoMessage() {}
func (x *MethodResponse) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[32]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use MethodResponse.ProtoReflect.Descriptor instead.
func (*MethodResponse) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{32}
}
func (x *MethodResponse) GetName() string {
if x != nil && x.Name != nil {
return *x.Name
}
return ""
}
func (x *MethodResponse) GetField() string {
if x != nil && x.Field != nil {
return *x.Field
}
return ""
}
func (x *MethodResponse) GetAutobind() bool {
if x != nil && x.Autobind != nil {
return *x.Autobind
}
return false
}
// Argument define message argument.
type Argument struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// name of the message argument.
// Use this name to refer to the message argument.
// For example, if `foo` is specified as the name, it is referenced by `$.foo`.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// by used to refer to a name or message argument defined in a MessageRule, use `$.` to refer to the message argument.
// Use CEL (https://github.com/google/cel-spec) to evaluate the expression.
// Variables are already defined in MessageRule can be used.
By *string `protobuf:"bytes,2,opt,name=by,proto3,oneof" json:"by,omitempty"`
// inline like by, it refers to the specified value and expands all fields beyond it.
// For this reason, the referenced value must always be of message type.
Inline *string `protobuf:"bytes,3,opt,name=inline,proto3,oneof" json:"inline,omitempty"`
}
func (x *Argument) Reset() {
*x = Argument{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[33]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Argument) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Argument) ProtoMessage() {}
func (x *Argument) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[33]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Argument.ProtoReflect.Descriptor instead.
func (*Argument) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{33}
}
func (x *Argument) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *Argument) GetBy() string {
if x != nil && x.By != nil {
return *x.By
}
return ""
}
func (x *Argument) GetInline() string {
if x != nil && x.Inline != nil {
return *x.Inline
}
return ""
}
// FieldRule define gRPC Federation rules for the field of message.
type FieldRule struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// If custom_resolver is true, the field binding process is to be implemented in Go.
// If there are any values retrieved by grpc.federation.message option, they are passed as arguments for custom resolver.
CustomResolver *bool `protobuf:"varint,1,opt,name=custom_resolver,json=customResolver,proto3,oneof" json:"custom_resolver,omitempty"`
// by used to refer to a name or message argument defined in a MessageRule, use `$.` to refer to the message argument.
// Use CEL (https://github.com/google/cel-spec) to evaluate the expression.
// Variables are already defined in MessageRule can be used.
By *string `protobuf:"bytes,2,opt,name=by,proto3,oneof" json:"by,omitempty"`
// alias can be used when alias is specified in grpc.federation.message option,
// and specifies the field name to be referenced among the messages specified in alias of message option.
// If the specified field has the same type or can be converted automatically, its value is assigned.
Alias *string `protobuf:"bytes,3,opt,name=alias,proto3,oneof" json:"alias,omitempty"`
// use to evaluate any one of fields. this field only available in oneof.
Oneof *FieldOneof `protobuf:"bytes,4,opt,name=oneof,proto3" json:"oneof,omitempty"`
// when defining an environment variable, use it for fields where you want to set additional options.
Env *EnvVarOption `protobuf:"bytes,5,opt,name=env,proto3" json:"env,omitempty"`
}
func (x *FieldRule) Reset() {
*x = FieldRule{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[34]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *FieldRule) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*FieldRule) ProtoMessage() {}
func (x *FieldRule) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[34]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use FieldRule.ProtoReflect.Descriptor instead.
func (*FieldRule) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{34}
}
func (x *FieldRule) GetCustomResolver() bool {
if x != nil && x.CustomResolver != nil {
return *x.CustomResolver
}
return false
}
func (x *FieldRule) GetBy() string {
if x != nil && x.By != nil {
return *x.By
}
return ""
}
func (x *FieldRule) GetAlias() string {
if x != nil && x.Alias != nil {
return *x.Alias
}
return ""
}
func (x *FieldRule) GetOneof() *FieldOneof {
if x != nil {
return x.Oneof
}
return nil
}
func (x *FieldRule) GetEnv() *EnvVarOption {
if x != nil {
return x.Env
}
return nil
}
// FieldOneof evaluate "messages" or other field only if expr is true and assign to the oneof field.
// This feature only available in oneof.
type FieldOneof struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// cond specify either `expr` or `default`. Only one `default` can be set per oneof.
//
// Types that are assignable to Cond:
//
// *FieldOneof_If
// *FieldOneof_Default
Cond isFieldOneof_Cond `protobuf_oneof:"cond"`
// def specify variables to be used in current oneof field's scope for field binding.
Def []*VariableDefinition `protobuf:"bytes,3,rep,name=def,proto3" json:"def,omitempty"`
// by used to refer to a name or message argument defined in a MessageRule, use `$.` to refer to the message argument.
// Use CEL (https://github.com/google/cel-spec) to evaluate the expression.
// Variables are already defined in MessageRule and FieldOneOf can be used.
By string `protobuf:"bytes,4,opt,name=by,proto3" json:"by,omitempty"`
}
func (x *FieldOneof) Reset() {
*x = FieldOneof{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[35]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *FieldOneof) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*FieldOneof) ProtoMessage() {}
func (x *FieldOneof) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[35]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use FieldOneof.ProtoReflect.Descriptor instead.
func (*FieldOneof) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{35}
}
func (m *FieldOneof) GetCond() isFieldOneof_Cond {
if m != nil {
return m.Cond
}
return nil
}
func (x *FieldOneof) GetIf() string {
if x, ok := x.GetCond().(*FieldOneof_If); ok {
return x.If
}
return ""
}
func (x *FieldOneof) GetDefault() bool {
if x, ok := x.GetCond().(*FieldOneof_Default); ok {
return x.Default
}
return false
}
func (x *FieldOneof) GetDef() []*VariableDefinition {
if x != nil {
return x.Def
}
return nil
}
func (x *FieldOneof) GetBy() string {
if x != nil {
return x.By
}
return ""
}
type isFieldOneof_Cond interface {
isFieldOneof_Cond()
}
type FieldOneof_If struct {
// if describes the condition to be assigned to field.
// The return value must be of type bool.
// Use CEL (https://github.com/google/cel-spec) to evaluate the expression.
// Variables are already defined in MessageRule can be used.
If string `protobuf:"bytes,1,opt,name=if,proto3,oneof"`
}
type FieldOneof_Default struct {
// default used to assign a value when none of the other fields match any of the specified expressions.
// Only one value can be defined per oneof.
Default bool `protobuf:"varint,2,opt,name=default,proto3,oneof"`
}
func (*FieldOneof_If) isFieldOneof_Cond() {}
func (*FieldOneof_Default) isFieldOneof_Cond() {}
// CELPlugin define schema of CEL plugin.
type CELPlugin struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Export []*CELPluginExport `protobuf:"bytes,1,rep,name=export,proto3" json:"export,omitempty"`
}
func (x *CELPlugin) Reset() {
*x = CELPlugin{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[36]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *CELPlugin) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CELPlugin) ProtoMessage() {}
func (x *CELPlugin) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[36]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use CELPlugin.ProtoReflect.Descriptor instead.
func (*CELPlugin) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{36}
}
func (x *CELPlugin) GetExport() []*CELPluginExport {
if x != nil {
return x.Export
}
return nil
}
// CELPluginExport describe the schema to be exposed as a CEL plugin.
type CELPluginExport struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// name is the plugin name.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// desc is the description of plugin.
// This description is used as documentation at code generation.
Desc string `protobuf:"bytes,2,opt,name=desc,proto3" json:"desc,omitempty"`
// types describe the message type you want to expose.
Types []*CELReceiverType `protobuf:"bytes,3,rep,name=types,proto3" json:"types,omitempty"`
// functions describe the definition of the function you want to expose.
Functions []*CELFunction `protobuf:"bytes,4,rep,name=functions,proto3" json:"functions,omitempty"`
// variables describe the definition of the variable you want to expose.
Variables []*CELVariable `protobuf:"bytes,5,rep,name=variables,proto3" json:"variables,omitempty"`
Capability *CELPluginCapability `protobuf:"bytes,6,opt,name=capability,proto3" json:"capability,omitempty"`
}
func (x *CELPluginExport) Reset() {
*x = CELPluginExport{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[37]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *CELPluginExport) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CELPluginExport) ProtoMessage() {}
func (x *CELPluginExport) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[37]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use CELPluginExport.ProtoReflect.Descriptor instead.
func (*CELPluginExport) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{37}
}
func (x *CELPluginExport) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *CELPluginExport) GetDesc() string {
if x != nil {
return x.Desc
}
return ""
}
func (x *CELPluginExport) GetTypes() []*CELReceiverType {
if x != nil {
return x.Types
}
return nil
}
func (x *CELPluginExport) GetFunctions() []*CELFunction {
if x != nil {
return x.Functions
}
return nil
}
func (x *CELPluginExport) GetVariables() []*CELVariable {
if x != nil {
return x.Variables
}
return nil
}
func (x *CELPluginExport) GetCapability() *CELPluginCapability {
if x != nil {
return x.Capability
}
return nil
}
// CELPluginCapability controls the permissions granted to the WebAssembly plugin.
type CELPluginCapability struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// env is the capability for environment variable.
Env *CELPluginEnvCapability `protobuf:"bytes,1,opt,name=env,proto3,oneof" json:"env,omitempty"`
// file_system is the capability for file system.
FileSystem *CELPluginFileSystemCapability `protobuf:"bytes,2,opt,name=file_system,json=fileSystem,proto3,oneof" json:"file_system,omitempty"`
// network is the capability for network.
Network *CELPluginNetworkCapability `protobuf:"bytes,3,opt,name=network,proto3,oneof" json:"network,omitempty"`
}
func (x *CELPluginCapability) Reset() {
*x = CELPluginCapability{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[38]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *CELPluginCapability) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CELPluginCapability) ProtoMessage() {}
func (x *CELPluginCapability) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[38]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use CELPluginCapability.ProtoReflect.Descriptor instead.
func (*CELPluginCapability) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{38}
}
func (x *CELPluginCapability) GetEnv() *CELPluginEnvCapability {
if x != nil {
return x.Env
}
return nil
}
func (x *CELPluginCapability) GetFileSystem() *CELPluginFileSystemCapability {
if x != nil {
return x.FileSystem
}
return nil
}
func (x *CELPluginCapability) GetNetwork() *CELPluginNetworkCapability {
if x != nil {
return x.Network
}
return nil
}
// CELPluginEnvCapability controls access to the environment variable.
type CELPluginEnvCapability struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// all allows access to all environment variables.
All bool `protobuf:"varint,1,opt,name=all,proto3" json:"all,omitempty"`
// specifies accessible names. If "all" is true, it takes precedence.
Names []string `protobuf:"bytes,2,rep,name=names,proto3" json:"names,omitempty"`
}
func (x *CELPluginEnvCapability) Reset() {
*x = CELPluginEnvCapability{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[39]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *CELPluginEnvCapability) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CELPluginEnvCapability) ProtoMessage() {}
func (x *CELPluginEnvCapability) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[39]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use CELPluginEnvCapability.ProtoReflect.Descriptor instead.
func (*CELPluginEnvCapability) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{39}
}
func (x *CELPluginEnvCapability) GetAll() bool {
if x != nil {
return x.All
}
return false
}
func (x *CELPluginEnvCapability) GetNames() []string {
if x != nil {
return x.Names
}
return nil
}
// CELPluginFileSystemCapability controls access to the file system.
type CELPluginFileSystemCapability struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// mount_path specifies the file path of the host to mount.
// If not specified, the root directory will be used.
MountPath string `protobuf:"bytes,1,opt,name=mount_path,json=mountPath,proto3" json:"mount_path,omitempty"`
}
func (x *CELPluginFileSystemCapability) Reset() {
*x = CELPluginFileSystemCapability{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[40]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *CELPluginFileSystemCapability) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CELPluginFileSystemCapability) ProtoMessage() {}
func (x *CELPluginFileSystemCapability) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[40]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use CELPluginFileSystemCapability.ProtoReflect.Descriptor instead.
func (*CELPluginFileSystemCapability) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{40}
}
func (x *CELPluginFileSystemCapability) GetMountPath() string {
if x != nil {
return x.MountPath
}
return ""
}
// CELPluginNetworkCapability sets permissions related to network access.
// This is an experimental feature.
type CELPluginNetworkCapability struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
}
func (x *CELPluginNetworkCapability) Reset() {
*x = CELPluginNetworkCapability{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[41]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *CELPluginNetworkCapability) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CELPluginNetworkCapability) ProtoMessage() {}
func (x *CELPluginNetworkCapability) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[41]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use CELPluginNetworkCapability.ProtoReflect.Descriptor instead.
func (*CELPluginNetworkCapability) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{41}
}
// CELFunction represents the CEL function definition.
type CELFunction struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// name is the function name.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// desc is the description of function.
// This description is used as documentation at code generation.
Desc string `protobuf:"bytes,2,opt,name=desc,proto3" json:"desc,omitempty"`
// args describe the definition of the function argument.
Args []*CELFunctionArgument `protobuf:"bytes,3,rep,name=args,proto3" json:"args,omitempty"`
// return describe the definition of return type of function.
Return *CELType `protobuf:"bytes,4,opt,name=return,proto3" json:"return,omitempty"`
}
func (x *CELFunction) Reset() {
*x = CELFunction{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[42]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *CELFunction) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CELFunction) ProtoMessage() {}
func (x *CELFunction) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[42]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use CELFunction.ProtoReflect.Descriptor instead.
func (*CELFunction) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{42}
}
func (x *CELFunction) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *CELFunction) GetDesc() string {
if x != nil {
return x.Desc
}
return ""
}
func (x *CELFunction) GetArgs() []*CELFunctionArgument {
if x != nil {
return x.Args
}
return nil
}
func (x *CELFunction) GetReturn() *CELType {
if x != nil {
return x.Return
}
return nil
}
// CELReceiverType represents methods tied to the message.
type CELReceiverType struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// name is the message name.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// desc is the description of plugin.
// This description is used as documentation at code generation.
Desc string `protobuf:"bytes,2,opt,name=desc,proto3" json:"desc,omitempty"`
// methods describe the definition of the method for the message.
Methods []*CELFunction `protobuf:"bytes,3,rep,name=methods,proto3" json:"methods,omitempty"`
}
func (x *CELReceiverType) Reset() {
*x = CELReceiverType{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[43]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *CELReceiverType) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CELReceiverType) ProtoMessage() {}
func (x *CELReceiverType) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[43]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use CELReceiverType.ProtoReflect.Descriptor instead.
func (*CELReceiverType) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{43}
}
func (x *CELReceiverType) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *CELReceiverType) GetDesc() string {
if x != nil {
return x.Desc
}
return ""
}
func (x *CELReceiverType) GetMethods() []*CELFunction {
if x != nil {
return x.Methods
}
return nil
}
// CELFunctionArgument represents the function argument.
type CELFunctionArgument struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// name is the argument value name.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// desc is the description of plugin.
// This description is used as documentation at code generation.
Desc string `protobuf:"bytes,2,opt,name=desc,proto3" json:"desc,omitempty"`
// type is the argument type.
Type *CELType `protobuf:"bytes,3,opt,name=type,proto3" json:"type,omitempty"`
}
func (x *CELFunctionArgument) Reset() {
*x = CELFunctionArgument{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[44]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *CELFunctionArgument) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CELFunctionArgument) ProtoMessage() {}
func (x *CELFunctionArgument) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[44]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use CELFunctionArgument.ProtoReflect.Descriptor instead.
func (*CELFunctionArgument) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{44}
}
func (x *CELFunctionArgument) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *CELFunctionArgument) GetDesc() string {
if x != nil {
return x.Desc
}
return ""
}
func (x *CELFunctionArgument) GetType() *CELType {
if x != nil {
return x.Type
}
return nil
}
// CELType represents type information for CEL plugin interface.
type CELType struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Types that are assignable to Type:
//
// *CELType_Kind
// *CELType_Repeated
// *CELType_Map
// *CELType_Message
// *CELType_Enum
Type isCELType_Type `protobuf_oneof:"type"`
}
func (x *CELType) Reset() {
*x = CELType{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[45]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *CELType) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CELType) ProtoMessage() {}
func (x *CELType) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[45]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use CELType.ProtoReflect.Descriptor instead.
func (*CELType) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{45}
}
func (m *CELType) GetType() isCELType_Type {
if m != nil {
return m.Type
}
return nil
}
func (x *CELType) GetKind() TypeKind {
if x, ok := x.GetType().(*CELType_Kind); ok {
return x.Kind
}
return TypeKind_UNKNOWN
}
func (x *CELType) GetRepeated() *CELType {
if x, ok := x.GetType().(*CELType_Repeated); ok {
return x.Repeated
}
return nil
}
func (x *CELType) GetMap() *CELMapType {
if x, ok := x.GetType().(*CELType_Map); ok {
return x.Map
}
return nil
}
func (x *CELType) GetMessage() string {
if x, ok := x.GetType().(*CELType_Message); ok {
return x.Message
}
return ""
}
func (x *CELType) GetEnum() string {
if x, ok := x.GetType().(*CELType_Enum); ok {
return x.Enum
}
return ""
}
type isCELType_Type interface {
isCELType_Type()
}
type CELType_Kind struct {
// kind is used when the type is a primitive type.
Kind TypeKind `protobuf:"varint,1,opt,name=kind,proto3,enum=grpc.federation.TypeKind,oneof"`
}
type CELType_Repeated struct {
// repeated is used when the type is a repeated type.
Repeated *CELType `protobuf:"bytes,2,opt,name=repeated,proto3,oneof"`
}
type CELType_Map struct {
// map is used when the type is a map type.
Map *CELMapType `protobuf:"bytes,3,opt,name=map,proto3,oneof"`
}
type CELType_Message struct {
// message is a fqdn to the message type.
Message string `protobuf:"bytes,4,opt,name=message,proto3,oneof"`
}
type CELType_Enum struct {
// enum is a fqdn to the enum type.
Enum string `protobuf:"bytes,5,opt,name=enum,proto3,oneof"`
}
func (*CELType_Kind) isCELType_Type() {}
func (*CELType_Repeated) isCELType_Type() {}
func (*CELType_Map) isCELType_Type() {}
func (*CELType_Message) isCELType_Type() {}
func (*CELType_Enum) isCELType_Type() {}
// CELMapType represents map type.
type CELMapType struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// key represents map's key type.
Key *CELType `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
// value represents map's value type.
Value *CELType `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
}
func (x *CELMapType) Reset() {
*x = CELMapType{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[46]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *CELMapType) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CELMapType) ProtoMessage() {}
func (x *CELMapType) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[46]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use CELMapType.ProtoReflect.Descriptor instead.
func (*CELMapType) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{46}
}
func (x *CELMapType) GetKey() *CELType {
if x != nil {
return x.Key
}
return nil
}
func (x *CELMapType) GetValue() *CELType {
if x != nil {
return x.Value
}
return nil
}
// CELVariable represents CEL variable.
type CELVariable struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// name is the variable name.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// desc is the description of plugin.
// This description is used as documentation at code generation.
Desc string `protobuf:"bytes,2,opt,name=desc,proto3" json:"desc,omitempty"`
// type is the variable type.
Type *CELType `protobuf:"bytes,3,opt,name=type,proto3" json:"type,omitempty"`
}
func (x *CELVariable) Reset() {
*x = CELVariable{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[47]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *CELVariable) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CELVariable) ProtoMessage() {}
func (x *CELVariable) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_proto_msgTypes[47]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use CELVariable.ProtoReflect.Descriptor instead.
func (*CELVariable) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{47}
}
func (x *CELVariable) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *CELVariable) GetDesc() string {
if x != nil {
return x.Desc
}
return ""
}
func (x *CELVariable) GetType() *CELType {
if x != nil {
return x.Type
}
return nil
}
var file_grpc_federation_federation_proto_extTypes = []protoimpl.ExtensionInfo{
{
ExtendedType: (*descriptorpb.FileOptions)(nil),
ExtensionType: (*FileRule)(nil),
Field: 1187,
Name: "grpc.federation.file",
Tag: "bytes,1187,opt,name=file",
Filename: "grpc/federation/federation.proto",
},
{
ExtendedType: (*descriptorpb.ServiceOptions)(nil),
ExtensionType: (*ServiceRule)(nil),
Field: 1187,
Name: "grpc.federation.service",
Tag: "bytes,1187,opt,name=service",
Filename: "grpc/federation/federation.proto",
},
{
ExtendedType: (*descriptorpb.MethodOptions)(nil),
ExtensionType: (*MethodRule)(nil),
Field: 1187,
Name: "grpc.federation.method",
Tag: "bytes,1187,opt,name=method",
Filename: "grpc/federation/federation.proto",
},
{
ExtendedType: (*descriptorpb.MessageOptions)(nil),
ExtensionType: (*MessageRule)(nil),
Field: 1187,
Name: "grpc.federation.message",
Tag: "bytes,1187,opt,name=message",
Filename: "grpc/federation/federation.proto",
},
{
ExtendedType: (*descriptorpb.FieldOptions)(nil),
ExtensionType: (*FieldRule)(nil),
Field: 1187,
Name: "grpc.federation.field",
Tag: "bytes,1187,opt,name=field",
Filename: "grpc/federation/federation.proto",
},
{
ExtendedType: (*descriptorpb.EnumOptions)(nil),
ExtensionType: (*EnumRule)(nil),
Field: 1187,
Name: "grpc.federation.enum",
Tag: "bytes,1187,opt,name=enum",
Filename: "grpc/federation/federation.proto",
},
{
ExtendedType: (*descriptorpb.EnumValueOptions)(nil),
ExtensionType: (*EnumValueRule)(nil),
Field: 1187,
Name: "grpc.federation.enum_value",
Tag: "bytes,1187,opt,name=enum_value",
Filename: "grpc/federation/federation.proto",
},
{
ExtendedType: (*descriptorpb.OneofOptions)(nil),
ExtensionType: (*OneofRule)(nil),
Field: 1187,
Name: "grpc.federation.oneof",
Tag: "bytes,1187,opt,name=oneof",
Filename: "grpc/federation/federation.proto",
},
}
// Extension fields to descriptorpb.FileOptions.
var (
// optional grpc.federation.FileRule file = 1187;
E_File = &file_grpc_federation_federation_proto_extTypes[0]
)
// Extension fields to descriptorpb.ServiceOptions.
var (
// optional grpc.federation.ServiceRule service = 1187;
E_Service = &file_grpc_federation_federation_proto_extTypes[1]
)
// Extension fields to descriptorpb.MethodOptions.
var (
// optional grpc.federation.MethodRule method = 1187;
E_Method = &file_grpc_federation_federation_proto_extTypes[2]
)
// Extension fields to descriptorpb.MessageOptions.
var (
// optional grpc.federation.MessageRule message = 1187;
E_Message = &file_grpc_federation_federation_proto_extTypes[3]
)
// Extension fields to descriptorpb.FieldOptions.
var (
// optional grpc.federation.FieldRule field = 1187;
E_Field = &file_grpc_federation_federation_proto_extTypes[4]
)
// Extension fields to descriptorpb.EnumOptions.
var (
// optional grpc.federation.EnumRule enum = 1187;
E_Enum = &file_grpc_federation_federation_proto_extTypes[5]
)
// Extension fields to descriptorpb.EnumValueOptions.
var (
// optional grpc.federation.EnumValueRule enum_value = 1187;
E_EnumValue = &file_grpc_federation_federation_proto_extTypes[6]
)
// Extension fields to descriptorpb.OneofOptions.
var (
// optional grpc.federation.OneofRule oneof = 1187;
E_Oneof = &file_grpc_federation_federation_proto_extTypes[7]
)
var File_grpc_federation_federation_proto protoreflect.FileDescriptor
var file_grpc_federation_federation_proto_rawDesc = []byte{
0x0a, 0x20, 0x67, 0x72, 0x70, 0x63, 0x2f, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f,
0x6e, 0x2f, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f,
0x74, 0x6f, 0x12, 0x0f, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74,
0x69, 0x6f, 0x6e, 0x1a, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x2e,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x15, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x72, 0x70,
0x63, 0x2f, 0x63, 0x6f, 0x64, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f,
0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x72, 0x70, 0x63, 0x2f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x64,
0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x67, 0x72,
0x70, 0x63, 0x2f, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x70, 0x72,
0x69, 0x76, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1a, 0x67, 0x72, 0x70,
0x63, 0x2f, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x74, 0x69, 0x6d,
0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x56, 0x0a, 0x08, 0x46, 0x69, 0x6c, 0x65, 0x52,
0x75, 0x6c, 0x65, 0x12, 0x32, 0x0a, 0x06, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x18, 0x01, 0x20,
0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72,
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x43, 0x45, 0x4c, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x52,
0x06, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x69, 0x6d, 0x70, 0x6f, 0x72,
0x74, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x69, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x22,
0x20, 0x0a, 0x08, 0x45, 0x6e, 0x75, 0x6d, 0x52, 0x75, 0x6c, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x61,
0x6c, 0x69, 0x61, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x61, 0x6c, 0x69, 0x61,
0x73, 0x22, 0xb4, 0x01, 0x0a, 0x0d, 0x45, 0x6e, 0x75, 0x6d, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52,
0x75, 0x6c, 0x65, 0x12, 0x1d, 0x0a, 0x07, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x18, 0x01,
0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x07, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x88,
0x01, 0x01, 0x12, 0x14, 0x0a, 0x05, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28,
0x09, 0x52, 0x05, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x12, 0x37, 0x0a, 0x04, 0x61, 0x74, 0x74, 0x72,
0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65,
0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x56, 0x61, 0x6c,
0x75, 0x65, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x52, 0x04, 0x61, 0x74, 0x74,
0x72, 0x12, 0x1d, 0x0a, 0x07, 0x6e, 0x6f, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x18, 0x04, 0x20, 0x01,
0x28, 0x08, 0x48, 0x01, 0x52, 0x07, 0x6e, 0x6f, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x88, 0x01, 0x01,
0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x42, 0x0a, 0x0a, 0x08,
0x5f, 0x6e, 0x6f, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x22, 0x3e, 0x0a, 0x12, 0x45, 0x6e, 0x75, 0x6d,
0x56, 0x61, 0x6c, 0x75, 0x65, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 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, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28,
0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x0b, 0x0a, 0x09, 0x4f, 0x6e, 0x65, 0x6f,
0x66, 0x52, 0x75, 0x6c, 0x65, 0x22, 0x69, 0x0a, 0x0b, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65,
0x52, 0x75, 0x6c, 0x65, 0x12, 0x26, 0x0a, 0x03, 0x65, 0x6e, 0x76, 0x18, 0x01, 0x20, 0x01, 0x28,
0x0b, 0x32, 0x14, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74,
0x69, 0x6f, 0x6e, 0x2e, 0x45, 0x6e, 0x76, 0x52, 0x03, 0x65, 0x6e, 0x76, 0x12, 0x32, 0x0a, 0x03,
0x76, 0x61, 0x72, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x67, 0x72, 0x70, 0x63,
0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x53, 0x65, 0x72, 0x76,
0x69, 0x63, 0x65, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x03, 0x76, 0x61, 0x72,
0x22, 0x4a, 0x0a, 0x03, 0x45, 0x6e, 0x76, 0x12, 0x29, 0x0a, 0x03, 0x76, 0x61, 0x72, 0x18, 0x01,
0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65,
0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x45, 0x6e, 0x76, 0x56, 0x61, 0x72, 0x52, 0x03, 0x76,
0x61, 0x72, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20,
0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x8b, 0x03, 0x0a,
0x0f, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65,
0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01,
0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x13, 0x0a, 0x02, 0x69, 0x66, 0x18,
0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x02, 0x52, 0x02, 0x69, 0x66, 0x88, 0x01, 0x01, 0x12, 0x10,
0x0a, 0x02, 0x62, 0x79, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x02, 0x62, 0x79,
0x12, 0x2c, 0x0a, 0x03, 0x6d, 0x61, 0x70, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e,
0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e,
0x4d, 0x61, 0x70, 0x45, 0x78, 0x70, 0x72, 0x48, 0x00, 0x52, 0x03, 0x6d, 0x61, 0x70, 0x12, 0x38,
0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32,
0x1c, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f,
0x6e, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x45, 0x78, 0x70, 0x72, 0x48, 0x00, 0x52,
0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x50, 0x0a, 0x0a, 0x76, 0x61, 0x6c, 0x69,
0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x67,
0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x53,
0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x56, 0x61,
0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x78, 0x70, 0x72, 0x48, 0x00, 0x52, 0x0a,
0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2f, 0x0a, 0x04, 0x65, 0x6e,
0x75, 0x6d, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e,
0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x45,
0x78, 0x70, 0x72, 0x48, 0x00, 0x52, 0x04, 0x65, 0x6e, 0x75, 0x6d, 0x12, 0x35, 0x0a, 0x06, 0x73,
0x77, 0x69, 0x74, 0x63, 0x68, 0x18, 0x10, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x72,
0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x53, 0x77,
0x69, 0x74, 0x63, 0x68, 0x45, 0x78, 0x70, 0x72, 0x48, 0x00, 0x52, 0x06, 0x73, 0x77, 0x69, 0x74,
0x63, 0x68, 0x42, 0x06, 0x0a, 0x04, 0x65, 0x78, 0x70, 0x72, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e,
0x61, 0x6d, 0x65, 0x42, 0x05, 0x0a, 0x03, 0x5f, 0x69, 0x66, 0x22, 0x49, 0x0a, 0x1d, 0x53, 0x65,
0x72, 0x76, 0x69, 0x63, 0x65, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x56, 0x61, 0x6c,
0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x78, 0x70, 0x72, 0x12, 0x0e, 0x0a, 0x02, 0x69,
0x66, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x66, 0x12, 0x18, 0x0a, 0x07, 0x6d,
0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65,
0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x91, 0x01, 0x0a, 0x06, 0x45, 0x6e, 0x76, 0x56, 0x61, 0x72,
0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04,
0x6e, 0x61, 0x6d, 0x65, 0x12, 0x2c, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01,
0x28, 0x0b, 0x32, 0x18, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61,
0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x45, 0x6e, 0x76, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79,
0x70, 0x65, 0x12, 0x3a, 0x0a, 0x06, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01,
0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61,
0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x45, 0x6e, 0x76, 0x56, 0x61, 0x72, 0x4f, 0x70, 0x74, 0x69, 0x6f,
0x6e, 0x48, 0x00, 0x52, 0x06, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x88, 0x01, 0x01, 0x42, 0x09,
0x0a, 0x07, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xab, 0x01, 0x0a, 0x07, 0x45, 0x6e,
0x76, 0x54, 0x79, 0x70, 0x65, 0x12, 0x2f, 0x0a, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x18, 0x01, 0x20,
0x01, 0x28, 0x0e, 0x32, 0x19, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72,
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x4b, 0x69, 0x6e, 0x64, 0x48, 0x00,
0x52, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x12, 0x36, 0x0a, 0x08, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74,
0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e,
0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x45, 0x6e, 0x76, 0x54, 0x79,
0x70, 0x65, 0x48, 0x00, 0x52, 0x08, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x12, 0x2f,
0x0a, 0x03, 0x6d, 0x61, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x72,
0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x45, 0x6e,
0x76, 0x4d, 0x61, 0x70, 0x54, 0x79, 0x70, 0x65, 0x48, 0x00, 0x52, 0x03, 0x6d, 0x61, 0x70, 0x42,
0x06, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x22, 0x68, 0x0a, 0x0a, 0x45, 0x6e, 0x76, 0x4d, 0x61,
0x70, 0x54, 0x79, 0x70, 0x65, 0x12, 0x2a, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01,
0x28, 0x0b, 0x32, 0x18, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61,
0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x45, 0x6e, 0x76, 0x54, 0x79, 0x70, 0x65, 0x52, 0x03, 0x6b, 0x65,
0x79, 0x12, 0x2e, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b,
0x32, 0x18, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69,
0x6f, 0x6e, 0x2e, 0x45, 0x6e, 0x76, 0x54, 0x79, 0x70, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75,
0x65, 0x22, 0xc3, 0x01, 0x0a, 0x0c, 0x45, 0x6e, 0x76, 0x56, 0x61, 0x72, 0x4f, 0x70, 0x74, 0x69,
0x6f, 0x6e, 0x12, 0x21, 0x0a, 0x09, 0x61, 0x6c, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x74, 0x65, 0x18,
0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x09, 0x61, 0x6c, 0x74, 0x65, 0x72, 0x6e, 0x61,
0x74, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1d, 0x0a, 0x07, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74,
0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x07, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c,
0x74, 0x88, 0x01, 0x01, 0x12, 0x1f, 0x0a, 0x08, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64,
0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x48, 0x02, 0x52, 0x08, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72,
0x65, 0x64, 0x88, 0x01, 0x01, 0x12, 0x1d, 0x0a, 0x07, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x64,
0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x48, 0x03, 0x52, 0x07, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65,
0x64, 0x88, 0x01, 0x01, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x61, 0x6c, 0x74, 0x65, 0x72, 0x6e, 0x61,
0x74, 0x65, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x42, 0x0b,
0x0a, 0x09, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x42, 0x0a, 0x0a, 0x08, 0x5f,
0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x64, 0x22, 0x65, 0x0a, 0x0a, 0x4d, 0x65, 0x74, 0x68, 0x6f,
0x64, 0x52, 0x75, 0x6c, 0x65, 0x12, 0x1d, 0x0a, 0x07, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74,
0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x07, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75,
0x74, 0x88, 0x01, 0x01, 0x12, 0x1f, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e,
0x73, 0x65, 0x88, 0x01, 0x01, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75,
0x74, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x9c,
0x01, 0x0a, 0x0b, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x75, 0x6c, 0x65, 0x12, 0x35,
0x0a, 0x03, 0x64, 0x65, 0x66, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x67, 0x72,
0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x56, 0x61,
0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e,
0x52, 0x03, 0x64, 0x65, 0x66, 0x12, 0x2c, 0x0a, 0x0f, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x5f,
0x72, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00,
0x52, 0x0e, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x52, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x72,
0x88, 0x01, 0x01, 0x12, 0x14, 0x0a, 0x05, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x18, 0x03, 0x20, 0x03,
0x28, 0x09, 0x52, 0x05, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x42, 0x12, 0x0a, 0x10, 0x5f, 0x63, 0x75,
0x73, 0x74, 0x6f, 0x6d, 0x5f, 0x72, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x72, 0x22, 0xde, 0x03,
0x0a, 0x12, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69,
0x74, 0x69, 0x6f, 0x6e, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01,
0x28, 0x09, 0x48, 0x01, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x13, 0x0a,
0x02, 0x69, 0x66, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x02, 0x52, 0x02, 0x69, 0x66, 0x88,
0x01, 0x01, 0x12, 0x1f, 0x0a, 0x08, 0x61, 0x75, 0x74, 0x6f, 0x62, 0x69, 0x6e, 0x64, 0x18, 0x03,
0x20, 0x01, 0x28, 0x08, 0x48, 0x03, 0x52, 0x08, 0x61, 0x75, 0x74, 0x6f, 0x62, 0x69, 0x6e, 0x64,
0x88, 0x01, 0x01, 0x12, 0x10, 0x0a, 0x02, 0x62, 0x79, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x48,
0x00, 0x52, 0x02, 0x62, 0x79, 0x12, 0x2c, 0x0a, 0x03, 0x6d, 0x61, 0x70, 0x18, 0x0c, 0x20, 0x01,
0x28, 0x0b, 0x32, 0x18, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61,
0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x4d, 0x61, 0x70, 0x45, 0x78, 0x70, 0x72, 0x48, 0x00, 0x52, 0x03,
0x6d, 0x61, 0x70, 0x12, 0x38, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x0d,
0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65,
0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x45, 0x78,
0x70, 0x72, 0x48, 0x00, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x2f, 0x0a,
0x04, 0x63, 0x61, 0x6c, 0x6c, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x72,
0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x43, 0x61,
0x6c, 0x6c, 0x45, 0x78, 0x70, 0x72, 0x48, 0x00, 0x52, 0x04, 0x63, 0x61, 0x6c, 0x6c, 0x12, 0x41,
0x0a, 0x0a, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x0f, 0x20, 0x01,
0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61,
0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45,
0x78, 0x70, 0x72, 0x48, 0x00, 0x52, 0x0a, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f,
0x6e, 0x12, 0x2f, 0x0a, 0x04, 0x65, 0x6e, 0x75, 0x6d, 0x18, 0x10, 0x20, 0x01, 0x28, 0x0b, 0x32,
0x19, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f,
0x6e, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x45, 0x78, 0x70, 0x72, 0x48, 0x00, 0x52, 0x04, 0x65, 0x6e,
0x75, 0x6d, 0x12, 0x35, 0x0a, 0x06, 0x73, 0x77, 0x69, 0x74, 0x63, 0x68, 0x18, 0x11, 0x20, 0x01,
0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61,
0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x53, 0x77, 0x69, 0x74, 0x63, 0x68, 0x45, 0x78, 0x70, 0x72, 0x48,
0x00, 0x52, 0x06, 0x73, 0x77, 0x69, 0x74, 0x63, 0x68, 0x42, 0x06, 0x0a, 0x04, 0x65, 0x78, 0x70,
0x72, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x05, 0x0a, 0x03, 0x5f, 0x69,
0x66, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x61, 0x75, 0x74, 0x6f, 0x62, 0x69, 0x6e, 0x64, 0x22, 0xc5,
0x01, 0x0a, 0x07, 0x4d, 0x61, 0x70, 0x45, 0x78, 0x70, 0x72, 0x12, 0x35, 0x0a, 0x08, 0x69, 0x74,
0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67,
0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x49,
0x74, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x08, 0x69, 0x74, 0x65, 0x72, 0x61, 0x74, 0x6f,
0x72, 0x12, 0x10, 0x0a, 0x02, 0x62, 0x79, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52,
0x02, 0x62, 0x79, 0x12, 0x38, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x0c,
0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65,
0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x45, 0x78,
0x70, 0x72, 0x48, 0x00, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x2f, 0x0a,
0x04, 0x65, 0x6e, 0x75, 0x6d, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x72,
0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x45, 0x6e,
0x75, 0x6d, 0x45, 0x78, 0x70, 0x72, 0x48, 0x00, 0x52, 0x04, 0x65, 0x6e, 0x75, 0x6d, 0x42, 0x06,
0x0a, 0x04, 0x65, 0x78, 0x70, 0x72, 0x22, 0x30, 0x0a, 0x08, 0x49, 0x74, 0x65, 0x72, 0x61, 0x74,
0x6f, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x73, 0x72, 0x63, 0x18, 0x02, 0x20,
0x01, 0x28, 0x09, 0x52, 0x03, 0x73, 0x72, 0x63, 0x22, 0x50, 0x0a, 0x0b, 0x4d, 0x65, 0x73, 0x73,
0x61, 0x67, 0x65, 0x45, 0x78, 0x70, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18,
0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x2d, 0x0a, 0x04, 0x61,
0x72, 0x67, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x72, 0x70, 0x63,
0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x41, 0x72, 0x67, 0x75,
0x6d, 0x65, 0x6e, 0x74, 0x52, 0x04, 0x61, 0x72, 0x67, 0x73, 0x22, 0x2e, 0x0a, 0x08, 0x45, 0x6e,
0x75, 0x6d, 0x45, 0x78, 0x70, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01,
0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x62, 0x79,
0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x62, 0x79, 0x22, 0xf3, 0x02, 0x0a, 0x08, 0x43,
0x61, 0x6c, 0x6c, 0x45, 0x78, 0x70, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f,
0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12,
0x38, 0x0a, 0x07, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b,
0x32, 0x1e, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69,
0x6f, 0x6e, 0x2e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
0x52, 0x07, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x07, 0x74, 0x69, 0x6d,
0x65, 0x6f, 0x75, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x07, 0x74, 0x69,
0x6d, 0x65, 0x6f, 0x75, 0x74, 0x88, 0x01, 0x01, 0x12, 0x37, 0x0a, 0x05, 0x72, 0x65, 0x74, 0x72,
0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66,
0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x52, 0x65, 0x74, 0x72, 0x79, 0x50,
0x6f, 0x6c, 0x69, 0x63, 0x79, 0x48, 0x01, 0x52, 0x05, 0x72, 0x65, 0x74, 0x72, 0x79, 0x88, 0x01,
0x01, 0x12, 0x30, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b,
0x32, 0x1a, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69,
0x6f, 0x6e, 0x2e, 0x47, 0x52, 0x50, 0x43, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x05, 0x65, 0x72,
0x72, 0x6f, 0x72, 0x12, 0x3c, 0x0a, 0x06, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x06, 0x20,
0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72,
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x47, 0x52, 0x50, 0x43, 0x43, 0x61, 0x6c, 0x6c, 0x4f, 0x70,
0x74, 0x69, 0x6f, 0x6e, 0x48, 0x02, 0x52, 0x06, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x88, 0x01,
0x01, 0x12, 0x1f, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x07, 0x20,
0x01, 0x28, 0x09, 0x48, 0x03, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x88,
0x01, 0x01, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x42, 0x08,
0x0a, 0x06, 0x5f, 0x72, 0x65, 0x74, 0x72, 0x79, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6f, 0x70, 0x74,
0x69, 0x6f, 0x6e, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61,
0x22, 0x7f, 0x0a, 0x0a, 0x53, 0x77, 0x69, 0x74, 0x63, 0x68, 0x45, 0x78, 0x70, 0x72, 0x12, 0x33,
0x0a, 0x04, 0x63, 0x61, 0x73, 0x65, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x67,
0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x53,
0x77, 0x69, 0x74, 0x63, 0x68, 0x43, 0x61, 0x73, 0x65, 0x45, 0x78, 0x70, 0x72, 0x52, 0x04, 0x63,
0x61, 0x73, 0x65, 0x12, 0x3c, 0x0a, 0x07, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x18, 0x02,
0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65,
0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x53, 0x77, 0x69, 0x74, 0x63, 0x68, 0x44, 0x65, 0x66,
0x61, 0x75, 0x6c, 0x74, 0x45, 0x78, 0x70, 0x72, 0x52, 0x07, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c,
0x74, 0x22, 0x71, 0x0a, 0x0e, 0x53, 0x77, 0x69, 0x74, 0x63, 0x68, 0x43, 0x61, 0x73, 0x65, 0x45,
0x78, 0x70, 0x72, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x66, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
0x02, 0x69, 0x66, 0x12, 0x35, 0x0a, 0x03, 0x64, 0x65, 0x66, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b,
0x32, 0x23, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69,
0x6f, 0x6e, 0x2e, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x44, 0x65, 0x66, 0x69, 0x6e,
0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x03, 0x64, 0x65, 0x66, 0x12, 0x10, 0x0a, 0x02, 0x62, 0x79,
0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x02, 0x62, 0x79, 0x42, 0x06, 0x0a, 0x04,
0x65, 0x78, 0x70, 0x72, 0x22, 0x64, 0x0a, 0x11, 0x53, 0x77, 0x69, 0x74, 0x63, 0x68, 0x44, 0x65,
0x66, 0x61, 0x75, 0x6c, 0x74, 0x45, 0x78, 0x70, 0x72, 0x12, 0x35, 0x0a, 0x03, 0x64, 0x65, 0x66,
0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65,
0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c,
0x65, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x03, 0x64, 0x65, 0x66,
0x12, 0x10, 0x0a, 0x02, 0x62, 0x79, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x02,
0x62, 0x79, 0x42, 0x06, 0x0a, 0x04, 0x65, 0x78, 0x70, 0x72, 0x22, 0x86, 0x04, 0x0a, 0x09, 0x47,
0x52, 0x50, 0x43, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x35, 0x0a, 0x03, 0x64, 0x65, 0x66, 0x18,
0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64,
0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65,
0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x03, 0x64, 0x65, 0x66, 0x12,
0x13, 0x0a, 0x02, 0x69, 0x66, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x02, 0x69,
0x66, 0x88, 0x01, 0x01, 0x12, 0x29, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x03, 0x20, 0x01,
0x28, 0x0e, 0x32, 0x10, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x72, 0x70, 0x63, 0x2e,
0x43, 0x6f, 0x64, 0x65, 0x48, 0x01, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x88, 0x01, 0x01, 0x12,
0x1d, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09,
0x48, 0x02, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x88, 0x01, 0x01, 0x12, 0x3a,
0x0a, 0x07, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32,
0x20, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f,
0x6e, 0x2e, 0x47, 0x52, 0x50, 0x43, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x44, 0x65, 0x74, 0x61, 0x69,
0x6c, 0x52, 0x07, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x12, 0x1b, 0x0a, 0x06, 0x69, 0x67,
0x6e, 0x6f, 0x72, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x48, 0x03, 0x52, 0x06, 0x69, 0x67,
0x6e, 0x6f, 0x72, 0x65, 0x88, 0x01, 0x01, 0x12, 0x33, 0x0a, 0x13, 0x69, 0x67, 0x6e, 0x6f, 0x72,
0x65, 0x5f, 0x61, 0x6e, 0x64, 0x5f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x07,
0x20, 0x01, 0x28, 0x09, 0x48, 0x04, 0x52, 0x11, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x41, 0x6e,
0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x88, 0x01, 0x01, 0x12, 0x45, 0x0a, 0x09,
0x6c, 0x6f, 0x67, 0x5f, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0e, 0x32,
0x23, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f,
0x6e, 0x2e, 0x47, 0x52, 0x50, 0x43, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x2e, 0x4c, 0x6f, 0x67, 0x4c,
0x65, 0x76, 0x65, 0x6c, 0x48, 0x05, 0x52, 0x08, 0x6c, 0x6f, 0x67, 0x4c, 0x65, 0x76, 0x65, 0x6c,
0x88, 0x01, 0x01, 0x22, 0x41, 0x0a, 0x08, 0x4c, 0x6f, 0x67, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x12,
0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05,
0x44, 0x45, 0x42, 0x55, 0x47, 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, 0x49, 0x4e, 0x46, 0x4f, 0x10,
0x02, 0x12, 0x08, 0x0a, 0x04, 0x57, 0x41, 0x52, 0x4e, 0x10, 0x03, 0x12, 0x09, 0x0a, 0x05, 0x45,
0x52, 0x52, 0x4f, 0x52, 0x10, 0x04, 0x42, 0x05, 0x0a, 0x03, 0x5f, 0x69, 0x66, 0x42, 0x07, 0x0a,
0x05, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61,
0x67, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x42, 0x16, 0x0a,
0x14, 0x5f, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x5f, 0x61, 0x6e, 0x64, 0x5f, 0x72, 0x65, 0x73,
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x6c, 0x6f, 0x67, 0x5f, 0x6c, 0x65,
0x76, 0x65, 0x6c, 0x22, 0xfa, 0x05, 0x0a, 0x0f, 0x47, 0x52, 0x50, 0x43, 0x45, 0x72, 0x72, 0x6f,
0x72, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x66, 0x18, 0x01, 0x20,
0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x66, 0x12, 0x35, 0x0a, 0x03, 0x64, 0x65, 0x66, 0x18, 0x02,
0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65,
0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x44,
0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x03, 0x64, 0x65, 0x66, 0x12, 0x36,
0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32,
0x1c, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f,
0x6e, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x45, 0x78, 0x70, 0x72, 0x52, 0x07, 0x6d,
0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x34, 0x0a, 0x0a, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f,
0x69, 0x6e, 0x66, 0x6f, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x67, 0x6f, 0x6f,
0x67, 0x6c, 0x65, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x49, 0x6e, 0x66,
0x6f, 0x52, 0x09, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x34, 0x0a, 0x0a,
0x72, 0x65, 0x74, 0x72, 0x79, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b,
0x32, 0x15, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x52, 0x65,
0x74, 0x72, 0x79, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x09, 0x72, 0x65, 0x74, 0x72, 0x79, 0x49, 0x6e,
0x66, 0x6f, 0x12, 0x34, 0x0a, 0x0a, 0x64, 0x65, 0x62, 0x75, 0x67, 0x5f, 0x69, 0x6e, 0x66, 0x6f,
0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e,
0x72, 0x70, 0x63, 0x2e, 0x44, 0x65, 0x62, 0x75, 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x09, 0x64,
0x65, 0x62, 0x75, 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x3d, 0x0a, 0x0d, 0x71, 0x75, 0x6f, 0x74,
0x61, 0x5f, 0x66, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32,
0x18, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x51, 0x75, 0x6f,
0x74, 0x61, 0x46, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x52, 0x0c, 0x71, 0x75, 0x6f, 0x74, 0x61,
0x46, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x12, 0x52, 0x0a, 0x14, 0x70, 0x72, 0x65, 0x63, 0x6f,
0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x66, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x18,
0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x72,
0x70, 0x63, 0x2e, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x46,
0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x52, 0x13, 0x70, 0x72, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x69,
0x74, 0x69, 0x6f, 0x6e, 0x46, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x12, 0x37, 0x0a, 0x0b, 0x62,
0x61, 0x64, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b,
0x32, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x42, 0x61,
0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x0a, 0x62, 0x61, 0x64, 0x52, 0x65, 0x71,
0x75, 0x65, 0x73, 0x74, 0x12, 0x3a, 0x0a, 0x0c, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f,
0x69, 0x6e, 0x66, 0x6f, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f,
0x67, 0x6c, 0x65, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x49,
0x6e, 0x66, 0x6f, 0x52, 0x0b, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, 0x6e, 0x66, 0x6f,
0x12, 0x3d, 0x0a, 0x0d, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x69, 0x6e, 0x66,
0x6f, 0x18, 0x0b, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,
0x2e, 0x72, 0x70, 0x63, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x6e, 0x66,
0x6f, 0x52, 0x0c, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12,
0x24, 0x0a, 0x04, 0x68, 0x65, 0x6c, 0x70, 0x18, 0x0c, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e,
0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x48, 0x65, 0x6c, 0x70, 0x52,
0x04, 0x68, 0x65, 0x6c, 0x70, 0x12, 0x49, 0x0a, 0x11, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x69, 0x7a,
0x65, 0x64, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x0d, 0x20, 0x03, 0x28, 0x0b,
0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x6f,
0x63, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x10,
0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65,
0x12, 0x0e, 0x0a, 0x02, 0x62, 0x79, 0x18, 0x0e, 0x20, 0x03, 0x28, 0x09, 0x52, 0x02, 0x62, 0x79,
0x22, 0xc7, 0x03, 0x0a, 0x0e, 0x47, 0x52, 0x50, 0x43, 0x43, 0x61, 0x6c, 0x6c, 0x4f, 0x70, 0x74,
0x69, 0x6f, 0x6e, 0x12, 0x2c, 0x0a, 0x0f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x5f, 0x73,
0x75, 0x62, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0e,
0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x53, 0x75, 0x62, 0x74, 0x79, 0x70, 0x65, 0x88, 0x01,
0x01, 0x12, 0x1b, 0x0a, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28,
0x09, 0x48, 0x01, 0x52, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x88, 0x01, 0x01, 0x12, 0x37,
0x0a, 0x16, 0x6d, 0x61, 0x78, 0x5f, 0x63, 0x61, 0x6c, 0x6c, 0x5f, 0x72, 0x65, 0x63, 0x76, 0x5f,
0x6d, 0x73, 0x67, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x48, 0x02,
0x52, 0x12, 0x6d, 0x61, 0x78, 0x43, 0x61, 0x6c, 0x6c, 0x52, 0x65, 0x63, 0x76, 0x4d, 0x73, 0x67,
0x53, 0x69, 0x7a, 0x65, 0x88, 0x01, 0x01, 0x12, 0x37, 0x0a, 0x16, 0x6d, 0x61, 0x78, 0x5f, 0x63,
0x61, 0x6c, 0x6c, 0x5f, 0x73, 0x65, 0x6e, 0x64, 0x5f, 0x6d, 0x73, 0x67, 0x5f, 0x73, 0x69, 0x7a,
0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x48, 0x03, 0x52, 0x12, 0x6d, 0x61, 0x78, 0x43, 0x61,
0x6c, 0x6c, 0x53, 0x65, 0x6e, 0x64, 0x4d, 0x73, 0x67, 0x53, 0x69, 0x7a, 0x65, 0x88, 0x01, 0x01,
0x12, 0x28, 0x0a, 0x0d, 0x73, 0x74, 0x61, 0x74, 0x69, 0x63, 0x5f, 0x6d, 0x65, 0x74, 0x68, 0x6f,
0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x48, 0x04, 0x52, 0x0c, 0x73, 0x74, 0x61, 0x74, 0x69,
0x63, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x88, 0x01, 0x01, 0x12, 0x1d, 0x0a, 0x07, 0x74, 0x72,
0x61, 0x69, 0x6c, 0x65, 0x72, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x48, 0x05, 0x52, 0x07, 0x74,
0x72, 0x61, 0x69, 0x6c, 0x65, 0x72, 0x88, 0x01, 0x01, 0x12, 0x29, 0x0a, 0x0e, 0x77, 0x61, 0x69,
0x74, 0x5f, 0x66, 0x6f, 0x72, 0x5f, 0x72, 0x65, 0x61, 0x64, 0x79, 0x18, 0x07, 0x20, 0x01, 0x28,
0x08, 0x48, 0x06, 0x52, 0x0c, 0x77, 0x61, 0x69, 0x74, 0x46, 0x6f, 0x72, 0x52, 0x65, 0x61, 0x64,
0x79, 0x88, 0x01, 0x01, 0x42, 0x12, 0x0a, 0x10, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74,
0x5f, 0x73, 0x75, 0x62, 0x74, 0x79, 0x70, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x68, 0x65, 0x61,
0x64, 0x65, 0x72, 0x42, 0x19, 0x0a, 0x17, 0x5f, 0x6d, 0x61, 0x78, 0x5f, 0x63, 0x61, 0x6c, 0x6c,
0x5f, 0x72, 0x65, 0x63, 0x76, 0x5f, 0x6d, 0x73, 0x67, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x42, 0x19,
0x0a, 0x17, 0x5f, 0x6d, 0x61, 0x78, 0x5f, 0x63, 0x61, 0x6c, 0x6c, 0x5f, 0x73, 0x65, 0x6e, 0x64,
0x5f, 0x6d, 0x73, 0x67, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x42, 0x10, 0x0a, 0x0e, 0x5f, 0x73, 0x74,
0x61, 0x74, 0x69, 0x63, 0x5f, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x42, 0x0a, 0x0a, 0x08, 0x5f,
0x74, 0x72, 0x61, 0x69, 0x6c, 0x65, 0x72, 0x42, 0x11, 0x0a, 0x0f, 0x5f, 0x77, 0x61, 0x69, 0x74,
0x5f, 0x66, 0x6f, 0x72, 0x5f, 0x72, 0x65, 0x61, 0x64, 0x79, 0x22, 0x64, 0x0a, 0x0e, 0x56, 0x61,
0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x78, 0x70, 0x72, 0x12, 0x17, 0x0a, 0x04,
0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61,
0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x30, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x02,
0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65,
0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x47, 0x52, 0x50, 0x43, 0x45, 0x72, 0x72, 0x6f, 0x72,
0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65,
0x22, 0xb8, 0x01, 0x0a, 0x0b, 0x52, 0x65, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79,
0x12, 0x42, 0x0a, 0x08, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01,
0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61,
0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x52, 0x65, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79,
0x43, 0x6f, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x08, 0x63, 0x6f, 0x6e, 0x73,
0x74, 0x61, 0x6e, 0x74, 0x12, 0x4b, 0x0a, 0x0b, 0x65, 0x78, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74,
0x69, 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x67, 0x72, 0x70, 0x63,
0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x52, 0x65, 0x74, 0x72,
0x79, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x45, 0x78, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x69,
0x61, 0x6c, 0x48, 0x00, 0x52, 0x0b, 0x65, 0x78, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x69, 0x61,
0x6c, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x66, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69,
0x66, 0x42, 0x08, 0x0a, 0x06, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x22, 0x79, 0x0a, 0x13, 0x52,
0x65, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x61,
0x6e, 0x74, 0x12, 0x1f, 0x0a, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x01,
0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c,
0x88, 0x01, 0x01, 0x12, 0x24, 0x0a, 0x0b, 0x6d, 0x61, 0x78, 0x5f, 0x72, 0x65, 0x74, 0x72, 0x69,
0x65, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x48, 0x01, 0x52, 0x0a, 0x6d, 0x61, 0x78, 0x52,
0x65, 0x74, 0x72, 0x69, 0x65, 0x73, 0x88, 0x01, 0x01, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x69, 0x6e,
0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x6d, 0x61, 0x78, 0x5f, 0x72,
0x65, 0x74, 0x72, 0x69, 0x65, 0x73, 0x22, 0xd1, 0x02, 0x0a, 0x16, 0x52, 0x65, 0x74, 0x72, 0x79,
0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x45, 0x78, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x69, 0x61,
0x6c, 0x12, 0x2e, 0x0a, 0x10, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x5f, 0x69, 0x6e, 0x74,
0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0f, 0x69,
0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x88, 0x01,
0x01, 0x12, 0x36, 0x0a, 0x14, 0x72, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x69, 0x7a, 0x61, 0x74, 0x69,
0x6f, 0x6e, 0x5f, 0x66, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x01, 0x48,
0x01, 0x52, 0x13, 0x72, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e,
0x46, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x88, 0x01, 0x01, 0x12, 0x23, 0x0a, 0x0a, 0x6d, 0x75, 0x6c,
0x74, 0x69, 0x70, 0x6c, 0x69, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x01, 0x48, 0x02, 0x52,
0x0a, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x69, 0x65, 0x72, 0x88, 0x01, 0x01, 0x12, 0x26,
0x0a, 0x0c, 0x6d, 0x61, 0x78, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x04,
0x20, 0x01, 0x28, 0x09, 0x48, 0x03, 0x52, 0x0b, 0x6d, 0x61, 0x78, 0x49, 0x6e, 0x74, 0x65, 0x72,
0x76, 0x61, 0x6c, 0x88, 0x01, 0x01, 0x12, 0x24, 0x0a, 0x0b, 0x6d, 0x61, 0x78, 0x5f, 0x72, 0x65,
0x74, 0x72, 0x69, 0x65, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x48, 0x04, 0x52, 0x0a, 0x6d,
0x61, 0x78, 0x52, 0x65, 0x74, 0x72, 0x69, 0x65, 0x73, 0x88, 0x01, 0x01, 0x42, 0x13, 0x0a, 0x11,
0x5f, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61,
0x6c, 0x42, 0x17, 0x0a, 0x15, 0x5f, 0x72, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x69, 0x7a, 0x61, 0x74,
0x69, 0x6f, 0x6e, 0x5f, 0x66, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x6d,
0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x69, 0x65, 0x72, 0x42, 0x0f, 0x0a, 0x0d, 0x5f, 0x6d, 0x61,
0x78, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x6d,
0x61, 0x78, 0x5f, 0x72, 0x65, 0x74, 0x72, 0x69, 0x65, 0x73, 0x22, 0x5d, 0x0a, 0x0d, 0x4d, 0x65,
0x74, 0x68, 0x6f, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x66,
0x69, 0x65, 0x6c, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x66, 0x69, 0x65, 0x6c,
0x64, 0x12, 0x13, 0x0a, 0x02, 0x62, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52,
0x02, 0x62, 0x79, 0x88, 0x01, 0x01, 0x12, 0x13, 0x0a, 0x02, 0x69, 0x66, 0x18, 0x03, 0x20, 0x01,
0x28, 0x09, 0x48, 0x01, 0x52, 0x02, 0x69, 0x66, 0x88, 0x01, 0x01, 0x42, 0x05, 0x0a, 0x03, 0x5f,
0x62, 0x79, 0x42, 0x05, 0x0a, 0x03, 0x5f, 0x69, 0x66, 0x22, 0x85, 0x01, 0x0a, 0x0e, 0x4d, 0x65,
0x74, 0x68, 0x6f, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x17, 0x0a, 0x04,
0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61,
0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x18, 0x02,
0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x05, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x88, 0x01, 0x01,
0x12, 0x1f, 0x0a, 0x08, 0x61, 0x75, 0x74, 0x6f, 0x62, 0x69, 0x6e, 0x64, 0x18, 0x03, 0x20, 0x01,
0x28, 0x08, 0x48, 0x02, 0x52, 0x08, 0x61, 0x75, 0x74, 0x6f, 0x62, 0x69, 0x6e, 0x64, 0x88, 0x01,
0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x66,
0x69, 0x65, 0x6c, 0x64, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x61, 0x75, 0x74, 0x6f, 0x62, 0x69, 0x6e,
0x64, 0x22, 0x62, 0x0a, 0x08, 0x41, 0x72, 0x67, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x12, 0x0a,
0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d,
0x65, 0x12, 0x13, 0x0a, 0x02, 0x62, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52,
0x02, 0x62, 0x79, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x69, 0x6e, 0x6c, 0x69, 0x6e, 0x65,
0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x06, 0x69, 0x6e, 0x6c, 0x69, 0x6e, 0x65,
0x88, 0x01, 0x01, 0x42, 0x05, 0x0a, 0x03, 0x5f, 0x62, 0x79, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x69,
0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x22, 0xf2, 0x01, 0x0a, 0x09, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x52,
0x75, 0x6c, 0x65, 0x12, 0x2c, 0x0a, 0x0f, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x5f, 0x72, 0x65,
0x73, 0x6f, 0x6c, 0x76, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x0e,
0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x52, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x72, 0x88, 0x01,
0x01, 0x12, 0x13, 0x0a, 0x02, 0x62, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52,
0x02, 0x62, 0x79, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x18,
0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x02, 0x52, 0x05, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x88, 0x01,
0x01, 0x12, 0x31, 0x0a, 0x05, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b,
0x32, 0x1b, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69,
0x6f, 0x6e, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x6e, 0x65, 0x6f, 0x66, 0x52, 0x05, 0x6f,
0x6e, 0x65, 0x6f, 0x66, 0x12, 0x2f, 0x0a, 0x03, 0x65, 0x6e, 0x76, 0x18, 0x05, 0x20, 0x01, 0x28,
0x0b, 0x32, 0x1d, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74,
0x69, 0x6f, 0x6e, 0x2e, 0x45, 0x6e, 0x76, 0x56, 0x61, 0x72, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e,
0x52, 0x03, 0x65, 0x6e, 0x76, 0x42, 0x12, 0x0a, 0x10, 0x5f, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d,
0x5f, 0x72, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x72, 0x42, 0x05, 0x0a, 0x03, 0x5f, 0x62, 0x79,
0x42, 0x08, 0x0a, 0x06, 0x5f, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x22, 0x89, 0x01, 0x0a, 0x0a, 0x46,
0x69, 0x65, 0x6c, 0x64, 0x4f, 0x6e, 0x65, 0x6f, 0x66, 0x12, 0x10, 0x0a, 0x02, 0x69, 0x66, 0x18,
0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x02, 0x69, 0x66, 0x12, 0x1a, 0x0a, 0x07, 0x64,
0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x07,
0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x12, 0x35, 0x0a, 0x03, 0x64, 0x65, 0x66, 0x18, 0x03,
0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65,
0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x44,
0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x03, 0x64, 0x65, 0x66, 0x12, 0x0e,
0x0a, 0x02, 0x62, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x62, 0x79, 0x42, 0x06,
0x0a, 0x04, 0x63, 0x6f, 0x6e, 0x64, 0x22, 0x45, 0x0a, 0x09, 0x43, 0x45, 0x4c, 0x50, 0x6c, 0x75,
0x67, 0x69, 0x6e, 0x12, 0x38, 0x0a, 0x06, 0x65, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x01, 0x20,
0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72,
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x43, 0x45, 0x4c, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x45,
0x78, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x06, 0x65, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x22, 0xaf, 0x02,
0x0a, 0x0f, 0x43, 0x45, 0x4c, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x45, 0x78, 0x70, 0x6f, 0x72,
0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x65, 0x73, 0x63, 0x18, 0x02, 0x20,
0x01, 0x28, 0x09, 0x52, 0x04, 0x64, 0x65, 0x73, 0x63, 0x12, 0x36, 0x0a, 0x05, 0x74, 0x79, 0x70,
0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e,
0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x43, 0x45, 0x4c, 0x52, 0x65,
0x63, 0x65, 0x69, 0x76, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x52, 0x05, 0x74, 0x79, 0x70, 0x65,
0x73, 0x12, 0x3a, 0x0a, 0x09, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x04,
0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65,
0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x43, 0x45, 0x4c, 0x46, 0x75, 0x6e, 0x63, 0x74, 0x69,
0x6f, 0x6e, 0x52, 0x09, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x3a, 0x0a,
0x09, 0x76, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b,
0x32, 0x1c, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69,
0x6f, 0x6e, 0x2e, 0x43, 0x45, 0x4c, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x09,
0x76, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x12, 0x44, 0x0a, 0x0a, 0x63, 0x61, 0x70,
0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e,
0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e,
0x43, 0x45, 0x4c, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c,
0x69, 0x74, 0x79, 0x52, 0x0a, 0x63, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x22,
0x9b, 0x02, 0x0a, 0x13, 0x43, 0x45, 0x4c, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x43, 0x61, 0x70,
0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x12, 0x3e, 0x0a, 0x03, 0x65, 0x6e, 0x76, 0x18, 0x01,
0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65,
0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x43, 0x45, 0x4c, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e,
0x45, 0x6e, 0x76, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x48, 0x00, 0x52,
0x03, 0x65, 0x6e, 0x76, 0x88, 0x01, 0x01, 0x12, 0x54, 0x0a, 0x0b, 0x66, 0x69, 0x6c, 0x65, 0x5f,
0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x67,
0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x43,
0x45, 0x4c, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x46, 0x69, 0x6c, 0x65, 0x53, 0x79, 0x73, 0x74,
0x65, 0x6d, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x48, 0x01, 0x52, 0x0a,
0x66, 0x69, 0x6c, 0x65, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x88, 0x01, 0x01, 0x12, 0x4a, 0x0a,
0x07, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b,
0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e,
0x2e, 0x43, 0x45, 0x4c, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72,
0x6b, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x48, 0x02, 0x52, 0x07, 0x6e,
0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x88, 0x01, 0x01, 0x42, 0x06, 0x0a, 0x04, 0x5f, 0x65, 0x6e,
0x76, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x73, 0x79, 0x73, 0x74, 0x65,
0x6d, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x22, 0x40, 0x0a,
0x16, 0x43, 0x45, 0x4c, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x45, 0x6e, 0x76, 0x43, 0x61, 0x70,
0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x61, 0x6c, 0x6c, 0x18, 0x01,
0x20, 0x01, 0x28, 0x08, 0x52, 0x03, 0x61, 0x6c, 0x6c, 0x12, 0x14, 0x0a, 0x05, 0x6e, 0x61, 0x6d,
0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x22,
0x3e, 0x0a, 0x1d, 0x43, 0x45, 0x4c, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x46, 0x69, 0x6c, 0x65,
0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79,
0x12, 0x1d, 0x0a, 0x0a, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01,
0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x50, 0x61, 0x74, 0x68, 0x22,
0x1c, 0x0a, 0x1a, 0x43, 0x45, 0x4c, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x4e, 0x65, 0x74, 0x77,
0x6f, 0x72, 0x6b, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x22, 0xa1, 0x01,
0x0a, 0x0b, 0x43, 0x45, 0x4c, 0x46, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a,
0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d,
0x65, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x65, 0x73, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52,
0x04, 0x64, 0x65, 0x73, 0x63, 0x12, 0x38, 0x0a, 0x04, 0x61, 0x72, 0x67, 0x73, 0x18, 0x03, 0x20,
0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72,
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x43, 0x45, 0x4c, 0x46, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f,
0x6e, 0x41, 0x72, 0x67, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x04, 0x61, 0x72, 0x67, 0x73, 0x12,
0x30, 0x0a, 0x06, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32,
0x18, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f,
0x6e, 0x2e, 0x43, 0x45, 0x4c, 0x54, 0x79, 0x70, 0x65, 0x52, 0x06, 0x72, 0x65, 0x74, 0x75, 0x72,
0x6e, 0x22, 0x71, 0x0a, 0x0f, 0x43, 0x45, 0x4c, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x72,
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, 0x12, 0x0a, 0x04, 0x64, 0x65, 0x73, 0x63,
0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x64, 0x65, 0x73, 0x63, 0x12, 0x36, 0x0a, 0x07,
0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e,
0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e,
0x43, 0x45, 0x4c, 0x46, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x6d, 0x65, 0x74,
0x68, 0x6f, 0x64, 0x73, 0x22, 0x6b, 0x0a, 0x13, 0x43, 0x45, 0x4c, 0x46, 0x75, 0x6e, 0x63, 0x74,
0x69, 0x6f, 0x6e, 0x41, 0x72, 0x67, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e,
0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12,
0x12, 0x0a, 0x04, 0x64, 0x65, 0x73, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x64,
0x65, 0x73, 0x63, 0x12, 0x2c, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28,
0x0b, 0x32, 0x18, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74,
0x69, 0x6f, 0x6e, 0x2e, 0x43, 0x45, 0x4c, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70,
0x65, 0x22, 0xdd, 0x01, 0x0a, 0x07, 0x43, 0x45, 0x4c, 0x54, 0x79, 0x70, 0x65, 0x12, 0x2f, 0x0a,
0x04, 0x6b, 0x69, 0x6e, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x19, 0x2e, 0x67, 0x72,
0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x54, 0x79,
0x70, 0x65, 0x4b, 0x69, 0x6e, 0x64, 0x48, 0x00, 0x52, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x12, 0x36,
0x0a, 0x08, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b,
0x32, 0x18, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69,
0x6f, 0x6e, 0x2e, 0x43, 0x45, 0x4c, 0x54, 0x79, 0x70, 0x65, 0x48, 0x00, 0x52, 0x08, 0x72, 0x65,
0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x12, 0x2f, 0x0a, 0x03, 0x6d, 0x61, 0x70, 0x18, 0x03, 0x20,
0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72,
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x43, 0x45, 0x4c, 0x4d, 0x61, 0x70, 0x54, 0x79, 0x70, 0x65,
0x48, 0x00, 0x52, 0x03, 0x6d, 0x61, 0x70, 0x12, 0x1a, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61,
0x67, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73,
0x61, 0x67, 0x65, 0x12, 0x14, 0x0a, 0x04, 0x65, 0x6e, 0x75, 0x6d, 0x18, 0x05, 0x20, 0x01, 0x28,
0x09, 0x48, 0x00, 0x52, 0x04, 0x65, 0x6e, 0x75, 0x6d, 0x42, 0x06, 0x0a, 0x04, 0x74, 0x79, 0x70,
0x65, 0x22, 0x68, 0x0a, 0x0a, 0x43, 0x45, 0x4c, 0x4d, 0x61, 0x70, 0x54, 0x79, 0x70, 0x65, 0x12,
0x2a, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x67,
0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x43,
0x45, 0x4c, 0x54, 0x79, 0x70, 0x65, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x2e, 0x0a, 0x05, 0x76,
0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x67, 0x72, 0x70,
0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x43, 0x45, 0x4c,
0x54, 0x79, 0x70, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x63, 0x0a, 0x0b, 0x43,
0x45, 0x4c, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61,
0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x12,
0x0a, 0x04, 0x64, 0x65, 0x73, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x64, 0x65,
0x73, 0x63, 0x12, 0x2c, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b,
0x32, 0x18, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69,
0x6f, 0x6e, 0x2e, 0x43, 0x45, 0x4c, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65,
0x2a, 0x5e, 0x0a, 0x08, 0x54, 0x79, 0x70, 0x65, 0x4b, 0x69, 0x6e, 0x64, 0x12, 0x0b, 0x0a, 0x07,
0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x53, 0x54, 0x52,
0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, 0x42, 0x4f, 0x4f, 0x4c, 0x10, 0x02, 0x12,
0x09, 0x0a, 0x05, 0x49, 0x4e, 0x54, 0x36, 0x34, 0x10, 0x03, 0x12, 0x0a, 0x0a, 0x06, 0x55, 0x49,
0x4e, 0x54, 0x36, 0x34, 0x10, 0x04, 0x12, 0x0a, 0x0a, 0x06, 0x44, 0x4f, 0x55, 0x42, 0x4c, 0x45,
0x10, 0x05, 0x12, 0x0c, 0x0a, 0x08, 0x44, 0x55, 0x52, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x06,
0x3a, 0x4c, 0x0a, 0x04, 0x66, 0x69, 0x6c, 0x65, 0x12, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c,
0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x4f,
0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xa3, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e,
0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e,
0x46, 0x69, 0x6c, 0x65, 0x52, 0x75, 0x6c, 0x65, 0x52, 0x04, 0x66, 0x69, 0x6c, 0x65, 0x3a, 0x58,
0x0a, 0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x1f, 0x2e, 0x67, 0x6f, 0x6f, 0x67,
0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x65, 0x72, 0x76,
0x69, 0x63, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xa3, 0x09, 0x20, 0x01, 0x28,
0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74,
0x69, 0x6f, 0x6e, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x75, 0x6c, 0x65, 0x52,
0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x3a, 0x54, 0x0a, 0x06, 0x6d, 0x65, 0x74, 0x68,
0x6f, 0x64, 0x12, 0x1e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f,
0x6e, 0x73, 0x18, 0xa3, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x72, 0x70, 0x63,
0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x4d, 0x65, 0x74, 0x68,
0x6f, 0x64, 0x52, 0x75, 0x6c, 0x65, 0x52, 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x3a, 0x58,
0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x1f, 0x2e, 0x67, 0x6f, 0x6f, 0x67,
0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4d, 0x65, 0x73, 0x73,
0x61, 0x67, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xa3, 0x09, 0x20, 0x01, 0x28,
0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74,
0x69, 0x6f, 0x6e, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x75, 0x6c, 0x65, 0x52,
0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x3a, 0x50, 0x0a, 0x05, 0x66, 0x69, 0x65, 0x6c,
0x64, 0x12, 0x1d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73,
0x18, 0xa3, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66,
0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x52,
0x75, 0x6c, 0x65, 0x52, 0x05, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x3a, 0x4c, 0x0a, 0x04, 0x65, 0x6e,
0x75, 0x6d, 0x12, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73,
0x18, 0xa3, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66,
0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x52, 0x75,
0x6c, 0x65, 0x52, 0x04, 0x65, 0x6e, 0x75, 0x6d, 0x3a, 0x61, 0x0a, 0x0a, 0x65, 0x6e, 0x75, 0x6d,
0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x21, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x56, 0x61, 0x6c,
0x75, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xa3, 0x09, 0x20, 0x01, 0x28, 0x0b,
0x32, 0x1e, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69,
0x6f, 0x6e, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x75, 0x6c, 0x65,
0x52, 0x09, 0x65, 0x6e, 0x75, 0x6d, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x50, 0x0a, 0x05, 0x6f,
0x6e, 0x65, 0x6f, 0x66, 0x12, 0x1d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4f, 0x6e, 0x65, 0x6f, 0x66, 0x4f, 0x70, 0x74, 0x69,
0x6f, 0x6e, 0x73, 0x18, 0xa3, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x72, 0x70,
0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x4f, 0x6e, 0x65,
0x6f, 0x66, 0x52, 0x75, 0x6c, 0x65, 0x52, 0x05, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x42, 0xc2, 0x01,
0x0a, 0x13, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x66, 0x65, 0x64, 0x65, 0x72,
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x0f, 0x46, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f,
0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3d, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62,
0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6d, 0x65, 0x72, 0x63, 0x61, 0x72, 0x69, 0x2f, 0x67, 0x72, 0x70,
0x63, 0x2d, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x67, 0x72, 0x70,
0x63, 0x2f, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x3b, 0x66, 0x65, 0x64,
0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0xa2, 0x02, 0x03, 0x47, 0x46, 0x58, 0xaa, 0x02, 0x0f,
0x47, 0x72, 0x70, 0x63, 0x2e, 0x46, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0xca,
0x02, 0x0f, 0x47, 0x72, 0x70, 0x63, 0x5c, 0x46, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f,
0x6e, 0xe2, 0x02, 0x1b, 0x47, 0x72, 0x70, 0x63, 0x5c, 0x46, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74,
0x69, 0x6f, 0x6e, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea,
0x02, 0x10, 0x47, 0x72, 0x70, 0x63, 0x3a, 0x3a, 0x46, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69,
0x6f, 0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_grpc_federation_federation_proto_rawDescOnce sync.Once
file_grpc_federation_federation_proto_rawDescData = file_grpc_federation_federation_proto_rawDesc
)
func file_grpc_federation_federation_proto_rawDescGZIP() []byte {
file_grpc_federation_federation_proto_rawDescOnce.Do(func() {
file_grpc_federation_federation_proto_rawDescData = protoimpl.X.CompressGZIP(file_grpc_federation_federation_proto_rawDescData)
})
return file_grpc_federation_federation_proto_rawDescData
}
var file_grpc_federation_federation_proto_enumTypes = make([]protoimpl.EnumInfo, 2)
var file_grpc_federation_federation_proto_msgTypes = make([]protoimpl.MessageInfo, 48)
var file_grpc_federation_federation_proto_goTypes = []interface{}{
(TypeKind)(0), // 0: grpc.federation.TypeKind
(GRPCError_LogLevel)(0), // 1: grpc.federation.GRPCError.LogLevel
(*FileRule)(nil), // 2: grpc.federation.FileRule
(*EnumRule)(nil), // 3: grpc.federation.EnumRule
(*EnumValueRule)(nil), // 4: grpc.federation.EnumValueRule
(*EnumValueAttribute)(nil), // 5: grpc.federation.EnumValueAttribute
(*OneofRule)(nil), // 6: grpc.federation.OneofRule
(*ServiceRule)(nil), // 7: grpc.federation.ServiceRule
(*Env)(nil), // 8: grpc.federation.Env
(*ServiceVariable)(nil), // 9: grpc.federation.ServiceVariable
(*ServiceVariableValidationExpr)(nil), // 10: grpc.federation.ServiceVariableValidationExpr
(*EnvVar)(nil), // 11: grpc.federation.EnvVar
(*EnvType)(nil), // 12: grpc.federation.EnvType
(*EnvMapType)(nil), // 13: grpc.federation.EnvMapType
(*EnvVarOption)(nil), // 14: grpc.federation.EnvVarOption
(*MethodRule)(nil), // 15: grpc.federation.MethodRule
(*MessageRule)(nil), // 16: grpc.federation.MessageRule
(*VariableDefinition)(nil), // 17: grpc.federation.VariableDefinition
(*MapExpr)(nil), // 18: grpc.federation.MapExpr
(*Iterator)(nil), // 19: grpc.federation.Iterator
(*MessageExpr)(nil), // 20: grpc.federation.MessageExpr
(*EnumExpr)(nil), // 21: grpc.federation.EnumExpr
(*CallExpr)(nil), // 22: grpc.federation.CallExpr
(*SwitchExpr)(nil), // 23: grpc.federation.SwitchExpr
(*SwitchCaseExpr)(nil), // 24: grpc.federation.SwitchCaseExpr
(*SwitchDefaultExpr)(nil), // 25: grpc.federation.SwitchDefaultExpr
(*GRPCError)(nil), // 26: grpc.federation.GRPCError
(*GRPCErrorDetail)(nil), // 27: grpc.federation.GRPCErrorDetail
(*GRPCCallOption)(nil), // 28: grpc.federation.GRPCCallOption
(*ValidationExpr)(nil), // 29: grpc.federation.ValidationExpr
(*RetryPolicy)(nil), // 30: grpc.federation.RetryPolicy
(*RetryPolicyConstant)(nil), // 31: grpc.federation.RetryPolicyConstant
(*RetryPolicyExponential)(nil), // 32: grpc.federation.RetryPolicyExponential
(*MethodRequest)(nil), // 33: grpc.federation.MethodRequest
(*MethodResponse)(nil), // 34: grpc.federation.MethodResponse
(*Argument)(nil), // 35: grpc.federation.Argument
(*FieldRule)(nil), // 36: grpc.federation.FieldRule
(*FieldOneof)(nil), // 37: grpc.federation.FieldOneof
(*CELPlugin)(nil), // 38: grpc.federation.CELPlugin
(*CELPluginExport)(nil), // 39: grpc.federation.CELPluginExport
(*CELPluginCapability)(nil), // 40: grpc.federation.CELPluginCapability
(*CELPluginEnvCapability)(nil), // 41: grpc.federation.CELPluginEnvCapability
(*CELPluginFileSystemCapability)(nil), // 42: grpc.federation.CELPluginFileSystemCapability
(*CELPluginNetworkCapability)(nil), // 43: grpc.federation.CELPluginNetworkCapability
(*CELFunction)(nil), // 44: grpc.federation.CELFunction
(*CELReceiverType)(nil), // 45: grpc.federation.CELReceiverType
(*CELFunctionArgument)(nil), // 46: grpc.federation.CELFunctionArgument
(*CELType)(nil), // 47: grpc.federation.CELType
(*CELMapType)(nil), // 48: grpc.federation.CELMapType
(*CELVariable)(nil), // 49: grpc.federation.CELVariable
(code.Code)(0), // 50: google.rpc.Code
(*errdetails.ErrorInfo)(nil), // 51: google.rpc.ErrorInfo
(*errdetails.RetryInfo)(nil), // 52: google.rpc.RetryInfo
(*errdetails.DebugInfo)(nil), // 53: google.rpc.DebugInfo
(*errdetails.QuotaFailure)(nil), // 54: google.rpc.QuotaFailure
(*errdetails.PreconditionFailure)(nil), // 55: google.rpc.PreconditionFailure
(*errdetails.BadRequest)(nil), // 56: google.rpc.BadRequest
(*errdetails.RequestInfo)(nil), // 57: google.rpc.RequestInfo
(*errdetails.ResourceInfo)(nil), // 58: google.rpc.ResourceInfo
(*errdetails.Help)(nil), // 59: google.rpc.Help
(*errdetails.LocalizedMessage)(nil), // 60: google.rpc.LocalizedMessage
(*descriptorpb.FileOptions)(nil), // 61: google.protobuf.FileOptions
(*descriptorpb.ServiceOptions)(nil), // 62: google.protobuf.ServiceOptions
(*descriptorpb.MethodOptions)(nil), // 63: google.protobuf.MethodOptions
(*descriptorpb.MessageOptions)(nil), // 64: google.protobuf.MessageOptions
(*descriptorpb.FieldOptions)(nil), // 65: google.protobuf.FieldOptions
(*descriptorpb.EnumOptions)(nil), // 66: google.protobuf.EnumOptions
(*descriptorpb.EnumValueOptions)(nil), // 67: google.protobuf.EnumValueOptions
(*descriptorpb.OneofOptions)(nil), // 68: google.protobuf.OneofOptions
}
var file_grpc_federation_federation_proto_depIdxs = []int32{
38, // 0: grpc.federation.FileRule.plugin:type_name -> grpc.federation.CELPlugin
5, // 1: grpc.federation.EnumValueRule.attr:type_name -> grpc.federation.EnumValueAttribute
8, // 2: grpc.federation.ServiceRule.env:type_name -> grpc.federation.Env
9, // 3: grpc.federation.ServiceRule.var:type_name -> grpc.federation.ServiceVariable
11, // 4: grpc.federation.Env.var:type_name -> grpc.federation.EnvVar
18, // 5: grpc.federation.ServiceVariable.map:type_name -> grpc.federation.MapExpr
20, // 6: grpc.federation.ServiceVariable.message:type_name -> grpc.federation.MessageExpr
10, // 7: grpc.federation.ServiceVariable.validation:type_name -> grpc.federation.ServiceVariableValidationExpr
21, // 8: grpc.federation.ServiceVariable.enum:type_name -> grpc.federation.EnumExpr
23, // 9: grpc.federation.ServiceVariable.switch:type_name -> grpc.federation.SwitchExpr
12, // 10: grpc.federation.EnvVar.type:type_name -> grpc.federation.EnvType
14, // 11: grpc.federation.EnvVar.option:type_name -> grpc.federation.EnvVarOption
0, // 12: grpc.federation.EnvType.kind:type_name -> grpc.federation.TypeKind
12, // 13: grpc.federation.EnvType.repeated:type_name -> grpc.federation.EnvType
13, // 14: grpc.federation.EnvType.map:type_name -> grpc.federation.EnvMapType
12, // 15: grpc.federation.EnvMapType.key:type_name -> grpc.federation.EnvType
12, // 16: grpc.federation.EnvMapType.value:type_name -> grpc.federation.EnvType
17, // 17: grpc.federation.MessageRule.def:type_name -> grpc.federation.VariableDefinition
18, // 18: grpc.federation.VariableDefinition.map:type_name -> grpc.federation.MapExpr
20, // 19: grpc.federation.VariableDefinition.message:type_name -> grpc.federation.MessageExpr
22, // 20: grpc.federation.VariableDefinition.call:type_name -> grpc.federation.CallExpr
29, // 21: grpc.federation.VariableDefinition.validation:type_name -> grpc.federation.ValidationExpr
21, // 22: grpc.federation.VariableDefinition.enum:type_name -> grpc.federation.EnumExpr
23, // 23: grpc.federation.VariableDefinition.switch:type_name -> grpc.federation.SwitchExpr
19, // 24: grpc.federation.MapExpr.iterator:type_name -> grpc.federation.Iterator
20, // 25: grpc.federation.MapExpr.message:type_name -> grpc.federation.MessageExpr
21, // 26: grpc.federation.MapExpr.enum:type_name -> grpc.federation.EnumExpr
35, // 27: grpc.federation.MessageExpr.args:type_name -> grpc.federation.Argument
33, // 28: grpc.federation.CallExpr.request:type_name -> grpc.federation.MethodRequest
30, // 29: grpc.federation.CallExpr.retry:type_name -> grpc.federation.RetryPolicy
26, // 30: grpc.federation.CallExpr.error:type_name -> grpc.federation.GRPCError
28, // 31: grpc.federation.CallExpr.option:type_name -> grpc.federation.GRPCCallOption
24, // 32: grpc.federation.SwitchExpr.case:type_name -> grpc.federation.SwitchCaseExpr
25, // 33: grpc.federation.SwitchExpr.default:type_name -> grpc.federation.SwitchDefaultExpr
17, // 34: grpc.federation.SwitchCaseExpr.def:type_name -> grpc.federation.VariableDefinition
17, // 35: grpc.federation.SwitchDefaultExpr.def:type_name -> grpc.federation.VariableDefinition
17, // 36: grpc.federation.GRPCError.def:type_name -> grpc.federation.VariableDefinition
50, // 37: grpc.federation.GRPCError.code:type_name -> google.rpc.Code
27, // 38: grpc.federation.GRPCError.details:type_name -> grpc.federation.GRPCErrorDetail
1, // 39: grpc.federation.GRPCError.log_level:type_name -> grpc.federation.GRPCError.LogLevel
17, // 40: grpc.federation.GRPCErrorDetail.def:type_name -> grpc.federation.VariableDefinition
20, // 41: grpc.federation.GRPCErrorDetail.message:type_name -> grpc.federation.MessageExpr
51, // 42: grpc.federation.GRPCErrorDetail.error_info:type_name -> google.rpc.ErrorInfo
52, // 43: grpc.federation.GRPCErrorDetail.retry_info:type_name -> google.rpc.RetryInfo
53, // 44: grpc.federation.GRPCErrorDetail.debug_info:type_name -> google.rpc.DebugInfo
54, // 45: grpc.federation.GRPCErrorDetail.quota_failure:type_name -> google.rpc.QuotaFailure
55, // 46: grpc.federation.GRPCErrorDetail.precondition_failure:type_name -> google.rpc.PreconditionFailure
56, // 47: grpc.federation.GRPCErrorDetail.bad_request:type_name -> google.rpc.BadRequest
57, // 48: grpc.federation.GRPCErrorDetail.request_info:type_name -> google.rpc.RequestInfo
58, // 49: grpc.federation.GRPCErrorDetail.resource_info:type_name -> google.rpc.ResourceInfo
59, // 50: grpc.federation.GRPCErrorDetail.help:type_name -> google.rpc.Help
60, // 51: grpc.federation.GRPCErrorDetail.localized_message:type_name -> google.rpc.LocalizedMessage
26, // 52: grpc.federation.ValidationExpr.error:type_name -> grpc.federation.GRPCError
31, // 53: grpc.federation.RetryPolicy.constant:type_name -> grpc.federation.RetryPolicyConstant
32, // 54: grpc.federation.RetryPolicy.exponential:type_name -> grpc.federation.RetryPolicyExponential
37, // 55: grpc.federation.FieldRule.oneof:type_name -> grpc.federation.FieldOneof
14, // 56: grpc.federation.FieldRule.env:type_name -> grpc.federation.EnvVarOption
17, // 57: grpc.federation.FieldOneof.def:type_name -> grpc.federation.VariableDefinition
39, // 58: grpc.federation.CELPlugin.export:type_name -> grpc.federation.CELPluginExport
45, // 59: grpc.federation.CELPluginExport.types:type_name -> grpc.federation.CELReceiverType
44, // 60: grpc.federation.CELPluginExport.functions:type_name -> grpc.federation.CELFunction
49, // 61: grpc.federation.CELPluginExport.variables:type_name -> grpc.federation.CELVariable
40, // 62: grpc.federation.CELPluginExport.capability:type_name -> grpc.federation.CELPluginCapability
41, // 63: grpc.federation.CELPluginCapability.env:type_name -> grpc.federation.CELPluginEnvCapability
42, // 64: grpc.federation.CELPluginCapability.file_system:type_name -> grpc.federation.CELPluginFileSystemCapability
43, // 65: grpc.federation.CELPluginCapability.network:type_name -> grpc.federation.CELPluginNetworkCapability
46, // 66: grpc.federation.CELFunction.args:type_name -> grpc.federation.CELFunctionArgument
47, // 67: grpc.federation.CELFunction.return:type_name -> grpc.federation.CELType
44, // 68: grpc.federation.CELReceiverType.methods:type_name -> grpc.federation.CELFunction
47, // 69: grpc.federation.CELFunctionArgument.type:type_name -> grpc.federation.CELType
0, // 70: grpc.federation.CELType.kind:type_name -> grpc.federation.TypeKind
47, // 71: grpc.federation.CELType.repeated:type_name -> grpc.federation.CELType
48, // 72: grpc.federation.CELType.map:type_name -> grpc.federation.CELMapType
47, // 73: grpc.federation.CELMapType.key:type_name -> grpc.federation.CELType
47, // 74: grpc.federation.CELMapType.value:type_name -> grpc.federation.CELType
47, // 75: grpc.federation.CELVariable.type:type_name -> grpc.federation.CELType
61, // 76: grpc.federation.file:extendee -> google.protobuf.FileOptions
62, // 77: grpc.federation.service:extendee -> google.protobuf.ServiceOptions
63, // 78: grpc.federation.method:extendee -> google.protobuf.MethodOptions
64, // 79: grpc.federation.message:extendee -> google.protobuf.MessageOptions
65, // 80: grpc.federation.field:extendee -> google.protobuf.FieldOptions
66, // 81: grpc.federation.enum:extendee -> google.protobuf.EnumOptions
67, // 82: grpc.federation.enum_value:extendee -> google.protobuf.EnumValueOptions
68, // 83: grpc.federation.oneof:extendee -> google.protobuf.OneofOptions
2, // 84: grpc.federation.file:type_name -> grpc.federation.FileRule
7, // 85: grpc.federation.service:type_name -> grpc.federation.ServiceRule
15, // 86: grpc.federation.method:type_name -> grpc.federation.MethodRule
16, // 87: grpc.federation.message:type_name -> grpc.federation.MessageRule
36, // 88: grpc.federation.field:type_name -> grpc.federation.FieldRule
3, // 89: grpc.federation.enum:type_name -> grpc.federation.EnumRule
4, // 90: grpc.federation.enum_value:type_name -> grpc.federation.EnumValueRule
6, // 91: grpc.federation.oneof:type_name -> grpc.federation.OneofRule
92, // [92:92] is the sub-list for method output_type
92, // [92:92] is the sub-list for method input_type
84, // [84:92] is the sub-list for extension type_name
76, // [76:84] is the sub-list for extension extendee
0, // [0:76] is the sub-list for field type_name
}
func init() { file_grpc_federation_federation_proto_init() }
func file_grpc_federation_federation_proto_init() {
if File_grpc_federation_federation_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_grpc_federation_federation_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*FileRule); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*EnumRule); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*EnumValueRule); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*EnumValueAttribute); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*OneofRule); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ServiceRule); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Env); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ServiceVariable); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ServiceVariableValidationExpr); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*EnvVar); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*EnvType); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*EnvMapType); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*EnvVarOption); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*MethodRule); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*MessageRule); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*VariableDefinition); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*MapExpr); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Iterator); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*MessageExpr); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*EnumExpr); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CallExpr); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*SwitchExpr); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*SwitchCaseExpr); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*SwitchDefaultExpr); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GRPCError); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GRPCErrorDetail); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GRPCCallOption); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ValidationExpr); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[28].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*RetryPolicy); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[29].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*RetryPolicyConstant); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[30].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*RetryPolicyExponential); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[31].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*MethodRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[32].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*MethodResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[33].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Argument); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[34].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*FieldRule); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[35].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*FieldOneof); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[36].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CELPlugin); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[37].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CELPluginExport); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[38].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CELPluginCapability); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[39].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CELPluginEnvCapability); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[40].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CELPluginFileSystemCapability); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[41].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CELPluginNetworkCapability); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[42].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CELFunction); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[43].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CELReceiverType); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[44].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CELFunctionArgument); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[45].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CELType); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[46].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CELMapType); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_grpc_federation_federation_proto_msgTypes[47].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CELVariable); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
file_grpc_federation_federation_proto_msgTypes[2].OneofWrappers = []interface{}{}
file_grpc_federation_federation_proto_msgTypes[7].OneofWrappers = []interface{}{
(*ServiceVariable_By)(nil),
(*ServiceVariable_Map)(nil),
(*ServiceVariable_Message)(nil),
(*ServiceVariable_Validation)(nil),
(*ServiceVariable_Enum)(nil),
(*ServiceVariable_Switch)(nil),
}
file_grpc_federation_federation_proto_msgTypes[9].OneofWrappers = []interface{}{}
file_grpc_federation_federation_proto_msgTypes[10].OneofWrappers = []interface{}{
(*EnvType_Kind)(nil),
(*EnvType_Repeated)(nil),
(*EnvType_Map)(nil),
}
file_grpc_federation_federation_proto_msgTypes[12].OneofWrappers = []interface{}{}
file_grpc_federation_federation_proto_msgTypes[13].OneofWrappers = []interface{}{}
file_grpc_federation_federation_proto_msgTypes[14].OneofWrappers = []interface{}{}
file_grpc_federation_federation_proto_msgTypes[15].OneofWrappers = []interface{}{
(*VariableDefinition_By)(nil),
(*VariableDefinition_Map)(nil),
(*VariableDefinition_Message)(nil),
(*VariableDefinition_Call)(nil),
(*VariableDefinition_Validation)(nil),
(*VariableDefinition_Enum)(nil),
(*VariableDefinition_Switch)(nil),
}
file_grpc_federation_federation_proto_msgTypes[16].OneofWrappers = []interface{}{
(*MapExpr_By)(nil),
(*MapExpr_Message)(nil),
(*MapExpr_Enum)(nil),
}
file_grpc_federation_federation_proto_msgTypes[20].OneofWrappers = []interface{}{}
file_grpc_federation_federation_proto_msgTypes[22].OneofWrappers = []interface{}{
(*SwitchCaseExpr_By)(nil),
}
file_grpc_federation_federation_proto_msgTypes[23].OneofWrappers = []interface{}{
(*SwitchDefaultExpr_By)(nil),
}
file_grpc_federation_federation_proto_msgTypes[24].OneofWrappers = []interface{}{}
file_grpc_federation_federation_proto_msgTypes[26].OneofWrappers = []interface{}{}
file_grpc_federation_federation_proto_msgTypes[27].OneofWrappers = []interface{}{}
file_grpc_federation_federation_proto_msgTypes[28].OneofWrappers = []interface{}{
(*RetryPolicy_Constant)(nil),
(*RetryPolicy_Exponential)(nil),
}
file_grpc_federation_federation_proto_msgTypes[29].OneofWrappers = []interface{}{}
file_grpc_federation_federation_proto_msgTypes[30].OneofWrappers = []interface{}{}
file_grpc_federation_federation_proto_msgTypes[31].OneofWrappers = []interface{}{}
file_grpc_federation_federation_proto_msgTypes[32].OneofWrappers = []interface{}{}
file_grpc_federation_federation_proto_msgTypes[33].OneofWrappers = []interface{}{}
file_grpc_federation_federation_proto_msgTypes[34].OneofWrappers = []interface{}{}
file_grpc_federation_federation_proto_msgTypes[35].OneofWrappers = []interface{}{
(*FieldOneof_If)(nil),
(*FieldOneof_Default)(nil),
}
file_grpc_federation_federation_proto_msgTypes[38].OneofWrappers = []interface{}{}
file_grpc_federation_federation_proto_msgTypes[45].OneofWrappers = []interface{}{
(*CELType_Kind)(nil),
(*CELType_Repeated)(nil),
(*CELType_Map)(nil),
(*CELType_Message)(nil),
(*CELType_Enum)(nil),
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_grpc_federation_federation_proto_rawDesc,
NumEnums: 2,
NumMessages: 48,
NumExtensions: 8,
NumServices: 0,
},
GoTypes: file_grpc_federation_federation_proto_goTypes,
DependencyIndexes: file_grpc_federation_federation_proto_depIdxs,
EnumInfos: file_grpc_federation_federation_proto_enumTypes,
MessageInfos: file_grpc_federation_federation_proto_msgTypes,
ExtensionInfos: file_grpc_federation_federation_proto_extTypes,
}.Build()
File_grpc_federation_federation_proto = out.File
file_grpc_federation_federation_proto_rawDesc = nil
file_grpc_federation_federation_proto_goTypes = nil
file_grpc_federation_federation_proto_depIdxs = nil
}
================================================
FILE: _examples/22_switch/grpc-federation.yaml
================================================
imports:
- proto
src:
- proto
out: .
plugins:
- plugin: go
opt: paths=source_relative
- plugin: go-grpc
opt: paths=source_relative
- plugin: grpc-federation
opt:
- paths=source_relative
- import_paths=proto
================================================
FILE: _examples/22_switch/main_test.go
================================================
package main_test
import (
"context"
"log/slog"
"net"
"os"
"testing"
"github.com/google/go-cmp/cmp"
"github.com/google/go-cmp/cmp/cmpopts"
"go.opentelemetry.io/otel"
"go.opentelemetry.io/otel/attribute"
"go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc"
"go.opentelemetry.io/otel/propagation"
"go.opentelemetry.io/otel/sdk/resource"
sdktrace "go.opentelemetry.io/otel/sdk/trace"
semconv "go.opentelemetry.io/otel/semconv/v1.4.0"
"go.uber.org/goleak"
"google.golang.org/grpc"
"google.golang.org/grpc/credentials/insecure"
"google.golang.org/grpc/test/bufconn"
"example/federation"
)
const bufSize = 1024
var (
listener *bufconn.Listener
)
type clientConfig struct{}
func dialer(ctx context.Context, address string) (net.Conn, error) {
return listener.Dial()
}
func TestFederation(t *testing.T) {
defer goleak.VerifyNone(t)
ctx := context.Background()
listener = bufconn.Listen(bufSize)
if os.Getenv("ENABLE_JAEGER") != "" {
exporter, err := otlptracegrpc.New(ctx, otlptracegrpc.WithInsecure())
if err != nil {
t.Fatal(err)
}
tp := sdktrace.NewTracerProvider(
sdktrace.WithBatcher(exporter),
sdktrace.WithResource(
resource.NewWithAttributes(
semconv.SchemaURL,
semconv.ServiceNameKey.String("example22/switch"),
semconv.ServiceVersionKey.String("1.0.0"),
attribute.String("environment", "dev"),
),
),
sdktrace.WithSampler(sdktrace.AlwaysSample()),
)
defer tp.Shutdown(ctx)
otel.SetTextMapPropagator(propagation.TraceContext{})
otel.SetTracerProvider(tp)
}
conn, err := grpc.DialContext(
ctx, "",
grpc.WithContextDialer(dialer),
grpc.WithTransportCredentials(insecure.NewCredentials()),
)
if err != nil {
t.Fatal(err)
}
defer conn.Close()
grpcServer := grpc.NewServer()
defer grpcServer.Stop()
logger := slog.New(slog.NewJSONHandler(os.Stdout, &slog.HandlerOptions{
Level: slog.LevelDebug,
}))
federationServer, err := federation.NewFederationService(federation.FederationServiceConfig{
Logger: logger,
})
if err != nil {
t.Fatal(err)
}
defer federation.CleanupFederationService(ctx, federationServer)
federation.RegisterFederationServiceServer(grpcServer, federationServer)
go func() {
if err := grpcServer.Serve(listener); err != nil {
t.Fatal(err)
}
}()
tests := []struct {
desc string
req *federation.GetPostRequest
want *federation.GetPostResponse
}{
{
desc: "blue",
req: &federation.GetPostRequest{Id: "blue"},
want: &federation.GetPostResponse{Svar: 2, Switch: 3},
},
{
desc: "red",
req: &federation.GetPostRequest{Id: "red"},
want: &federation.GetPostResponse{Svar: 2, Switch: 4},
},
{
desc: "default",
req: &federation.GetPostRequest{Id: "green"},
want: &federation.GetPostResponse{Svar: 2, Switch: 5},
},
}
for _, tt := range tests {
t.Run(tt.desc, func(t *testing.T) {
client := federation.NewFederationServiceClient(conn)
res, err := client.GetPost(ctx, tt.req)
if err != nil {
t.Fatal(err)
}
if diff := cmp.Diff(res, tt.want, cmpopts.IgnoreUnexported(
federation.GetPostResponse{},
)); diff != "" {
t.Errorf("(-got, +want)\n%s", diff)
}
})
}
}
================================================
FILE: _examples/22_switch/proto/buf.yaml
================================================
version: v1
breaking:
use:
- FILE
lint:
use:
- DEFAULT
================================================
FILE: _examples/22_switch/proto/federation/federation.proto
================================================
syntax = "proto3";
package org.federation;
import "grpc/federation/federation.proto";
option go_package = "example/federation;federation";
service FederationService {
option (grpc.federation.service) = {
env {
var { name: "a" type { kind: STRING } option { default: "none" } }
}
var {
name: "svar"
switch {
case { if: "grpc.federation.env.a == 'red'" by: "1" }
default { by: "2" }
}
}
};
rpc GetPost(GetPostRequest) returns (GetPostResponse) {};
}
message GetPostRequest {
string id = 1;
}
message GetPostResponse {
option (.grpc.federation.message) = {
def {
name: "switch"
switch {
case { if: "$.id == 'blue'" by: "3" }
case {
def { name: "red" by: "4" }
if: "$.id == 'red'"
by: "red"
}
default {
def { name: "default" by: "5" }
by: "default"
}
}
}
};
int64 svar = 1 [(grpc.federation.field).by = "grpc.federation.var.svar"];
int64 switch = 2 [(grpc.federation.field).by = "switch"];
}
================================================
FILE: buf.gen.yaml
================================================
version: v1
plugins:
- plugin: go
out: .
opt: module=github.com/mercari/grpc-federation
================================================
FILE: buf.work.yaml
================================================
version: v1
directories:
- proto
================================================
FILE: cmd/grpc-federation-generator/main.go
================================================
package main
import (
"context"
"log"
"os"
"github.com/jessevdk/go-flags"
"github.com/mercari/grpc-federation/generator"
)
type option struct {
Config string `description:"specify the config path" long:"config" short:"c" default:"grpc-federation.yaml"`
WatchMode bool `description:"enable 'watch' mode to monitor changes in proto files and generate interactively" short:"w"`
}
const (
exitOK = 0
exitERR = 1
)
func main() {
args, opt, err := parseOpt()
if err != nil {
// output error message to stderr by library
os.Exit(exitOK)
}
if err := _main(context.Background(), args, opt); err != nil {
log.Printf("%+v", err)
os.Exit(exitERR)
}
os.Exit(exitOK)
}
func _main(ctx context.Context, args []string, opt *option) error {
cfg, err := generator.LoadConfig(opt.Config)
if err != nil {
return err
}
var protoPath string
if len(args) != 0 {
protoPath = args[0]
}
g := generator.New(cfg)
defer g.Close(ctx)
var opts []generator.Option
if opt.WatchMode {
opts = append(opts, generator.WatchMode())
}
g.SetPostProcessHandler(func(ctx context.Context, path string, result generator.Result) error {
for _, r := range result {
if err := r.WriteFiles(ctx); err != nil {
return err
}
}
return nil
})
if err := g.Generate(ctx, protoPath, opts...); err != nil {
return err
}
return nil
}
func parseOpt() ([]string, *option, error) {
var opt option
parser := flags.NewParser(&opt, flags.Default)
args, err := parser.Parse()
if err != nil {
return nil, nil, err
}
return args, &opt, nil
}
================================================
FILE: cmd/grpc-federation-language-server/README.md
================================================
# gRPC Federation Language Server
## Features
### Syntax Highlighting
Semantic Highlighting allows for accurate recognition of gRPC Federation options.
Syntax highlighting is available in quoted value. So, this is especially effective in CEL value.
### Goto Definition
It supports jumps to the following definition sources.
- Imported file name
- e.g.) import "path/to/foo.proto"
- Type of field definition
- e.g.) Foo foo = 1
- gRPC method name
- e.g.) def { call { method: "foopkg.FooService/BarMethod" } }
- Alias name
- e.g.) option (grpc.federation.message).alias = "foopkg.Bar"
### Diagnostics
### Code Completion
## Installation
```console
$ go install github.com/mercari/grpc-federation/cmd/grpc-federation-language-server@latest
```
## Usage
```console
Usage:
grpc-federation-language-server [OPTIONS]
Application Options:
--log-file= specify the log file path for debugging
-I, --import-path= specify the import path for loading proto file
Help Options:
-h, --help Show this help message
```
## Clients
The list of extensions or plugins for the IDE.
### Visual Studio Code
https://marketplace.visualstudio.com/items?itemName=Mercari.grpc-federation
================================================
FILE: cmd/grpc-federation-language-server/main.go
================================================
package main
import (
"context"
"fmt"
"log"
"os"
"github.com/jessevdk/go-flags"
"github.com/mercari/grpc-federation/lsp/server"
)
type option struct {
LogFile string `description:"specify the log file path for debugging" long:"log-file"`
ImportPaths []string `description:"specify the import path for loading proto file" long:"import-path" short:"I"`
}
func main() {
if err := run(context.Background()); err != nil {
log.Fatalf("[grpc-federation-language-server]: %+v", err)
}
}
func parseOpt() ([]string, *option, error) {
var opt option
parser := flags.NewParser(&opt, flags.Default)
args, err := parser.Parse()
if err != nil {
return nil, nil, err
}
return args, &opt, nil
}
func run(ctx context.Context) error {
_, opt, err := parseOpt()
if err != nil {
// output error message to stderr by library
return nil
}
var opts []server.ServerOption
if opt.LogFile != "" {
logFile, err := os.OpenFile(opt.LogFile, os.O_APPEND|os.O_CREATE|os.O_WRONLY, 0666)
if err != nil {
return fmt.Errorf("failed to open %s: %w", opt.LogFile, err)
}
defer logFile.Close()
opts = append(opts, server.LogFileOption(logFile))
}
if len(opt.ImportPaths) != 0 {
opts = append(opts, server.ImportPathsOption(opt.ImportPaths))
}
svr := server.New(opts...)
svr.Run(ctx)
return nil
}
================================================
FILE: cmd/grpc-federation-linter/main.go
================================================
package main
import (
"context"
"fmt"
"log"
"os"
"github.com/jessevdk/go-flags"
"github.com/mercari/grpc-federation/source"
"github.com/mercari/grpc-federation/validator"
)
type option struct {
ImportPaths []string `description:"specify the import path for loading proto file" long:"import-path" short:"I"`
}
const (
exitOK = 0
exitERR = 1
)
func main() {
args, opt, err := parseOpt()
if err != nil {
// output error message to stderr by library
os.Exit(exitERR)
}
if len(args) == 0 {
log.Fatal("[grpc-federation-linter]: required file path to validation")
}
ctx := context.Background()
var existsErr bool
for _, arg := range args {
path := arg
f, err := os.ReadFile(path)
if err != nil {
log.Fatalf("[grpc-federation-linter]: failed to read file %s: %v", path, err)
}
file, err := source.NewFile(path, f)
if err != nil {
log.Fatalf("[grpc-federation-linter]: %v", err)
}
v := validator.New()
outs := v.Validate(ctx, file, validator.ImportPathOption(opt.ImportPaths...))
if len(outs) == 0 {
continue
}
fmt.Println(validator.Format(outs))
if validator.ExistsError(outs) {
existsErr = true
}
}
if existsErr {
os.Exit(exitERR)
}
os.Exit(exitOK)
}
func parseOpt() ([]string, *option, error) {
var opt option
parser := flags.NewParser(&opt, flags.Default)
args, err := parser.Parse()
if err != nil {
return nil, nil, err
}
return args, &opt, nil
}
================================================
FILE: cmd/grpc-federation-mcp-server/assets/docs.md
================================================
# How to use gRPC Federation
## Understanding gRPC Federation
First, read https://deepwiki.com/mercari/grpc-federation to understand gRPC Federation.
The `grpc/federation/federation.proto` is defined at https://github.com/mercari/grpc-federation/blob/main/proto/grpc/federation/federation.proto.
The schema defined in this proto represents the options configurable in gRPC Federation.
Detailed explanations of these options can be found at https://github.com/mercari/grpc-federation/blob/main/docs/references.md.
When describing gRPC Federation options, implement them based on this information.
## Practices for Describing gRPC Federation Options
- If you want to validate or process errors returned from dependent microservices, use the `(grpc.federation.message).def.call.error` option.
- Avoid creating messages unrelated to the response structure of the microservice you are building.
- If the same value is always returned, use Service Variable. Otherwise, create a message only when the same process is used in multiple places and the process itself is complex.
If the process is not complex, even if it is the same process, it is preferable to write the process directly in the existing message. Actively use the alias functionality of messages or enums when simple mapping suffices.
- To avoid redundant `grpc.federation.field` option descriptions, actively use the `autobind` feature.
- You can associate enum values with strings using `(grpc.federation.enum_value).attr`. Use this feature actively if necessary.
- gRPC Federation provides a wide range of standard libraries starting with `grpc.federation.*`. Consider whether these features can be utilized as needed.
- When the package is the same, you can omit the package prefix when referencing other messages or enums using `(grpc.federation.message).def.message` or `(grpc.federation.message).def.enum`. Otherwise, always include the package prefix.
- The CEL specification is available at https://github.com/google/cel-spec/blob/master/doc/langdef.md.
- Additionally, in gRPC Federation, you can use the optional keyword (`?`). Always consider using optional when the existence of the target value cannot be guaranteed during field access or index access (the optional feature is also explained at https://pkg.go.dev/github.com/google/cel-go/cel#hdr-Syntax_Changes-OptionalTypes).
- Use `custom_resolver` only as a last resort. Use it only when it is impossible to express something in proto.
## Examples of gRPC Federation
To learn more about how to describe gRPC Federation options, refer to the examples at https://github.com/mercari/grpc-federation/tree/main/_examples.
Each example includes Go language files (`*_grpc_federation.pb.go`) and test codes generated automatically from the proto descriptions. Read these codes as needed to understand the meaning of the options.
## When Changing gRPC Federation Options
When changing gRPC Federation options, always compile the target proto file and repeat the process until it succeeds to verify the correctness of the description.
Follow the steps below to compile the proto file:
1. Extract the list of import files from the proto file to be compiled. Use the `get_import_proto_list` tool for extraction.
2. Create the absolute path of the import path required to compile the obtained import file list. Analyze the current repository structure to use the correct information.
3. Repeat steps 1 to 2 for the obtained import paths to create a unique and complete list of import paths required for compilation.
4. Use the `compile_proto` tool with the extracted import path list to compile the target proto file.
================================================
FILE: cmd/grpc-federation-mcp-server/main.go
================================================
package main
import (
"context"
"embed"
"encoding/json"
"fmt"
"log"
"os"
"github.com/mark3labs/mcp-go/mcp"
"github.com/mark3labs/mcp-go/server"
"github.com/mercari/grpc-federation/source"
"github.com/mercari/grpc-federation/validator"
)
//go:embed assets/*
var assets embed.FS
func main() {
docs, err := assets.ReadFile("assets/docs.md")
if err != nil {
log.Fatalf("failed to read document: %v", err)
}
// Create a new MCP server
s := server.NewMCPServer(
"gRPC Federation MCP Server",
"1.0.0",
server.WithToolCapabilities(false),
server.WithResourceCapabilities(false, false),
server.WithRecovery(),
server.WithInstructions(string(docs)),
)
s.AddTool(
mcp.NewTool(
"get_import_proto_list",
mcp.WithDescription("Returns a list of import proto files used in the specified proto file"),
mcp.WithString(
"path",
mcp.Description("The absolute path to the proto file to be analyzed"),
mcp.Required(),
),
),
func(ctx context.Context, r mcp.CallToolRequest) (*mcp.CallToolResult, error) {
args, ok := r.Params.Arguments.(map[string]any)
if !ok {
return nil, fmt.Errorf("unexpected argument format: %T", r.Params.Arguments)
}
path, ok := args["path"].(string)
if !ok {
return nil, fmt.Errorf("failed to find path parameter from arguments: %v", args)
}
content, err := os.ReadFile(path)
if err != nil {
return nil, fmt.Errorf("failed to read file: %w", err)
}
f, err := source.NewFile(path, content)
if err != nil {
return nil, err
}
list, err := json.Marshal(append(f.Imports(), f.ImportsByImportRule()...))
if err != nil {
return nil, err
}
return &mcp.CallToolResult{
Content: []mcp.Content{
mcp.TextContent{
Type: "text",
Text: string(list),
},
},
}, nil
},
)
s.AddTool(
mcp.NewTool(
"compile_proto",
mcp.WithDescription("Compile the proto file using the gRPC Federation option"),
mcp.WithString(
"path",
mcp.Description("The absolute path to the proto file to be analyzed"),
mcp.Required(),
),
mcp.WithArray(
"import_paths",
mcp.Description("Specify the list of import paths required to locate dependency files during compilation. It is recommended to obtain this list using the get_import_proto_list tool"),
mcp.Required(),
),
),
func(ctx context.Context, r mcp.CallToolRequest) (*mcp.CallToolResult, error) {
args, ok := r.Params.Arguments.(map[string]any)
if !ok {
return nil, fmt.Errorf("unexpected argument format: %T", r.Params.Arguments)
}
path, ok := args["path"].(string)
if !ok {
return nil, fmt.Errorf("failed to find path parameter from arguments: %v", args)
}
importPathsArg, ok := args["import_paths"].([]any)
if !ok {
return nil, fmt.Errorf("failed to find import_paths parameter from arguments: %v", args)
}
content, err := os.ReadFile(path)
if err != nil {
return nil, fmt.Errorf("failed to read file: %w", err)
}
file, err := source.NewFile(path, content)
if err != nil {
return nil, err
}
importPaths := make([]string, 0, len(importPathsArg))
for _, p := range importPathsArg {
importPath, ok := p.(string)
if !ok {
return nil, fmt.Errorf("failed to get import_paths element. required type is string but got %T", p)
}
importPaths = append(importPaths, importPath)
}
v := validator.New()
outs := v.Validate(context.Background(), file, validator.ImportPathOption(importPaths...))
if validator.ExistsError(outs) {
return nil, fmt.Errorf("failed to compile:\n%s", validator.Format(outs))
}
return &mcp.CallToolResult{
Content: []mcp.Content{
mcp.TextContent{
Type: "text",
Text: "build successful",
},
},
}, nil
},
)
s.AddResource(
mcp.NewResource(
"grpc-federation",
"grpc-federation",
mcp.WithResourceDescription("gRPC Federation Document"),
mcp.WithMIMEType("text/markdown"),
),
func(ctx context.Context, request mcp.ReadResourceRequest) ([]mcp.ResourceContents, error) {
return []mcp.ResourceContents{
&mcp.TextResourceContents{
URI: "https://github.com/mercari/grpc-federation",
MIMEType: "text/markdown",
Text: string(docs),
},
}, nil
},
)
s.AddPrompt(
mcp.NewPrompt(
"grpc_federation",
mcp.WithPromptDescription("How to use gRPC Federation"),
),
func(ctx context.Context, request mcp.GetPromptRequest) (*mcp.GetPromptResult, error) {
return mcp.NewGetPromptResult("How to use gRPC Federation",
[]mcp.PromptMessage{
mcp.NewPromptMessage(
mcp.RoleAssistant,
mcp.NewTextContent(string(docs)),
),
},
), nil
},
)
// Start the server
if err := server.ServeStdio(s); err != nil {
log.Fatalf("failed to start server: %v", err)
}
}
================================================
FILE: cmd/grpcfedctl/main.go
================================================
package main
import (
"os"
"github.com/jessevdk/go-flags"
)
type option struct {
Version VersionCommand `description:"print version" command:"version"`
Plugin PluginCommand `description:"manage plugin" command:"plugin"`
}
const (
exitOK = 0
exitERR = 1
)
var opt option
func main() {
parser := flags.NewParser(&opt, flags.Default)
if _, err := parser.Parse(); err != nil {
if !flags.WroteHelp(err) {
os.Exit(exitERR)
}
}
os.Exit(exitOK)
}
================================================
FILE: cmd/grpcfedctl/plugin.go
================================================
package main
import (
"context"
"errors"
"fmt"
"os"
"path/filepath"
"github.com/tetratelabs/wazero"
)
type PluginCommand struct {
Cache PluginCacheCommand `description:"manage cache for plugin" command:"cache"`
}
type PluginCacheCommand struct {
Create PluginCacheCreateCommand `description:"create cache for plugin" command:"create"`
}
type PluginCacheCreateCommand struct {
Name string `description:"plugin name" long:"name" required:"true"`
Out string `description:"specify the output directory. If not specified, it will be created in the current directory" short:"o" long:"out"`
}
func (c *PluginCacheCreateCommand) Execute(args []string) error {
if len(args) != 1 {
return errors.New("you need to specify single wasm file")
}
ctx := context.Background()
outDir := c.Out
if outDir == "" {
outDir = "."
}
cache, err := wazero.NewCompilationCacheWithDir(filepath.Join(outDir, "grpc-federation", c.Name))
if err != nil {
return fmt.Errorf("failed to setup cache directory %s: %w", outDir, err)
}
path := args[0]
f, err := os.ReadFile(path)
if err != nil {
return fmt.Errorf("failed to read file %s: %w", path, err)
}
if _, err := wazero.NewRuntimeWithConfig(
ctx,
wazero.NewRuntimeConfigCompiler().WithCompilationCache(cache).WithCloseOnContextDone(true),
).CompileModule(ctx, f); err != nil {
return fmt.Errorf("failed to compile wasm file: %w", err)
}
return nil
}
================================================
FILE: cmd/grpcfedctl/version.go
================================================
package main
import (
"fmt"
"os"
grpcfed "github.com/mercari/grpc-federation/grpc/federation"
)
type VersionCommand struct {
}
func (c *VersionCommand) Execute(_ []string) error {
fmt.Fprintln(os.Stdout, grpcfed.Version)
return nil
}
================================================
FILE: cmd/protoc-gen-grpc-federation/main.go
================================================
package main
import (
"context"
"fmt"
"io"
"log"
"os"
"github.com/jessevdk/go-flags"
"google.golang.org/protobuf/proto"
"google.golang.org/protobuf/types/pluginpb"
"github.com/mercari/grpc-federation/generator"
grpcfed "github.com/mercari/grpc-federation/grpc/federation"
)
type option struct {
Version bool `description:"show the version" long:"version" short:"v"`
}
const (
exitOK = 0
exitERR = 1
)
func main() {
_, opt, err := parseOpt()
if err != nil {
// output error message to stderr by library
os.Exit(exitOK)
}
if opt.Version {
fmt.Fprintln(os.Stdout, grpcfed.Version)
return
}
if err := _main(); err != nil {
log.Fatal(err)
}
}
func _main() error {
req, err := parseRequest(os.Stdin)
if err != nil {
return err
}
resp, err := generator.CreateCodeGeneratorResponse(context.Background(), req)
if err != nil {
return err
}
if resp == nil {
return nil
}
if err := outputResponse(resp); err != nil {
return err
}
return nil
}
func parseRequest(r io.Reader) (*pluginpb.CodeGeneratorRequest, error) {
buf, err := io.ReadAll(r)
if err != nil {
return nil, err
}
var req pluginpb.CodeGeneratorRequest
if err := proto.Unmarshal(buf, &req); err != nil {
return nil, err
}
return &req, nil
}
func outputResponse(resp *pluginpb.CodeGeneratorResponse) error {
buf, err := proto.Marshal(resp)
if err != nil {
return err
}
if _, err = os.Stdout.Write(buf); err != nil {
return err
}
return nil
}
func parseOpt() ([]string, *option, error) {
var opt option
parser := flags.NewParser(&opt, flags.Default)
args, err := parser.Parse()
if err != nil {
return nil, nil, err
}
return args, &opt, nil
}
================================================
FILE: compiler/compiler.go
================================================
package compiler
import (
"bytes"
"context"
"fmt"
"io"
"os"
"path/filepath"
"strings"
"github.com/bufbuild/protocompile"
"github.com/bufbuild/protocompile/linker"
"github.com/bufbuild/protocompile/protoutil"
"github.com/bufbuild/protocompile/reporter"
"google.golang.org/protobuf/reflect/protoreflect"
"google.golang.org/protobuf/types/descriptorpb"
"github.com/mercari/grpc-federation/proto/grpc/federation"
"github.com/mercari/grpc-federation/proto_deps/google/rpc"
"github.com/mercari/grpc-federation/source"
_ "embed"
)
// Compiler provides a way to generate file descriptors from a Protocol Buffers file without relying on protoc command.
// This allows you to do things like validate proto files without relying on protoc.
type Compiler struct {
importPaths []string
manualImport bool
importRule bool
}
// Option represents compiler option.
type Option func(*Compiler)
// ImportPathOption used to add a path to reference a proto file.
// By default, only the directory where the starting file exists is added to the import path.
func ImportPathOption(path ...string) Option {
return func(c *Compiler) {
c.importPaths = append(c.importPaths, path...)
}
}
// ManualImportOption stops importing `grpc/federation/federation.proto` file and its dependencies
// By default if `grpc/federation/federation.proto` file and its dependencies do not exist, automatically imports it.
// The version of the proto file is the same as the version when the compiler is built.
func ManualImportOption() Option {
return func(c *Compiler) {
c.manualImport = true
}
}
// ImportRuleOption used to reference proto files imported by grpc.federation.file.import rule.
func ImportRuleOption() Option {
return func(c *Compiler) {
c.importRule = true
}
}
// New creates compiler instance.
func New() *Compiler {
return &Compiler{}
}
type errorReporter struct {
errs []reporter.ErrorWithPos
}
func (r *errorReporter) Error(err reporter.ErrorWithPos) error {
r.errs = append(r.errs, err)
return nil
}
func (r *errorReporter) Warning(_ reporter.ErrorWithPos) {
}
// CompilerError has error with source position.
type CompilerError struct {
Err error
ErrWithPos []reporter.ErrorWithPos
}
func (e *CompilerError) Error() string {
if len(e.ErrWithPos) == 0 {
return e.Err.Error()
}
var errs []string
for _, err := range e.ErrWithPos {
errs = append(errs, err.Error())
}
return fmt.Sprintf("%s\n%s", e.Err.Error(), strings.Join(errs, "\n"))
}
const (
grpcFederationFilePath = "grpc/federation/federation.proto"
grpcFederationPrivateFilePath = "grpc/federation/private.proto"
grpcFederationTimeFilePath = "grpc/federation/time.proto"
grpcFederationPluginFilePath = "grpc/federation/plugin.proto"
googleRPCCodeFilePath = "google/rpc/code.proto"
googleRPCErrorDetailsFilePath = "google/rpc/error_details.proto"
)
func RelativePathFromImportPaths(protoPath string, importPaths []string) (string, error) {
if len(importPaths) == 0 {
return protoPath, nil
}
absImportPaths := make([]string, 0, len(importPaths))
for _, path := range importPaths {
if filepath.IsAbs(path) {
absImportPaths = append(absImportPaths, path)
} else {
abs, err := filepath.Abs(path)
if err != nil {
return "", fmt.Errorf("failed to get absolute path from %s: %w", path, err)
}
absImportPaths = append(absImportPaths, abs)
}
}
absProtoPath := protoPath
if !filepath.IsAbs(protoPath) {
path, err := filepath.Abs(protoPath)
if err != nil {
return "", fmt.Errorf("failed to get absolute path from %s: %w", protoPath, err)
}
absProtoPath = path
}
for _, importPath := range absImportPaths {
if strings.HasPrefix(absProtoPath, importPath) {
relPath, err := filepath.Rel(importPath, absProtoPath)
if err != nil {
return "", fmt.Errorf("failed to get relative path from %s and %s: %w", importPath, absProtoPath, err)
}
return relPath, nil
}
}
return protoPath, nil
}
type dependentProtoFileSet struct {
path string
data []byte
}
// Compile compile the target Protocol Buffers file and produces all file descriptors.
func (c *Compiler) Compile(ctx context.Context, file *source.File, opts ...Option) ([]*descriptorpb.FileDescriptorProto, error) {
c.importPaths = []string{}
for _, opt := range opts {
opt(c)
}
relPath, err := RelativePathFromImportPaths(file.Path(), c.importPaths)
if err != nil {
return nil, err
}
var r errorReporter
compiler := protocompile.Compiler{
Resolver: protocompile.WithStandardImports(&protocompile.SourceResolver{
ImportPaths: append(c.importPaths, filepath.Dir(relPath), ""),
Accessor: func(p string) (io.ReadCloser, error) {
if p == file.Path() {
return io.NopCloser(bytes.NewBuffer(file.Content())), nil
}
f, err := os.Open(p)
if err != nil {
for _, set := range []*dependentProtoFileSet{
{path: grpcFederationFilePath, data: federation.ProtoFile},
{path: grpcFederationPrivateFilePath, data: federation.PrivateProtoFile},
{path: grpcFederationTimeFilePath, data: federation.TimeProtoFile},
{path: grpcFederationPluginFilePath, data: federation.PluginProtoFile},
{path: googleRPCCodeFilePath, data: rpc.GoogleRPCCodeProtoFile},
{path: googleRPCErrorDetailsFilePath, data: rpc.GoogleRPCErrorDetailsProtoFile},
} {
if !c.manualImport && strings.HasSuffix(p, set.path) {
return io.NopCloser(bytes.NewBuffer(set.data)), nil
}
}
return nil, err
}
return f, nil
},
}),
SourceInfoMode: protocompile.SourceInfoStandard,
Reporter: &r,
}
files := []string{relPath}
files = append(files, file.Imports()...)
if c.importRule {
files = append(files, file.ImportsByImportRule()...)
}
linkedFiles, err := compiler.Compile(ctx, files...)
if err != nil {
return nil, &CompilerError{Err: err, ErrWithPos: r.errs}
}
protoFiles := c.getProtoFiles(linkedFiles)
return protoFiles, nil
}
func (c *Compiler) getProtoFiles(linkedFiles []linker.File) []*descriptorpb.FileDescriptorProto {
var (
protos []*descriptorpb.FileDescriptorProto
protoUniqueMap = make(map[string]struct{})
)
for _, linkedFile := range linkedFiles {
for _, proto := range c.getFileDescriptors(linkedFile) {
if _, exists := protoUniqueMap[proto.GetName()]; exists {
continue
}
protos = append(protos, proto)
protoUniqueMap[proto.GetName()] = struct{}{}
}
}
return protos
}
func (c *Compiler) getFileDescriptors(file protoreflect.FileDescriptor) []*descriptorpb.FileDescriptorProto {
var protoFiles []*descriptorpb.FileDescriptorProto
fileImports := file.Imports()
for i := 0; i < fileImports.Len(); i++ {
protoFiles = append(protoFiles, c.getFileDescriptors(fileImports.Get(i))...)
}
protoFiles = append(protoFiles, protoutil.ProtoFromFileDescriptor(file))
return protoFiles
}
================================================
FILE: compiler/compiler_test.go
================================================
package compiler_test
import (
"context"
"os"
"path/filepath"
"testing"
"github.com/mercari/grpc-federation/compiler"
"github.com/mercari/grpc-federation/source"
)
func TestCompiler(t *testing.T) {
ctx := context.Background()
path := filepath.Join("testdata", "service.proto")
content, err := os.ReadFile(path)
if err != nil {
t.Fatal(err)
}
file, err := source.NewFile(path, content)
if err != nil {
t.Fatal(err)
}
c := compiler.New()
protos, err := c.Compile(ctx, file)
if err != nil {
t.Fatal(err)
}
//nolint: gocritic
// service.proto
// post.proto
// user.proto
// federation.proto
// private.proto
// time.proto
// google/protobuf/descriptor.proto
// google/protobuf/any.proto
// google/protobuf/duration.proto
// google/protobuf/timestamp.proto
// google/rpc/error_details.proto
// google/rpc/code.proto
const expectedProtoNum = 12
if len(protos) != expectedProtoNum {
t.Fatalf("failed to get protos. expected %d but got %d", expectedProtoNum, len(protos))
}
}
================================================
FILE: compiler/testdata/post.proto
================================================
syntax = "proto3";
package post;
option go_package = "example/post;post";
service PostService {
rpc GetPost(GetPostRequest) returns (GetPostResponse) {};
rpc GetPosts(GetPostsRequest) returns (GetPostsResponse) {};
}
message GetPostRequest {
string id = 1;
}
message GetPostResponse {
Post post = 1;
}
message GetPostsRequest {
repeated string ids = 1;
}
message GetPostsResponse {
repeated Post posts = 1;
}
message Post {
string id = 1;
string title = 2;
string content = 3;
string user_id = 4;
}
================================================
FILE: compiler/testdata/service.proto
================================================
syntax = "proto3";
package federation;
import "federation.proto";
import "post.proto";
import "user.proto";
option go_package = "example/federation;federation";
service FederationService {
option (grpc.federation.service) = {};
rpc GetPost(GetPostRequest) returns (GetPostResponse) {};
}
message GetPostRequest {
string id = 1;
}
message GetPostResponse {
option (grpc.federation.message) = {
def {
name: "post"
message {
name: "Post"
args { name: "id", by: "$.id" }
}
}
};
Post post = 1 [(grpc.federation.field).by = "post"];
}
message Post {
option (grpc.federation.message) = {
def [
{
name: "res"
call {
method: "post.PostService/GetPost"
request { field: "id", by: "$.id" }
}
},
{ name: "post", by: "res.post", autobind: true },
{
name: "user"
message {
name: "User"
args { inline: "post" }
}
}
]
};
string id = 1;
string title = 2;
string content = 3;
User user = 4 [(grpc.federation.field).by = "user"];
}
message User {
option (grpc.federation.message) = {
def {
name: "res"
call {
method: "user.UserService/GetUser"
request { field: "id", by: "$.user_id" }
}
}
def { name: "user", by: "res.user", autobind: true }
};
string id = 1;
string name = 2;
}
================================================
FILE: compiler/testdata/user.proto
================================================
syntax = "proto3";
package user;
option go_package = "example/user;user";
service UserService {
rpc GetUser(GetUserRequest) returns (GetUserResponse) {};
rpc GetUsers(GetUsersRequest) returns (GetUsersResponse) {};
}
message GetUserRequest {
string id = 1;
}
message GetUserResponse {
User user = 1;
}
message GetUsersRequest {
repeated string ids = 1;
}
message GetUsersResponse {
repeated User users = 1;
}
message User {
string id = 1;
string name = 2;
}
================================================
FILE: demo/Makefile
================================================
export
GOBIN := $(PWD)/bin
PATH := $(GOBIN):$(PATH)
KO_DOCKER_REPO := ko.local
KO_DEFAULTPLATFORMS := linux/amd64
SERVICES := swapi film person planet species starship vehicle
.PHONY: tools
tools:
go install github.com/bufbuild/buf/cmd/buf@v1.32.2
go install github.com/google/ko@v0.15.4
go install github.com/fullstorydev/grpcurl/cmd/grpcurl@v1.9.1
.PHONY: build
build:
$(foreach svc,$(SERVICES),$(MAKE) build/$(svc))
build/%:
ko build ./cmd/$* -B --sbom=none
.PHONY: up
up:
docker compose up
.PHONY: generate
generate:
$(GOBIN)/buf generate
.PHONY: test
test:
go test -race ./... -count=1
================================================
FILE: demo/README.md
================================================
# SWAPI powered by gRPC Federation
Here is an example of building a simple service using gRPC Federation with SWAPI.
## What is SWAPI ?
[SWAPI](https://swapi.dev/) is one of the public APIs. It frequently appears as an example for GraphQL and gRPC, so we are using it with gRPC Federation as well.
## Background and Architecture
The service we are building this time with gRPC Federation is a BFF (Backend for Frontend) that consolidates the results of several pre-existing services ( `film` , `person` , `planet` , `species` , `starship` , `vehicle` ).
Please consider these pre-existing services as in-house microservices in a real-world scenario.
Each of them is developed and managed by a different team.
Each microservice exposes internal APIs using gRPC, with schemas managed by Protocol Buffers.
Our goal is to build a gRPC service that aggregates the necessary information from each service and exposes it externally.
[](./images/arch.png)
## How to use
The Protocol Buffers files for each microservice are located under the `./proto` directory. Additionally, we will create the `swapi.proto` file for this project, which is already placed in `./proto/swapi.proto` .
The `swapi.proto` file contains the API schema and the gRPC Federation options.
The following is an excerpt from it.
- swapi.proto
```proto
// GetPersonReply message for SWAPI.
message GetPersonReply {
// gRPC Federation Options.
option (grpc.federation.message) = {
def {
name: "res"
call {
method: "swapi.person.PersonService/GetPerson"
request { field: "id" by: "$.id" }
}
}
...
};
}
```
In this demo, we will use `Buf` to generate code from the proto files utilizing gRPC Federation. First, you need to install the Buf CLI by running the following command:
```console
make tools
```
If the installation is successful, the `buf` and `ko` and `grpcurl` binaries will be installed under the `bin` directory.
To generate code using Buf, execute the following command:
```console
make generate
```
The code will be generated under the `./swapi/swapi` directory.
Next, build the server and create the image. In this demo, it's necessary to start other microservices simultaneously, so the code for each is also provided. To build the code for all services and create images, execute the following command:
```console
make build
```
Finally, start all services. Use `docker compose` for launching. The SWAPI service will be available on port `3000`. ( See [config file](./compose.yaml) )
```console
make up
```
Now, let's send a request to confirm the functionality. If you receive a response after sending a request like the following, the application is running successfully.
```
./bin/grpcurl -plaintext -d '{"id": 1}' localhost:3000 swapi.SWAPI/GetPerson
```
Additionally, we are using [JAEGER](https://www.jaegertracing.io/) to visualize OpenTelemetry traces. It is exposed on port `4000`, so please try accessing it in your browser. If you can see a page like the following, it means it's successful.
- `http://localhost:4000`
[](./images/jaeger.png)
## Conclusion
The team responsible for providing the SWAPI service needs to develop and maintain only the `swapi.proto` file and the `./cmd/swapi/main.go` file. The `swapi.proto` file utilizes gRPC Federation. In the `./cmd/swapi/main.go` file, additional tasks such as defining gRPC clients, which cannot be described solely with gRPC Federation, need to be addressed.
Please feel free to edit the `swapi.proto` file and explore the capabilities of gRPC Federation !!!
================================================
FILE: demo/buf.gen.yaml
================================================
version: v2
managed:
enabled: true
plugins:
- remote: buf.build/protocolbuffers/go:v1.34.1
out: .
opt: module=github.com/mercari/grpc-federation/demo
- remote: buf.build/grpc/go:v1.4.0
out: .
opt: module=github.com/mercari/grpc-federation/demo
- remote: buf.build/community/mercari-grpc-federation:v1.9.8
out: .
opt:
- module=github.com/mercari/grpc-federation/demo
- import_paths=proto
================================================
FILE: demo/buf.work.yaml
================================================
version: v1
directories:
- proto
================================================
FILE: demo/cmd/film/main.go
================================================
package main
import (
"fmt"
"log"
"net"
"os"
"google.golang.org/grpc"
"github.com/mercari/grpc-federation/demo/services/film"
filmpb "github.com/mercari/grpc-federation/demo/swapi/film"
)
func main() {
if err := run(); err != nil {
panic(err)
}
}
func run() error {
port := os.Getenv("GRPC_PORT")
if port == "" {
return fmt.Errorf("must be specified GRPC_PORT environment")
}
listener, err := net.Listen("tcp", fmt.Sprintf("0.0.0.0:%s", port))
if err != nil {
return err
}
grpcServer := grpc.NewServer()
filmpb.RegisterFilmServiceServer(grpcServer, film.NewFilmService())
log.Printf("listening gRPC: %s", port)
if err := grpcServer.Serve(listener); err != nil {
return err
}
return nil
}
================================================
FILE: demo/cmd/person/main.go
================================================
package main
import (
"fmt"
"log"
"net"
"os"
"google.golang.org/grpc"
"github.com/mercari/grpc-federation/demo/services/person"
personpb "github.com/mercari/grpc-federation/demo/swapi/person"
)
func main() {
if err := run(); err != nil {
panic(err)
}
}
func run() error {
port := os.Getenv("GRPC_PORT")
if port == "" {
return fmt.Errorf("must be specified GRPC_PORT environment")
}
listener, err := net.Listen("tcp", fmt.Sprintf("0.0.0.0:%s", port))
if err != nil {
return err
}
grpcServer := grpc.NewServer()
personpb.RegisterPersonServiceServer(grpcServer, person.NewPersonService())
log.Printf("listening gRPC: %s", port)
if err := grpcServer.Serve(listener); err != nil {
return err
}
return nil
}
================================================
FILE: demo/cmd/planet/main.go
================================================
package main
import (
"fmt"
"log"
"net"
"os"
"google.golang.org/grpc"
"github.com/mercari/grpc-federation/demo/services/planet"
planetpb "github.com/mercari/grpc-federation/demo/swapi/planet"
)
func main() {
if err := run(); err != nil {
panic(err)
}
}
func run() error {
port := os.Getenv("GRPC_PORT")
if port == "" {
return fmt.Errorf("must be specified GRPC_PORT environment")
}
listener, err := net.Listen("tcp", fmt.Sprintf("0.0.0.0:%s", port))
if err != nil {
return err
}
grpcServer := grpc.NewServer()
planetpb.RegisterPlanetServiceServer(grpcServer, planet.NewPlanetService())
log.Printf("listening gRPC: %s", port)
if err := grpcServer.Serve(listener); err != nil {
return err
}
return nil
}
================================================
FILE: demo/cmd/species/main.go
================================================
package main
import (
"fmt"
"log"
"net"
"os"
"google.golang.org/grpc"
"github.com/mercari/grpc-federation/demo/services/species"
speciespb "github.com/mercari/grpc-federation/demo/swapi/species"
)
func main() {
if err := run(); err != nil {
panic(err)
}
}
func run() error {
port := os.Getenv("GRPC_PORT")
if port == "" {
return fmt.Errorf("must be specified GRPC_PORT environment")
}
listener, err := net.Listen("tcp", fmt.Sprintf("0.0.0.0:%s", port))
if err != nil {
return err
}
grpcServer := grpc.NewServer()
speciespb.RegisterSpeciesServiceServer(grpcServer, species.NewSpeciesService())
log.Printf("listening gRPC: %s", port)
if err := grpcServer.Serve(listener); err != nil {
return err
}
return nil
}
================================================
FILE: demo/cmd/starship/main.go
================================================
package main
import (
"fmt"
"log"
"net"
"os"
"google.golang.org/grpc"
"github.com/mercari/grpc-federation/demo/services/starship"
starshippb "github.com/mercari/grpc-federation/demo/swapi/starship"
)
func main() {
if err := run(); err != nil {
panic(err)
}
}
func run() error {
port := os.Getenv("GRPC_PORT")
if port == "" {
return fmt.Errorf("must be specified GRPC_PORT environment")
}
listener, err := net.Listen("tcp", fmt.Sprintf("0.0.0.0:%s", port))
if err != nil {
return err
}
grpcServer := grpc.NewServer()
starshippb.RegisterStarshipServiceServer(grpcServer, starship.NewStarshipService())
log.Printf("listening gRPC: %s", port)
if err := grpcServer.Serve(listener); err != nil {
return err
}
return nil
}
================================================
FILE: demo/cmd/swapi/main.go
================================================
package main
import (
"context"
"fmt"
"log"
"log/slog"
"net"
"os"
"go.opentelemetry.io/otel"
"go.opentelemetry.io/otel/attribute"
"go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc"
"go.opentelemetry.io/otel/propagation"
"go.opentelemetry.io/otel/sdk/resource"
sdktrace "go.opentelemetry.io/otel/sdk/trace"
semconv "go.opentelemetry.io/otel/semconv/v1.4.0"
"google.golang.org/grpc"
"google.golang.org/grpc/credentials/insecure"
"google.golang.org/grpc/reflection"
filmpb "github.com/mercari/grpc-federation/demo/swapi/film"
personpb "github.com/mercari/grpc-federation/demo/swapi/person"
planetpb "github.com/mercari/grpc-federation/demo/swapi/planet"
speciespb "github.com/mercari/grpc-federation/demo/swapi/species"
starshippb "github.com/mercari/grpc-federation/demo/swapi/starship"
swapipb "github.com/mercari/grpc-federation/demo/swapi/swapi"
vehiclepb "github.com/mercari/grpc-federation/demo/swapi/vehicle"
)
func main() {
if err := run(context.Background()); err != nil {
panic(err)
}
}
type client struct{}
func (c *client) Swapi_Film_FilmServiceClient(_ swapipb.SWAPIClientConfig) (filmpb.FilmServiceClient, error) {
ep := os.Getenv("FILM_SERVICE_ENDPOINT")
conn, err := grpc.DialContext(
context.Background(), ep,
grpc.WithTransportCredentials(insecure.NewCredentials()),
grpc.WithDefaultCallOptions(grpc.WaitForReady(true)),
)
if err != nil {
return nil, err
}
return filmpb.NewFilmServiceClient(conn), nil
}
func (c *client) Swapi_Person_PersonServiceClient(_ swapipb.SWAPIClientConfig) (personpb.PersonServiceClient, error) {
ep := os.Getenv("PERSON_SERVICE_ENDPOINT")
conn, err := grpc.DialContext(
context.Background(), ep,
grpc.WithTransportCredentials(insecure.NewCredentials()),
grpc.WithDefaultCallOptions(grpc.WaitForReady(true)),
)
if err != nil {
return nil, err
}
return personpb.NewPersonServiceClient(conn), nil
}
func (c *client) Swapi_Planet_PlanetServiceClient(_ swapipb.SWAPIClientConfig) (planetpb.PlanetServiceClient, error) {
ep := os.Getenv("PLANET_SERVICE_ENDPOINT")
conn, err := grpc.DialContext(
context.Background(), ep,
grpc.WithTransportCredentials(insecure.NewCredentials()),
grpc.WithDefaultCallOptions(grpc.WaitForReady(true)),
)
if err != nil {
return nil, err
}
return planetpb.NewPlanetServiceClient(conn), nil
}
func (c *client) Swapi_Species_SpeciesServiceClient(_ swapipb.SWAPIClientConfig) (speciespb.SpeciesServiceClient, error) {
ep := os.Getenv("SPECIES_SERVICE_ENDPOINT")
conn, err := grpc.DialContext(
context.Background(), ep,
grpc.WithTransportCredentials(insecure.NewCredentials()),
grpc.WithDefaultCallOptions(grpc.WaitForReady(true)),
)
if err != nil {
return nil, err
}
return speciespb.NewSpeciesServiceClient(conn), nil
}
func (c *client) Swapi_Starship_StarshipServiceClient(_ swapipb.SWAPIClientConfig) (starshippb.StarshipServiceClient, error) {
ep := os.Getenv("STARSHIP_SERVICE_ENDPOINT")
conn, err := grpc.DialContext(
context.Background(), ep,
grpc.WithTransportCredentials(insecure.NewCredentials()),
grpc.WithDefaultCallOptions(grpc.WaitForReady(true)),
)
if err != nil {
return nil, err
}
return starshippb.NewStarshipServiceClient(conn), nil
}
func (c *client) Swapi_Vehicle_VehicleServiceClient(_ swapipb.SWAPIClientConfig) (vehiclepb.VehicleServiceClient, error) {
ep := os.Getenv("VEHICLE_SERVICE_ENDPOINT")
conn, err := grpc.DialContext(
context.Background(), ep,
grpc.WithTransportCredentials(insecure.NewCredentials()),
grpc.WithDefaultCallOptions(grpc.WaitForReady(true)),
)
if err != nil {
return nil, err
}
return vehiclepb.NewVehicleServiceClient(conn), nil
}
func run(ctx context.Context) error {
port := os.Getenv("GRPC_PORT")
if port == "" {
return fmt.Errorf("must be specified GRPC_PORT environment")
}
listener, err := net.Listen("tcp", fmt.Sprintf("0.0.0.0:%s", port))
if err != nil {
return err
}
exporter, err := otlptracegrpc.New(ctx, otlptracegrpc.WithInsecure())
if err != nil {
return err
}
tp := sdktrace.NewTracerProvider(
sdktrace.WithBatcher(exporter),
sdktrace.WithResource(
resource.NewWithAttributes(
semconv.SchemaURL,
semconv.ServiceNameKey.String("swapi"),
semconv.ServiceVersionKey.String("1.0.0"),
attribute.String("environment", "dev"),
),
),
sdktrace.WithSampler(sdktrace.AlwaysSample()),
)
defer tp.Shutdown(ctx)
otel.SetTextMapPropagator(propagation.TraceContext{})
otel.SetTracerProvider(tp)
grpcServer := grpc.NewServer()
server, err := swapipb.NewSWAPI(swapipb.SWAPIConfig{
Client: new(client),
Logger: slog.New(slog.NewJSONHandler(os.Stdout, &slog.HandlerOptions{
Level: slog.LevelDebug,
})),
})
if err != nil {
return err
}
reflection.Register(grpcServer)
swapipb.RegisterSWAPIServer(grpcServer, server)
log.Printf("listening gRPC: %s", port)
if err := grpcServer.Serve(listener); err != nil {
return err
}
return nil
}
================================================
FILE: demo/cmd/vehicle/main.go
================================================
package main
import (
"fmt"
"log"
"net"
"os"
"google.golang.org/grpc"
"github.com/mercari/grpc-federation/demo/services/vehicle"
vehiclepb "github.com/mercari/grpc-federation/demo/swapi/vehicle"
)
func main() {
if err := run(); err != nil {
panic(err)
}
}
func run() error {
port := os.Getenv("GRPC_PORT")
if port == "" {
return fmt.Errorf("must be specified GRPC_PORT environment")
}
listener, err := net.Listen("tcp", fmt.Sprintf("0.0.0.0:%s", port))
if err != nil {
return err
}
grpcServer := grpc.NewServer()
vehiclepb.RegisterVehicleServiceServer(grpcServer, vehicle.NewVehicleService())
log.Printf("listening gRPC: %s", port)
if err := grpcServer.Serve(listener); err != nil {
return err
}
return nil
}
================================================
FILE: demo/compose.yaml
================================================
services:
swapi:
image: ko.local/swapi:latest
platform: linux/amd64
container_name: swapi
ports:
- "3000:3000"
environment:
- GRPC_PORT=3000
- FILM_SERVICE_ENDPOINT=film:3000
- PERSON_SERVICE_ENDPOINT=person:3000
- PLANET_SERVICE_ENDPOINT=planet:3000
- SPECIES_SERVICE_ENDPOINT=species:3000
- STARSHIP_SERVICE_ENDPOINT=starship:3000
- VEHICLE_SERVICE_ENDPOINT=vehicle:3000
- OTEL_EXPORTER_OTLP_ENDPOINT=http://jaeger:4317
- OTEL_EXPORTER_OTLP_TRACES_ENDPOINT=http://jaeger:4317
jaeger:
image: jaegertracing/all-in-one:latest
ports:
- "4000:16686"
environment:
- COLLECTOR_OTLP_ENABLED=true
film:
image: ko.local/film:latest
platform: linux/amd64
container_name: film
environment:
- GRPC_PORT=3000
person:
image: ko.local/person:latest
platform: linux/amd64
container_name: person
environment:
- GRPC_PORT=3000
planet:
image: ko.local/planet:latest
platform: linux/amd64
container_name: planet
environment:
- GRPC_PORT=3000
species:
image: ko.local/species:latest
platform: linux/amd64
container_name: species
environment:
- GRPC_PORT=3000
starship:
image: ko.local/starship:latest
platform: linux/amd64
container_name: starship
environment:
- GRPC_PORT=3000
vehicle:
image: ko.local/vehicle:latest
platform: linux/amd64
container_name: vehicle
environment:
- GRPC_PORT=3000
================================================
FILE: demo/go.mod
================================================
module github.com/mercari/grpc-federation/demo
go 1.23.0
toolchain go1.23.7
require (
github.com/mercari/grpc-federation v1.9.8
github.com/peterhellberg/swapi v0.0.0-20230222134402-c0bd79f5129c
go.opentelemetry.io/otel v1.27.0
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.27.0
go.opentelemetry.io/otel/sdk v1.27.0
go.opentelemetry.io/otel/trace v1.27.0
google.golang.org/genproto v0.0.0-20240604185151-ef581f913117
google.golang.org/grpc v1.65.0
google.golang.org/protobuf v1.34.2
)
require (
cel.dev/expr v0.19.1 // indirect
github.com/antlr4-go/antlr/v4 v4.13.0 // indirect
github.com/cenkalti/backoff/v4 v4.3.0 // indirect
github.com/go-logr/logr v1.4.1 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
github.com/google/cel-go v0.23.1 // indirect
github.com/google/uuid v1.6.0 // indirect
github.com/grpc-ecosystem/grpc-gateway/v2 v2.20.0 // indirect
github.com/kelseyhightower/envconfig v1.4.0 // indirect
github.com/stoewer/go-strcase v1.3.0 // indirect
github.com/tetratelabs/wazero v1.7.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.27.0 // indirect
go.opentelemetry.io/otel/metric v1.27.0 // indirect
go.opentelemetry.io/proto/otlp v1.2.0 // indirect
golang.org/x/exp v0.0.0-20240222234643-814bf88cf225 // indirect
golang.org/x/net v0.38.0 // indirect
golang.org/x/sync v0.12.0 // indirect
golang.org/x/sys v0.31.0 // indirect
golang.org/x/text v0.23.0 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20240826202546-f6391c0de4c7 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240826202546-f6391c0de4c7 // indirect
)
================================================
FILE: demo/go.sum
================================================
cel.dev/expr v0.19.1 h1:NciYrtDRIR0lNCnH1LFJegdjspNx9fI59O7TWcua/W4=
cel.dev/expr v0.19.1/go.mod h1:MrpN08Q+lEBs+bGYdLxxHkZoUSsCp0nSKTs0nTymJgw=
github.com/antlr4-go/antlr/v4 v4.13.0 h1:lxCg3LAv+EUK6t1i0y1V6/SLeUi0eKEKdhQAlS8TVTI=
github.com/antlr4-go/antlr/v4 v4.13.0/go.mod h1:pfChB/xh/Unjila75QW7+VU4TSnWnnk9UTnmpPaOR2g=
github.com/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8=
github.com/cenkalti/backoff/v4 v4.3.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A=
github.com/go-logr/logr v1.4.1 h1:pKouT5E8xu9zeFC39JXRDukb6JFQPXM5p5I91188VAQ=
github.com/go-logr/logr v1.4.1/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY=
github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag=
github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE=
github.com/google/cel-go v0.23.1 h1:91ThhEZlBcE5rB2adBVXqvDoqdL8BG2oyhd0bK1I/r4=
github.com/google/cel-go v0.23.1/go.mod h1:52Pb6QsDbC5kvgxvZhiL9QX1oZEkcUF/ZqaPx1J5Wwo=
github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/grpc-ecosystem/grpc-gateway/v2 v2.20.0 h1:bkypFPDjIYGfCYD5mRBvpqxfYX1YCS1PXdKYWi8FsN0=
github.com/grpc-ecosystem/grpc-gateway/v2 v2.20.0/go.mod h1:P+Lt/0by1T8bfcF3z737NnSbmxQAppXMRziHUxPOC8k=
github.com/kelseyhightower/envconfig v1.4.0 h1:Im6hONhd3pLkfDFsbRgu68RDNkGF1r3dvMUtDTo2cv8=
github.com/kelseyhightower/envconfig v1.4.0/go.mod h1:cccZRl6mQpaq41TPp5QxidR+Sa3axMbJDNb//FQX6Gg=
github.com/mercari/grpc-federation v1.9.8 h1:ydwgsj0bLmCJNxvQccHPiiKlxI45qnbNSnAfHNa9S8I=
github.com/mercari/grpc-federation v1.9.8/go.mod h1:J2yE7b4ZIiLSx/gSQruA0Y97g7TCNTcXFjdA7GmIKaM=
github.com/peterhellberg/swapi v0.0.0-20230222134402-c0bd79f5129c h1:FS5Yq0geZCGGFWq3yJJZhPWwsOlT8rUtOpSY3bDu6Jo=
github.com/peterhellberg/swapi v0.0.0-20230222134402-c0bd79f5129c/go.mod h1:MCpYUv2wWgketLY9WhCmAiCPEFTf/oUh7N4g0SGAuXQ=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/stoewer/go-strcase v1.3.0 h1:g0eASXYtp+yvN9fK8sH94oCIk0fau9uV1/ZdJ0AVEzs=
github.com/stoewer/go-strcase v1.3.0/go.mod h1:fAH5hQ5pehh+j3nZfvwdk2RgEgQjAoM8wodgtPmh1xo=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=
github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo=
github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg=
github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
github.com/tetratelabs/wazero v1.7.0 h1:jg5qPydno59wqjpGrHph81lbtHzTrWzwwtD4cD88+hQ=
github.com/tetratelabs/wazero v1.7.0/go.mod h1:ytl6Zuh20R/eROuyDaGPkp82O9C/DJfXAwJfQ3X6/7Y=
go.opentelemetry.io/otel v1.27.0 h1:9BZoF3yMK/O1AafMiQTVu0YDj5Ea4hPhxCs7sGva+cg=
go.opentelemetry.io/otel v1.27.0/go.mod h1:DMpAK8fzYRzs+bi3rS5REupisuqTheUlSZJ1WnZaPAQ=
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.27.0 h1:R9DE4kQ4k+YtfLI2ULwX82VtNQ2J8yZmA7ZIF/D+7Mc=
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.27.0/go.mod h1:OQFyQVrDlbe+R7xrEyDr/2Wr67Ol0hRUgsfA+V5A95s=
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.27.0 h1:qFffATk0X+HD+f1Z8lswGiOQYKHRlzfmdJm0wEaVrFA=
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.27.0/go.mod h1:MOiCmryaYtc+V0Ei+Tx9o5S1ZjA7kzLucuVuyzBZloQ=
go.opentelemetry.io/otel/metric v1.27.0 h1:hvj3vdEKyeCi4YaYfNjv2NUje8FqKqUY8IlF0FxV/ik=
go.opentelemetry.io/otel/metric v1.27.0/go.mod h1:mVFgmRlhljgBiuk/MP/oKylr4hs85GZAylncepAX/ak=
go.opentelemetry.io/otel/sdk v1.27.0 h1:mlk+/Y1gLPLn84U4tI8d3GNJmGT/eXe3ZuOXN9kTWmI=
go.opentelemetry.io/otel/sdk v1.27.0/go.mod h1:Ha9vbLwJE6W86YstIywK2xFfPjbWlCuwPtMkKdz/Y4A=
go.opentelemetry.io/otel/trace v1.27.0 h1:IqYb813p7cmbHk0a5y6pD5JPakbVfftRXABGt5/Rscw=
go.opentelemetry.io/otel/trace v1.27.0/go.mod h1:6RiD1hkAprV4/q+yd2ln1HG9GoPx39SuvvstaLBl+l4=
go.opentelemetry.io/proto/otlp v1.2.0 h1:pVeZGk7nXDC9O2hncA6nHldxEjm6LByfA2aN8IOkz94=
go.opentelemetry.io/proto/otlp v1.2.0/go.mod h1:gGpR8txAl5M03pDhMC79G6SdqNV26naRm/KDsgaHD8A=
go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto=
go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE=
golang.org/x/exp v0.0.0-20240222234643-814bf88cf225 h1:LfspQV/FYTatPTr/3HzIcmiUFH7PGP+OQ6mgDYo3yuQ=
golang.org/x/exp v0.0.0-20240222234643-814bf88cf225/go.mod h1:CxmFvTBINI24O/j8iY7H1xHzx2i4OsyguNBmN/uPtqc=
golang.org/x/net v0.38.0 h1:vRMAPTMaeGqVhG5QyLJHqNDwecKTomGeqbnfZyKlBI8=
golang.org/x/net v0.38.0/go.mod h1:ivrbrMbzFq5J41QOQh0siUuly180yBYtLp+CKbEaFx8=
golang.org/x/sync v0.12.0 h1:MHc5BpPuC30uJk597Ri8TV3CNZcTLu6B6z4lJy+g6Jw=
golang.org/x/sync v0.12.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA=
golang.org/x/sys v0.31.0 h1:ioabZlmFYtWhL+TRYpcnNlLwhyxaM9kWTDEmfnprqik=
golang.org/x/sys v0.31.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k=
golang.org/x/text v0.23.0 h1:D71I7dUrlY+VX0gQShAThNGHFxZ13dGLBHQLVl1mJlY=
golang.org/x/text v0.23.0/go.mod h1:/BLNzu4aZCJ1+kcD0DNRotWKage4q2rGVAg4o22unh4=
google.golang.org/genproto v0.0.0-20240604185151-ef581f913117 h1:HCZ6DlkKtCDAtD8ForECsY3tKuaR+p4R3grlK80uCCc=
google.golang.org/genproto v0.0.0-20240604185151-ef581f913117/go.mod h1:lesfX/+9iA+3OdqeCpoDddJaNxVB1AB6tD7EfqMmprc=
google.golang.org/genproto/googleapis/api v0.0.0-20240826202546-f6391c0de4c7 h1:YcyjlL1PRr2Q17/I0dPk2JmYS5CDXfcdb2Z3YRioEbw=
google.golang.org/genproto/googleapis/api v0.0.0-20240826202546-f6391c0de4c7/go.mod h1:OCdP9MfskevB/rbYvHTsXTtKC+3bHWajPdoKgjcYkfo=
google.golang.org/genproto/googleapis/rpc v0.0.0-20240826202546-f6391c0de4c7 h1:2035KHhUv+EpyB+hWgJnaWKJOdX1E95w2S8Rr4uWKTs=
google.golang.org/genproto/googleapis/rpc v0.0.0-20240826202546-f6391c0de4c7/go.mod h1:UqMtugtsSgubUsoxbuAoiCXvqvErP7Gf0so0mK9tHxU=
google.golang.org/grpc v1.65.0 h1:bs/cUb4lp1G5iImFFd3u5ixQzweKizoZJAwBNLR42lc=
google.golang.org/grpc v1.65.0/go.mod h1:WgYC2ypjlB0EiQi6wdKixMqukr6lBc0Vo+oOgjrM5ZQ=
google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg=
google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
================================================
FILE: demo/proto/buf.yaml
================================================
version: v1
deps:
- buf.build/mercari/grpc-federation
- buf.build/googleapis/googleapis
breaking:
use:
- FILE
lint:
use:
- DEFAULT
================================================
FILE: demo/proto/film/film.proto
================================================
syntax = "proto3";
import "google/type/date.proto";
package swapi.film;
option go_package = "github.com/mercari/grpc-federation/demo/swapi/film;filmpb";
service FilmService {
rpc GetFilm(GetFilmRequest) returns (GetFilmReply) {}
rpc ListFilms(ListFilmsRequest) returns (ListFilmsReply) {}
}
// GetFilmRequest.
message GetFilmRequest {
// The film id.
int64 id = 1;
}
// GetFilmReply.
message GetFilmReply {
Film film = 1;
}
// ListFilmsRequest.
message ListFilmsRequest {
repeated int64 ids = 1;
}
// ListFilmsReply.
message ListFilmsReply {
repeated Film films = 1;
}
// Film is a single film.
message Film {
// film id.
int64 id = 1;
// The title of this film.
string title = 2;
// The episode number of this film.
int32 episode_id = 3;
// The opening paragraphs at the beginning of this film.
string opening_crawl = 4;
// The name of the director of this film.
string director = 5;
// The name(s) of the producer(s) of this film. Comma separated.
string producer = 6;
// The ISO 8601 date format of film release at original creator country.
google.type.Date release_date = 7;
// the hypermedia URL of this resource.
string url = 8;
// the ISO 8601 date format of the time that this resource was created.
string created = 9;
// the ISO 8601 date format of the time that this resource was edited.
string edited = 10;
// species ids.
repeated int64 species_ids = 11;
// starship ids.
repeated int64 starship_ids = 12;
// vehicle ids.
repeated int64 vehicle_ids = 13;
// character ids.
repeated int64 character_ids = 14;
// planet ids.
repeated int64 planet_ids = 15;
}
================================================
FILE: demo/proto/person/person.proto
================================================
syntax = "proto3";
package swapi.person;
option go_package = "github.com/mercari/grpc-federation/demo/swapi/person;personpb";
service PersonService {
rpc GetPerson(GetPersonRequest) returns (GetPersonReply) {}
rpc ListPeople(ListPeopleRequest) returns (ListPeopleReply) {}
}
// GetPersonRequest.
message GetPersonRequest {
// The persion id.
int64 id = 1;
}
// GetPersonReply.
message GetPersonReply {
Person person = 1;
}
// ListPeopleRequest.
message ListPeopleRequest {
repeated int64 ids = 1;
}
// ListPeopleReply.
message ListPeopleReply {
repeated Person people = 1;
}
// Person is an individual person or character within the Star Wars universe.
message Person {
// person id.
int64 id = 1;
// The name of this person.
string name = 2;
// The birth year of the person,
// using the in-universe standard of BBY or ABY
// - Before the Battle of Yavin or After the Battle of Yavin.
// The Battle of Yavin is a battle that occurs at the end of Star Wars episode IV: A New Hope.
string birth_year = 3;
// The eye color of this person.
// Will be "unknown" if not known or "n/a" if the person does not have an eye.
string eye_color = 4;
// The gender of this person.
// Either "Male", "Female" or "unknown", "n/a" if the person does not have a gender.
string gender = 5;
// The hair color of this person.
// Will be "unknown" if not known or "n/a" if the person does not have hair.
string hair_color = 6;
// The height of the person in centimeters.
string height = 7;
// The mass of the person in kilograms.
string mass = 8;
// The skin color of this person.
string skin_color = 9;
// The URL of a planet resource, a planet that this person was born on or inhabits.
string homeworld = 10;
// the hypermedia URL of this resource.
string url = 11;
// the ISO 8601 date format of the time that this resource was created.
string created = 12;
// the ISO 8601 date format of the time that this resource was edited.
string edited = 13;
// film ids.
repeated int64 film_ids = 14;
// species ids.
repeated int64 species_ids = 15;
// starship ids.
repeated int64 starship_ids = 16;
// vehicle ids.
repeated int64 vehicle_ids = 17;
}
================================================
FILE: demo/proto/planet/planet.proto
================================================
syntax = "proto3";
package swapi.planet;
option go_package = "github.com/mercari/grpc-federation/demo/swapi/planet;planetpb";
service PlanetService {
rpc GetPlanet(GetPlanetRequest) returns (GetPlanetReply) {}
rpc ListPlanets(ListPlanetsRequest) returns (ListPlanetsReply) {}
}
// GetPlanetRequest.
message GetPlanetRequest {
// planet id.
int64 id = 1;
}
// GetPlanetReply.
message GetPlanetReply {
Planet planet = 1;
}
// ListPlanetsRequest.
message ListPlanetsRequest {
repeated int64 ids = 1;
}
// ListPlanetsReply.
message ListPlanetsReply {
repeated Planet planets = 1;
}
// Planet is a large mass, planet or planetoid in the Star Wars Universe, at the time of 0 ABY.
message Planet {
// planet id.
int64 id = 1;
// The name of this planet.
string name = 2;
// The diameter of this planet in kilometers.
string diameter = 3;
// The number of standard hours it takes for this planet to complete a single rotation on its axis.
string rotation_period = 4;
// The number of standard days it takes for this planet to complete a single orbit of its local star.
string orbital_period = 5;
// A number denoting the gravity of this planet, where "1" is normal or 1 standard G.
// "2" is twice or 2 standard Gs. "0.5" is half or 0.5 standard Gs.
string gravity = 6;
// The average population of sentient beings inhabiting this planet.
string population = 7;
// The climate of this planet. Comma separated if diverse.
string climate = 8;
// The terrain of this planet. Comma separated if diverse.
string terrain = 9;
// The percentage of the planet surface that is naturally occurring water or bodies of water.
string surface_water = 10;
// the hypermedia URL of this resource.
string url = 11;
// the ISO 8601 date format of the time that this resource was created.
string created = 12;
// the ISO 8601 date format of the time that this resource was edited.
string edited = 13;
// the person that live on this planet ids.
repeated int64 resident_ids = 14;
// film ids.
repeated int64 film_ids = 15;
}
================================================
FILE: demo/proto/species/species.proto
================================================
syntax = "proto3";
package swapi.species;
option go_package = "github.com/mercari/grpc-federation/demo/swapi/species;speciespb";
service SpeciesService {
rpc GetSpecies(GetSpeciesRequest) returns (GetSpeciesReply) {}
rpc ListSpecies(ListSpeciesRequest) returns (ListSpeciesReply) {}
}
// GetSpeciesRequest.
message GetSpeciesRequest {
// species id.
int64 id = 1;
}
// GetSpeciesReply.
message GetSpeciesReply {
Species species = 1;
}
// ListSpeciesRequest.
message ListSpeciesRequest {
repeated int64 ids = 1;
}
// ListSpeciesReply.
message ListSpeciesReply {
repeated Species species = 1;
}
// Species is a type of person or character within the Star Wars Universe.
message Species {
// species id.
int64 id = 1;
// The name of this species.
string name = 2;
// The classification of this species, such as "mammal" or "reptile".
string classification = 3;
// The designation of this species, such as "sentient".
string designation = 4;
// The average height of this species in centimeters.
string average_height = 5;
// The average lifespan of this species in years.
string average_lifespan = 6;
// A comma-separated string of common eye colors for this species,
// "none" if this species does not typically have eyes.
string eye_colors = 7;
// A comma-separated string of common hair colors for this species,
// "none" if this species does not typically have hair.
string hair_colors = 8;
// A comma-separated string of common skin colors for this species,
// "none" if this species does not typically have skin.
string skin_colors = 9;
// The language commonly spoken by this species.
string language = 10;
// The URL of a planet resource, a planet that this species originates from.
string homeworld = 11;
// the hypermedia URL of this resource.
string url = 12;
// the ISO 8601 date format of the time that this resource was created.
string created = 13;
// the ISO 8601 date format of the time that this resource was edited.
string edited = 14;
// person ids.
repeated int64 person_ids = 15;
// film ids.
repeated int64 film_ids = 16;
}
================================================
FILE: demo/proto/starship/starship.proto
================================================
syntax = "proto3";
package swapi.starship;
option go_package = "github.com/mercari/grpc-federation/demo/swapi/starship;starshippb";
service StarshipService {
rpc GetStarship(GetStarshipRequest) returns (GetStarshipReply) {}
rpc ListStarships(ListStarshipsRequest) returns (ListStarshipsReply) {}
}
// GetStarshipRequest.
message GetStarshipRequest {
// starship id.
int64 id = 1;
}
// GetStarshipReply.
message GetStarshipReply {
Starship starship = 1;
}
// ListStarshipsRequest.
message ListStarshipsRequest {
repeated int64 ids = 1;
}
// ListStarshipsReply.
message ListStarshipsReply {
repeated Starship starships = 1;
}
// Starship is a single transport craft that has hyperdrive capability.
message Starship {
// starship id.
int64 id = 1;
// The name of this starship. The common name, such as "Death Star".
string name = 2;
// The model or official name of this starship.
// Such as "T-65 X-wing" or "DS-1 Orbital Battle Station".
string model = 3;
// The class of this starship, such as "Starfighter" or "Deep Space Mobile Battlestation".
string starship_class = 4;
// The manufacturer of this starship. Comma separated if more than one.
string manufacturer = 5;
// The cost of this starship new, in galactic credits.
string cost_in_credits = 6;
// The length of this starship in meters.
string length = 7;
// The number of personnel needed to run or pilot this starship.
string crew = 8;
// The number of non-essential people this starship can transport.
string passengers = 9;
// The maximum speed of this starship in the atmosphere.
// "N/A" if this starship is incapable of atmospheric flight.
string max_atmosphering_speed = 10;
// The class of this starships hyperdrive.
string hyperdrive_rating = 11;
// The Maximum number of Megalights this starship can travel in a standard hour.
// A "Megalight" is a standard unit of distance and has never been defined before within the Star Wars universe.
// This figure is only really useful for measuring the difference in speed of starships.
// We can assume it is similar to AU, the distance between our Sun (Sol) and Earth.
string mglt = 12;
// The maximum number of kilograms that this starship can transport.
string cargo_capacity = 13;
// The maximum length of time that this starship can provide consumables for its entire crew without having to resupply.
string consumables = 14;
// the hypermedia URL of this resource.
string url = 15;
// the ISO 8601 date format of the time that this resource was created.
string created = 16;
// the ISO 8601 date format of the time that this resource was edited.
string edited = 17;
// film ids.
repeated int64 film_ids = 18;
// pilot ids.
repeated int64 pilot_ids =19;
}
================================================
FILE: demo/proto/swapi.proto
================================================
syntax = "proto3";
import "google/type/date.proto";
import "grpc/federation/federation.proto";
import "planet/planet.proto";
import "film/film.proto";
import "vehicle/vehicle.proto";
import "species/species.proto";
import "starship/starship.proto";
import "person/person.proto";
package swapi;
option go_package = "github.com/mercari/grpc-federation/demo/swapi/swapi;swapipb";
service SWAPI {
option (grpc.federation.service) = {};
rpc GetPerson(GetPersonRequest) returns (GetPersonReply) {}
rpc ListPeople(ListPeopleRequest) returns (ListPeopleReply) {}
rpc GetFilm(GetFilmRequest) returns (GetFilmReply) {}
rpc ListFilms(ListFilmsRequest) returns (ListFilmsReply) {}
rpc GetStarship(GetStarshipRequest) returns (GetStarshipReply) {}
rpc ListStarships(ListStarshipsRequest) returns (ListStarshipsReply) {}
rpc GetSpecies(GetSpeciesRequest) returns (GetSpeciesReply) {}
rpc ListSpecies(ListSpeciesRequest) returns (ListSpeciesReply) {}
rpc GetVehicle(GetVehicleRequest) returns (GetVehicleReply) {}
rpc ListVehicles(ListVehiclesRequest) returns (ListVehiclesReply) {}
rpc GetPlanet(GetPlanetRequest) returns (GetPlanetReply) {}
rpc ListPlanets(ListPlanetsRequest) returns (ListPlanetsReply) {}
}
// GetPersonRequest.
message GetPersonRequest {
// The persion id.
int64 id = 1;
}
// GetPersonReply.
message GetPersonReply {
option (grpc.federation.message) = {
def {
name: "res"
call {
method: "swapi.person.PersonService/GetPerson"
request { field: "id" by: "$.id" }
}
}
def { name: "p" by: "res.person" }
def {
name: "f"
message {
name: "Films"
args { name: "ids" by: "p.film_ids" }
}
}
def {
name: "species"
message {
name: "SpeciesList"
args { name: "ids" by: "p.species_ids" }
}
}
def {
name: "starships"
message {
name: "Starships"
args { name: "ids" by: "p.starship_ids" }
}
}
def {
name: "v"
message {
name: "Vehicles"
args { name: "ids" by: "p.vehicle_ids" }
}
}
};
Person person = 1 [(grpc.federation.field).by = "p"];
// films.
repeated Film films = 2 [(grpc.federation.field).by = "f.films"];
// species.
repeated Species species = 3 [(grpc.federation.field).by = "species.species"];
// starships.
repeated Starship starships = 4 [(grpc.federation.field).by = "starships.starships"];
// vehicles.
repeated Vehicle vehicles = 5 [(grpc.federation.field).by = "v.vehicles"];
}
// ListPeopleRequest.
message ListPeopleRequest {
repeated int64 ids = 1;
}
// ListPeopleReply.
message ListPeopleReply {
option (grpc.federation.message) = {
def {
name: "p"
message {
name: "People"
args { name: "ids" by: "$.ids" }
}
}
};
repeated Person people = 1 [(grpc.federation.field).by = "p.people"];
}
// GetFilmRequest.
message GetFilmRequest {
// The film id.
int64 id = 1;
}
// GetFilmReply.
message GetFilmReply {
option (grpc.federation.message) = {
def {
name: "res"
call {
method: "swapi.film.FilmService/GetFilm"
request { field: "id" by: "$.id" }
}
}
def { name: "f" by: "res.film" }
def {
name: "species"
message {
name: "SpeciesList"
args { name: "ids" by: "f.species_ids" }
}
}
def {
name: "starships"
message {
name: "Starships"
args { name: "ids" by: "f.starship_ids" }
}
}
def {
name: "v"
message {
name: "Vehicles"
args { name: "ids" by: "f.vehicle_ids" }
}
}
def {
name: "characters"
message {
name: "People"
args { name: "ids" by: "f.character_ids" }
}
}
def {
name: "planets"
message {
name: "Planets"
args { name: "ids" by: "f.planet_ids" }
}
}
};
Film film = 1 [(grpc.federation.field).by = "f"];
// species.
repeated Species species = 2 [(grpc.federation.field).by = "species.species"];
// starships.
repeated Starship starships = 3 [(grpc.federation.field).by = "starships.starships"];
// vehicles.
repeated Vehicle vehicles = 4 [(grpc.federation.field).by = "v.vehicles"];
// characters.
repeated Person characters = 5 [(grpc.federation.field).by = "characters.people"];
// planets.
repeated Planet planets = 6 [(grpc.federation.field).by = "planets.planets"];
}
// ListFilmsRequest.
message ListFilmsRequest {
repeated int64 ids = 1;
}
// ListFilmsReply.
message ListFilmsReply {
option (grpc.federation.message) = {
def {
name: "f"
message {
name: "Films"
args { name: "ids" by: "$.ids" }
}
}
};
repeated Film films = 1 [(grpc.federation.field).by = "f.films"];
}
// GetVehicleRequest.
message GetVehicleRequest {
// vehicle id.
int64 id = 1;
}
// GetVehicleReply.
message GetVehicleReply {
option (grpc.federation.message) = {
def {
name: "res"
call {
method: "swapi.vehicle.VehicleService/GetVehicle"
request { field: "id" by: "$.id" }
}
}
def { name: "v" by: "res.vehicle" }
def {
name: "f"
message {
name: "Films"
args { name: "ids" by: "v.film_ids" }
}
}
def {
name: "p"
message {
name: "People"
args { name: "ids" by: "v.pilot_ids" }
}
}
};
Vehicle vehicle = 1 [(grpc.federation.field).by = "v"];
// films.
repeated Film films = 2 [(grpc.federation.field).by = "f.films"];
// pilots.
repeated Person pilots = 3 [(grpc.federation.field).by = "p.people"];
}
// ListVehiclesRequest.
message ListVehiclesRequest {
repeated int64 ids = 1;
}
// ListVehiclesReply.
message ListVehiclesReply {
option (grpc.federation.message) = {
def {
name: "v"
message {
name: "Vehicles"
args { name: "ids" by: "$.ids" }
}
}
};
repeated Vehicle vehicles = 1 [(grpc.federation.field).by = "v.vehicles"];
}
// GetSpeciesRequest.
message GetSpeciesRequest {
// species id.
int64 id = 1;
}
// GetSpeciesReply.
message GetSpeciesReply {
option (grpc.federation.message) = {
def {
name: "res"
call {
method: "swapi.species.SpeciesService/GetSpecies"
request { field: "id" by: "$.id" }
}
}
def { name: "s" by: "res.species" }
def {
name: "f"
message {
name: "Films"
args { name: "ids" by: "s.film_ids" }
}
}
def {
name: "p"
message {
name: "People"
args { name: "ids" by: "s.person_ids" }
}
}
};
Species species = 1 [(grpc.federation.field).by = "s"];
// people.
repeated Person people = 2 [(grpc.federation.field).by = "p.people"];
// films.
repeated Film films = 3 [(grpc.federation.field).by = "f.films"];
}
// ListSpeciesRequest.
message ListSpeciesRequest {
repeated int64 ids = 1;
}
// ListSpeciesReply.
message ListSpeciesReply {
option (grpc.federation.message) = {
def {
name: "s"
message {
name: "SpeciesList"
args { name: "ids" by: "$.ids" }
}
}
};
repeated Species species = 1 [(grpc.federation.field).by = "s.species"];
}
// GetStarshipRequest.
message GetStarshipRequest {
// starship id.
int64 id = 1;
}
// GetStarshipReply.
message GetStarshipReply {
option (grpc.federation.message) = {
def {
name: "res"
call {
method: "swapi.starship.StarshipService/GetStarship"
request { field: "id" by: "$.id" }
}
}
def { name: "s" by: "res.starship" }
def {
name: "f"
message {
name: "Films"
args { name: "ids" by: "s.film_ids" }
}
}
def {
name: "p"
message {
name: "People"
args { name: "ids" by: "s.pilot_ids" }
}
}
};
Starship starship = 1 [(grpc.federation.field).by = "s"];
// films.
repeated Film films = 2 [(grpc.federation.field).by = "f.films"];
// pilots.
repeated Person pilots = 3 [(grpc.federation.field).by = "p.people"];
}
// ListStarshipsRequest.
message ListStarshipsRequest {
repeated int64 ids = 1;
}
// ListStarshipsReply.
message ListStarshipsReply {
option (grpc.federation.message) = {
def {
name: "s"
message {
name: "Starships"
args { name: "ids" by: "$.ids" }
}
}
};
repeated Starship starships = 1 [(grpc.federation.field).by = "s.starships"];
}
// GetPlanetRequest.
message GetPlanetRequest {
// planet id.
int64 id = 1;
}
// GetPlanetReply.
message GetPlanetReply {
option (grpc.federation.message) = {
def {
name: "res"
call {
method: "swapi.planet.PlanetService/GetPlanet"
request { field: "id" by: "$.id" }
}
}
def { name: "p" by: "res.planet" }
def {
name: "residents"
message {
name: "People"
args { name: "ids" by: "p.resident_ids" }
}
}
def {
name: "f"
message {
name: "Films"
args { name: "ids" by: "p.film_ids" }
}
}
};
Planet planet = 1 [(grpc.federation.field).by = "p"];
// the people that live on this planet.
repeated Person residents = 2 [(grpc.federation.field).by = "residents.people"];
// films.
repeated Film films = 3 [(grpc.federation.field).by = "f.films"];
}
// ListPlanetsRequest.
message ListPlanetsRequest {
repeated int64 ids = 1;
}
// ListPlanetsReply.
message ListPlanetsReply {
option (grpc.federation.message) = {
def {
name: "p"
message {
name: "Planets"
args { name: "ids" by: "$.ids" }
}
}
};
repeated Planet planets = 1 [(grpc.federation.field).by = "p.planets"];
}
// Person is an individual person or character within the Star Wars universe.
message Person {
option (grpc.federation.message).alias = "swapi.person.Person";
// person id.
int64 id = 1;
// The name of this person.
string name = 2;
// The birth year of the person,
// using the in-universe standard of BBY or ABY
// - Before the Battle of Yavin or After the Battle of Yavin.
// The Battle of Yavin is a battle that occurs at the end of Star Wars episode IV: A New Hope.
string birth_year = 3;
// The eye color of this person.
// Will be "unknown" if not known or "n/a" if the person does not have an eye.
string eye_color = 4;
// The gender of this person.
// Either "Male", "Female" or "unknown", "n/a" if the person does not have a gender.
string gender = 5;
// The hair color of this person.
// Will be "unknown" if not known or "n/a" if the person does not have hair.
string hair_color = 6;
// The height of the person in centimeters.
string height = 7;
// The mass of the person in kilograms.
string mass = 8;
// The skin color of this person.
string skin_color = 9;
// The URL of a planet resource, a planet that this person was born on or inhabits.
string homeworld = 10;
// the hypermedia URL of this resource.
string url = 11;
// the ISO 8601 date format of the time that this resource was created.
string created = 12;
// the ISO 8601 date format of the time that this resource was edited.
string edited = 13;
// film ids.
repeated int64 film_ids = 14;
// species ids.
repeated int64 species_ids = 15;
// starship ids.
repeated int64 starship_ids = 16;
// vehicle ids.
repeated int64 vehicle_ids = 17;
}
message People {
option (grpc.federation.message) = {
def {
name: "res"
call {
method: "swapi.person.PersonService/ListPeople"
request { field: "ids" by: "$.ids" }
}
}
};
repeated Person people = 1 [(grpc.federation.field).by = "res.people"];
}
// Film is a single film.
message Film {
option (grpc.federation.message).alias = "swapi.film.Film";
// film id.
int64 id = 1;
// The title of this film.
string title = 2;
// The episode number of this film.
int32 episode_id = 3;
// The opening paragraphs at the beginning of this film.
string opening_crawl = 4;
// The name of the director of this film.
string director = 5;
// The name(s) of the producer(s) of this film. Comma separated.
string producer = 6;
// The ISO 8601 date format of film release at original creator country.
google.type.Date release_date = 7;
// the hypermedia URL of this resource.
string url = 8;
// the ISO 8601 date format of the time that this resource was created.
string created = 9;
// the ISO 8601 date format of the time that this resource was edited.
string edited = 10;
// species ids.
repeated int64 species_ids = 11;
// starship ids.
repeated int64 starship_ids = 12;
// vehicle ids.
repeated int64 vehicle_ids = 13;
// character ids.
repeated int64 character_ids = 14;
// planet ids.
repeated int64 planet_ids = 15;
}
message Films {
option (grpc.federation.message) = {
def {
name: "res"
call {
method: "swapi.film.FilmService/ListFilms"
request { field: "ids" by: "$.ids" }
}
}
};
repeated Film films = 1 [(grpc.federation.field).by = "res.films"];
}
// Starship is a single transport craft that has hyperdrive capability.
message Starship {
option (grpc.federation.message).alias = "swapi.starship.Starship";
// starship id.
int64 id = 1;
// The name of this starship. The common name, such as "Death Star".
string name = 2;
// The model or official name of this starship.
// Such as "T-65 X-wing" or "DS-1 Orbital Battle Station".
string model = 3;
// The class of this starship, such as "Starfighter" or "Deep Space Mobile Battlestation".
string starship_class = 4;
// The manufacturer of this starship. Comma separated if more than one.
string manufacturer = 5;
// The cost of this starship new, in galactic credits.
string cost_in_credits = 6;
// The length of this starship in meters.
string length = 7;
// The number of personnel needed to run or pilot this starship.
string crew = 8;
// The number of non-essential people this starship can transport.
string passengers = 9;
// The maximum speed of this starship in the atmosphere.
// "N/A" if this starship is incapable of atmospheric flight.
string max_atmosphering_speed = 10;
// The class of this starships hyperdrive.
string hyperdrive_rating = 11;
// The Maximum number of Megalights this starship can travel in a standard hour.
// A "Megalight" is a standard unit of distance and has never been defined before within the Star Wars universe.
// This figure is only really useful for measuring the difference in speed of starships.
// We can assume it is similar to AU, the distance between our Sun (Sol) and Earth.
string mglt = 12;
// The maximum number of kilograms that this starship can transport.
string cargo_capacity = 13;
// The maximum length of time that this starship can provide consumables for its entire crew without having to resupply.
string consumables = 14;
// the hypermedia URL of this resource.
string url = 15;
// the ISO 8601 date format of the time that this resource was created.
string created = 16;
// the ISO 8601 date format of the time that this resource was edited.
string edited = 17;
// film ids.
repeated int64 film_ids = 18;
// pilot ids.
repeated int64 pilot_ids =19;
}
message Starships {
option (grpc.federation.message) = {
def {
name: "res"
call {
method: "swapi.starship.StarshipService/ListStarships"
request { field: "ids" by: "$.ids" }
}
}
};
repeated Starship starships = 1 [(grpc.federation.field).by = "res.starships"];
}
// Vehicle is a single transport craft that does not have hyperdrive capability..
message Vehicle {
option (grpc.federation.message).alias = "swapi.vehicle.Vehicle";
// vehicle id.
int64 id = 1;
// The name of this vehicle. The common name, such as "Sand Crawler" or "Speeder bike".
string name = 2;
// The model or official name of this vehicle. Such as "All-Terrain Attack Transport".
string model = 3;
// The class of this vehicle, such as "Wheeled" or "Repulsorcraft".
string vehicle_class = 4;
// The manufacturer of this vehicle. Comma separated if more than one.
string manufacturer = 5;
// The length of this vehicle in meters.
string length = 6;
// The cost of this vehicle new, in Galactic Credits.
string cost_in_credits = 7;
// The number of personnel needed to run or pilot this vehicle.
string crew = 8;
// The number of non-essential people this vehicle can transport.
string passengers = 9;
// The maximum speed of this vehicle in the atmosphere.
string max_atmosphering_speed = 10;
// The maximum number of kilograms that this vehicle can transport.
string cargo_capacity = 11;
// The maximum length of time that this vehicle can provide consumables for its entire crew without having to resupply.
string consumables = 12;
// the hypermedia URL of this resource.
string url = 13;
// the ISO 8601 date format of the time that this resource was created.
string created = 14;
// the ISO 8601 date format of the time that this resource was edited.
string edited = 15;
// film ids.
repeated int64 film_ids = 16;
// pilot ids.
repeated int64 pilot_ids = 17;
}
message Vehicles {
option (grpc.federation.message) = {
def {
name: "res"
call {
method: "swapi.vehicle.VehicleService/ListVehicles"
request { field: "ids" by: "$.ids" }
}
}
};
repeated Vehicle vehicles = 1 [(grpc.federation.field).by = "res.vehicles"];
}
// Species is a type of person or character within the Star Wars Universe.
message Species {
option (grpc.federation.message).alias = "swapi.species.Species";
// species id.
int64 id = 1;
// The name of this species.
string name = 2;
// The classification of this species, such as "mammal" or "reptile".
string classification = 3;
// The designation of this species, such as "sentient".
string designation = 4;
// The average height of this species in centimeters.
string average_height = 5;
// The average lifespan of this species in years.
string average_lifespan = 6;
// A comma-separated string of common eye colors for this species,
// "none" if this species does not typically have eyes.
string eye_colors = 7;
// A comma-separated string of common hair colors for this species,
// "none" if this species does not typically have hair.
string hair_colors = 8;
// A comma-separated string of common skin colors for this species,
// "none" if this species does not typically have skin.
string skin_colors = 9;
// The language commonly spoken by this species.
string language = 10;
// The URL of a planet resource, a planet that this species originates from.
string homeworld = 11;
// the hypermedia URL of this resource.
string url = 12;
// the ISO 8601 date format of the time that this resource was created.
string created = 13;
// the ISO 8601 date format of the time that this resource was edited.
string edited = 14;
// person ids.
repeated int64 person_ids = 15;
// film ids.
repeated int64 film_ids = 16;
}
message SpeciesList {
option (grpc.federation.message) = {
def {
name: "res"
call {
method: "swapi.species.SpeciesService/ListSpecies"
request { field: "ids" by: "$.ids" }
}
}
};
repeated Species species = 1 [(grpc.federation.field).by = "res.species"];
}
// Planet is a large mass, planet or planetoid in the Star Wars Universe, at the time of 0 ABY.
message Planet {
option (grpc.federation.message).alias = "swapi.planet.Planet";
// planet id.
int64 id = 1;
// The name of this planet.
string name = 2;
// The diameter of this planet in kilometers.
string diameter = 3;
// The number of standard hours it takes for this planet to complete a single rotation on its axis.
string rotation_period = 4;
// The number of standard days it takes for this planet to complete a single orbit of its local star.
string orbital_period = 5;
// A number denoting the gravity of this planet, where "1" is normal or 1 standard G.
// "2" is twice or 2 standard Gs. "0.5" is half or 0.5 standard Gs.
string gravity = 6;
// The average population of sentient beings inhabiting this planet.
string population = 7;
// The climate of this planet. Comma separated if diverse.
string climate = 8;
// The terrain of this planet. Comma separated if diverse.
string terrain = 9;
// The percentage of the planet surface that is naturally occurring water or bodies of water.
string surface_water = 10;
// the hypermedia URL of this resource.
string url = 11;
// the ISO 8601 date format of the time that this resource was created.
string created = 12;
// the ISO 8601 date format of the time that this resource was edited.
string edited = 13;
// the person that live on this planet ids.
repeated int64 resident_ids = 14;
// film ids.
repeated int64 film_ids = 15;
}
message Planets {
option (grpc.federation.message) = {
def {
name: "res"
call {
method: "swapi.planet.PlanetService/ListPlanets"
request { field: "ids" by: "$.ids" }
}
}
};
repeated Planet planets = 1 [(grpc.federation.field).by = "res.planets"];
}
================================================
FILE: demo/proto/vehicle/vehicle.proto
================================================
syntax = "proto3";
package swapi.vehicle;
option go_package = "github.com/mercari/grpc-federation/demo/swapi/vehicle;vehiclepb";
service VehicleService {
rpc GetVehicle(GetVehicleRequest) returns (GetVehicleReply) {}
rpc ListVehicles(ListVehiclesRequest) returns (ListVehiclesReply) {}
}
// GetVehicleRequest.
message GetVehicleRequest {
// vehicle id.
int64 id = 1;
}
// GetVehicleReply.
message GetVehicleReply {
Vehicle vehicle = 1;
}
// ListVehiclesRequest.
message ListVehiclesRequest {
repeated int64 ids = 1;
}
// ListVehiclesReply.
message ListVehiclesReply {
repeated Vehicle vehicles = 1;
}
// Vehicle is a single transport craft that does not have hyperdrive capability..
message Vehicle {
// vehicle id.
int64 id = 1;
// The name of this vehicle. The common name, such as "Sand Crawler" or "Speeder bike".
string name = 2;
// The model or official name of this vehicle. Such as "All-Terrain Attack Transport".
string model = 3;
// The class of this vehicle, such as "Wheeled" or "Repulsorcraft".
string vehicle_class = 4;
// The manufacturer of this vehicle. Comma separated if more than one.
string manufacturer = 5;
// The length of this vehicle in meters.
string length = 6;
// The cost of this vehicle new, in Galactic Credits.
string cost_in_credits = 7;
// The number of personnel needed to run or pilot this vehicle.
string crew = 8;
// The number of non-essential people this vehicle can transport.
string passengers = 9;
// The maximum speed of this vehicle in the atmosphere.
string max_atmosphering_speed = 10;
// The maximum number of kilograms that this vehicle can transport.
string cargo_capacity = 11;
// The maximum length of time that this vehicle can provide consumables for its entire crew without having to resupply.
string consumables = 12;
// the hypermedia URL of this resource.
string url = 13;
// the ISO 8601 date format of the time that this resource was created.
string created = 14;
// the ISO 8601 date format of the time that this resource was edited.
string edited = 15;
// film ids.
repeated int64 film_ids = 16;
// pilot ids.
repeated int64 pilot_ids = 17;
}
================================================
FILE: demo/services/film/film.go
================================================
package film
import (
"context"
"github.com/peterhellberg/swapi"
filmpb "github.com/mercari/grpc-federation/demo/swapi/film"
"github.com/mercari/grpc-federation/demo/util"
)
type FilmService struct {
*filmpb.UnimplementedFilmServiceServer
cli *swapi.Client
cache map[int64]*filmpb.Film
}
func NewFilmService() *FilmService {
return &FilmService{
cli: swapi.NewClient(),
cache: make(map[int64]*filmpb.Film),
}
}
func (s *FilmService) GetFilm(ctx context.Context, req *filmpb.GetFilmRequest) (*filmpb.GetFilmReply, error) {
film, err := s.getFilm(ctx, req.GetId())
if err != nil {
return nil, err
}
return &filmpb.GetFilmReply{
Film: film,
}, nil
}
func (s *FilmService) ListFilms(ctx context.Context, req *filmpb.ListFilmsRequest) (*filmpb.ListFilmsReply, error) {
films := make([]*filmpb.Film, 0, len(req.GetIds()))
for _, id := range req.GetIds() {
film, err := s.getFilm(ctx, id)
if err != nil {
return nil, err
}
films = append(films, film)
}
return &filmpb.ListFilmsReply{
Films: films,
}, nil
}
func (s *FilmService) getFilm(ctx context.Context, id int64) (*filmpb.Film, error) {
if film, exists := s.cache[id]; exists {
return film, nil
}
res, err := s.cli.Film(ctx, int(id))
if err != nil {
return nil, err
}
film, err := s.toFilm(id, &res)
if err != nil {
return nil, err
}
s.cache[id] = film
return film, nil
}
func (s *FilmService) toFilm(id int64, f *swapi.Film) (*filmpb.Film, error) {
var (
speciesIDs []int64
starshipIDs []int64
vehicleIDs []int64
characterIDs []int64
planetIDs []int64
)
for _, url := range f.SpeciesURLs {
id, err := util.SpeciesURLToID(url)
if err != nil {
return nil, err
}
speciesIDs = append(speciesIDs, id)
}
for _, url := range f.StarshipURLs {
id, err := util.StarshipURLToID(url)
if err != nil {
return nil, err
}
starshipIDs = append(starshipIDs, id)
}
for _, url := range f.VehicleURLs {
id, err := util.VehicleURLToID(url)
if err != nil {
return nil, err
}
vehicleIDs = append(vehicleIDs, id)
}
for _, url := range f.CharacterURLs {
id, err := util.PersonURLToID(url)
if err != nil {
return nil, err
}
characterIDs = append(characterIDs, id)
}
for _, url := range f.PlanetURLs {
id, err := util.PlanetURLToID(url)
if err != nil {
return nil, err
}
planetIDs = append(planetIDs, id)
}
return &filmpb.Film{
Id: id,
Title: f.Title,
EpisodeId: int32(f.EpisodeID),
OpeningCrawl: f.OpeningCrawl,
Director: f.Director,
Producer: f.Producer,
Url: f.URL,
Created: f.Created,
Edited: f.Edited,
SpeciesIds: speciesIDs,
StarshipIds: starshipIDs,
VehicleIds: vehicleIDs,
CharacterIds: characterIDs,
PlanetIds: planetIDs,
}, nil
}
================================================
FILE: demo/services/film/film_test.go
================================================
package film_test
import (
"context"
"testing"
"github.com/mercari/grpc-federation/demo/services/film"
filmpb "github.com/mercari/grpc-federation/demo/swapi/film"
)
func TestFilmService(t *testing.T) {
svc := film.NewFilmService()
t.Run("GetFilm", func(t *testing.T) {
res, err := svc.GetFilm(context.Background(), &filmpb.GetFilmRequest{
Id: 1,
})
if err != nil {
t.Fatal(err)
}
if res.GetFilm() == nil {
t.Fatalf("failed to get film: %+v", res)
}
if res.GetFilm().GetId() != 1 {
t.Fatalf("failed to get id: %+v", res)
}
})
t.Run("ListFilms", func(t *testing.T) {
res, err := svc.ListFilms(context.Background(), &filmpb.ListFilmsRequest{
Ids: []int64{1, 2},
})
if err != nil {
t.Fatal(err)
}
if len(res.GetFilms()) != 2 {
t.Fatalf("failed to get films: %+v", res)
}
})
}
================================================
FILE: demo/services/person/person.go
================================================
package person
import (
"context"
"github.com/peterhellberg/swapi"
personpb "github.com/mercari/grpc-federation/demo/swapi/person"
"github.com/mercari/grpc-federation/demo/util"
)
type PersonService struct {
*personpb.UnimplementedPersonServiceServer
cli *swapi.Client
cache map[int64]*personpb.Person
}
func NewPersonService() *PersonService {
return &PersonService{
cli: swapi.NewClient(),
cache: make(map[int64]*personpb.Person),
}
}
func (s *PersonService) GetPerson(ctx context.Context, req *personpb.GetPersonRequest) (*personpb.GetPersonReply, error) {
person, err := s.getPerson(ctx, req.GetId())
if err != nil {
return nil, err
}
return &personpb.GetPersonReply{
Person: person,
}, nil
}
func (s *PersonService) ListPeople(ctx context.Context, req *personpb.ListPeopleRequest) (*personpb.ListPeopleReply, error) {
people := make([]*personpb.Person, 0, len(req.GetIds()))
for _, id := range req.GetIds() {
person, err := s.getPerson(ctx, id)
if err != nil {
return nil, err
}
people = append(people, person)
}
return &personpb.ListPeopleReply{
People: people,
}, nil
}
func (s *PersonService) getPerson(ctx context.Context, id int64) (*personpb.Person, error) {
if person, exists := s.cache[id]; exists {
return person, nil
}
res, err := s.cli.Person(ctx, int(id))
if err != nil {
return nil, err
}
person, err := s.toPerson(id, &res)
if err != nil {
return nil, err
}
s.cache[id] = person
return person, nil
}
func (s *PersonService) toPerson(id int64, p *swapi.Person) (*personpb.Person, error) {
var (
filmIDs []int64
speciesIDs []int64
starshipIDs []int64
vehicleIDs []int64
)
for _, url := range p.FilmURLs {
id, err := util.FilmURLToID(url)
if err != nil {
return nil, err
}
filmIDs = append(filmIDs, id)
}
for _, url := range p.SpeciesURLs {
id, err := util.SpeciesURLToID(url)
if err != nil {
return nil, err
}
speciesIDs = append(speciesIDs, id)
}
for _, url := range p.StarshipURLs {
id, err := util.StarshipURLToID(url)
if err != nil {
return nil, err
}
starshipIDs = append(starshipIDs, id)
}
for _, url := range p.VehicleURLs {
id, err := util.VehicleURLToID(url)
if err != nil {
return nil, err
}
vehicleIDs = append(vehicleIDs, id)
}
return &personpb.Person{
Id: id,
Name: p.Name,
BirthYear: p.BirthYear,
EyeColor: p.EyeColor,
Gender: p.Gender,
HairColor: p.HairColor,
Height: p.Height,
Mass: p.Mass,
SkinColor: p.SkinColor,
Homeworld: p.Homeworld,
Url: p.URL,
Created: p.Created,
Edited: p.Edited,
FilmIds: filmIDs,
SpeciesIds: speciesIDs,
StarshipIds: starshipIDs,
VehicleIds: vehicleIDs,
}, nil
}
================================================
FILE: demo/services/person/person_test.go
================================================
package person_test
import (
"context"
"testing"
"github.com/mercari/grpc-federation/demo/services/person"
personpb "github.com/mercari/grpc-federation/demo/swapi/person"
)
func TestPersonService(t *testing.T) {
svc := person.NewPersonService()
t.Run("GetPerson", func(t *testing.T) {
res, err := svc.GetPerson(context.Background(), &personpb.GetPersonRequest{
Id: 1,
})
if err != nil {
t.Fatal(err)
}
if res.GetPerson() == nil {
t.Fatalf("failed to get person: %+v", res)
}
if res.GetPerson().GetId() != 1 {
t.Fatalf("failed to get id: %+v", res)
}
})
t.Run("ListPersons", func(t *testing.T) {
res, err := svc.ListPeople(context.Background(), &personpb.ListPeopleRequest{
Ids: []int64{1, 2},
})
if err != nil {
t.Fatal(err)
}
if len(res.GetPeople()) != 2 {
t.Fatalf("failed to get persons: %+v", res)
}
})
}
================================================
FILE: demo/services/planet/planet.go
================================================
package planet
import (
"context"
"github.com/peterhellberg/swapi"
planetpb "github.com/mercari/grpc-federation/demo/swapi/planet"
"github.com/mercari/grpc-federation/demo/util"
)
type PlanetService struct {
*planetpb.UnimplementedPlanetServiceServer
cli *swapi.Client
cache map[int64]*planetpb.Planet
}
func NewPlanetService() *PlanetService {
return &PlanetService{
cli: swapi.NewClient(),
cache: make(map[int64]*planetpb.Planet),
}
}
func (s *PlanetService) GetPlanet(ctx context.Context, req *planetpb.GetPlanetRequest) (*planetpb.GetPlanetReply, error) {
planet, err := s.getPlanet(ctx, req.GetId())
if err != nil {
return nil, err
}
return &planetpb.GetPlanetReply{
Planet: planet,
}, nil
}
func (s *PlanetService) ListPlanets(ctx context.Context, req *planetpb.ListPlanetsRequest) (*planetpb.ListPlanetsReply, error) {
planets := make([]*planetpb.Planet, 0, len(req.GetIds()))
for _, id := range req.GetIds() {
planet, err := s.getPlanet(ctx, id)
if err != nil {
return nil, err
}
planets = append(planets, planet)
}
return &planetpb.ListPlanetsReply{
Planets: planets,
}, nil
}
func (s *PlanetService) getPlanet(ctx context.Context, id int64) (*planetpb.Planet, error) {
if planet, exists := s.cache[id]; exists {
return planet, nil
}
res, err := s.cli.Planet(ctx, int(id))
if err != nil {
return nil, err
}
planet, err := s.toPlanet(id, &res)
if err != nil {
return nil, err
}
s.cache[id] = planet
return planet, nil
}
func (s *PlanetService) toPlanet(id int64, p *swapi.Planet) (*planetpb.Planet, error) {
var (
residentIDs []int64
filmIDs []int64
)
for _, url := range p.ResidentURLs {
id, err := util.PersonURLToID(url)
if err != nil {
return nil, err
}
residentIDs = append(residentIDs, id)
}
for _, url := range p.FilmURLs {
id, err := util.FilmURLToID(url)
if err != nil {
return nil, err
}
filmIDs = append(filmIDs, id)
}
return &planetpb.Planet{
Id: id,
Name: p.Name,
Diameter: p.Diameter,
RotationPeriod: p.RotationPeriod,
OrbitalPeriod: p.OrbitalPeriod,
Climate: p.Climate,
Gravity: p.Gravity,
Terrain: p.Terrain,
SurfaceWater: p.SurfaceWater,
Population: p.Population,
Created: p.Created,
Edited: p.Edited,
Url: p.URL,
ResidentIds: residentIDs,
FilmIds: filmIDs,
}, nil
}
================================================
FILE: demo/services/planet/planet_test.go
================================================
package planet_test
import (
"context"
"testing"
"github.com/mercari/grpc-federation/demo/services/planet"
planetpb "github.com/mercari/grpc-federation/demo/swapi/planet"
)
func TestPlanetService(t *testing.T) {
svc := planet.NewPlanetService()
t.Run("GetPlanet", func(t *testing.T) {
res, err := svc.GetPlanet(context.Background(), &planetpb.GetPlanetRequest{
Id: 1,
})
if err != nil {
t.Fatal(err)
}
if res.GetPlanet() == nil {
t.Fatalf("failed to get planet: %+v", res)
}
if res.GetPlanet().GetId() != 1 {
t.Fatalf("failed to get id: %+v", res)
}
if len(res.GetPlanet().GetResidentIds()) == 0 {
t.Fatalf("failed to get resident ids: %+v", res)
}
if len(res.GetPlanet().GetFilmIds()) == 0 {
t.Fatalf("failed to get film ids: %+v", res)
}
})
t.Run("ListPlanets", func(t *testing.T) {
res, err := svc.ListPlanets(context.Background(), &planetpb.ListPlanetsRequest{
Ids: []int64{1, 2},
})
if err != nil {
t.Fatal(err)
}
if len(res.GetPlanets()) != 2 {
t.Fatalf("failed to get planets: %+v", res)
}
})
}
================================================
FILE: demo/services/species/species.go
================================================
package species
import (
"context"
"github.com/peterhellberg/swapi"
speciespb "github.com/mercari/grpc-federation/demo/swapi/species"
"github.com/mercari/grpc-federation/demo/util"
)
type SpeciesService struct {
*speciespb.UnimplementedSpeciesServiceServer
cli *swapi.Client
cache map[int64]*speciespb.Species
}
func NewSpeciesService() *SpeciesService {
return &SpeciesService{
cli: swapi.NewClient(),
cache: make(map[int64]*speciespb.Species),
}
}
func (s *SpeciesService) GetSpecies(ctx context.Context, req *speciespb.GetSpeciesRequest) (*speciespb.GetSpeciesReply, error) {
species, err := s.getSpecies(ctx, req.GetId())
if err != nil {
return nil, err
}
return &speciespb.GetSpeciesReply{
Species: species,
}, nil
}
func (s *SpeciesService) ListSpecies(ctx context.Context, req *speciespb.ListSpeciesRequest) (*speciespb.ListSpeciesReply, error) {
species := make([]*speciespb.Species, 0, len(req.GetIds()))
for _, id := range req.GetIds() {
sp, err := s.getSpecies(ctx, id)
if err != nil {
return nil, err
}
species = append(species, sp)
}
return &speciespb.ListSpeciesReply{
Species: species,
}, nil
}
func (s *SpeciesService) getSpecies(ctx context.Context, id int64) (*speciespb.Species, error) {
if species, exists := s.cache[id]; exists {
return species, nil
}
res, err := s.cli.Species(ctx, int(id))
if err != nil {
return nil, err
}
species, err := s.toSpecies(id, &res)
if err != nil {
return nil, err
}
s.cache[id] = species
return species, nil
}
func (s *SpeciesService) toSpecies(id int64, sp *swapi.Species) (*speciespb.Species, error) {
var (
personIDs []int64
filmIDs []int64
)
for _, url := range sp.PeopleURLs {
id, err := util.PersonURLToID(url)
if err != nil {
return nil, err
}
personIDs = append(personIDs, id)
}
for _, url := range sp.FilmURLs {
id, err := util.FilmURLToID(url)
if err != nil {
return nil, err
}
filmIDs = append(filmIDs, id)
}
return &speciespb.Species{
Id: id,
Name: sp.Name,
Classification: sp.Classification,
Designation: sp.Designation,
AverageHeight: sp.AverageHeight,
AverageLifespan: sp.AverageLifespan,
EyeColors: sp.EyeColors,
HairColors: sp.HairColors,
SkinColors: sp.SkinColors,
Language: sp.Language,
Homeworld: sp.Homeworld,
Url: sp.URL,
Created: sp.Created,
Edited: sp.Edited,
PersonIds: personIDs,
FilmIds: filmIDs,
}, nil
}
================================================
FILE: demo/services/species/species_test.go
================================================
package species_test
import (
"context"
"testing"
"github.com/mercari/grpc-federation/demo/services/species"
speciespb "github.com/mercari/grpc-federation/demo/swapi/species"
)
func TestSpeciesService(t *testing.T) {
svc := species.NewSpeciesService()
t.Run("GetSpecies", func(t *testing.T) {
res, err := svc.GetSpecies(context.Background(), &speciespb.GetSpeciesRequest{
Id: 1,
})
if err != nil {
t.Fatal(err)
}
if res.GetSpecies() == nil {
t.Fatalf("failed to get species: %+v", res)
}
if res.GetSpecies().GetId() != 1 {
t.Fatalf("failed to get id: %+v", res)
}
})
t.Run("ListSpeciess", func(t *testing.T) {
res, err := svc.ListSpecies(context.Background(), &speciespb.ListSpeciesRequest{
Ids: []int64{1, 2},
})
if err != nil {
t.Fatal(err)
}
if len(res.GetSpecies()) != 2 {
t.Fatalf("failed to get species: %+v", res)
}
})
}
================================================
FILE: demo/services/starship/starship.go
================================================
package starship
import (
"context"
"github.com/peterhellberg/swapi"
starshippb "github.com/mercari/grpc-federation/demo/swapi/starship"
"github.com/mercari/grpc-federation/demo/util"
)
type StarshipService struct {
*starshippb.UnimplementedStarshipServiceServer
cli *swapi.Client
cache map[int64]*starshippb.Starship
}
func NewStarshipService() *StarshipService {
return &StarshipService{
cli: swapi.NewClient(),
cache: make(map[int64]*starshippb.Starship),
}
}
func (s *StarshipService) GetStarship(ctx context.Context, req *starshippb.GetStarshipRequest) (*starshippb.GetStarshipReply, error) {
starship, err := s.getStarship(ctx, req.GetId())
if err != nil {
return nil, err
}
return &starshippb.GetStarshipReply{
Starship: starship,
}, nil
}
func (s *StarshipService) ListStarships(ctx context.Context, req *starshippb.ListStarshipsRequest) (*starshippb.ListStarshipsReply, error) {
starships := make([]*starshippb.Starship, 0, len(req.GetIds()))
for _, id := range req.GetIds() {
starship, err := s.getStarship(ctx, id)
if err != nil {
return nil, err
}
starships = append(starships, starship)
}
return &starshippb.ListStarshipsReply{
Starships: starships,
}, nil
}
func (s *StarshipService) getStarship(ctx context.Context, id int64) (*starshippb.Starship, error) {
if starship, exists := s.cache[id]; exists {
return starship, nil
}
res, err := s.cli.Starship(ctx, int(id))
if err != nil {
return nil, err
}
starship, err := s.toStarship(id, &res)
if err != nil {
return nil, err
}
s.cache[id] = starship
return starship, nil
}
func (s *StarshipService) toStarship(id int64, st *swapi.Starship) (*starshippb.Starship, error) {
var (
filmIDs []int64
pilotIDs []int64
)
for _, url := range st.FilmURLs {
id, err := util.FilmURLToID(url)
if err != nil {
return nil, err
}
filmIDs = append(filmIDs, id)
}
for _, url := range st.PilotURLs {
id, err := util.PersonURLToID(url)
if err != nil {
return nil, err
}
pilotIDs = append(pilotIDs, id)
}
return &starshippb.Starship{
Id: id,
Name: st.Name,
Model: st.Model,
StarshipClass: st.StarshipClass,
Manufacturer: st.Manufacturer,
CostInCredits: st.CostInCredits,
Length: st.Length,
Crew: st.Crew,
Passengers: st.Passengers,
MaxAtmospheringSpeed: st.MaxAtmospheringSpeed,
HyperdriveRating: st.HyperdriveRating,
Mglt: st.MGLT,
CargoCapacity: st.CargoCapacity,
Consumables: st.Consumables,
Url: st.URL,
Created: st.Created,
Edited: st.Edited,
PilotIds: pilotIDs,
FilmIds: filmIDs,
}, nil
}
================================================
FILE: demo/services/starship/starship_test.go
================================================
package starship_test
import (
"context"
"testing"
"github.com/mercari/grpc-federation/demo/services/starship"
starshippb "github.com/mercari/grpc-federation/demo/swapi/starship"
)
func TestStarshipService(t *testing.T) {
svc := starship.NewStarshipService()
t.Run("GetStarship", func(t *testing.T) {
res, err := svc.GetStarship(context.Background(), &starshippb.GetStarshipRequest{
Id: 1,
})
if err != nil {
t.Fatal(err)
}
if res.GetStarship() == nil {
t.Fatalf("failed to get starship: %+v", res)
}
if res.GetStarship().GetId() != 1 {
t.Fatalf("failed to get id: %+v", res)
}
})
t.Run("ListStarships", func(t *testing.T) {
res, err := svc.ListStarships(context.Background(), &starshippb.ListStarshipsRequest{
Ids: []int64{1, 2},
})
if err != nil {
t.Fatal(err)
}
if len(res.GetStarships()) != 2 {
t.Fatalf("failed to get starships: %+v", res)
}
})
}
================================================
FILE: demo/services/vehicle/vehicle.go
================================================
package vehicle
import (
"context"
"github.com/peterhellberg/swapi"
vehiclepb "github.com/mercari/grpc-federation/demo/swapi/vehicle"
"github.com/mercari/grpc-federation/demo/util"
)
type VehicleService struct {
*vehiclepb.UnimplementedVehicleServiceServer
cli *swapi.Client
cache map[int64]*vehiclepb.Vehicle
}
func NewVehicleService() *VehicleService {
return &VehicleService{
cli: swapi.NewClient(),
cache: make(map[int64]*vehiclepb.Vehicle),
}
}
func (s *VehicleService) GetVehicle(ctx context.Context, req *vehiclepb.GetVehicleRequest) (*vehiclepb.GetVehicleReply, error) {
vehicle, err := s.getVehicle(ctx, req.GetId())
if err != nil {
return nil, err
}
return &vehiclepb.GetVehicleReply{
Vehicle: vehicle,
}, nil
}
func (s *VehicleService) ListVehicles(ctx context.Context, req *vehiclepb.ListVehiclesRequest) (*vehiclepb.ListVehiclesReply, error) {
vehicles := make([]*vehiclepb.Vehicle, 0, len(req.GetIds()))
for _, id := range req.GetIds() {
vehicle, err := s.getVehicle(ctx, id)
if err != nil {
return nil, err
}
vehicles = append(vehicles, vehicle)
}
return &vehiclepb.ListVehiclesReply{
Vehicles: vehicles,
}, nil
}
func (s *VehicleService) getVehicle(ctx context.Context, id int64) (*vehiclepb.Vehicle, error) {
if vehicle, exists := s.cache[id]; exists {
return vehicle, nil
}
res, err := s.cli.Vehicle(ctx, int(id))
if err != nil {
return nil, err
}
vehicle, err := s.toVehicle(id, &res)
if err != nil {
return nil, err
}
s.cache[id] = vehicle
return vehicle, nil
}
func (s *VehicleService) toVehicle(id int64, v *swapi.Vehicle) (*vehiclepb.Vehicle, error) {
var (
filmIDs []int64
pilotIDs []int64
)
for _, url := range v.FilmURLs {
id, err := util.FilmURLToID(url)
if err != nil {
return nil, err
}
filmIDs = append(filmIDs, id)
}
for _, url := range v.PilotURLs {
id, err := util.PersonURLToID(url)
if err != nil {
return nil, err
}
pilotIDs = append(pilotIDs, id)
}
return &vehiclepb.Vehicle{
Id: id,
Name: v.Name,
Model: v.Model,
VehicleClass: v.VehicleClass,
Manufacturer: v.Manufacturer,
Length: v.Length,
CostInCredits: v.CostInCredits,
Crew: v.Crew,
Passengers: v.Passengers,
MaxAtmospheringSpeed: v.MaxAtmospheringSpeed,
CargoCapacity: v.CargoCapacity,
Consumables: v.Consumables,
Url: v.URL,
Created: v.Created,
Edited: v.Edited,
FilmIds: filmIDs,
PilotIds: pilotIDs,
}, nil
}
================================================
FILE: demo/services/vehicle/vehicle_test.go
================================================
package vehicle_test
import (
"context"
"testing"
"github.com/mercari/grpc-federation/demo/services/vehicle"
vehiclepb "github.com/mercari/grpc-federation/demo/swapi/vehicle"
)
func TestVehicleService(t *testing.T) {
svc := vehicle.NewVehicleService()
t.Run("GetVehicle", func(t *testing.T) {
res, err := svc.GetVehicle(context.Background(), &vehiclepb.GetVehicleRequest{
Id: 1,
})
if err != nil {
t.Fatal(err)
}
if res.GetVehicle() == nil {
t.Fatalf("failed to get vehicle: %+v", res)
}
if res.GetVehicle().GetId() != 1 {
t.Fatalf("failed to get id: %+v", res)
}
})
t.Run("ListVehicles", func(t *testing.T) {
res, err := svc.ListVehicles(context.Background(), &vehiclepb.ListVehiclesRequest{
Ids: []int64{1, 2},
})
if err != nil {
t.Fatal(err)
}
if len(res.GetVehicles()) != 2 {
t.Fatalf("failed to get vehicles: %+v", res)
}
})
}
================================================
FILE: demo/swapi/film/film.pb.go
================================================
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.34.1
// protoc (unknown)
// source: film/film.proto
package filmpb
import (
date "google.golang.org/genproto/googleapis/type/date"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
// GetFilmRequest.
type GetFilmRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// The film id.
Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
}
func (x *GetFilmRequest) Reset() {
*x = GetFilmRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_film_film_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GetFilmRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetFilmRequest) ProtoMessage() {}
func (x *GetFilmRequest) ProtoReflect() protoreflect.Message {
mi := &file_film_film_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GetFilmRequest.ProtoReflect.Descriptor instead.
func (*GetFilmRequest) Descriptor() ([]byte, []int) {
return file_film_film_proto_rawDescGZIP(), []int{0}
}
func (x *GetFilmRequest) GetId() int64 {
if x != nil {
return x.Id
}
return 0
}
// GetFilmReply.
type GetFilmReply struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Film *Film `protobuf:"bytes,1,opt,name=film,proto3" json:"film,omitempty"`
}
func (x *GetFilmReply) Reset() {
*x = GetFilmReply{}
if protoimpl.UnsafeEnabled {
mi := &file_film_film_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GetFilmReply) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetFilmReply) ProtoMessage() {}
func (x *GetFilmReply) ProtoReflect() protoreflect.Message {
mi := &file_film_film_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GetFilmReply.ProtoReflect.Descriptor instead.
func (*GetFilmReply) Descriptor() ([]byte, []int) {
return file_film_film_proto_rawDescGZIP(), []int{1}
}
func (x *GetFilmReply) GetFilm() *Film {
if x != nil {
return x.Film
}
return nil
}
// ListFilmsRequest.
type ListFilmsRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Ids []int64 `protobuf:"varint,1,rep,packed,name=ids,proto3" json:"ids,omitempty"`
}
func (x *ListFilmsRequest) Reset() {
*x = ListFilmsRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_film_film_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ListFilmsRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ListFilmsRequest) ProtoMessage() {}
func (x *ListFilmsRequest) ProtoReflect() protoreflect.Message {
mi := &file_film_film_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ListFilmsRequest.ProtoReflect.Descriptor instead.
func (*ListFilmsRequest) Descriptor() ([]byte, []int) {
return file_film_film_proto_rawDescGZIP(), []int{2}
}
func (x *ListFilmsRequest) GetIds() []int64 {
if x != nil {
return x.Ids
}
return nil
}
// ListFilmsReply.
type ListFilmsReply struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Films []*Film `protobuf:"bytes,1,rep,name=films,proto3" json:"films,omitempty"`
}
func (x *ListFilmsReply) Reset() {
*x = ListFilmsReply{}
if protoimpl.UnsafeEnabled {
mi := &file_film_film_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ListFilmsReply) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ListFilmsReply) ProtoMessage() {}
func (x *ListFilmsReply) ProtoReflect() protoreflect.Message {
mi := &file_film_film_proto_msgTypes[3]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ListFilmsReply.ProtoReflect.Descriptor instead.
func (*ListFilmsReply) Descriptor() ([]byte, []int) {
return file_film_film_proto_rawDescGZIP(), []int{3}
}
func (x *ListFilmsReply) GetFilms() []*Film {
if x != nil {
return x.Films
}
return nil
}
// Film is a single film.
type Film struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// film id.
Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
// The title of this film.
Title string `protobuf:"bytes,2,opt,name=title,proto3" json:"title,omitempty"`
// The episode number of this film.
EpisodeId int32 `protobuf:"varint,3,opt,name=episode_id,json=episodeId,proto3" json:"episode_id,omitempty"`
// The opening paragraphs at the beginning of this film.
OpeningCrawl string `protobuf:"bytes,4,opt,name=opening_crawl,json=openingCrawl,proto3" json:"opening_crawl,omitempty"`
// The name of the director of this film.
Director string `protobuf:"bytes,5,opt,name=director,proto3" json:"director,omitempty"`
// The name(s) of the producer(s) of this film. Comma separated.
Producer string `protobuf:"bytes,6,opt,name=producer,proto3" json:"producer,omitempty"`
// The ISO 8601 date format of film release at original creator country.
ReleaseDate *date.Date `protobuf:"bytes,7,opt,name=release_date,json=releaseDate,proto3" json:"release_date,omitempty"`
// the hypermedia URL of this resource.
Url string `protobuf:"bytes,8,opt,name=url,proto3" json:"url,omitempty"`
// the ISO 8601 date format of the time that this resource was created.
Created string `protobuf:"bytes,9,opt,name=created,proto3" json:"created,omitempty"`
// the ISO 8601 date format of the time that this resource was edited.
Edited string `protobuf:"bytes,10,opt,name=edited,proto3" json:"edited,omitempty"`
// species ids.
SpeciesIds []int64 `protobuf:"varint,11,rep,packed,name=species_ids,json=speciesIds,proto3" json:"species_ids,omitempty"`
// starship ids.
StarshipIds []int64 `protobuf:"varint,12,rep,packed,name=starship_ids,json=starshipIds,proto3" json:"starship_ids,omitempty"`
// vehicle ids.
VehicleIds []int64 `protobuf:"varint,13,rep,packed,name=vehicle_ids,json=vehicleIds,proto3" json:"vehicle_ids,omitempty"`
// character ids.
CharacterIds []int64 `protobuf:"varint,14,rep,packed,name=character_ids,json=characterIds,proto3" json:"character_ids,omitempty"`
// planet ids.
PlanetIds []int64 `protobuf:"varint,15,rep,packed,name=planet_ids,json=planetIds,proto3" json:"planet_ids,omitempty"`
}
func (x *Film) Reset() {
*x = Film{}
if protoimpl.UnsafeEnabled {
mi := &file_film_film_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Film) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Film) ProtoMessage() {}
func (x *Film) ProtoReflect() protoreflect.Message {
mi := &file_film_film_proto_msgTypes[4]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Film.ProtoReflect.Descriptor instead.
func (*Film) Descriptor() ([]byte, []int) {
return file_film_film_proto_rawDescGZIP(), []int{4}
}
func (x *Film) GetId() int64 {
if x != nil {
return x.Id
}
return 0
}
func (x *Film) GetTitle() string {
if x != nil {
return x.Title
}
return ""
}
func (x *Film) GetEpisodeId() int32 {
if x != nil {
return x.EpisodeId
}
return 0
}
func (x *Film) GetOpeningCrawl() string {
if x != nil {
return x.OpeningCrawl
}
return ""
}
func (x *Film) GetDirector() string {
if x != nil {
return x.Director
}
return ""
}
func (x *Film) GetProducer() string {
if x != nil {
return x.Producer
}
return ""
}
func (x *Film) GetReleaseDate() *date.Date {
if x != nil {
return x.ReleaseDate
}
return nil
}
func (x *Film) GetUrl() string {
if x != nil {
return x.Url
}
return ""
}
func (x *Film) GetCreated() string {
if x != nil {
return x.Created
}
return ""
}
func (x *Film) GetEdited() string {
if x != nil {
return x.Edited
}
return ""
}
func (x *Film) GetSpeciesIds() []int64 {
if x != nil {
return x.SpeciesIds
}
return nil
}
func (x *Film) GetStarshipIds() []int64 {
if x != nil {
return x.StarshipIds
}
return nil
}
func (x *Film) GetVehicleIds() []int64 {
if x != nil {
return x.VehicleIds
}
return nil
}
func (x *Film) GetCharacterIds() []int64 {
if x != nil {
return x.CharacterIds
}
return nil
}
func (x *Film) GetPlanetIds() []int64 {
if x != nil {
return x.PlanetIds
}
return nil
}
var File_film_film_proto protoreflect.FileDescriptor
var file_film_film_proto_rawDesc = []byte{
0x0a, 0x0f, 0x66, 0x69, 0x6c, 0x6d, 0x2f, 0x66, 0x69, 0x6c, 0x6d, 0x2e, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x12, 0x0a, 0x73, 0x77, 0x61, 0x70, 0x69, 0x2e, 0x66, 0x69, 0x6c, 0x6d, 0x1a, 0x16, 0x67,
0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x64, 0x61, 0x74, 0x65, 0x2e,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x20, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x46, 0x69, 0x6c, 0x6d,
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20,
0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x22, 0x34, 0x0a, 0x0c, 0x47, 0x65, 0x74, 0x46, 0x69,
0x6c, 0x6d, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x24, 0x0a, 0x04, 0x66, 0x69, 0x6c, 0x6d, 0x18,
0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x73, 0x77, 0x61, 0x70, 0x69, 0x2e, 0x66, 0x69,
0x6c, 0x6d, 0x2e, 0x46, 0x69, 0x6c, 0x6d, 0x52, 0x04, 0x66, 0x69, 0x6c, 0x6d, 0x22, 0x24, 0x0a,
0x10, 0x4c, 0x69, 0x73, 0x74, 0x46, 0x69, 0x6c, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
0x74, 0x12, 0x10, 0x0a, 0x03, 0x69, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x03, 0x52, 0x03,
0x69, 0x64, 0x73, 0x22, 0x38, 0x0a, 0x0e, 0x4c, 0x69, 0x73, 0x74, 0x46, 0x69, 0x6c, 0x6d, 0x73,
0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x26, 0x0a, 0x05, 0x66, 0x69, 0x6c, 0x6d, 0x73, 0x18, 0x01,
0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x73, 0x77, 0x61, 0x70, 0x69, 0x2e, 0x66, 0x69, 0x6c,
0x6d, 0x2e, 0x46, 0x69, 0x6c, 0x6d, 0x52, 0x05, 0x66, 0x69, 0x6c, 0x6d, 0x73, 0x22, 0xcb, 0x03,
0x0a, 0x04, 0x46, 0x69, 0x6c, 0x6d, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01,
0x28, 0x03, 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, 0x1d, 0x0a, 0x0a,
0x65, 0x70, 0x69, 0x73, 0x6f, 0x64, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05,
0x52, 0x09, 0x65, 0x70, 0x69, 0x73, 0x6f, 0x64, 0x65, 0x49, 0x64, 0x12, 0x23, 0x0a, 0x0d, 0x6f,
0x70, 0x65, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x63, 0x72, 0x61, 0x77, 0x6c, 0x18, 0x04, 0x20, 0x01,
0x28, 0x09, 0x52, 0x0c, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6e, 0x67, 0x43, 0x72, 0x61, 0x77, 0x6c,
0x12, 0x1a, 0x0a, 0x08, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x18, 0x05, 0x20, 0x01,
0x28, 0x09, 0x52, 0x08, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x12, 0x1a, 0x0a, 0x08,
0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x65, 0x72, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08,
0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x65, 0x72, 0x12, 0x34, 0x0a, 0x0c, 0x72, 0x65, 0x6c, 0x65,
0x61, 0x73, 0x65, 0x5f, 0x64, 0x61, 0x74, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11,
0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x44, 0x61, 0x74,
0x65, 0x52, 0x0b, 0x72, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x44, 0x61, 0x74, 0x65, 0x12, 0x10,
0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6c,
0x12, 0x18, 0x0a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x18, 0x09, 0x20, 0x01, 0x28,
0x09, 0x52, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x65, 0x64,
0x69, 0x74, 0x65, 0x64, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x65, 0x64, 0x69, 0x74,
0x65, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x70, 0x65, 0x63, 0x69, 0x65, 0x73, 0x5f, 0x69, 0x64,
0x73, 0x18, 0x0b, 0x20, 0x03, 0x28, 0x03, 0x52, 0x0a, 0x73, 0x70, 0x65, 0x63, 0x69, 0x65, 0x73,
0x49, 0x64, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x74, 0x61, 0x72, 0x73, 0x68, 0x69, 0x70, 0x5f,
0x69, 0x64, 0x73, 0x18, 0x0c, 0x20, 0x03, 0x28, 0x03, 0x52, 0x0b, 0x73, 0x74, 0x61, 0x72, 0x73,
0x68, 0x69, 0x70, 0x49, 0x64, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x76, 0x65, 0x68, 0x69, 0x63, 0x6c,
0x65, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x0d, 0x20, 0x03, 0x28, 0x03, 0x52, 0x0a, 0x76, 0x65, 0x68,
0x69, 0x63, 0x6c, 0x65, 0x49, 0x64, 0x73, 0x12, 0x23, 0x0a, 0x0d, 0x63, 0x68, 0x61, 0x72, 0x61,
0x63, 0x74, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x0e, 0x20, 0x03, 0x28, 0x03, 0x52, 0x0c,
0x63, 0x68, 0x61, 0x72, 0x61, 0x63, 0x74, 0x65, 0x72, 0x49, 0x64, 0x73, 0x12, 0x1d, 0x0a, 0x0a,
0x70, 0x6c, 0x61, 0x6e, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x0f, 0x20, 0x03, 0x28, 0x03,
0x52, 0x09, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x74, 0x49, 0x64, 0x73, 0x32, 0x99, 0x01, 0x0a, 0x0b,
0x46, 0x69, 0x6c, 0x6d, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x41, 0x0a, 0x07, 0x47,
0x65, 0x74, 0x46, 0x69, 0x6c, 0x6d, 0x12, 0x1a, 0x2e, 0x73, 0x77, 0x61, 0x70, 0x69, 0x2e, 0x66,
0x69, 0x6c, 0x6d, 0x2e, 0x47, 0x65, 0x74, 0x46, 0x69, 0x6c, 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65,
0x73, 0x74, 0x1a, 0x18, 0x2e, 0x73, 0x77, 0x61, 0x70, 0x69, 0x2e, 0x66, 0x69, 0x6c, 0x6d, 0x2e,
0x47, 0x65, 0x74, 0x46, 0x69, 0x6c, 0x6d, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, 0x47,
0x0a, 0x09, 0x4c, 0x69, 0x73, 0x74, 0x46, 0x69, 0x6c, 0x6d, 0x73, 0x12, 0x1c, 0x2e, 0x73, 0x77,
0x61, 0x70, 0x69, 0x2e, 0x66, 0x69, 0x6c, 0x6d, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x46, 0x69, 0x6c,
0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x73, 0x77, 0x61, 0x70,
0x69, 0x2e, 0x66, 0x69, 0x6c, 0x6d, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x46, 0x69, 0x6c, 0x6d, 0x73,
0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x42, 0x9f, 0x01, 0x0a, 0x0e, 0x63, 0x6f, 0x6d, 0x2e,
0x73, 0x77, 0x61, 0x70, 0x69, 0x2e, 0x66, 0x69, 0x6c, 0x6d, 0x42, 0x09, 0x46, 0x69, 0x6c, 0x6d,
0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x39, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e,
0x63, 0x6f, 0x6d, 0x2f, 0x6d, 0x65, 0x72, 0x63, 0x61, 0x72, 0x69, 0x2f, 0x67, 0x72, 0x70, 0x63,
0x2d, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x64, 0x65, 0x6d, 0x6f,
0x2f, 0x73, 0x77, 0x61, 0x70, 0x69, 0x2f, 0x66, 0x69, 0x6c, 0x6d, 0x3b, 0x66, 0x69, 0x6c, 0x6d,
0x70, 0x62, 0xa2, 0x02, 0x03, 0x53, 0x46, 0x58, 0xaa, 0x02, 0x0a, 0x53, 0x77, 0x61, 0x70, 0x69,
0x2e, 0x46, 0x69, 0x6c, 0x6d, 0xca, 0x02, 0x0a, 0x53, 0x77, 0x61, 0x70, 0x69, 0x5c, 0x46, 0x69,
0x6c, 0x6d, 0xe2, 0x02, 0x16, 0x53, 0x77, 0x61, 0x70, 0x69, 0x5c, 0x46, 0x69, 0x6c, 0x6d, 0x5c,
0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0b, 0x53, 0x77,
0x61, 0x70, 0x69, 0x3a, 0x3a, 0x46, 0x69, 0x6c, 0x6d, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f,
0x33,
}
var (
file_film_film_proto_rawDescOnce sync.Once
file_film_film_proto_rawDescData = file_film_film_proto_rawDesc
)
func file_film_film_proto_rawDescGZIP() []byte {
file_film_film_proto_rawDescOnce.Do(func() {
file_film_film_proto_rawDescData = protoimpl.X.CompressGZIP(file_film_film_proto_rawDescData)
})
return file_film_film_proto_rawDescData
}
var file_film_film_proto_msgTypes = make([]protoimpl.MessageInfo, 5)
var file_film_film_proto_goTypes = []interface{}{
(*GetFilmRequest)(nil), // 0: swapi.film.GetFilmRequest
(*GetFilmReply)(nil), // 1: swapi.film.GetFilmReply
(*ListFilmsRequest)(nil), // 2: swapi.film.ListFilmsRequest
(*ListFilmsReply)(nil), // 3: swapi.film.ListFilmsReply
(*Film)(nil), // 4: swapi.film.Film
(*date.Date)(nil), // 5: google.type.Date
}
var file_film_film_proto_depIdxs = []int32{
4, // 0: swapi.film.GetFilmReply.film:type_name -> swapi.film.Film
4, // 1: swapi.film.ListFilmsReply.films:type_name -> swapi.film.Film
5, // 2: swapi.film.Film.release_date:type_name -> google.type.Date
0, // 3: swapi.film.FilmService.GetFilm:input_type -> swapi.film.GetFilmRequest
2, // 4: swapi.film.FilmService.ListFilms:input_type -> swapi.film.ListFilmsRequest
1, // 5: swapi.film.FilmService.GetFilm:output_type -> swapi.film.GetFilmReply
3, // 6: swapi.film.FilmService.ListFilms:output_type -> swapi.film.ListFilmsReply
5, // [5:7] is the sub-list for method output_type
3, // [3:5] is the sub-list for method input_type
3, // [3:3] is the sub-list for extension type_name
3, // [3:3] is the sub-list for extension extendee
0, // [0:3] is the sub-list for field type_name
}
func init() { file_film_film_proto_init() }
func file_film_film_proto_init() {
if File_film_film_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_film_film_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetFilmRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_film_film_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetFilmReply); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_film_film_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ListFilmsRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_film_film_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ListFilmsReply); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_film_film_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Film); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_film_film_proto_rawDesc,
NumEnums: 0,
NumMessages: 5,
NumExtensions: 0,
NumServices: 1,
},
GoTypes: file_film_film_proto_goTypes,
DependencyIndexes: file_film_film_proto_depIdxs,
MessageInfos: file_film_film_proto_msgTypes,
}.Build()
File_film_film_proto = out.File
file_film_film_proto_rawDesc = nil
file_film_film_proto_goTypes = nil
file_film_film_proto_depIdxs = nil
}
================================================
FILE: demo/swapi/film/film_grpc.pb.go
================================================
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.4.0
// - protoc (unknown)
// source: film/film.proto
package filmpb
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.62.0 or later.
const _ = grpc.SupportPackageIsVersion8
const (
FilmService_GetFilm_FullMethodName = "/swapi.film.FilmService/GetFilm"
FilmService_ListFilms_FullMethodName = "/swapi.film.FilmService/ListFilms"
)
// FilmServiceClient is the client API for FilmService 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 FilmServiceClient interface {
GetFilm(ctx context.Context, in *GetFilmRequest, opts ...grpc.CallOption) (*GetFilmReply, error)
ListFilms(ctx context.Context, in *ListFilmsRequest, opts ...grpc.CallOption) (*ListFilmsReply, error)
}
type filmServiceClient struct {
cc grpc.ClientConnInterface
}
func NewFilmServiceClient(cc grpc.ClientConnInterface) FilmServiceClient {
return &filmServiceClient{cc}
}
func (c *filmServiceClient) GetFilm(ctx context.Context, in *GetFilmRequest, opts ...grpc.CallOption) (*GetFilmReply, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(GetFilmReply)
err := c.cc.Invoke(ctx, FilmService_GetFilm_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *filmServiceClient) ListFilms(ctx context.Context, in *ListFilmsRequest, opts ...grpc.CallOption) (*ListFilmsReply, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(ListFilmsReply)
err := c.cc.Invoke(ctx, FilmService_ListFilms_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
// FilmServiceServer is the server API for FilmService service.
// All implementations must embed UnimplementedFilmServiceServer
// for forward compatibility
type FilmServiceServer interface {
GetFilm(context.Context, *GetFilmRequest) (*GetFilmReply, error)
ListFilms(context.Context, *ListFilmsRequest) (*ListFilmsReply, error)
mustEmbedUnimplementedFilmServiceServer()
}
// UnimplementedFilmServiceServer must be embedded to have forward compatible implementations.
type UnimplementedFilmServiceServer struct {
}
func (UnimplementedFilmServiceServer) GetFilm(context.Context, *GetFilmRequest) (*GetFilmReply, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetFilm not implemented")
}
func (UnimplementedFilmServiceServer) ListFilms(context.Context, *ListFilmsRequest) (*ListFilmsReply, error) {
return nil, status.Errorf(codes.Unimplemented, "method ListFilms not implemented")
}
func (UnimplementedFilmServiceServer) mustEmbedUnimplementedFilmServiceServer() {}
// UnsafeFilmServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to FilmServiceServer will
// result in compilation errors.
type UnsafeFilmServiceServer interface {
mustEmbedUnimplementedFilmServiceServer()
}
func RegisterFilmServiceServer(s grpc.ServiceRegistrar, srv FilmServiceServer) {
s.RegisterService(&FilmService_ServiceDesc, srv)
}
func _FilmService_GetFilm_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetFilmRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(FilmServiceServer).GetFilm(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: FilmService_GetFilm_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(FilmServiceServer).GetFilm(ctx, req.(*GetFilmRequest))
}
return interceptor(ctx, in, info, handler)
}
func _FilmService_ListFilms_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ListFilmsRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(FilmServiceServer).ListFilms(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: FilmService_ListFilms_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(FilmServiceServer).ListFilms(ctx, req.(*ListFilmsRequest))
}
return interceptor(ctx, in, info, handler)
}
// FilmService_ServiceDesc is the grpc.ServiceDesc for FilmService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var FilmService_ServiceDesc = grpc.ServiceDesc{
ServiceName: "swapi.film.FilmService",
HandlerType: (*FilmServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "GetFilm",
Handler: _FilmService_GetFilm_Handler,
},
{
MethodName: "ListFilms",
Handler: _FilmService_ListFilms_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "film/film.proto",
}
================================================
FILE: demo/swapi/person/person.pb.go
================================================
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.34.1
// protoc (unknown)
// source: person/person.proto
package personpb
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
// GetPersonRequest.
type GetPersonRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// The persion id.
Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
}
func (x *GetPersonRequest) Reset() {
*x = GetPersonRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_person_person_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GetPersonRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetPersonRequest) ProtoMessage() {}
func (x *GetPersonRequest) ProtoReflect() protoreflect.Message {
mi := &file_person_person_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GetPersonRequest.ProtoReflect.Descriptor instead.
func (*GetPersonRequest) Descriptor() ([]byte, []int) {
return file_person_person_proto_rawDescGZIP(), []int{0}
}
func (x *GetPersonRequest) GetId() int64 {
if x != nil {
return x.Id
}
return 0
}
// GetPersonReply.
type GetPersonReply struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Person *Person `protobuf:"bytes,1,opt,name=person,proto3" json:"person,omitempty"`
}
func (x *GetPersonReply) Reset() {
*x = GetPersonReply{}
if protoimpl.UnsafeEnabled {
mi := &file_person_person_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GetPersonReply) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetPersonReply) ProtoMessage() {}
func (x *GetPersonReply) ProtoReflect() protoreflect.Message {
mi := &file_person_person_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GetPersonReply.ProtoReflect.Descriptor instead.
func (*GetPersonReply) Descriptor() ([]byte, []int) {
return file_person_person_proto_rawDescGZIP(), []int{1}
}
func (x *GetPersonReply) GetPerson() *Person {
if x != nil {
return x.Person
}
return nil
}
// ListPeopleRequest.
type ListPeopleRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Ids []int64 `protobuf:"varint,1,rep,packed,name=ids,proto3" json:"ids,omitempty"`
}
func (x *ListPeopleRequest) Reset() {
*x = ListPeopleRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_person_person_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ListPeopleRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ListPeopleRequest) ProtoMessage() {}
func (x *ListPeopleRequest) ProtoReflect() protoreflect.Message {
mi := &file_person_person_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ListPeopleRequest.ProtoReflect.Descriptor instead.
func (*ListPeopleRequest) Descriptor() ([]byte, []int) {
return file_person_person_proto_rawDescGZIP(), []int{2}
}
func (x *ListPeopleRequest) GetIds() []int64 {
if x != nil {
return x.Ids
}
return nil
}
// ListPeopleReply.
type ListPeopleReply struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
People []*Person `protobuf:"bytes,1,rep,name=people,proto3" json:"people,omitempty"`
}
func (x *ListPeopleReply) Reset() {
*x = ListPeopleReply{}
if protoimpl.UnsafeEnabled {
mi := &file_person_person_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ListPeopleReply) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ListPeopleReply) ProtoMessage() {}
func (x *ListPeopleReply) ProtoReflect() protoreflect.Message {
mi := &file_person_person_proto_msgTypes[3]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ListPeopleReply.ProtoReflect.Descriptor instead.
func (*ListPeopleReply) Descriptor() ([]byte, []int) {
return file_person_person_proto_rawDescGZIP(), []int{3}
}
func (x *ListPeopleReply) GetPeople() []*Person {
if x != nil {
return x.People
}
return nil
}
// Person is an individual person or character within the Star Wars universe.
type Person struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// person id.
Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
// The name of this person.
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
// The birth year of the person,
// using the in-universe standard of BBY or ABY
// - Before the Battle of Yavin or After the Battle of Yavin.
// The Battle of Yavin is a battle that occurs at the end of Star Wars episode IV: A New Hope.
BirthYear string `protobuf:"bytes,3,opt,name=birth_year,json=birthYear,proto3" json:"birth_year,omitempty"`
// The eye color of this person.
// Will be "unknown" if not known or "n/a" if the person does not have an eye.
EyeColor string `protobuf:"bytes,4,opt,name=eye_color,json=eyeColor,proto3" json:"eye_color,omitempty"`
// The gender of this person.
// Either "Male", "Female" or "unknown", "n/a" if the person does not have a gender.
Gender string `protobuf:"bytes,5,opt,name=gender,proto3" json:"gender,omitempty"`
// The hair color of this person.
// Will be "unknown" if not known or "n/a" if the person does not have hair.
HairColor string `protobuf:"bytes,6,opt,name=hair_color,json=hairColor,proto3" json:"hair_color,omitempty"`
// The height of the person in centimeters.
Height string `protobuf:"bytes,7,opt,name=height,proto3" json:"height,omitempty"`
// The mass of the person in kilograms.
Mass string `protobuf:"bytes,8,opt,name=mass,proto3" json:"mass,omitempty"`
// The skin color of this person.
SkinColor string `protobuf:"bytes,9,opt,name=skin_color,json=skinColor,proto3" json:"skin_color,omitempty"`
// The URL of a planet resource, a planet that this person was born on or inhabits.
Homeworld string `protobuf:"bytes,10,opt,name=homeworld,proto3" json:"homeworld,omitempty"`
// the hypermedia URL of this resource.
Url string `protobuf:"bytes,11,opt,name=url,proto3" json:"url,omitempty"`
// the ISO 8601 date format of the time that this resource was created.
Created string `protobuf:"bytes,12,opt,name=created,proto3" json:"created,omitempty"`
// the ISO 8601 date format of the time that this resource was edited.
Edited string `protobuf:"bytes,13,opt,name=edited,proto3" json:"edited,omitempty"`
// film ids.
FilmIds []int64 `protobuf:"varint,14,rep,packed,name=film_ids,json=filmIds,proto3" json:"film_ids,omitempty"`
// species ids.
SpeciesIds []int64 `protobuf:"varint,15,rep,packed,name=species_ids,json=speciesIds,proto3" json:"species_ids,omitempty"`
// starship ids.
StarshipIds []int64 `protobuf:"varint,16,rep,packed,name=starship_ids,json=starshipIds,proto3" json:"starship_ids,omitempty"`
// vehicle ids.
VehicleIds []int64 `protobuf:"varint,17,rep,packed,name=vehicle_ids,json=vehicleIds,proto3" json:"vehicle_ids,omitempty"`
}
func (x *Person) Reset() {
*x = Person{}
if protoimpl.UnsafeEnabled {
mi := &file_person_person_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Person) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Person) ProtoMessage() {}
func (x *Person) ProtoReflect() protoreflect.Message {
mi := &file_person_person_proto_msgTypes[4]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Person.ProtoReflect.Descriptor instead.
func (*Person) Descriptor() ([]byte, []int) {
return file_person_person_proto_rawDescGZIP(), []int{4}
}
func (x *Person) GetId() int64 {
if x != nil {
return x.Id
}
return 0
}
func (x *Person) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *Person) GetBirthYear() string {
if x != nil {
return x.BirthYear
}
return ""
}
func (x *Person) GetEyeColor() string {
if x != nil {
return x.EyeColor
}
return ""
}
func (x *Person) GetGender() string {
if x != nil {
return x.Gender
}
return ""
}
func (x *Person) GetHairColor() string {
if x != nil {
return x.HairColor
}
return ""
}
func (x *Person) GetHeight() string {
if x != nil {
return x.Height
}
return ""
}
func (x *Person) GetMass() string {
if x != nil {
return x.Mass
}
return ""
}
func (x *Person) GetSkinColor() string {
if x != nil {
return x.SkinColor
}
return ""
}
func (x *Person) GetHomeworld() string {
if x != nil {
return x.Homeworld
}
return ""
}
func (x *Person) GetUrl() string {
if x != nil {
return x.Url
}
return ""
}
func (x *Person) GetCreated() string {
if x != nil {
return x.Created
}
return ""
}
func (x *Person) GetEdited() string {
if x != nil {
return x.Edited
}
return ""
}
func (x *Person) GetFilmIds() []int64 {
if x != nil {
return x.FilmIds
}
return nil
}
func (x *Person) GetSpeciesIds() []int64 {
if x != nil {
return x.SpeciesIds
}
return nil
}
func (x *Person) GetStarshipIds() []int64 {
if x != nil {
return x.StarshipIds
}
return nil
}
func (x *Person) GetVehicleIds() []int64 {
if x != nil {
return x.VehicleIds
}
return nil
}
var File_person_person_proto protoreflect.FileDescriptor
var file_person_person_proto_rawDesc = []byte{
0x0a, 0x13, 0x70, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x2f, 0x70, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x2e,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0c, 0x73, 0x77, 0x61, 0x70, 0x69, 0x2e, 0x70, 0x65, 0x72,
0x73, 0x6f, 0x6e, 0x22, 0x22, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e,
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20,
0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x22, 0x3e, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x50, 0x65,
0x72, 0x73, 0x6f, 0x6e, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x2c, 0x0a, 0x06, 0x70, 0x65, 0x72,
0x73, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x73, 0x77, 0x61, 0x70,
0x69, 0x2e, 0x70, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x2e, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x52,
0x06, 0x70, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x22, 0x25, 0x0a, 0x11, 0x4c, 0x69, 0x73, 0x74, 0x50,
0x65, 0x6f, 0x70, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x10, 0x0a, 0x03,
0x69, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x03, 0x52, 0x03, 0x69, 0x64, 0x73, 0x22, 0x3f,
0x0a, 0x0f, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x65, 0x6f, 0x70, 0x6c, 0x65, 0x52, 0x65, 0x70, 0x6c,
0x79, 0x12, 0x2c, 0x0a, 0x06, 0x70, 0x65, 0x6f, 0x70, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x03, 0x28,
0x0b, 0x32, 0x14, 0x2e, 0x73, 0x77, 0x61, 0x70, 0x69, 0x2e, 0x70, 0x65, 0x72, 0x73, 0x6f, 0x6e,
0x2e, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x52, 0x06, 0x70, 0x65, 0x6f, 0x70, 0x6c, 0x65, 0x22,
0xcc, 0x03, 0x0a, 0x06, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64,
0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61,
0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1d,
0x0a, 0x0a, 0x62, 0x69, 0x72, 0x74, 0x68, 0x5f, 0x79, 0x65, 0x61, 0x72, 0x18, 0x03, 0x20, 0x01,
0x28, 0x09, 0x52, 0x09, 0x62, 0x69, 0x72, 0x74, 0x68, 0x59, 0x65, 0x61, 0x72, 0x12, 0x1b, 0x0a,
0x09, 0x65, 0x79, 0x65, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09,
0x52, 0x08, 0x65, 0x79, 0x65, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x67, 0x65,
0x6e, 0x64, 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x67, 0x65, 0x6e, 0x64,
0x65, 0x72, 0x12, 0x1d, 0x0a, 0x0a, 0x68, 0x61, 0x69, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72,
0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x68, 0x61, 0x69, 0x72, 0x43, 0x6f, 0x6c, 0x6f,
0x72, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28,
0x09, 0x52, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6d, 0x61, 0x73,
0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6d, 0x61, 0x73, 0x73, 0x12, 0x1d, 0x0a,
0x0a, 0x73, 0x6b, 0x69, 0x6e, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x18, 0x09, 0x20, 0x01, 0x28,
0x09, 0x52, 0x09, 0x73, 0x6b, 0x69, 0x6e, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x12, 0x1c, 0x0a, 0x09,
0x68, 0x6f, 0x6d, 0x65, 0x77, 0x6f, 0x72, 0x6c, 0x64, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52,
0x09, 0x68, 0x6f, 0x6d, 0x65, 0x77, 0x6f, 0x72, 0x6c, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72,
0x6c, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6c, 0x12, 0x18, 0x0a, 0x07,
0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63,
0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x65, 0x64, 0x69, 0x74, 0x65, 0x64,
0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x65, 0x64, 0x69, 0x74, 0x65, 0x64, 0x12, 0x19,
0x0a, 0x08, 0x66, 0x69, 0x6c, 0x6d, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x0e, 0x20, 0x03, 0x28, 0x03,
0x52, 0x07, 0x66, 0x69, 0x6c, 0x6d, 0x49, 0x64, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x70, 0x65,
0x63, 0x69, 0x65, 0x73, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x0f, 0x20, 0x03, 0x28, 0x03, 0x52, 0x0a,
0x73, 0x70, 0x65, 0x63, 0x69, 0x65, 0x73, 0x49, 0x64, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x74,
0x61, 0x72, 0x73, 0x68, 0x69, 0x70, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x10, 0x20, 0x03, 0x28, 0x03,
0x52, 0x0b, 0x73, 0x74, 0x61, 0x72, 0x73, 0x68, 0x69, 0x70, 0x49, 0x64, 0x73, 0x12, 0x1f, 0x0a,
0x0b, 0x76, 0x65, 0x68, 0x69, 0x63, 0x6c, 0x65, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x11, 0x20, 0x03,
0x28, 0x03, 0x52, 0x0a, 0x76, 0x65, 0x68, 0x69, 0x63, 0x6c, 0x65, 0x49, 0x64, 0x73, 0x32, 0xac,
0x01, 0x0a, 0x0d, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65,
0x12, 0x4b, 0x0a, 0x09, 0x47, 0x65, 0x74, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x12, 0x1e, 0x2e,
0x73, 0x77, 0x61, 0x70, 0x69, 0x2e, 0x70, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x2e, 0x47, 0x65, 0x74,
0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e,
0x73, 0x77, 0x61, 0x70, 0x69, 0x2e, 0x70, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x2e, 0x47, 0x65, 0x74,
0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, 0x4e, 0x0a,
0x0a, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x65, 0x6f, 0x70, 0x6c, 0x65, 0x12, 0x1f, 0x2e, 0x73, 0x77,
0x61, 0x70, 0x69, 0x2e, 0x70, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x50,
0x65, 0x6f, 0x70, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x73,
0x77, 0x61, 0x70, 0x69, 0x2e, 0x70, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x2e, 0x4c, 0x69, 0x73, 0x74,
0x50, 0x65, 0x6f, 0x70, 0x6c, 0x65, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x42, 0xaf, 0x01,
0x0a, 0x10, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x77, 0x61, 0x70, 0x69, 0x2e, 0x70, 0x65, 0x72, 0x73,
0x6f, 0x6e, 0x42, 0x0b, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50,
0x01, 0x5a, 0x3d, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6d, 0x65,
0x72, 0x63, 0x61, 0x72, 0x69, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2d, 0x66, 0x65, 0x64, 0x65, 0x72,
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x64, 0x65, 0x6d, 0x6f, 0x2f, 0x73, 0x77, 0x61, 0x70, 0x69,
0x2f, 0x70, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x3b, 0x70, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x70, 0x62,
0xa2, 0x02, 0x03, 0x53, 0x50, 0x58, 0xaa, 0x02, 0x0c, 0x53, 0x77, 0x61, 0x70, 0x69, 0x2e, 0x50,
0x65, 0x72, 0x73, 0x6f, 0x6e, 0xca, 0x02, 0x0c, 0x53, 0x77, 0x61, 0x70, 0x69, 0x5c, 0x50, 0x65,
0x72, 0x73, 0x6f, 0x6e, 0xe2, 0x02, 0x18, 0x53, 0x77, 0x61, 0x70, 0x69, 0x5c, 0x50, 0x65, 0x72,
0x73, 0x6f, 0x6e, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea,
0x02, 0x0d, 0x53, 0x77, 0x61, 0x70, 0x69, 0x3a, 0x3a, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x62,
0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_person_person_proto_rawDescOnce sync.Once
file_person_person_proto_rawDescData = file_person_person_proto_rawDesc
)
func file_person_person_proto_rawDescGZIP() []byte {
file_person_person_proto_rawDescOnce.Do(func() {
file_person_person_proto_rawDescData = protoimpl.X.CompressGZIP(file_person_person_proto_rawDescData)
})
return file_person_person_proto_rawDescData
}
var file_person_person_proto_msgTypes = make([]protoimpl.MessageInfo, 5)
var file_person_person_proto_goTypes = []interface{}{
(*GetPersonRequest)(nil), // 0: swapi.person.GetPersonRequest
(*GetPersonReply)(nil), // 1: swapi.person.GetPersonReply
(*ListPeopleRequest)(nil), // 2: swapi.person.ListPeopleRequest
(*ListPeopleReply)(nil), // 3: swapi.person.ListPeopleReply
(*Person)(nil), // 4: swapi.person.Person
}
var file_person_person_proto_depIdxs = []int32{
4, // 0: swapi.person.GetPersonReply.person:type_name -> swapi.person.Person
4, // 1: swapi.person.ListPeopleReply.people:type_name -> swapi.person.Person
0, // 2: swapi.person.PersonService.GetPerson:input_type -> swapi.person.GetPersonRequest
2, // 3: swapi.person.PersonService.ListPeople:input_type -> swapi.person.ListPeopleRequest
1, // 4: swapi.person.PersonService.GetPerson:output_type -> swapi.person.GetPersonReply
3, // 5: swapi.person.PersonService.ListPeople:output_type -> swapi.person.ListPeopleReply
4, // [4:6] is the sub-list for method output_type
2, // [2:4] is the sub-list for method input_type
2, // [2:2] is the sub-list for extension type_name
2, // [2:2] is the sub-list for extension extendee
0, // [0:2] is the sub-list for field type_name
}
func init() { file_person_person_proto_init() }
func file_person_person_proto_init() {
if File_person_person_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_person_person_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetPersonRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_person_person_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetPersonReply); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_person_person_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ListPeopleRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_person_person_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ListPeopleReply); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_person_person_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Person); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_person_person_proto_rawDesc,
NumEnums: 0,
NumMessages: 5,
NumExtensions: 0,
NumServices: 1,
},
GoTypes: file_person_person_proto_goTypes,
DependencyIndexes: file_person_person_proto_depIdxs,
MessageInfos: file_person_person_proto_msgTypes,
}.Build()
File_person_person_proto = out.File
file_person_person_proto_rawDesc = nil
file_person_person_proto_goTypes = nil
file_person_person_proto_depIdxs = nil
}
================================================
FILE: demo/swapi/person/person_grpc.pb.go
================================================
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.4.0
// - protoc (unknown)
// source: person/person.proto
package personpb
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.62.0 or later.
const _ = grpc.SupportPackageIsVersion8
const (
PersonService_GetPerson_FullMethodName = "/swapi.person.PersonService/GetPerson"
PersonService_ListPeople_FullMethodName = "/swapi.person.PersonService/ListPeople"
)
// PersonServiceClient is the client API for PersonService 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 PersonServiceClient interface {
GetPerson(ctx context.Context, in *GetPersonRequest, opts ...grpc.CallOption) (*GetPersonReply, error)
ListPeople(ctx context.Context, in *ListPeopleRequest, opts ...grpc.CallOption) (*ListPeopleReply, error)
}
type personServiceClient struct {
cc grpc.ClientConnInterface
}
func NewPersonServiceClient(cc grpc.ClientConnInterface) PersonServiceClient {
return &personServiceClient{cc}
}
func (c *personServiceClient) GetPerson(ctx context.Context, in *GetPersonRequest, opts ...grpc.CallOption) (*GetPersonReply, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(GetPersonReply)
err := c.cc.Invoke(ctx, PersonService_GetPerson_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *personServiceClient) ListPeople(ctx context.Context, in *ListPeopleRequest, opts ...grpc.CallOption) (*ListPeopleReply, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(ListPeopleReply)
err := c.cc.Invoke(ctx, PersonService_ListPeople_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
// PersonServiceServer is the server API for PersonService service.
// All implementations must embed UnimplementedPersonServiceServer
// for forward compatibility
type PersonServiceServer interface {
GetPerson(context.Context, *GetPersonRequest) (*GetPersonReply, error)
ListPeople(context.Context, *ListPeopleRequest) (*ListPeopleReply, error)
mustEmbedUnimplementedPersonServiceServer()
}
// UnimplementedPersonServiceServer must be embedded to have forward compatible implementations.
type UnimplementedPersonServiceServer struct {
}
func (UnimplementedPersonServiceServer) GetPerson(context.Context, *GetPersonRequest) (*GetPersonReply, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetPerson not implemented")
}
func (UnimplementedPersonServiceServer) ListPeople(context.Context, *ListPeopleRequest) (*ListPeopleReply, error) {
return nil, status.Errorf(codes.Unimplemented, "method ListPeople not implemented")
}
func (UnimplementedPersonServiceServer) mustEmbedUnimplementedPersonServiceServer() {}
// UnsafePersonServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to PersonServiceServer will
// result in compilation errors.
type UnsafePersonServiceServer interface {
mustEmbedUnimplementedPersonServiceServer()
}
func RegisterPersonServiceServer(s grpc.ServiceRegistrar, srv PersonServiceServer) {
s.RegisterService(&PersonService_ServiceDesc, srv)
}
func _PersonService_GetPerson_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetPersonRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(PersonServiceServer).GetPerson(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: PersonService_GetPerson_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(PersonServiceServer).GetPerson(ctx, req.(*GetPersonRequest))
}
return interceptor(ctx, in, info, handler)
}
func _PersonService_ListPeople_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ListPeopleRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(PersonServiceServer).ListPeople(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: PersonService_ListPeople_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(PersonServiceServer).ListPeople(ctx, req.(*ListPeopleRequest))
}
return interceptor(ctx, in, info, handler)
}
// PersonService_ServiceDesc is the grpc.ServiceDesc for PersonService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var PersonService_ServiceDesc = grpc.ServiceDesc{
ServiceName: "swapi.person.PersonService",
HandlerType: (*PersonServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "GetPerson",
Handler: _PersonService_GetPerson_Handler,
},
{
MethodName: "ListPeople",
Handler: _PersonService_ListPeople_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "person/person.proto",
}
================================================
FILE: demo/swapi/planet/planet.pb.go
================================================
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.34.1
// protoc (unknown)
// source: planet/planet.proto
package planetpb
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
// GetPlanetRequest.
type GetPlanetRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// planet id.
Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
}
func (x *GetPlanetRequest) Reset() {
*x = GetPlanetRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_planet_planet_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GetPlanetRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetPlanetRequest) ProtoMessage() {}
func (x *GetPlanetRequest) ProtoReflect() protoreflect.Message {
mi := &file_planet_planet_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GetPlanetRequest.ProtoReflect.Descriptor instead.
func (*GetPlanetRequest) Descriptor() ([]byte, []int) {
return file_planet_planet_proto_rawDescGZIP(), []int{0}
}
func (x *GetPlanetRequest) GetId() int64 {
if x != nil {
return x.Id
}
return 0
}
// GetPlanetReply.
type GetPlanetReply struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Planet *Planet `protobuf:"bytes,1,opt,name=planet,proto3" json:"planet,omitempty"`
}
func (x *GetPlanetReply) Reset() {
*x = GetPlanetReply{}
if protoimpl.UnsafeEnabled {
mi := &file_planet_planet_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GetPlanetReply) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetPlanetReply) ProtoMessage() {}
func (x *GetPlanetReply) ProtoReflect() protoreflect.Message {
mi := &file_planet_planet_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GetPlanetReply.ProtoReflect.Descriptor instead.
func (*GetPlanetReply) Descriptor() ([]byte, []int) {
return file_planet_planet_proto_rawDescGZIP(), []int{1}
}
func (x *GetPlanetReply) GetPlanet() *Planet {
if x != nil {
return x.Planet
}
return nil
}
// ListPlanetsRequest.
type ListPlanetsRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Ids []int64 `protobuf:"varint,1,rep,packed,name=ids,proto3" json:"ids,omitempty"`
}
func (x *ListPlanetsRequest) Reset() {
*x = ListPlanetsRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_planet_planet_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ListPlanetsRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ListPlanetsRequest) ProtoMessage() {}
func (x *ListPlanetsRequest) ProtoReflect() protoreflect.Message {
mi := &file_planet_planet_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ListPlanetsRequest.ProtoReflect.Descriptor instead.
func (*ListPlanetsRequest) Descriptor() ([]byte, []int) {
return file_planet_planet_proto_rawDescGZIP(), []int{2}
}
func (x *ListPlanetsRequest) GetIds() []int64 {
if x != nil {
return x.Ids
}
return nil
}
// ListPlanetsReply.
type ListPlanetsReply struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Planets []*Planet `protobuf:"bytes,1,rep,name=planets,proto3" json:"planets,omitempty"`
}
func (x *ListPlanetsReply) Reset() {
*x = ListPlanetsReply{}
if protoimpl.UnsafeEnabled {
mi := &file_planet_planet_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ListPlanetsReply) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ListPlanetsReply) ProtoMessage() {}
func (x *ListPlanetsReply) ProtoReflect() protoreflect.Message {
mi := &file_planet_planet_proto_msgTypes[3]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ListPlanetsReply.ProtoReflect.Descriptor instead.
func (*ListPlanetsReply) Descriptor() ([]byte, []int) {
return file_planet_planet_proto_rawDescGZIP(), []int{3}
}
func (x *ListPlanetsReply) GetPlanets() []*Planet {
if x != nil {
return x.Planets
}
return nil
}
// Planet is a large mass, planet or planetoid in the Star Wars Universe, at the time of 0 ABY.
type Planet struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// planet id.
Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
// The name of this planet.
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
// The diameter of this planet in kilometers.
Diameter string `protobuf:"bytes,3,opt,name=diameter,proto3" json:"diameter,omitempty"`
// The number of standard hours it takes for this planet to complete a single rotation on its axis.
RotationPeriod string `protobuf:"bytes,4,opt,name=rotation_period,json=rotationPeriod,proto3" json:"rotation_period,omitempty"`
// The number of standard days it takes for this planet to complete a single orbit of its local star.
OrbitalPeriod string `protobuf:"bytes,5,opt,name=orbital_period,json=orbitalPeriod,proto3" json:"orbital_period,omitempty"`
// A number denoting the gravity of this planet, where "1" is normal or 1 standard G.
// "2" is twice or 2 standard Gs. "0.5" is half or 0.5 standard Gs.
Gravity string `protobuf:"bytes,6,opt,name=gravity,proto3" json:"gravity,omitempty"`
// The average population of sentient beings inhabiting this planet.
Population string `protobuf:"bytes,7,opt,name=population,proto3" json:"population,omitempty"`
// The climate of this planet. Comma separated if diverse.
Climate string `protobuf:"bytes,8,opt,name=climate,proto3" json:"climate,omitempty"`
// The terrain of this planet. Comma separated if diverse.
Terrain string `protobuf:"bytes,9,opt,name=terrain,proto3" json:"terrain,omitempty"`
// The percentage of the planet surface that is naturally occurring water or bodies of water.
SurfaceWater string `protobuf:"bytes,10,opt,name=surface_water,json=surfaceWater,proto3" json:"surface_water,omitempty"`
// the hypermedia URL of this resource.
Url string `protobuf:"bytes,11,opt,name=url,proto3" json:"url,omitempty"`
// the ISO 8601 date format of the time that this resource was created.
Created string `protobuf:"bytes,12,opt,name=created,proto3" json:"created,omitempty"`
// the ISO 8601 date format of the time that this resource was edited.
Edited string `protobuf:"bytes,13,opt,name=edited,proto3" json:"edited,omitempty"`
// the person that live on this planet ids.
ResidentIds []int64 `protobuf:"varint,14,rep,packed,name=resident_ids,json=residentIds,proto3" json:"resident_ids,omitempty"`
// film ids.
FilmIds []int64 `protobuf:"varint,15,rep,packed,name=film_ids,json=filmIds,proto3" json:"film_ids,omitempty"`
}
func (x *Planet) Reset() {
*x = Planet{}
if protoimpl.UnsafeEnabled {
mi := &file_planet_planet_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Planet) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Planet) ProtoMessage() {}
func (x *Planet) ProtoReflect() protoreflect.Message {
mi := &file_planet_planet_proto_msgTypes[4]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Planet.ProtoReflect.Descriptor instead.
func (*Planet) Descriptor() ([]byte, []int) {
return file_planet_planet_proto_rawDescGZIP(), []int{4}
}
func (x *Planet) GetId() int64 {
if x != nil {
return x.Id
}
return 0
}
func (x *Planet) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *Planet) GetDiameter() string {
if x != nil {
return x.Diameter
}
return ""
}
func (x *Planet) GetRotationPeriod() string {
if x != nil {
return x.RotationPeriod
}
return ""
}
func (x *Planet) GetOrbitalPeriod() string {
if x != nil {
return x.OrbitalPeriod
}
return ""
}
func (x *Planet) GetGravity() string {
if x != nil {
return x.Gravity
}
return ""
}
func (x *Planet) GetPopulation() string {
if x != nil {
return x.Population
}
return ""
}
func (x *Planet) GetClimate() string {
if x != nil {
return x.Climate
}
return ""
}
func (x *Planet) GetTerrain() string {
if x != nil {
return x.Terrain
}
return ""
}
func (x *Planet) GetSurfaceWater() string {
if x != nil {
return x.SurfaceWater
}
return ""
}
func (x *Planet) GetUrl() string {
if x != nil {
return x.Url
}
return ""
}
func (x *Planet) GetCreated() string {
if x != nil {
return x.Created
}
return ""
}
func (x *Planet) GetEdited() string {
if x != nil {
return x.Edited
}
return ""
}
func (x *Planet) GetResidentIds() []int64 {
if x != nil {
return x.ResidentIds
}
return nil
}
func (x *Planet) GetFilmIds() []int64 {
if x != nil {
return x.FilmIds
}
return nil
}
var File_planet_planet_proto protoreflect.FileDescriptor
var file_planet_planet_proto_rawDesc = []byte{
0x0a, 0x13, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x74, 0x2f, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x74, 0x2e,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0c, 0x73, 0x77, 0x61, 0x70, 0x69, 0x2e, 0x70, 0x6c, 0x61,
0x6e, 0x65, 0x74, 0x22, 0x22, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x50, 0x6c, 0x61, 0x6e, 0x65, 0x74,
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20,
0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x22, 0x3e, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x50, 0x6c,
0x61, 0x6e, 0x65, 0x74, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x2c, 0x0a, 0x06, 0x70, 0x6c, 0x61,
0x6e, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x73, 0x77, 0x61, 0x70,
0x69, 0x2e, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x74, 0x2e, 0x50, 0x6c, 0x61, 0x6e, 0x65, 0x74, 0x52,
0x06, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x74, 0x22, 0x26, 0x0a, 0x12, 0x4c, 0x69, 0x73, 0x74, 0x50,
0x6c, 0x61, 0x6e, 0x65, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x10, 0x0a,
0x03, 0x69, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x03, 0x52, 0x03, 0x69, 0x64, 0x73, 0x22,
0x42, 0x0a, 0x10, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x6c, 0x61, 0x6e, 0x65, 0x74, 0x73, 0x52, 0x65,
0x70, 0x6c, 0x79, 0x12, 0x2e, 0x0a, 0x07, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x74, 0x73, 0x18, 0x01,
0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x73, 0x77, 0x61, 0x70, 0x69, 0x2e, 0x70, 0x6c, 0x61,
0x6e, 0x65, 0x74, 0x2e, 0x50, 0x6c, 0x61, 0x6e, 0x65, 0x74, 0x52, 0x07, 0x70, 0x6c, 0x61, 0x6e,
0x65, 0x74, 0x73, 0x22, 0xad, 0x03, 0x0a, 0x06, 0x50, 0x6c, 0x61, 0x6e, 0x65, 0x74, 0x12, 0x0e,
0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12,
0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61,
0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x64, 0x69, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x18, 0x03,
0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x64, 0x69, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x12, 0x27,
0x0a, 0x0f, 0x72, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x65, 0x72, 0x69, 0x6f,
0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x72, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f,
0x6e, 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x12, 0x25, 0x0a, 0x0e, 0x6f, 0x72, 0x62, 0x69, 0x74,
0x61, 0x6c, 0x5f, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52,
0x0d, 0x6f, 0x72, 0x62, 0x69, 0x74, 0x61, 0x6c, 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x12, 0x18,
0x0a, 0x07, 0x67, 0x72, 0x61, 0x76, 0x69, 0x74, 0x79, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52,
0x07, 0x67, 0x72, 0x61, 0x76, 0x69, 0x74, 0x79, 0x12, 0x1e, 0x0a, 0x0a, 0x70, 0x6f, 0x70, 0x75,
0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x70, 0x6f,
0x70, 0x75, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6c, 0x69, 0x6d,
0x61, 0x74, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6c, 0x69, 0x6d, 0x61,
0x74, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x74, 0x65, 0x72, 0x72, 0x61, 0x69, 0x6e, 0x18, 0x09, 0x20,
0x01, 0x28, 0x09, 0x52, 0x07, 0x74, 0x65, 0x72, 0x72, 0x61, 0x69, 0x6e, 0x12, 0x23, 0x0a, 0x0d,
0x73, 0x75, 0x72, 0x66, 0x61, 0x63, 0x65, 0x5f, 0x77, 0x61, 0x74, 0x65, 0x72, 0x18, 0x0a, 0x20,
0x01, 0x28, 0x09, 0x52, 0x0c, 0x73, 0x75, 0x72, 0x66, 0x61, 0x63, 0x65, 0x57, 0x61, 0x74, 0x65,
0x72, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03,
0x75, 0x72, 0x6c, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x18, 0x0c,
0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x12, 0x16, 0x0a,
0x06, 0x65, 0x64, 0x69, 0x74, 0x65, 0x64, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x65,
0x64, 0x69, 0x74, 0x65, 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x72, 0x65, 0x73, 0x69, 0x64, 0x65, 0x6e,
0x74, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x0e, 0x20, 0x03, 0x28, 0x03, 0x52, 0x0b, 0x72, 0x65, 0x73,
0x69, 0x64, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x73, 0x12, 0x19, 0x0a, 0x08, 0x66, 0x69, 0x6c, 0x6d,
0x5f, 0x69, 0x64, 0x73, 0x18, 0x0f, 0x20, 0x03, 0x28, 0x03, 0x52, 0x07, 0x66, 0x69, 0x6c, 0x6d,
0x49, 0x64, 0x73, 0x32, 0xaf, 0x01, 0x0a, 0x0d, 0x50, 0x6c, 0x61, 0x6e, 0x65, 0x74, 0x53, 0x65,
0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x4b, 0x0a, 0x09, 0x47, 0x65, 0x74, 0x50, 0x6c, 0x61, 0x6e,
0x65, 0x74, 0x12, 0x1e, 0x2e, 0x73, 0x77, 0x61, 0x70, 0x69, 0x2e, 0x70, 0x6c, 0x61, 0x6e, 0x65,
0x74, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x6c, 0x61, 0x6e, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65,
0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x73, 0x77, 0x61, 0x70, 0x69, 0x2e, 0x70, 0x6c, 0x61, 0x6e, 0x65,
0x74, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x6c, 0x61, 0x6e, 0x65, 0x74, 0x52, 0x65, 0x70, 0x6c, 0x79,
0x22, 0x00, 0x12, 0x51, 0x0a, 0x0b, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x6c, 0x61, 0x6e, 0x65, 0x74,
0x73, 0x12, 0x20, 0x2e, 0x73, 0x77, 0x61, 0x70, 0x69, 0x2e, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x74,
0x2e, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x6c, 0x61, 0x6e, 0x65, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75,
0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x73, 0x77, 0x61, 0x70, 0x69, 0x2e, 0x70, 0x6c, 0x61, 0x6e,
0x65, 0x74, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x6c, 0x61, 0x6e, 0x65, 0x74, 0x73, 0x52, 0x65,
0x70, 0x6c, 0x79, 0x22, 0x00, 0x42, 0xaf, 0x01, 0x0a, 0x10, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x77,
0x61, 0x70, 0x69, 0x2e, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x74, 0x42, 0x0b, 0x50, 0x6c, 0x61, 0x6e,
0x65, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3d, 0x67, 0x69, 0x74, 0x68, 0x75,
0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6d, 0x65, 0x72, 0x63, 0x61, 0x72, 0x69, 0x2f, 0x67, 0x72,
0x70, 0x63, 0x2d, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x64, 0x65,
0x6d, 0x6f, 0x2f, 0x73, 0x77, 0x61, 0x70, 0x69, 0x2f, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x74, 0x3b,
0x70, 0x6c, 0x61, 0x6e, 0x65, 0x74, 0x70, 0x62, 0xa2, 0x02, 0x03, 0x53, 0x50, 0x58, 0xaa, 0x02,
0x0c, 0x53, 0x77, 0x61, 0x70, 0x69, 0x2e, 0x50, 0x6c, 0x61, 0x6e, 0x65, 0x74, 0xca, 0x02, 0x0c,
0x53, 0x77, 0x61, 0x70, 0x69, 0x5c, 0x50, 0x6c, 0x61, 0x6e, 0x65, 0x74, 0xe2, 0x02, 0x18, 0x53,
0x77, 0x61, 0x70, 0x69, 0x5c, 0x50, 0x6c, 0x61, 0x6e, 0x65, 0x74, 0x5c, 0x47, 0x50, 0x42, 0x4d,
0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0d, 0x53, 0x77, 0x61, 0x70, 0x69, 0x3a,
0x3a, 0x50, 0x6c, 0x61, 0x6e, 0x65, 0x74, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_planet_planet_proto_rawDescOnce sync.Once
file_planet_planet_proto_rawDescData = file_planet_planet_proto_rawDesc
)
func file_planet_planet_proto_rawDescGZIP() []byte {
file_planet_planet_proto_rawDescOnce.Do(func() {
file_planet_planet_proto_rawDescData = protoimpl.X.CompressGZIP(file_planet_planet_proto_rawDescData)
})
return file_planet_planet_proto_rawDescData
}
var file_planet_planet_proto_msgTypes = make([]protoimpl.MessageInfo, 5)
var file_planet_planet_proto_goTypes = []interface{}{
(*GetPlanetRequest)(nil), // 0: swapi.planet.GetPlanetRequest
(*GetPlanetReply)(nil), // 1: swapi.planet.GetPlanetReply
(*ListPlanetsRequest)(nil), // 2: swapi.planet.ListPlanetsRequest
(*ListPlanetsReply)(nil), // 3: swapi.planet.ListPlanetsReply
(*Planet)(nil), // 4: swapi.planet.Planet
}
var file_planet_planet_proto_depIdxs = []int32{
4, // 0: swapi.planet.GetPlanetReply.planet:type_name -> swapi.planet.Planet
4, // 1: swapi.planet.ListPlanetsReply.planets:type_name -> swapi.planet.Planet
0, // 2: swapi.planet.PlanetService.GetPlanet:input_type -> swapi.planet.GetPlanetRequest
2, // 3: swapi.planet.PlanetService.ListPlanets:input_type -> swapi.planet.ListPlanetsRequest
1, // 4: swapi.planet.PlanetService.GetPlanet:output_type -> swapi.planet.GetPlanetReply
3, // 5: swapi.planet.PlanetService.ListPlanets:output_type -> swapi.planet.ListPlanetsReply
4, // [4:6] is the sub-list for method output_type
2, // [2:4] is the sub-list for method input_type
2, // [2:2] is the sub-list for extension type_name
2, // [2:2] is the sub-list for extension extendee
0, // [0:2] is the sub-list for field type_name
}
func init() { file_planet_planet_proto_init() }
func file_planet_planet_proto_init() {
if File_planet_planet_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_planet_planet_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetPlanetRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_planet_planet_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetPlanetReply); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_planet_planet_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ListPlanetsRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_planet_planet_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ListPlanetsReply); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_planet_planet_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Planet); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_planet_planet_proto_rawDesc,
NumEnums: 0,
NumMessages: 5,
NumExtensions: 0,
NumServices: 1,
},
GoTypes: file_planet_planet_proto_goTypes,
DependencyIndexes: file_planet_planet_proto_depIdxs,
MessageInfos: file_planet_planet_proto_msgTypes,
}.Build()
File_planet_planet_proto = out.File
file_planet_planet_proto_rawDesc = nil
file_planet_planet_proto_goTypes = nil
file_planet_planet_proto_depIdxs = nil
}
================================================
FILE: demo/swapi/planet/planet_grpc.pb.go
================================================
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.4.0
// - protoc (unknown)
// source: planet/planet.proto
package planetpb
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.62.0 or later.
const _ = grpc.SupportPackageIsVersion8
const (
PlanetService_GetPlanet_FullMethodName = "/swapi.planet.PlanetService/GetPlanet"
PlanetService_ListPlanets_FullMethodName = "/swapi.planet.PlanetService/ListPlanets"
)
// PlanetServiceClient is the client API for PlanetService 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 PlanetServiceClient interface {
GetPlanet(ctx context.Context, in *GetPlanetRequest, opts ...grpc.CallOption) (*GetPlanetReply, error)
ListPlanets(ctx context.Context, in *ListPlanetsRequest, opts ...grpc.CallOption) (*ListPlanetsReply, error)
}
type planetServiceClient struct {
cc grpc.ClientConnInterface
}
func NewPlanetServiceClient(cc grpc.ClientConnInterface) PlanetServiceClient {
return &planetServiceClient{cc}
}
func (c *planetServiceClient) GetPlanet(ctx context.Context, in *GetPlanetRequest, opts ...grpc.CallOption) (*GetPlanetReply, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(GetPlanetReply)
err := c.cc.Invoke(ctx, PlanetService_GetPlanet_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *planetServiceClient) ListPlanets(ctx context.Context, in *ListPlanetsRequest, opts ...grpc.CallOption) (*ListPlanetsReply, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(ListPlanetsReply)
err := c.cc.Invoke(ctx, PlanetService_ListPlanets_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
// PlanetServiceServer is the server API for PlanetService service.
// All implementations must embed UnimplementedPlanetServiceServer
// for forward compatibility
type PlanetServiceServer interface {
GetPlanet(context.Context, *GetPlanetRequest) (*GetPlanetReply, error)
ListPlanets(context.Context, *ListPlanetsRequest) (*ListPlanetsReply, error)
mustEmbedUnimplementedPlanetServiceServer()
}
// UnimplementedPlanetServiceServer must be embedded to have forward compatible implementations.
type UnimplementedPlanetServiceServer struct {
}
func (UnimplementedPlanetServiceServer) GetPlanet(context.Context, *GetPlanetRequest) (*GetPlanetReply, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetPlanet not implemented")
}
func (UnimplementedPlanetServiceServer) ListPlanets(context.Context, *ListPlanetsRequest) (*ListPlanetsReply, error) {
return nil, status.Errorf(codes.Unimplemented, "method ListPlanets not implemented")
}
func (UnimplementedPlanetServiceServer) mustEmbedUnimplementedPlanetServiceServer() {}
// UnsafePlanetServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to PlanetServiceServer will
// result in compilation errors.
type UnsafePlanetServiceServer interface {
mustEmbedUnimplementedPlanetServiceServer()
}
func RegisterPlanetServiceServer(s grpc.ServiceRegistrar, srv PlanetServiceServer) {
s.RegisterService(&PlanetService_ServiceDesc, srv)
}
func _PlanetService_GetPlanet_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetPlanetRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(PlanetServiceServer).GetPlanet(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: PlanetService_GetPlanet_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(PlanetServiceServer).GetPlanet(ctx, req.(*GetPlanetRequest))
}
return interceptor(ctx, in, info, handler)
}
func _PlanetService_ListPlanets_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ListPlanetsRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(PlanetServiceServer).ListPlanets(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: PlanetService_ListPlanets_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(PlanetServiceServer).ListPlanets(ctx, req.(*ListPlanetsRequest))
}
return interceptor(ctx, in, info, handler)
}
// PlanetService_ServiceDesc is the grpc.ServiceDesc for PlanetService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var PlanetService_ServiceDesc = grpc.ServiceDesc{
ServiceName: "swapi.planet.PlanetService",
HandlerType: (*PlanetServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "GetPlanet",
Handler: _PlanetService_GetPlanet_Handler,
},
{
MethodName: "ListPlanets",
Handler: _PlanetService_ListPlanets_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "planet/planet.proto",
}
================================================
FILE: demo/swapi/species/species.pb.go
================================================
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.34.1
// protoc (unknown)
// source: species/species.proto
package speciespb
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
// GetSpeciesRequest.
type GetSpeciesRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// species id.
Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
}
func (x *GetSpeciesRequest) Reset() {
*x = GetSpeciesRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_species_species_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GetSpeciesRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetSpeciesRequest) ProtoMessage() {}
func (x *GetSpeciesRequest) ProtoReflect() protoreflect.Message {
mi := &file_species_species_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GetSpeciesRequest.ProtoReflect.Descriptor instead.
func (*GetSpeciesRequest) Descriptor() ([]byte, []int) {
return file_species_species_proto_rawDescGZIP(), []int{0}
}
func (x *GetSpeciesRequest) GetId() int64 {
if x != nil {
return x.Id
}
return 0
}
// GetSpeciesReply.
type GetSpeciesReply struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Species *Species `protobuf:"bytes,1,opt,name=species,proto3" json:"species,omitempty"`
}
func (x *GetSpeciesReply) Reset() {
*x = GetSpeciesReply{}
if protoimpl.UnsafeEnabled {
mi := &file_species_species_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GetSpeciesReply) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetSpeciesReply) ProtoMessage() {}
func (x *GetSpeciesReply) ProtoReflect() protoreflect.Message {
mi := &file_species_species_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GetSpeciesReply.ProtoReflect.Descriptor instead.
func (*GetSpeciesReply) Descriptor() ([]byte, []int) {
return file_species_species_proto_rawDescGZIP(), []int{1}
}
func (x *GetSpeciesReply) GetSpecies() *Species {
if x != nil {
return x.Species
}
return nil
}
// ListSpeciesRequest.
type ListSpeciesRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Ids []int64 `protobuf:"varint,1,rep,packed,name=ids,proto3" json:"ids,omitempty"`
}
func (x *ListSpeciesRequest) Reset() {
*x = ListSpeciesRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_species_species_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ListSpeciesRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ListSpeciesRequest) ProtoMessage() {}
func (x *ListSpeciesRequest) ProtoReflect() protoreflect.Message {
mi := &file_species_species_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ListSpeciesRequest.ProtoReflect.Descriptor instead.
func (*ListSpeciesRequest) Descriptor() ([]byte, []int) {
return file_species_species_proto_rawDescGZIP(), []int{2}
}
func (x *ListSpeciesRequest) GetIds() []int64 {
if x != nil {
return x.Ids
}
return nil
}
// ListSpeciesReply.
type ListSpeciesReply struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Species []*Species `protobuf:"bytes,1,rep,name=species,proto3" json:"species,omitempty"`
}
func (x *ListSpeciesReply) Reset() {
*x = ListSpeciesReply{}
if protoimpl.UnsafeEnabled {
mi := &file_species_species_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ListSpeciesReply) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ListSpeciesReply) ProtoMessage() {}
func (x *ListSpeciesReply) ProtoReflect() protoreflect.Message {
mi := &file_species_species_proto_msgTypes[3]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ListSpeciesReply.ProtoReflect.Descriptor instead.
func (*ListSpeciesReply) Descriptor() ([]byte, []int) {
return file_species_species_proto_rawDescGZIP(), []int{3}
}
func (x *ListSpeciesReply) GetSpecies() []*Species {
if x != nil {
return x.Species
}
return nil
}
// Species is a type of person or character within the Star Wars Universe.
type Species struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// species id.
Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
// The name of this species.
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
// The classification of this species, such as "mammal" or "reptile".
Classification string `protobuf:"bytes,3,opt,name=classification,proto3" json:"classification,omitempty"`
// The designation of this species, such as "sentient".
Designation string `protobuf:"bytes,4,opt,name=designation,proto3" json:"designation,omitempty"`
// The average height of this species in centimeters.
AverageHeight string `protobuf:"bytes,5,opt,name=average_height,json=averageHeight,proto3" json:"average_height,omitempty"`
// The average lifespan of this species in years.
AverageLifespan string `protobuf:"bytes,6,opt,name=average_lifespan,json=averageLifespan,proto3" json:"average_lifespan,omitempty"`
// A comma-separated string of common eye colors for this species,
// "none" if this species does not typically have eyes.
EyeColors string `protobuf:"bytes,7,opt,name=eye_colors,json=eyeColors,proto3" json:"eye_colors,omitempty"`
// A comma-separated string of common hair colors for this species,
// "none" if this species does not typically have hair.
HairColors string `protobuf:"bytes,8,opt,name=hair_colors,json=hairColors,proto3" json:"hair_colors,omitempty"`
// A comma-separated string of common skin colors for this species,
// "none" if this species does not typically have skin.
SkinColors string `protobuf:"bytes,9,opt,name=skin_colors,json=skinColors,proto3" json:"skin_colors,omitempty"`
// The language commonly spoken by this species.
Language string `protobuf:"bytes,10,opt,name=language,proto3" json:"language,omitempty"`
// The URL of a planet resource, a planet that this species originates from.
Homeworld string `protobuf:"bytes,11,opt,name=homeworld,proto3" json:"homeworld,omitempty"`
// the hypermedia URL of this resource.
Url string `protobuf:"bytes,12,opt,name=url,proto3" json:"url,omitempty"`
// the ISO 8601 date format of the time that this resource was created.
Created string `protobuf:"bytes,13,opt,name=created,proto3" json:"created,omitempty"`
// the ISO 8601 date format of the time that this resource was edited.
Edited string `protobuf:"bytes,14,opt,name=edited,proto3" json:"edited,omitempty"`
// person ids.
PersonIds []int64 `protobuf:"varint,15,rep,packed,name=person_ids,json=personIds,proto3" json:"person_ids,omitempty"`
// film ids.
FilmIds []int64 `protobuf:"varint,16,rep,packed,name=film_ids,json=filmIds,proto3" json:"film_ids,omitempty"`
}
func (x *Species) Reset() {
*x = Species{}
if protoimpl.UnsafeEnabled {
mi := &file_species_species_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Species) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Species) ProtoMessage() {}
func (x *Species) ProtoReflect() protoreflect.Message {
mi := &file_species_species_proto_msgTypes[4]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Species.ProtoReflect.Descriptor instead.
func (*Species) Descriptor() ([]byte, []int) {
return file_species_species_proto_rawDescGZIP(), []int{4}
}
func (x *Species) GetId() int64 {
if x != nil {
return x.Id
}
return 0
}
func (x *Species) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *Species) GetClassification() string {
if x != nil {
return x.Classification
}
return ""
}
func (x *Species) GetDesignation() string {
if x != nil {
return x.Designation
}
return ""
}
func (x *Species) GetAverageHeight() string {
if x != nil {
return x.AverageHeight
}
return ""
}
func (x *Species) GetAverageLifespan() string {
if x != nil {
return x.AverageLifespan
}
return ""
}
func (x *Species) GetEyeColors() string {
if x != nil {
return x.EyeColors
}
return ""
}
func (x *Species) GetHairColors() string {
if x != nil {
return x.HairColors
}
return ""
}
func (x *Species) GetSkinColors() string {
if x != nil {
return x.SkinColors
}
return ""
}
func (x *Species) GetLanguage() string {
if x != nil {
return x.Language
}
return ""
}
func (x *Species) GetHomeworld() string {
if x != nil {
return x.Homeworld
}
return ""
}
func (x *Species) GetUrl() string {
if x != nil {
return x.Url
}
return ""
}
func (x *Species) GetCreated() string {
if x != nil {
return x.Created
}
return ""
}
func (x *Species) GetEdited() string {
if x != nil {
return x.Edited
}
return ""
}
func (x *Species) GetPersonIds() []int64 {
if x != nil {
return x.PersonIds
}
return nil
}
func (x *Species) GetFilmIds() []int64 {
if x != nil {
return x.FilmIds
}
return nil
}
var File_species_species_proto protoreflect.FileDescriptor
var file_species_species_proto_rawDesc = []byte{
0x0a, 0x15, 0x73, 0x70, 0x65, 0x63, 0x69, 0x65, 0x73, 0x2f, 0x73, 0x70, 0x65, 0x63, 0x69, 0x65,
0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0d, 0x73, 0x77, 0x61, 0x70, 0x69, 0x2e, 0x73,
0x70, 0x65, 0x63, 0x69, 0x65, 0x73, 0x22, 0x23, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x53, 0x70, 0x65,
0x63, 0x69, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69,
0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x22, 0x43, 0x0a, 0x0f, 0x47,
0x65, 0x74, 0x53, 0x70, 0x65, 0x63, 0x69, 0x65, 0x73, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x30,
0x0a, 0x07, 0x73, 0x70, 0x65, 0x63, 0x69, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32,
0x16, 0x2e, 0x73, 0x77, 0x61, 0x70, 0x69, 0x2e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x65, 0x73, 0x2e,
0x53, 0x70, 0x65, 0x63, 0x69, 0x65, 0x73, 0x52, 0x07, 0x73, 0x70, 0x65, 0x63, 0x69, 0x65, 0x73,
0x22, 0x26, 0x0a, 0x12, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x70, 0x65, 0x63, 0x69, 0x65, 0x73, 0x52,
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x69, 0x64, 0x73, 0x18, 0x01, 0x20,
0x03, 0x28, 0x03, 0x52, 0x03, 0x69, 0x64, 0x73, 0x22, 0x44, 0x0a, 0x10, 0x4c, 0x69, 0x73, 0x74,
0x53, 0x70, 0x65, 0x63, 0x69, 0x65, 0x73, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x30, 0x0a, 0x07,
0x73, 0x70, 0x65, 0x63, 0x69, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e,
0x73, 0x77, 0x61, 0x70, 0x69, 0x2e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x65, 0x73, 0x2e, 0x53, 0x70,
0x65, 0x63, 0x69, 0x65, 0x73, 0x52, 0x07, 0x73, 0x70, 0x65, 0x63, 0x69, 0x65, 0x73, 0x22, 0xe2,
0x03, 0x0a, 0x07, 0x53, 0x70, 0x65, 0x63, 0x69, 0x65, 0x73, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64,
0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61,
0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x26,
0x0a, 0x0e, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e,
0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x69, 0x66, 0x69,
0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x69, 0x67, 0x6e,
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73,
0x69, 0x67, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x25, 0x0a, 0x0e, 0x61, 0x76, 0x65, 0x72,
0x61, 0x67, 0x65, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09,
0x52, 0x0d, 0x61, 0x76, 0x65, 0x72, 0x61, 0x67, 0x65, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12,
0x29, 0x0a, 0x10, 0x61, 0x76, 0x65, 0x72, 0x61, 0x67, 0x65, 0x5f, 0x6c, 0x69, 0x66, 0x65, 0x73,
0x70, 0x61, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x61, 0x76, 0x65, 0x72, 0x61,
0x67, 0x65, 0x4c, 0x69, 0x66, 0x65, 0x73, 0x70, 0x61, 0x6e, 0x12, 0x1d, 0x0a, 0x0a, 0x65, 0x79,
0x65, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09,
0x65, 0x79, 0x65, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x68, 0x61, 0x69,
0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a,
0x68, 0x61, 0x69, 0x72, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x6b,
0x69, 0x6e, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x73, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52,
0x0a, 0x73, 0x6b, 0x69, 0x6e, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x6c,
0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6c,
0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x68, 0x6f, 0x6d, 0x65, 0x77,
0x6f, 0x72, 0x6c, 0x64, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x68, 0x6f, 0x6d, 0x65,
0x77, 0x6f, 0x72, 0x6c, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x0c, 0x20, 0x01,
0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6c, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74,
0x65, 0x64, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65,
0x64, 0x12, 0x16, 0x0a, 0x06, 0x65, 0x64, 0x69, 0x74, 0x65, 0x64, 0x18, 0x0e, 0x20, 0x01, 0x28,
0x09, 0x52, 0x06, 0x65, 0x64, 0x69, 0x74, 0x65, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x65, 0x72,
0x73, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x0f, 0x20, 0x03, 0x28, 0x03, 0x52, 0x09, 0x70,
0x65, 0x72, 0x73, 0x6f, 0x6e, 0x49, 0x64, 0x73, 0x12, 0x19, 0x0a, 0x08, 0x66, 0x69, 0x6c, 0x6d,
0x5f, 0x69, 0x64, 0x73, 0x18, 0x10, 0x20, 0x03, 0x28, 0x03, 0x52, 0x07, 0x66, 0x69, 0x6c, 0x6d,
0x49, 0x64, 0x73, 0x32, 0xb7, 0x01, 0x0a, 0x0e, 0x53, 0x70, 0x65, 0x63, 0x69, 0x65, 0x73, 0x53,
0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x50, 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x53, 0x70, 0x65,
0x63, 0x69, 0x65, 0x73, 0x12, 0x20, 0x2e, 0x73, 0x77, 0x61, 0x70, 0x69, 0x2e, 0x73, 0x70, 0x65,
0x63, 0x69, 0x65, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x70, 0x65, 0x63, 0x69, 0x65, 0x73, 0x52,
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x73, 0x77, 0x61, 0x70, 0x69, 0x2e, 0x73,
0x70, 0x65, 0x63, 0x69, 0x65, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x70, 0x65, 0x63, 0x69, 0x65,
0x73, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, 0x53, 0x0a, 0x0b, 0x4c, 0x69, 0x73, 0x74,
0x53, 0x70, 0x65, 0x63, 0x69, 0x65, 0x73, 0x12, 0x21, 0x2e, 0x73, 0x77, 0x61, 0x70, 0x69, 0x2e,
0x73, 0x70, 0x65, 0x63, 0x69, 0x65, 0x73, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x70, 0x65, 0x63,
0x69, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x73, 0x77, 0x61,
0x70, 0x69, 0x2e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x65, 0x73, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53,
0x70, 0x65, 0x63, 0x69, 0x65, 0x73, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x42, 0xb7, 0x01,
0x0a, 0x11, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x77, 0x61, 0x70, 0x69, 0x2e, 0x73, 0x70, 0x65, 0x63,
0x69, 0x65, 0x73, 0x42, 0x0c, 0x53, 0x70, 0x65, 0x63, 0x69, 0x65, 0x73, 0x50, 0x72, 0x6f, 0x74,
0x6f, 0x50, 0x01, 0x5a, 0x3f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f,
0x6d, 0x65, 0x72, 0x63, 0x61, 0x72, 0x69, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2d, 0x66, 0x65, 0x64,
0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x64, 0x65, 0x6d, 0x6f, 0x2f, 0x73, 0x77, 0x61,
0x70, 0x69, 0x2f, 0x73, 0x70, 0x65, 0x63, 0x69, 0x65, 0x73, 0x3b, 0x73, 0x70, 0x65, 0x63, 0x69,
0x65, 0x73, 0x70, 0x62, 0xa2, 0x02, 0x03, 0x53, 0x53, 0x58, 0xaa, 0x02, 0x0d, 0x53, 0x77, 0x61,
0x70, 0x69, 0x2e, 0x53, 0x70, 0x65, 0x63, 0x69, 0x65, 0x73, 0xca, 0x02, 0x0d, 0x53, 0x77, 0x61,
0x70, 0x69, 0x5c, 0x53, 0x70, 0x65, 0x63, 0x69, 0x65, 0x73, 0xe2, 0x02, 0x19, 0x53, 0x77, 0x61,
0x70, 0x69, 0x5c, 0x53, 0x70, 0x65, 0x63, 0x69, 0x65, 0x73, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65,
0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0e, 0x53, 0x77, 0x61, 0x70, 0x69, 0x3a, 0x3a,
0x53, 0x70, 0x65, 0x63, 0x69, 0x65, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_species_species_proto_rawDescOnce sync.Once
file_species_species_proto_rawDescData = file_species_species_proto_rawDesc
)
func file_species_species_proto_rawDescGZIP() []byte {
file_species_species_proto_rawDescOnce.Do(func() {
file_species_species_proto_rawDescData = protoimpl.X.CompressGZIP(file_species_species_proto_rawDescData)
})
return file_species_species_proto_rawDescData
}
var file_species_species_proto_msgTypes = make([]protoimpl.MessageInfo, 5)
var file_species_species_proto_goTypes = []interface{}{
(*GetSpeciesRequest)(nil), // 0: swapi.species.GetSpeciesRequest
(*GetSpeciesReply)(nil), // 1: swapi.species.GetSpeciesReply
(*ListSpeciesRequest)(nil), // 2: swapi.species.ListSpeciesRequest
(*ListSpeciesReply)(nil), // 3: swapi.species.ListSpeciesReply
(*Species)(nil), // 4: swapi.species.Species
}
var file_species_species_proto_depIdxs = []int32{
4, // 0: swapi.species.GetSpeciesReply.species:type_name -> swapi.species.Species
4, // 1: swapi.species.ListSpeciesReply.species:type_name -> swapi.species.Species
0, // 2: swapi.species.SpeciesService.GetSpecies:input_type -> swapi.species.GetSpeciesRequest
2, // 3: swapi.species.SpeciesService.ListSpecies:input_type -> swapi.species.ListSpeciesRequest
1, // 4: swapi.species.SpeciesService.GetSpecies:output_type -> swapi.species.GetSpeciesReply
3, // 5: swapi.species.SpeciesService.ListSpecies:output_type -> swapi.species.ListSpeciesReply
4, // [4:6] is the sub-list for method output_type
2, // [2:4] is the sub-list for method input_type
2, // [2:2] is the sub-list for extension type_name
2, // [2:2] is the sub-list for extension extendee
0, // [0:2] is the sub-list for field type_name
}
func init() { file_species_species_proto_init() }
func file_species_species_proto_init() {
if File_species_species_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_species_species_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetSpeciesRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_species_species_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetSpeciesReply); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_species_species_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ListSpeciesRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_species_species_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ListSpeciesReply); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_species_species_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Species); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_species_species_proto_rawDesc,
NumEnums: 0,
NumMessages: 5,
NumExtensions: 0,
NumServices: 1,
},
GoTypes: file_species_species_proto_goTypes,
DependencyIndexes: file_species_species_proto_depIdxs,
MessageInfos: file_species_species_proto_msgTypes,
}.Build()
File_species_species_proto = out.File
file_species_species_proto_rawDesc = nil
file_species_species_proto_goTypes = nil
file_species_species_proto_depIdxs = nil
}
================================================
FILE: demo/swapi/species/species_grpc.pb.go
================================================
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.4.0
// - protoc (unknown)
// source: species/species.proto
package speciespb
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.62.0 or later.
const _ = grpc.SupportPackageIsVersion8
const (
SpeciesService_GetSpecies_FullMethodName = "/swapi.species.SpeciesService/GetSpecies"
SpeciesService_ListSpecies_FullMethodName = "/swapi.species.SpeciesService/ListSpecies"
)
// SpeciesServiceClient is the client API for SpeciesService 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 SpeciesServiceClient interface {
GetSpecies(ctx context.Context, in *GetSpeciesRequest, opts ...grpc.CallOption) (*GetSpeciesReply, error)
ListSpecies(ctx context.Context, in *ListSpeciesRequest, opts ...grpc.CallOption) (*ListSpeciesReply, error)
}
type speciesServiceClient struct {
cc grpc.ClientConnInterface
}
func NewSpeciesServiceClient(cc grpc.ClientConnInterface) SpeciesServiceClient {
return &speciesServiceClient{cc}
}
func (c *speciesServiceClient) GetSpecies(ctx context.Context, in *GetSpeciesRequest, opts ...grpc.CallOption) (*GetSpeciesReply, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(GetSpeciesReply)
err := c.cc.Invoke(ctx, SpeciesService_GetSpecies_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *speciesServiceClient) ListSpecies(ctx context.Context, in *ListSpeciesRequest, opts ...grpc.CallOption) (*ListSpeciesReply, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(ListSpeciesReply)
err := c.cc.Invoke(ctx, SpeciesService_ListSpecies_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
// SpeciesServiceServer is the server API for SpeciesService service.
// All implementations must embed UnimplementedSpeciesServiceServer
// for forward compatibility
type SpeciesServiceServer interface {
GetSpecies(context.Context, *GetSpeciesRequest) (*GetSpeciesReply, error)
ListSpecies(context.Context, *ListSpeciesRequest) (*ListSpeciesReply, error)
mustEmbedUnimplementedSpeciesServiceServer()
}
// UnimplementedSpeciesServiceServer must be embedded to have forward compatible implementations.
type UnimplementedSpeciesServiceServer struct {
}
func (UnimplementedSpeciesServiceServer) GetSpecies(context.Context, *GetSpeciesRequest) (*GetSpeciesReply, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetSpecies not implemented")
}
func (UnimplementedSpeciesServiceServer) ListSpecies(context.Context, *ListSpeciesRequest) (*ListSpeciesReply, error) {
return nil, status.Errorf(codes.Unimplemented, "method ListSpecies not implemented")
}
func (UnimplementedSpeciesServiceServer) mustEmbedUnimplementedSpeciesServiceServer() {}
// UnsafeSpeciesServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to SpeciesServiceServer will
// result in compilation errors.
type UnsafeSpeciesServiceServer interface {
mustEmbedUnimplementedSpeciesServiceServer()
}
func RegisterSpeciesServiceServer(s grpc.ServiceRegistrar, srv SpeciesServiceServer) {
s.RegisterService(&SpeciesService_ServiceDesc, srv)
}
func _SpeciesService_GetSpecies_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetSpeciesRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(SpeciesServiceServer).GetSpecies(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: SpeciesService_GetSpecies_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(SpeciesServiceServer).GetSpecies(ctx, req.(*GetSpeciesRequest))
}
return interceptor(ctx, in, info, handler)
}
func _SpeciesService_ListSpecies_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ListSpeciesRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(SpeciesServiceServer).ListSpecies(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: SpeciesService_ListSpecies_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(SpeciesServiceServer).ListSpecies(ctx, req.(*ListSpeciesRequest))
}
return interceptor(ctx, in, info, handler)
}
// SpeciesService_ServiceDesc is the grpc.ServiceDesc for SpeciesService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var SpeciesService_ServiceDesc = grpc.ServiceDesc{
ServiceName: "swapi.species.SpeciesService",
HandlerType: (*SpeciesServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "GetSpecies",
Handler: _SpeciesService_GetSpecies_Handler,
},
{
MethodName: "ListSpecies",
Handler: _SpeciesService_ListSpecies_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "species/species.proto",
}
================================================
FILE: demo/swapi/starship/starship.pb.go
================================================
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.34.1
// protoc (unknown)
// source: starship/starship.proto
package starshippb
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
// GetStarshipRequest.
type GetStarshipRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// starship id.
Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
}
func (x *GetStarshipRequest) Reset() {
*x = GetStarshipRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_starship_starship_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GetStarshipRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetStarshipRequest) ProtoMessage() {}
func (x *GetStarshipRequest) ProtoReflect() protoreflect.Message {
mi := &file_starship_starship_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GetStarshipRequest.ProtoReflect.Descriptor instead.
func (*GetStarshipRequest) Descriptor() ([]byte, []int) {
return file_starship_starship_proto_rawDescGZIP(), []int{0}
}
func (x *GetStarshipRequest) GetId() int64 {
if x != nil {
return x.Id
}
return 0
}
// GetStarshipReply.
type GetStarshipReply struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Starship *Starship `protobuf:"bytes,1,opt,name=starship,proto3" json:"starship,omitempty"`
}
func (x *GetStarshipReply) Reset() {
*x = GetStarshipReply{}
if protoimpl.UnsafeEnabled {
mi := &file_starship_starship_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GetStarshipReply) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetStarshipReply) ProtoMessage() {}
func (x *GetStarshipReply) ProtoReflect() protoreflect.Message {
mi := &file_starship_starship_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GetStarshipReply.ProtoReflect.Descriptor instead.
func (*GetStarshipReply) Descriptor() ([]byte, []int) {
return file_starship_starship_proto_rawDescGZIP(), []int{1}
}
func (x *GetStarshipReply) GetStarship() *Starship {
if x != nil {
return x.Starship
}
return nil
}
// ListStarshipsRequest.
type ListStarshipsRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Ids []int64 `protobuf:"varint,1,rep,packed,name=ids,proto3" json:"ids,omitempty"`
}
func (x *ListStarshipsRequest) Reset() {
*x = ListStarshipsRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_starship_starship_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ListStarshipsRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ListStarshipsRequest) ProtoMessage() {}
func (x *ListStarshipsRequest) ProtoReflect() protoreflect.Message {
mi := &file_starship_starship_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ListStarshipsRequest.ProtoReflect.Descriptor instead.
func (*ListStarshipsRequest) Descriptor() ([]byte, []int) {
return file_starship_starship_proto_rawDescGZIP(), []int{2}
}
func (x *ListStarshipsRequest) GetIds() []int64 {
if x != nil {
return x.Ids
}
return nil
}
// ListStarshipsReply.
type ListStarshipsReply struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Starships []*Starship `protobuf:"bytes,1,rep,name=starships,proto3" json:"starships,omitempty"`
}
func (x *ListStarshipsReply) Reset() {
*x = ListStarshipsReply{}
if protoimpl.UnsafeEnabled {
mi := &file_starship_starship_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ListStarshipsReply) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ListStarshipsReply) ProtoMessage() {}
func (x *ListStarshipsReply) ProtoReflect() protoreflect.Message {
mi := &file_starship_starship_proto_msgTypes[3]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ListStarshipsReply.ProtoReflect.Descriptor instead.
func (*ListStarshipsReply) Descriptor() ([]byte, []int) {
return file_starship_starship_proto_rawDescGZIP(), []int{3}
}
func (x *ListStarshipsReply) GetStarships() []*Starship {
if x != nil {
return x.Starships
}
return nil
}
// Starship is a single transport craft that has hyperdrive capability.
type Starship struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// starship id.
Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
// The name of this starship. The common name, such as "Death Star".
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
// The model or official name of this starship.
// Such as "T-65 X-wing" or "DS-1 Orbital Battle Station".
Model string `protobuf:"bytes,3,opt,name=model,proto3" json:"model,omitempty"`
// The class of this starship, such as "Starfighter" or "Deep Space Mobile Battlestation".
StarshipClass string `protobuf:"bytes,4,opt,name=starship_class,json=starshipClass,proto3" json:"starship_class,omitempty"`
// The manufacturer of this starship. Comma separated if more than one.
Manufacturer string `protobuf:"bytes,5,opt,name=manufacturer,proto3" json:"manufacturer,omitempty"`
// The cost of this starship new, in galactic credits.
CostInCredits string `protobuf:"bytes,6,opt,name=cost_in_credits,json=costInCredits,proto3" json:"cost_in_credits,omitempty"`
// The length of this starship in meters.
Length string `protobuf:"bytes,7,opt,name=length,proto3" json:"length,omitempty"`
// The number of personnel needed to run or pilot this starship.
Crew string `protobuf:"bytes,8,opt,name=crew,proto3" json:"crew,omitempty"`
// The number of non-essential people this starship can transport.
Passengers string `protobuf:"bytes,9,opt,name=passengers,proto3" json:"passengers,omitempty"`
// The maximum speed of this starship in the atmosphere.
// "N/A" if this starship is incapable of atmospheric flight.
MaxAtmospheringSpeed string `protobuf:"bytes,10,opt,name=max_atmosphering_speed,json=maxAtmospheringSpeed,proto3" json:"max_atmosphering_speed,omitempty"`
// The class of this starships hyperdrive.
HyperdriveRating string `protobuf:"bytes,11,opt,name=hyperdrive_rating,json=hyperdriveRating,proto3" json:"hyperdrive_rating,omitempty"`
// The Maximum number of Megalights this starship can travel in a standard hour.
// A "Megalight" is a standard unit of distance and has never been defined before within the Star Wars universe.
// This figure is only really useful for measuring the difference in speed of starships.
// We can assume it is similar to AU, the distance between our Sun (Sol) and Earth.
Mglt string `protobuf:"bytes,12,opt,name=mglt,proto3" json:"mglt,omitempty"`
// The maximum number of kilograms that this starship can transport.
CargoCapacity string `protobuf:"bytes,13,opt,name=cargo_capacity,json=cargoCapacity,proto3" json:"cargo_capacity,omitempty"`
// The maximum length of time that this starship can provide consumables for its entire crew without having to resupply.
Consumables string `protobuf:"bytes,14,opt,name=consumables,proto3" json:"consumables,omitempty"`
// the hypermedia URL of this resource.
Url string `protobuf:"bytes,15,opt,name=url,proto3" json:"url,omitempty"`
// the ISO 8601 date format of the time that this resource was created.
Created string `protobuf:"bytes,16,opt,name=created,proto3" json:"created,omitempty"`
// the ISO 8601 date format of the time that this resource was edited.
Edited string `protobuf:"bytes,17,opt,name=edited,proto3" json:"edited,omitempty"`
// film ids.
FilmIds []int64 `protobuf:"varint,18,rep,packed,name=film_ids,json=filmIds,proto3" json:"film_ids,omitempty"`
// pilot ids.
PilotIds []int64 `protobuf:"varint,19,rep,packed,name=pilot_ids,json=pilotIds,proto3" json:"pilot_ids,omitempty"`
}
func (x *Starship) Reset() {
*x = Starship{}
if protoimpl.UnsafeEnabled {
mi := &file_starship_starship_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Starship) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Starship) ProtoMessage() {}
func (x *Starship) ProtoReflect() protoreflect.Message {
mi := &file_starship_starship_proto_msgTypes[4]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Starship.ProtoReflect.Descriptor instead.
func (*Starship) Descriptor() ([]byte, []int) {
return file_starship_starship_proto_rawDescGZIP(), []int{4}
}
func (x *Starship) GetId() int64 {
if x != nil {
return x.Id
}
return 0
}
func (x *Starship) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *Starship) GetModel() string {
if x != nil {
return x.Model
}
return ""
}
func (x *Starship) GetStarshipClass() string {
if x != nil {
return x.StarshipClass
}
return ""
}
func (x *Starship) GetManufacturer() string {
if x != nil {
return x.Manufacturer
}
return ""
}
func (x *Starship) GetCostInCredits() string {
if x != nil {
return x.CostInCredits
}
return ""
}
func (x *Starship) GetLength() string {
if x != nil {
return x.Length
}
return ""
}
func (x *Starship) GetCrew() string {
if x != nil {
return x.Crew
}
return ""
}
func (x *Starship) GetPassengers() string {
if x != nil {
return x.Passengers
}
return ""
}
func (x *Starship) GetMaxAtmospheringSpeed() string {
if x != nil {
return x.MaxAtmospheringSpeed
}
return ""
}
func (x *Starship) GetHyperdriveRating() string {
if x != nil {
return x.HyperdriveRating
}
return ""
}
func (x *Starship) GetMglt() string {
if x != nil {
return x.Mglt
}
return ""
}
func (x *Starship) GetCargoCapacity() string {
if x != nil {
return x.CargoCapacity
}
return ""
}
func (x *Starship) GetConsumables() string {
if x != nil {
return x.Consumables
}
return ""
}
func (x *Starship) GetUrl() string {
if x != nil {
return x.Url
}
return ""
}
func (x *Starship) GetCreated() string {
if x != nil {
return x.Created
}
return ""
}
func (x *Starship) GetEdited() string {
if x != nil {
return x.Edited
}
return ""
}
func (x *Starship) GetFilmIds() []int64 {
if x != nil {
return x.FilmIds
}
return nil
}
func (x *Starship) GetPilotIds() []int64 {
if x != nil {
return x.PilotIds
}
return nil
}
var File_starship_starship_proto protoreflect.FileDescriptor
var file_starship_starship_proto_rawDesc = []byte{
0x0a, 0x17, 0x73, 0x74, 0x61, 0x72, 0x73, 0x68, 0x69, 0x70, 0x2f, 0x73, 0x74, 0x61, 0x72, 0x73,
0x68, 0x69, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0e, 0x73, 0x77, 0x61, 0x70, 0x69,
0x2e, 0x73, 0x74, 0x61, 0x72, 0x73, 0x68, 0x69, 0x70, 0x22, 0x24, 0x0a, 0x12, 0x47, 0x65, 0x74,
0x53, 0x74, 0x61, 0x72, 0x73, 0x68, 0x69, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12,
0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x22,
0x48, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x72, 0x73, 0x68, 0x69, 0x70, 0x52, 0x65,
0x70, 0x6c, 0x79, 0x12, 0x34, 0x0a, 0x08, 0x73, 0x74, 0x61, 0x72, 0x73, 0x68, 0x69, 0x70, 0x18,
0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x73, 0x77, 0x61, 0x70, 0x69, 0x2e, 0x73, 0x74,
0x61, 0x72, 0x73, 0x68, 0x69, 0x70, 0x2e, 0x53, 0x74, 0x61, 0x72, 0x73, 0x68, 0x69, 0x70, 0x52,
0x08, 0x73, 0x74, 0x61, 0x72, 0x73, 0x68, 0x69, 0x70, 0x22, 0x28, 0x0a, 0x14, 0x4c, 0x69, 0x73,
0x74, 0x53, 0x74, 0x61, 0x72, 0x73, 0x68, 0x69, 0x70, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
0x74, 0x12, 0x10, 0x0a, 0x03, 0x69, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x03, 0x52, 0x03,
0x69, 0x64, 0x73, 0x22, 0x4c, 0x0a, 0x12, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x74, 0x61, 0x72, 0x73,
0x68, 0x69, 0x70, 0x73, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x36, 0x0a, 0x09, 0x73, 0x74, 0x61,
0x72, 0x73, 0x68, 0x69, 0x70, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x73,
0x77, 0x61, 0x70, 0x69, 0x2e, 0x73, 0x74, 0x61, 0x72, 0x73, 0x68, 0x69, 0x70, 0x2e, 0x53, 0x74,
0x61, 0x72, 0x73, 0x68, 0x69, 0x70, 0x52, 0x09, 0x73, 0x74, 0x61, 0x72, 0x73, 0x68, 0x69, 0x70,
0x73, 0x22, 0xbf, 0x04, 0x0a, 0x08, 0x53, 0x74, 0x61, 0x72, 0x73, 0x68, 0x69, 0x70, 0x12, 0x0e,
0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12,
0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61,
0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28,
0x09, 0x52, 0x05, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x12, 0x25, 0x0a, 0x0e, 0x73, 0x74, 0x61, 0x72,
0x73, 0x68, 0x69, 0x70, 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09,
0x52, 0x0d, 0x73, 0x74, 0x61, 0x72, 0x73, 0x68, 0x69, 0x70, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x12,
0x22, 0x0a, 0x0c, 0x6d, 0x61, 0x6e, 0x75, 0x66, 0x61, 0x63, 0x74, 0x75, 0x72, 0x65, 0x72, 0x18,
0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x6d, 0x61, 0x6e, 0x75, 0x66, 0x61, 0x63, 0x74, 0x75,
0x72, 0x65, 0x72, 0x12, 0x26, 0x0a, 0x0f, 0x63, 0x6f, 0x73, 0x74, 0x5f, 0x69, 0x6e, 0x5f, 0x63,
0x72, 0x65, 0x64, 0x69, 0x74, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x63, 0x6f,
0x73, 0x74, 0x49, 0x6e, 0x43, 0x72, 0x65, 0x64, 0x69, 0x74, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x6c,
0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6c, 0x65, 0x6e,
0x67, 0x74, 0x68, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x72, 0x65, 0x77, 0x18, 0x08, 0x20, 0x01, 0x28,
0x09, 0x52, 0x04, 0x63, 0x72, 0x65, 0x77, 0x12, 0x1e, 0x0a, 0x0a, 0x70, 0x61, 0x73, 0x73, 0x65,
0x6e, 0x67, 0x65, 0x72, 0x73, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x70, 0x61, 0x73,
0x73, 0x65, 0x6e, 0x67, 0x65, 0x72, 0x73, 0x12, 0x34, 0x0a, 0x16, 0x6d, 0x61, 0x78, 0x5f, 0x61,
0x74, 0x6d, 0x6f, 0x73, 0x70, 0x68, 0x65, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x73, 0x70, 0x65, 0x65,
0x64, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x14, 0x6d, 0x61, 0x78, 0x41, 0x74, 0x6d, 0x6f,
0x73, 0x70, 0x68, 0x65, 0x72, 0x69, 0x6e, 0x67, 0x53, 0x70, 0x65, 0x65, 0x64, 0x12, 0x2b, 0x0a,
0x11, 0x68, 0x79, 0x70, 0x65, 0x72, 0x64, 0x72, 0x69, 0x76, 0x65, 0x5f, 0x72, 0x61, 0x74, 0x69,
0x6e, 0x67, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x68, 0x79, 0x70, 0x65, 0x72, 0x64,
0x72, 0x69, 0x76, 0x65, 0x52, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x12, 0x12, 0x0a, 0x04, 0x6d, 0x67,
0x6c, 0x74, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6d, 0x67, 0x6c, 0x74, 0x12, 0x25,
0x0a, 0x0e, 0x63, 0x61, 0x72, 0x67, 0x6f, 0x5f, 0x63, 0x61, 0x70, 0x61, 0x63, 0x69, 0x74, 0x79,
0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x63, 0x61, 0x72, 0x67, 0x6f, 0x43, 0x61, 0x70,
0x61, 0x63, 0x69, 0x74, 0x79, 0x12, 0x20, 0x0a, 0x0b, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6d, 0x61,
0x62, 0x6c, 0x65, 0x73, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x6f, 0x6e, 0x73,
0x75, 0x6d, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x0f,
0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6c, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x72, 0x65,
0x61, 0x74, 0x65, 0x64, 0x18, 0x10, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x72, 0x65, 0x61,
0x74, 0x65, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x65, 0x64, 0x69, 0x74, 0x65, 0x64, 0x18, 0x11, 0x20,
0x01, 0x28, 0x09, 0x52, 0x06, 0x65, 0x64, 0x69, 0x74, 0x65, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x66,
0x69, 0x6c, 0x6d, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x12, 0x20, 0x03, 0x28, 0x03, 0x52, 0x07, 0x66,
0x69, 0x6c, 0x6d, 0x49, 0x64, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x69, 0x6c, 0x6f, 0x74, 0x5f,
0x69, 0x64, 0x73, 0x18, 0x13, 0x20, 0x03, 0x28, 0x03, 0x52, 0x08, 0x70, 0x69, 0x6c, 0x6f, 0x74,
0x49, 0x64, 0x73, 0x32, 0xc5, 0x01, 0x0a, 0x0f, 0x53, 0x74, 0x61, 0x72, 0x73, 0x68, 0x69, 0x70,
0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x55, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x53, 0x74,
0x61, 0x72, 0x73, 0x68, 0x69, 0x70, 0x12, 0x22, 0x2e, 0x73, 0x77, 0x61, 0x70, 0x69, 0x2e, 0x73,
0x74, 0x61, 0x72, 0x73, 0x68, 0x69, 0x70, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x72, 0x73,
0x68, 0x69, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x73, 0x77, 0x61,
0x70, 0x69, 0x2e, 0x73, 0x74, 0x61, 0x72, 0x73, 0x68, 0x69, 0x70, 0x2e, 0x47, 0x65, 0x74, 0x53,
0x74, 0x61, 0x72, 0x73, 0x68, 0x69, 0x70, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, 0x5b,
0x0a, 0x0d, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x74, 0x61, 0x72, 0x73, 0x68, 0x69, 0x70, 0x73, 0x12,
0x24, 0x2e, 0x73, 0x77, 0x61, 0x70, 0x69, 0x2e, 0x73, 0x74, 0x61, 0x72, 0x73, 0x68, 0x69, 0x70,
0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x74, 0x61, 0x72, 0x73, 0x68, 0x69, 0x70, 0x73, 0x52, 0x65,
0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x73, 0x77, 0x61, 0x70, 0x69, 0x2e, 0x73, 0x74,
0x61, 0x72, 0x73, 0x68, 0x69, 0x70, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x74, 0x61, 0x72, 0x73,
0x68, 0x69, 0x70, 0x73, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x42, 0xbf, 0x01, 0x0a, 0x12,
0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x77, 0x61, 0x70, 0x69, 0x2e, 0x73, 0x74, 0x61, 0x72, 0x73, 0x68,
0x69, 0x70, 0x42, 0x0d, 0x53, 0x74, 0x61, 0x72, 0x73, 0x68, 0x69, 0x70, 0x50, 0x72, 0x6f, 0x74,
0x6f, 0x50, 0x01, 0x5a, 0x41, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f,
0x6d, 0x65, 0x72, 0x63, 0x61, 0x72, 0x69, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2d, 0x66, 0x65, 0x64,
0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x64, 0x65, 0x6d, 0x6f, 0x2f, 0x73, 0x77, 0x61,
0x70, 0x69, 0x2f, 0x73, 0x74, 0x61, 0x72, 0x73, 0x68, 0x69, 0x70, 0x3b, 0x73, 0x74, 0x61, 0x72,
0x73, 0x68, 0x69, 0x70, 0x70, 0x62, 0xa2, 0x02, 0x03, 0x53, 0x53, 0x58, 0xaa, 0x02, 0x0e, 0x53,
0x77, 0x61, 0x70, 0x69, 0x2e, 0x53, 0x74, 0x61, 0x72, 0x73, 0x68, 0x69, 0x70, 0xca, 0x02, 0x0e,
0x53, 0x77, 0x61, 0x70, 0x69, 0x5c, 0x53, 0x74, 0x61, 0x72, 0x73, 0x68, 0x69, 0x70, 0xe2, 0x02,
0x1a, 0x53, 0x77, 0x61, 0x70, 0x69, 0x5c, 0x53, 0x74, 0x61, 0x72, 0x73, 0x68, 0x69, 0x70, 0x5c,
0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0f, 0x53, 0x77,
0x61, 0x70, 0x69, 0x3a, 0x3a, 0x53, 0x74, 0x61, 0x72, 0x73, 0x68, 0x69, 0x70, 0x62, 0x06, 0x70,
0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_starship_starship_proto_rawDescOnce sync.Once
file_starship_starship_proto_rawDescData = file_starship_starship_proto_rawDesc
)
func file_starship_starship_proto_rawDescGZIP() []byte {
file_starship_starship_proto_rawDescOnce.Do(func() {
file_starship_starship_proto_rawDescData = protoimpl.X.CompressGZIP(file_starship_starship_proto_rawDescData)
})
return file_starship_starship_proto_rawDescData
}
var file_starship_starship_proto_msgTypes = make([]protoimpl.MessageInfo, 5)
var file_starship_starship_proto_goTypes = []interface{}{
(*GetStarshipRequest)(nil), // 0: swapi.starship.GetStarshipRequest
(*GetStarshipReply)(nil), // 1: swapi.starship.GetStarshipReply
(*ListStarshipsRequest)(nil), // 2: swapi.starship.ListStarshipsRequest
(*ListStarshipsReply)(nil), // 3: swapi.starship.ListStarshipsReply
(*Starship)(nil), // 4: swapi.starship.Starship
}
var file_starship_starship_proto_depIdxs = []int32{
4, // 0: swapi.starship.GetStarshipReply.starship:type_name -> swapi.starship.Starship
4, // 1: swapi.starship.ListStarshipsReply.starships:type_name -> swapi.starship.Starship
0, // 2: swapi.starship.StarshipService.GetStarship:input_type -> swapi.starship.GetStarshipRequest
2, // 3: swapi.starship.StarshipService.ListStarships:input_type -> swapi.starship.ListStarshipsRequest
1, // 4: swapi.starship.StarshipService.GetStarship:output_type -> swapi.starship.GetStarshipReply
3, // 5: swapi.starship.StarshipService.ListStarships:output_type -> swapi.starship.ListStarshipsReply
4, // [4:6] is the sub-list for method output_type
2, // [2:4] is the sub-list for method input_type
2, // [2:2] is the sub-list for extension type_name
2, // [2:2] is the sub-list for extension extendee
0, // [0:2] is the sub-list for field type_name
}
func init() { file_starship_starship_proto_init() }
func file_starship_starship_proto_init() {
if File_starship_starship_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_starship_starship_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetStarshipRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_starship_starship_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetStarshipReply); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_starship_starship_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ListStarshipsRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_starship_starship_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ListStarshipsReply); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_starship_starship_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Starship); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_starship_starship_proto_rawDesc,
NumEnums: 0,
NumMessages: 5,
NumExtensions: 0,
NumServices: 1,
},
GoTypes: file_starship_starship_proto_goTypes,
DependencyIndexes: file_starship_starship_proto_depIdxs,
MessageInfos: file_starship_starship_proto_msgTypes,
}.Build()
File_starship_starship_proto = out.File
file_starship_starship_proto_rawDesc = nil
file_starship_starship_proto_goTypes = nil
file_starship_starship_proto_depIdxs = nil
}
================================================
FILE: demo/swapi/starship/starship_grpc.pb.go
================================================
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.4.0
// - protoc (unknown)
// source: starship/starship.proto
package starshippb
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.62.0 or later.
const _ = grpc.SupportPackageIsVersion8
const (
StarshipService_GetStarship_FullMethodName = "/swapi.starship.StarshipService/GetStarship"
StarshipService_ListStarships_FullMethodName = "/swapi.starship.StarshipService/ListStarships"
)
// StarshipServiceClient is the client API for StarshipService 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 StarshipServiceClient interface {
GetStarship(ctx context.Context, in *GetStarshipRequest, opts ...grpc.CallOption) (*GetStarshipReply, error)
ListStarships(ctx context.Context, in *ListStarshipsRequest, opts ...grpc.CallOption) (*ListStarshipsReply, error)
}
type starshipServiceClient struct {
cc grpc.ClientConnInterface
}
func NewStarshipServiceClient(cc grpc.ClientConnInterface) StarshipServiceClient {
return &starshipServiceClient{cc}
}
func (c *starshipServiceClient) GetStarship(ctx context.Context, in *GetStarshipRequest, opts ...grpc.CallOption) (*GetStarshipReply, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(GetStarshipReply)
err := c.cc.Invoke(ctx, StarshipService_GetStarship_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *starshipServiceClient) ListStarships(ctx context.Context, in *ListStarshipsRequest, opts ...grpc.CallOption) (*ListStarshipsReply, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(ListStarshipsReply)
err := c.cc.Invoke(ctx, StarshipService_ListStarships_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
// StarshipServiceServer is the server API for StarshipService service.
// All implementations must embed UnimplementedStarshipServiceServer
// for forward compatibility
type StarshipServiceServer interface {
GetStarship(context.Context, *GetStarshipRequest) (*GetStarshipReply, error)
ListStarships(context.Context, *ListStarshipsRequest) (*ListStarshipsReply, error)
mustEmbedUnimplementedStarshipServiceServer()
}
// UnimplementedStarshipServiceServer must be embedded to have forward compatible implementations.
type UnimplementedStarshipServiceServer struct {
}
func (UnimplementedStarshipServiceServer) GetStarship(context.Context, *GetStarshipRequest) (*GetStarshipReply, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetStarship not implemented")
}
func (UnimplementedStarshipServiceServer) ListStarships(context.Context, *ListStarshipsRequest) (*ListStarshipsReply, error) {
return nil, status.Errorf(codes.Unimplemented, "method ListStarships not implemented")
}
func (UnimplementedStarshipServiceServer) mustEmbedUnimplementedStarshipServiceServer() {}
// UnsafeStarshipServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to StarshipServiceServer will
// result in compilation errors.
type UnsafeStarshipServiceServer interface {
mustEmbedUnimplementedStarshipServiceServer()
}
func RegisterStarshipServiceServer(s grpc.ServiceRegistrar, srv StarshipServiceServer) {
s.RegisterService(&StarshipService_ServiceDesc, srv)
}
func _StarshipService_GetStarship_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetStarshipRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(StarshipServiceServer).GetStarship(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: StarshipService_GetStarship_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(StarshipServiceServer).GetStarship(ctx, req.(*GetStarshipRequest))
}
return interceptor(ctx, in, info, handler)
}
func _StarshipService_ListStarships_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ListStarshipsRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(StarshipServiceServer).ListStarships(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: StarshipService_ListStarships_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(StarshipServiceServer).ListStarships(ctx, req.(*ListStarshipsRequest))
}
return interceptor(ctx, in, info, handler)
}
// StarshipService_ServiceDesc is the grpc.ServiceDesc for StarshipService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var StarshipService_ServiceDesc = grpc.ServiceDesc{
ServiceName: "swapi.starship.StarshipService",
HandlerType: (*StarshipServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "GetStarship",
Handler: _StarshipService_GetStarship_Handler,
},
{
MethodName: "ListStarships",
Handler: _StarshipService_ListStarships_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "starship/starship.proto",
}
================================================
FILE: demo/swapi/swapi/swapi.pb.go
================================================
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.34.1
// protoc (unknown)
// source: swapi.proto
package swapipb
import (
_ "github.com/mercari/grpc-federation/demo/swapi/film"
_ "github.com/mercari/grpc-federation/demo/swapi/person"
_ "github.com/mercari/grpc-federation/demo/swapi/planet"
_ "github.com/mercari/grpc-federation/demo/swapi/species"
_ "github.com/mercari/grpc-federation/demo/swapi/starship"
_ "github.com/mercari/grpc-federation/demo/swapi/vehicle"
_ "github.com/mercari/grpc-federation/grpc/federation"
date "google.golang.org/genproto/googleapis/type/date"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
// GetPersonRequest.
type GetPersonRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// The persion id.
Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
}
func (x *GetPersonRequest) Reset() {
*x = GetPersonRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_swapi_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GetPersonRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetPersonRequest) ProtoMessage() {}
func (x *GetPersonRequest) ProtoReflect() protoreflect.Message {
mi := &file_swapi_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GetPersonRequest.ProtoReflect.Descriptor instead.
func (*GetPersonRequest) Descriptor() ([]byte, []int) {
return file_swapi_proto_rawDescGZIP(), []int{0}
}
func (x *GetPersonRequest) GetId() int64 {
if x != nil {
return x.Id
}
return 0
}
// GetPersonReply.
type GetPersonReply struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Person *Person `protobuf:"bytes,1,opt,name=person,proto3" json:"person,omitempty"`
// films.
Films []*Film `protobuf:"bytes,2,rep,name=films,proto3" json:"films,omitempty"`
// species.
Species []*Species `protobuf:"bytes,3,rep,name=species,proto3" json:"species,omitempty"`
// starships.
Starships []*Starship `protobuf:"bytes,4,rep,name=starships,proto3" json:"starships,omitempty"`
// vehicles.
Vehicles []*Vehicle `protobuf:"bytes,5,rep,name=vehicles,proto3" json:"vehicles,omitempty"`
}
func (x *GetPersonReply) Reset() {
*x = GetPersonReply{}
if protoimpl.UnsafeEnabled {
mi := &file_swapi_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GetPersonReply) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetPersonReply) ProtoMessage() {}
func (x *GetPersonReply) ProtoReflect() protoreflect.Message {
mi := &file_swapi_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GetPersonReply.ProtoReflect.Descriptor instead.
func (*GetPersonReply) Descriptor() ([]byte, []int) {
return file_swapi_proto_rawDescGZIP(), []int{1}
}
func (x *GetPersonReply) GetPerson() *Person {
if x != nil {
return x.Person
}
return nil
}
func (x *GetPersonReply) GetFilms() []*Film {
if x != nil {
return x.Films
}
return nil
}
func (x *GetPersonReply) GetSpecies() []*Species {
if x != nil {
return x.Species
}
return nil
}
func (x *GetPersonReply) GetStarships() []*Starship {
if x != nil {
return x.Starships
}
return nil
}
func (x *GetPersonReply) GetVehicles() []*Vehicle {
if x != nil {
return x.Vehicles
}
return nil
}
// ListPeopleRequest.
type ListPeopleRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Ids []int64 `protobuf:"varint,1,rep,packed,name=ids,proto3" json:"ids,omitempty"`
}
func (x *ListPeopleRequest) Reset() {
*x = ListPeopleRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_swapi_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ListPeopleRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ListPeopleRequest) ProtoMessage() {}
func (x *ListPeopleRequest) ProtoReflect() protoreflect.Message {
mi := &file_swapi_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ListPeopleRequest.ProtoReflect.Descriptor instead.
func (*ListPeopleRequest) Descriptor() ([]byte, []int) {
return file_swapi_proto_rawDescGZIP(), []int{2}
}
func (x *ListPeopleRequest) GetIds() []int64 {
if x != nil {
return x.Ids
}
return nil
}
// ListPeopleReply.
type ListPeopleReply struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
People []*Person `protobuf:"bytes,1,rep,name=people,proto3" json:"people,omitempty"`
}
func (x *ListPeopleReply) Reset() {
*x = ListPeopleReply{}
if protoimpl.UnsafeEnabled {
mi := &file_swapi_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ListPeopleReply) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ListPeopleReply) ProtoMessage() {}
func (x *ListPeopleReply) ProtoReflect() protoreflect.Message {
mi := &file_swapi_proto_msgTypes[3]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ListPeopleReply.ProtoReflect.Descriptor instead.
func (*ListPeopleReply) Descriptor() ([]byte, []int) {
return file_swapi_proto_rawDescGZIP(), []int{3}
}
func (x *ListPeopleReply) GetPeople() []*Person {
if x != nil {
return x.People
}
return nil
}
// GetFilmRequest.
type GetFilmRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// The film id.
Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
}
func (x *GetFilmRequest) Reset() {
*x = GetFilmRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_swapi_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GetFilmRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetFilmRequest) ProtoMessage() {}
func (x *GetFilmRequest) ProtoReflect() protoreflect.Message {
mi := &file_swapi_proto_msgTypes[4]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GetFilmRequest.ProtoReflect.Descriptor instead.
func (*GetFilmRequest) Descriptor() ([]byte, []int) {
return file_swapi_proto_rawDescGZIP(), []int{4}
}
func (x *GetFilmRequest) GetId() int64 {
if x != nil {
return x.Id
}
return 0
}
// GetFilmReply.
type GetFilmReply struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Film *Film `protobuf:"bytes,1,opt,name=film,proto3" json:"film,omitempty"`
// species.
Species []*Species `protobuf:"bytes,2,rep,name=species,proto3" json:"species,omitempty"`
// starships.
Starships []*Starship `protobuf:"bytes,3,rep,name=starships,proto3" json:"starships,omitempty"`
// vehicles.
Vehicles []*Vehicle `protobuf:"bytes,4,rep,name=vehicles,proto3" json:"vehicles,omitempty"`
// characters.
Characters []*Person `protobuf:"bytes,5,rep,name=characters,proto3" json:"characters,omitempty"`
// planets.
Planets []*Planet `protobuf:"bytes,6,rep,name=planets,proto3" json:"planets,omitempty"`
}
func (x *GetFilmReply) Reset() {
*x = GetFilmReply{}
if protoimpl.UnsafeEnabled {
mi := &file_swapi_proto_msgTypes[5]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GetFilmReply) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetFilmReply) ProtoMessage() {}
func (x *GetFilmReply) ProtoReflect() protoreflect.Message {
mi := &file_swapi_proto_msgTypes[5]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GetFilmReply.ProtoReflect.Descriptor instead.
func (*GetFilmReply) Descriptor() ([]byte, []int) {
return file_swapi_proto_rawDescGZIP(), []int{5}
}
func (x *GetFilmReply) GetFilm() *Film {
if x != nil {
return x.Film
}
return nil
}
func (x *GetFilmReply) GetSpecies() []*Species {
if x != nil {
return x.Species
}
return nil
}
func (x *GetFilmReply) GetStarships() []*Starship {
if x != nil {
return x.Starships
}
return nil
}
func (x *GetFilmReply) GetVehicles() []*Vehicle {
if x != nil {
return x.Vehicles
}
return nil
}
func (x *GetFilmReply) GetCharacters() []*Person {
if x != nil {
return x.Characters
}
return nil
}
func (x *GetFilmReply) GetPlanets() []*Planet {
if x != nil {
return x.Planets
}
return nil
}
// ListFilmsRequest.
type ListFilmsRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Ids []int64 `protobuf:"varint,1,rep,packed,name=ids,proto3" json:"ids,omitempty"`
}
func (x *ListFilmsRequest) Reset() {
*x = ListFilmsRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_swapi_proto_msgTypes[6]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ListFilmsRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ListFilmsRequest) ProtoMessage() {}
func (x *ListFilmsRequest) ProtoReflect() protoreflect.Message {
mi := &file_swapi_proto_msgTypes[6]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ListFilmsRequest.ProtoReflect.Descriptor instead.
func (*ListFilmsRequest) Descriptor() ([]byte, []int) {
return file_swapi_proto_rawDescGZIP(), []int{6}
}
func (x *ListFilmsRequest) GetIds() []int64 {
if x != nil {
return x.Ids
}
return nil
}
// ListFilmsReply.
type ListFilmsReply struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Films []*Film `protobuf:"bytes,1,rep,name=films,proto3" json:"films,omitempty"`
}
func (x *ListFilmsReply) Reset() {
*x = ListFilmsReply{}
if protoimpl.UnsafeEnabled {
mi := &file_swapi_proto_msgTypes[7]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ListFilmsReply) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ListFilmsReply) ProtoMessage() {}
func (x *ListFilmsReply) ProtoReflect() protoreflect.Message {
mi := &file_swapi_proto_msgTypes[7]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ListFilmsReply.ProtoReflect.Descriptor instead.
func (*ListFilmsReply) Descriptor() ([]byte, []int) {
return file_swapi_proto_rawDescGZIP(), []int{7}
}
func (x *ListFilmsReply) GetFilms() []*Film {
if x != nil {
return x.Films
}
return nil
}
// GetVehicleRequest.
type GetVehicleRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// vehicle id.
Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
}
func (x *GetVehicleRequest) Reset() {
*x = GetVehicleRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_swapi_proto_msgTypes[8]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GetVehicleRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetVehicleRequest) ProtoMessage() {}
func (x *GetVehicleRequest) ProtoReflect() protoreflect.Message {
mi := &file_swapi_proto_msgTypes[8]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GetVehicleRequest.ProtoReflect.Descriptor instead.
func (*GetVehicleRequest) Descriptor() ([]byte, []int) {
return file_swapi_proto_rawDescGZIP(), []int{8}
}
func (x *GetVehicleRequest) GetId() int64 {
if x != nil {
return x.Id
}
return 0
}
// GetVehicleReply.
type GetVehicleReply struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Vehicle *Vehicle `protobuf:"bytes,1,opt,name=vehicle,proto3" json:"vehicle,omitempty"`
// films.
Films []*Film `protobuf:"bytes,2,rep,name=films,proto3" json:"films,omitempty"`
// pilots.
Pilots []*Person `protobuf:"bytes,3,rep,name=pilots,proto3" json:"pilots,omitempty"`
}
func (x *GetVehicleReply) Reset() {
*x = GetVehicleReply{}
if protoimpl.UnsafeEnabled {
mi := &file_swapi_proto_msgTypes[9]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GetVehicleReply) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetVehicleReply) ProtoMessage() {}
func (x *GetVehicleReply) ProtoReflect() protoreflect.Message {
mi := &file_swapi_proto_msgTypes[9]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GetVehicleReply.ProtoReflect.Descriptor instead.
func (*GetVehicleReply) Descriptor() ([]byte, []int) {
return file_swapi_proto_rawDescGZIP(), []int{9}
}
func (x *GetVehicleReply) GetVehicle() *Vehicle {
if x != nil {
return x.Vehicle
}
return nil
}
func (x *GetVehicleReply) GetFilms() []*Film {
if x != nil {
return x.Films
}
return nil
}
func (x *GetVehicleReply) GetPilots() []*Person {
if x != nil {
return x.Pilots
}
return nil
}
// ListVehiclesRequest.
type ListVehiclesRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Ids []int64 `protobuf:"varint,1,rep,packed,name=ids,proto3" json:"ids,omitempty"`
}
func (x *ListVehiclesRequest) Reset() {
*x = ListVehiclesRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_swapi_proto_msgTypes[10]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ListVehiclesRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ListVehiclesRequest) ProtoMessage() {}
func (x *ListVehiclesRequest) ProtoReflect() protoreflect.Message {
mi := &file_swapi_proto_msgTypes[10]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ListVehiclesRequest.ProtoReflect.Descriptor instead.
func (*ListVehiclesRequest) Descriptor() ([]byte, []int) {
return file_swapi_proto_rawDescGZIP(), []int{10}
}
func (x *ListVehiclesRequest) GetIds() []int64 {
if x != nil {
return x.Ids
}
return nil
}
// ListVehiclesReply.
type ListVehiclesReply struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Vehicles []*Vehicle `protobuf:"bytes,1,rep,name=vehicles,proto3" json:"vehicles,omitempty"`
}
func (x *ListVehiclesReply) Reset() {
*x = ListVehiclesReply{}
if protoimpl.UnsafeEnabled {
mi := &file_swapi_proto_msgTypes[11]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ListVehiclesReply) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ListVehiclesReply) ProtoMessage() {}
func (x *ListVehiclesReply) ProtoReflect() protoreflect.Message {
mi := &file_swapi_proto_msgTypes[11]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ListVehiclesReply.ProtoReflect.Descriptor instead.
func (*ListVehiclesReply) Descriptor() ([]byte, []int) {
return file_swapi_proto_rawDescGZIP(), []int{11}
}
func (x *ListVehiclesReply) GetVehicles() []*Vehicle {
if x != nil {
return x.Vehicles
}
return nil
}
// GetSpeciesRequest.
type GetSpeciesRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// species id.
Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
}
func (x *GetSpeciesRequest) Reset() {
*x = GetSpeciesRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_swapi_proto_msgTypes[12]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GetSpeciesRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetSpeciesRequest) ProtoMessage() {}
func (x *GetSpeciesRequest) ProtoReflect() protoreflect.Message {
mi := &file_swapi_proto_msgTypes[12]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GetSpeciesRequest.ProtoReflect.Descriptor instead.
func (*GetSpeciesRequest) Descriptor() ([]byte, []int) {
return file_swapi_proto_rawDescGZIP(), []int{12}
}
func (x *GetSpeciesRequest) GetId() int64 {
if x != nil {
return x.Id
}
return 0
}
// GetSpeciesReply.
type GetSpeciesReply struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Species *Species `protobuf:"bytes,1,opt,name=species,proto3" json:"species,omitempty"`
// people.
People []*Person `protobuf:"bytes,2,rep,name=people,proto3" json:"people,omitempty"`
// films.
Films []*Film `protobuf:"bytes,3,rep,name=films,proto3" json:"films,omitempty"`
}
func (x *GetSpeciesReply) Reset() {
*x = GetSpeciesReply{}
if protoimpl.UnsafeEnabled {
mi := &file_swapi_proto_msgTypes[13]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GetSpeciesReply) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetSpeciesReply) ProtoMessage() {}
func (x *GetSpeciesReply) ProtoReflect() protoreflect.Message {
mi := &file_swapi_proto_msgTypes[13]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GetSpeciesReply.ProtoReflect.Descriptor instead.
func (*GetSpeciesReply) Descriptor() ([]byte, []int) {
return file_swapi_proto_rawDescGZIP(), []int{13}
}
func (x *GetSpeciesReply) GetSpecies() *Species {
if x != nil {
return x.Species
}
return nil
}
func (x *GetSpeciesReply) GetPeople() []*Person {
if x != nil {
return x.People
}
return nil
}
func (x *GetSpeciesReply) GetFilms() []*Film {
if x != nil {
return x.Films
}
return nil
}
// ListSpeciesRequest.
type ListSpeciesRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Ids []int64 `protobuf:"varint,1,rep,packed,name=ids,proto3" json:"ids,omitempty"`
}
func (x *ListSpeciesRequest) Reset() {
*x = ListSpeciesRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_swapi_proto_msgTypes[14]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ListSpeciesRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ListSpeciesRequest) ProtoMessage() {}
func (x *ListSpeciesRequest) ProtoReflect() protoreflect.Message {
mi := &file_swapi_proto_msgTypes[14]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ListSpeciesRequest.ProtoReflect.Descriptor instead.
func (*ListSpeciesRequest) Descriptor() ([]byte, []int) {
return file_swapi_proto_rawDescGZIP(), []int{14}
}
func (x *ListSpeciesRequest) GetIds() []int64 {
if x != nil {
return x.Ids
}
return nil
}
// ListSpeciesReply.
type ListSpeciesReply struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Species []*Species `protobuf:"bytes,1,rep,name=species,proto3" json:"species,omitempty"`
}
func (x *ListSpeciesReply) Reset() {
*x = ListSpeciesReply{}
if protoimpl.UnsafeEnabled {
mi := &file_swapi_proto_msgTypes[15]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ListSpeciesReply) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ListSpeciesReply) ProtoMessage() {}
func (x *ListSpeciesReply) ProtoReflect() protoreflect.Message {
mi := &file_swapi_proto_msgTypes[15]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ListSpeciesReply.ProtoReflect.Descriptor instead.
func (*ListSpeciesReply) Descriptor() ([]byte, []int) {
return file_swapi_proto_rawDescGZIP(), []int{15}
}
func (x *ListSpeciesReply) GetSpecies() []*Species {
if x != nil {
return x.Species
}
return nil
}
// GetStarshipRequest.
type GetStarshipRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// starship id.
Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
}
func (x *GetStarshipRequest) Reset() {
*x = GetStarshipRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_swapi_proto_msgTypes[16]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GetStarshipRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetStarshipRequest) ProtoMessage() {}
func (x *GetStarshipRequest) ProtoReflect() protoreflect.Message {
mi := &file_swapi_proto_msgTypes[16]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GetStarshipRequest.ProtoReflect.Descriptor instead.
func (*GetStarshipRequest) Descriptor() ([]byte, []int) {
return file_swapi_proto_rawDescGZIP(), []int{16}
}
func (x *GetStarshipRequest) GetId() int64 {
if x != nil {
return x.Id
}
return 0
}
// GetStarshipReply.
type GetStarshipReply struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Starship *Starship `protobuf:"bytes,1,opt,name=starship,proto3" json:"starship,omitempty"`
// films.
Films []*Film `protobuf:"bytes,2,rep,name=films,proto3" json:"films,omitempty"`
// pilots.
Pilots []*Person `protobuf:"bytes,3,rep,name=pilots,proto3" json:"pilots,omitempty"`
}
func (x *GetStarshipReply) Reset() {
*x = GetStarshipReply{}
if protoimpl.UnsafeEnabled {
mi := &file_swapi_proto_msgTypes[17]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GetStarshipReply) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetStarshipReply) ProtoMessage() {}
func (x *GetStarshipReply) ProtoReflect() protoreflect.Message {
mi := &file_swapi_proto_msgTypes[17]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GetStarshipReply.ProtoReflect.Descriptor instead.
func (*GetStarshipReply) Descriptor() ([]byte, []int) {
return file_swapi_proto_rawDescGZIP(), []int{17}
}
func (x *GetStarshipReply) GetStarship() *Starship {
if x != nil {
return x.Starship
}
return nil
}
func (x *GetStarshipReply) GetFilms() []*Film {
if x != nil {
return x.Films
}
return nil
}
func (x *GetStarshipReply) GetPilots() []*Person {
if x != nil {
return x.Pilots
}
return nil
}
// ListStarshipsRequest.
type ListStarshipsRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Ids []int64 `protobuf:"varint,1,rep,packed,name=ids,proto3" json:"ids,omitempty"`
}
func (x *ListStarshipsRequest) Reset() {
*x = ListStarshipsRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_swapi_proto_msgTypes[18]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ListStarshipsRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ListStarshipsRequest) ProtoMessage() {}
func (x *ListStarshipsRequest) ProtoReflect() protoreflect.Message {
mi := &file_swapi_proto_msgTypes[18]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ListStarshipsRequest.ProtoReflect.Descriptor instead.
func (*ListStarshipsRequest) Descriptor() ([]byte, []int) {
return file_swapi_proto_rawDescGZIP(), []int{18}
}
func (x *ListStarshipsRequest) GetIds() []int64 {
if x != nil {
return x.Ids
}
return nil
}
// ListStarshipsReply.
type ListStarshipsReply struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Starships []*Starship `protobuf:"bytes,1,rep,name=starships,proto3" json:"starships,omitempty"`
}
func (x *ListStarshipsReply) Reset() {
*x = ListStarshipsReply{}
if protoimpl.UnsafeEnabled {
mi := &file_swapi_proto_msgTypes[19]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ListStarshipsReply) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ListStarshipsReply) ProtoMessage() {}
func (x *ListStarshipsReply) ProtoReflect() protoreflect.Message {
mi := &file_swapi_proto_msgTypes[19]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ListStarshipsReply.ProtoReflect.Descriptor instead.
func (*ListStarshipsReply) Descriptor() ([]byte, []int) {
return file_swapi_proto_rawDescGZIP(), []int{19}
}
func (x *ListStarshipsReply) GetStarships() []*Starship {
if x != nil {
return x.Starships
}
return nil
}
// GetPlanetRequest.
type GetPlanetRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// planet id.
Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
}
func (x *GetPlanetRequest) Reset() {
*x = GetPlanetRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_swapi_proto_msgTypes[20]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GetPlanetRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetPlanetRequest) ProtoMessage() {}
func (x *GetPlanetRequest) ProtoReflect() protoreflect.Message {
mi := &file_swapi_proto_msgTypes[20]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GetPlanetRequest.ProtoReflect.Descriptor instead.
func (*GetPlanetRequest) Descriptor() ([]byte, []int) {
return file_swapi_proto_rawDescGZIP(), []int{20}
}
func (x *GetPlanetRequest) GetId() int64 {
if x != nil {
return x.Id
}
return 0
}
// GetPlanetReply.
type GetPlanetReply struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Planet *Planet `protobuf:"bytes,1,opt,name=planet,proto3" json:"planet,omitempty"`
// the people that live on this planet.
Residents []*Person `protobuf:"bytes,2,rep,name=residents,proto3" json:"residents,omitempty"`
// films.
Films []*Film `protobuf:"bytes,3,rep,name=films,proto3" json:"films,omitempty"`
}
func (x *GetPlanetReply) Reset() {
*x = GetPlanetReply{}
if protoimpl.UnsafeEnabled {
mi := &file_swapi_proto_msgTypes[21]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GetPlanetReply) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetPlanetReply) ProtoMessage() {}
func (x *GetPlanetReply) ProtoReflect() protoreflect.Message {
mi := &file_swapi_proto_msgTypes[21]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GetPlanetReply.ProtoReflect.Descriptor instead.
func (*GetPlanetReply) Descriptor() ([]byte, []int) {
return file_swapi_proto_rawDescGZIP(), []int{21}
}
func (x *GetPlanetReply) GetPlanet() *Planet {
if x != nil {
return x.Planet
}
return nil
}
func (x *GetPlanetReply) GetResidents() []*Person {
if x != nil {
return x.Residents
}
return nil
}
func (x *GetPlanetReply) GetFilms() []*Film {
if x != nil {
return x.Films
}
return nil
}
// ListPlanetsRequest.
type ListPlanetsRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Ids []int64 `protobuf:"varint,1,rep,packed,name=ids,proto3" json:"ids,omitempty"`
}
func (x *ListPlanetsRequest) Reset() {
*x = ListPlanetsRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_swapi_proto_msgTypes[22]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ListPlanetsRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ListPlanetsRequest) ProtoMessage() {}
func (x *ListPlanetsRequest) ProtoReflect() protoreflect.Message {
mi := &file_swapi_proto_msgTypes[22]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ListPlanetsRequest.ProtoReflect.Descriptor instead.
func (*ListPlanetsRequest) Descriptor() ([]byte, []int) {
return file_swapi_proto_rawDescGZIP(), []int{22}
}
func (x *ListPlanetsRequest) GetIds() []int64 {
if x != nil {
return x.Ids
}
return nil
}
// ListPlanetsReply.
type ListPlanetsReply struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Planets []*Planet `protobuf:"bytes,1,rep,name=planets,proto3" json:"planets,omitempty"`
}
func (x *ListPlanetsReply) Reset() {
*x = ListPlanetsReply{}
if protoimpl.UnsafeEnabled {
mi := &file_swapi_proto_msgTypes[23]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ListPlanetsReply) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ListPlanetsReply) ProtoMessage() {}
func (x *ListPlanetsReply) ProtoReflect() protoreflect.Message {
mi := &file_swapi_proto_msgTypes[23]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ListPlanetsReply.ProtoReflect.Descriptor instead.
func (*ListPlanetsReply) Descriptor() ([]byte, []int) {
return file_swapi_proto_rawDescGZIP(), []int{23}
}
func (x *ListPlanetsReply) GetPlanets() []*Planet {
if x != nil {
return x.Planets
}
return nil
}
// Person is an individual person or character within the Star Wars universe.
type Person struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// person id.
Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
// The name of this person.
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
// The birth year of the person,
// using the in-universe standard of BBY or ABY
// - Before the Battle of Yavin or After the Battle of Yavin.
// The Battle of Yavin is a battle that occurs at the end of Star Wars episode IV: A New Hope.
BirthYear string `protobuf:"bytes,3,opt,name=birth_year,json=birthYear,proto3" json:"birth_year,omitempty"`
// The eye color of this person.
// Will be "unknown" if not known or "n/a" if the person does not have an eye.
EyeColor string `protobuf:"bytes,4,opt,name=eye_color,json=eyeColor,proto3" json:"eye_color,omitempty"`
// The gender of this person.
// Either "Male", "Female" or "unknown", "n/a" if the person does not have a gender.
Gender string `protobuf:"bytes,5,opt,name=gender,proto3" json:"gender,omitempty"`
// The hair color of this person.
// Will be "unknown" if not known or "n/a" if the person does not have hair.
HairColor string `protobuf:"bytes,6,opt,name=hair_color,json=hairColor,proto3" json:"hair_color,omitempty"`
// The height of the person in centimeters.
Height string `protobuf:"bytes,7,opt,name=height,proto3" json:"height,omitempty"`
// The mass of the person in kilograms.
Mass string `protobuf:"bytes,8,opt,name=mass,proto3" json:"mass,omitempty"`
// The skin color of this person.
SkinColor string `protobuf:"bytes,9,opt,name=skin_color,json=skinColor,proto3" json:"skin_color,omitempty"`
// The URL of a planet resource, a planet that this person was born on or inhabits.
Homeworld string `protobuf:"bytes,10,opt,name=homeworld,proto3" json:"homeworld,omitempty"`
// the hypermedia URL of this resource.
Url string `protobuf:"bytes,11,opt,name=url,proto3" json:"url,omitempty"`
// the ISO 8601 date format of the time that this resource was created.
Created string `protobuf:"bytes,12,opt,name=created,proto3" json:"created,omitempty"`
// the ISO 8601 date format of the time that this resource was edited.
Edited string `protobuf:"bytes,13,opt,name=edited,proto3" json:"edited,omitempty"`
// film ids.
FilmIds []int64 `protobuf:"varint,14,rep,packed,name=film_ids,json=filmIds,proto3" json:"film_ids,omitempty"`
// species ids.
SpeciesIds []int64 `protobuf:"varint,15,rep,packed,name=species_ids,json=speciesIds,proto3" json:"species_ids,omitempty"`
// starship ids.
StarshipIds []int64 `protobuf:"varint,16,rep,packed,name=starship_ids,json=starshipIds,proto3" json:"starship_ids,omitempty"`
// vehicle ids.
VehicleIds []int64 `protobuf:"varint,17,rep,packed,name=vehicle_ids,json=vehicleIds,proto3" json:"vehicle_ids,omitempty"`
}
func (x *Person) Reset() {
*x = Person{}
if protoimpl.UnsafeEnabled {
mi := &file_swapi_proto_msgTypes[24]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Person) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Person) ProtoMessage() {}
func (x *Person) ProtoReflect() protoreflect.Message {
mi := &file_swapi_proto_msgTypes[24]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Person.ProtoReflect.Descriptor instead.
func (*Person) Descriptor() ([]byte, []int) {
return file_swapi_proto_rawDescGZIP(), []int{24}
}
func (x *Person) GetId() int64 {
if x != nil {
return x.Id
}
return 0
}
func (x *Person) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *Person) GetBirthYear() string {
if x != nil {
return x.BirthYear
}
return ""
}
func (x *Person) GetEyeColor() string {
if x != nil {
return x.EyeColor
}
return ""
}
func (x *Person) GetGender() string {
if x != nil {
return x.Gender
}
return ""
}
func (x *Person) GetHairColor() string {
if x != nil {
return x.HairColor
}
return ""
}
func (x *Person) GetHeight() string {
if x != nil {
return x.Height
}
return ""
}
func (x *Person) GetMass() string {
if x != nil {
return x.Mass
}
return ""
}
func (x *Person) GetSkinColor() string {
if x != nil {
return x.SkinColor
}
return ""
}
func (x *Person) GetHomeworld() string {
if x != nil {
return x.Homeworld
}
return ""
}
func (x *Person) GetUrl() string {
if x != nil {
return x.Url
}
return ""
}
func (x *Person) GetCreated() string {
if x != nil {
return x.Created
}
return ""
}
func (x *Person) GetEdited() string {
if x != nil {
return x.Edited
}
return ""
}
func (x *Person) GetFilmIds() []int64 {
if x != nil {
return x.FilmIds
}
return nil
}
func (x *Person) GetSpeciesIds() []int64 {
if x != nil {
return x.SpeciesIds
}
return nil
}
func (x *Person) GetStarshipIds() []int64 {
if x != nil {
return x.StarshipIds
}
return nil
}
func (x *Person) GetVehicleIds() []int64 {
if x != nil {
return x.VehicleIds
}
return nil
}
type People struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
People []*Person `protobuf:"bytes,1,rep,name=people,proto3" json:"people,omitempty"`
}
func (x *People) Reset() {
*x = People{}
if protoimpl.UnsafeEnabled {
mi := &file_swapi_proto_msgTypes[25]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *People) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*People) ProtoMessage() {}
func (x *People) ProtoReflect() protoreflect.Message {
mi := &file_swapi_proto_msgTypes[25]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use People.ProtoReflect.Descriptor instead.
func (*People) Descriptor() ([]byte, []int) {
return file_swapi_proto_rawDescGZIP(), []int{25}
}
func (x *People) GetPeople() []*Person {
if x != nil {
return x.People
}
return nil
}
// Film is a single film.
type Film struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// film id.
Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
// The title of this film.
Title string `protobuf:"bytes,2,opt,name=title,proto3" json:"title,omitempty"`
// The episode number of this film.
EpisodeId int32 `protobuf:"varint,3,opt,name=episode_id,json=episodeId,proto3" json:"episode_id,omitempty"`
// The opening paragraphs at the beginning of this film.
OpeningCrawl string `protobuf:"bytes,4,opt,name=opening_crawl,json=openingCrawl,proto3" json:"opening_crawl,omitempty"`
// The name of the director of this film.
Director string `protobuf:"bytes,5,opt,name=director,proto3" json:"director,omitempty"`
// The name(s) of the producer(s) of this film. Comma separated.
Producer string `protobuf:"bytes,6,opt,name=producer,proto3" json:"producer,omitempty"`
// The ISO 8601 date format of film release at original creator country.
ReleaseDate *date.Date `protobuf:"bytes,7,opt,name=release_date,json=releaseDate,proto3" json:"release_date,omitempty"`
// the hypermedia URL of this resource.
Url string `protobuf:"bytes,8,opt,name=url,proto3" json:"url,omitempty"`
// the ISO 8601 date format of the time that this resource was created.
Created string `protobuf:"bytes,9,opt,name=created,proto3" json:"created,omitempty"`
// the ISO 8601 date format of the time that this resource was edited.
Edited string `protobuf:"bytes,10,opt,name=edited,proto3" json:"edited,omitempty"`
// species ids.
SpeciesIds []int64 `protobuf:"varint,11,rep,packed,name=species_ids,json=speciesIds,proto3" json:"species_ids,omitempty"`
// starship ids.
StarshipIds []int64 `protobuf:"varint,12,rep,packed,name=starship_ids,json=starshipIds,proto3" json:"starship_ids,omitempty"`
// vehicle ids.
VehicleIds []int64 `protobuf:"varint,13,rep,packed,name=vehicle_ids,json=vehicleIds,proto3" json:"vehicle_ids,omitempty"`
// character ids.
CharacterIds []int64 `protobuf:"varint,14,rep,packed,name=character_ids,json=characterIds,proto3" json:"character_ids,omitempty"`
// planet ids.
PlanetIds []int64 `protobuf:"varint,15,rep,packed,name=planet_ids,json=planetIds,proto3" json:"planet_ids,omitempty"`
}
func (x *Film) Reset() {
*x = Film{}
if protoimpl.UnsafeEnabled {
mi := &file_swapi_proto_msgTypes[26]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Film) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Film) ProtoMessage() {}
func (x *Film) ProtoReflect() protoreflect.Message {
mi := &file_swapi_proto_msgTypes[26]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Film.ProtoReflect.Descriptor instead.
func (*Film) Descriptor() ([]byte, []int) {
return file_swapi_proto_rawDescGZIP(), []int{26}
}
func (x *Film) GetId() int64 {
if x != nil {
return x.Id
}
return 0
}
func (x *Film) GetTitle() string {
if x != nil {
return x.Title
}
return ""
}
func (x *Film) GetEpisodeId() int32 {
if x != nil {
return x.EpisodeId
}
return 0
}
func (x *Film) GetOpeningCrawl() string {
if x != nil {
return x.OpeningCrawl
}
return ""
}
func (x *Film) GetDirector() string {
if x != nil {
return x.Director
}
return ""
}
func (x *Film) GetProducer() string {
if x != nil {
return x.Producer
}
return ""
}
func (x *Film) GetReleaseDate() *date.Date {
if x != nil {
return x.ReleaseDate
}
return nil
}
func (x *Film) GetUrl() string {
if x != nil {
return x.Url
}
return ""
}
func (x *Film) GetCreated() string {
if x != nil {
return x.Created
}
return ""
}
func (x *Film) GetEdited() string {
if x != nil {
return x.Edited
}
return ""
}
func (x *Film) GetSpeciesIds() []int64 {
if x != nil {
return x.SpeciesIds
}
return nil
}
func (x *Film) GetStarshipIds() []int64 {
if x != nil {
return x.StarshipIds
}
return nil
}
func (x *Film) GetVehicleIds() []int64 {
if x != nil {
return x.VehicleIds
}
return nil
}
func (x *Film) GetCharacterIds() []int64 {
if x != nil {
return x.CharacterIds
}
return nil
}
func (x *Film) GetPlanetIds() []int64 {
if x != nil {
return x.PlanetIds
}
return nil
}
type Films struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Films []*Film `protobuf:"bytes,1,rep,name=films,proto3" json:"films,omitempty"`
}
func (x *Films) Reset() {
*x = Films{}
if protoimpl.UnsafeEnabled {
mi := &file_swapi_proto_msgTypes[27]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Films) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Films) ProtoMessage() {}
func (x *Films) ProtoReflect() protoreflect.Message {
mi := &file_swapi_proto_msgTypes[27]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Films.ProtoReflect.Descriptor instead.
func (*Films) Descriptor() ([]byte, []int) {
return file_swapi_proto_rawDescGZIP(), []int{27}
}
func (x *Films) GetFilms() []*Film {
if x != nil {
return x.Films
}
return nil
}
// Starship is a single transport craft that has hyperdrive capability.
type Starship struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// starship id.
Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
// The name of this starship. The common name, such as "Death Star".
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
// The model or official name of this starship.
// Such as "T-65 X-wing" or "DS-1 Orbital Battle Station".
Model string `protobuf:"bytes,3,opt,name=model,proto3" json:"model,omitempty"`
// The class of this starship, such as "Starfighter" or "Deep Space Mobile Battlestation".
StarshipClass string `protobuf:"bytes,4,opt,name=starship_class,json=starshipClass,proto3" json:"starship_class,omitempty"`
// The manufacturer of this starship. Comma separated if more than one.
Manufacturer string `protobuf:"bytes,5,opt,name=manufacturer,proto3" json:"manufacturer,omitempty"`
// The cost of this starship new, in galactic credits.
CostInCredits string `protobuf:"bytes,6,opt,name=cost_in_credits,json=costInCredits,proto3" json:"cost_in_credits,omitempty"`
// The length of this starship in meters.
Length string `protobuf:"bytes,7,opt,name=length,proto3" json:"length,omitempty"`
// The number of personnel needed to run or pilot this starship.
Crew string `protobuf:"bytes,8,opt,name=crew,proto3" json:"crew,omitempty"`
// The number of non-essential people this starship can transport.
Passengers string `protobuf:"bytes,9,opt,name=passengers,proto3" json:"passengers,omitempty"`
// The maximum speed of this starship in the atmosphere.
// "N/A" if this starship is incapable of atmospheric flight.
MaxAtmospheringSpeed string `protobuf:"bytes,10,opt,name=max_atmosphering_speed,json=maxAtmospheringSpeed,proto3" json:"max_atmosphering_speed,omitempty"`
// The class of this starships hyperdrive.
HyperdriveRating string `protobuf:"bytes,11,opt,name=hyperdrive_rating,json=hyperdriveRating,proto3" json:"hyperdrive_rating,omitempty"`
// The Maximum number of Megalights this starship can travel in a standard hour.
// A "Megalight" is a standard unit of distance and has never been defined before within the Star Wars universe.
// This figure is only really useful for measuring the difference in speed of starships.
// We can assume it is similar to AU, the distance between our Sun (Sol) and Earth.
Mglt string `protobuf:"bytes,12,opt,name=mglt,proto3" json:"mglt,omitempty"`
// The maximum number of kilograms that this starship can transport.
CargoCapacity string `protobuf:"bytes,13,opt,name=cargo_capacity,json=cargoCapacity,proto3" json:"cargo_capacity,omitempty"`
// The maximum length of time that this starship can provide consumables for its entire crew without having to resupply.
Consumables string `protobuf:"bytes,14,opt,name=consumables,proto3" json:"consumables,omitempty"`
// the hypermedia URL of this resource.
Url string `protobuf:"bytes,15,opt,name=url,proto3" json:"url,omitempty"`
// the ISO 8601 date format of the time that this resource was created.
Created string `protobuf:"bytes,16,opt,name=created,proto3" json:"created,omitempty"`
// the ISO 8601 date format of the time that this resource was edited.
Edited string `protobuf:"bytes,17,opt,name=edited,proto3" json:"edited,omitempty"`
// film ids.
FilmIds []int64 `protobuf:"varint,18,rep,packed,name=film_ids,json=filmIds,proto3" json:"film_ids,omitempty"`
// pilot ids.
PilotIds []int64 `protobuf:"varint,19,rep,packed,name=pilot_ids,json=pilotIds,proto3" json:"pilot_ids,omitempty"`
}
func (x *Starship) Reset() {
*x = Starship{}
if protoimpl.UnsafeEnabled {
mi := &file_swapi_proto_msgTypes[28]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Starship) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Starship) ProtoMessage() {}
func (x *Starship) ProtoReflect() protoreflect.Message {
mi := &file_swapi_proto_msgTypes[28]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Starship.ProtoReflect.Descriptor instead.
func (*Starship) Descriptor() ([]byte, []int) {
return file_swapi_proto_rawDescGZIP(), []int{28}
}
func (x *Starship) GetId() int64 {
if x != nil {
return x.Id
}
return 0
}
func (x *Starship) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *Starship) GetModel() string {
if x != nil {
return x.Model
}
return ""
}
func (x *Starship) GetStarshipClass() string {
if x != nil {
return x.StarshipClass
}
return ""
}
func (x *Starship) GetManufacturer() string {
if x != nil {
return x.Manufacturer
}
return ""
}
func (x *Starship) GetCostInCredits() string {
if x != nil {
return x.CostInCredits
}
return ""
}
func (x *Starship) GetLength() string {
if x != nil {
return x.Length
}
return ""
}
func (x *Starship) GetCrew() string {
if x != nil {
return x.Crew
}
return ""
}
func (x *Starship) GetPassengers() string {
if x != nil {
return x.Passengers
}
return ""
}
func (x *Starship) GetMaxAtmospheringSpeed() string {
if x != nil {
return x.MaxAtmospheringSpeed
}
return ""
}
func (x *Starship) GetHyperdriveRating() string {
if x != nil {
return x.HyperdriveRating
}
return ""
}
func (x *Starship) GetMglt() string {
if x != nil {
return x.Mglt
}
return ""
}
func (x *Starship) GetCargoCapacity() string {
if x != nil {
return x.CargoCapacity
}
return ""
}
func (x *Starship) GetConsumables() string {
if x != nil {
return x.Consumables
}
return ""
}
func (x *Starship) GetUrl() string {
if x != nil {
return x.Url
}
return ""
}
func (x *Starship) GetCreated() string {
if x != nil {
return x.Created
}
return ""
}
func (x *Starship) GetEdited() string {
if x != nil {
return x.Edited
}
return ""
}
func (x *Starship) GetFilmIds() []int64 {
if x != nil {
return x.FilmIds
}
return nil
}
func (x *Starship) GetPilotIds() []int64 {
if x != nil {
return x.PilotIds
}
return nil
}
type Starships struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Starships []*Starship `protobuf:"bytes,1,rep,name=starships,proto3" json:"starships,omitempty"`
}
func (x *Starships) Reset() {
*x = Starships{}
if protoimpl.UnsafeEnabled {
mi := &file_swapi_proto_msgTypes[29]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Starships) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Starships) ProtoMessage() {}
func (x *Starships) ProtoReflect() protoreflect.Message {
mi := &file_swapi_proto_msgTypes[29]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Starships.ProtoReflect.Descriptor instead.
func (*Starships) Descriptor() ([]byte, []int) {
return file_swapi_proto_rawDescGZIP(), []int{29}
}
func (x *Starships) GetStarships() []*Starship {
if x != nil {
return x.Starships
}
return nil
}
// Vehicle is a single transport craft that does not have hyperdrive capability..
type Vehicle struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// vehicle id.
Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
// The name of this vehicle. The common name, such as "Sand Crawler" or "Speeder bike".
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
// The model or official name of this vehicle. Such as "All-Terrain Attack Transport".
Model string `protobuf:"bytes,3,opt,name=model,proto3" json:"model,omitempty"`
// The class of this vehicle, such as "Wheeled" or "Repulsorcraft".
VehicleClass string `protobuf:"bytes,4,opt,name=vehicle_class,json=vehicleClass,proto3" json:"vehicle_class,omitempty"`
// The manufacturer of this vehicle. Comma separated if more than one.
Manufacturer string `protobuf:"bytes,5,opt,name=manufacturer,proto3" json:"manufacturer,omitempty"`
// The length of this vehicle in meters.
Length string `protobuf:"bytes,6,opt,name=length,proto3" json:"length,omitempty"`
// The cost of this vehicle new, in Galactic Credits.
CostInCredits string `protobuf:"bytes,7,opt,name=cost_in_credits,json=costInCredits,proto3" json:"cost_in_credits,omitempty"`
// The number of personnel needed to run or pilot this vehicle.
Crew string `protobuf:"bytes,8,opt,name=crew,proto3" json:"crew,omitempty"`
// The number of non-essential people this vehicle can transport.
Passengers string `protobuf:"bytes,9,opt,name=passengers,proto3" json:"passengers,omitempty"`
// The maximum speed of this vehicle in the atmosphere.
MaxAtmospheringSpeed string `protobuf:"bytes,10,opt,name=max_atmosphering_speed,json=maxAtmospheringSpeed,proto3" json:"max_atmosphering_speed,omitempty"`
// The maximum number of kilograms that this vehicle can transport.
CargoCapacity string `protobuf:"bytes,11,opt,name=cargo_capacity,json=cargoCapacity,proto3" json:"cargo_capacity,omitempty"`
// The maximum length of time that this vehicle can provide consumables for its entire crew without having to resupply.
Consumables string `protobuf:"bytes,12,opt,name=consumables,proto3" json:"consumables,omitempty"`
// the hypermedia URL of this resource.
Url string `protobuf:"bytes,13,opt,name=url,proto3" json:"url,omitempty"`
// the ISO 8601 date format of the time that this resource was created.
Created string `protobuf:"bytes,14,opt,name=created,proto3" json:"created,omitempty"`
// the ISO 8601 date format of the time that this resource was edited.
Edited string `protobuf:"bytes,15,opt,name=edited,proto3" json:"edited,omitempty"`
// film ids.
FilmIds []int64 `protobuf:"varint,16,rep,packed,name=film_ids,json=filmIds,proto3" json:"film_ids,omitempty"`
// pilot ids.
PilotIds []int64 `protobuf:"varint,17,rep,packed,name=pilot_ids,json=pilotIds,proto3" json:"pilot_ids,omitempty"`
}
func (x *Vehicle) Reset() {
*x = Vehicle{}
if protoimpl.UnsafeEnabled {
mi := &file_swapi_proto_msgTypes[30]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Vehicle) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Vehicle) ProtoMessage() {}
func (x *Vehicle) ProtoReflect() protoreflect.Message {
mi := &file_swapi_proto_msgTypes[30]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Vehicle.ProtoReflect.Descriptor instead.
func (*Vehicle) Descriptor() ([]byte, []int) {
return file_swapi_proto_rawDescGZIP(), []int{30}
}
func (x *Vehicle) GetId() int64 {
if x != nil {
return x.Id
}
return 0
}
func (x *Vehicle) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *Vehicle) GetModel() string {
if x != nil {
return x.Model
}
return ""
}
func (x *Vehicle) GetVehicleClass() string {
if x != nil {
return x.VehicleClass
}
return ""
}
func (x *Vehicle) GetManufacturer() string {
if x != nil {
return x.Manufacturer
}
return ""
}
func (x *Vehicle) GetLength() string {
if x != nil {
return x.Length
}
return ""
}
func (x *Vehicle) GetCostInCredits() string {
if x != nil {
return x.CostInCredits
}
return ""
}
func (x *Vehicle) GetCrew() string {
if x != nil {
return x.Crew
}
return ""
}
func (x *Vehicle) GetPassengers() string {
if x != nil {
return x.Passengers
}
return ""
}
func (x *Vehicle) GetMaxAtmospheringSpeed() string {
if x != nil {
return x.MaxAtmospheringSpeed
}
return ""
}
func (x *Vehicle) GetCargoCapacity() string {
if x != nil {
return x.CargoCapacity
}
return ""
}
func (x *Vehicle) GetConsumables() string {
if x != nil {
return x.Consumables
}
return ""
}
func (x *Vehicle) GetUrl() string {
if x != nil {
return x.Url
}
return ""
}
func (x *Vehicle) GetCreated() string {
if x != nil {
return x.Created
}
return ""
}
func (x *Vehicle) GetEdited() string {
if x != nil {
return x.Edited
}
return ""
}
func (x *Vehicle) GetFilmIds() []int64 {
if x != nil {
return x.FilmIds
}
return nil
}
func (x *Vehicle) GetPilotIds() []int64 {
if x != nil {
return x.PilotIds
}
return nil
}
type Vehicles struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Vehicles []*Vehicle `protobuf:"bytes,1,rep,name=vehicles,proto3" json:"vehicles,omitempty"`
}
func (x *Vehicles) Reset() {
*x = Vehicles{}
if protoimpl.UnsafeEnabled {
mi := &file_swapi_proto_msgTypes[31]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Vehicles) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Vehicles) ProtoMessage() {}
func (x *Vehicles) ProtoReflect() protoreflect.Message {
mi := &file_swapi_proto_msgTypes[31]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Vehicles.ProtoReflect.Descriptor instead.
func (*Vehicles) Descriptor() ([]byte, []int) {
return file_swapi_proto_rawDescGZIP(), []int{31}
}
func (x *Vehicles) GetVehicles() []*Vehicle {
if x != nil {
return x.Vehicles
}
return nil
}
// Species is a type of person or character within the Star Wars Universe.
type Species struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// species id.
Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
// The name of this species.
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
// The classification of this species, such as "mammal" or "reptile".
Classification string `protobuf:"bytes,3,opt,name=classification,proto3" json:"classification,omitempty"`
// The designation of this species, such as "sentient".
Designation string `protobuf:"bytes,4,opt,name=designation,proto3" json:"designation,omitempty"`
// The average height of this species in centimeters.
AverageHeight string `protobuf:"bytes,5,opt,name=average_height,json=averageHeight,proto3" json:"average_height,omitempty"`
// The average lifespan of this species in years.
AverageLifespan string `protobuf:"bytes,6,opt,name=average_lifespan,json=averageLifespan,proto3" json:"average_lifespan,omitempty"`
// A comma-separated string of common eye colors for this species,
// "none" if this species does not typically have eyes.
EyeColors string `protobuf:"bytes,7,opt,name=eye_colors,json=eyeColors,proto3" json:"eye_colors,omitempty"`
// A comma-separated string of common hair colors for this species,
// "none" if this species does not typically have hair.
HairColors string `protobuf:"bytes,8,opt,name=hair_colors,json=hairColors,proto3" json:"hair_colors,omitempty"`
// A comma-separated string of common skin colors for this species,
// "none" if this species does not typically have skin.
SkinColors string `protobuf:"bytes,9,opt,name=skin_colors,json=skinColors,proto3" json:"skin_colors,omitempty"`
// The language commonly spoken by this species.
Language string `protobuf:"bytes,10,opt,name=language,proto3" json:"language,omitempty"`
// The URL of a planet resource, a planet that this species originates from.
Homeworld string `protobuf:"bytes,11,opt,name=homeworld,proto3" json:"homeworld,omitempty"`
// the hypermedia URL of this resource.
Url string `protobuf:"bytes,12,opt,name=url,proto3" json:"url,omitempty"`
// the ISO 8601 date format of the time that this resource was created.
Created string `protobuf:"bytes,13,opt,name=created,proto3" json:"created,omitempty"`
// the ISO 8601 date format of the time that this resource was edited.
Edited string `protobuf:"bytes,14,opt,name=edited,proto3" json:"edited,omitempty"`
// person ids.
PersonIds []int64 `protobuf:"varint,15,rep,packed,name=person_ids,json=personIds,proto3" json:"person_ids,omitempty"`
// film ids.
FilmIds []int64 `protobuf:"varint,16,rep,packed,name=film_ids,json=filmIds,proto3" json:"film_ids,omitempty"`
}
func (x *Species) Reset() {
*x = Species{}
if protoimpl.UnsafeEnabled {
mi := &file_swapi_proto_msgTypes[32]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Species) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Species) ProtoMessage() {}
func (x *Species) ProtoReflect() protoreflect.Message {
mi := &file_swapi_proto_msgTypes[32]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Species.ProtoReflect.Descriptor instead.
func (*Species) Descriptor() ([]byte, []int) {
return file_swapi_proto_rawDescGZIP(), []int{32}
}
func (x *Species) GetId() int64 {
if x != nil {
return x.Id
}
return 0
}
func (x *Species) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *Species) GetClassification() string {
if x != nil {
return x.Classification
}
return ""
}
func (x *Species) GetDesignation() string {
if x != nil {
return x.Designation
}
return ""
}
func (x *Species) GetAverageHeight() string {
if x != nil {
return x.AverageHeight
}
return ""
}
func (x *Species) GetAverageLifespan() string {
if x != nil {
return x.AverageLifespan
}
return ""
}
func (x *Species) GetEyeColors() string {
if x != nil {
return x.EyeColors
}
return ""
}
func (x *Species) GetHairColors() string {
if x != nil {
return x.HairColors
}
return ""
}
func (x *Species) GetSkinColors() string {
if x != nil {
return x.SkinColors
}
return ""
}
func (x *Species) GetLanguage() string {
if x != nil {
return x.Language
}
return ""
}
func (x *Species) GetHomeworld() string {
if x != nil {
return x.Homeworld
}
return ""
}
func (x *Species) GetUrl() string {
if x != nil {
return x.Url
}
return ""
}
func (x *Species) GetCreated() string {
if x != nil {
return x.Created
}
return ""
}
func (x *Species) GetEdited() string {
if x != nil {
return x.Edited
}
return ""
}
func (x *Species) GetPersonIds() []int64 {
if x != nil {
return x.PersonIds
}
return nil
}
func (x *Species) GetFilmIds() []int64 {
if x != nil {
return x.FilmIds
}
return nil
}
type SpeciesList struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Species []*Species `protobuf:"bytes,1,rep,name=species,proto3" json:"species,omitempty"`
}
func (x *SpeciesList) Reset() {
*x = SpeciesList{}
if protoimpl.UnsafeEnabled {
mi := &file_swapi_proto_msgTypes[33]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *SpeciesList) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*SpeciesList) ProtoMessage() {}
func (x *SpeciesList) ProtoReflect() protoreflect.Message {
mi := &file_swapi_proto_msgTypes[33]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use SpeciesList.ProtoReflect.Descriptor instead.
func (*SpeciesList) Descriptor() ([]byte, []int) {
return file_swapi_proto_rawDescGZIP(), []int{33}
}
func (x *SpeciesList) GetSpecies() []*Species {
if x != nil {
return x.Species
}
return nil
}
// Planet is a large mass, planet or planetoid in the Star Wars Universe, at the time of 0 ABY.
type Planet struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// planet id.
Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
// The name of this planet.
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
// The diameter of this planet in kilometers.
Diameter string `protobuf:"bytes,3,opt,name=diameter,proto3" json:"diameter,omitempty"`
// The number of standard hours it takes for this planet to complete a single rotation on its axis.
RotationPeriod string `protobuf:"bytes,4,opt,name=rotation_period,json=rotationPeriod,proto3" json:"rotation_period,omitempty"`
// The number of standard days it takes for this planet to complete a single orbit of its local star.
OrbitalPeriod string `protobuf:"bytes,5,opt,name=orbital_period,json=orbitalPeriod,proto3" json:"orbital_period,omitempty"`
// A number denoting the gravity of this planet, where "1" is normal or 1 standard G.
// "2" is twice or 2 standard Gs. "0.5" is half or 0.5 standard Gs.
Gravity string `protobuf:"bytes,6,opt,name=gravity,proto3" json:"gravity,omitempty"`
// The average population of sentient beings inhabiting this planet.
Population string `protobuf:"bytes,7,opt,name=population,proto3" json:"population,omitempty"`
// The climate of this planet. Comma separated if diverse.
Climate string `protobuf:"bytes,8,opt,name=climate,proto3" json:"climate,omitempty"`
// The terrain of this planet. Comma separated if diverse.
Terrain string `protobuf:"bytes,9,opt,name=terrain,proto3" json:"terrain,omitempty"`
// The percentage of the planet surface that is naturally occurring water or bodies of water.
SurfaceWater string `protobuf:"bytes,10,opt,name=surface_water,json=surfaceWater,proto3" json:"surface_water,omitempty"`
// the hypermedia URL of this resource.
Url string `protobuf:"bytes,11,opt,name=url,proto3" json:"url,omitempty"`
// the ISO 8601 date format of the time that this resource was created.
Created string `protobuf:"bytes,12,opt,name=created,proto3" json:"created,omitempty"`
// the ISO 8601 date format of the time that this resource was edited.
Edited string `protobuf:"bytes,13,opt,name=edited,proto3" json:"edited,omitempty"`
// the person that live on this planet ids.
ResidentIds []int64 `protobuf:"varint,14,rep,packed,name=resident_ids,json=residentIds,proto3" json:"resident_ids,omitempty"`
// film ids.
FilmIds []int64 `protobuf:"varint,15,rep,packed,name=film_ids,json=filmIds,proto3" json:"film_ids,omitempty"`
}
func (x *Planet) Reset() {
*x = Planet{}
if protoimpl.UnsafeEnabled {
mi := &file_swapi_proto_msgTypes[34]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Planet) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Planet) ProtoMessage() {}
func (x *Planet) ProtoReflect() protoreflect.Message {
mi := &file_swapi_proto_msgTypes[34]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Planet.ProtoReflect.Descriptor instead.
func (*Planet) Descriptor() ([]byte, []int) {
return file_swapi_proto_rawDescGZIP(), []int{34}
}
func (x *Planet) GetId() int64 {
if x != nil {
return x.Id
}
return 0
}
func (x *Planet) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *Planet) GetDiameter() string {
if x != nil {
return x.Diameter
}
return ""
}
func (x *Planet) GetRotationPeriod() string {
if x != nil {
return x.RotationPeriod
}
return ""
}
func (x *Planet) GetOrbitalPeriod() string {
if x != nil {
return x.OrbitalPeriod
}
return ""
}
func (x *Planet) GetGravity() string {
if x != nil {
return x.Gravity
}
return ""
}
func (x *Planet) GetPopulation() string {
if x != nil {
return x.Population
}
return ""
}
func (x *Planet) GetClimate() string {
if x != nil {
return x.Climate
}
return ""
}
func (x *Planet) GetTerrain() string {
if x != nil {
return x.Terrain
}
return ""
}
func (x *Planet) GetSurfaceWater() string {
if x != nil {
return x.SurfaceWater
}
return ""
}
func (x *Planet) GetUrl() string {
if x != nil {
return x.Url
}
return ""
}
func (x *Planet) GetCreated() string {
if x != nil {
return x.Created
}
return ""
}
func (x *Planet) GetEdited() string {
if x != nil {
return x.Edited
}
return ""
}
func (x *Planet) GetResidentIds() []int64 {
if x != nil {
return x.ResidentIds
}
return nil
}
func (x *Planet) GetFilmIds() []int64 {
if x != nil {
return x.FilmIds
}
return nil
}
type Planets struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Planets []*Planet `protobuf:"bytes,1,rep,name=planets,proto3" json:"planets,omitempty"`
}
func (x *Planets) Reset() {
*x = Planets{}
if protoimpl.UnsafeEnabled {
mi := &file_swapi_proto_msgTypes[35]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Planets) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Planets) ProtoMessage() {}
func (x *Planets) ProtoReflect() protoreflect.Message {
mi := &file_swapi_proto_msgTypes[35]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Planets.ProtoReflect.Descriptor instead.
func (*Planets) Descriptor() ([]byte, []int) {
return file_swapi_proto_rawDescGZIP(), []int{35}
}
func (x *Planets) GetPlanets() []*Planet {
if x != nil {
return x.Planets
}
return nil
}
var File_swapi_proto protoreflect.FileDescriptor
var file_swapi_proto_rawDesc = []byte{
0x0a, 0x0b, 0x73, 0x77, 0x61, 0x70, 0x69, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x05, 0x73,
0x77, 0x61, 0x70, 0x69, 0x1a, 0x16, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x74, 0x79, 0x70,
0x65, 0x2f, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x20, 0x67, 0x72,
0x70, 0x63, 0x2f, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x66, 0x65,
0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x13,
0x70, 0x6c, 0x61, 0x6e, 0x65, 0x74, 0x2f, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x74, 0x2e, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x1a, 0x0f, 0x66, 0x69, 0x6c, 0x6d, 0x2f, 0x66, 0x69, 0x6c, 0x6d, 0x2e, 0x70,
0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x15, 0x76, 0x65, 0x68, 0x69, 0x63, 0x6c, 0x65, 0x2f, 0x76, 0x65,
0x68, 0x69, 0x63, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x15, 0x73, 0x70, 0x65,
0x63, 0x69, 0x65, 0x73, 0x2f, 0x73, 0x70, 0x65, 0x63, 0x69, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f,
0x74, 0x6f, 0x1a, 0x17, 0x73, 0x74, 0x61, 0x72, 0x73, 0x68, 0x69, 0x70, 0x2f, 0x73, 0x74, 0x61,
0x72, 0x73, 0x68, 0x69, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x13, 0x70, 0x65, 0x72,
0x73, 0x6f, 0x6e, 0x2f, 0x70, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
0x22, 0x22, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x52, 0x65, 0x71,
0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03,
0x52, 0x02, 0x69, 0x64, 0x22, 0xb2, 0x04, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x50, 0x65, 0x72, 0x73,
0x6f, 0x6e, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x2d, 0x0a, 0x06, 0x70, 0x65, 0x72, 0x73, 0x6f,
0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x73, 0x77, 0x61, 0x70, 0x69, 0x2e,
0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x42, 0x06, 0x9a, 0x4a, 0x03, 0x12, 0x01, 0x70, 0x52, 0x06,
0x70, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x12, 0x2f, 0x0a, 0x05, 0x66, 0x69, 0x6c, 0x6d, 0x73, 0x18,
0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x73, 0x77, 0x61, 0x70, 0x69, 0x2e, 0x46, 0x69,
0x6c, 0x6d, 0x42, 0x0c, 0x9a, 0x4a, 0x09, 0x12, 0x07, 0x66, 0x2e, 0x66, 0x69, 0x6c, 0x6d, 0x73,
0x52, 0x05, 0x66, 0x69, 0x6c, 0x6d, 0x73, 0x12, 0x3e, 0x0a, 0x07, 0x73, 0x70, 0x65, 0x63, 0x69,
0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x73, 0x77, 0x61, 0x70, 0x69,
0x2e, 0x53, 0x70, 0x65, 0x63, 0x69, 0x65, 0x73, 0x42, 0x14, 0x9a, 0x4a, 0x11, 0x12, 0x0f, 0x73,
0x70, 0x65, 0x63, 0x69, 0x65, 0x73, 0x2e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x65, 0x73, 0x52, 0x07,
0x73, 0x70, 0x65, 0x63, 0x69, 0x65, 0x73, 0x12, 0x47, 0x0a, 0x09, 0x73, 0x74, 0x61, 0x72, 0x73,
0x68, 0x69, 0x70, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x73, 0x77, 0x61,
0x70, 0x69, 0x2e, 0x53, 0x74, 0x61, 0x72, 0x73, 0x68, 0x69, 0x70, 0x42, 0x18, 0x9a, 0x4a, 0x15,
0x12, 0x13, 0x73, 0x74, 0x61, 0x72, 0x73, 0x68, 0x69, 0x70, 0x73, 0x2e, 0x73, 0x74, 0x61, 0x72,
0x73, 0x68, 0x69, 0x70, 0x73, 0x52, 0x09, 0x73, 0x74, 0x61, 0x72, 0x73, 0x68, 0x69, 0x70, 0x73,
0x12, 0x3b, 0x0a, 0x08, 0x76, 0x65, 0x68, 0x69, 0x63, 0x6c, 0x65, 0x73, 0x18, 0x05, 0x20, 0x03,
0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x73, 0x77, 0x61, 0x70, 0x69, 0x2e, 0x56, 0x65, 0x68, 0x69, 0x63,
0x6c, 0x65, 0x42, 0x0f, 0x9a, 0x4a, 0x0c, 0x12, 0x0a, 0x76, 0x2e, 0x76, 0x65, 0x68, 0x69, 0x63,
0x6c, 0x65, 0x73, 0x52, 0x08, 0x76, 0x65, 0x68, 0x69, 0x63, 0x6c, 0x65, 0x73, 0x3a, 0xf9, 0x01,
0x9a, 0x4a, 0xf5, 0x01, 0x0a, 0x39, 0x0a, 0x03, 0x72, 0x65, 0x73, 0x72, 0x32, 0x0a, 0x24, 0x73,
0x77, 0x61, 0x70, 0x69, 0x2e, 0x70, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x2e, 0x50, 0x65, 0x72, 0x73,
0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x47, 0x65, 0x74, 0x50, 0x65, 0x72,
0x73, 0x6f, 0x6e, 0x12, 0x0a, 0x0a, 0x02, 0x69, 0x64, 0x12, 0x04, 0x24, 0x2e, 0x69, 0x64, 0x0a,
0x0f, 0x0a, 0x01, 0x70, 0x5a, 0x0a, 0x72, 0x65, 0x73, 0x2e, 0x70, 0x65, 0x72, 0x73, 0x6f, 0x6e,
0x0a, 0x1f, 0x0a, 0x01, 0x66, 0x6a, 0x1a, 0x0a, 0x05, 0x46, 0x69, 0x6c, 0x6d, 0x73, 0x12, 0x11,
0x0a, 0x03, 0x69, 0x64, 0x73, 0x12, 0x0a, 0x70, 0x2e, 0x66, 0x69, 0x6c, 0x6d, 0x5f, 0x69, 0x64,
0x73, 0x0a, 0x2e, 0x0a, 0x07, 0x73, 0x70, 0x65, 0x63, 0x69, 0x65, 0x73, 0x6a, 0x23, 0x0a, 0x0b,
0x53, 0x70, 0x65, 0x63, 0x69, 0x65, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x03, 0x69,
0x64, 0x73, 0x12, 0x0d, 0x70, 0x2e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x65, 0x73, 0x5f, 0x69, 0x64,
0x73, 0x0a, 0x2f, 0x0a, 0x09, 0x73, 0x74, 0x61, 0x72, 0x73, 0x68, 0x69, 0x70, 0x73, 0x6a, 0x22,
0x0a, 0x09, 0x53, 0x74, 0x61, 0x72, 0x73, 0x68, 0x69, 0x70, 0x73, 0x12, 0x15, 0x0a, 0x03, 0x69,
0x64, 0x73, 0x12, 0x0e, 0x70, 0x2e, 0x73, 0x74, 0x61, 0x72, 0x73, 0x68, 0x69, 0x70, 0x5f, 0x69,
0x64, 0x73, 0x0a, 0x25, 0x0a, 0x01, 0x76, 0x6a, 0x20, 0x0a, 0x08, 0x56, 0x65, 0x68, 0x69, 0x63,
0x6c, 0x65, 0x73, 0x12, 0x14, 0x0a, 0x03, 0x69, 0x64, 0x73, 0x12, 0x0d, 0x70, 0x2e, 0x76, 0x65,
0x68, 0x69, 0x63, 0x6c, 0x65, 0x5f, 0x69, 0x64, 0x73, 0x22, 0x25, 0x0a, 0x11, 0x4c, 0x69, 0x73,
0x74, 0x50, 0x65, 0x6f, 0x70, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x10,
0x0a, 0x03, 0x69, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x03, 0x52, 0x03, 0x69, 0x64, 0x73,
0x22, 0x69, 0x0a, 0x0f, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x65, 0x6f, 0x70, 0x6c, 0x65, 0x52, 0x65,
0x70, 0x6c, 0x79, 0x12, 0x34, 0x0a, 0x06, 0x70, 0x65, 0x6f, 0x70, 0x6c, 0x65, 0x18, 0x01, 0x20,
0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x73, 0x77, 0x61, 0x70, 0x69, 0x2e, 0x50, 0x65, 0x72, 0x73,
0x6f, 0x6e, 0x42, 0x0d, 0x9a, 0x4a, 0x0a, 0x12, 0x08, 0x70, 0x2e, 0x70, 0x65, 0x6f, 0x70, 0x6c,
0x65, 0x52, 0x06, 0x70, 0x65, 0x6f, 0x70, 0x6c, 0x65, 0x3a, 0x20, 0x9a, 0x4a, 0x1d, 0x0a, 0x1b,
0x0a, 0x01, 0x70, 0x6a, 0x16, 0x0a, 0x06, 0x50, 0x65, 0x6f, 0x70, 0x6c, 0x65, 0x12, 0x0c, 0x0a,
0x03, 0x69, 0x64, 0x73, 0x12, 0x05, 0x24, 0x2e, 0x69, 0x64, 0x73, 0x22, 0x20, 0x0a, 0x0e, 0x47,
0x65, 0x74, 0x46, 0x69, 0x6c, 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a,
0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x22, 0xb1, 0x05,
0x0a, 0x0c, 0x47, 0x65, 0x74, 0x46, 0x69, 0x6c, 0x6d, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x27,
0x0a, 0x04, 0x66, 0x69, 0x6c, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x73,
0x77, 0x61, 0x70, 0x69, 0x2e, 0x46, 0x69, 0x6c, 0x6d, 0x42, 0x06, 0x9a, 0x4a, 0x03, 0x12, 0x01,
0x66, 0x52, 0x04, 0x66, 0x69, 0x6c, 0x6d, 0x12, 0x3e, 0x0a, 0x07, 0x73, 0x70, 0x65, 0x63, 0x69,
0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x73, 0x77, 0x61, 0x70, 0x69,
0x2e, 0x53, 0x70, 0x65, 0x63, 0x69, 0x65, 0x73, 0x42, 0x14, 0x9a, 0x4a, 0x11, 0x12, 0x0f, 0x73,
0x70, 0x65, 0x63, 0x69, 0x65, 0x73, 0x2e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x65, 0x73, 0x52, 0x07,
0x73, 0x70, 0x65, 0x63, 0x69, 0x65, 0x73, 0x12, 0x47, 0x0a, 0x09, 0x73, 0x74, 0x61, 0x72, 0x73,
0x68, 0x69, 0x70, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x73, 0x77, 0x61,
0x70, 0x69, 0x2e, 0x53, 0x74, 0x61, 0x72, 0x73, 0x68, 0x69, 0x70, 0x42, 0x18, 0x9a, 0x4a, 0x15,
0x12, 0x13, 0x73, 0x74, 0x61, 0x72, 0x73, 0x68, 0x69, 0x70, 0x73, 0x2e, 0x73, 0x74, 0x61, 0x72,
0x73, 0x68, 0x69, 0x70, 0x73, 0x52, 0x09, 0x73, 0x74, 0x61, 0x72, 0x73, 0x68, 0x69, 0x70, 0x73,
0x12, 0x3b, 0x0a, 0x08, 0x76, 0x65, 0x68, 0x69, 0x63, 0x6c, 0x65, 0x73, 0x18, 0x04, 0x20, 0x03,
0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x73, 0x77, 0x61, 0x70, 0x69, 0x2e, 0x56, 0x65, 0x68, 0x69, 0x63,
0x6c, 0x65, 0x42, 0x0f, 0x9a, 0x4a, 0x0c, 0x12, 0x0a, 0x76, 0x2e, 0x76, 0x65, 0x68, 0x69, 0x63,
0x6c, 0x65, 0x73, 0x52, 0x08, 0x76, 0x65, 0x68, 0x69, 0x63, 0x6c, 0x65, 0x73, 0x12, 0x45, 0x0a,
0x0a, 0x63, 0x68, 0x61, 0x72, 0x61, 0x63, 0x74, 0x65, 0x72, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28,
0x0b, 0x32, 0x0d, 0x2e, 0x73, 0x77, 0x61, 0x70, 0x69, 0x2e, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e,
0x42, 0x16, 0x9a, 0x4a, 0x13, 0x12, 0x11, 0x63, 0x68, 0x61, 0x72, 0x61, 0x63, 0x74, 0x65, 0x72,
0x73, 0x2e, 0x70, 0x65, 0x6f, 0x70, 0x6c, 0x65, 0x52, 0x0a, 0x63, 0x68, 0x61, 0x72, 0x61, 0x63,
0x74, 0x65, 0x72, 0x73, 0x12, 0x3d, 0x0a, 0x07, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x74, 0x73, 0x18,
0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x73, 0x77, 0x61, 0x70, 0x69, 0x2e, 0x50, 0x6c,
0x61, 0x6e, 0x65, 0x74, 0x42, 0x14, 0x9a, 0x4a, 0x11, 0x12, 0x0f, 0x70, 0x6c, 0x61, 0x6e, 0x65,
0x74, 0x73, 0x2e, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x74, 0x73, 0x52, 0x07, 0x70, 0x6c, 0x61, 0x6e,
0x65, 0x74, 0x73, 0x3a, 0xab, 0x02, 0x9a, 0x4a, 0xa7, 0x02, 0x0a, 0x33, 0x0a, 0x03, 0x72, 0x65,
0x73, 0x72, 0x2c, 0x0a, 0x1e, 0x73, 0x77, 0x61, 0x70, 0x69, 0x2e, 0x66, 0x69, 0x6c, 0x6d, 0x2e,
0x46, 0x69, 0x6c, 0x6d, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x47, 0x65, 0x74, 0x46,
0x69, 0x6c, 0x6d, 0x12, 0x0a, 0x0a, 0x02, 0x69, 0x64, 0x12, 0x04, 0x24, 0x2e, 0x69, 0x64, 0x0a,
0x0d, 0x0a, 0x01, 0x66, 0x5a, 0x08, 0x72, 0x65, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x6d, 0x0a, 0x2e,
0x0a, 0x07, 0x73, 0x70, 0x65, 0x63, 0x69, 0x65, 0x73, 0x6a, 0x23, 0x0a, 0x0b, 0x53, 0x70, 0x65,
0x63, 0x69, 0x65, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x03, 0x69, 0x64, 0x73, 0x12,
0x0d, 0x66, 0x2e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x65, 0x73, 0x5f, 0x69, 0x64, 0x73, 0x0a, 0x2f,
0x0a, 0x09, 0x73, 0x74, 0x61, 0x72, 0x73, 0x68, 0x69, 0x70, 0x73, 0x6a, 0x22, 0x0a, 0x09, 0x53,
0x74, 0x61, 0x72, 0x73, 0x68, 0x69, 0x70, 0x73, 0x12, 0x15, 0x0a, 0x03, 0x69, 0x64, 0x73, 0x12,
0x0e, 0x66, 0x2e, 0x73, 0x74, 0x61, 0x72, 0x73, 0x68, 0x69, 0x70, 0x5f, 0x69, 0x64, 0x73, 0x0a,
0x25, 0x0a, 0x01, 0x76, 0x6a, 0x20, 0x0a, 0x08, 0x56, 0x65, 0x68, 0x69, 0x63, 0x6c, 0x65, 0x73,
0x12, 0x14, 0x0a, 0x03, 0x69, 0x64, 0x73, 0x12, 0x0d, 0x66, 0x2e, 0x76, 0x65, 0x68, 0x69, 0x63,
0x6c, 0x65, 0x5f, 0x69, 0x64, 0x73, 0x0a, 0x2e, 0x0a, 0x0a, 0x63, 0x68, 0x61, 0x72, 0x61, 0x63,
0x74, 0x65, 0x72, 0x73, 0x6a, 0x20, 0x0a, 0x06, 0x50, 0x65, 0x6f, 0x70, 0x6c, 0x65, 0x12, 0x16,
0x0a, 0x03, 0x69, 0x64, 0x73, 0x12, 0x0f, 0x66, 0x2e, 0x63, 0x68, 0x61, 0x72, 0x61, 0x63, 0x74,
0x65, 0x72, 0x5f, 0x69, 0x64, 0x73, 0x0a, 0x29, 0x0a, 0x07, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x74,
0x73, 0x6a, 0x1e, 0x0a, 0x07, 0x50, 0x6c, 0x61, 0x6e, 0x65, 0x74, 0x73, 0x12, 0x13, 0x0a, 0x03,
0x69, 0x64, 0x73, 0x12, 0x0c, 0x66, 0x2e, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x74, 0x5f, 0x69, 0x64,
0x73, 0x22, 0x24, 0x0a, 0x10, 0x4c, 0x69, 0x73, 0x74, 0x46, 0x69, 0x6c, 0x6d, 0x73, 0x52, 0x65,
0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x69, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03,
0x28, 0x03, 0x52, 0x03, 0x69, 0x64, 0x73, 0x22, 0x62, 0x0a, 0x0e, 0x4c, 0x69, 0x73, 0x74, 0x46,
0x69, 0x6c, 0x6d, 0x73, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x2f, 0x0a, 0x05, 0x66, 0x69, 0x6c,
0x6d, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x73, 0x77, 0x61, 0x70, 0x69,
0x2e, 0x46, 0x69, 0x6c, 0x6d, 0x42, 0x0c, 0x9a, 0x4a, 0x09, 0x12, 0x07, 0x66, 0x2e, 0x66, 0x69,
0x6c, 0x6d, 0x73, 0x52, 0x05, 0x66, 0x69, 0x6c, 0x6d, 0x73, 0x3a, 0x1f, 0x9a, 0x4a, 0x1c, 0x0a,
0x1a, 0x0a, 0x01, 0x66, 0x6a, 0x15, 0x0a, 0x05, 0x46, 0x69, 0x6c, 0x6d, 0x73, 0x12, 0x0c, 0x0a,
0x03, 0x69, 0x64, 0x73, 0x12, 0x05, 0x24, 0x2e, 0x69, 0x64, 0x73, 0x22, 0x23, 0x0a, 0x11, 0x47,
0x65, 0x74, 0x56, 0x65, 0x68, 0x69, 0x63, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64,
0x22, 0xc5, 0x02, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x56, 0x65, 0x68, 0x69, 0x63, 0x6c, 0x65, 0x52,
0x65, 0x70, 0x6c, 0x79, 0x12, 0x30, 0x0a, 0x07, 0x76, 0x65, 0x68, 0x69, 0x63, 0x6c, 0x65, 0x18,
0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x73, 0x77, 0x61, 0x70, 0x69, 0x2e, 0x56, 0x65,
0x68, 0x69, 0x63, 0x6c, 0x65, 0x42, 0x06, 0x9a, 0x4a, 0x03, 0x12, 0x01, 0x76, 0x52, 0x07, 0x76,
0x65, 0x68, 0x69, 0x63, 0x6c, 0x65, 0x12, 0x2f, 0x0a, 0x05, 0x66, 0x69, 0x6c, 0x6d, 0x73, 0x18,
0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x73, 0x77, 0x61, 0x70, 0x69, 0x2e, 0x46, 0x69,
0x6c, 0x6d, 0x42, 0x0c, 0x9a, 0x4a, 0x09, 0x12, 0x07, 0x66, 0x2e, 0x66, 0x69, 0x6c, 0x6d, 0x73,
0x52, 0x05, 0x66, 0x69, 0x6c, 0x6d, 0x73, 0x12, 0x34, 0x0a, 0x06, 0x70, 0x69, 0x6c, 0x6f, 0x74,
0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x73, 0x77, 0x61, 0x70, 0x69, 0x2e,
0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x42, 0x0d, 0x9a, 0x4a, 0x0a, 0x12, 0x08, 0x70, 0x2e, 0x70,
0x65, 0x6f, 0x70, 0x6c, 0x65, 0x52, 0x06, 0x70, 0x69, 0x6c, 0x6f, 0x74, 0x73, 0x3a, 0x98, 0x01,
0x9a, 0x4a, 0x94, 0x01, 0x0a, 0x3c, 0x0a, 0x03, 0x72, 0x65, 0x73, 0x72, 0x35, 0x0a, 0x27, 0x73,
0x77, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x65, 0x68, 0x69, 0x63, 0x6c, 0x65, 0x2e, 0x56, 0x65, 0x68,
0x69, 0x63, 0x6c, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x47, 0x65, 0x74, 0x56,
0x65, 0x68, 0x69, 0x63, 0x6c, 0x65, 0x12, 0x0a, 0x0a, 0x02, 0x69, 0x64, 0x12, 0x04, 0x24, 0x2e,
0x69, 0x64, 0x0a, 0x10, 0x0a, 0x01, 0x76, 0x5a, 0x0b, 0x72, 0x65, 0x73, 0x2e, 0x76, 0x65, 0x68,
0x69, 0x63, 0x6c, 0x65, 0x0a, 0x1f, 0x0a, 0x01, 0x66, 0x6a, 0x1a, 0x0a, 0x05, 0x46, 0x69, 0x6c,
0x6d, 0x73, 0x12, 0x11, 0x0a, 0x03, 0x69, 0x64, 0x73, 0x12, 0x0a, 0x76, 0x2e, 0x66, 0x69, 0x6c,
0x6d, 0x5f, 0x69, 0x64, 0x73, 0x0a, 0x21, 0x0a, 0x01, 0x70, 0x6a, 0x1c, 0x0a, 0x06, 0x50, 0x65,
0x6f, 0x70, 0x6c, 0x65, 0x12, 0x12, 0x0a, 0x03, 0x69, 0x64, 0x73, 0x12, 0x0b, 0x76, 0x2e, 0x70,
0x69, 0x6c, 0x6f, 0x74, 0x5f, 0x69, 0x64, 0x73, 0x22, 0x27, 0x0a, 0x13, 0x4c, 0x69, 0x73, 0x74,
0x56, 0x65, 0x68, 0x69, 0x63, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12,
0x10, 0x0a, 0x03, 0x69, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x03, 0x52, 0x03, 0x69, 0x64,
0x73, 0x22, 0x74, 0x0a, 0x11, 0x4c, 0x69, 0x73, 0x74, 0x56, 0x65, 0x68, 0x69, 0x63, 0x6c, 0x65,
0x73, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x3b, 0x0a, 0x08, 0x76, 0x65, 0x68, 0x69, 0x63, 0x6c,
0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x73, 0x77, 0x61, 0x70, 0x69,
0x2e, 0x56, 0x65, 0x68, 0x69, 0x63, 0x6c, 0x65, 0x42, 0x0f, 0x9a, 0x4a, 0x0c, 0x12, 0x0a, 0x76,
0x2e, 0x76, 0x65, 0x68, 0x69, 0x63, 0x6c, 0x65, 0x73, 0x52, 0x08, 0x76, 0x65, 0x68, 0x69, 0x63,
0x6c, 0x65, 0x73, 0x3a, 0x22, 0x9a, 0x4a, 0x1f, 0x0a, 0x1d, 0x0a, 0x01, 0x76, 0x6a, 0x18, 0x0a,
0x08, 0x56, 0x65, 0x68, 0x69, 0x63, 0x6c, 0x65, 0x73, 0x12, 0x0c, 0x0a, 0x03, 0x69, 0x64, 0x73,
0x12, 0x05, 0x24, 0x2e, 0x69, 0x64, 0x73, 0x22, 0x23, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x53, 0x70,
0x65, 0x63, 0x69, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02,
0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x22, 0xc6, 0x02, 0x0a,
0x0f, 0x47, 0x65, 0x74, 0x53, 0x70, 0x65, 0x63, 0x69, 0x65, 0x73, 0x52, 0x65, 0x70, 0x6c, 0x79,
0x12, 0x30, 0x0a, 0x07, 0x73, 0x70, 0x65, 0x63, 0x69, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28,
0x0b, 0x32, 0x0e, 0x2e, 0x73, 0x77, 0x61, 0x70, 0x69, 0x2e, 0x53, 0x70, 0x65, 0x63, 0x69, 0x65,
0x73, 0x42, 0x06, 0x9a, 0x4a, 0x03, 0x12, 0x01, 0x73, 0x52, 0x07, 0x73, 0x70, 0x65, 0x63, 0x69,
0x65, 0x73, 0x12, 0x34, 0x0a, 0x06, 0x70, 0x65, 0x6f, 0x70, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x03,
0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x73, 0x77, 0x61, 0x70, 0x69, 0x2e, 0x50, 0x65, 0x72, 0x73, 0x6f,
0x6e, 0x42, 0x0d, 0x9a, 0x4a, 0x0a, 0x12, 0x08, 0x70, 0x2e, 0x70, 0x65, 0x6f, 0x70, 0x6c, 0x65,
0x52, 0x06, 0x70, 0x65, 0x6f, 0x70, 0x6c, 0x65, 0x12, 0x2f, 0x0a, 0x05, 0x66, 0x69, 0x6c, 0x6d,
0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x73, 0x77, 0x61, 0x70, 0x69, 0x2e,
0x46, 0x69, 0x6c, 0x6d, 0x42, 0x0c, 0x9a, 0x4a, 0x09, 0x12, 0x07, 0x66, 0x2e, 0x66, 0x69, 0x6c,
0x6d, 0x73, 0x52, 0x05, 0x66, 0x69, 0x6c, 0x6d, 0x73, 0x3a, 0x99, 0x01, 0x9a, 0x4a, 0x95, 0x01,
0x0a, 0x3c, 0x0a, 0x03, 0x72, 0x65, 0x73, 0x72, 0x35, 0x0a, 0x27, 0x73, 0x77, 0x61, 0x70, 0x69,
0x2e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x65, 0x73, 0x2e, 0x53, 0x70, 0x65, 0x63, 0x69, 0x65, 0x73,
0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x47, 0x65, 0x74, 0x53, 0x70, 0x65, 0x63, 0x69,
0x65, 0x73, 0x12, 0x0a, 0x0a, 0x02, 0x69, 0x64, 0x12, 0x04, 0x24, 0x2e, 0x69, 0x64, 0x0a, 0x10,
0x0a, 0x01, 0x73, 0x5a, 0x0b, 0x72, 0x65, 0x73, 0x2e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x65, 0x73,
0x0a, 0x1f, 0x0a, 0x01, 0x66, 0x6a, 0x1a, 0x0a, 0x05, 0x46, 0x69, 0x6c, 0x6d, 0x73, 0x12, 0x11,
0x0a, 0x03, 0x69, 0x64, 0x73, 0x12, 0x0a, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x6d, 0x5f, 0x69, 0x64,
0x73, 0x0a, 0x22, 0x0a, 0x01, 0x70, 0x6a, 0x1d, 0x0a, 0x06, 0x50, 0x65, 0x6f, 0x70, 0x6c, 0x65,
0x12, 0x13, 0x0a, 0x03, 0x69, 0x64, 0x73, 0x12, 0x0c, 0x73, 0x2e, 0x70, 0x65, 0x72, 0x73, 0x6f,
0x6e, 0x5f, 0x69, 0x64, 0x73, 0x22, 0x26, 0x0a, 0x12, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x70, 0x65,
0x63, 0x69, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x69,
0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x03, 0x52, 0x03, 0x69, 0x64, 0x73, 0x22, 0x73, 0x0a,
0x10, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x70, 0x65, 0x63, 0x69, 0x65, 0x73, 0x52, 0x65, 0x70, 0x6c,
0x79, 0x12, 0x38, 0x0a, 0x07, 0x73, 0x70, 0x65, 0x63, 0x69, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03,
0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x73, 0x77, 0x61, 0x70, 0x69, 0x2e, 0x53, 0x70, 0x65, 0x63, 0x69,
0x65, 0x73, 0x42, 0x0e, 0x9a, 0x4a, 0x0b, 0x12, 0x09, 0x73, 0x2e, 0x73, 0x70, 0x65, 0x63, 0x69,
0x65, 0x73, 0x52, 0x07, 0x73, 0x70, 0x65, 0x63, 0x69, 0x65, 0x73, 0x3a, 0x25, 0x9a, 0x4a, 0x22,
0x0a, 0x20, 0x0a, 0x01, 0x73, 0x6a, 0x1b, 0x0a, 0x0b, 0x53, 0x70, 0x65, 0x63, 0x69, 0x65, 0x73,
0x4c, 0x69, 0x73, 0x74, 0x12, 0x0c, 0x0a, 0x03, 0x69, 0x64, 0x73, 0x12, 0x05, 0x24, 0x2e, 0x69,
0x64, 0x73, 0x22, 0x24, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x72, 0x73, 0x68, 0x69,
0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01,
0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x22, 0xcd, 0x02, 0x0a, 0x10, 0x47, 0x65, 0x74,
0x53, 0x74, 0x61, 0x72, 0x73, 0x68, 0x69, 0x70, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x33, 0x0a,
0x08, 0x73, 0x74, 0x61, 0x72, 0x73, 0x68, 0x69, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32,
0x0f, 0x2e, 0x73, 0x77, 0x61, 0x70, 0x69, 0x2e, 0x53, 0x74, 0x61, 0x72, 0x73, 0x68, 0x69, 0x70,
0x42, 0x06, 0x9a, 0x4a, 0x03, 0x12, 0x01, 0x73, 0x52, 0x08, 0x73, 0x74, 0x61, 0x72, 0x73, 0x68,
0x69, 0x70, 0x12, 0x2f, 0x0a, 0x05, 0x66, 0x69, 0x6c, 0x6d, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28,
0x0b, 0x32, 0x0b, 0x2e, 0x73, 0x77, 0x61, 0x70, 0x69, 0x2e, 0x46, 0x69, 0x6c, 0x6d, 0x42, 0x0c,
0x9a, 0x4a, 0x09, 0x12, 0x07, 0x66, 0x2e, 0x66, 0x69, 0x6c, 0x6d, 0x73, 0x52, 0x05, 0x66, 0x69,
0x6c, 0x6d, 0x73, 0x12, 0x34, 0x0a, 0x06, 0x70, 0x69, 0x6c, 0x6f, 0x74, 0x73, 0x18, 0x03, 0x20,
0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x73, 0x77, 0x61, 0x70, 0x69, 0x2e, 0x50, 0x65, 0x72, 0x73,
0x6f, 0x6e, 0x42, 0x0d, 0x9a, 0x4a, 0x0a, 0x12, 0x08, 0x70, 0x2e, 0x70, 0x65, 0x6f, 0x70, 0x6c,
0x65, 0x52, 0x06, 0x70, 0x69, 0x6c, 0x6f, 0x74, 0x73, 0x3a, 0x9c, 0x01, 0x9a, 0x4a, 0x98, 0x01,
0x0a, 0x3f, 0x0a, 0x03, 0x72, 0x65, 0x73, 0x72, 0x38, 0x0a, 0x2a, 0x73, 0x77, 0x61, 0x70, 0x69,
0x2e, 0x73, 0x74, 0x61, 0x72, 0x73, 0x68, 0x69, 0x70, 0x2e, 0x53, 0x74, 0x61, 0x72, 0x73, 0x68,
0x69, 0x70, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61,
0x72, 0x73, 0x68, 0x69, 0x70, 0x12, 0x0a, 0x0a, 0x02, 0x69, 0x64, 0x12, 0x04, 0x24, 0x2e, 0x69,
0x64, 0x0a, 0x11, 0x0a, 0x01, 0x73, 0x5a, 0x0c, 0x72, 0x65, 0x73, 0x2e, 0x73, 0x74, 0x61, 0x72,
0x73, 0x68, 0x69, 0x70, 0x0a, 0x1f, 0x0a, 0x01, 0x66, 0x6a, 0x1a, 0x0a, 0x05, 0x46, 0x69, 0x6c,
0x6d, 0x73, 0x12, 0x11, 0x0a, 0x03, 0x69, 0x64, 0x73, 0x12, 0x0a, 0x73, 0x2e, 0x66, 0x69, 0x6c,
0x6d, 0x5f, 0x69, 0x64, 0x73, 0x0a, 0x21, 0x0a, 0x01, 0x70, 0x6a, 0x1c, 0x0a, 0x06, 0x50, 0x65,
0x6f, 0x70, 0x6c, 0x65, 0x12, 0x12, 0x0a, 0x03, 0x69, 0x64, 0x73, 0x12, 0x0b, 0x73, 0x2e, 0x70,
0x69, 0x6c, 0x6f, 0x74, 0x5f, 0x69, 0x64, 0x73, 0x22, 0x28, 0x0a, 0x14, 0x4c, 0x69, 0x73, 0x74,
0x53, 0x74, 0x61, 0x72, 0x73, 0x68, 0x69, 0x70, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
0x12, 0x10, 0x0a, 0x03, 0x69, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x03, 0x52, 0x03, 0x69,
0x64, 0x73, 0x22, 0x7a, 0x0a, 0x12, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x74, 0x61, 0x72, 0x73, 0x68,
0x69, 0x70, 0x73, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x3f, 0x0a, 0x09, 0x73, 0x74, 0x61, 0x72,
0x73, 0x68, 0x69, 0x70, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x73, 0x77,
0x61, 0x70, 0x69, 0x2e, 0x53, 0x74, 0x61, 0x72, 0x73, 0x68, 0x69, 0x70, 0x42, 0x10, 0x9a, 0x4a,
0x0d, 0x12, 0x0b, 0x73, 0x2e, 0x73, 0x74, 0x61, 0x72, 0x73, 0x68, 0x69, 0x70, 0x73, 0x52, 0x09,
0x73, 0x74, 0x61, 0x72, 0x73, 0x68, 0x69, 0x70, 0x73, 0x3a, 0x23, 0x9a, 0x4a, 0x20, 0x0a, 0x1e,
0x0a, 0x01, 0x73, 0x6a, 0x19, 0x0a, 0x09, 0x53, 0x74, 0x61, 0x72, 0x73, 0x68, 0x69, 0x70, 0x73,
0x12, 0x0c, 0x0a, 0x03, 0x69, 0x64, 0x73, 0x12, 0x05, 0x24, 0x2e, 0x69, 0x64, 0x73, 0x22, 0x22,
0x0a, 0x10, 0x47, 0x65, 0x74, 0x50, 0x6c, 0x61, 0x6e, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65,
0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02,
0x69, 0x64, 0x22, 0xd6, 0x02, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x50, 0x6c, 0x61, 0x6e, 0x65, 0x74,
0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x2d, 0x0a, 0x06, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x74, 0x18,
0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x73, 0x77, 0x61, 0x70, 0x69, 0x2e, 0x50, 0x6c,
0x61, 0x6e, 0x65, 0x74, 0x42, 0x06, 0x9a, 0x4a, 0x03, 0x12, 0x01, 0x70, 0x52, 0x06, 0x70, 0x6c,
0x61, 0x6e, 0x65, 0x74, 0x12, 0x42, 0x0a, 0x09, 0x72, 0x65, 0x73, 0x69, 0x64, 0x65, 0x6e, 0x74,
0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x73, 0x77, 0x61, 0x70, 0x69, 0x2e,
0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x42, 0x15, 0x9a, 0x4a, 0x12, 0x12, 0x10, 0x72, 0x65, 0x73,
0x69, 0x64, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x70, 0x65, 0x6f, 0x70, 0x6c, 0x65, 0x52, 0x09, 0x72,
0x65, 0x73, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x2f, 0x0a, 0x05, 0x66, 0x69, 0x6c, 0x6d,
0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x73, 0x77, 0x61, 0x70, 0x69, 0x2e,
0x46, 0x69, 0x6c, 0x6d, 0x42, 0x0c, 0x9a, 0x4a, 0x09, 0x12, 0x07, 0x66, 0x2e, 0x66, 0x69, 0x6c,
0x6d, 0x73, 0x52, 0x05, 0x66, 0x69, 0x6c, 0x6d, 0x73, 0x3a, 0x9f, 0x01, 0x9a, 0x4a, 0x9b, 0x01,
0x0a, 0x39, 0x0a, 0x03, 0x72, 0x65, 0x73, 0x72, 0x32, 0x0a, 0x24, 0x73, 0x77, 0x61, 0x70, 0x69,
0x2e, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x74, 0x2e, 0x50, 0x6c, 0x61, 0x6e, 0x65, 0x74, 0x53, 0x65,
0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x47, 0x65, 0x74, 0x50, 0x6c, 0x61, 0x6e, 0x65, 0x74, 0x12,
0x0a, 0x0a, 0x02, 0x69, 0x64, 0x12, 0x04, 0x24, 0x2e, 0x69, 0x64, 0x0a, 0x0f, 0x0a, 0x01, 0x70,
0x5a, 0x0a, 0x72, 0x65, 0x73, 0x2e, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x74, 0x0a, 0x2c, 0x0a, 0x09,
0x72, 0x65, 0x73, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x73, 0x6a, 0x1f, 0x0a, 0x06, 0x50, 0x65, 0x6f,
0x70, 0x6c, 0x65, 0x12, 0x15, 0x0a, 0x03, 0x69, 0x64, 0x73, 0x12, 0x0e, 0x70, 0x2e, 0x72, 0x65,
0x73, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x73, 0x0a, 0x1f, 0x0a, 0x01, 0x66, 0x6a,
0x1a, 0x0a, 0x05, 0x46, 0x69, 0x6c, 0x6d, 0x73, 0x12, 0x11, 0x0a, 0x03, 0x69, 0x64, 0x73, 0x12,
0x0a, 0x70, 0x2e, 0x66, 0x69, 0x6c, 0x6d, 0x5f, 0x69, 0x64, 0x73, 0x22, 0x26, 0x0a, 0x12, 0x4c,
0x69, 0x73, 0x74, 0x50, 0x6c, 0x61, 0x6e, 0x65, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
0x74, 0x12, 0x10, 0x0a, 0x03, 0x69, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x03, 0x52, 0x03,
0x69, 0x64, 0x73, 0x22, 0x6e, 0x0a, 0x10, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x6c, 0x61, 0x6e, 0x65,
0x74, 0x73, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x37, 0x0a, 0x07, 0x70, 0x6c, 0x61, 0x6e, 0x65,
0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x73, 0x77, 0x61, 0x70, 0x69,
0x2e, 0x50, 0x6c, 0x61, 0x6e, 0x65, 0x74, 0x42, 0x0e, 0x9a, 0x4a, 0x0b, 0x12, 0x09, 0x70, 0x2e,
0x70, 0x6c, 0x61, 0x6e, 0x65, 0x74, 0x73, 0x52, 0x07, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x74, 0x73,
0x3a, 0x21, 0x9a, 0x4a, 0x1e, 0x0a, 0x1c, 0x0a, 0x01, 0x70, 0x6a, 0x17, 0x0a, 0x07, 0x50, 0x6c,
0x61, 0x6e, 0x65, 0x74, 0x73, 0x12, 0x0c, 0x0a, 0x03, 0x69, 0x64, 0x73, 0x12, 0x05, 0x24, 0x2e,
0x69, 0x64, 0x73, 0x22, 0xe6, 0x03, 0x0a, 0x06, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x12, 0x0e,
0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12,
0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61,
0x6d, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x62, 0x69, 0x72, 0x74, 0x68, 0x5f, 0x79, 0x65, 0x61, 0x72,
0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x62, 0x69, 0x72, 0x74, 0x68, 0x59, 0x65, 0x61,
0x72, 0x12, 0x1b, 0x0a, 0x09, 0x65, 0x79, 0x65, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x18, 0x04,
0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x65, 0x79, 0x65, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x12, 0x16,
0x0a, 0x06, 0x67, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06,
0x67, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x12, 0x1d, 0x0a, 0x0a, 0x68, 0x61, 0x69, 0x72, 0x5f, 0x63,
0x6f, 0x6c, 0x6f, 0x72, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x68, 0x61, 0x69, 0x72,
0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18,
0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x12, 0x0a,
0x04, 0x6d, 0x61, 0x73, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6d, 0x61, 0x73,
0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x6b, 0x69, 0x6e, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x18,
0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x6b, 0x69, 0x6e, 0x43, 0x6f, 0x6c, 0x6f, 0x72,
0x12, 0x1c, 0x0a, 0x09, 0x68, 0x6f, 0x6d, 0x65, 0x77, 0x6f, 0x72, 0x6c, 0x64, 0x18, 0x0a, 0x20,
0x01, 0x28, 0x09, 0x52, 0x09, 0x68, 0x6f, 0x6d, 0x65, 0x77, 0x6f, 0x72, 0x6c, 0x64, 0x12, 0x10,
0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6c,
0x12, 0x18, 0x0a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x18, 0x0c, 0x20, 0x01, 0x28,
0x09, 0x52, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x65, 0x64,
0x69, 0x74, 0x65, 0x64, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x65, 0x64, 0x69, 0x74,
0x65, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x66, 0x69, 0x6c, 0x6d, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x0e,
0x20, 0x03, 0x28, 0x03, 0x52, 0x07, 0x66, 0x69, 0x6c, 0x6d, 0x49, 0x64, 0x73, 0x12, 0x1f, 0x0a,
0x0b, 0x73, 0x70, 0x65, 0x63, 0x69, 0x65, 0x73, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x0f, 0x20, 0x03,
0x28, 0x03, 0x52, 0x0a, 0x73, 0x70, 0x65, 0x63, 0x69, 0x65, 0x73, 0x49, 0x64, 0x73, 0x12, 0x21,
0x0a, 0x0c, 0x73, 0x74, 0x61, 0x72, 0x73, 0x68, 0x69, 0x70, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x10,
0x20, 0x03, 0x28, 0x03, 0x52, 0x0b, 0x73, 0x74, 0x61, 0x72, 0x73, 0x68, 0x69, 0x70, 0x49, 0x64,
0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x76, 0x65, 0x68, 0x69, 0x63, 0x6c, 0x65, 0x5f, 0x69, 0x64, 0x73,
0x18, 0x11, 0x20, 0x03, 0x28, 0x03, 0x52, 0x0a, 0x76, 0x65, 0x68, 0x69, 0x63, 0x6c, 0x65, 0x49,
0x64, 0x73, 0x3a, 0x18, 0x9a, 0x4a, 0x15, 0x1a, 0x13, 0x73, 0x77, 0x61, 0x70, 0x69, 0x2e, 0x70,
0x65, 0x72, 0x73, 0x6f, 0x6e, 0x2e, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x22, 0x83, 0x01, 0x0a,
0x06, 0x50, 0x65, 0x6f, 0x70, 0x6c, 0x65, 0x12, 0x36, 0x0a, 0x06, 0x70, 0x65, 0x6f, 0x70, 0x6c,
0x65, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x73, 0x77, 0x61, 0x70, 0x69, 0x2e,
0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x42, 0x0f, 0x9a, 0x4a, 0x0c, 0x12, 0x0a, 0x72, 0x65, 0x73,
0x2e, 0x70, 0x65, 0x6f, 0x70, 0x6c, 0x65, 0x52, 0x06, 0x70, 0x65, 0x6f, 0x70, 0x6c, 0x65, 0x3a,
0x41, 0x9a, 0x4a, 0x3e, 0x0a, 0x3c, 0x0a, 0x03, 0x72, 0x65, 0x73, 0x72, 0x35, 0x0a, 0x25, 0x73,
0x77, 0x61, 0x70, 0x69, 0x2e, 0x70, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x2e, 0x50, 0x65, 0x72, 0x73,
0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x65,
0x6f, 0x70, 0x6c, 0x65, 0x12, 0x0c, 0x0a, 0x03, 0x69, 0x64, 0x73, 0x12, 0x05, 0x24, 0x2e, 0x69,
0x64, 0x73, 0x22, 0xe1, 0x03, 0x0a, 0x04, 0x46, 0x69, 0x6c, 0x6d, 0x12, 0x0e, 0x0a, 0x02, 0x69,
0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 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, 0x1d, 0x0a, 0x0a, 0x65, 0x70, 0x69, 0x73, 0x6f, 0x64, 0x65, 0x5f, 0x69, 0x64, 0x18,
0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x65, 0x70, 0x69, 0x73, 0x6f, 0x64, 0x65, 0x49, 0x64,
0x12, 0x23, 0x0a, 0x0d, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x63, 0x72, 0x61, 0x77,
0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6e, 0x67,
0x43, 0x72, 0x61, 0x77, 0x6c, 0x12, 0x1a, 0x0a, 0x08, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x6f,
0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x6f,
0x72, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x65, 0x72, 0x18, 0x06, 0x20,
0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x65, 0x72, 0x12, 0x34, 0x0a,
0x0c, 0x72, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x5f, 0x64, 0x61, 0x74, 0x65, 0x18, 0x07, 0x20,
0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x74, 0x79, 0x70,
0x65, 0x2e, 0x44, 0x61, 0x74, 0x65, 0x52, 0x0b, 0x72, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x44,
0x61, 0x74, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09,
0x52, 0x03, 0x75, 0x72, 0x6c, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64,
0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x12,
0x16, 0x0a, 0x06, 0x65, 0x64, 0x69, 0x74, 0x65, 0x64, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52,
0x06, 0x65, 0x64, 0x69, 0x74, 0x65, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x70, 0x65, 0x63, 0x69,
0x65, 0x73, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x0b, 0x20, 0x03, 0x28, 0x03, 0x52, 0x0a, 0x73, 0x70,
0x65, 0x63, 0x69, 0x65, 0x73, 0x49, 0x64, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x74, 0x61, 0x72,
0x73, 0x68, 0x69, 0x70, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x0c, 0x20, 0x03, 0x28, 0x03, 0x52, 0x0b,
0x73, 0x74, 0x61, 0x72, 0x73, 0x68, 0x69, 0x70, 0x49, 0x64, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x76,
0x65, 0x68, 0x69, 0x63, 0x6c, 0x65, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x0d, 0x20, 0x03, 0x28, 0x03,
0x52, 0x0a, 0x76, 0x65, 0x68, 0x69, 0x63, 0x6c, 0x65, 0x49, 0x64, 0x73, 0x12, 0x23, 0x0a, 0x0d,
0x63, 0x68, 0x61, 0x72, 0x61, 0x63, 0x74, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x0e, 0x20,
0x03, 0x28, 0x03, 0x52, 0x0c, 0x63, 0x68, 0x61, 0x72, 0x61, 0x63, 0x74, 0x65, 0x72, 0x49, 0x64,
0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x73, 0x18,
0x0f, 0x20, 0x03, 0x28, 0x03, 0x52, 0x09, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x74, 0x49, 0x64, 0x73,
0x3a, 0x14, 0x9a, 0x4a, 0x11, 0x1a, 0x0f, 0x73, 0x77, 0x61, 0x70, 0x69, 0x2e, 0x66, 0x69, 0x6c,
0x6d, 0x2e, 0x46, 0x69, 0x6c, 0x6d, 0x22, 0x78, 0x0a, 0x05, 0x46, 0x69, 0x6c, 0x6d, 0x73, 0x12,
0x31, 0x0a, 0x05, 0x66, 0x69, 0x6c, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b,
0x2e, 0x73, 0x77, 0x61, 0x70, 0x69, 0x2e, 0x46, 0x69, 0x6c, 0x6d, 0x42, 0x0e, 0x9a, 0x4a, 0x0b,
0x12, 0x09, 0x72, 0x65, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x6d, 0x73, 0x52, 0x05, 0x66, 0x69, 0x6c,
0x6d, 0x73, 0x3a, 0x3c, 0x9a, 0x4a, 0x39, 0x0a, 0x37, 0x0a, 0x03, 0x72, 0x65, 0x73, 0x72, 0x30,
0x0a, 0x20, 0x73, 0x77, 0x61, 0x70, 0x69, 0x2e, 0x66, 0x69, 0x6c, 0x6d, 0x2e, 0x46, 0x69, 0x6c,
0x6d, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x4c, 0x69, 0x73, 0x74, 0x46, 0x69, 0x6c,
0x6d, 0x73, 0x12, 0x0c, 0x0a, 0x03, 0x69, 0x64, 0x73, 0x12, 0x05, 0x24, 0x2e, 0x69, 0x64, 0x73,
0x22, 0xdd, 0x04, 0x0a, 0x08, 0x53, 0x74, 0x61, 0x72, 0x73, 0x68, 0x69, 0x70, 0x12, 0x0e, 0x0a,
0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a,
0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d,
0x65, 0x12, 0x14, 0x0a, 0x05, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09,
0x52, 0x05, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x12, 0x25, 0x0a, 0x0e, 0x73, 0x74, 0x61, 0x72, 0x73,
0x68, 0x69, 0x70, 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52,
0x0d, 0x73, 0x74, 0x61, 0x72, 0x73, 0x68, 0x69, 0x70, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x12, 0x22,
0x0a, 0x0c, 0x6d, 0x61, 0x6e, 0x75, 0x66, 0x61, 0x63, 0x74, 0x75, 0x72, 0x65, 0x72, 0x18, 0x05,
0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x6d, 0x61, 0x6e, 0x75, 0x66, 0x61, 0x63, 0x74, 0x75, 0x72,
0x65, 0x72, 0x12, 0x26, 0x0a, 0x0f, 0x63, 0x6f, 0x73, 0x74, 0x5f, 0x69, 0x6e, 0x5f, 0x63, 0x72,
0x65, 0x64, 0x69, 0x74, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x63, 0x6f, 0x73,
0x74, 0x49, 0x6e, 0x43, 0x72, 0x65, 0x64, 0x69, 0x74, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x6c, 0x65,
0x6e, 0x67, 0x74, 0x68, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67,
0x74, 0x68, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x72, 0x65, 0x77, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09,
0x52, 0x04, 0x63, 0x72, 0x65, 0x77, 0x12, 0x1e, 0x0a, 0x0a, 0x70, 0x61, 0x73, 0x73, 0x65, 0x6e,
0x67, 0x65, 0x72, 0x73, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x70, 0x61, 0x73, 0x73,
0x65, 0x6e, 0x67, 0x65, 0x72, 0x73, 0x12, 0x34, 0x0a, 0x16, 0x6d, 0x61, 0x78, 0x5f, 0x61, 0x74,
0x6d, 0x6f, 0x73, 0x70, 0x68, 0x65, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x73, 0x70, 0x65, 0x65, 0x64,
0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x14, 0x6d, 0x61, 0x78, 0x41, 0x74, 0x6d, 0x6f, 0x73,
0x70, 0x68, 0x65, 0x72, 0x69, 0x6e, 0x67, 0x53, 0x70, 0x65, 0x65, 0x64, 0x12, 0x2b, 0x0a, 0x11,
0x68, 0x79, 0x70, 0x65, 0x72, 0x64, 0x72, 0x69, 0x76, 0x65, 0x5f, 0x72, 0x61, 0x74, 0x69, 0x6e,
0x67, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x68, 0x79, 0x70, 0x65, 0x72, 0x64, 0x72,
0x69, 0x76, 0x65, 0x52, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x12, 0x12, 0x0a, 0x04, 0x6d, 0x67, 0x6c,
0x74, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6d, 0x67, 0x6c, 0x74, 0x12, 0x25, 0x0a,
0x0e, 0x63, 0x61, 0x72, 0x67, 0x6f, 0x5f, 0x63, 0x61, 0x70, 0x61, 0x63, 0x69, 0x74, 0x79, 0x18,
0x0d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x63, 0x61, 0x72, 0x67, 0x6f, 0x43, 0x61, 0x70, 0x61,
0x63, 0x69, 0x74, 0x79, 0x12, 0x20, 0x0a, 0x0b, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6d, 0x61, 0x62,
0x6c, 0x65, 0x73, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x6f, 0x6e, 0x73, 0x75,
0x6d, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x0f, 0x20,
0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6c, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x72, 0x65, 0x61,
0x74, 0x65, 0x64, 0x18, 0x10, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74,
0x65, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x65, 0x64, 0x69, 0x74, 0x65, 0x64, 0x18, 0x11, 0x20, 0x01,
0x28, 0x09, 0x52, 0x06, 0x65, 0x64, 0x69, 0x74, 0x65, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x66, 0x69,
0x6c, 0x6d, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x12, 0x20, 0x03, 0x28, 0x03, 0x52, 0x07, 0x66, 0x69,
0x6c, 0x6d, 0x49, 0x64, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x69, 0x6c, 0x6f, 0x74, 0x5f, 0x69,
0x64, 0x73, 0x18, 0x13, 0x20, 0x03, 0x28, 0x03, 0x52, 0x08, 0x70, 0x69, 0x6c, 0x6f, 0x74, 0x49,
0x64, 0x73, 0x3a, 0x1c, 0x9a, 0x4a, 0x19, 0x1a, 0x17, 0x73, 0x77, 0x61, 0x70, 0x69, 0x2e, 0x73,
0x74, 0x61, 0x72, 0x73, 0x68, 0x69, 0x70, 0x2e, 0x53, 0x74, 0x61, 0x72, 0x73, 0x68, 0x69, 0x70,
0x22, 0x98, 0x01, 0x0a, 0x09, 0x53, 0x74, 0x61, 0x72, 0x73, 0x68, 0x69, 0x70, 0x73, 0x12, 0x41,
0x0a, 0x09, 0x73, 0x74, 0x61, 0x72, 0x73, 0x68, 0x69, 0x70, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28,
0x0b, 0x32, 0x0f, 0x2e, 0x73, 0x77, 0x61, 0x70, 0x69, 0x2e, 0x53, 0x74, 0x61, 0x72, 0x73, 0x68,
0x69, 0x70, 0x42, 0x12, 0x9a, 0x4a, 0x0f, 0x12, 0x0d, 0x72, 0x65, 0x73, 0x2e, 0x73, 0x74, 0x61,
0x72, 0x73, 0x68, 0x69, 0x70, 0x73, 0x52, 0x09, 0x73, 0x74, 0x61, 0x72, 0x73, 0x68, 0x69, 0x70,
0x73, 0x3a, 0x48, 0x9a, 0x4a, 0x45, 0x0a, 0x43, 0x0a, 0x03, 0x72, 0x65, 0x73, 0x72, 0x3c, 0x0a,
0x2c, 0x73, 0x77, 0x61, 0x70, 0x69, 0x2e, 0x73, 0x74, 0x61, 0x72, 0x73, 0x68, 0x69, 0x70, 0x2e,
0x53, 0x74, 0x61, 0x72, 0x73, 0x68, 0x69, 0x70, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f,
0x4c, 0x69, 0x73, 0x74, 0x53, 0x74, 0x61, 0x72, 0x73, 0x68, 0x69, 0x70, 0x73, 0x12, 0x0c, 0x0a,
0x03, 0x69, 0x64, 0x73, 0x12, 0x05, 0x24, 0x2e, 0x69, 0x64, 0x73, 0x22, 0x97, 0x04, 0x0a, 0x07,
0x56, 0x65, 0x68, 0x69, 0x63, 0x6c, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20,
0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18,
0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x6d,
0x6f, 0x64, 0x65, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6d, 0x6f, 0x64, 0x65,
0x6c, 0x12, 0x23, 0x0a, 0x0d, 0x76, 0x65, 0x68, 0x69, 0x63, 0x6c, 0x65, 0x5f, 0x63, 0x6c, 0x61,
0x73, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x76, 0x65, 0x68, 0x69, 0x63, 0x6c,
0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x12, 0x22, 0x0a, 0x0c, 0x6d, 0x61, 0x6e, 0x75, 0x66, 0x61,
0x63, 0x74, 0x75, 0x72, 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x6d, 0x61,
0x6e, 0x75, 0x66, 0x61, 0x63, 0x74, 0x75, 0x72, 0x65, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x6c, 0x65,
0x6e, 0x67, 0x74, 0x68, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67,
0x74, 0x68, 0x12, 0x26, 0x0a, 0x0f, 0x63, 0x6f, 0x73, 0x74, 0x5f, 0x69, 0x6e, 0x5f, 0x63, 0x72,
0x65, 0x64, 0x69, 0x74, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x63, 0x6f, 0x73,
0x74, 0x49, 0x6e, 0x43, 0x72, 0x65, 0x64, 0x69, 0x74, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x72,
0x65, 0x77, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x72, 0x65, 0x77, 0x12, 0x1e,
0x0a, 0x0a, 0x70, 0x61, 0x73, 0x73, 0x65, 0x6e, 0x67, 0x65, 0x72, 0x73, 0x18, 0x09, 0x20, 0x01,
0x28, 0x09, 0x52, 0x0a, 0x70, 0x61, 0x73, 0x73, 0x65, 0x6e, 0x67, 0x65, 0x72, 0x73, 0x12, 0x34,
0x0a, 0x16, 0x6d, 0x61, 0x78, 0x5f, 0x61, 0x74, 0x6d, 0x6f, 0x73, 0x70, 0x68, 0x65, 0x72, 0x69,
0x6e, 0x67, 0x5f, 0x73, 0x70, 0x65, 0x65, 0x64, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x14,
0x6d, 0x61, 0x78, 0x41, 0x74, 0x6d, 0x6f, 0x73, 0x70, 0x68, 0x65, 0x72, 0x69, 0x6e, 0x67, 0x53,
0x70, 0x65, 0x65, 0x64, 0x12, 0x25, 0x0a, 0x0e, 0x63, 0x61, 0x72, 0x67, 0x6f, 0x5f, 0x63, 0x61,
0x70, 0x61, 0x63, 0x69, 0x74, 0x79, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x63, 0x61,
0x72, 0x67, 0x6f, 0x43, 0x61, 0x70, 0x61, 0x63, 0x69, 0x74, 0x79, 0x12, 0x20, 0x0a, 0x0b, 0x63,
0x6f, 0x6e, 0x73, 0x75, 0x6d, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09,
0x52, 0x0b, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6d, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x12, 0x10, 0x0a,
0x03, 0x75, 0x72, 0x6c, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6c, 0x12,
0x18, 0x0a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x09,
0x52, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x65, 0x64, 0x69,
0x74, 0x65, 0x64, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x65, 0x64, 0x69, 0x74, 0x65,
0x64, 0x12, 0x19, 0x0a, 0x08, 0x66, 0x69, 0x6c, 0x6d, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x10, 0x20,
0x03, 0x28, 0x03, 0x52, 0x07, 0x66, 0x69, 0x6c, 0x6d, 0x49, 0x64, 0x73, 0x12, 0x1b, 0x0a, 0x09,
0x70, 0x69, 0x6c, 0x6f, 0x74, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x11, 0x20, 0x03, 0x28, 0x03, 0x52,
0x08, 0x70, 0x69, 0x6c, 0x6f, 0x74, 0x49, 0x64, 0x73, 0x3a, 0x1a, 0x9a, 0x4a, 0x17, 0x1a, 0x15,
0x73, 0x77, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x65, 0x68, 0x69, 0x63, 0x6c, 0x65, 0x2e, 0x56, 0x65,
0x68, 0x69, 0x63, 0x6c, 0x65, 0x22, 0x90, 0x01, 0x0a, 0x08, 0x56, 0x65, 0x68, 0x69, 0x63, 0x6c,
0x65, 0x73, 0x12, 0x3d, 0x0a, 0x08, 0x76, 0x65, 0x68, 0x69, 0x63, 0x6c, 0x65, 0x73, 0x18, 0x01,
0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x73, 0x77, 0x61, 0x70, 0x69, 0x2e, 0x56, 0x65, 0x68,
0x69, 0x63, 0x6c, 0x65, 0x42, 0x11, 0x9a, 0x4a, 0x0e, 0x12, 0x0c, 0x72, 0x65, 0x73, 0x2e, 0x76,
0x65, 0x68, 0x69, 0x63, 0x6c, 0x65, 0x73, 0x52, 0x08, 0x76, 0x65, 0x68, 0x69, 0x63, 0x6c, 0x65,
0x73, 0x3a, 0x45, 0x9a, 0x4a, 0x42, 0x0a, 0x40, 0x0a, 0x03, 0x72, 0x65, 0x73, 0x72, 0x39, 0x0a,
0x29, 0x73, 0x77, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x65, 0x68, 0x69, 0x63, 0x6c, 0x65, 0x2e, 0x56,
0x65, 0x68, 0x69, 0x63, 0x6c, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x4c, 0x69,
0x73, 0x74, 0x56, 0x65, 0x68, 0x69, 0x63, 0x6c, 0x65, 0x73, 0x12, 0x0c, 0x0a, 0x03, 0x69, 0x64,
0x73, 0x12, 0x05, 0x24, 0x2e, 0x69, 0x64, 0x73, 0x22, 0xfe, 0x03, 0x0a, 0x07, 0x53, 0x70, 0x65,
0x63, 0x69, 0x65, 0x73, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03,
0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01,
0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x26, 0x0a, 0x0e, 0x63, 0x6c, 0x61, 0x73,
0x73, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09,
0x52, 0x0e, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e,
0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18,
0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x69,
0x6f, 0x6e, 0x12, 0x25, 0x0a, 0x0e, 0x61, 0x76, 0x65, 0x72, 0x61, 0x67, 0x65, 0x5f, 0x68, 0x65,
0x69, 0x67, 0x68, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x61, 0x76, 0x65, 0x72,
0x61, 0x67, 0x65, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x29, 0x0a, 0x10, 0x61, 0x76, 0x65,
0x72, 0x61, 0x67, 0x65, 0x5f, 0x6c, 0x69, 0x66, 0x65, 0x73, 0x70, 0x61, 0x6e, 0x18, 0x06, 0x20,
0x01, 0x28, 0x09, 0x52, 0x0f, 0x61, 0x76, 0x65, 0x72, 0x61, 0x67, 0x65, 0x4c, 0x69, 0x66, 0x65,
0x73, 0x70, 0x61, 0x6e, 0x12, 0x1d, 0x0a, 0x0a, 0x65, 0x79, 0x65, 0x5f, 0x63, 0x6f, 0x6c, 0x6f,
0x72, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x65, 0x79, 0x65, 0x43, 0x6f, 0x6c,
0x6f, 0x72, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x68, 0x61, 0x69, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f,
0x72, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x68, 0x61, 0x69, 0x72, 0x43, 0x6f,
0x6c, 0x6f, 0x72, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x6b, 0x69, 0x6e, 0x5f, 0x63, 0x6f, 0x6c,
0x6f, 0x72, 0x73, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x6b, 0x69, 0x6e, 0x43,
0x6f, 0x6c, 0x6f, 0x72, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x6c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67,
0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67,
0x65, 0x12, 0x1c, 0x0a, 0x09, 0x68, 0x6f, 0x6d, 0x65, 0x77, 0x6f, 0x72, 0x6c, 0x64, 0x18, 0x0b,
0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x68, 0x6f, 0x6d, 0x65, 0x77, 0x6f, 0x72, 0x6c, 0x64, 0x12,
0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72,
0x6c, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x18, 0x0d, 0x20, 0x01,
0x28, 0x09, 0x52, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x65,
0x64, 0x69, 0x74, 0x65, 0x64, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x65, 0x64, 0x69,
0x74, 0x65, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x5f, 0x69, 0x64,
0x73, 0x18, 0x0f, 0x20, 0x03, 0x28, 0x03, 0x52, 0x09, 0x70, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x49,
0x64, 0x73, 0x12, 0x19, 0x0a, 0x08, 0x66, 0x69, 0x6c, 0x6d, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x10,
0x20, 0x03, 0x28, 0x03, 0x52, 0x07, 0x66, 0x69, 0x6c, 0x6d, 0x49, 0x64, 0x73, 0x3a, 0x1a, 0x9a,
0x4a, 0x17, 0x1a, 0x15, 0x73, 0x77, 0x61, 0x70, 0x69, 0x2e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x65,
0x73, 0x2e, 0x53, 0x70, 0x65, 0x63, 0x69, 0x65, 0x73, 0x22, 0x8f, 0x01, 0x0a, 0x0b, 0x53, 0x70,
0x65, 0x63, 0x69, 0x65, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x3a, 0x0a, 0x07, 0x73, 0x70, 0x65,
0x63, 0x69, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x73, 0x77, 0x61,
0x70, 0x69, 0x2e, 0x53, 0x70, 0x65, 0x63, 0x69, 0x65, 0x73, 0x42, 0x10, 0x9a, 0x4a, 0x0d, 0x12,
0x0b, 0x72, 0x65, 0x73, 0x2e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x65, 0x73, 0x52, 0x07, 0x73, 0x70,
0x65, 0x63, 0x69, 0x65, 0x73, 0x3a, 0x44, 0x9a, 0x4a, 0x41, 0x0a, 0x3f, 0x0a, 0x03, 0x72, 0x65,
0x73, 0x72, 0x38, 0x0a, 0x28, 0x73, 0x77, 0x61, 0x70, 0x69, 0x2e, 0x73, 0x70, 0x65, 0x63, 0x69,
0x65, 0x73, 0x2e, 0x53, 0x70, 0x65, 0x63, 0x69, 0x65, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63,
0x65, 0x2f, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x70, 0x65, 0x63, 0x69, 0x65, 0x73, 0x12, 0x0c, 0x0a,
0x03, 0x69, 0x64, 0x73, 0x12, 0x05, 0x24, 0x2e, 0x69, 0x64, 0x73, 0x22, 0xc7, 0x03, 0x0a, 0x06,
0x50, 0x6c, 0x61, 0x6e, 0x65, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01,
0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02,
0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x64, 0x69,
0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x64, 0x69,
0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x12, 0x27, 0x0a, 0x0f, 0x72, 0x6f, 0x74, 0x61, 0x74, 0x69,
0x6f, 0x6e, 0x5f, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52,
0x0e, 0x72, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x12,
0x25, 0x0a, 0x0e, 0x6f, 0x72, 0x62, 0x69, 0x74, 0x61, 0x6c, 0x5f, 0x70, 0x65, 0x72, 0x69, 0x6f,
0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6f, 0x72, 0x62, 0x69, 0x74, 0x61, 0x6c,
0x50, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x67, 0x72, 0x61, 0x76, 0x69, 0x74,
0x79, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x67, 0x72, 0x61, 0x76, 0x69, 0x74, 0x79,
0x12, 0x1e, 0x0a, 0x0a, 0x70, 0x6f, 0x70, 0x75, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x07,
0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x70, 0x6f, 0x70, 0x75, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e,
0x12, 0x18, 0x0a, 0x07, 0x63, 0x6c, 0x69, 0x6d, 0x61, 0x74, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28,
0x09, 0x52, 0x07, 0x63, 0x6c, 0x69, 0x6d, 0x61, 0x74, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x74, 0x65,
0x72, 0x72, 0x61, 0x69, 0x6e, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x74, 0x65, 0x72,
0x72, 0x61, 0x69, 0x6e, 0x12, 0x23, 0x0a, 0x0d, 0x73, 0x75, 0x72, 0x66, 0x61, 0x63, 0x65, 0x5f,
0x77, 0x61, 0x74, 0x65, 0x72, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x73, 0x75, 0x72,
0x66, 0x61, 0x63, 0x65, 0x57, 0x61, 0x74, 0x65, 0x72, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c,
0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6c, 0x12, 0x18, 0x0a, 0x07, 0x63,
0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x72,
0x65, 0x61, 0x74, 0x65, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x65, 0x64, 0x69, 0x74, 0x65, 0x64, 0x18,
0x0d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x65, 0x64, 0x69, 0x74, 0x65, 0x64, 0x12, 0x21, 0x0a,
0x0c, 0x72, 0x65, 0x73, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x0e, 0x20,
0x03, 0x28, 0x03, 0x52, 0x0b, 0x72, 0x65, 0x73, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x73,
0x12, 0x19, 0x0a, 0x08, 0x66, 0x69, 0x6c, 0x6d, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x0f, 0x20, 0x03,
0x28, 0x03, 0x52, 0x07, 0x66, 0x69, 0x6c, 0x6d, 0x49, 0x64, 0x73, 0x3a, 0x18, 0x9a, 0x4a, 0x15,
0x1a, 0x13, 0x73, 0x77, 0x61, 0x70, 0x69, 0x2e, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x74, 0x2e, 0x50,
0x6c, 0x61, 0x6e, 0x65, 0x74, 0x22, 0x88, 0x01, 0x0a, 0x07, 0x50, 0x6c, 0x61, 0x6e, 0x65, 0x74,
0x73, 0x12, 0x39, 0x0a, 0x07, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03,
0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x73, 0x77, 0x61, 0x70, 0x69, 0x2e, 0x50, 0x6c, 0x61, 0x6e, 0x65,
0x74, 0x42, 0x10, 0x9a, 0x4a, 0x0d, 0x12, 0x0b, 0x72, 0x65, 0x73, 0x2e, 0x70, 0x6c, 0x61, 0x6e,
0x65, 0x74, 0x73, 0x52, 0x07, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x74, 0x73, 0x3a, 0x42, 0x9a, 0x4a,
0x3f, 0x0a, 0x3d, 0x0a, 0x03, 0x72, 0x65, 0x73, 0x72, 0x36, 0x0a, 0x26, 0x73, 0x77, 0x61, 0x70,
0x69, 0x2e, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x74, 0x2e, 0x50, 0x6c, 0x61, 0x6e, 0x65, 0x74, 0x53,
0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x6c, 0x61, 0x6e, 0x65,
0x74, 0x73, 0x12, 0x0c, 0x0a, 0x03, 0x69, 0x64, 0x73, 0x12, 0x05, 0x24, 0x2e, 0x69, 0x64, 0x73,
0x32, 0xaa, 0x06, 0x0a, 0x05, 0x53, 0x57, 0x41, 0x50, 0x49, 0x12, 0x3d, 0x0a, 0x09, 0x47, 0x65,
0x74, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x12, 0x17, 0x2e, 0x73, 0x77, 0x61, 0x70, 0x69, 0x2e,
0x47, 0x65, 0x74, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
0x1a, 0x15, 0x2e, 0x73, 0x77, 0x61, 0x70, 0x69, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x65, 0x72, 0x73,
0x6f, 0x6e, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, 0x40, 0x0a, 0x0a, 0x4c, 0x69, 0x73,
0x74, 0x50, 0x65, 0x6f, 0x70, 0x6c, 0x65, 0x12, 0x18, 0x2e, 0x73, 0x77, 0x61, 0x70, 0x69, 0x2e,
0x4c, 0x69, 0x73, 0x74, 0x50, 0x65, 0x6f, 0x70, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
0x74, 0x1a, 0x16, 0x2e, 0x73, 0x77, 0x61, 0x70, 0x69, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x65,
0x6f, 0x70, 0x6c, 0x65, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, 0x37, 0x0a, 0x07, 0x47,
0x65, 0x74, 0x46, 0x69, 0x6c, 0x6d, 0x12, 0x15, 0x2e, 0x73, 0x77, 0x61, 0x70, 0x69, 0x2e, 0x47,
0x65, 0x74, 0x46, 0x69, 0x6c, 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x13, 0x2e,
0x73, 0x77, 0x61, 0x70, 0x69, 0x2e, 0x47, 0x65, 0x74, 0x46, 0x69, 0x6c, 0x6d, 0x52, 0x65, 0x70,
0x6c, 0x79, 0x22, 0x00, 0x12, 0x3d, 0x0a, 0x09, 0x4c, 0x69, 0x73, 0x74, 0x46, 0x69, 0x6c, 0x6d,
0x73, 0x12, 0x17, 0x2e, 0x73, 0x77, 0x61, 0x70, 0x69, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x46, 0x69,
0x6c, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x73, 0x77, 0x61,
0x70, 0x69, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x46, 0x69, 0x6c, 0x6d, 0x73, 0x52, 0x65, 0x70, 0x6c,
0x79, 0x22, 0x00, 0x12, 0x43, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x72, 0x73, 0x68,
0x69, 0x70, 0x12, 0x19, 0x2e, 0x73, 0x77, 0x61, 0x70, 0x69, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x74,
0x61, 0x72, 0x73, 0x68, 0x69, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e,
0x73, 0x77, 0x61, 0x70, 0x69, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x72, 0x73, 0x68, 0x69,
0x70, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, 0x49, 0x0a, 0x0d, 0x4c, 0x69, 0x73, 0x74,
0x53, 0x74, 0x61, 0x72, 0x73, 0x68, 0x69, 0x70, 0x73, 0x12, 0x1b, 0x2e, 0x73, 0x77, 0x61, 0x70,
0x69, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x74, 0x61, 0x72, 0x73, 0x68, 0x69, 0x70, 0x73, 0x52,
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x73, 0x77, 0x61, 0x70, 0x69, 0x2e, 0x4c,
0x69, 0x73, 0x74, 0x53, 0x74, 0x61, 0x72, 0x73, 0x68, 0x69, 0x70, 0x73, 0x52, 0x65, 0x70, 0x6c,
0x79, 0x22, 0x00, 0x12, 0x40, 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x53, 0x70, 0x65, 0x63, 0x69, 0x65,
0x73, 0x12, 0x18, 0x2e, 0x73, 0x77, 0x61, 0x70, 0x69, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x70, 0x65,
0x63, 0x69, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x73, 0x77,
0x61, 0x70, 0x69, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x70, 0x65, 0x63, 0x69, 0x65, 0x73, 0x52, 0x65,
0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, 0x43, 0x0a, 0x0b, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x70, 0x65,
0x63, 0x69, 0x65, 0x73, 0x12, 0x19, 0x2e, 0x73, 0x77, 0x61, 0x70, 0x69, 0x2e, 0x4c, 0x69, 0x73,
0x74, 0x53, 0x70, 0x65, 0x63, 0x69, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,
0x17, 0x2e, 0x73, 0x77, 0x61, 0x70, 0x69, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x70, 0x65, 0x63,
0x69, 0x65, 0x73, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, 0x40, 0x0a, 0x0a, 0x47, 0x65,
0x74, 0x56, 0x65, 0x68, 0x69, 0x63, 0x6c, 0x65, 0x12, 0x18, 0x2e, 0x73, 0x77, 0x61, 0x70, 0x69,
0x2e, 0x47, 0x65, 0x74, 0x56, 0x65, 0x68, 0x69, 0x63, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65,
0x73, 0x74, 0x1a, 0x16, 0x2e, 0x73, 0x77, 0x61, 0x70, 0x69, 0x2e, 0x47, 0x65, 0x74, 0x56, 0x65,
0x68, 0x69, 0x63, 0x6c, 0x65, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, 0x46, 0x0a, 0x0c,
0x4c, 0x69, 0x73, 0x74, 0x56, 0x65, 0x68, 0x69, 0x63, 0x6c, 0x65, 0x73, 0x12, 0x1a, 0x2e, 0x73,
0x77, 0x61, 0x70, 0x69, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x56, 0x65, 0x68, 0x69, 0x63, 0x6c, 0x65,
0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x73, 0x77, 0x61, 0x70, 0x69,
0x2e, 0x4c, 0x69, 0x73, 0x74, 0x56, 0x65, 0x68, 0x69, 0x63, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x70,
0x6c, 0x79, 0x22, 0x00, 0x12, 0x3d, 0x0a, 0x09, 0x47, 0x65, 0x74, 0x50, 0x6c, 0x61, 0x6e, 0x65,
0x74, 0x12, 0x17, 0x2e, 0x73, 0x77, 0x61, 0x70, 0x69, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x6c, 0x61,
0x6e, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x73, 0x77, 0x61,
0x70, 0x69, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x6c, 0x61, 0x6e, 0x65, 0x74, 0x52, 0x65, 0x70, 0x6c,
0x79, 0x22, 0x00, 0x12, 0x43, 0x0a, 0x0b, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x6c, 0x61, 0x6e, 0x65,
0x74, 0x73, 0x12, 0x19, 0x2e, 0x73, 0x77, 0x61, 0x70, 0x69, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x50,
0x6c, 0x61, 0x6e, 0x65, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e,
0x73, 0x77, 0x61, 0x70, 0x69, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x6c, 0x61, 0x6e, 0x65, 0x74,
0x73, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x1a, 0x03, 0x9a, 0x4a, 0x00, 0x42, 0x88, 0x01,
0x0a, 0x09, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x77, 0x61, 0x70, 0x69, 0x42, 0x0a, 0x53, 0x77, 0x61,
0x70, 0x69, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3b, 0x67, 0x69, 0x74, 0x68, 0x75,
0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6d, 0x65, 0x72, 0x63, 0x61, 0x72, 0x69, 0x2f, 0x67, 0x72,
0x70, 0x63, 0x2d, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x64, 0x65,
0x6d, 0x6f, 0x2f, 0x73, 0x77, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x77, 0x61, 0x70, 0x69, 0x3b, 0x73,
0x77, 0x61, 0x70, 0x69, 0x70, 0x62, 0xa2, 0x02, 0x03, 0x53, 0x58, 0x58, 0xaa, 0x02, 0x05, 0x53,
0x77, 0x61, 0x70, 0x69, 0xca, 0x02, 0x05, 0x53, 0x77, 0x61, 0x70, 0x69, 0xe2, 0x02, 0x11, 0x53,
0x77, 0x61, 0x70, 0x69, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61,
0xea, 0x02, 0x05, 0x53, 0x77, 0x61, 0x70, 0x69, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_swapi_proto_rawDescOnce sync.Once
file_swapi_proto_rawDescData = file_swapi_proto_rawDesc
)
func file_swapi_proto_rawDescGZIP() []byte {
file_swapi_proto_rawDescOnce.Do(func() {
file_swapi_proto_rawDescData = protoimpl.X.CompressGZIP(file_swapi_proto_rawDescData)
})
return file_swapi_proto_rawDescData
}
var file_swapi_proto_msgTypes = make([]protoimpl.MessageInfo, 36)
var file_swapi_proto_goTypes = []interface{}{
(*GetPersonRequest)(nil), // 0: swapi.GetPersonRequest
(*GetPersonReply)(nil), // 1: swapi.GetPersonReply
(*ListPeopleRequest)(nil), // 2: swapi.ListPeopleRequest
(*ListPeopleReply)(nil), // 3: swapi.ListPeopleReply
(*GetFilmRequest)(nil), // 4: swapi.GetFilmRequest
(*GetFilmReply)(nil), // 5: swapi.GetFilmReply
(*ListFilmsRequest)(nil), // 6: swapi.ListFilmsRequest
(*ListFilmsReply)(nil), // 7: swapi.ListFilmsReply
(*GetVehicleRequest)(nil), // 8: swapi.GetVehicleRequest
(*GetVehicleReply)(nil), // 9: swapi.GetVehicleReply
(*ListVehiclesRequest)(nil), // 10: swapi.ListVehiclesRequest
(*ListVehiclesReply)(nil), // 11: swapi.ListVehiclesReply
(*GetSpeciesRequest)(nil), // 12: swapi.GetSpeciesRequest
(*GetSpeciesReply)(nil), // 13: swapi.GetSpeciesReply
(*ListSpeciesRequest)(nil), // 14: swapi.ListSpeciesRequest
(*ListSpeciesReply)(nil), // 15: swapi.ListSpeciesReply
(*GetStarshipRequest)(nil), // 16: swapi.GetStarshipRequest
(*GetStarshipReply)(nil), // 17: swapi.GetStarshipReply
(*ListStarshipsRequest)(nil), // 18: swapi.ListStarshipsRequest
(*ListStarshipsReply)(nil), // 19: swapi.ListStarshipsReply
(*GetPlanetRequest)(nil), // 20: swapi.GetPlanetRequest
(*GetPlanetReply)(nil), // 21: swapi.GetPlanetReply
(*ListPlanetsRequest)(nil), // 22: swapi.ListPlanetsRequest
(*ListPlanetsReply)(nil), // 23: swapi.ListPlanetsReply
(*Person)(nil), // 24: swapi.Person
(*People)(nil), // 25: swapi.People
(*Film)(nil), // 26: swapi.Film
(*Films)(nil), // 27: swapi.Films
(*Starship)(nil), // 28: swapi.Starship
(*Starships)(nil), // 29: swapi.Starships
(*Vehicle)(nil), // 30: swapi.Vehicle
(*Vehicles)(nil), // 31: swapi.Vehicles
(*Species)(nil), // 32: swapi.Species
(*SpeciesList)(nil), // 33: swapi.SpeciesList
(*Planet)(nil), // 34: swapi.Planet
(*Planets)(nil), // 35: swapi.Planets
(*date.Date)(nil), // 36: google.type.Date
}
var file_swapi_proto_depIdxs = []int32{
24, // 0: swapi.GetPersonReply.person:type_name -> swapi.Person
26, // 1: swapi.GetPersonReply.films:type_name -> swapi.Film
32, // 2: swapi.GetPersonReply.species:type_name -> swapi.Species
28, // 3: swapi.GetPersonReply.starships:type_name -> swapi.Starship
30, // 4: swapi.GetPersonReply.vehicles:type_name -> swapi.Vehicle
24, // 5: swapi.ListPeopleReply.people:type_name -> swapi.Person
26, // 6: swapi.GetFilmReply.film:type_name -> swapi.Film
32, // 7: swapi.GetFilmReply.species:type_name -> swapi.Species
28, // 8: swapi.GetFilmReply.starships:type_name -> swapi.Starship
30, // 9: swapi.GetFilmReply.vehicles:type_name -> swapi.Vehicle
24, // 10: swapi.GetFilmReply.characters:type_name -> swapi.Person
34, // 11: swapi.GetFilmReply.planets:type_name -> swapi.Planet
26, // 12: swapi.ListFilmsReply.films:type_name -> swapi.Film
30, // 13: swapi.GetVehicleReply.vehicle:type_name -> swapi.Vehicle
26, // 14: swapi.GetVehicleReply.films:type_name -> swapi.Film
24, // 15: swapi.GetVehicleReply.pilots:type_name -> swapi.Person
30, // 16: swapi.ListVehiclesReply.vehicles:type_name -> swapi.Vehicle
32, // 17: swapi.GetSpeciesReply.species:type_name -> swapi.Species
24, // 18: swapi.GetSpeciesReply.people:type_name -> swapi.Person
26, // 19: swapi.GetSpeciesReply.films:type_name -> swapi.Film
32, // 20: swapi.ListSpeciesReply.species:type_name -> swapi.Species
28, // 21: swapi.GetStarshipReply.starship:type_name -> swapi.Starship
26, // 22: swapi.GetStarshipReply.films:type_name -> swapi.Film
24, // 23: swapi.GetStarshipReply.pilots:type_name -> swapi.Person
28, // 24: swapi.ListStarshipsReply.starships:type_name -> swapi.Starship
34, // 25: swapi.GetPlanetReply.planet:type_name -> swapi.Planet
24, // 26: swapi.GetPlanetReply.residents:type_name -> swapi.Person
26, // 27: swapi.GetPlanetReply.films:type_name -> swapi.Film
34, // 28: swapi.ListPlanetsReply.planets:type_name -> swapi.Planet
24, // 29: swapi.People.people:type_name -> swapi.Person
36, // 30: swapi.Film.release_date:type_name -> google.type.Date
26, // 31: swapi.Films.films:type_name -> swapi.Film
28, // 32: swapi.Starships.starships:type_name -> swapi.Starship
30, // 33: swapi.Vehicles.vehicles:type_name -> swapi.Vehicle
32, // 34: swapi.SpeciesList.species:type_name -> swapi.Species
34, // 35: swapi.Planets.planets:type_name -> swapi.Planet
0, // 36: swapi.SWAPI.GetPerson:input_type -> swapi.GetPersonRequest
2, // 37: swapi.SWAPI.ListPeople:input_type -> swapi.ListPeopleRequest
4, // 38: swapi.SWAPI.GetFilm:input_type -> swapi.GetFilmRequest
6, // 39: swapi.SWAPI.ListFilms:input_type -> swapi.ListFilmsRequest
16, // 40: swapi.SWAPI.GetStarship:input_type -> swapi.GetStarshipRequest
18, // 41: swapi.SWAPI.ListStarships:input_type -> swapi.ListStarshipsRequest
12, // 42: swapi.SWAPI.GetSpecies:input_type -> swapi.GetSpeciesRequest
14, // 43: swapi.SWAPI.ListSpecies:input_type -> swapi.ListSpeciesRequest
8, // 44: swapi.SWAPI.GetVehicle:input_type -> swapi.GetVehicleRequest
10, // 45: swapi.SWAPI.ListVehicles:input_type -> swapi.ListVehiclesRequest
20, // 46: swapi.SWAPI.GetPlanet:input_type -> swapi.GetPlanetRequest
22, // 47: swapi.SWAPI.ListPlanets:input_type -> swapi.ListPlanetsRequest
1, // 48: swapi.SWAPI.GetPerson:output_type -> swapi.GetPersonReply
3, // 49: swapi.SWAPI.ListPeople:output_type -> swapi.ListPeopleReply
5, // 50: swapi.SWAPI.GetFilm:output_type -> swapi.GetFilmReply
7, // 51: swapi.SWAPI.ListFilms:output_type -> swapi.ListFilmsReply
17, // 52: swapi.SWAPI.GetStarship:output_type -> swapi.GetStarshipReply
19, // 53: swapi.SWAPI.ListStarships:output_type -> swapi.ListStarshipsReply
13, // 54: swapi.SWAPI.GetSpecies:output_type -> swapi.GetSpeciesReply
15, // 55: swapi.SWAPI.ListSpecies:output_type -> swapi.ListSpeciesReply
9, // 56: swapi.SWAPI.GetVehicle:output_type -> swapi.GetVehicleReply
11, // 57: swapi.SWAPI.ListVehicles:output_type -> swapi.ListVehiclesReply
21, // 58: swapi.SWAPI.GetPlanet:output_type -> swapi.GetPlanetReply
23, // 59: swapi.SWAPI.ListPlanets:output_type -> swapi.ListPlanetsReply
48, // [48:60] is the sub-list for method output_type
36, // [36:48] is the sub-list for method input_type
36, // [36:36] is the sub-list for extension type_name
36, // [36:36] is the sub-list for extension extendee
0, // [0:36] is the sub-list for field type_name
}
func init() { file_swapi_proto_init() }
func file_swapi_proto_init() {
if File_swapi_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_swapi_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetPersonRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_swapi_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetPersonReply); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_swapi_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ListPeopleRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_swapi_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ListPeopleReply); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_swapi_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetFilmRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_swapi_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetFilmReply); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_swapi_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ListFilmsRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_swapi_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ListFilmsReply); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_swapi_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetVehicleRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_swapi_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetVehicleReply); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_swapi_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ListVehiclesRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_swapi_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ListVehiclesReply); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_swapi_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetSpeciesRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_swapi_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetSpeciesReply); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_swapi_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ListSpeciesRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_swapi_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ListSpeciesReply); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_swapi_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetStarshipRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_swapi_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetStarshipReply); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_swapi_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ListStarshipsRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_swapi_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ListStarshipsReply); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_swapi_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetPlanetRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_swapi_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetPlanetReply); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_swapi_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ListPlanetsRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_swapi_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ListPlanetsReply); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_swapi_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Person); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_swapi_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*People); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_swapi_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Film); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_swapi_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Films); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_swapi_proto_msgTypes[28].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Starship); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_swapi_proto_msgTypes[29].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Starships); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_swapi_proto_msgTypes[30].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Vehicle); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_swapi_proto_msgTypes[31].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Vehicles); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_swapi_proto_msgTypes[32].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Species); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_swapi_proto_msgTypes[33].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*SpeciesList); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_swapi_proto_msgTypes[34].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Planet); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_swapi_proto_msgTypes[35].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Planets); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_swapi_proto_rawDesc,
NumEnums: 0,
NumMessages: 36,
NumExtensions: 0,
NumServices: 1,
},
GoTypes: file_swapi_proto_goTypes,
DependencyIndexes: file_swapi_proto_depIdxs,
MessageInfos: file_swapi_proto_msgTypes,
}.Build()
File_swapi_proto = out.File
file_swapi_proto_rawDesc = nil
file_swapi_proto_goTypes = nil
file_swapi_proto_depIdxs = nil
}
================================================
FILE: demo/swapi/swapi/swapi_grpc.pb.go
================================================
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.4.0
// - protoc (unknown)
// source: swapi.proto
package swapipb
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.62.0 or later.
const _ = grpc.SupportPackageIsVersion8
const (
SWAPI_GetPerson_FullMethodName = "/swapi.SWAPI/GetPerson"
SWAPI_ListPeople_FullMethodName = "/swapi.SWAPI/ListPeople"
SWAPI_GetFilm_FullMethodName = "/swapi.SWAPI/GetFilm"
SWAPI_ListFilms_FullMethodName = "/swapi.SWAPI/ListFilms"
SWAPI_GetStarship_FullMethodName = "/swapi.SWAPI/GetStarship"
SWAPI_ListStarships_FullMethodName = "/swapi.SWAPI/ListStarships"
SWAPI_GetSpecies_FullMethodName = "/swapi.SWAPI/GetSpecies"
SWAPI_ListSpecies_FullMethodName = "/swapi.SWAPI/ListSpecies"
SWAPI_GetVehicle_FullMethodName = "/swapi.SWAPI/GetVehicle"
SWAPI_ListVehicles_FullMethodName = "/swapi.SWAPI/ListVehicles"
SWAPI_GetPlanet_FullMethodName = "/swapi.SWAPI/GetPlanet"
SWAPI_ListPlanets_FullMethodName = "/swapi.SWAPI/ListPlanets"
)
// SWAPIClient is the client API for SWAPI 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 SWAPIClient interface {
GetPerson(ctx context.Context, in *GetPersonRequest, opts ...grpc.CallOption) (*GetPersonReply, error)
ListPeople(ctx context.Context, in *ListPeopleRequest, opts ...grpc.CallOption) (*ListPeopleReply, error)
GetFilm(ctx context.Context, in *GetFilmRequest, opts ...grpc.CallOption) (*GetFilmReply, error)
ListFilms(ctx context.Context, in *ListFilmsRequest, opts ...grpc.CallOption) (*ListFilmsReply, error)
GetStarship(ctx context.Context, in *GetStarshipRequest, opts ...grpc.CallOption) (*GetStarshipReply, error)
ListStarships(ctx context.Context, in *ListStarshipsRequest, opts ...grpc.CallOption) (*ListStarshipsReply, error)
GetSpecies(ctx context.Context, in *GetSpeciesRequest, opts ...grpc.CallOption) (*GetSpeciesReply, error)
ListSpecies(ctx context.Context, in *ListSpeciesRequest, opts ...grpc.CallOption) (*ListSpeciesReply, error)
GetVehicle(ctx context.Context, in *GetVehicleRequest, opts ...grpc.CallOption) (*GetVehicleReply, error)
ListVehicles(ctx context.Context, in *ListVehiclesRequest, opts ...grpc.CallOption) (*ListVehiclesReply, error)
GetPlanet(ctx context.Context, in *GetPlanetRequest, opts ...grpc.CallOption) (*GetPlanetReply, error)
ListPlanets(ctx context.Context, in *ListPlanetsRequest, opts ...grpc.CallOption) (*ListPlanetsReply, error)
}
type sWAPIClient struct {
cc grpc.ClientConnInterface
}
func NewSWAPIClient(cc grpc.ClientConnInterface) SWAPIClient {
return &sWAPIClient{cc}
}
func (c *sWAPIClient) GetPerson(ctx context.Context, in *GetPersonRequest, opts ...grpc.CallOption) (*GetPersonReply, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(GetPersonReply)
err := c.cc.Invoke(ctx, SWAPI_GetPerson_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *sWAPIClient) ListPeople(ctx context.Context, in *ListPeopleRequest, opts ...grpc.CallOption) (*ListPeopleReply, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(ListPeopleReply)
err := c.cc.Invoke(ctx, SWAPI_ListPeople_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *sWAPIClient) GetFilm(ctx context.Context, in *GetFilmRequest, opts ...grpc.CallOption) (*GetFilmReply, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(GetFilmReply)
err := c.cc.Invoke(ctx, SWAPI_GetFilm_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *sWAPIClient) ListFilms(ctx context.Context, in *ListFilmsRequest, opts ...grpc.CallOption) (*ListFilmsReply, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(ListFilmsReply)
err := c.cc.Invoke(ctx, SWAPI_ListFilms_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *sWAPIClient) GetStarship(ctx context.Context, in *GetStarshipRequest, opts ...grpc.CallOption) (*GetStarshipReply, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(GetStarshipReply)
err := c.cc.Invoke(ctx, SWAPI_GetStarship_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *sWAPIClient) ListStarships(ctx context.Context, in *ListStarshipsRequest, opts ...grpc.CallOption) (*ListStarshipsReply, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(ListStarshipsReply)
err := c.cc.Invoke(ctx, SWAPI_ListStarships_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *sWAPIClient) GetSpecies(ctx context.Context, in *GetSpeciesRequest, opts ...grpc.CallOption) (*GetSpeciesReply, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(GetSpeciesReply)
err := c.cc.Invoke(ctx, SWAPI_GetSpecies_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *sWAPIClient) ListSpecies(ctx context.Context, in *ListSpeciesRequest, opts ...grpc.CallOption) (*ListSpeciesReply, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(ListSpeciesReply)
err := c.cc.Invoke(ctx, SWAPI_ListSpecies_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *sWAPIClient) GetVehicle(ctx context.Context, in *GetVehicleRequest, opts ...grpc.CallOption) (*GetVehicleReply, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(GetVehicleReply)
err := c.cc.Invoke(ctx, SWAPI_GetVehicle_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *sWAPIClient) ListVehicles(ctx context.Context, in *ListVehiclesRequest, opts ...grpc.CallOption) (*ListVehiclesReply, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(ListVehiclesReply)
err := c.cc.Invoke(ctx, SWAPI_ListVehicles_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *sWAPIClient) GetPlanet(ctx context.Context, in *GetPlanetRequest, opts ...grpc.CallOption) (*GetPlanetReply, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(GetPlanetReply)
err := c.cc.Invoke(ctx, SWAPI_GetPlanet_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *sWAPIClient) ListPlanets(ctx context.Context, in *ListPlanetsRequest, opts ...grpc.CallOption) (*ListPlanetsReply, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(ListPlanetsReply)
err := c.cc.Invoke(ctx, SWAPI_ListPlanets_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
// SWAPIServer is the server API for SWAPI service.
// All implementations must embed UnimplementedSWAPIServer
// for forward compatibility
type SWAPIServer interface {
GetPerson(context.Context, *GetPersonRequest) (*GetPersonReply, error)
ListPeople(context.Context, *ListPeopleRequest) (*ListPeopleReply, error)
GetFilm(context.Context, *GetFilmRequest) (*GetFilmReply, error)
ListFilms(context.Context, *ListFilmsRequest) (*ListFilmsReply, error)
GetStarship(context.Context, *GetStarshipRequest) (*GetStarshipReply, error)
ListStarships(context.Context, *ListStarshipsRequest) (*ListStarshipsReply, error)
GetSpecies(context.Context, *GetSpeciesRequest) (*GetSpeciesReply, error)
ListSpecies(context.Context, *ListSpeciesRequest) (*ListSpeciesReply, error)
GetVehicle(context.Context, *GetVehicleRequest) (*GetVehicleReply, error)
ListVehicles(context.Context, *ListVehiclesRequest) (*ListVehiclesReply, error)
GetPlanet(context.Context, *GetPlanetRequest) (*GetPlanetReply, error)
ListPlanets(context.Context, *ListPlanetsRequest) (*ListPlanetsReply, error)
mustEmbedUnimplementedSWAPIServer()
}
// UnimplementedSWAPIServer must be embedded to have forward compatible implementations.
type UnimplementedSWAPIServer struct {
}
func (UnimplementedSWAPIServer) GetPerson(context.Context, *GetPersonRequest) (*GetPersonReply, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetPerson not implemented")
}
func (UnimplementedSWAPIServer) ListPeople(context.Context, *ListPeopleRequest) (*ListPeopleReply, error) {
return nil, status.Errorf(codes.Unimplemented, "method ListPeople not implemented")
}
func (UnimplementedSWAPIServer) GetFilm(context.Context, *GetFilmRequest) (*GetFilmReply, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetFilm not implemented")
}
func (UnimplementedSWAPIServer) ListFilms(context.Context, *ListFilmsRequest) (*ListFilmsReply, error) {
return nil, status.Errorf(codes.Unimplemented, "method ListFilms not implemented")
}
func (UnimplementedSWAPIServer) GetStarship(context.Context, *GetStarshipRequest) (*GetStarshipReply, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetStarship not implemented")
}
func (UnimplementedSWAPIServer) ListStarships(context.Context, *ListStarshipsRequest) (*ListStarshipsReply, error) {
return nil, status.Errorf(codes.Unimplemented, "method ListStarships not implemented")
}
func (UnimplementedSWAPIServer) GetSpecies(context.Context, *GetSpeciesRequest) (*GetSpeciesReply, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetSpecies not implemented")
}
func (UnimplementedSWAPIServer) ListSpecies(context.Context, *ListSpeciesRequest) (*ListSpeciesReply, error) {
return nil, status.Errorf(codes.Unimplemented, "method ListSpecies not implemented")
}
func (UnimplementedSWAPIServer) GetVehicle(context.Context, *GetVehicleRequest) (*GetVehicleReply, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetVehicle not implemented")
}
func (UnimplementedSWAPIServer) ListVehicles(context.Context, *ListVehiclesRequest) (*ListVehiclesReply, error) {
return nil, status.Errorf(codes.Unimplemented, "method ListVehicles not implemented")
}
func (UnimplementedSWAPIServer) GetPlanet(context.Context, *GetPlanetRequest) (*GetPlanetReply, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetPlanet not implemented")
}
func (UnimplementedSWAPIServer) ListPlanets(context.Context, *ListPlanetsRequest) (*ListPlanetsReply, error) {
return nil, status.Errorf(codes.Unimplemented, "method ListPlanets not implemented")
}
func (UnimplementedSWAPIServer) mustEmbedUnimplementedSWAPIServer() {}
// UnsafeSWAPIServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to SWAPIServer will
// result in compilation errors.
type UnsafeSWAPIServer interface {
mustEmbedUnimplementedSWAPIServer()
}
func RegisterSWAPIServer(s grpc.ServiceRegistrar, srv SWAPIServer) {
s.RegisterService(&SWAPI_ServiceDesc, srv)
}
func _SWAPI_GetPerson_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetPersonRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(SWAPIServer).GetPerson(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: SWAPI_GetPerson_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(SWAPIServer).GetPerson(ctx, req.(*GetPersonRequest))
}
return interceptor(ctx, in, info, handler)
}
func _SWAPI_ListPeople_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ListPeopleRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(SWAPIServer).ListPeople(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: SWAPI_ListPeople_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(SWAPIServer).ListPeople(ctx, req.(*ListPeopleRequest))
}
return interceptor(ctx, in, info, handler)
}
func _SWAPI_GetFilm_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetFilmRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(SWAPIServer).GetFilm(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: SWAPI_GetFilm_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(SWAPIServer).GetFilm(ctx, req.(*GetFilmRequest))
}
return interceptor(ctx, in, info, handler)
}
func _SWAPI_ListFilms_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ListFilmsRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(SWAPIServer).ListFilms(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: SWAPI_ListFilms_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(SWAPIServer).ListFilms(ctx, req.(*ListFilmsRequest))
}
return interceptor(ctx, in, info, handler)
}
func _SWAPI_GetStarship_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetStarshipRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(SWAPIServer).GetStarship(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: SWAPI_GetStarship_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(SWAPIServer).GetStarship(ctx, req.(*GetStarshipRequest))
}
return interceptor(ctx, in, info, handler)
}
func _SWAPI_ListStarships_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ListStarshipsRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(SWAPIServer).ListStarships(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: SWAPI_ListStarships_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(SWAPIServer).ListStarships(ctx, req.(*ListStarshipsRequest))
}
return interceptor(ctx, in, info, handler)
}
func _SWAPI_GetSpecies_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetSpeciesRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(SWAPIServer).GetSpecies(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: SWAPI_GetSpecies_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(SWAPIServer).GetSpecies(ctx, req.(*GetSpeciesRequest))
}
return interceptor(ctx, in, info, handler)
}
func _SWAPI_ListSpecies_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ListSpeciesRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(SWAPIServer).ListSpecies(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: SWAPI_ListSpecies_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(SWAPIServer).ListSpecies(ctx, req.(*ListSpeciesRequest))
}
return interceptor(ctx, in, info, handler)
}
func _SWAPI_GetVehicle_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetVehicleRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(SWAPIServer).GetVehicle(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: SWAPI_GetVehicle_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(SWAPIServer).GetVehicle(ctx, req.(*GetVehicleRequest))
}
return interceptor(ctx, in, info, handler)
}
func _SWAPI_ListVehicles_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ListVehiclesRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(SWAPIServer).ListVehicles(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: SWAPI_ListVehicles_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(SWAPIServer).ListVehicles(ctx, req.(*ListVehiclesRequest))
}
return interceptor(ctx, in, info, handler)
}
func _SWAPI_GetPlanet_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetPlanetRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(SWAPIServer).GetPlanet(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: SWAPI_GetPlanet_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(SWAPIServer).GetPlanet(ctx, req.(*GetPlanetRequest))
}
return interceptor(ctx, in, info, handler)
}
func _SWAPI_ListPlanets_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ListPlanetsRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(SWAPIServer).ListPlanets(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: SWAPI_ListPlanets_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(SWAPIServer).ListPlanets(ctx, req.(*ListPlanetsRequest))
}
return interceptor(ctx, in, info, handler)
}
// SWAPI_ServiceDesc is the grpc.ServiceDesc for SWAPI service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var SWAPI_ServiceDesc = grpc.ServiceDesc{
ServiceName: "swapi.SWAPI",
HandlerType: (*SWAPIServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "GetPerson",
Handler: _SWAPI_GetPerson_Handler,
},
{
MethodName: "ListPeople",
Handler: _SWAPI_ListPeople_Handler,
},
{
MethodName: "GetFilm",
Handler: _SWAPI_GetFilm_Handler,
},
{
MethodName: "ListFilms",
Handler: _SWAPI_ListFilms_Handler,
},
{
MethodName: "GetStarship",
Handler: _SWAPI_GetStarship_Handler,
},
{
MethodName: "ListStarships",
Handler: _SWAPI_ListStarships_Handler,
},
{
MethodName: "GetSpecies",
Handler: _SWAPI_GetSpecies_Handler,
},
{
MethodName: "ListSpecies",
Handler: _SWAPI_ListSpecies_Handler,
},
{
MethodName: "GetVehicle",
Handler: _SWAPI_GetVehicle_Handler,
},
{
MethodName: "ListVehicles",
Handler: _SWAPI_ListVehicles_Handler,
},
{
MethodName: "GetPlanet",
Handler: _SWAPI_GetPlanet_Handler,
},
{
MethodName: "ListPlanets",
Handler: _SWAPI_ListPlanets_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "swapi.proto",
}
================================================
FILE: demo/swapi/swapi/swapi_grpc_federation.pb.go
================================================
// Code generated by protoc-gen-grpc-federation. DO NOT EDIT!
// versions:
//
// protoc-gen-grpc-federation: v1.9.8
//
// source: swapi.proto
package swapipb
import (
"context"
"io"
"log/slog"
"reflect"
grpcfed "github.com/mercari/grpc-federation/grpc/federation"
grpcfedcel "github.com/mercari/grpc-federation/grpc/federation/cel"
"go.opentelemetry.io/otel"
"go.opentelemetry.io/otel/trace"
filmpb "github.com/mercari/grpc-federation/demo/swapi/film"
personpb "github.com/mercari/grpc-federation/demo/swapi/person"
planetpb "github.com/mercari/grpc-federation/demo/swapi/planet"
speciespb "github.com/mercari/grpc-federation/demo/swapi/species"
starshippb "github.com/mercari/grpc-federation/demo/swapi/starship"
vehiclepb "github.com/mercari/grpc-federation/demo/swapi/vehicle"
date "google.golang.org/genproto/googleapis/type/date"
)
var (
_ = reflect.Invalid // to avoid "imported and not used error"
)
// Swapi_FilmsArgument is argument for "swapi.Films" message.
type SWAPI_Swapi_FilmsArgument struct {
Ids []int64
Res *filmpb.ListFilmsReply
}
// Swapi_GetFilmReplyArgument is argument for "swapi.GetFilmReply" message.
type SWAPI_Swapi_GetFilmReplyArgument struct {
Characters *People
F *filmpb.Film
Id int64
Planets *Planets
Res *filmpb.GetFilmReply
Species *SpeciesList
Starships *Starships
V *Vehicles
}
// Swapi_GetPersonReplyArgument is argument for "swapi.GetPersonReply" message.
type SWAPI_Swapi_GetPersonReplyArgument struct {
F *Films
Id int64
P *personpb.Person
Res *personpb.GetPersonReply
Species *SpeciesList
Starships *Starships
V *Vehicles
}
// Swapi_GetPlanetReplyArgument is argument for "swapi.GetPlanetReply" message.
type SWAPI_Swapi_GetPlanetReplyArgument struct {
F *Films
Id int64
P *planetpb.Planet
Res *planetpb.GetPlanetReply
Residents *People
}
// Swapi_GetSpeciesReplyArgument is argument for "swapi.GetSpeciesReply" message.
type SWAPI_Swapi_GetSpeciesReplyArgument struct {
F *Films
Id int64
P *People
Res *speciespb.GetSpeciesReply
S *speciespb.Species
}
// Swapi_GetStarshipReplyArgument is argument for "swapi.GetStarshipReply" message.
type SWAPI_Swapi_GetStarshipReplyArgument struct {
F *Films
Id int64
P *People
Res *starshippb.GetStarshipReply
S *starshippb.Starship
}
// Swapi_GetVehicleReplyArgument is argument for "swapi.GetVehicleReply" message.
type SWAPI_Swapi_GetVehicleReplyArgument struct {
F *Films
Id int64
P *People
Res *vehiclepb.GetVehicleReply
V *vehiclepb.Vehicle
}
// Swapi_ListFilmsReplyArgument is argument for "swapi.ListFilmsReply" message.
type SWAPI_Swapi_ListFilmsReplyArgument struct {
F *Films
Ids []int64
}
// Swapi_ListPeopleReplyArgument is argument for "swapi.ListPeopleReply" message.
type SWAPI_Swapi_ListPeopleReplyArgument struct {
Ids []int64
P *People
}
// Swapi_ListPlanetsReplyArgument is argument for "swapi.ListPlanetsReply" message.
type SWAPI_Swapi_ListPlanetsReplyArgument struct {
Ids []int64
P *Planets
}
// Swapi_ListSpeciesReplyArgument is argument for "swapi.ListSpeciesReply" message.
type SWAPI_Swapi_ListSpeciesReplyArgument struct {
Ids []int64
S *SpeciesList
}
// Swapi_ListStarshipsReplyArgument is argument for "swapi.ListStarshipsReply" message.
type SWAPI_Swapi_ListStarshipsReplyArgument struct {
Ids []int64
S *Starships
}
// Swapi_ListVehiclesReplyArgument is argument for "swapi.ListVehiclesReply" message.
type SWAPI_Swapi_ListVehiclesReplyArgument struct {
Ids []int64
V *Vehicles
}
// Swapi_PeopleArgument is argument for "swapi.People" message.
type SWAPI_Swapi_PeopleArgument struct {
Ids []int64
Res *personpb.ListPeopleReply
}
// Swapi_PlanetsArgument is argument for "swapi.Planets" message.
type SWAPI_Swapi_PlanetsArgument struct {
Ids []int64
Res *planetpb.ListPlanetsReply
}
// Swapi_SpeciesListArgument is argument for "swapi.SpeciesList" message.
type SWAPI_Swapi_SpeciesListArgument struct {
Ids []int64
Res *speciespb.ListSpeciesReply
}
// Swapi_StarshipsArgument is argument for "swapi.Starships" message.
type SWAPI_Swapi_StarshipsArgument struct {
Ids []int64
Res *starshippb.ListStarshipsReply
}
// Swapi_VehiclesArgument is argument for "swapi.Vehicles" message.
type SWAPI_Swapi_VehiclesArgument struct {
Ids []int64
Res *vehiclepb.ListVehiclesReply
}
// SWAPIConfig configuration required to initialize the service that use GRPC Federation.
type SWAPIConfig struct {
// Client provides a factory that creates the gRPC Client needed to invoke methods of the gRPC Service on which the Federation Service depends.
// If this interface is not provided, an error is returned during initialization.
Client SWAPIClientFactory // required
// ErrorHandler Federation Service often needs to convert errors received from downstream services.
// If an error occurs during method execution in the Federation Service, this error handler is called and the returned error is treated as a final error.
ErrorHandler grpcfed.ErrorHandler
// Logger sets the logger used to output Debug/Info/Error information.
Logger *slog.Logger
}
// SWAPIClientFactory provides a factory that creates the gRPC Client needed to invoke methods of the gRPC Service on which the Federation Service depends.
type SWAPIClientFactory interface {
// Swapi_Film_FilmServiceClient create a gRPC Client to be used to call methods in swapi.film.FilmService.
Swapi_Film_FilmServiceClient(SWAPIClientConfig) (filmpb.FilmServiceClient, error)
// Swapi_Person_PersonServiceClient create a gRPC Client to be used to call methods in swapi.person.PersonService.
Swapi_Person_PersonServiceClient(SWAPIClientConfig) (personpb.PersonServiceClient, error)
// Swapi_Planet_PlanetServiceClient create a gRPC Client to be used to call methods in swapi.planet.PlanetService.
Swapi_Planet_PlanetServiceClient(SWAPIClientConfig) (planetpb.PlanetServiceClient, error)
// Swapi_Species_SpeciesServiceClient create a gRPC Client to be used to call methods in swapi.species.SpeciesService.
Swapi_Species_SpeciesServiceClient(SWAPIClientConfig) (speciespb.SpeciesServiceClient, error)
// Swapi_Starship_StarshipServiceClient create a gRPC Client to be used to call methods in swapi.starship.StarshipService.
Swapi_Starship_StarshipServiceClient(SWAPIClientConfig) (starshippb.StarshipServiceClient, error)
// Swapi_Vehicle_VehicleServiceClient create a gRPC Client to be used to call methods in swapi.vehicle.VehicleService.
Swapi_Vehicle_VehicleServiceClient(SWAPIClientConfig) (vehiclepb.VehicleServiceClient, error)
}
// SWAPIClientConfig helper to create gRPC client.
// Hints for creating a gRPC Client.
type SWAPIClientConfig struct {
// Service FQDN ( `.` ) of the service on Protocol Buffers.
Service string
}
// SWAPIDependentClientSet has a gRPC client for all services on which the federation service depends.
// This is provided as an argument when implementing the custom resolver.
type SWAPIDependentClientSet struct {
Swapi_Film_FilmServiceClient filmpb.FilmServiceClient
Swapi_Person_PersonServiceClient personpb.PersonServiceClient
Swapi_Planet_PlanetServiceClient planetpb.PlanetServiceClient
Swapi_Species_SpeciesServiceClient speciespb.SpeciesServiceClient
Swapi_Starship_StarshipServiceClient starshippb.StarshipServiceClient
Swapi_Vehicle_VehicleServiceClient vehiclepb.VehicleServiceClient
}
// SWAPIResolver provides an interface to directly implement message resolver and field resolver not defined in Protocol Buffers.
type SWAPIResolver interface {
}
// SWAPICELPluginWasmConfig type alias for grpcfedcel.WasmConfig.
type SWAPICELPluginWasmConfig = grpcfedcel.WasmConfig
// SWAPICELPluginConfig hints for loading a WebAssembly based plugin.
type SWAPICELPluginConfig struct {
}
// SWAPIUnimplementedResolver a structure implemented to satisfy the Resolver interface.
// An Unimplemented error is always returned.
// This is intended for use when there are many Resolver interfaces that do not need to be implemented,
// by embedding them in a resolver structure that you have created.
type SWAPIUnimplementedResolver struct{}
const (
SWAPI_DependentMethod_Swapi_Film_FilmService_GetFilm = "/swapi.film.FilmService/GetFilm"
SWAPI_DependentMethod_Swapi_Film_FilmService_ListFilms = "/swapi.film.FilmService/ListFilms"
SWAPI_DependentMethod_Swapi_Person_PersonService_GetPerson = "/swapi.person.PersonService/GetPerson"
SWAPI_DependentMethod_Swapi_Person_PersonService_ListPeople = "/swapi.person.PersonService/ListPeople"
SWAPI_DependentMethod_Swapi_Planet_PlanetService_GetPlanet = "/swapi.planet.PlanetService/GetPlanet"
SWAPI_DependentMethod_Swapi_Planet_PlanetService_ListPlanets = "/swapi.planet.PlanetService/ListPlanets"
SWAPI_DependentMethod_Swapi_Species_SpeciesService_GetSpecies = "/swapi.species.SpeciesService/GetSpecies"
SWAPI_DependentMethod_Swapi_Species_SpeciesService_ListSpecies = "/swapi.species.SpeciesService/ListSpecies"
SWAPI_DependentMethod_Swapi_Starship_StarshipService_GetStarship = "/swapi.starship.StarshipService/GetStarship"
SWAPI_DependentMethod_Swapi_Starship_StarshipService_ListStarships = "/swapi.starship.StarshipService/ListStarships"
SWAPI_DependentMethod_Swapi_Vehicle_VehicleService_GetVehicle = "/swapi.vehicle.VehicleService/GetVehicle"
SWAPI_DependentMethod_Swapi_Vehicle_VehicleService_ListVehicles = "/swapi.vehicle.VehicleService/ListVehicles"
)
// SWAPI represents Federation Service.
type SWAPI struct {
UnimplementedSWAPIServer
cfg SWAPIConfig
logger *slog.Logger
errorHandler grpcfed.ErrorHandler
celCacheMap *grpcfed.CELCacheMap
tracer trace.Tracer
celTypeHelper *grpcfed.CELTypeHelper
celEnvOpts []grpcfed.CELEnvOption
celPluginInstances []*grpcfedcel.CELPluginInstance
client *SWAPIDependentClientSet
}
// NewSWAPI creates SWAPI instance by SWAPIConfig.
func NewSWAPI(cfg SWAPIConfig) (*SWAPI, error) {
if cfg.Client == nil {
return nil, grpcfed.ErrClientConfig
}
Swapi_Film_FilmServiceClient, err := cfg.Client.Swapi_Film_FilmServiceClient(SWAPIClientConfig{
Service: "swapi.film.FilmService",
})
if err != nil {
return nil, err
}
Swapi_Person_PersonServiceClient, err := cfg.Client.Swapi_Person_PersonServiceClient(SWAPIClientConfig{
Service: "swapi.person.PersonService",
})
if err != nil {
return nil, err
}
Swapi_Planet_PlanetServiceClient, err := cfg.Client.Swapi_Planet_PlanetServiceClient(SWAPIClientConfig{
Service: "swapi.planet.PlanetService",
})
if err != nil {
return nil, err
}
Swapi_Species_SpeciesServiceClient, err := cfg.Client.Swapi_Species_SpeciesServiceClient(SWAPIClientConfig{
Service: "swapi.species.SpeciesService",
})
if err != nil {
return nil, err
}
Swapi_Starship_StarshipServiceClient, err := cfg.Client.Swapi_Starship_StarshipServiceClient(SWAPIClientConfig{
Service: "swapi.starship.StarshipService",
})
if err != nil {
return nil, err
}
Swapi_Vehicle_VehicleServiceClient, err := cfg.Client.Swapi_Vehicle_VehicleServiceClient(SWAPIClientConfig{
Service: "swapi.vehicle.VehicleService",
})
if err != nil {
return nil, err
}
logger := cfg.Logger
if logger == nil {
logger = slog.New(slog.NewJSONHandler(io.Discard, nil))
}
errorHandler := cfg.ErrorHandler
if errorHandler == nil {
errorHandler = func(ctx context.Context, methodName string, err error) error { return err }
}
celTypeHelperFieldMap := grpcfed.CELTypeHelperFieldMap{
"grpc.federation.private.swapi.FilmsArgument": {
"ids": grpcfed.NewCELFieldType(grpcfed.NewCELListType(grpcfed.CELIntType), "Ids"),
},
"grpc.federation.private.swapi.GetFilmReplyArgument": {
"id": grpcfed.NewCELFieldType(grpcfed.CELIntType, "Id"),
},
"grpc.federation.private.swapi.GetPersonReplyArgument": {
"id": grpcfed.NewCELFieldType(grpcfed.CELIntType, "Id"),
},
"grpc.federation.private.swapi.GetPlanetReplyArgument": {
"id": grpcfed.NewCELFieldType(grpcfed.CELIntType, "Id"),
},
"grpc.federation.private.swapi.GetSpeciesReplyArgument": {
"id": grpcfed.NewCELFieldType(grpcfed.CELIntType, "Id"),
},
"grpc.federation.private.swapi.GetStarshipReplyArgument": {
"id": grpcfed.NewCELFieldType(grpcfed.CELIntType, "Id"),
},
"grpc.federation.private.swapi.GetVehicleReplyArgument": {
"id": grpcfed.NewCELFieldType(grpcfed.CELIntType, "Id"),
},
"grpc.federation.private.swapi.ListFilmsReplyArgument": {
"ids": grpcfed.NewCELFieldType(grpcfed.NewCELListType(grpcfed.CELIntType), "Ids"),
},
"grpc.federation.private.swapi.ListPeopleReplyArgument": {
"ids": grpcfed.NewCELFieldType(grpcfed.NewCELListType(grpcfed.CELIntType), "Ids"),
},
"grpc.federation.private.swapi.ListPlanetsReplyArgument": {
"ids": grpcfed.NewCELFieldType(grpcfed.NewCELListType(grpcfed.CELIntType), "Ids"),
},
"grpc.federation.private.swapi.ListSpeciesReplyArgument": {
"ids": grpcfed.NewCELFieldType(grpcfed.NewCELListType(grpcfed.CELIntType), "Ids"),
},
"grpc.federation.private.swapi.ListStarshipsReplyArgument": {
"ids": grpcfed.NewCELFieldType(grpcfed.NewCELListType(grpcfed.CELIntType), "Ids"),
},
"grpc.federation.private.swapi.ListVehiclesReplyArgument": {
"ids": grpcfed.NewCELFieldType(grpcfed.NewCELListType(grpcfed.CELIntType), "Ids"),
},
"grpc.federation.private.swapi.PeopleArgument": {
"ids": grpcfed.NewCELFieldType(grpcfed.NewCELListType(grpcfed.CELIntType), "Ids"),
},
"grpc.federation.private.swapi.PlanetsArgument": {
"ids": grpcfed.NewCELFieldType(grpcfed.NewCELListType(grpcfed.CELIntType), "Ids"),
},
"grpc.federation.private.swapi.SpeciesListArgument": {
"ids": grpcfed.NewCELFieldType(grpcfed.NewCELListType(grpcfed.CELIntType), "Ids"),
},
"grpc.federation.private.swapi.StarshipsArgument": {
"ids": grpcfed.NewCELFieldType(grpcfed.NewCELListType(grpcfed.CELIntType), "Ids"),
},
"grpc.federation.private.swapi.VehiclesArgument": {
"ids": grpcfed.NewCELFieldType(grpcfed.NewCELListType(grpcfed.CELIntType), "Ids"),
},
}
celTypeHelper := grpcfed.NewCELTypeHelper("swapi", celTypeHelperFieldMap)
var celEnvOpts []grpcfed.CELEnvOption
celEnvOpts = append(celEnvOpts, grpcfed.NewDefaultEnvOptions(celTypeHelper)...)
svc := &SWAPI{
cfg: cfg,
logger: logger,
errorHandler: errorHandler,
celEnvOpts: celEnvOpts,
celTypeHelper: celTypeHelper,
celCacheMap: grpcfed.NewCELCacheMap(),
tracer: otel.Tracer("swapi.SWAPI"),
client: &SWAPIDependentClientSet{
Swapi_Film_FilmServiceClient: Swapi_Film_FilmServiceClient,
Swapi_Person_PersonServiceClient: Swapi_Person_PersonServiceClient,
Swapi_Planet_PlanetServiceClient: Swapi_Planet_PlanetServiceClient,
Swapi_Species_SpeciesServiceClient: Swapi_Species_SpeciesServiceClient,
Swapi_Starship_StarshipServiceClient: Swapi_Starship_StarshipServiceClient,
Swapi_Vehicle_VehicleServiceClient: Swapi_Vehicle_VehicleServiceClient,
},
}
return svc, nil
}
// CleanupSWAPI cleanup all resources to prevent goroutine leaks.
func CleanupSWAPI(ctx context.Context, svc *SWAPI) {
svc.cleanup(ctx)
}
func (s *SWAPI) cleanup(ctx context.Context) {
for _, instance := range s.celPluginInstances {
instance.Close(ctx)
}
}
// GetPerson implements "swapi.SWAPI/GetPerson" method.
func (s *SWAPI) GetPerson(ctx context.Context, req *GetPersonRequest) (res *GetPersonReply, e error) {
ctx, span := s.tracer.Start(ctx, "swapi.SWAPI/GetPerson")
defer span.End()
ctx = grpcfed.WithLogger(ctx, s.logger)
ctx = grpcfed.WithCELCacheMap(ctx, s.celCacheMap)
defer func() {
if r := recover(); r != nil {
e = grpcfed.RecoverError(r, grpcfed.StackTrace())
grpcfed.OutputErrorLog(ctx, e)
}
}()
defer func() {
// cleanup plugin instance memory.
for _, instance := range s.celPluginInstances {
instance.GC()
}
}()
res, err := s.resolve_Swapi_GetPersonReply(ctx, &SWAPI_Swapi_GetPersonReplyArgument{
Id: req.GetId(),
})
if err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
grpcfed.OutputErrorLog(ctx, err)
return nil, err
}
return res, nil
}
// ListPeople implements "swapi.SWAPI/ListPeople" method.
func (s *SWAPI) ListPeople(ctx context.Context, req *ListPeopleRequest) (res *ListPeopleReply, e error) {
ctx, span := s.tracer.Start(ctx, "swapi.SWAPI/ListPeople")
defer span.End()
ctx = grpcfed.WithLogger(ctx, s.logger)
ctx = grpcfed.WithCELCacheMap(ctx, s.celCacheMap)
defer func() {
if r := recover(); r != nil {
e = grpcfed.RecoverError(r, grpcfed.StackTrace())
grpcfed.OutputErrorLog(ctx, e)
}
}()
defer func() {
// cleanup plugin instance memory.
for _, instance := range s.celPluginInstances {
instance.GC()
}
}()
res, err := s.resolve_Swapi_ListPeopleReply(ctx, &SWAPI_Swapi_ListPeopleReplyArgument{
Ids: req.GetIds(),
})
if err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
grpcfed.OutputErrorLog(ctx, err)
return nil, err
}
return res, nil
}
// GetFilm implements "swapi.SWAPI/GetFilm" method.
func (s *SWAPI) GetFilm(ctx context.Context, req *GetFilmRequest) (res *GetFilmReply, e error) {
ctx, span := s.tracer.Start(ctx, "swapi.SWAPI/GetFilm")
defer span.End()
ctx = grpcfed.WithLogger(ctx, s.logger)
ctx = grpcfed.WithCELCacheMap(ctx, s.celCacheMap)
defer func() {
if r := recover(); r != nil {
e = grpcfed.RecoverError(r, grpcfed.StackTrace())
grpcfed.OutputErrorLog(ctx, e)
}
}()
defer func() {
// cleanup plugin instance memory.
for _, instance := range s.celPluginInstances {
instance.GC()
}
}()
res, err := s.resolve_Swapi_GetFilmReply(ctx, &SWAPI_Swapi_GetFilmReplyArgument{
Id: req.GetId(),
})
if err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
grpcfed.OutputErrorLog(ctx, err)
return nil, err
}
return res, nil
}
// ListFilms implements "swapi.SWAPI/ListFilms" method.
func (s *SWAPI) ListFilms(ctx context.Context, req *ListFilmsRequest) (res *ListFilmsReply, e error) {
ctx, span := s.tracer.Start(ctx, "swapi.SWAPI/ListFilms")
defer span.End()
ctx = grpcfed.WithLogger(ctx, s.logger)
ctx = grpcfed.WithCELCacheMap(ctx, s.celCacheMap)
defer func() {
if r := recover(); r != nil {
e = grpcfed.RecoverError(r, grpcfed.StackTrace())
grpcfed.OutputErrorLog(ctx, e)
}
}()
defer func() {
// cleanup plugin instance memory.
for _, instance := range s.celPluginInstances {
instance.GC()
}
}()
res, err := s.resolve_Swapi_ListFilmsReply(ctx, &SWAPI_Swapi_ListFilmsReplyArgument{
Ids: req.GetIds(),
})
if err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
grpcfed.OutputErrorLog(ctx, err)
return nil, err
}
return res, nil
}
// GetStarship implements "swapi.SWAPI/GetStarship" method.
func (s *SWAPI) GetStarship(ctx context.Context, req *GetStarshipRequest) (res *GetStarshipReply, e error) {
ctx, span := s.tracer.Start(ctx, "swapi.SWAPI/GetStarship")
defer span.End()
ctx = grpcfed.WithLogger(ctx, s.logger)
ctx = grpcfed.WithCELCacheMap(ctx, s.celCacheMap)
defer func() {
if r := recover(); r != nil {
e = grpcfed.RecoverError(r, grpcfed.StackTrace())
grpcfed.OutputErrorLog(ctx, e)
}
}()
defer func() {
// cleanup plugin instance memory.
for _, instance := range s.celPluginInstances {
instance.GC()
}
}()
res, err := s.resolve_Swapi_GetStarshipReply(ctx, &SWAPI_Swapi_GetStarshipReplyArgument{
Id: req.GetId(),
})
if err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
grpcfed.OutputErrorLog(ctx, err)
return nil, err
}
return res, nil
}
// ListStarships implements "swapi.SWAPI/ListStarships" method.
func (s *SWAPI) ListStarships(ctx context.Context, req *ListStarshipsRequest) (res *ListStarshipsReply, e error) {
ctx, span := s.tracer.Start(ctx, "swapi.SWAPI/ListStarships")
defer span.End()
ctx = grpcfed.WithLogger(ctx, s.logger)
ctx = grpcfed.WithCELCacheMap(ctx, s.celCacheMap)
defer func() {
if r := recover(); r != nil {
e = grpcfed.RecoverError(r, grpcfed.StackTrace())
grpcfed.OutputErrorLog(ctx, e)
}
}()
defer func() {
// cleanup plugin instance memory.
for _, instance := range s.celPluginInstances {
instance.GC()
}
}()
res, err := s.resolve_Swapi_ListStarshipsReply(ctx, &SWAPI_Swapi_ListStarshipsReplyArgument{
Ids: req.GetIds(),
})
if err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
grpcfed.OutputErrorLog(ctx, err)
return nil, err
}
return res, nil
}
// GetSpecies implements "swapi.SWAPI/GetSpecies" method.
func (s *SWAPI) GetSpecies(ctx context.Context, req *GetSpeciesRequest) (res *GetSpeciesReply, e error) {
ctx, span := s.tracer.Start(ctx, "swapi.SWAPI/GetSpecies")
defer span.End()
ctx = grpcfed.WithLogger(ctx, s.logger)
ctx = grpcfed.WithCELCacheMap(ctx, s.celCacheMap)
defer func() {
if r := recover(); r != nil {
e = grpcfed.RecoverError(r, grpcfed.StackTrace())
grpcfed.OutputErrorLog(ctx, e)
}
}()
defer func() {
// cleanup plugin instance memory.
for _, instance := range s.celPluginInstances {
instance.GC()
}
}()
res, err := s.resolve_Swapi_GetSpeciesReply(ctx, &SWAPI_Swapi_GetSpeciesReplyArgument{
Id: req.GetId(),
})
if err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
grpcfed.OutputErrorLog(ctx, err)
return nil, err
}
return res, nil
}
// ListSpecies implements "swapi.SWAPI/ListSpecies" method.
func (s *SWAPI) ListSpecies(ctx context.Context, req *ListSpeciesRequest) (res *ListSpeciesReply, e error) {
ctx, span := s.tracer.Start(ctx, "swapi.SWAPI/ListSpecies")
defer span.End()
ctx = grpcfed.WithLogger(ctx, s.logger)
ctx = grpcfed.WithCELCacheMap(ctx, s.celCacheMap)
defer func() {
if r := recover(); r != nil {
e = grpcfed.RecoverError(r, grpcfed.StackTrace())
grpcfed.OutputErrorLog(ctx, e)
}
}()
defer func() {
// cleanup plugin instance memory.
for _, instance := range s.celPluginInstances {
instance.GC()
}
}()
res, err := s.resolve_Swapi_ListSpeciesReply(ctx, &SWAPI_Swapi_ListSpeciesReplyArgument{
Ids: req.GetIds(),
})
if err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
grpcfed.OutputErrorLog(ctx, err)
return nil, err
}
return res, nil
}
// GetVehicle implements "swapi.SWAPI/GetVehicle" method.
func (s *SWAPI) GetVehicle(ctx context.Context, req *GetVehicleRequest) (res *GetVehicleReply, e error) {
ctx, span := s.tracer.Start(ctx, "swapi.SWAPI/GetVehicle")
defer span.End()
ctx = grpcfed.WithLogger(ctx, s.logger)
ctx = grpcfed.WithCELCacheMap(ctx, s.celCacheMap)
defer func() {
if r := recover(); r != nil {
e = grpcfed.RecoverError(r, grpcfed.StackTrace())
grpcfed.OutputErrorLog(ctx, e)
}
}()
defer func() {
// cleanup plugin instance memory.
for _, instance := range s.celPluginInstances {
instance.GC()
}
}()
res, err := s.resolve_Swapi_GetVehicleReply(ctx, &SWAPI_Swapi_GetVehicleReplyArgument{
Id: req.GetId(),
})
if err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
grpcfed.OutputErrorLog(ctx, err)
return nil, err
}
return res, nil
}
// ListVehicles implements "swapi.SWAPI/ListVehicles" method.
func (s *SWAPI) ListVehicles(ctx context.Context, req *ListVehiclesRequest) (res *ListVehiclesReply, e error) {
ctx, span := s.tracer.Start(ctx, "swapi.SWAPI/ListVehicles")
defer span.End()
ctx = grpcfed.WithLogger(ctx, s.logger)
ctx = grpcfed.WithCELCacheMap(ctx, s.celCacheMap)
defer func() {
if r := recover(); r != nil {
e = grpcfed.RecoverError(r, grpcfed.StackTrace())
grpcfed.OutputErrorLog(ctx, e)
}
}()
defer func() {
// cleanup plugin instance memory.
for _, instance := range s.celPluginInstances {
instance.GC()
}
}()
res, err := s.resolve_Swapi_ListVehiclesReply(ctx, &SWAPI_Swapi_ListVehiclesReplyArgument{
Ids: req.GetIds(),
})
if err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
grpcfed.OutputErrorLog(ctx, err)
return nil, err
}
return res, nil
}
// GetPlanet implements "swapi.SWAPI/GetPlanet" method.
func (s *SWAPI) GetPlanet(ctx context.Context, req *GetPlanetRequest) (res *GetPlanetReply, e error) {
ctx, span := s.tracer.Start(ctx, "swapi.SWAPI/GetPlanet")
defer span.End()
ctx = grpcfed.WithLogger(ctx, s.logger)
ctx = grpcfed.WithCELCacheMap(ctx, s.celCacheMap)
defer func() {
if r := recover(); r != nil {
e = grpcfed.RecoverError(r, grpcfed.StackTrace())
grpcfed.OutputErrorLog(ctx, e)
}
}()
defer func() {
// cleanup plugin instance memory.
for _, instance := range s.celPluginInstances {
instance.GC()
}
}()
res, err := s.resolve_Swapi_GetPlanetReply(ctx, &SWAPI_Swapi_GetPlanetReplyArgument{
Id: req.GetId(),
})
if err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
grpcfed.OutputErrorLog(ctx, err)
return nil, err
}
return res, nil
}
// ListPlanets implements "swapi.SWAPI/ListPlanets" method.
func (s *SWAPI) ListPlanets(ctx context.Context, req *ListPlanetsRequest) (res *ListPlanetsReply, e error) {
ctx, span := s.tracer.Start(ctx, "swapi.SWAPI/ListPlanets")
defer span.End()
ctx = grpcfed.WithLogger(ctx, s.logger)
ctx = grpcfed.WithCELCacheMap(ctx, s.celCacheMap)
defer func() {
if r := recover(); r != nil {
e = grpcfed.RecoverError(r, grpcfed.StackTrace())
grpcfed.OutputErrorLog(ctx, e)
}
}()
defer func() {
// cleanup plugin instance memory.
for _, instance := range s.celPluginInstances {
instance.GC()
}
}()
res, err := s.resolve_Swapi_ListPlanetsReply(ctx, &SWAPI_Swapi_ListPlanetsReplyArgument{
Ids: req.GetIds(),
})
if err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
grpcfed.OutputErrorLog(ctx, err)
return nil, err
}
return res, nil
}
// resolve_Swapi_Films resolve "swapi.Films" message.
func (s *SWAPI) resolve_Swapi_Films(ctx context.Context, req *SWAPI_Swapi_FilmsArgument) (*Films, error) {
ctx, span := s.tracer.Start(ctx, "swapi.Films")
defer span.End()
ctx = grpcfed.WithLogger(ctx, grpcfed.Logger(ctx), grpcfed.LogAttrs(ctx)...)
grpcfed.Logger(ctx).DebugContext(ctx, "resolve swapi.Films", slog.Any("message_args", s.logvalue_Swapi_FilmsArgument(req)))
type localValueType struct {
*grpcfed.LocalValue
vars struct {
Res *filmpb.ListFilmsReply
}
}
value := &localValueType{LocalValue: grpcfed.NewLocalValue(ctx, s.celEnvOpts, "grpc.federation.private.swapi.FilmsArgument", req)}
/*
def {
name: "res"
call {
method: "swapi.film.FilmService/ListFilms"
request { field: "ids", by: "$.ids" }
}
}
*/
def_res := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[*filmpb.ListFilmsReply, *localValueType]{
Name: `res`,
Type: grpcfed.CELObjectType("swapi.film.ListFilmsReply"),
Setter: func(value *localValueType, v *filmpb.ListFilmsReply) error {
value.vars.Res = v
return nil
},
Message: func(ctx context.Context, value *localValueType) (any, error) {
args := &filmpb.ListFilmsRequest{}
// { field: "ids", by: "$.ids" }
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[[]int64]{
Value: value,
Expr: `$.ids`,
CacheIndex: 1,
Setter: func(v []int64) error {
args.Ids = v
return nil
},
}); err != nil {
return nil, err
}
grpcfed.Logger(ctx).DebugContext(ctx, "call swapi.film.FilmService/ListFilms", slog.Any("swapi.film.ListFilmsRequest", s.logvalue_Swapi_Film_ListFilmsRequest(args)))
ret, err := s.client.Swapi_Film_FilmServiceClient.ListFilms(ctx, args)
if err != nil {
if err := s.errorHandler(ctx, SWAPI_DependentMethod_Swapi_Film_FilmService_ListFilms, err); err != nil {
return nil, grpcfed.NewErrorWithLogAttrs(err, slog.LevelError, grpcfed.LogAttrs(ctx))
}
}
return ret, nil
},
})
}
if err := def_res(ctx); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
// assign named parameters to message arguments to pass to the custom resolver.
req.Res = value.vars.Res
// create a message value to be returned.
ret := &Films{}
// field binding section.
// (grpc.federation.field).by = "res.films"
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[[]*filmpb.Film]{
Value: value,
Expr: `res.films`,
CacheIndex: 2,
Setter: func(v []*filmpb.Film) error {
filmsValue, err := s.cast_repeated_Swapi_Film_Film__to__repeated_Swapi_Film(v)
if err != nil {
return err
}
ret.Films = filmsValue
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
grpcfed.Logger(ctx).DebugContext(ctx, "resolved swapi.Films", slog.Any("swapi.Films", s.logvalue_Swapi_Films(ret)))
return ret, nil
}
// resolve_Swapi_GetFilmReply resolve "swapi.GetFilmReply" message.
func (s *SWAPI) resolve_Swapi_GetFilmReply(ctx context.Context, req *SWAPI_Swapi_GetFilmReplyArgument) (*GetFilmReply, error) {
ctx, span := s.tracer.Start(ctx, "swapi.GetFilmReply")
defer span.End()
ctx = grpcfed.WithLogger(ctx, grpcfed.Logger(ctx), grpcfed.LogAttrs(ctx)...)
grpcfed.Logger(ctx).DebugContext(ctx, "resolve swapi.GetFilmReply", slog.Any("message_args", s.logvalue_Swapi_GetFilmReplyArgument(req)))
type localValueType struct {
*grpcfed.LocalValue
vars struct {
Characters *People
F *filmpb.Film
Planets *Planets
Res *filmpb.GetFilmReply
Species *SpeciesList
Starships *Starships
V *Vehicles
}
}
value := &localValueType{LocalValue: grpcfed.NewLocalValue(ctx, s.celEnvOpts, "grpc.federation.private.swapi.GetFilmReplyArgument", req)}
/*
def {
name: "res"
call {
method: "swapi.film.FilmService/GetFilm"
request { field: "id", by: "$.id" }
}
}
*/
def_res := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[*filmpb.GetFilmReply, *localValueType]{
Name: `res`,
Type: grpcfed.CELObjectType("swapi.film.GetFilmReply"),
Setter: func(value *localValueType, v *filmpb.GetFilmReply) error {
value.vars.Res = v
return nil
},
Message: func(ctx context.Context, value *localValueType) (any, error) {
args := &filmpb.GetFilmRequest{}
// { field: "id", by: "$.id" }
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[int64]{
Value: value,
Expr: `$.id`,
CacheIndex: 3,
Setter: func(v int64) error {
args.Id = v
return nil
},
}); err != nil {
return nil, err
}
grpcfed.Logger(ctx).DebugContext(ctx, "call swapi.film.FilmService/GetFilm", slog.Any("swapi.film.GetFilmRequest", s.logvalue_Swapi_Film_GetFilmRequest(args)))
ret, err := s.client.Swapi_Film_FilmServiceClient.GetFilm(ctx, args)
if err != nil {
if err := s.errorHandler(ctx, SWAPI_DependentMethod_Swapi_Film_FilmService_GetFilm, err); err != nil {
return nil, grpcfed.NewErrorWithLogAttrs(err, slog.LevelError, grpcfed.LogAttrs(ctx))
}
}
return ret, nil
},
})
}
/*
def {
name: "f"
by: "res.film"
}
*/
def_f := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[*filmpb.Film, *localValueType]{
Name: `f`,
Type: grpcfed.CELObjectType("swapi.film.Film"),
Setter: func(value *localValueType, v *filmpb.Film) error {
value.vars.F = v
return nil
},
By: `res.film`,
ByCacheIndex: 4,
})
}
/*
def {
name: "species"
message {
name: "SpeciesList"
args { name: "ids", by: "f.species_ids" }
}
}
*/
def_species := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[*SpeciesList, *localValueType]{
Name: `species`,
Type: grpcfed.CELObjectType("swapi.SpeciesList"),
Setter: func(value *localValueType, v *SpeciesList) error {
value.vars.Species = v
return nil
},
Message: func(ctx context.Context, value *localValueType) (any, error) {
args := &SWAPI_Swapi_SpeciesListArgument{}
// { name: "ids", by: "f.species_ids" }
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[[]int64]{
Value: value,
Expr: `f.species_ids`,
CacheIndex: 5,
Setter: func(v []int64) error {
args.Ids = v
return nil
},
}); err != nil {
return nil, err
}
ret, err := s.resolve_Swapi_SpeciesList(ctx, args)
if err != nil {
return nil, err
}
return ret, nil
},
})
}
/*
def {
name: "starships"
message {
name: "Starships"
args { name: "ids", by: "f.starship_ids" }
}
}
*/
def_starships := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[*Starships, *localValueType]{
Name: `starships`,
Type: grpcfed.CELObjectType("swapi.Starships"),
Setter: func(value *localValueType, v *Starships) error {
value.vars.Starships = v
return nil
},
Message: func(ctx context.Context, value *localValueType) (any, error) {
args := &SWAPI_Swapi_StarshipsArgument{}
// { name: "ids", by: "f.starship_ids" }
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[[]int64]{
Value: value,
Expr: `f.starship_ids`,
CacheIndex: 6,
Setter: func(v []int64) error {
args.Ids = v
return nil
},
}); err != nil {
return nil, err
}
ret, err := s.resolve_Swapi_Starships(ctx, args)
if err != nil {
return nil, err
}
return ret, nil
},
})
}
/*
def {
name: "v"
message {
name: "Vehicles"
args { name: "ids", by: "f.vehicle_ids" }
}
}
*/
def_v := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[*Vehicles, *localValueType]{
Name: `v`,
Type: grpcfed.CELObjectType("swapi.Vehicles"),
Setter: func(value *localValueType, v *Vehicles) error {
value.vars.V = v
return nil
},
Message: func(ctx context.Context, value *localValueType) (any, error) {
args := &SWAPI_Swapi_VehiclesArgument{}
// { name: "ids", by: "f.vehicle_ids" }
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[[]int64]{
Value: value,
Expr: `f.vehicle_ids`,
CacheIndex: 7,
Setter: func(v []int64) error {
args.Ids = v
return nil
},
}); err != nil {
return nil, err
}
ret, err := s.resolve_Swapi_Vehicles(ctx, args)
if err != nil {
return nil, err
}
return ret, nil
},
})
}
/*
def {
name: "characters"
message {
name: "People"
args { name: "ids", by: "f.character_ids" }
}
}
*/
def_characters := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[*People, *localValueType]{
Name: `characters`,
Type: grpcfed.CELObjectType("swapi.People"),
Setter: func(value *localValueType, v *People) error {
value.vars.Characters = v
return nil
},
Message: func(ctx context.Context, value *localValueType) (any, error) {
args := &SWAPI_Swapi_PeopleArgument{}
// { name: "ids", by: "f.character_ids" }
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[[]int64]{
Value: value,
Expr: `f.character_ids`,
CacheIndex: 8,
Setter: func(v []int64) error {
args.Ids = v
return nil
},
}); err != nil {
return nil, err
}
ret, err := s.resolve_Swapi_People(ctx, args)
if err != nil {
return nil, err
}
return ret, nil
},
})
}
/*
def {
name: "planets"
message {
name: "Planets"
args { name: "ids", by: "f.planet_ids" }
}
}
*/
def_planets := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[*Planets, *localValueType]{
Name: `planets`,
Type: grpcfed.CELObjectType("swapi.Planets"),
Setter: func(value *localValueType, v *Planets) error {
value.vars.Planets = v
return nil
},
Message: func(ctx context.Context, value *localValueType) (any, error) {
args := &SWAPI_Swapi_PlanetsArgument{}
// { name: "ids", by: "f.planet_ids" }
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[[]int64]{
Value: value,
Expr: `f.planet_ids`,
CacheIndex: 9,
Setter: func(v []int64) error {
args.Ids = v
return nil
},
}); err != nil {
return nil, err
}
ret, err := s.resolve_Swapi_Planets(ctx, args)
if err != nil {
return nil, err
}
return ret, nil
},
})
}
// A tree view of message dependencies is shown below.
/*
res ─┐
f ─┐
characters ─┐
res ─┐ │
f ─┐ │
planets ─┤
res ─┐ │
f ─┐ │
species ─┤
res ─┐ │
f ─┐ │
starships ─┤
res ─┐ │
f ─┐ │
v ─┤
*/
eg, ctx1 := grpcfed.ErrorGroupWithContext(ctx)
grpcfed.GoWithRecover(eg, func() (any, error) {
if err := def_res(ctx1); err != nil {
grpcfed.RecordErrorToSpan(ctx1, err)
return nil, err
}
if err := def_f(ctx1); err != nil {
grpcfed.RecordErrorToSpan(ctx1, err)
return nil, err
}
if err := def_characters(ctx1); err != nil {
grpcfed.RecordErrorToSpan(ctx1, err)
return nil, err
}
return nil, nil
})
grpcfed.GoWithRecover(eg, func() (any, error) {
if err := def_res(ctx1); err != nil {
grpcfed.RecordErrorToSpan(ctx1, err)
return nil, err
}
if err := def_f(ctx1); err != nil {
grpcfed.RecordErrorToSpan(ctx1, err)
return nil, err
}
if err := def_planets(ctx1); err != nil {
grpcfed.RecordErrorToSpan(ctx1, err)
return nil, err
}
return nil, nil
})
grpcfed.GoWithRecover(eg, func() (any, error) {
if err := def_res(ctx1); err != nil {
grpcfed.RecordErrorToSpan(ctx1, err)
return nil, err
}
if err := def_f(ctx1); err != nil {
grpcfed.RecordErrorToSpan(ctx1, err)
return nil, err
}
if err := def_species(ctx1); err != nil {
grpcfed.RecordErrorToSpan(ctx1, err)
return nil, err
}
return nil, nil
})
grpcfed.GoWithRecover(eg, func() (any, error) {
if err := def_res(ctx1); err != nil {
grpcfed.RecordErrorToSpan(ctx1, err)
return nil, err
}
if err := def_f(ctx1); err != nil {
grpcfed.RecordErrorToSpan(ctx1, err)
return nil, err
}
if err := def_starships(ctx1); err != nil {
grpcfed.RecordErrorToSpan(ctx1, err)
return nil, err
}
return nil, nil
})
grpcfed.GoWithRecover(eg, func() (any, error) {
if err := def_res(ctx1); err != nil {
grpcfed.RecordErrorToSpan(ctx1, err)
return nil, err
}
if err := def_f(ctx1); err != nil {
grpcfed.RecordErrorToSpan(ctx1, err)
return nil, err
}
if err := def_v(ctx1); err != nil {
grpcfed.RecordErrorToSpan(ctx1, err)
return nil, err
}
return nil, nil
})
if err := eg.Wait(); err != nil {
return nil, err
}
// assign named parameters to message arguments to pass to the custom resolver.
req.Characters = value.vars.Characters
req.F = value.vars.F
req.Planets = value.vars.Planets
req.Res = value.vars.Res
req.Species = value.vars.Species
req.Starships = value.vars.Starships
req.V = value.vars.V
// create a message value to be returned.
ret := &GetFilmReply{}
// field binding section.
// (grpc.federation.field).by = "f"
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[*filmpb.Film]{
Value: value,
Expr: `f`,
CacheIndex: 10,
Setter: func(v *filmpb.Film) error {
filmValue, err := s.cast_Swapi_Film_Film__to__Swapi_Film(v)
if err != nil {
return err
}
ret.Film = filmValue
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
// (grpc.federation.field).by = "species.species"
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[[]*Species]{
Value: value,
Expr: `species.species`,
CacheIndex: 11,
Setter: func(v []*Species) error {
ret.Species = v
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
// (grpc.federation.field).by = "starships.starships"
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[[]*Starship]{
Value: value,
Expr: `starships.starships`,
CacheIndex: 12,
Setter: func(v []*Starship) error {
ret.Starships = v
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
// (grpc.federation.field).by = "v.vehicles"
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[[]*Vehicle]{
Value: value,
Expr: `v.vehicles`,
CacheIndex: 13,
Setter: func(v []*Vehicle) error {
ret.Vehicles = v
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
// (grpc.federation.field).by = "characters.people"
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[[]*Person]{
Value: value,
Expr: `characters.people`,
CacheIndex: 14,
Setter: func(v []*Person) error {
ret.Characters = v
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
// (grpc.federation.field).by = "planets.planets"
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[[]*Planet]{
Value: value,
Expr: `planets.planets`,
CacheIndex: 15,
Setter: func(v []*Planet) error {
ret.Planets = v
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
grpcfed.Logger(ctx).DebugContext(ctx, "resolved swapi.GetFilmReply", slog.Any("swapi.GetFilmReply", s.logvalue_Swapi_GetFilmReply(ret)))
return ret, nil
}
// resolve_Swapi_GetPersonReply resolve "swapi.GetPersonReply" message.
func (s *SWAPI) resolve_Swapi_GetPersonReply(ctx context.Context, req *SWAPI_Swapi_GetPersonReplyArgument) (*GetPersonReply, error) {
ctx, span := s.tracer.Start(ctx, "swapi.GetPersonReply")
defer span.End()
ctx = grpcfed.WithLogger(ctx, grpcfed.Logger(ctx), grpcfed.LogAttrs(ctx)...)
grpcfed.Logger(ctx).DebugContext(ctx, "resolve swapi.GetPersonReply", slog.Any("message_args", s.logvalue_Swapi_GetPersonReplyArgument(req)))
type localValueType struct {
*grpcfed.LocalValue
vars struct {
F *Films
P *personpb.Person
Res *personpb.GetPersonReply
Species *SpeciesList
Starships *Starships
V *Vehicles
}
}
value := &localValueType{LocalValue: grpcfed.NewLocalValue(ctx, s.celEnvOpts, "grpc.federation.private.swapi.GetPersonReplyArgument", req)}
/*
def {
name: "res"
call {
method: "swapi.person.PersonService/GetPerson"
request { field: "id", by: "$.id" }
}
}
*/
def_res := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[*personpb.GetPersonReply, *localValueType]{
Name: `res`,
Type: grpcfed.CELObjectType("swapi.person.GetPersonReply"),
Setter: func(value *localValueType, v *personpb.GetPersonReply) error {
value.vars.Res = v
return nil
},
Message: func(ctx context.Context, value *localValueType) (any, error) {
args := &personpb.GetPersonRequest{}
// { field: "id", by: "$.id" }
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[int64]{
Value: value,
Expr: `$.id`,
CacheIndex: 16,
Setter: func(v int64) error {
args.Id = v
return nil
},
}); err != nil {
return nil, err
}
grpcfed.Logger(ctx).DebugContext(ctx, "call swapi.person.PersonService/GetPerson", slog.Any("swapi.person.GetPersonRequest", s.logvalue_Swapi_Person_GetPersonRequest(args)))
ret, err := s.client.Swapi_Person_PersonServiceClient.GetPerson(ctx, args)
if err != nil {
if err := s.errorHandler(ctx, SWAPI_DependentMethod_Swapi_Person_PersonService_GetPerson, err); err != nil {
return nil, grpcfed.NewErrorWithLogAttrs(err, slog.LevelError, grpcfed.LogAttrs(ctx))
}
}
return ret, nil
},
})
}
/*
def {
name: "p"
by: "res.person"
}
*/
def_p := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[*personpb.Person, *localValueType]{
Name: `p`,
Type: grpcfed.CELObjectType("swapi.person.Person"),
Setter: func(value *localValueType, v *personpb.Person) error {
value.vars.P = v
return nil
},
By: `res.person`,
ByCacheIndex: 17,
})
}
/*
def {
name: "f"
message {
name: "Films"
args { name: "ids", by: "p.film_ids" }
}
}
*/
def_f := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[*Films, *localValueType]{
Name: `f`,
Type: grpcfed.CELObjectType("swapi.Films"),
Setter: func(value *localValueType, v *Films) error {
value.vars.F = v
return nil
},
Message: func(ctx context.Context, value *localValueType) (any, error) {
args := &SWAPI_Swapi_FilmsArgument{}
// { name: "ids", by: "p.film_ids" }
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[[]int64]{
Value: value,
Expr: `p.film_ids`,
CacheIndex: 18,
Setter: func(v []int64) error {
args.Ids = v
return nil
},
}); err != nil {
return nil, err
}
ret, err := s.resolve_Swapi_Films(ctx, args)
if err != nil {
return nil, err
}
return ret, nil
},
})
}
/*
def {
name: "species"
message {
name: "SpeciesList"
args { name: "ids", by: "p.species_ids" }
}
}
*/
def_species := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[*SpeciesList, *localValueType]{
Name: `species`,
Type: grpcfed.CELObjectType("swapi.SpeciesList"),
Setter: func(value *localValueType, v *SpeciesList) error {
value.vars.Species = v
return nil
},
Message: func(ctx context.Context, value *localValueType) (any, error) {
args := &SWAPI_Swapi_SpeciesListArgument{}
// { name: "ids", by: "p.species_ids" }
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[[]int64]{
Value: value,
Expr: `p.species_ids`,
CacheIndex: 19,
Setter: func(v []int64) error {
args.Ids = v
return nil
},
}); err != nil {
return nil, err
}
ret, err := s.resolve_Swapi_SpeciesList(ctx, args)
if err != nil {
return nil, err
}
return ret, nil
},
})
}
/*
def {
name: "starships"
message {
name: "Starships"
args { name: "ids", by: "p.starship_ids" }
}
}
*/
def_starships := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[*Starships, *localValueType]{
Name: `starships`,
Type: grpcfed.CELObjectType("swapi.Starships"),
Setter: func(value *localValueType, v *Starships) error {
value.vars.Starships = v
return nil
},
Message: func(ctx context.Context, value *localValueType) (any, error) {
args := &SWAPI_Swapi_StarshipsArgument{}
// { name: "ids", by: "p.starship_ids" }
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[[]int64]{
Value: value,
Expr: `p.starship_ids`,
CacheIndex: 20,
Setter: func(v []int64) error {
args.Ids = v
return nil
},
}); err != nil {
return nil, err
}
ret, err := s.resolve_Swapi_Starships(ctx, args)
if err != nil {
return nil, err
}
return ret, nil
},
})
}
/*
def {
name: "v"
message {
name: "Vehicles"
args { name: "ids", by: "p.vehicle_ids" }
}
}
*/
def_v := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[*Vehicles, *localValueType]{
Name: `v`,
Type: grpcfed.CELObjectType("swapi.Vehicles"),
Setter: func(value *localValueType, v *Vehicles) error {
value.vars.V = v
return nil
},
Message: func(ctx context.Context, value *localValueType) (any, error) {
args := &SWAPI_Swapi_VehiclesArgument{}
// { name: "ids", by: "p.vehicle_ids" }
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[[]int64]{
Value: value,
Expr: `p.vehicle_ids`,
CacheIndex: 21,
Setter: func(v []int64) error {
args.Ids = v
return nil
},
}); err != nil {
return nil, err
}
ret, err := s.resolve_Swapi_Vehicles(ctx, args)
if err != nil {
return nil, err
}
return ret, nil
},
})
}
// A tree view of message dependencies is shown below.
/*
res ─┐
p ─┐
f ─┐
res ─┐ │
p ─┐ │
species ─┤
res ─┐ │
p ─┐ │
starships ─┤
res ─┐ │
p ─┐ │
v ─┤
*/
eg, ctx1 := grpcfed.ErrorGroupWithContext(ctx)
grpcfed.GoWithRecover(eg, func() (any, error) {
if err := def_res(ctx1); err != nil {
grpcfed.RecordErrorToSpan(ctx1, err)
return nil, err
}
if err := def_p(ctx1); err != nil {
grpcfed.RecordErrorToSpan(ctx1, err)
return nil, err
}
if err := def_f(ctx1); err != nil {
grpcfed.RecordErrorToSpan(ctx1, err)
return nil, err
}
return nil, nil
})
grpcfed.GoWithRecover(eg, func() (any, error) {
if err := def_res(ctx1); err != nil {
grpcfed.RecordErrorToSpan(ctx1, err)
return nil, err
}
if err := def_p(ctx1); err != nil {
grpcfed.RecordErrorToSpan(ctx1, err)
return nil, err
}
if err := def_species(ctx1); err != nil {
grpcfed.RecordErrorToSpan(ctx1, err)
return nil, err
}
return nil, nil
})
grpcfed.GoWithRecover(eg, func() (any, error) {
if err := def_res(ctx1); err != nil {
grpcfed.RecordErrorToSpan(ctx1, err)
return nil, err
}
if err := def_p(ctx1); err != nil {
grpcfed.RecordErrorToSpan(ctx1, err)
return nil, err
}
if err := def_starships(ctx1); err != nil {
grpcfed.RecordErrorToSpan(ctx1, err)
return nil, err
}
return nil, nil
})
grpcfed.GoWithRecover(eg, func() (any, error) {
if err := def_res(ctx1); err != nil {
grpcfed.RecordErrorToSpan(ctx1, err)
return nil, err
}
if err := def_p(ctx1); err != nil {
grpcfed.RecordErrorToSpan(ctx1, err)
return nil, err
}
if err := def_v(ctx1); err != nil {
grpcfed.RecordErrorToSpan(ctx1, err)
return nil, err
}
return nil, nil
})
if err := eg.Wait(); err != nil {
return nil, err
}
// assign named parameters to message arguments to pass to the custom resolver.
req.F = value.vars.F
req.P = value.vars.P
req.Res = value.vars.Res
req.Species = value.vars.Species
req.Starships = value.vars.Starships
req.V = value.vars.V
// create a message value to be returned.
ret := &GetPersonReply{}
// field binding section.
// (grpc.federation.field).by = "p"
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[*personpb.Person]{
Value: value,
Expr: `p`,
CacheIndex: 22,
Setter: func(v *personpb.Person) error {
personValue, err := s.cast_Swapi_Person_Person__to__Swapi_Person(v)
if err != nil {
return err
}
ret.Person = personValue
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
// (grpc.federation.field).by = "f.films"
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[[]*Film]{
Value: value,
Expr: `f.films`,
CacheIndex: 23,
Setter: func(v []*Film) error {
ret.Films = v
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
// (grpc.federation.field).by = "species.species"
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[[]*Species]{
Value: value,
Expr: `species.species`,
CacheIndex: 24,
Setter: func(v []*Species) error {
ret.Species = v
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
// (grpc.federation.field).by = "starships.starships"
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[[]*Starship]{
Value: value,
Expr: `starships.starships`,
CacheIndex: 25,
Setter: func(v []*Starship) error {
ret.Starships = v
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
// (grpc.federation.field).by = "v.vehicles"
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[[]*Vehicle]{
Value: value,
Expr: `v.vehicles`,
CacheIndex: 26,
Setter: func(v []*Vehicle) error {
ret.Vehicles = v
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
grpcfed.Logger(ctx).DebugContext(ctx, "resolved swapi.GetPersonReply", slog.Any("swapi.GetPersonReply", s.logvalue_Swapi_GetPersonReply(ret)))
return ret, nil
}
// resolve_Swapi_GetPlanetReply resolve "swapi.GetPlanetReply" message.
func (s *SWAPI) resolve_Swapi_GetPlanetReply(ctx context.Context, req *SWAPI_Swapi_GetPlanetReplyArgument) (*GetPlanetReply, error) {
ctx, span := s.tracer.Start(ctx, "swapi.GetPlanetReply")
defer span.End()
ctx = grpcfed.WithLogger(ctx, grpcfed.Logger(ctx), grpcfed.LogAttrs(ctx)...)
grpcfed.Logger(ctx).DebugContext(ctx, "resolve swapi.GetPlanetReply", slog.Any("message_args", s.logvalue_Swapi_GetPlanetReplyArgument(req)))
type localValueType struct {
*grpcfed.LocalValue
vars struct {
F *Films
P *planetpb.Planet
Res *planetpb.GetPlanetReply
Residents *People
}
}
value := &localValueType{LocalValue: grpcfed.NewLocalValue(ctx, s.celEnvOpts, "grpc.federation.private.swapi.GetPlanetReplyArgument", req)}
/*
def {
name: "res"
call {
method: "swapi.planet.PlanetService/GetPlanet"
request { field: "id", by: "$.id" }
}
}
*/
def_res := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[*planetpb.GetPlanetReply, *localValueType]{
Name: `res`,
Type: grpcfed.CELObjectType("swapi.planet.GetPlanetReply"),
Setter: func(value *localValueType, v *planetpb.GetPlanetReply) error {
value.vars.Res = v
return nil
},
Message: func(ctx context.Context, value *localValueType) (any, error) {
args := &planetpb.GetPlanetRequest{}
// { field: "id", by: "$.id" }
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[int64]{
Value: value,
Expr: `$.id`,
CacheIndex: 27,
Setter: func(v int64) error {
args.Id = v
return nil
},
}); err != nil {
return nil, err
}
grpcfed.Logger(ctx).DebugContext(ctx, "call swapi.planet.PlanetService/GetPlanet", slog.Any("swapi.planet.GetPlanetRequest", s.logvalue_Swapi_Planet_GetPlanetRequest(args)))
ret, err := s.client.Swapi_Planet_PlanetServiceClient.GetPlanet(ctx, args)
if err != nil {
if err := s.errorHandler(ctx, SWAPI_DependentMethod_Swapi_Planet_PlanetService_GetPlanet, err); err != nil {
return nil, grpcfed.NewErrorWithLogAttrs(err, slog.LevelError, grpcfed.LogAttrs(ctx))
}
}
return ret, nil
},
})
}
/*
def {
name: "p"
by: "res.planet"
}
*/
def_p := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[*planetpb.Planet, *localValueType]{
Name: `p`,
Type: grpcfed.CELObjectType("swapi.planet.Planet"),
Setter: func(value *localValueType, v *planetpb.Planet) error {
value.vars.P = v
return nil
},
By: `res.planet`,
ByCacheIndex: 28,
})
}
/*
def {
name: "residents"
message {
name: "People"
args { name: "ids", by: "p.resident_ids" }
}
}
*/
def_residents := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[*People, *localValueType]{
Name: `residents`,
Type: grpcfed.CELObjectType("swapi.People"),
Setter: func(value *localValueType, v *People) error {
value.vars.Residents = v
return nil
},
Message: func(ctx context.Context, value *localValueType) (any, error) {
args := &SWAPI_Swapi_PeopleArgument{}
// { name: "ids", by: "p.resident_ids" }
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[[]int64]{
Value: value,
Expr: `p.resident_ids`,
CacheIndex: 29,
Setter: func(v []int64) error {
args.Ids = v
return nil
},
}); err != nil {
return nil, err
}
ret, err := s.resolve_Swapi_People(ctx, args)
if err != nil {
return nil, err
}
return ret, nil
},
})
}
/*
def {
name: "f"
message {
name: "Films"
args { name: "ids", by: "p.film_ids" }
}
}
*/
def_f := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[*Films, *localValueType]{
Name: `f`,
Type: grpcfed.CELObjectType("swapi.Films"),
Setter: func(value *localValueType, v *Films) error {
value.vars.F = v
return nil
},
Message: func(ctx context.Context, value *localValueType) (any, error) {
args := &SWAPI_Swapi_FilmsArgument{}
// { name: "ids", by: "p.film_ids" }
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[[]int64]{
Value: value,
Expr: `p.film_ids`,
CacheIndex: 30,
Setter: func(v []int64) error {
args.Ids = v
return nil
},
}); err != nil {
return nil, err
}
ret, err := s.resolve_Swapi_Films(ctx, args)
if err != nil {
return nil, err
}
return ret, nil
},
})
}
// A tree view of message dependencies is shown below.
/*
res ─┐
p ─┐
f ─┐
res ─┐ │
p ─┐ │
residents ─┤
*/
eg, ctx1 := grpcfed.ErrorGroupWithContext(ctx)
grpcfed.GoWithRecover(eg, func() (any, error) {
if err := def_res(ctx1); err != nil {
grpcfed.RecordErrorToSpan(ctx1, err)
return nil, err
}
if err := def_p(ctx1); err != nil {
grpcfed.RecordErrorToSpan(ctx1, err)
return nil, err
}
if err := def_f(ctx1); err != nil {
grpcfed.RecordErrorToSpan(ctx1, err)
return nil, err
}
return nil, nil
})
grpcfed.GoWithRecover(eg, func() (any, error) {
if err := def_res(ctx1); err != nil {
grpcfed.RecordErrorToSpan(ctx1, err)
return nil, err
}
if err := def_p(ctx1); err != nil {
grpcfed.RecordErrorToSpan(ctx1, err)
return nil, err
}
if err := def_residents(ctx1); err != nil {
grpcfed.RecordErrorToSpan(ctx1, err)
return nil, err
}
return nil, nil
})
if err := eg.Wait(); err != nil {
return nil, err
}
// assign named parameters to message arguments to pass to the custom resolver.
req.F = value.vars.F
req.P = value.vars.P
req.Res = value.vars.Res
req.Residents = value.vars.Residents
// create a message value to be returned.
ret := &GetPlanetReply{}
// field binding section.
// (grpc.federation.field).by = "p"
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[*planetpb.Planet]{
Value: value,
Expr: `p`,
CacheIndex: 31,
Setter: func(v *planetpb.Planet) error {
planetValue, err := s.cast_Swapi_Planet_Planet__to__Swapi_Planet(v)
if err != nil {
return err
}
ret.Planet = planetValue
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
// (grpc.federation.field).by = "residents.people"
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[[]*Person]{
Value: value,
Expr: `residents.people`,
CacheIndex: 32,
Setter: func(v []*Person) error {
ret.Residents = v
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
// (grpc.federation.field).by = "f.films"
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[[]*Film]{
Value: value,
Expr: `f.films`,
CacheIndex: 33,
Setter: func(v []*Film) error {
ret.Films = v
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
grpcfed.Logger(ctx).DebugContext(ctx, "resolved swapi.GetPlanetReply", slog.Any("swapi.GetPlanetReply", s.logvalue_Swapi_GetPlanetReply(ret)))
return ret, nil
}
// resolve_Swapi_GetSpeciesReply resolve "swapi.GetSpeciesReply" message.
func (s *SWAPI) resolve_Swapi_GetSpeciesReply(ctx context.Context, req *SWAPI_Swapi_GetSpeciesReplyArgument) (*GetSpeciesReply, error) {
ctx, span := s.tracer.Start(ctx, "swapi.GetSpeciesReply")
defer span.End()
ctx = grpcfed.WithLogger(ctx, grpcfed.Logger(ctx), grpcfed.LogAttrs(ctx)...)
grpcfed.Logger(ctx).DebugContext(ctx, "resolve swapi.GetSpeciesReply", slog.Any("message_args", s.logvalue_Swapi_GetSpeciesReplyArgument(req)))
type localValueType struct {
*grpcfed.LocalValue
vars struct {
F *Films
P *People
Res *speciespb.GetSpeciesReply
S *speciespb.Species
}
}
value := &localValueType{LocalValue: grpcfed.NewLocalValue(ctx, s.celEnvOpts, "grpc.federation.private.swapi.GetSpeciesReplyArgument", req)}
/*
def {
name: "res"
call {
method: "swapi.species.SpeciesService/GetSpecies"
request { field: "id", by: "$.id" }
}
}
*/
def_res := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[*speciespb.GetSpeciesReply, *localValueType]{
Name: `res`,
Type: grpcfed.CELObjectType("swapi.species.GetSpeciesReply"),
Setter: func(value *localValueType, v *speciespb.GetSpeciesReply) error {
value.vars.Res = v
return nil
},
Message: func(ctx context.Context, value *localValueType) (any, error) {
args := &speciespb.GetSpeciesRequest{}
// { field: "id", by: "$.id" }
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[int64]{
Value: value,
Expr: `$.id`,
CacheIndex: 34,
Setter: func(v int64) error {
args.Id = v
return nil
},
}); err != nil {
return nil, err
}
grpcfed.Logger(ctx).DebugContext(ctx, "call swapi.species.SpeciesService/GetSpecies", slog.Any("swapi.species.GetSpeciesRequest", s.logvalue_Swapi_Species_GetSpeciesRequest(args)))
ret, err := s.client.Swapi_Species_SpeciesServiceClient.GetSpecies(ctx, args)
if err != nil {
if err := s.errorHandler(ctx, SWAPI_DependentMethod_Swapi_Species_SpeciesService_GetSpecies, err); err != nil {
return nil, grpcfed.NewErrorWithLogAttrs(err, slog.LevelError, grpcfed.LogAttrs(ctx))
}
}
return ret, nil
},
})
}
/*
def {
name: "s"
by: "res.species"
}
*/
def_s := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[*speciespb.Species, *localValueType]{
Name: `s`,
Type: grpcfed.CELObjectType("swapi.species.Species"),
Setter: func(value *localValueType, v *speciespb.Species) error {
value.vars.S = v
return nil
},
By: `res.species`,
ByCacheIndex: 35,
})
}
/*
def {
name: "f"
message {
name: "Films"
args { name: "ids", by: "s.film_ids" }
}
}
*/
def_f := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[*Films, *localValueType]{
Name: `f`,
Type: grpcfed.CELObjectType("swapi.Films"),
Setter: func(value *localValueType, v *Films) error {
value.vars.F = v
return nil
},
Message: func(ctx context.Context, value *localValueType) (any, error) {
args := &SWAPI_Swapi_FilmsArgument{}
// { name: "ids", by: "s.film_ids" }
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[[]int64]{
Value: value,
Expr: `s.film_ids`,
CacheIndex: 36,
Setter: func(v []int64) error {
args.Ids = v
return nil
},
}); err != nil {
return nil, err
}
ret, err := s.resolve_Swapi_Films(ctx, args)
if err != nil {
return nil, err
}
return ret, nil
},
})
}
/*
def {
name: "p"
message {
name: "People"
args { name: "ids", by: "s.person_ids" }
}
}
*/
def_p := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[*People, *localValueType]{
Name: `p`,
Type: grpcfed.CELObjectType("swapi.People"),
Setter: func(value *localValueType, v *People) error {
value.vars.P = v
return nil
},
Message: func(ctx context.Context, value *localValueType) (any, error) {
args := &SWAPI_Swapi_PeopleArgument{}
// { name: "ids", by: "s.person_ids" }
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[[]int64]{
Value: value,
Expr: `s.person_ids`,
CacheIndex: 37,
Setter: func(v []int64) error {
args.Ids = v
return nil
},
}); err != nil {
return nil, err
}
ret, err := s.resolve_Swapi_People(ctx, args)
if err != nil {
return nil, err
}
return ret, nil
},
})
}
// A tree view of message dependencies is shown below.
/*
res ─┐
s ─┐
f ─┐
res ─┐ │
s ─┐ │
p ─┤
*/
eg, ctx1 := grpcfed.ErrorGroupWithContext(ctx)
grpcfed.GoWithRecover(eg, func() (any, error) {
if err := def_res(ctx1); err != nil {
grpcfed.RecordErrorToSpan(ctx1, err)
return nil, err
}
if err := def_s(ctx1); err != nil {
grpcfed.RecordErrorToSpan(ctx1, err)
return nil, err
}
if err := def_f(ctx1); err != nil {
grpcfed.RecordErrorToSpan(ctx1, err)
return nil, err
}
return nil, nil
})
grpcfed.GoWithRecover(eg, func() (any, error) {
if err := def_res(ctx1); err != nil {
grpcfed.RecordErrorToSpan(ctx1, err)
return nil, err
}
if err := def_s(ctx1); err != nil {
grpcfed.RecordErrorToSpan(ctx1, err)
return nil, err
}
if err := def_p(ctx1); err != nil {
grpcfed.RecordErrorToSpan(ctx1, err)
return nil, err
}
return nil, nil
})
if err := eg.Wait(); err != nil {
return nil, err
}
// assign named parameters to message arguments to pass to the custom resolver.
req.F = value.vars.F
req.P = value.vars.P
req.Res = value.vars.Res
req.S = value.vars.S
// create a message value to be returned.
ret := &GetSpeciesReply{}
// field binding section.
// (grpc.federation.field).by = "s"
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[*speciespb.Species]{
Value: value,
Expr: `s`,
CacheIndex: 38,
Setter: func(v *speciespb.Species) error {
speciesValue, err := s.cast_Swapi_Species_Species__to__Swapi_Species(v)
if err != nil {
return err
}
ret.Species = speciesValue
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
// (grpc.federation.field).by = "p.people"
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[[]*Person]{
Value: value,
Expr: `p.people`,
CacheIndex: 39,
Setter: func(v []*Person) error {
ret.People = v
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
// (grpc.federation.field).by = "f.films"
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[[]*Film]{
Value: value,
Expr: `f.films`,
CacheIndex: 40,
Setter: func(v []*Film) error {
ret.Films = v
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
grpcfed.Logger(ctx).DebugContext(ctx, "resolved swapi.GetSpeciesReply", slog.Any("swapi.GetSpeciesReply", s.logvalue_Swapi_GetSpeciesReply(ret)))
return ret, nil
}
// resolve_Swapi_GetStarshipReply resolve "swapi.GetStarshipReply" message.
func (s *SWAPI) resolve_Swapi_GetStarshipReply(ctx context.Context, req *SWAPI_Swapi_GetStarshipReplyArgument) (*GetStarshipReply, error) {
ctx, span := s.tracer.Start(ctx, "swapi.GetStarshipReply")
defer span.End()
ctx = grpcfed.WithLogger(ctx, grpcfed.Logger(ctx), grpcfed.LogAttrs(ctx)...)
grpcfed.Logger(ctx).DebugContext(ctx, "resolve swapi.GetStarshipReply", slog.Any("message_args", s.logvalue_Swapi_GetStarshipReplyArgument(req)))
type localValueType struct {
*grpcfed.LocalValue
vars struct {
F *Films
P *People
Res *starshippb.GetStarshipReply
S *starshippb.Starship
}
}
value := &localValueType{LocalValue: grpcfed.NewLocalValue(ctx, s.celEnvOpts, "grpc.federation.private.swapi.GetStarshipReplyArgument", req)}
/*
def {
name: "res"
call {
method: "swapi.starship.StarshipService/GetStarship"
request { field: "id", by: "$.id" }
}
}
*/
def_res := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[*starshippb.GetStarshipReply, *localValueType]{
Name: `res`,
Type: grpcfed.CELObjectType("swapi.starship.GetStarshipReply"),
Setter: func(value *localValueType, v *starshippb.GetStarshipReply) error {
value.vars.Res = v
return nil
},
Message: func(ctx context.Context, value *localValueType) (any, error) {
args := &starshippb.GetStarshipRequest{}
// { field: "id", by: "$.id" }
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[int64]{
Value: value,
Expr: `$.id`,
CacheIndex: 41,
Setter: func(v int64) error {
args.Id = v
return nil
},
}); err != nil {
return nil, err
}
grpcfed.Logger(ctx).DebugContext(ctx, "call swapi.starship.StarshipService/GetStarship", slog.Any("swapi.starship.GetStarshipRequest", s.logvalue_Swapi_Starship_GetStarshipRequest(args)))
ret, err := s.client.Swapi_Starship_StarshipServiceClient.GetStarship(ctx, args)
if err != nil {
if err := s.errorHandler(ctx, SWAPI_DependentMethod_Swapi_Starship_StarshipService_GetStarship, err); err != nil {
return nil, grpcfed.NewErrorWithLogAttrs(err, slog.LevelError, grpcfed.LogAttrs(ctx))
}
}
return ret, nil
},
})
}
/*
def {
name: "s"
by: "res.starship"
}
*/
def_s := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[*starshippb.Starship, *localValueType]{
Name: `s`,
Type: grpcfed.CELObjectType("swapi.starship.Starship"),
Setter: func(value *localValueType, v *starshippb.Starship) error {
value.vars.S = v
return nil
},
By: `res.starship`,
ByCacheIndex: 42,
})
}
/*
def {
name: "f"
message {
name: "Films"
args { name: "ids", by: "s.film_ids" }
}
}
*/
def_f := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[*Films, *localValueType]{
Name: `f`,
Type: grpcfed.CELObjectType("swapi.Films"),
Setter: func(value *localValueType, v *Films) error {
value.vars.F = v
return nil
},
Message: func(ctx context.Context, value *localValueType) (any, error) {
args := &SWAPI_Swapi_FilmsArgument{}
// { name: "ids", by: "s.film_ids" }
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[[]int64]{
Value: value,
Expr: `s.film_ids`,
CacheIndex: 43,
Setter: func(v []int64) error {
args.Ids = v
return nil
},
}); err != nil {
return nil, err
}
ret, err := s.resolve_Swapi_Films(ctx, args)
if err != nil {
return nil, err
}
return ret, nil
},
})
}
/*
def {
name: "p"
message {
name: "People"
args { name: "ids", by: "s.pilot_ids" }
}
}
*/
def_p := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[*People, *localValueType]{
Name: `p`,
Type: grpcfed.CELObjectType("swapi.People"),
Setter: func(value *localValueType, v *People) error {
value.vars.P = v
return nil
},
Message: func(ctx context.Context, value *localValueType) (any, error) {
args := &SWAPI_Swapi_PeopleArgument{}
// { name: "ids", by: "s.pilot_ids" }
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[[]int64]{
Value: value,
Expr: `s.pilot_ids`,
CacheIndex: 44,
Setter: func(v []int64) error {
args.Ids = v
return nil
},
}); err != nil {
return nil, err
}
ret, err := s.resolve_Swapi_People(ctx, args)
if err != nil {
return nil, err
}
return ret, nil
},
})
}
// A tree view of message dependencies is shown below.
/*
res ─┐
s ─┐
f ─┐
res ─┐ │
s ─┐ │
p ─┤
*/
eg, ctx1 := grpcfed.ErrorGroupWithContext(ctx)
grpcfed.GoWithRecover(eg, func() (any, error) {
if err := def_res(ctx1); err != nil {
grpcfed.RecordErrorToSpan(ctx1, err)
return nil, err
}
if err := def_s(ctx1); err != nil {
grpcfed.RecordErrorToSpan(ctx1, err)
return nil, err
}
if err := def_f(ctx1); err != nil {
grpcfed.RecordErrorToSpan(ctx1, err)
return nil, err
}
return nil, nil
})
grpcfed.GoWithRecover(eg, func() (any, error) {
if err := def_res(ctx1); err != nil {
grpcfed.RecordErrorToSpan(ctx1, err)
return nil, err
}
if err := def_s(ctx1); err != nil {
grpcfed.RecordErrorToSpan(ctx1, err)
return nil, err
}
if err := def_p(ctx1); err != nil {
grpcfed.RecordErrorToSpan(ctx1, err)
return nil, err
}
return nil, nil
})
if err := eg.Wait(); err != nil {
return nil, err
}
// assign named parameters to message arguments to pass to the custom resolver.
req.F = value.vars.F
req.P = value.vars.P
req.Res = value.vars.Res
req.S = value.vars.S
// create a message value to be returned.
ret := &GetStarshipReply{}
// field binding section.
// (grpc.federation.field).by = "s"
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[*starshippb.Starship]{
Value: value,
Expr: `s`,
CacheIndex: 45,
Setter: func(v *starshippb.Starship) error {
starshipValue, err := s.cast_Swapi_Starship_Starship__to__Swapi_Starship(v)
if err != nil {
return err
}
ret.Starship = starshipValue
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
// (grpc.federation.field).by = "f.films"
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[[]*Film]{
Value: value,
Expr: `f.films`,
CacheIndex: 46,
Setter: func(v []*Film) error {
ret.Films = v
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
// (grpc.federation.field).by = "p.people"
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[[]*Person]{
Value: value,
Expr: `p.people`,
CacheIndex: 47,
Setter: func(v []*Person) error {
ret.Pilots = v
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
grpcfed.Logger(ctx).DebugContext(ctx, "resolved swapi.GetStarshipReply", slog.Any("swapi.GetStarshipReply", s.logvalue_Swapi_GetStarshipReply(ret)))
return ret, nil
}
// resolve_Swapi_GetVehicleReply resolve "swapi.GetVehicleReply" message.
func (s *SWAPI) resolve_Swapi_GetVehicleReply(ctx context.Context, req *SWAPI_Swapi_GetVehicleReplyArgument) (*GetVehicleReply, error) {
ctx, span := s.tracer.Start(ctx, "swapi.GetVehicleReply")
defer span.End()
ctx = grpcfed.WithLogger(ctx, grpcfed.Logger(ctx), grpcfed.LogAttrs(ctx)...)
grpcfed.Logger(ctx).DebugContext(ctx, "resolve swapi.GetVehicleReply", slog.Any("message_args", s.logvalue_Swapi_GetVehicleReplyArgument(req)))
type localValueType struct {
*grpcfed.LocalValue
vars struct {
F *Films
P *People
Res *vehiclepb.GetVehicleReply
V *vehiclepb.Vehicle
}
}
value := &localValueType{LocalValue: grpcfed.NewLocalValue(ctx, s.celEnvOpts, "grpc.federation.private.swapi.GetVehicleReplyArgument", req)}
/*
def {
name: "res"
call {
method: "swapi.vehicle.VehicleService/GetVehicle"
request { field: "id", by: "$.id" }
}
}
*/
def_res := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[*vehiclepb.GetVehicleReply, *localValueType]{
Name: `res`,
Type: grpcfed.CELObjectType("swapi.vehicle.GetVehicleReply"),
Setter: func(value *localValueType, v *vehiclepb.GetVehicleReply) error {
value.vars.Res = v
return nil
},
Message: func(ctx context.Context, value *localValueType) (any, error) {
args := &vehiclepb.GetVehicleRequest{}
// { field: "id", by: "$.id" }
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[int64]{
Value: value,
Expr: `$.id`,
CacheIndex: 48,
Setter: func(v int64) error {
args.Id = v
return nil
},
}); err != nil {
return nil, err
}
grpcfed.Logger(ctx).DebugContext(ctx, "call swapi.vehicle.VehicleService/GetVehicle", slog.Any("swapi.vehicle.GetVehicleRequest", s.logvalue_Swapi_Vehicle_GetVehicleRequest(args)))
ret, err := s.client.Swapi_Vehicle_VehicleServiceClient.GetVehicle(ctx, args)
if err != nil {
if err := s.errorHandler(ctx, SWAPI_DependentMethod_Swapi_Vehicle_VehicleService_GetVehicle, err); err != nil {
return nil, grpcfed.NewErrorWithLogAttrs(err, slog.LevelError, grpcfed.LogAttrs(ctx))
}
}
return ret, nil
},
})
}
/*
def {
name: "v"
by: "res.vehicle"
}
*/
def_v := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[*vehiclepb.Vehicle, *localValueType]{
Name: `v`,
Type: grpcfed.CELObjectType("swapi.vehicle.Vehicle"),
Setter: func(value *localValueType, v *vehiclepb.Vehicle) error {
value.vars.V = v
return nil
},
By: `res.vehicle`,
ByCacheIndex: 49,
})
}
/*
def {
name: "f"
message {
name: "Films"
args { name: "ids", by: "v.film_ids" }
}
}
*/
def_f := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[*Films, *localValueType]{
Name: `f`,
Type: grpcfed.CELObjectType("swapi.Films"),
Setter: func(value *localValueType, v *Films) error {
value.vars.F = v
return nil
},
Message: func(ctx context.Context, value *localValueType) (any, error) {
args := &SWAPI_Swapi_FilmsArgument{}
// { name: "ids", by: "v.film_ids" }
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[[]int64]{
Value: value,
Expr: `v.film_ids`,
CacheIndex: 50,
Setter: func(v []int64) error {
args.Ids = v
return nil
},
}); err != nil {
return nil, err
}
ret, err := s.resolve_Swapi_Films(ctx, args)
if err != nil {
return nil, err
}
return ret, nil
},
})
}
/*
def {
name: "p"
message {
name: "People"
args { name: "ids", by: "v.pilot_ids" }
}
}
*/
def_p := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[*People, *localValueType]{
Name: `p`,
Type: grpcfed.CELObjectType("swapi.People"),
Setter: func(value *localValueType, v *People) error {
value.vars.P = v
return nil
},
Message: func(ctx context.Context, value *localValueType) (any, error) {
args := &SWAPI_Swapi_PeopleArgument{}
// { name: "ids", by: "v.pilot_ids" }
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[[]int64]{
Value: value,
Expr: `v.pilot_ids`,
CacheIndex: 51,
Setter: func(v []int64) error {
args.Ids = v
return nil
},
}); err != nil {
return nil, err
}
ret, err := s.resolve_Swapi_People(ctx, args)
if err != nil {
return nil, err
}
return ret, nil
},
})
}
// A tree view of message dependencies is shown below.
/*
res ─┐
v ─┐
f ─┐
res ─┐ │
v ─┐ │
p ─┤
*/
eg, ctx1 := grpcfed.ErrorGroupWithContext(ctx)
grpcfed.GoWithRecover(eg, func() (any, error) {
if err := def_res(ctx1); err != nil {
grpcfed.RecordErrorToSpan(ctx1, err)
return nil, err
}
if err := def_v(ctx1); err != nil {
grpcfed.RecordErrorToSpan(ctx1, err)
return nil, err
}
if err := def_f(ctx1); err != nil {
grpcfed.RecordErrorToSpan(ctx1, err)
return nil, err
}
return nil, nil
})
grpcfed.GoWithRecover(eg, func() (any, error) {
if err := def_res(ctx1); err != nil {
grpcfed.RecordErrorToSpan(ctx1, err)
return nil, err
}
if err := def_v(ctx1); err != nil {
grpcfed.RecordErrorToSpan(ctx1, err)
return nil, err
}
if err := def_p(ctx1); err != nil {
grpcfed.RecordErrorToSpan(ctx1, err)
return nil, err
}
return nil, nil
})
if err := eg.Wait(); err != nil {
return nil, err
}
// assign named parameters to message arguments to pass to the custom resolver.
req.F = value.vars.F
req.P = value.vars.P
req.Res = value.vars.Res
req.V = value.vars.V
// create a message value to be returned.
ret := &GetVehicleReply{}
// field binding section.
// (grpc.federation.field).by = "v"
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[*vehiclepb.Vehicle]{
Value: value,
Expr: `v`,
CacheIndex: 52,
Setter: func(v *vehiclepb.Vehicle) error {
vehicleValue, err := s.cast_Swapi_Vehicle_Vehicle__to__Swapi_Vehicle(v)
if err != nil {
return err
}
ret.Vehicle = vehicleValue
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
// (grpc.federation.field).by = "f.films"
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[[]*Film]{
Value: value,
Expr: `f.films`,
CacheIndex: 53,
Setter: func(v []*Film) error {
ret.Films = v
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
// (grpc.federation.field).by = "p.people"
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[[]*Person]{
Value: value,
Expr: `p.people`,
CacheIndex: 54,
Setter: func(v []*Person) error {
ret.Pilots = v
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
grpcfed.Logger(ctx).DebugContext(ctx, "resolved swapi.GetVehicleReply", slog.Any("swapi.GetVehicleReply", s.logvalue_Swapi_GetVehicleReply(ret)))
return ret, nil
}
// resolve_Swapi_ListFilmsReply resolve "swapi.ListFilmsReply" message.
func (s *SWAPI) resolve_Swapi_ListFilmsReply(ctx context.Context, req *SWAPI_Swapi_ListFilmsReplyArgument) (*ListFilmsReply, error) {
ctx, span := s.tracer.Start(ctx, "swapi.ListFilmsReply")
defer span.End()
ctx = grpcfed.WithLogger(ctx, grpcfed.Logger(ctx), grpcfed.LogAttrs(ctx)...)
grpcfed.Logger(ctx).DebugContext(ctx, "resolve swapi.ListFilmsReply", slog.Any("message_args", s.logvalue_Swapi_ListFilmsReplyArgument(req)))
type localValueType struct {
*grpcfed.LocalValue
vars struct {
F *Films
}
}
value := &localValueType{LocalValue: grpcfed.NewLocalValue(ctx, s.celEnvOpts, "grpc.federation.private.swapi.ListFilmsReplyArgument", req)}
/*
def {
name: "f"
message {
name: "Films"
args { name: "ids", by: "$.ids" }
}
}
*/
def_f := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[*Films, *localValueType]{
Name: `f`,
Type: grpcfed.CELObjectType("swapi.Films"),
Setter: func(value *localValueType, v *Films) error {
value.vars.F = v
return nil
},
Message: func(ctx context.Context, value *localValueType) (any, error) {
args := &SWAPI_Swapi_FilmsArgument{}
// { name: "ids", by: "$.ids" }
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[[]int64]{
Value: value,
Expr: `$.ids`,
CacheIndex: 55,
Setter: func(v []int64) error {
args.Ids = v
return nil
},
}); err != nil {
return nil, err
}
ret, err := s.resolve_Swapi_Films(ctx, args)
if err != nil {
return nil, err
}
return ret, nil
},
})
}
if err := def_f(ctx); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
// assign named parameters to message arguments to pass to the custom resolver.
req.F = value.vars.F
// create a message value to be returned.
ret := &ListFilmsReply{}
// field binding section.
// (grpc.federation.field).by = "f.films"
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[[]*Film]{
Value: value,
Expr: `f.films`,
CacheIndex: 56,
Setter: func(v []*Film) error {
ret.Films = v
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
grpcfed.Logger(ctx).DebugContext(ctx, "resolved swapi.ListFilmsReply", slog.Any("swapi.ListFilmsReply", s.logvalue_Swapi_ListFilmsReply(ret)))
return ret, nil
}
// resolve_Swapi_ListPeopleReply resolve "swapi.ListPeopleReply" message.
func (s *SWAPI) resolve_Swapi_ListPeopleReply(ctx context.Context, req *SWAPI_Swapi_ListPeopleReplyArgument) (*ListPeopleReply, error) {
ctx, span := s.tracer.Start(ctx, "swapi.ListPeopleReply")
defer span.End()
ctx = grpcfed.WithLogger(ctx, grpcfed.Logger(ctx), grpcfed.LogAttrs(ctx)...)
grpcfed.Logger(ctx).DebugContext(ctx, "resolve swapi.ListPeopleReply", slog.Any("message_args", s.logvalue_Swapi_ListPeopleReplyArgument(req)))
type localValueType struct {
*grpcfed.LocalValue
vars struct {
P *People
}
}
value := &localValueType{LocalValue: grpcfed.NewLocalValue(ctx, s.celEnvOpts, "grpc.federation.private.swapi.ListPeopleReplyArgument", req)}
/*
def {
name: "p"
message {
name: "People"
args { name: "ids", by: "$.ids" }
}
}
*/
def_p := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[*People, *localValueType]{
Name: `p`,
Type: grpcfed.CELObjectType("swapi.People"),
Setter: func(value *localValueType, v *People) error {
value.vars.P = v
return nil
},
Message: func(ctx context.Context, value *localValueType) (any, error) {
args := &SWAPI_Swapi_PeopleArgument{}
// { name: "ids", by: "$.ids" }
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[[]int64]{
Value: value,
Expr: `$.ids`,
CacheIndex: 57,
Setter: func(v []int64) error {
args.Ids = v
return nil
},
}); err != nil {
return nil, err
}
ret, err := s.resolve_Swapi_People(ctx, args)
if err != nil {
return nil, err
}
return ret, nil
},
})
}
if err := def_p(ctx); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
// assign named parameters to message arguments to pass to the custom resolver.
req.P = value.vars.P
// create a message value to be returned.
ret := &ListPeopleReply{}
// field binding section.
// (grpc.federation.field).by = "p.people"
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[[]*Person]{
Value: value,
Expr: `p.people`,
CacheIndex: 58,
Setter: func(v []*Person) error {
ret.People = v
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
grpcfed.Logger(ctx).DebugContext(ctx, "resolved swapi.ListPeopleReply", slog.Any("swapi.ListPeopleReply", s.logvalue_Swapi_ListPeopleReply(ret)))
return ret, nil
}
// resolve_Swapi_ListPlanetsReply resolve "swapi.ListPlanetsReply" message.
func (s *SWAPI) resolve_Swapi_ListPlanetsReply(ctx context.Context, req *SWAPI_Swapi_ListPlanetsReplyArgument) (*ListPlanetsReply, error) {
ctx, span := s.tracer.Start(ctx, "swapi.ListPlanetsReply")
defer span.End()
ctx = grpcfed.WithLogger(ctx, grpcfed.Logger(ctx), grpcfed.LogAttrs(ctx)...)
grpcfed.Logger(ctx).DebugContext(ctx, "resolve swapi.ListPlanetsReply", slog.Any("message_args", s.logvalue_Swapi_ListPlanetsReplyArgument(req)))
type localValueType struct {
*grpcfed.LocalValue
vars struct {
P *Planets
}
}
value := &localValueType{LocalValue: grpcfed.NewLocalValue(ctx, s.celEnvOpts, "grpc.federation.private.swapi.ListPlanetsReplyArgument", req)}
/*
def {
name: "p"
message {
name: "Planets"
args { name: "ids", by: "$.ids" }
}
}
*/
def_p := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[*Planets, *localValueType]{
Name: `p`,
Type: grpcfed.CELObjectType("swapi.Planets"),
Setter: func(value *localValueType, v *Planets) error {
value.vars.P = v
return nil
},
Message: func(ctx context.Context, value *localValueType) (any, error) {
args := &SWAPI_Swapi_PlanetsArgument{}
// { name: "ids", by: "$.ids" }
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[[]int64]{
Value: value,
Expr: `$.ids`,
CacheIndex: 59,
Setter: func(v []int64) error {
args.Ids = v
return nil
},
}); err != nil {
return nil, err
}
ret, err := s.resolve_Swapi_Planets(ctx, args)
if err != nil {
return nil, err
}
return ret, nil
},
})
}
if err := def_p(ctx); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
// assign named parameters to message arguments to pass to the custom resolver.
req.P = value.vars.P
// create a message value to be returned.
ret := &ListPlanetsReply{}
// field binding section.
// (grpc.federation.field).by = "p.planets"
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[[]*Planet]{
Value: value,
Expr: `p.planets`,
CacheIndex: 60,
Setter: func(v []*Planet) error {
ret.Planets = v
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
grpcfed.Logger(ctx).DebugContext(ctx, "resolved swapi.ListPlanetsReply", slog.Any("swapi.ListPlanetsReply", s.logvalue_Swapi_ListPlanetsReply(ret)))
return ret, nil
}
// resolve_Swapi_ListSpeciesReply resolve "swapi.ListSpeciesReply" message.
func (s *SWAPI) resolve_Swapi_ListSpeciesReply(ctx context.Context, req *SWAPI_Swapi_ListSpeciesReplyArgument) (*ListSpeciesReply, error) {
ctx, span := s.tracer.Start(ctx, "swapi.ListSpeciesReply")
defer span.End()
ctx = grpcfed.WithLogger(ctx, grpcfed.Logger(ctx), grpcfed.LogAttrs(ctx)...)
grpcfed.Logger(ctx).DebugContext(ctx, "resolve swapi.ListSpeciesReply", slog.Any("message_args", s.logvalue_Swapi_ListSpeciesReplyArgument(req)))
type localValueType struct {
*grpcfed.LocalValue
vars struct {
S *SpeciesList
}
}
value := &localValueType{LocalValue: grpcfed.NewLocalValue(ctx, s.celEnvOpts, "grpc.federation.private.swapi.ListSpeciesReplyArgument", req)}
/*
def {
name: "s"
message {
name: "SpeciesList"
args { name: "ids", by: "$.ids" }
}
}
*/
def_s := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[*SpeciesList, *localValueType]{
Name: `s`,
Type: grpcfed.CELObjectType("swapi.SpeciesList"),
Setter: func(value *localValueType, v *SpeciesList) error {
value.vars.S = v
return nil
},
Message: func(ctx context.Context, value *localValueType) (any, error) {
args := &SWAPI_Swapi_SpeciesListArgument{}
// { name: "ids", by: "$.ids" }
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[[]int64]{
Value: value,
Expr: `$.ids`,
CacheIndex: 61,
Setter: func(v []int64) error {
args.Ids = v
return nil
},
}); err != nil {
return nil, err
}
ret, err := s.resolve_Swapi_SpeciesList(ctx, args)
if err != nil {
return nil, err
}
return ret, nil
},
})
}
if err := def_s(ctx); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
// assign named parameters to message arguments to pass to the custom resolver.
req.S = value.vars.S
// create a message value to be returned.
ret := &ListSpeciesReply{}
// field binding section.
// (grpc.federation.field).by = "s.species"
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[[]*Species]{
Value: value,
Expr: `s.species`,
CacheIndex: 62,
Setter: func(v []*Species) error {
ret.Species = v
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
grpcfed.Logger(ctx).DebugContext(ctx, "resolved swapi.ListSpeciesReply", slog.Any("swapi.ListSpeciesReply", s.logvalue_Swapi_ListSpeciesReply(ret)))
return ret, nil
}
// resolve_Swapi_ListStarshipsReply resolve "swapi.ListStarshipsReply" message.
func (s *SWAPI) resolve_Swapi_ListStarshipsReply(ctx context.Context, req *SWAPI_Swapi_ListStarshipsReplyArgument) (*ListStarshipsReply, error) {
ctx, span := s.tracer.Start(ctx, "swapi.ListStarshipsReply")
defer span.End()
ctx = grpcfed.WithLogger(ctx, grpcfed.Logger(ctx), grpcfed.LogAttrs(ctx)...)
grpcfed.Logger(ctx).DebugContext(ctx, "resolve swapi.ListStarshipsReply", slog.Any("message_args", s.logvalue_Swapi_ListStarshipsReplyArgument(req)))
type localValueType struct {
*grpcfed.LocalValue
vars struct {
S *Starships
}
}
value := &localValueType{LocalValue: grpcfed.NewLocalValue(ctx, s.celEnvOpts, "grpc.federation.private.swapi.ListStarshipsReplyArgument", req)}
/*
def {
name: "s"
message {
name: "Starships"
args { name: "ids", by: "$.ids" }
}
}
*/
def_s := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[*Starships, *localValueType]{
Name: `s`,
Type: grpcfed.CELObjectType("swapi.Starships"),
Setter: func(value *localValueType, v *Starships) error {
value.vars.S = v
return nil
},
Message: func(ctx context.Context, value *localValueType) (any, error) {
args := &SWAPI_Swapi_StarshipsArgument{}
// { name: "ids", by: "$.ids" }
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[[]int64]{
Value: value,
Expr: `$.ids`,
CacheIndex: 63,
Setter: func(v []int64) error {
args.Ids = v
return nil
},
}); err != nil {
return nil, err
}
ret, err := s.resolve_Swapi_Starships(ctx, args)
if err != nil {
return nil, err
}
return ret, nil
},
})
}
if err := def_s(ctx); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
// assign named parameters to message arguments to pass to the custom resolver.
req.S = value.vars.S
// create a message value to be returned.
ret := &ListStarshipsReply{}
// field binding section.
// (grpc.federation.field).by = "s.starships"
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[[]*Starship]{
Value: value,
Expr: `s.starships`,
CacheIndex: 64,
Setter: func(v []*Starship) error {
ret.Starships = v
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
grpcfed.Logger(ctx).DebugContext(ctx, "resolved swapi.ListStarshipsReply", slog.Any("swapi.ListStarshipsReply", s.logvalue_Swapi_ListStarshipsReply(ret)))
return ret, nil
}
// resolve_Swapi_ListVehiclesReply resolve "swapi.ListVehiclesReply" message.
func (s *SWAPI) resolve_Swapi_ListVehiclesReply(ctx context.Context, req *SWAPI_Swapi_ListVehiclesReplyArgument) (*ListVehiclesReply, error) {
ctx, span := s.tracer.Start(ctx, "swapi.ListVehiclesReply")
defer span.End()
ctx = grpcfed.WithLogger(ctx, grpcfed.Logger(ctx), grpcfed.LogAttrs(ctx)...)
grpcfed.Logger(ctx).DebugContext(ctx, "resolve swapi.ListVehiclesReply", slog.Any("message_args", s.logvalue_Swapi_ListVehiclesReplyArgument(req)))
type localValueType struct {
*grpcfed.LocalValue
vars struct {
V *Vehicles
}
}
value := &localValueType{LocalValue: grpcfed.NewLocalValue(ctx, s.celEnvOpts, "grpc.federation.private.swapi.ListVehiclesReplyArgument", req)}
/*
def {
name: "v"
message {
name: "Vehicles"
args { name: "ids", by: "$.ids" }
}
}
*/
def_v := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[*Vehicles, *localValueType]{
Name: `v`,
Type: grpcfed.CELObjectType("swapi.Vehicles"),
Setter: func(value *localValueType, v *Vehicles) error {
value.vars.V = v
return nil
},
Message: func(ctx context.Context, value *localValueType) (any, error) {
args := &SWAPI_Swapi_VehiclesArgument{}
// { name: "ids", by: "$.ids" }
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[[]int64]{
Value: value,
Expr: `$.ids`,
CacheIndex: 65,
Setter: func(v []int64) error {
args.Ids = v
return nil
},
}); err != nil {
return nil, err
}
ret, err := s.resolve_Swapi_Vehicles(ctx, args)
if err != nil {
return nil, err
}
return ret, nil
},
})
}
if err := def_v(ctx); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
// assign named parameters to message arguments to pass to the custom resolver.
req.V = value.vars.V
// create a message value to be returned.
ret := &ListVehiclesReply{}
// field binding section.
// (grpc.federation.field).by = "v.vehicles"
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[[]*Vehicle]{
Value: value,
Expr: `v.vehicles`,
CacheIndex: 66,
Setter: func(v []*Vehicle) error {
ret.Vehicles = v
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
grpcfed.Logger(ctx).DebugContext(ctx, "resolved swapi.ListVehiclesReply", slog.Any("swapi.ListVehiclesReply", s.logvalue_Swapi_ListVehiclesReply(ret)))
return ret, nil
}
// resolve_Swapi_People resolve "swapi.People" message.
func (s *SWAPI) resolve_Swapi_People(ctx context.Context, req *SWAPI_Swapi_PeopleArgument) (*People, error) {
ctx, span := s.tracer.Start(ctx, "swapi.People")
defer span.End()
ctx = grpcfed.WithLogger(ctx, grpcfed.Logger(ctx), grpcfed.LogAttrs(ctx)...)
grpcfed.Logger(ctx).DebugContext(ctx, "resolve swapi.People", slog.Any("message_args", s.logvalue_Swapi_PeopleArgument(req)))
type localValueType struct {
*grpcfed.LocalValue
vars struct {
Res *personpb.ListPeopleReply
}
}
value := &localValueType{LocalValue: grpcfed.NewLocalValue(ctx, s.celEnvOpts, "grpc.federation.private.swapi.PeopleArgument", req)}
/*
def {
name: "res"
call {
method: "swapi.person.PersonService/ListPeople"
request { field: "ids", by: "$.ids" }
}
}
*/
def_res := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[*personpb.ListPeopleReply, *localValueType]{
Name: `res`,
Type: grpcfed.CELObjectType("swapi.person.ListPeopleReply"),
Setter: func(value *localValueType, v *personpb.ListPeopleReply) error {
value.vars.Res = v
return nil
},
Message: func(ctx context.Context, value *localValueType) (any, error) {
args := &personpb.ListPeopleRequest{}
// { field: "ids", by: "$.ids" }
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[[]int64]{
Value: value,
Expr: `$.ids`,
CacheIndex: 67,
Setter: func(v []int64) error {
args.Ids = v
return nil
},
}); err != nil {
return nil, err
}
grpcfed.Logger(ctx).DebugContext(ctx, "call swapi.person.PersonService/ListPeople", slog.Any("swapi.person.ListPeopleRequest", s.logvalue_Swapi_Person_ListPeopleRequest(args)))
ret, err := s.client.Swapi_Person_PersonServiceClient.ListPeople(ctx, args)
if err != nil {
if err := s.errorHandler(ctx, SWAPI_DependentMethod_Swapi_Person_PersonService_ListPeople, err); err != nil {
return nil, grpcfed.NewErrorWithLogAttrs(err, slog.LevelError, grpcfed.LogAttrs(ctx))
}
}
return ret, nil
},
})
}
if err := def_res(ctx); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
// assign named parameters to message arguments to pass to the custom resolver.
req.Res = value.vars.Res
// create a message value to be returned.
ret := &People{}
// field binding section.
// (grpc.federation.field).by = "res.people"
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[[]*personpb.Person]{
Value: value,
Expr: `res.people`,
CacheIndex: 68,
Setter: func(v []*personpb.Person) error {
peopleValue, err := s.cast_repeated_Swapi_Person_Person__to__repeated_Swapi_Person(v)
if err != nil {
return err
}
ret.People = peopleValue
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
grpcfed.Logger(ctx).DebugContext(ctx, "resolved swapi.People", slog.Any("swapi.People", s.logvalue_Swapi_People(ret)))
return ret, nil
}
// resolve_Swapi_Planets resolve "swapi.Planets" message.
func (s *SWAPI) resolve_Swapi_Planets(ctx context.Context, req *SWAPI_Swapi_PlanetsArgument) (*Planets, error) {
ctx, span := s.tracer.Start(ctx, "swapi.Planets")
defer span.End()
ctx = grpcfed.WithLogger(ctx, grpcfed.Logger(ctx), grpcfed.LogAttrs(ctx)...)
grpcfed.Logger(ctx).DebugContext(ctx, "resolve swapi.Planets", slog.Any("message_args", s.logvalue_Swapi_PlanetsArgument(req)))
type localValueType struct {
*grpcfed.LocalValue
vars struct {
Res *planetpb.ListPlanetsReply
}
}
value := &localValueType{LocalValue: grpcfed.NewLocalValue(ctx, s.celEnvOpts, "grpc.federation.private.swapi.PlanetsArgument", req)}
/*
def {
name: "res"
call {
method: "swapi.planet.PlanetService/ListPlanets"
request { field: "ids", by: "$.ids" }
}
}
*/
def_res := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[*planetpb.ListPlanetsReply, *localValueType]{
Name: `res`,
Type: grpcfed.CELObjectType("swapi.planet.ListPlanetsReply"),
Setter: func(value *localValueType, v *planetpb.ListPlanetsReply) error {
value.vars.Res = v
return nil
},
Message: func(ctx context.Context, value *localValueType) (any, error) {
args := &planetpb.ListPlanetsRequest{}
// { field: "ids", by: "$.ids" }
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[[]int64]{
Value: value,
Expr: `$.ids`,
CacheIndex: 69,
Setter: func(v []int64) error {
args.Ids = v
return nil
},
}); err != nil {
return nil, err
}
grpcfed.Logger(ctx).DebugContext(ctx, "call swapi.planet.PlanetService/ListPlanets", slog.Any("swapi.planet.ListPlanetsRequest", s.logvalue_Swapi_Planet_ListPlanetsRequest(args)))
ret, err := s.client.Swapi_Planet_PlanetServiceClient.ListPlanets(ctx, args)
if err != nil {
if err := s.errorHandler(ctx, SWAPI_DependentMethod_Swapi_Planet_PlanetService_ListPlanets, err); err != nil {
return nil, grpcfed.NewErrorWithLogAttrs(err, slog.LevelError, grpcfed.LogAttrs(ctx))
}
}
return ret, nil
},
})
}
if err := def_res(ctx); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
// assign named parameters to message arguments to pass to the custom resolver.
req.Res = value.vars.Res
// create a message value to be returned.
ret := &Planets{}
// field binding section.
// (grpc.federation.field).by = "res.planets"
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[[]*planetpb.Planet]{
Value: value,
Expr: `res.planets`,
CacheIndex: 70,
Setter: func(v []*planetpb.Planet) error {
planetsValue, err := s.cast_repeated_Swapi_Planet_Planet__to__repeated_Swapi_Planet(v)
if err != nil {
return err
}
ret.Planets = planetsValue
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
grpcfed.Logger(ctx).DebugContext(ctx, "resolved swapi.Planets", slog.Any("swapi.Planets", s.logvalue_Swapi_Planets(ret)))
return ret, nil
}
// resolve_Swapi_SpeciesList resolve "swapi.SpeciesList" message.
func (s *SWAPI) resolve_Swapi_SpeciesList(ctx context.Context, req *SWAPI_Swapi_SpeciesListArgument) (*SpeciesList, error) {
ctx, span := s.tracer.Start(ctx, "swapi.SpeciesList")
defer span.End()
ctx = grpcfed.WithLogger(ctx, grpcfed.Logger(ctx), grpcfed.LogAttrs(ctx)...)
grpcfed.Logger(ctx).DebugContext(ctx, "resolve swapi.SpeciesList", slog.Any("message_args", s.logvalue_Swapi_SpeciesListArgument(req)))
type localValueType struct {
*grpcfed.LocalValue
vars struct {
Res *speciespb.ListSpeciesReply
}
}
value := &localValueType{LocalValue: grpcfed.NewLocalValue(ctx, s.celEnvOpts, "grpc.federation.private.swapi.SpeciesListArgument", req)}
/*
def {
name: "res"
call {
method: "swapi.species.SpeciesService/ListSpecies"
request { field: "ids", by: "$.ids" }
}
}
*/
def_res := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[*speciespb.ListSpeciesReply, *localValueType]{
Name: `res`,
Type: grpcfed.CELObjectType("swapi.species.ListSpeciesReply"),
Setter: func(value *localValueType, v *speciespb.ListSpeciesReply) error {
value.vars.Res = v
return nil
},
Message: func(ctx context.Context, value *localValueType) (any, error) {
args := &speciespb.ListSpeciesRequest{}
// { field: "ids", by: "$.ids" }
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[[]int64]{
Value: value,
Expr: `$.ids`,
CacheIndex: 71,
Setter: func(v []int64) error {
args.Ids = v
return nil
},
}); err != nil {
return nil, err
}
grpcfed.Logger(ctx).DebugContext(ctx, "call swapi.species.SpeciesService/ListSpecies", slog.Any("swapi.species.ListSpeciesRequest", s.logvalue_Swapi_Species_ListSpeciesRequest(args)))
ret, err := s.client.Swapi_Species_SpeciesServiceClient.ListSpecies(ctx, args)
if err != nil {
if err := s.errorHandler(ctx, SWAPI_DependentMethod_Swapi_Species_SpeciesService_ListSpecies, err); err != nil {
return nil, grpcfed.NewErrorWithLogAttrs(err, slog.LevelError, grpcfed.LogAttrs(ctx))
}
}
return ret, nil
},
})
}
if err := def_res(ctx); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
// assign named parameters to message arguments to pass to the custom resolver.
req.Res = value.vars.Res
// create a message value to be returned.
ret := &SpeciesList{}
// field binding section.
// (grpc.federation.field).by = "res.species"
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[[]*speciespb.Species]{
Value: value,
Expr: `res.species`,
CacheIndex: 72,
Setter: func(v []*speciespb.Species) error {
speciesValue, err := s.cast_repeated_Swapi_Species_Species__to__repeated_Swapi_Species(v)
if err != nil {
return err
}
ret.Species = speciesValue
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
grpcfed.Logger(ctx).DebugContext(ctx, "resolved swapi.SpeciesList", slog.Any("swapi.SpeciesList", s.logvalue_Swapi_SpeciesList(ret)))
return ret, nil
}
// resolve_Swapi_Starships resolve "swapi.Starships" message.
func (s *SWAPI) resolve_Swapi_Starships(ctx context.Context, req *SWAPI_Swapi_StarshipsArgument) (*Starships, error) {
ctx, span := s.tracer.Start(ctx, "swapi.Starships")
defer span.End()
ctx = grpcfed.WithLogger(ctx, grpcfed.Logger(ctx), grpcfed.LogAttrs(ctx)...)
grpcfed.Logger(ctx).DebugContext(ctx, "resolve swapi.Starships", slog.Any("message_args", s.logvalue_Swapi_StarshipsArgument(req)))
type localValueType struct {
*grpcfed.LocalValue
vars struct {
Res *starshippb.ListStarshipsReply
}
}
value := &localValueType{LocalValue: grpcfed.NewLocalValue(ctx, s.celEnvOpts, "grpc.federation.private.swapi.StarshipsArgument", req)}
/*
def {
name: "res"
call {
method: "swapi.starship.StarshipService/ListStarships"
request { field: "ids", by: "$.ids" }
}
}
*/
def_res := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[*starshippb.ListStarshipsReply, *localValueType]{
Name: `res`,
Type: grpcfed.CELObjectType("swapi.starship.ListStarshipsReply"),
Setter: func(value *localValueType, v *starshippb.ListStarshipsReply) error {
value.vars.Res = v
return nil
},
Message: func(ctx context.Context, value *localValueType) (any, error) {
args := &starshippb.ListStarshipsRequest{}
// { field: "ids", by: "$.ids" }
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[[]int64]{
Value: value,
Expr: `$.ids`,
CacheIndex: 73,
Setter: func(v []int64) error {
args.Ids = v
return nil
},
}); err != nil {
return nil, err
}
grpcfed.Logger(ctx).DebugContext(ctx, "call swapi.starship.StarshipService/ListStarships", slog.Any("swapi.starship.ListStarshipsRequest", s.logvalue_Swapi_Starship_ListStarshipsRequest(args)))
ret, err := s.client.Swapi_Starship_StarshipServiceClient.ListStarships(ctx, args)
if err != nil {
if err := s.errorHandler(ctx, SWAPI_DependentMethod_Swapi_Starship_StarshipService_ListStarships, err); err != nil {
return nil, grpcfed.NewErrorWithLogAttrs(err, slog.LevelError, grpcfed.LogAttrs(ctx))
}
}
return ret, nil
},
})
}
if err := def_res(ctx); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
// assign named parameters to message arguments to pass to the custom resolver.
req.Res = value.vars.Res
// create a message value to be returned.
ret := &Starships{}
// field binding section.
// (grpc.federation.field).by = "res.starships"
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[[]*starshippb.Starship]{
Value: value,
Expr: `res.starships`,
CacheIndex: 74,
Setter: func(v []*starshippb.Starship) error {
starshipsValue, err := s.cast_repeated_Swapi_Starship_Starship__to__repeated_Swapi_Starship(v)
if err != nil {
return err
}
ret.Starships = starshipsValue
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
grpcfed.Logger(ctx).DebugContext(ctx, "resolved swapi.Starships", slog.Any("swapi.Starships", s.logvalue_Swapi_Starships(ret)))
return ret, nil
}
// resolve_Swapi_Vehicles resolve "swapi.Vehicles" message.
func (s *SWAPI) resolve_Swapi_Vehicles(ctx context.Context, req *SWAPI_Swapi_VehiclesArgument) (*Vehicles, error) {
ctx, span := s.tracer.Start(ctx, "swapi.Vehicles")
defer span.End()
ctx = grpcfed.WithLogger(ctx, grpcfed.Logger(ctx), grpcfed.LogAttrs(ctx)...)
grpcfed.Logger(ctx).DebugContext(ctx, "resolve swapi.Vehicles", slog.Any("message_args", s.logvalue_Swapi_VehiclesArgument(req)))
type localValueType struct {
*grpcfed.LocalValue
vars struct {
Res *vehiclepb.ListVehiclesReply
}
}
value := &localValueType{LocalValue: grpcfed.NewLocalValue(ctx, s.celEnvOpts, "grpc.federation.private.swapi.VehiclesArgument", req)}
/*
def {
name: "res"
call {
method: "swapi.vehicle.VehicleService/ListVehicles"
request { field: "ids", by: "$.ids" }
}
}
*/
def_res := func(ctx context.Context) error {
return grpcfed.EvalDef(ctx, value, grpcfed.Def[*vehiclepb.ListVehiclesReply, *localValueType]{
Name: `res`,
Type: grpcfed.CELObjectType("swapi.vehicle.ListVehiclesReply"),
Setter: func(value *localValueType, v *vehiclepb.ListVehiclesReply) error {
value.vars.Res = v
return nil
},
Message: func(ctx context.Context, value *localValueType) (any, error) {
args := &vehiclepb.ListVehiclesRequest{}
// { field: "ids", by: "$.ids" }
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[[]int64]{
Value: value,
Expr: `$.ids`,
CacheIndex: 75,
Setter: func(v []int64) error {
args.Ids = v
return nil
},
}); err != nil {
return nil, err
}
grpcfed.Logger(ctx).DebugContext(ctx, "call swapi.vehicle.VehicleService/ListVehicles", slog.Any("swapi.vehicle.ListVehiclesRequest", s.logvalue_Swapi_Vehicle_ListVehiclesRequest(args)))
ret, err := s.client.Swapi_Vehicle_VehicleServiceClient.ListVehicles(ctx, args)
if err != nil {
if err := s.errorHandler(ctx, SWAPI_DependentMethod_Swapi_Vehicle_VehicleService_ListVehicles, err); err != nil {
return nil, grpcfed.NewErrorWithLogAttrs(err, slog.LevelError, grpcfed.LogAttrs(ctx))
}
}
return ret, nil
},
})
}
if err := def_res(ctx); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
// assign named parameters to message arguments to pass to the custom resolver.
req.Res = value.vars.Res
// create a message value to be returned.
ret := &Vehicles{}
// field binding section.
// (grpc.federation.field).by = "res.vehicles"
if err := grpcfed.SetCELValue(ctx, &grpcfed.SetCELValueParam[[]*vehiclepb.Vehicle]{
Value: value,
Expr: `res.vehicles`,
CacheIndex: 76,
Setter: func(v []*vehiclepb.Vehicle) error {
vehiclesValue, err := s.cast_repeated_Swapi_Vehicle_Vehicle__to__repeated_Swapi_Vehicle(v)
if err != nil {
return err
}
ret.Vehicles = vehiclesValue
return nil
},
}); err != nil {
grpcfed.RecordErrorToSpan(ctx, err)
return nil, err
}
grpcfed.Logger(ctx).DebugContext(ctx, "resolved swapi.Vehicles", slog.Any("swapi.Vehicles", s.logvalue_Swapi_Vehicles(ret)))
return ret, nil
}
// cast_Swapi_Film_Film__to__Swapi_Film cast from "swapi.film.Film" to "swapi.Film".
func (s *SWAPI) cast_Swapi_Film_Film__to__Swapi_Film(from *filmpb.Film) (*Film, error) {
if from == nil {
return nil, nil
}
idValue := from.GetId()
titleValue := from.GetTitle()
episodeIdValue := from.GetEpisodeId()
openingCrawlValue := from.GetOpeningCrawl()
directorValue := from.GetDirector()
producerValue := from.GetProducer()
releaseDateValue := from.GetReleaseDate()
urlValue := from.GetUrl()
createdValue := from.GetCreated()
editedValue := from.GetEdited()
speciesIdsValue := from.GetSpeciesIds()
starshipIdsValue := from.GetStarshipIds()
vehicleIdsValue := from.GetVehicleIds()
characterIdsValue := from.GetCharacterIds()
planetIdsValue := from.GetPlanetIds()
ret := &Film{
Id: idValue,
Title: titleValue,
EpisodeId: episodeIdValue,
OpeningCrawl: openingCrawlValue,
Director: directorValue,
Producer: producerValue,
ReleaseDate: releaseDateValue,
Url: urlValue,
Created: createdValue,
Edited: editedValue,
SpeciesIds: speciesIdsValue,
StarshipIds: starshipIdsValue,
VehicleIds: vehicleIdsValue,
CharacterIds: characterIdsValue,
PlanetIds: planetIdsValue,
}
return ret, nil
}
// cast_Swapi_Person_Person__to__Swapi_Person cast from "swapi.person.Person" to "swapi.Person".
func (s *SWAPI) cast_Swapi_Person_Person__to__Swapi_Person(from *personpb.Person) (*Person, error) {
if from == nil {
return nil, nil
}
idValue := from.GetId()
nameValue := from.GetName()
birthYearValue := from.GetBirthYear()
eyeColorValue := from.GetEyeColor()
genderValue := from.GetGender()
hairColorValue := from.GetHairColor()
heightValue := from.GetHeight()
massValue := from.GetMass()
skinColorValue := from.GetSkinColor()
homeworldValue := from.GetHomeworld()
urlValue := from.GetUrl()
createdValue := from.GetCreated()
editedValue := from.GetEdited()
filmIdsValue := from.GetFilmIds()
speciesIdsValue := from.GetSpeciesIds()
starshipIdsValue := from.GetStarshipIds()
vehicleIdsValue := from.GetVehicleIds()
ret := &Person{
Id: idValue,
Name: nameValue,
BirthYear: birthYearValue,
EyeColor: eyeColorValue,
Gender: genderValue,
HairColor: hairColorValue,
Height: heightValue,
Mass: massValue,
SkinColor: skinColorValue,
Homeworld: homeworldValue,
Url: urlValue,
Created: createdValue,
Edited: editedValue,
FilmIds: filmIdsValue,
SpeciesIds: speciesIdsValue,
StarshipIds: starshipIdsValue,
VehicleIds: vehicleIdsValue,
}
return ret, nil
}
// cast_Swapi_Planet_Planet__to__Swapi_Planet cast from "swapi.planet.Planet" to "swapi.Planet".
func (s *SWAPI) cast_Swapi_Planet_Planet__to__Swapi_Planet(from *planetpb.Planet) (*Planet, error) {
if from == nil {
return nil, nil
}
idValue := from.GetId()
nameValue := from.GetName()
diameterValue := from.GetDiameter()
rotationPeriodValue := from.GetRotationPeriod()
orbitalPeriodValue := from.GetOrbitalPeriod()
gravityValue := from.GetGravity()
populationValue := from.GetPopulation()
climateValue := from.GetClimate()
terrainValue := from.GetTerrain()
surfaceWaterValue := from.GetSurfaceWater()
urlValue := from.GetUrl()
createdValue := from.GetCreated()
editedValue := from.GetEdited()
residentIdsValue := from.GetResidentIds()
filmIdsValue := from.GetFilmIds()
ret := &Planet{
Id: idValue,
Name: nameValue,
Diameter: diameterValue,
RotationPeriod: rotationPeriodValue,
OrbitalPeriod: orbitalPeriodValue,
Gravity: gravityValue,
Population: populationValue,
Climate: climateValue,
Terrain: terrainValue,
SurfaceWater: surfaceWaterValue,
Url: urlValue,
Created: createdValue,
Edited: editedValue,
ResidentIds: residentIdsValue,
FilmIds: filmIdsValue,
}
return ret, nil
}
// cast_Swapi_Species_Species__to__Swapi_Species cast from "swapi.species.Species" to "swapi.Species".
func (s *SWAPI) cast_Swapi_Species_Species__to__Swapi_Species(from *speciespb.Species) (*Species, error) {
if from == nil {
return nil, nil
}
idValue := from.GetId()
nameValue := from.GetName()
classificationValue := from.GetClassification()
designationValue := from.GetDesignation()
averageHeightValue := from.GetAverageHeight()
averageLifespanValue := from.GetAverageLifespan()
eyeColorsValue := from.GetEyeColors()
hairColorsValue := from.GetHairColors()
skinColorsValue := from.GetSkinColors()
languageValue := from.GetLanguage()
homeworldValue := from.GetHomeworld()
urlValue := from.GetUrl()
createdValue := from.GetCreated()
editedValue := from.GetEdited()
personIdsValue := from.GetPersonIds()
filmIdsValue := from.GetFilmIds()
ret := &Species{
Id: idValue,
Name: nameValue,
Classification: classificationValue,
Designation: designationValue,
AverageHeight: averageHeightValue,
AverageLifespan: averageLifespanValue,
EyeColors: eyeColorsValue,
HairColors: hairColorsValue,
SkinColors: skinColorsValue,
Language: languageValue,
Homeworld: homeworldValue,
Url: urlValue,
Created: createdValue,
Edited: editedValue,
PersonIds: personIdsValue,
FilmIds: filmIdsValue,
}
return ret, nil
}
// cast_Swapi_Starship_Starship__to__Swapi_Starship cast from "swapi.starship.Starship" to "swapi.Starship".
func (s *SWAPI) cast_Swapi_Starship_Starship__to__Swapi_Starship(from *starshippb.Starship) (*Starship, error) {
if from == nil {
return nil, nil
}
idValue := from.GetId()
nameValue := from.GetName()
modelValue := from.GetModel()
starshipClassValue := from.GetStarshipClass()
manufacturerValue := from.GetManufacturer()
costInCreditsValue := from.GetCostInCredits()
lengthValue := from.GetLength()
crewValue := from.GetCrew()
passengersValue := from.GetPassengers()
maxAtmospheringSpeedValue := from.GetMaxAtmospheringSpeed()
hyperdriveRatingValue := from.GetHyperdriveRating()
mgltValue := from.GetMglt()
cargoCapacityValue := from.GetCargoCapacity()
consumablesValue := from.GetConsumables()
urlValue := from.GetUrl()
createdValue := from.GetCreated()
editedValue := from.GetEdited()
filmIdsValue := from.GetFilmIds()
pilotIdsValue := from.GetPilotIds()
ret := &Starship{
Id: idValue,
Name: nameValue,
Model: modelValue,
StarshipClass: starshipClassValue,
Manufacturer: manufacturerValue,
CostInCredits: costInCreditsValue,
Length: lengthValue,
Crew: crewValue,
Passengers: passengersValue,
MaxAtmospheringSpeed: maxAtmospheringSpeedValue,
HyperdriveRating: hyperdriveRatingValue,
Mglt: mgltValue,
CargoCapacity: cargoCapacityValue,
Consumables: consumablesValue,
Url: urlValue,
Created: createdValue,
Edited: editedValue,
FilmIds: filmIdsValue,
PilotIds: pilotIdsValue,
}
return ret, nil
}
// cast_Swapi_Vehicle_Vehicle__to__Swapi_Vehicle cast from "swapi.vehicle.Vehicle" to "swapi.Vehicle".
func (s *SWAPI) cast_Swapi_Vehicle_Vehicle__to__Swapi_Vehicle(from *vehiclepb.Vehicle) (*Vehicle, error) {
if from == nil {
return nil, nil
}
idValue := from.GetId()
nameValue := from.GetName()
modelValue := from.GetModel()
vehicleClassValue := from.GetVehicleClass()
manufacturerValue := from.GetManufacturer()
lengthValue := from.GetLength()
costInCreditsValue := from.GetCostInCredits()
crewValue := from.GetCrew()
passengersValue := from.GetPassengers()
maxAtmospheringSpeedValue := from.GetMaxAtmospheringSpeed()
cargoCapacityValue := from.GetCargoCapacity()
consumablesValue := from.GetConsumables()
urlValue := from.GetUrl()
createdValue := from.GetCreated()
editedValue := from.GetEdited()
filmIdsValue := from.GetFilmIds()
pilotIdsValue := from.GetPilotIds()
ret := &Vehicle{
Id: idValue,
Name: nameValue,
Model: modelValue,
VehicleClass: vehicleClassValue,
Manufacturer: manufacturerValue,
Length: lengthValue,
CostInCredits: costInCreditsValue,
Crew: crewValue,
Passengers: passengersValue,
MaxAtmospheringSpeed: maxAtmospheringSpeedValue,
CargoCapacity: cargoCapacityValue,
Consumables: consumablesValue,
Url: urlValue,
Created: createdValue,
Edited: editedValue,
FilmIds: filmIdsValue,
PilotIds: pilotIdsValue,
}
return ret, nil
}
// cast_repeated_Swapi_Film_Film__to__repeated_Swapi_Film cast from "repeated swapi.film.Film" to "repeated swapi.Film".
func (s *SWAPI) cast_repeated_Swapi_Film_Film__to__repeated_Swapi_Film(from []*filmpb.Film) ([]*Film, error) {
ret := make([]*Film, 0, len(from))
for _, v := range from {
casted, err := s.cast_Swapi_Film_Film__to__Swapi_Film(v)
if err != nil {
return nil, err
}
ret = append(ret, casted)
}
return ret, nil
}
// cast_repeated_Swapi_Person_Person__to__repeated_Swapi_Person cast from "repeated swapi.person.Person" to "repeated swapi.Person".
func (s *SWAPI) cast_repeated_Swapi_Person_Person__to__repeated_Swapi_Person(from []*personpb.Person) ([]*Person, error) {
ret := make([]*Person, 0, len(from))
for _, v := range from {
casted, err := s.cast_Swapi_Person_Person__to__Swapi_Person(v)
if err != nil {
return nil, err
}
ret = append(ret, casted)
}
return ret, nil
}
// cast_repeated_Swapi_Planet_Planet__to__repeated_Swapi_Planet cast from "repeated swapi.planet.Planet" to "repeated swapi.Planet".
func (s *SWAPI) cast_repeated_Swapi_Planet_Planet__to__repeated_Swapi_Planet(from []*planetpb.Planet) ([]*Planet, error) {
ret := make([]*Planet, 0, len(from))
for _, v := range from {
casted, err := s.cast_Swapi_Planet_Planet__to__Swapi_Planet(v)
if err != nil {
return nil, err
}
ret = append(ret, casted)
}
return ret, nil
}
// cast_repeated_Swapi_Species_Species__to__repeated_Swapi_Species cast from "repeated swapi.species.Species" to "repeated swapi.Species".
func (s *SWAPI) cast_repeated_Swapi_Species_Species__to__repeated_Swapi_Species(from []*speciespb.Species) ([]*Species, error) {
ret := make([]*Species, 0, len(from))
for _, v := range from {
casted, err := s.cast_Swapi_Species_Species__to__Swapi_Species(v)
if err != nil {
return nil, err
}
ret = append(ret, casted)
}
return ret, nil
}
// cast_repeated_Swapi_Starship_Starship__to__repeated_Swapi_Starship cast from "repeated swapi.starship.Starship" to "repeated swapi.Starship".
func (s *SWAPI) cast_repeated_Swapi_Starship_Starship__to__repeated_Swapi_Starship(from []*starshippb.Starship) ([]*Starship, error) {
ret := make([]*Starship, 0, len(from))
for _, v := range from {
casted, err := s.cast_Swapi_Starship_Starship__to__Swapi_Starship(v)
if err != nil {
return nil, err
}
ret = append(ret, casted)
}
return ret, nil
}
// cast_repeated_Swapi_Vehicle_Vehicle__to__repeated_Swapi_Vehicle cast from "repeated swapi.vehicle.Vehicle" to "repeated swapi.Vehicle".
func (s *SWAPI) cast_repeated_Swapi_Vehicle_Vehicle__to__repeated_Swapi_Vehicle(from []*vehiclepb.Vehicle) ([]*Vehicle, error) {
ret := make([]*Vehicle, 0, len(from))
for _, v := range from {
casted, err := s.cast_Swapi_Vehicle_Vehicle__to__Swapi_Vehicle(v)
if err != nil {
return nil, err
}
ret = append(ret, casted)
}
return ret, nil
}
func (s *SWAPI) logvalue_Google_Type_Date(v *date.Date) slog.Value {
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.Int64("year", int64(v.GetYear())),
slog.Int64("month", int64(v.GetMonth())),
slog.Int64("day", int64(v.GetDay())),
)
}
func (s *SWAPI) logvalue_Swapi_Film(v *Film) slog.Value {
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.Int64("id", v.GetId()),
slog.String("title", v.GetTitle()),
slog.Int64("episode_id", int64(v.GetEpisodeId())),
slog.String("opening_crawl", v.GetOpeningCrawl()),
slog.String("director", v.GetDirector()),
slog.String("producer", v.GetProducer()),
slog.Any("release_date", s.logvalue_Google_Type_Date(v.GetReleaseDate())),
slog.String("url", v.GetUrl()),
slog.String("created", v.GetCreated()),
slog.String("edited", v.GetEdited()),
slog.Any("species_ids", v.GetSpeciesIds()),
slog.Any("starship_ids", v.GetStarshipIds()),
slog.Any("vehicle_ids", v.GetVehicleIds()),
slog.Any("character_ids", v.GetCharacterIds()),
slog.Any("planet_ids", v.GetPlanetIds()),
)
}
func (s *SWAPI) logvalue_Swapi_Film_GetFilmRequest(v *filmpb.GetFilmRequest) slog.Value {
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.Int64("id", v.GetId()),
)
}
func (s *SWAPI) logvalue_Swapi_Film_ListFilmsRequest(v *filmpb.ListFilmsRequest) slog.Value {
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.Any("ids", v.GetIds()),
)
}
func (s *SWAPI) logvalue_Swapi_Films(v *Films) slog.Value {
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.Any("films", s.logvalue_repeated_Swapi_Film(v.GetFilms())),
)
}
func (s *SWAPI) logvalue_Swapi_FilmsArgument(v *SWAPI_Swapi_FilmsArgument) slog.Value {
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.Any("ids", v.Ids),
)
}
func (s *SWAPI) logvalue_Swapi_GetFilmReply(v *GetFilmReply) slog.Value {
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.Any("film", s.logvalue_Swapi_Film(v.GetFilm())),
slog.Any("species", s.logvalue_repeated_Swapi_Species(v.GetSpecies())),
slog.Any("starships", s.logvalue_repeated_Swapi_Starship(v.GetStarships())),
slog.Any("vehicles", s.logvalue_repeated_Swapi_Vehicle(v.GetVehicles())),
slog.Any("characters", s.logvalue_repeated_Swapi_Person(v.GetCharacters())),
slog.Any("planets", s.logvalue_repeated_Swapi_Planet(v.GetPlanets())),
)
}
func (s *SWAPI) logvalue_Swapi_GetFilmReplyArgument(v *SWAPI_Swapi_GetFilmReplyArgument) slog.Value {
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.Int64("id", v.Id),
)
}
func (s *SWAPI) logvalue_Swapi_GetPersonReply(v *GetPersonReply) slog.Value {
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.Any("person", s.logvalue_Swapi_Person(v.GetPerson())),
slog.Any("films", s.logvalue_repeated_Swapi_Film(v.GetFilms())),
slog.Any("species", s.logvalue_repeated_Swapi_Species(v.GetSpecies())),
slog.Any("starships", s.logvalue_repeated_Swapi_Starship(v.GetStarships())),
slog.Any("vehicles", s.logvalue_repeated_Swapi_Vehicle(v.GetVehicles())),
)
}
func (s *SWAPI) logvalue_Swapi_GetPersonReplyArgument(v *SWAPI_Swapi_GetPersonReplyArgument) slog.Value {
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.Int64("id", v.Id),
)
}
func (s *SWAPI) logvalue_Swapi_GetPlanetReply(v *GetPlanetReply) slog.Value {
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.Any("planet", s.logvalue_Swapi_Planet(v.GetPlanet())),
slog.Any("residents", s.logvalue_repeated_Swapi_Person(v.GetResidents())),
slog.Any("films", s.logvalue_repeated_Swapi_Film(v.GetFilms())),
)
}
func (s *SWAPI) logvalue_Swapi_GetPlanetReplyArgument(v *SWAPI_Swapi_GetPlanetReplyArgument) slog.Value {
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.Int64("id", v.Id),
)
}
func (s *SWAPI) logvalue_Swapi_GetSpeciesReply(v *GetSpeciesReply) slog.Value {
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.Any("species", s.logvalue_Swapi_Species(v.GetSpecies())),
slog.Any("people", s.logvalue_repeated_Swapi_Person(v.GetPeople())),
slog.Any("films", s.logvalue_repeated_Swapi_Film(v.GetFilms())),
)
}
func (s *SWAPI) logvalue_Swapi_GetSpeciesReplyArgument(v *SWAPI_Swapi_GetSpeciesReplyArgument) slog.Value {
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.Int64("id", v.Id),
)
}
func (s *SWAPI) logvalue_Swapi_GetStarshipReply(v *GetStarshipReply) slog.Value {
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.Any("starship", s.logvalue_Swapi_Starship(v.GetStarship())),
slog.Any("films", s.logvalue_repeated_Swapi_Film(v.GetFilms())),
slog.Any("pilots", s.logvalue_repeated_Swapi_Person(v.GetPilots())),
)
}
func (s *SWAPI) logvalue_Swapi_GetStarshipReplyArgument(v *SWAPI_Swapi_GetStarshipReplyArgument) slog.Value {
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.Int64("id", v.Id),
)
}
func (s *SWAPI) logvalue_Swapi_GetVehicleReply(v *GetVehicleReply) slog.Value {
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.Any("vehicle", s.logvalue_Swapi_Vehicle(v.GetVehicle())),
slog.Any("films", s.logvalue_repeated_Swapi_Film(v.GetFilms())),
slog.Any("pilots", s.logvalue_repeated_Swapi_Person(v.GetPilots())),
)
}
func (s *SWAPI) logvalue_Swapi_GetVehicleReplyArgument(v *SWAPI_Swapi_GetVehicleReplyArgument) slog.Value {
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.Int64("id", v.Id),
)
}
func (s *SWAPI) logvalue_Swapi_ListFilmsReply(v *ListFilmsReply) slog.Value {
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.Any("films", s.logvalue_repeated_Swapi_Film(v.GetFilms())),
)
}
func (s *SWAPI) logvalue_Swapi_ListFilmsReplyArgument(v *SWAPI_Swapi_ListFilmsReplyArgument) slog.Value {
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.Any("ids", v.Ids),
)
}
func (s *SWAPI) logvalue_Swapi_ListPeopleReply(v *ListPeopleReply) slog.Value {
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.Any("people", s.logvalue_repeated_Swapi_Person(v.GetPeople())),
)
}
func (s *SWAPI) logvalue_Swapi_ListPeopleReplyArgument(v *SWAPI_Swapi_ListPeopleReplyArgument) slog.Value {
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.Any("ids", v.Ids),
)
}
func (s *SWAPI) logvalue_Swapi_ListPlanetsReply(v *ListPlanetsReply) slog.Value {
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.Any("planets", s.logvalue_repeated_Swapi_Planet(v.GetPlanets())),
)
}
func (s *SWAPI) logvalue_Swapi_ListPlanetsReplyArgument(v *SWAPI_Swapi_ListPlanetsReplyArgument) slog.Value {
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.Any("ids", v.Ids),
)
}
func (s *SWAPI) logvalue_Swapi_ListSpeciesReply(v *ListSpeciesReply) slog.Value {
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.Any("species", s.logvalue_repeated_Swapi_Species(v.GetSpecies())),
)
}
func (s *SWAPI) logvalue_Swapi_ListSpeciesReplyArgument(v *SWAPI_Swapi_ListSpeciesReplyArgument) slog.Value {
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.Any("ids", v.Ids),
)
}
func (s *SWAPI) logvalue_Swapi_ListStarshipsReply(v *ListStarshipsReply) slog.Value {
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.Any("starships", s.logvalue_repeated_Swapi_Starship(v.GetStarships())),
)
}
func (s *SWAPI) logvalue_Swapi_ListStarshipsReplyArgument(v *SWAPI_Swapi_ListStarshipsReplyArgument) slog.Value {
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.Any("ids", v.Ids),
)
}
func (s *SWAPI) logvalue_Swapi_ListVehiclesReply(v *ListVehiclesReply) slog.Value {
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.Any("vehicles", s.logvalue_repeated_Swapi_Vehicle(v.GetVehicles())),
)
}
func (s *SWAPI) logvalue_Swapi_ListVehiclesReplyArgument(v *SWAPI_Swapi_ListVehiclesReplyArgument) slog.Value {
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.Any("ids", v.Ids),
)
}
func (s *SWAPI) logvalue_Swapi_People(v *People) slog.Value {
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.Any("people", s.logvalue_repeated_Swapi_Person(v.GetPeople())),
)
}
func (s *SWAPI) logvalue_Swapi_PeopleArgument(v *SWAPI_Swapi_PeopleArgument) slog.Value {
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.Any("ids", v.Ids),
)
}
func (s *SWAPI) logvalue_Swapi_Person(v *Person) slog.Value {
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.Int64("id", v.GetId()),
slog.String("name", v.GetName()),
slog.String("birth_year", v.GetBirthYear()),
slog.String("eye_color", v.GetEyeColor()),
slog.String("gender", v.GetGender()),
slog.String("hair_color", v.GetHairColor()),
slog.String("height", v.GetHeight()),
slog.String("mass", v.GetMass()),
slog.String("skin_color", v.GetSkinColor()),
slog.String("homeworld", v.GetHomeworld()),
slog.String("url", v.GetUrl()),
slog.String("created", v.GetCreated()),
slog.String("edited", v.GetEdited()),
slog.Any("film_ids", v.GetFilmIds()),
slog.Any("species_ids", v.GetSpeciesIds()),
slog.Any("starship_ids", v.GetStarshipIds()),
slog.Any("vehicle_ids", v.GetVehicleIds()),
)
}
func (s *SWAPI) logvalue_Swapi_Person_GetPersonRequest(v *personpb.GetPersonRequest) slog.Value {
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.Int64("id", v.GetId()),
)
}
func (s *SWAPI) logvalue_Swapi_Person_ListPeopleRequest(v *personpb.ListPeopleRequest) slog.Value {
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.Any("ids", v.GetIds()),
)
}
func (s *SWAPI) logvalue_Swapi_Planet(v *Planet) slog.Value {
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.Int64("id", v.GetId()),
slog.String("name", v.GetName()),
slog.String("diameter", v.GetDiameter()),
slog.String("rotation_period", v.GetRotationPeriod()),
slog.String("orbital_period", v.GetOrbitalPeriod()),
slog.String("gravity", v.GetGravity()),
slog.String("population", v.GetPopulation()),
slog.String("climate", v.GetClimate()),
slog.String("terrain", v.GetTerrain()),
slog.String("surface_water", v.GetSurfaceWater()),
slog.String("url", v.GetUrl()),
slog.String("created", v.GetCreated()),
slog.String("edited", v.GetEdited()),
slog.Any("resident_ids", v.GetResidentIds()),
slog.Any("film_ids", v.GetFilmIds()),
)
}
func (s *SWAPI) logvalue_Swapi_Planet_GetPlanetRequest(v *planetpb.GetPlanetRequest) slog.Value {
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.Int64("id", v.GetId()),
)
}
func (s *SWAPI) logvalue_Swapi_Planet_ListPlanetsRequest(v *planetpb.ListPlanetsRequest) slog.Value {
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.Any("ids", v.GetIds()),
)
}
func (s *SWAPI) logvalue_Swapi_Planets(v *Planets) slog.Value {
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.Any("planets", s.logvalue_repeated_Swapi_Planet(v.GetPlanets())),
)
}
func (s *SWAPI) logvalue_Swapi_PlanetsArgument(v *SWAPI_Swapi_PlanetsArgument) slog.Value {
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.Any("ids", v.Ids),
)
}
func (s *SWAPI) logvalue_Swapi_Species(v *Species) slog.Value {
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.Int64("id", v.GetId()),
slog.String("name", v.GetName()),
slog.String("classification", v.GetClassification()),
slog.String("designation", v.GetDesignation()),
slog.String("average_height", v.GetAverageHeight()),
slog.String("average_lifespan", v.GetAverageLifespan()),
slog.String("eye_colors", v.GetEyeColors()),
slog.String("hair_colors", v.GetHairColors()),
slog.String("skin_colors", v.GetSkinColors()),
slog.String("language", v.GetLanguage()),
slog.String("homeworld", v.GetHomeworld()),
slog.String("url", v.GetUrl()),
slog.String("created", v.GetCreated()),
slog.String("edited", v.GetEdited()),
slog.Any("person_ids", v.GetPersonIds()),
slog.Any("film_ids", v.GetFilmIds()),
)
}
func (s *SWAPI) logvalue_Swapi_SpeciesList(v *SpeciesList) slog.Value {
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.Any("species", s.logvalue_repeated_Swapi_Species(v.GetSpecies())),
)
}
func (s *SWAPI) logvalue_Swapi_SpeciesListArgument(v *SWAPI_Swapi_SpeciesListArgument) slog.Value {
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.Any("ids", v.Ids),
)
}
func (s *SWAPI) logvalue_Swapi_Species_GetSpeciesRequest(v *speciespb.GetSpeciesRequest) slog.Value {
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.Int64("id", v.GetId()),
)
}
func (s *SWAPI) logvalue_Swapi_Species_ListSpeciesRequest(v *speciespb.ListSpeciesRequest) slog.Value {
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.Any("ids", v.GetIds()),
)
}
func (s *SWAPI) logvalue_Swapi_Starship(v *Starship) slog.Value {
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.Int64("id", v.GetId()),
slog.String("name", v.GetName()),
slog.String("model", v.GetModel()),
slog.String("starship_class", v.GetStarshipClass()),
slog.String("manufacturer", v.GetManufacturer()),
slog.String("cost_in_credits", v.GetCostInCredits()),
slog.String("length", v.GetLength()),
slog.String("crew", v.GetCrew()),
slog.String("passengers", v.GetPassengers()),
slog.String("max_atmosphering_speed", v.GetMaxAtmospheringSpeed()),
slog.String("hyperdrive_rating", v.GetHyperdriveRating()),
slog.String("mglt", v.GetMglt()),
slog.String("cargo_capacity", v.GetCargoCapacity()),
slog.String("consumables", v.GetConsumables()),
slog.String("url", v.GetUrl()),
slog.String("created", v.GetCreated()),
slog.String("edited", v.GetEdited()),
slog.Any("film_ids", v.GetFilmIds()),
slog.Any("pilot_ids", v.GetPilotIds()),
)
}
func (s *SWAPI) logvalue_Swapi_Starship_GetStarshipRequest(v *starshippb.GetStarshipRequest) slog.Value {
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.Int64("id", v.GetId()),
)
}
func (s *SWAPI) logvalue_Swapi_Starship_ListStarshipsRequest(v *starshippb.ListStarshipsRequest) slog.Value {
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.Any("ids", v.GetIds()),
)
}
func (s *SWAPI) logvalue_Swapi_Starships(v *Starships) slog.Value {
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.Any("starships", s.logvalue_repeated_Swapi_Starship(v.GetStarships())),
)
}
func (s *SWAPI) logvalue_Swapi_StarshipsArgument(v *SWAPI_Swapi_StarshipsArgument) slog.Value {
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.Any("ids", v.Ids),
)
}
func (s *SWAPI) logvalue_Swapi_Vehicle(v *Vehicle) slog.Value {
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.Int64("id", v.GetId()),
slog.String("name", v.GetName()),
slog.String("model", v.GetModel()),
slog.String("vehicle_class", v.GetVehicleClass()),
slog.String("manufacturer", v.GetManufacturer()),
slog.String("length", v.GetLength()),
slog.String("cost_in_credits", v.GetCostInCredits()),
slog.String("crew", v.GetCrew()),
slog.String("passengers", v.GetPassengers()),
slog.String("max_atmosphering_speed", v.GetMaxAtmospheringSpeed()),
slog.String("cargo_capacity", v.GetCargoCapacity()),
slog.String("consumables", v.GetConsumables()),
slog.String("url", v.GetUrl()),
slog.String("created", v.GetCreated()),
slog.String("edited", v.GetEdited()),
slog.Any("film_ids", v.GetFilmIds()),
slog.Any("pilot_ids", v.GetPilotIds()),
)
}
func (s *SWAPI) logvalue_Swapi_Vehicle_GetVehicleRequest(v *vehiclepb.GetVehicleRequest) slog.Value {
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.Int64("id", v.GetId()),
)
}
func (s *SWAPI) logvalue_Swapi_Vehicle_ListVehiclesRequest(v *vehiclepb.ListVehiclesRequest) slog.Value {
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.Any("ids", v.GetIds()),
)
}
func (s *SWAPI) logvalue_Swapi_Vehicles(v *Vehicles) slog.Value {
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.Any("vehicles", s.logvalue_repeated_Swapi_Vehicle(v.GetVehicles())),
)
}
func (s *SWAPI) logvalue_Swapi_VehiclesArgument(v *SWAPI_Swapi_VehiclesArgument) slog.Value {
if v == nil {
return slog.GroupValue()
}
return slog.GroupValue(
slog.Any("ids", v.Ids),
)
}
func (s *SWAPI) logvalue_repeated_Swapi_Film(v []*Film) slog.Value {
attrs := make([]slog.Attr, 0, len(v))
for idx, vv := range v {
attrs = append(attrs, slog.Attr{
Key: grpcfed.ToLogAttrKey(idx),
Value: s.logvalue_Swapi_Film(vv),
})
}
return slog.GroupValue(attrs...)
}
func (s *SWAPI) logvalue_repeated_Swapi_Person(v []*Person) slog.Value {
attrs := make([]slog.Attr, 0, len(v))
for idx, vv := range v {
attrs = append(attrs, slog.Attr{
Key: grpcfed.ToLogAttrKey(idx),
Value: s.logvalue_Swapi_Person(vv),
})
}
return slog.GroupValue(attrs...)
}
func (s *SWAPI) logvalue_repeated_Swapi_Planet(v []*Planet) slog.Value {
attrs := make([]slog.Attr, 0, len(v))
for idx, vv := range v {
attrs = append(attrs, slog.Attr{
Key: grpcfed.ToLogAttrKey(idx),
Value: s.logvalue_Swapi_Planet(vv),
})
}
return slog.GroupValue(attrs...)
}
func (s *SWAPI) logvalue_repeated_Swapi_Species(v []*Species) slog.Value {
attrs := make([]slog.Attr, 0, len(v))
for idx, vv := range v {
attrs = append(attrs, slog.Attr{
Key: grpcfed.ToLogAttrKey(idx),
Value: s.logvalue_Swapi_Species(vv),
})
}
return slog.GroupValue(attrs...)
}
func (s *SWAPI) logvalue_repeated_Swapi_Starship(v []*Starship) slog.Value {
attrs := make([]slog.Attr, 0, len(v))
for idx, vv := range v {
attrs = append(attrs, slog.Attr{
Key: grpcfed.ToLogAttrKey(idx),
Value: s.logvalue_Swapi_Starship(vv),
})
}
return slog.GroupValue(attrs...)
}
func (s *SWAPI) logvalue_repeated_Swapi_Vehicle(v []*Vehicle) slog.Value {
attrs := make([]slog.Attr, 0, len(v))
for idx, vv := range v {
attrs = append(attrs, slog.Attr{
Key: grpcfed.ToLogAttrKey(idx),
Value: s.logvalue_Swapi_Vehicle(vv),
})
}
return slog.GroupValue(attrs...)
}
================================================
FILE: demo/swapi/vehicle/vehicle.pb.go
================================================
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.34.1
// protoc (unknown)
// source: vehicle/vehicle.proto
package vehiclepb
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
// GetVehicleRequest.
type GetVehicleRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// vehicle id.
Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
}
func (x *GetVehicleRequest) Reset() {
*x = GetVehicleRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_vehicle_vehicle_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GetVehicleRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetVehicleRequest) ProtoMessage() {}
func (x *GetVehicleRequest) ProtoReflect() protoreflect.Message {
mi := &file_vehicle_vehicle_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GetVehicleRequest.ProtoReflect.Descriptor instead.
func (*GetVehicleRequest) Descriptor() ([]byte, []int) {
return file_vehicle_vehicle_proto_rawDescGZIP(), []int{0}
}
func (x *GetVehicleRequest) GetId() int64 {
if x != nil {
return x.Id
}
return 0
}
// GetVehicleReply.
type GetVehicleReply struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Vehicle *Vehicle `protobuf:"bytes,1,opt,name=vehicle,proto3" json:"vehicle,omitempty"`
}
func (x *GetVehicleReply) Reset() {
*x = GetVehicleReply{}
if protoimpl.UnsafeEnabled {
mi := &file_vehicle_vehicle_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GetVehicleReply) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetVehicleReply) ProtoMessage() {}
func (x *GetVehicleReply) ProtoReflect() protoreflect.Message {
mi := &file_vehicle_vehicle_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GetVehicleReply.ProtoReflect.Descriptor instead.
func (*GetVehicleReply) Descriptor() ([]byte, []int) {
return file_vehicle_vehicle_proto_rawDescGZIP(), []int{1}
}
func (x *GetVehicleReply) GetVehicle() *Vehicle {
if x != nil {
return x.Vehicle
}
return nil
}
// ListVehiclesRequest.
type ListVehiclesRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Ids []int64 `protobuf:"varint,1,rep,packed,name=ids,proto3" json:"ids,omitempty"`
}
func (x *ListVehiclesRequest) Reset() {
*x = ListVehiclesRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_vehicle_vehicle_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ListVehiclesRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ListVehiclesRequest) ProtoMessage() {}
func (x *ListVehiclesRequest) ProtoReflect() protoreflect.Message {
mi := &file_vehicle_vehicle_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ListVehiclesRequest.ProtoReflect.Descriptor instead.
func (*ListVehiclesRequest) Descriptor() ([]byte, []int) {
return file_vehicle_vehicle_proto_rawDescGZIP(), []int{2}
}
func (x *ListVehiclesRequest) GetIds() []int64 {
if x != nil {
return x.Ids
}
return nil
}
// ListVehiclesReply.
type ListVehiclesReply struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Vehicles []*Vehicle `protobuf:"bytes,1,rep,name=vehicles,proto3" json:"vehicles,omitempty"`
}
func (x *ListVehiclesReply) Reset() {
*x = ListVehiclesReply{}
if protoimpl.UnsafeEnabled {
mi := &file_vehicle_vehicle_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ListVehiclesReply) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ListVehiclesReply) ProtoMessage() {}
func (x *ListVehiclesReply) ProtoReflect() protoreflect.Message {
mi := &file_vehicle_vehicle_proto_msgTypes[3]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ListVehiclesReply.ProtoReflect.Descriptor instead.
func (*ListVehiclesReply) Descriptor() ([]byte, []int) {
return file_vehicle_vehicle_proto_rawDescGZIP(), []int{3}
}
func (x *ListVehiclesReply) GetVehicles() []*Vehicle {
if x != nil {
return x.Vehicles
}
return nil
}
// Vehicle is a single transport craft that does not have hyperdrive capability..
type Vehicle struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// vehicle id.
Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
// The name of this vehicle. The common name, such as "Sand Crawler" or "Speeder bike".
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
// The model or official name of this vehicle. Such as "All-Terrain Attack Transport".
Model string `protobuf:"bytes,3,opt,name=model,proto3" json:"model,omitempty"`
// The class of this vehicle, such as "Wheeled" or "Repulsorcraft".
VehicleClass string `protobuf:"bytes,4,opt,name=vehicle_class,json=vehicleClass,proto3" json:"vehicle_class,omitempty"`
// The manufacturer of this vehicle. Comma separated if more than one.
Manufacturer string `protobuf:"bytes,5,opt,name=manufacturer,proto3" json:"manufacturer,omitempty"`
// The length of this vehicle in meters.
Length string `protobuf:"bytes,6,opt,name=length,proto3" json:"length,omitempty"`
// The cost of this vehicle new, in Galactic Credits.
CostInCredits string `protobuf:"bytes,7,opt,name=cost_in_credits,json=costInCredits,proto3" json:"cost_in_credits,omitempty"`
// The number of personnel needed to run or pilot this vehicle.
Crew string `protobuf:"bytes,8,opt,name=crew,proto3" json:"crew,omitempty"`
// The number of non-essential people this vehicle can transport.
Passengers string `protobuf:"bytes,9,opt,name=passengers,proto3" json:"passengers,omitempty"`
// The maximum speed of this vehicle in the atmosphere.
MaxAtmospheringSpeed string `protobuf:"bytes,10,opt,name=max_atmosphering_speed,json=maxAtmospheringSpeed,proto3" json:"max_atmosphering_speed,omitempty"`
// The maximum number of kilograms that this vehicle can transport.
CargoCapacity string `protobuf:"bytes,11,opt,name=cargo_capacity,json=cargoCapacity,proto3" json:"cargo_capacity,omitempty"`
// The maximum length of time that this vehicle can provide consumables for its entire crew without having to resupply.
Consumables string `protobuf:"bytes,12,opt,name=consumables,proto3" json:"consumables,omitempty"`
// the hypermedia URL of this resource.
Url string `protobuf:"bytes,13,opt,name=url,proto3" json:"url,omitempty"`
// the ISO 8601 date format of the time that this resource was created.
Created string `protobuf:"bytes,14,opt,name=created,proto3" json:"created,omitempty"`
// the ISO 8601 date format of the time that this resource was edited.
Edited string `protobuf:"bytes,15,opt,name=edited,proto3" json:"edited,omitempty"`
// film ids.
FilmIds []int64 `protobuf:"varint,16,rep,packed,name=film_ids,json=filmIds,proto3" json:"film_ids,omitempty"`
// pilot ids.
PilotIds []int64 `protobuf:"varint,17,rep,packed,name=pilot_ids,json=pilotIds,proto3" json:"pilot_ids,omitempty"`
}
func (x *Vehicle) Reset() {
*x = Vehicle{}
if protoimpl.UnsafeEnabled {
mi := &file_vehicle_vehicle_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Vehicle) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Vehicle) ProtoMessage() {}
func (x *Vehicle) ProtoReflect() protoreflect.Message {
mi := &file_vehicle_vehicle_proto_msgTypes[4]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Vehicle.ProtoReflect.Descriptor instead.
func (*Vehicle) Descriptor() ([]byte, []int) {
return file_vehicle_vehicle_proto_rawDescGZIP(), []int{4}
}
func (x *Vehicle) GetId() int64 {
if x != nil {
return x.Id
}
return 0
}
func (x *Vehicle) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *Vehicle) GetModel() string {
if x != nil {
return x.Model
}
return ""
}
func (x *Vehicle) GetVehicleClass() string {
if x != nil {
return x.VehicleClass
}
return ""
}
func (x *Vehicle) GetManufacturer() string {
if x != nil {
return x.Manufacturer
}
return ""
}
func (x *Vehicle) GetLength() string {
if x != nil {
return x.Length
}
return ""
}
func (x *Vehicle) GetCostInCredits() string {
if x != nil {
return x.CostInCredits
}
return ""
}
func (x *Vehicle) GetCrew() string {
if x != nil {
return x.Crew
}
return ""
}
func (x *Vehicle) GetPassengers() string {
if x != nil {
return x.Passengers
}
return ""
}
func (x *Vehicle) GetMaxAtmospheringSpeed() string {
if x != nil {
return x.MaxAtmospheringSpeed
}
return ""
}
func (x *Vehicle) GetCargoCapacity() string {
if x != nil {
return x.CargoCapacity
}
return ""
}
func (x *Vehicle) GetConsumables() string {
if x != nil {
return x.Consumables
}
return ""
}
func (x *Vehicle) GetUrl() string {
if x != nil {
return x.Url
}
return ""
}
func (x *Vehicle) GetCreated() string {
if x != nil {
return x.Created
}
return ""
}
func (x *Vehicle) GetEdited() string {
if x != nil {
return x.Edited
}
return ""
}
func (x *Vehicle) GetFilmIds() []int64 {
if x != nil {
return x.FilmIds
}
return nil
}
func (x *Vehicle) GetPilotIds() []int64 {
if x != nil {
return x.PilotIds
}
return nil
}
var File_vehicle_vehicle_proto protoreflect.FileDescriptor
var file_vehicle_vehicle_proto_rawDesc = []byte{
0x0a, 0x15, 0x76, 0x65, 0x68, 0x69, 0x63, 0x6c, 0x65, 0x2f, 0x76, 0x65, 0x68, 0x69, 0x63, 0x6c,
0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0d, 0x73, 0x77, 0x61, 0x70, 0x69, 0x2e, 0x76,
0x65, 0x68, 0x69, 0x63, 0x6c, 0x65, 0x22, 0x23, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x56, 0x65, 0x68,
0x69, 0x63, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69,
0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x22, 0x43, 0x0a, 0x0f, 0x47,
0x65, 0x74, 0x56, 0x65, 0x68, 0x69, 0x63, 0x6c, 0x65, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x30,
0x0a, 0x07, 0x76, 0x65, 0x68, 0x69, 0x63, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32,
0x16, 0x2e, 0x73, 0x77, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x65, 0x68, 0x69, 0x63, 0x6c, 0x65, 0x2e,
0x56, 0x65, 0x68, 0x69, 0x63, 0x6c, 0x65, 0x52, 0x07, 0x76, 0x65, 0x68, 0x69, 0x63, 0x6c, 0x65,
0x22, 0x27, 0x0a, 0x13, 0x4c, 0x69, 0x73, 0x74, 0x56, 0x65, 0x68, 0x69, 0x63, 0x6c, 0x65, 0x73,
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x69, 0x64, 0x73, 0x18, 0x01,
0x20, 0x03, 0x28, 0x03, 0x52, 0x03, 0x69, 0x64, 0x73, 0x22, 0x47, 0x0a, 0x11, 0x4c, 0x69, 0x73,
0x74, 0x56, 0x65, 0x68, 0x69, 0x63, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x32,
0x0a, 0x08, 0x76, 0x65, 0x68, 0x69, 0x63, 0x6c, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b,
0x32, 0x16, 0x2e, 0x73, 0x77, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x65, 0x68, 0x69, 0x63, 0x6c, 0x65,
0x2e, 0x56, 0x65, 0x68, 0x69, 0x63, 0x6c, 0x65, 0x52, 0x08, 0x76, 0x65, 0x68, 0x69, 0x63, 0x6c,
0x65, 0x73, 0x22, 0xfb, 0x03, 0x0a, 0x07, 0x56, 0x65, 0x68, 0x69, 0x63, 0x6c, 0x65, 0x12, 0x0e,
0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12,
0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61,
0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28,
0x09, 0x52, 0x05, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x12, 0x23, 0x0a, 0x0d, 0x76, 0x65, 0x68, 0x69,
0x63, 0x6c, 0x65, 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52,
0x0c, 0x76, 0x65, 0x68, 0x69, 0x63, 0x6c, 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x12, 0x22, 0x0a,
0x0c, 0x6d, 0x61, 0x6e, 0x75, 0x66, 0x61, 0x63, 0x74, 0x75, 0x72, 0x65, 0x72, 0x18, 0x05, 0x20,
0x01, 0x28, 0x09, 0x52, 0x0c, 0x6d, 0x61, 0x6e, 0x75, 0x66, 0x61, 0x63, 0x74, 0x75, 0x72, 0x65,
0x72, 0x12, 0x16, 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x06, 0x20, 0x01, 0x28,
0x09, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x12, 0x26, 0x0a, 0x0f, 0x63, 0x6f, 0x73,
0x74, 0x5f, 0x69, 0x6e, 0x5f, 0x63, 0x72, 0x65, 0x64, 0x69, 0x74, 0x73, 0x18, 0x07, 0x20, 0x01,
0x28, 0x09, 0x52, 0x0d, 0x63, 0x6f, 0x73, 0x74, 0x49, 0x6e, 0x43, 0x72, 0x65, 0x64, 0x69, 0x74,
0x73, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x72, 0x65, 0x77, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52,
0x04, 0x63, 0x72, 0x65, 0x77, 0x12, 0x1e, 0x0a, 0x0a, 0x70, 0x61, 0x73, 0x73, 0x65, 0x6e, 0x67,
0x65, 0x72, 0x73, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x70, 0x61, 0x73, 0x73, 0x65,
0x6e, 0x67, 0x65, 0x72, 0x73, 0x12, 0x34, 0x0a, 0x16, 0x6d, 0x61, 0x78, 0x5f, 0x61, 0x74, 0x6d,
0x6f, 0x73, 0x70, 0x68, 0x65, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x73, 0x70, 0x65, 0x65, 0x64, 0x18,
0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x14, 0x6d, 0x61, 0x78, 0x41, 0x74, 0x6d, 0x6f, 0x73, 0x70,
0x68, 0x65, 0x72, 0x69, 0x6e, 0x67, 0x53, 0x70, 0x65, 0x65, 0x64, 0x12, 0x25, 0x0a, 0x0e, 0x63,
0x61, 0x72, 0x67, 0x6f, 0x5f, 0x63, 0x61, 0x70, 0x61, 0x63, 0x69, 0x74, 0x79, 0x18, 0x0b, 0x20,
0x01, 0x28, 0x09, 0x52, 0x0d, 0x63, 0x61, 0x72, 0x67, 0x6f, 0x43, 0x61, 0x70, 0x61, 0x63, 0x69,
0x74, 0x79, 0x12, 0x20, 0x0a, 0x0b, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6d, 0x61, 0x62, 0x6c, 0x65,
0x73, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6d, 0x61,
0x62, 0x6c, 0x65, 0x73, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x0d, 0x20, 0x01, 0x28,
0x09, 0x52, 0x03, 0x75, 0x72, 0x6c, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65,
0x64, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64,
0x12, 0x16, 0x0a, 0x06, 0x65, 0x64, 0x69, 0x74, 0x65, 0x64, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x09,
0x52, 0x06, 0x65, 0x64, 0x69, 0x74, 0x65, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x66, 0x69, 0x6c, 0x6d,
0x5f, 0x69, 0x64, 0x73, 0x18, 0x10, 0x20, 0x03, 0x28, 0x03, 0x52, 0x07, 0x66, 0x69, 0x6c, 0x6d,
0x49, 0x64, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x69, 0x6c, 0x6f, 0x74, 0x5f, 0x69, 0x64, 0x73,
0x18, 0x11, 0x20, 0x03, 0x28, 0x03, 0x52, 0x08, 0x70, 0x69, 0x6c, 0x6f, 0x74, 0x49, 0x64, 0x73,
0x32, 0xba, 0x01, 0x0a, 0x0e, 0x56, 0x65, 0x68, 0x69, 0x63, 0x6c, 0x65, 0x53, 0x65, 0x72, 0x76,
0x69, 0x63, 0x65, 0x12, 0x50, 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x56, 0x65, 0x68, 0x69, 0x63, 0x6c,
0x65, 0x12, 0x20, 0x2e, 0x73, 0x77, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x65, 0x68, 0x69, 0x63, 0x6c,
0x65, 0x2e, 0x47, 0x65, 0x74, 0x56, 0x65, 0x68, 0x69, 0x63, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75,
0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x73, 0x77, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x65, 0x68, 0x69,
0x63, 0x6c, 0x65, 0x2e, 0x47, 0x65, 0x74, 0x56, 0x65, 0x68, 0x69, 0x63, 0x6c, 0x65, 0x52, 0x65,
0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, 0x56, 0x0a, 0x0c, 0x4c, 0x69, 0x73, 0x74, 0x56, 0x65, 0x68,
0x69, 0x63, 0x6c, 0x65, 0x73, 0x12, 0x22, 0x2e, 0x73, 0x77, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x65,
0x68, 0x69, 0x63, 0x6c, 0x65, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x56, 0x65, 0x68, 0x69, 0x63, 0x6c,
0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x73, 0x77, 0x61, 0x70,
0x69, 0x2e, 0x76, 0x65, 0x68, 0x69, 0x63, 0x6c, 0x65, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x56, 0x65,
0x68, 0x69, 0x63, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x42, 0xb7, 0x01,
0x0a, 0x11, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x77, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x65, 0x68, 0x69,
0x63, 0x6c, 0x65, 0x42, 0x0c, 0x56, 0x65, 0x68, 0x69, 0x63, 0x6c, 0x65, 0x50, 0x72, 0x6f, 0x74,
0x6f, 0x50, 0x01, 0x5a, 0x3f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f,
0x6d, 0x65, 0x72, 0x63, 0x61, 0x72, 0x69, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2d, 0x66, 0x65, 0x64,
0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x64, 0x65, 0x6d, 0x6f, 0x2f, 0x73, 0x77, 0x61,
0x70, 0x69, 0x2f, 0x76, 0x65, 0x68, 0x69, 0x63, 0x6c, 0x65, 0x3b, 0x76, 0x65, 0x68, 0x69, 0x63,
0x6c, 0x65, 0x70, 0x62, 0xa2, 0x02, 0x03, 0x53, 0x56, 0x58, 0xaa, 0x02, 0x0d, 0x53, 0x77, 0x61,
0x70, 0x69, 0x2e, 0x56, 0x65, 0x68, 0x69, 0x63, 0x6c, 0x65, 0xca, 0x02, 0x0d, 0x53, 0x77, 0x61,
0x70, 0x69, 0x5c, 0x56, 0x65, 0x68, 0x69, 0x63, 0x6c, 0x65, 0xe2, 0x02, 0x19, 0x53, 0x77, 0x61,
0x70, 0x69, 0x5c, 0x56, 0x65, 0x68, 0x69, 0x63, 0x6c, 0x65, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65,
0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0e, 0x53, 0x77, 0x61, 0x70, 0x69, 0x3a, 0x3a,
0x56, 0x65, 0x68, 0x69, 0x63, 0x6c, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_vehicle_vehicle_proto_rawDescOnce sync.Once
file_vehicle_vehicle_proto_rawDescData = file_vehicle_vehicle_proto_rawDesc
)
func file_vehicle_vehicle_proto_rawDescGZIP() []byte {
file_vehicle_vehicle_proto_rawDescOnce.Do(func() {
file_vehicle_vehicle_proto_rawDescData = protoimpl.X.CompressGZIP(file_vehicle_vehicle_proto_rawDescData)
})
return file_vehicle_vehicle_proto_rawDescData
}
var file_vehicle_vehicle_proto_msgTypes = make([]protoimpl.MessageInfo, 5)
var file_vehicle_vehicle_proto_goTypes = []interface{}{
(*GetVehicleRequest)(nil), // 0: swapi.vehicle.GetVehicleRequest
(*GetVehicleReply)(nil), // 1: swapi.vehicle.GetVehicleReply
(*ListVehiclesRequest)(nil), // 2: swapi.vehicle.ListVehiclesRequest
(*ListVehiclesReply)(nil), // 3: swapi.vehicle.ListVehiclesReply
(*Vehicle)(nil), // 4: swapi.vehicle.Vehicle
}
var file_vehicle_vehicle_proto_depIdxs = []int32{
4, // 0: swapi.vehicle.GetVehicleReply.vehicle:type_name -> swapi.vehicle.Vehicle
4, // 1: swapi.vehicle.ListVehiclesReply.vehicles:type_name -> swapi.vehicle.Vehicle
0, // 2: swapi.vehicle.VehicleService.GetVehicle:input_type -> swapi.vehicle.GetVehicleRequest
2, // 3: swapi.vehicle.VehicleService.ListVehicles:input_type -> swapi.vehicle.ListVehiclesRequest
1, // 4: swapi.vehicle.VehicleService.GetVehicle:output_type -> swapi.vehicle.GetVehicleReply
3, // 5: swapi.vehicle.VehicleService.ListVehicles:output_type -> swapi.vehicle.ListVehiclesReply
4, // [4:6] is the sub-list for method output_type
2, // [2:4] is the sub-list for method input_type
2, // [2:2] is the sub-list for extension type_name
2, // [2:2] is the sub-list for extension extendee
0, // [0:2] is the sub-list for field type_name
}
func init() { file_vehicle_vehicle_proto_init() }
func file_vehicle_vehicle_proto_init() {
if File_vehicle_vehicle_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_vehicle_vehicle_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetVehicleRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_vehicle_vehicle_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetVehicleReply); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_vehicle_vehicle_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ListVehiclesRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_vehicle_vehicle_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ListVehiclesReply); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_vehicle_vehicle_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Vehicle); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_vehicle_vehicle_proto_rawDesc,
NumEnums: 0,
NumMessages: 5,
NumExtensions: 0,
NumServices: 1,
},
GoTypes: file_vehicle_vehicle_proto_goTypes,
DependencyIndexes: file_vehicle_vehicle_proto_depIdxs,
MessageInfos: file_vehicle_vehicle_proto_msgTypes,
}.Build()
File_vehicle_vehicle_proto = out.File
file_vehicle_vehicle_proto_rawDesc = nil
file_vehicle_vehicle_proto_goTypes = nil
file_vehicle_vehicle_proto_depIdxs = nil
}
================================================
FILE: demo/swapi/vehicle/vehicle_grpc.pb.go
================================================
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.4.0
// - protoc (unknown)
// source: vehicle/vehicle.proto
package vehiclepb
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.62.0 or later.
const _ = grpc.SupportPackageIsVersion8
const (
VehicleService_GetVehicle_FullMethodName = "/swapi.vehicle.VehicleService/GetVehicle"
VehicleService_ListVehicles_FullMethodName = "/swapi.vehicle.VehicleService/ListVehicles"
)
// VehicleServiceClient is the client API for VehicleService 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 VehicleServiceClient interface {
GetVehicle(ctx context.Context, in *GetVehicleRequest, opts ...grpc.CallOption) (*GetVehicleReply, error)
ListVehicles(ctx context.Context, in *ListVehiclesRequest, opts ...grpc.CallOption) (*ListVehiclesReply, error)
}
type vehicleServiceClient struct {
cc grpc.ClientConnInterface
}
func NewVehicleServiceClient(cc grpc.ClientConnInterface) VehicleServiceClient {
return &vehicleServiceClient{cc}
}
func (c *vehicleServiceClient) GetVehicle(ctx context.Context, in *GetVehicleRequest, opts ...grpc.CallOption) (*GetVehicleReply, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(GetVehicleReply)
err := c.cc.Invoke(ctx, VehicleService_GetVehicle_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *vehicleServiceClient) ListVehicles(ctx context.Context, in *ListVehiclesRequest, opts ...grpc.CallOption) (*ListVehiclesReply, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(ListVehiclesReply)
err := c.cc.Invoke(ctx, VehicleService_ListVehicles_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
// VehicleServiceServer is the server API for VehicleService service.
// All implementations must embed UnimplementedVehicleServiceServer
// for forward compatibility
type VehicleServiceServer interface {
GetVehicle(context.Context, *GetVehicleRequest) (*GetVehicleReply, error)
ListVehicles(context.Context, *ListVehiclesRequest) (*ListVehiclesReply, error)
mustEmbedUnimplementedVehicleServiceServer()
}
// UnimplementedVehicleServiceServer must be embedded to have forward compatible implementations.
type UnimplementedVehicleServiceServer struct {
}
func (UnimplementedVehicleServiceServer) GetVehicle(context.Context, *GetVehicleRequest) (*GetVehicleReply, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetVehicle not implemented")
}
func (UnimplementedVehicleServiceServer) ListVehicles(context.Context, *ListVehiclesRequest) (*ListVehiclesReply, error) {
return nil, status.Errorf(codes.Unimplemented, "method ListVehicles not implemented")
}
func (UnimplementedVehicleServiceServer) mustEmbedUnimplementedVehicleServiceServer() {}
// UnsafeVehicleServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to VehicleServiceServer will
// result in compilation errors.
type UnsafeVehicleServiceServer interface {
mustEmbedUnimplementedVehicleServiceServer()
}
func RegisterVehicleServiceServer(s grpc.ServiceRegistrar, srv VehicleServiceServer) {
s.RegisterService(&VehicleService_ServiceDesc, srv)
}
func _VehicleService_GetVehicle_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetVehicleRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(VehicleServiceServer).GetVehicle(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: VehicleService_GetVehicle_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(VehicleServiceServer).GetVehicle(ctx, req.(*GetVehicleRequest))
}
return interceptor(ctx, in, info, handler)
}
func _VehicleService_ListVehicles_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ListVehiclesRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(VehicleServiceServer).ListVehicles(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: VehicleService_ListVehicles_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(VehicleServiceServer).ListVehicles(ctx, req.(*ListVehiclesRequest))
}
return interceptor(ctx, in, info, handler)
}
// VehicleService_ServiceDesc is the grpc.ServiceDesc for VehicleService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var VehicleService_ServiceDesc = grpc.ServiceDesc{
ServiceName: "swapi.vehicle.VehicleService",
HandlerType: (*VehicleServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "GetVehicle",
Handler: _VehicleService_GetVehicle_Handler,
},
{
MethodName: "ListVehicles",
Handler: _VehicleService_ListVehicles_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "vehicle/vehicle.proto",
}
================================================
FILE: demo/util/util.go
================================================
package util
import (
"fmt"
"regexp"
"strconv"
)
var (
personURLToIDRe = regexp.MustCompile(`swapi.dev/api/people/(\d+)/`)
planetURLToIDRe = regexp.MustCompile(`swapi.dev/api/planets/(\d+)/`)
speciesURLToIDRe = regexp.MustCompile(`swapi.dev/api/species/(\d+)/`)
starshipURLToIDRe = regexp.MustCompile(`swapi.dev/api/starships/(\d+)/`)
vehicleURLToIDRe = regexp.MustCompile(`swapi.dev/api/vehicles/(\d+)/`)
filmURLToIDRe = regexp.MustCompile(`swapi.dev/api/films/(\d+)/`)
)
func PersonURLToID(url string) (int64, error) {
return urlToID(url, personURLToIDRe)
}
func PlanetURLToID(url string) (int64, error) {
return urlToID(url, planetURLToIDRe)
}
func VehicleURLToID(url string) (int64, error) {
return urlToID(url, vehicleURLToIDRe)
}
func StarshipURLToID(url string) (int64, error) {
return urlToID(url, starshipURLToIDRe)
}
func SpeciesURLToID(url string) (int64, error) {
return urlToID(url, speciesURLToIDRe)
}
func FilmURLToID(url string) (int64, error) {
return urlToID(url, filmURLToIDRe)
}
func urlToID(url string, re *regexp.Regexp) (int64, error) {
matches := re.FindAllStringSubmatch(url, 1)
if len(matches) != 1 {
return 0, fmt.Errorf("unexpected url format: %s", url)
}
if len(matches[0]) != 2 {
return 0, fmt.Errorf("unexpected url format: %s", url)
}
id, err := strconv.ParseInt(matches[0][1], 10, 64)
if err != nil {
return 0, err
}
return id, nil
}
================================================
FILE: docs/cel/any.md
================================================
# grpc.federation.any APIs
# Index
- [`new`](#new)
# Functions
## new
`new` explicitly create an instance of the `google.protobuf.Any` type. The argument must be a Protocol Buffers message type.
### Parameters
`new(message) google.protobuf.Any`
### Examples
```cel
grpc.federation.any.new(google.protobuf.Empty{})
```
================================================
FILE: docs/cel/enum.md
================================================
# grpc.federation.enum APIs
# Index
- [`select`](#select)
- [`name`](#enum-fqdnname)
- [`value`](#enum-fqdnvalue)
- [`from`](#enum-fqdnfrom)
- [`attr`](#enum-fqdnattr)
# Functions
## select
`select` selects the first enum value if the specified condition is `true`, and the second enum value if the condition is `false`. It is used when performing field binding for enums that map multiple enums with an alias.
If you try to return an enum value without using this function, an error will occur due to type mismatch.
e.g.) `true ? pkg.EnumType.Enum_VALUE_A : pkgv2.EnumType.ENUM_VALUE_B`
```
grpc-federation: ERROR: :1:6: found no matching overload for '_?_:_' applied to '(bool, pkg.EnumType(int), pkgv2.EnumType(int))'
| true ? pkg.EnumType.value('ENUM_VALUE_A') : pkgv2.EnumType.value('ENUM_VALUE_B')
| .....^
```
### Parameters
`select(cond bool, , ) grpc.federation.private.EnumSelector`
- `cond`: condition to select enum value
- `first-enum-value`: first enum value. this is selected if the condition is true.
- `second-enum-value`: second enum value. this is selected if the condition is false.
### Examples
```cel
grpc.federation.enum.select(true, pkg.EnumType.ENUM_VALUE_A, pkgv2.EnumType.ENUM_VALUE_B)
```
## `.name`
For all enum types, you can use the `name` method to obtain the name of the enum value as a string.
### Parameters
`pkg.EnumType.name() string`
- ``: int or enum typed value
### Examples
In the following case, `"ENUM_VALUE_1"` ( string typed value) is returned.
```cel
foo.EnumType.name(foo.EnumType.ENUM_VALUE_1)
```
```proto
package foo;
enum EnumType {
ENUM_VALUE_UNKNOWN = 0;
ENUM_VALUE_1 = 1;
}
```
## `.value`
For all enum types, you can use the `value` method to obtain the enum typed value from name.
### Parameters
`pkg.EnumType.value(enumValueName string) EnumValue`
- `enumValueName`: name of the enum value
- `EnumValue`: enum typed value. This value can be used as an argument for the `select` function
### Examples
In the following case, `foo.EnumType.ENUM_VALUE_1` ( enum typed value) is returned.
```cel
foo.EnumType.value('ENUM_VALUE_1')
```
```proto
package foo;
enum EnumType {
ENUM_VALUE_UNKNOWN = 0;
ENUM_VALUE_1 = 1;
}
```
## `.from`
For all enum types, you can use the `from` method to obtain the enum typed value from int value.
### Parameters
`pkg.EnumType.from(enumValue int) EnumValue`
- `enumValue`: int typed value of the enum value
- `EnumValue`: enum typed value. This value can be used as an argument for the `select` function
### Examples
In the following case, `foo.EnumType.ENUM_VALUE_1` ( enum typed value) is returned.
> [!NOTE]
> Here, you might be confused by the difference between `foo.EnumType.ENUM_VALUE_1` appearing in the expression and the returned `foo.EnumType.ENUM_VALUE_1` value.
> As a basic principle, CEL treats enum values as int types when specified directly.
> The `from` method is used to convert this to a typed enum value.
> Although the result looks the same, it is actually typed and can be used as an argument for the `select` function.
```cel
foo.EnumType.from(foo.EnumType.ENUM_VALUE_1)
```
```proto
package foo;
enum EnumType {
ENUM_VALUE_UNKNOWN = 0;
ENUM_VALUE_1 = 1;
}
```
## `.attr`
If you use `attr` to hold multiple name-value pairs corresponding to an enum value, you can get value from `name`.
### Parameters
`pkg.EnumType.attr(enumValue EnumValue, name string) string`
- `enumValue`: the enum value
- `name`: string value to search attribute.
### Examples
In the following case, `Foo.text` value is `foo`.
```proto
package mypkg;
message Foo {
option (grpc.federation.message) = {
def { name: "v" by: "Type.value('VALUE_1')" }
};
string text = 1 [(grpc.federation.field).by = "Type.attr(v, 'attr_x')"];
}
enum Type {
VALUE_1 = 1 [(grpc.federation.enum_value).attr = {
name: "attr_x"
value: "foo"
}];
VALUE_2 = 2 [(grpc.federation.enum_value).attr = {
name: "attr_x"
value: "bar"
}];
}
```
================================================
FILE: docs/cel/list.md
================================================
# grpc.federation.list APIs
# Index
- [`reduce`](#reduce)
- [`first`](#first)
- [`sortAsc`](#sortAsc)
- [`sortDesc`](#sortDesc)
- [`sortStableAsc`](#sortStableAsc)
- [`sortStableDesc`](#sortStableDesc)
# Macros
## reduce
`reduce` executes a user-supplied "reducer" expression on each element of the repeated type, in order, passing in the return value from the calculation on the preceding element. The final result of running the reducer across all elements of the repeated type is a single value.
### Parameters
`range.reduce(accumulator, current, , )`
- `range`: repeated type value
- `accumulator` : The value resulting from the previous `` expression. On the first call, its value is the result of `` expression.
- `current`: current iteration value
- ``: expression for reduce operation
- ``: expression for initial value
### Examples
```cel
[2, 3, 4].reduce(accum, cur, accum + cur, 1) //=> 10
```
## first
Returns the element that evaluates to `` when the result is true. If all elements are not matched, `optional.none` is returned. Thus, the return value of `first` will always be of optional type. The optional value can be used as is for field binding.
`first` is equivalent to the following expression.
```cel
range.filter(var, )[?0]
```
### Parameters
`range.first(var, )`
- `range`: repeated type value
- `var`: current iteration value
- ``: Write a conditional expression to return the first match. Must return a boolean value.
### Examples
```cel
[1, 2, 3, 4].first(v, v % 2 == 0) //=> optional.of(2)
```
## sortAsc
Returns elements sorted in ascending order. Compares values evaluated by the expression.
### Parameters
`range.sortAsc(var, )`
- `range`: repeated type value
- `var`: current iteration value
- `